Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

看DZX的代码 设计 真搞笑

[复制链接]
2318546 发表于 2010-9-2 17:42:02 | 显示全部楼层 |阅读模式
的评分代码在这里:


  1. $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');
  2. $_BCACHE->cachesql('shopcomment', $sql, 0, 1, 10, 0, 'storelist', 'comment', $comment_itemid);
复制代码




然后进行 处理:

  1. foreach($_SBLOCK['shopcomment'] as $comment) {
  2. $execute = TRUE;
  3. if($comment['isprivate'] == 1) {
  4. if(!in_array($_SGLOBAL['supe_uid'], array($comment['authorid'], $comment['shopuid']))) {
  5. $execute = FALSE;
  6. }
  7. }
  8. if($execute) {
  9. if($comment['recomment']) {
  10. $currentmessage = array();
  11. preg_match_all ("/\<div class="new">(.+)?\<\/div\>/is", $comment['recomment'], $currentmessage, PREG_SET_ORDER);
  12. if(!empty($currentmessage)) $comment['recomment'] = $currentmessage[0][0];
  13. $comment['recomment'] = preg_replace("/\<div class="quote"\>\<blockquote.+?\<\/blockquote\>\<\/div\>/is", '',$comment['recomment']);
  14. }
  15. $comment = formatcomment($comment, $repeatids);
  16. $commentlistarr[] = $comment;
  17. if(!empty($comment['firstcid']) && !in_array($comment['firstcid'], $repeatids)) {
  18. $repeatids[] = $comment['firstcid'];
  19. }
  20. }
复制代码



那么我请问  下面的图代码是做什么用的!


感觉代码好乱!

neol123 发表于 2010-9-2 17:43:10 | 显示全部楼层
汗  哈哈哈哈
回复

使用道具 举报

littlehz 发表于 2010-9-2 17:53:03 | 显示全部楼层
点评了就不会为空,有页面输出
回复

使用道具 举报

 楼主| 2318546 发表于 2010-9-2 17:55:15 | 显示全部楼层
楼上的,你有看我的图吗?

你们开发的这个东西,点评存了两张表 另一张是废表吗? 所以  他没有任何输出  你可以自己print_r($item);试一下就知道了!

没有实践就没有发言权OK?
回复

使用道具 举报

aster8888 发表于 2010-9-2 18:43:02 | 显示全部楼层
2318546 发表于 2010-9-2 17:55
楼上的,你有看我的图吗?

你们开发的这个东西,点评存了两张表 另一张是废表吗? 所以  他没有任何输出 ...

讲话有需要那么激烈吗? 有问题提出来就是了? 你这样谁会想要回答你呢?
回复

使用道具 举报

 楼主| 2318546 发表于 2010-9-2 19:51:31 | 显示全部楼层
嘿嘿  因为这个问题 我搞了 两个小时 才查到原因!
浪费我的开发时间!
回复

使用道具 举报

左手悲伤 发表于 2010-9-2 20:44:38 | 显示全部楼层
都是高人 仅次于我
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-4-14 01:09 , Processed in 0.026431 second(s), 3 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表