的评分代码在这里:
- $sql = "SELECT c.*, r.message AS recomment, r.dateline AS replytime, cs.score, cs.score1, cs.score2, cs.score3, cs.score4, cs.score5, cs.score6, cs.score7, cs.score8 FROM ".tname('spacecomments')." c LEFT JOIN ".tname('spacecomments')." r ON c.cid = r.upcid LEFT JOIN ".tname('commentscores')." cs ON c.cid = cs.cid WHERE c.type = '$type' AND c.upcid = 0 AND c.itemid='$comment_itemid' AND c.status='1' ORDER BY c.cid ".($_SCONFIG['commorderby']?'DESC':'ASC');
- $_BCACHE->cachesql('shopcomment', $sql, 0, 1, 10, 0, 'storelist', 'comment', $comment_itemid);
复制代码
然后进行 处理:
- foreach($_SBLOCK['shopcomment'] as $comment) {
- $execute = TRUE;
- if($comment['isprivate'] == 1) {
- if(!in_array($_SGLOBAL['supe_uid'], array($comment['authorid'], $comment['shopuid']))) {
- $execute = FALSE;
- }
- }
- if($execute) {
- if($comment['recomment']) {
- $currentmessage = array();
- preg_match_all ("/\<div class="new">(.+)?\<\/div\>/is", $comment['recomment'], $currentmessage, PREG_SET_ORDER);
- if(!empty($currentmessage)) $comment['recomment'] = $currentmessage[0][0];
- $comment['recomment'] = preg_replace("/\<div class="quote"\>\<blockquote.+?\<\/blockquote\>\<\/div\>/is", '',$comment['recomment']);
- }
- $comment = formatcomment($comment, $repeatids);
- $commentlistarr[] = $comment;
- if(!empty($comment['firstcid']) && !in_array($comment['firstcid'], $repeatids)) {
- $repeatids[] = $comment['firstcid'];
- }
- }
复制代码
那么我请问 下面的图代码是做什么用的!
感觉代码好乱!
|