mm.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月
- 描述:管理信息
- */
- error_reporting(0);
- require("../../config.php");
- require("../../class/mysql_class.php");
- require("../../class/template_class.php");
- require_once("../../function/checkModuleSession.php");
- $bbwps_admin=isLogin("../../$sessionPath/");
- $db= new DB($hostname,$username,$password,$database);
- $p=new template("template");
- $date = time();
- //********调用系统参数************
- $setting = $db->query("select list_num from ".$prefix."setting",false);
- $set = $db->fetch_array($setting);
- $pagesize = $set["list_num"];
- //********调用分页函数及分页所需的条件************
- require("../../function/fenye.php");
- $number = $db->query("select count(mid) from ".$prefix."message where etime > '".$date."'",false);
- $num = $db->fetch_array($number);
- $total = $num["count(mid)"];
- //********信息列表************
- $sql = $db->query("select ".$prefix."message.mid,".$prefix."message.cid,".$prefix."message.title,".$prefix."message.btime,".$prefix."message.etime,".$prefix."message.picture,
- ".$prefix."message.hits,".$prefix."sort.sname,".$prefix."city.cname,count(".$prefix."revert.mid) from ".$prefix."message left join ".$prefix."sort on
- ".$prefix."message.sid=".$prefix."sort.sid left join ".$prefix."city on ".$prefix."message.cid=".$prefix."city.cid left join ".$prefix."revert on ".$prefix."revert.mid=".$prefix."message.mid
- where ".$prefix."message.etime > '".$date."' group by ".$prefix."message.mid order by ".$prefix."message.mid desc limit $start,$pagesize",1);
- $p->set_file("handle","mm.html");
- $p->set_block("handle","op","a");
- while($row = $db->fetch_array($sql)){
- $p->set_var(array("mid"=> $row["mid"],"title"=> $row["title"],"sort"=> $row["sname"],"cid"=> $row["cid"],"city"=> $row["cname"],"hit"=>$row["hits"],
- "btime"=> date("Y-m-j",$row["btime"]),"etime"=> date("Y-m-j",$row["etime"]),"num"=> $row["count(".$prefix."revert.mid)"]));
- $p->parse("a","op",true);
- }
- $p->set_var("fenye",showpage($total,$pagesize,$page,$query));
- $p->parse("mm","handle",true);
- $p->p("mm");
- $db->close();
- ?>