manage.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月
- 描述:管理信息
- */
- require("global.php");
- $p->set_file("handle","manage.html");
- $un=$_COOKIE["bbwps_user"]? $_COOKIE["bbwps_user"]:$_GET["un"];
- $query = "un=".$un;
- $setting = $db->query("select * from ".$prefix."setting",1);
- $set = $db->fetch_array($setting); //得到系统参数
- $pagesize = $set["list_num"];
- $numbers = "select count(mid) from ".$prefix."message where username = '$un' ";
- $number = $db->query($numbers,1);
- $num = $db->fetch_array($number);
- $total = $num["count(mid)"];
- require("../function/fenye.php");
- $sql = "select ".$prefix."message.mid,".$prefix."message.title,".$prefix."message.btime,".$prefix."message.etime,sname,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."message.mid=".$prefix."revert.mid where ".$prefix."message.username='$un' group by
- ".$prefix."message.mid order by ".$prefix."message.btime desc limit $start,$pagesize";
- $row = $db->query($sql,1);
- $p->set_block("handle","op","o");
- //*********个人信息列表**********
- while($result = $db->fetch_array($row)){
- $i = ($result["etime"]-$result["btime"])/(60*60*24);
- $p->set_var(array("mid"=> $result["mid"],"title"=> $result["title"],"sort"=> $result["sname"],"city"=> $result["cname"],"btime"=> date("Y-m-j",$result["btime"]),
- "etime"=> date("Y-m-j",$result["etime"]),"mid"=> $result["mid"],"day"=> $i,"num"=> $result["count(".$prefix."revert.mid)"]));
- $p->parse("o","op",true);
- }
- $p->set_var("fenye",showpage($total,$pagesize,$page,$query));
- $p->parse("work","handle",true);
- require_once("head.php");
- ?>