outdatemessage.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");
- $un=$_COOKIE["bbwps_user"];
- //************取系统每页显示数及分页所需条件********
- $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."message where ".$prefix."message.etime < '".time()."' and ".$prefix."message.username='$un'",1);
- $num = $db->fetch_array($number);
- $total= $num["count(mid)"];
- require("../function/fenye.php"); //调用分页函数
- $sql = $db->query("select mid,title,btime,etime,picture,hits,sname,cname 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 where ".$prefix."message.etime < '".time()."' and ".$prefix."message.username='$un' order by ".$prefix."message.mid asc limit $start,$pagesize",1);
- $p->set_file("handle","outdatemessage.html");
- $p->set_block("handle","op","a");
- while($row = $db->fetch_array($sql)){
- $p->set_var("mid",$row["mid"]);
- $p->set_var("title",$row["title"]);
- $p->set_var("sort",$row["sname"]);
- $p->set_var("city",$row["cname"]);
- $p->set_var("hit",$row["hits"]);
- $p->set_var("btime",date("Y-m-j",$row["btime"]));
- $p->set_var("etime",date("Y-m-j",$row["etime"]));
- $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();
- ?>