revert.php
资源名称:BBWPS.rar [点击查看]
上传用户:yttaitong
上传日期:2009-05-10
资源大小:128k
文件大小:2k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
PHP
- <?
- /*
- [BBWPS!] (C)2006-2010 小蜜蜂版权所有.
- This is NOT a freeware, use is subject to license terms
- 时间:2007年12月
- 描述:评论信息列表页面
- */
- $mid = $_GET['mid'];
- $query="mid=".$mid; //保存分页参数
- require("global.php");
- $mid=$_POST["mid"]? $_POST["mid"]:$_GET["mid"];
- //*****取系统每页显示数目及分页所需条件*******
- $setting = $db->query("select list_num from ".$prefix."setting",1);
- $set = $db->fetch_array($setting);
- $pagesize = $set["list_num"];
- $number = $db->query("select count(mid) from ".$prefix."revert where ".$prefix."revert.mid='$mid'",1);
- $num = $db->fetch_array($number);
- $total = $num["count(mid)"];
- require("../function/fenye.php");
- //*********评论列表*************
- $sql = "select ".$prefix."message.title,".$prefix."revert.username,".$prefix."revert.id,".$prefix."revert.date from ".$prefix."message left join ".$prefix."revert on
- ".$prefix."message.mid=".$prefix."revert.mid where ".$prefix."revert.mid='$mid'
- and ".$prefix."message.mid='$mid' order by ".$prefix."revert.id asc limit $start,$pagesize";
- $result = $db->query($sql,1);
- $p->set_file("handle","revert.html");
- $p->set_block("handle","op","a");
- while($row = $db->fetch_array($result)){
- if(!$row["username"]){$t="匿名";}else{$t= $row["username"];}
- $p->set_var(array("username"=> $t,"rid"=> $row["id"],"title"=> $row["title"],"mid"=> $mid,"time"=> date("Y-m-j",$row["date"])));
- $p->parse("a","op",true);
- }
- $p->set_var("fenye",showpage($total,$pagesize,$page,$query));
- $p->parse("work","handle",true);
- require_once("head.php");
- $db->close();
- ?>