| 修改feedback.php,在“评论内容类表”代码的前面加上以下代码:(责任编辑:温州在线)//最近热门评论
 $feedback_hot = "";
 $nearTime = 60;  //最近评论的文章的发布日期(表示多少天前)
 $minTime = time() - (3600 * 24 * $nearTime);
 
 if($topID==0) $hotquery = "Select ID,title From cmsxx_archives where ID<>'$aid' And senddate>$minTime order by goodpost desc limit 0,25";
 else $hotquery = "Select ID,title From cmsxx_archives where ID<>'$aid' And senddate>$minTime And typeid=$topID order by goodpost desc limit 0,25";
 
 $dlist->dsql->Execute("hotq",$hotquery);
 while($myrow = $dlist->dsql->GetArray("hotq")){
 $feedback_hot .= "<div class='nndiv'>·<a href='feedback.php?aid={$myrow['ID']}'>{$myrow['title']}</a></div>\r\n";
 }
 $dlist->dsql->FreeResult("hotq");
 
 这样就可以在feedback_templet.htm模板中,用代码 <?php echo $feedback_hot ?>来调用了。
 |