index.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月
- 描述:首页
- */
- $un=$_COOKIE['bbpws_user'];
- $parseTemplateName="index_body.html";
- $p->set_file("handle","index_body.html");
- $p->set_var("city_id",$cid.".html");
- //**********分类信息列表************
- $block_sort=@file_get_contents("./template/index_body.html");
- preg_match_all("/<!--s+BEGIN sid_(.*?)s+-->/is",$block_sort,$block_label); //首页'块分类'模板位置
- foreach($block_label[1] as $key => $value){
- $p->set_var("blo",null);
- $p->set_block("handle","sid_".$value,"s_".$value);
- $sql = "select sname from ".$prefix."sort where sid='".$value."'";
- $result = $db->query($sql,1);
- while($row = $db->fetch_array($result)){
- $p->set_var("name",$row["sname"]);
- $p->set_block("sid_".$value,"block_list","blo"); //分类块2模板
- $sql1="select * from ".$prefix."message left join ".$prefix."city on ".$prefix."message.cid=".$prefix."city.cid left join ".$prefix."sort on
- ".$prefix."sort.sid=".$prefix."message.sid where (".$prefix."message.sid='".$value."' or ".$prefix."sort.sparent='".$value."') and ".$prefix."message.etime > '".time()."'
- and ( ".$prefix."city.cparent='".$cid."' or ".$prefix."message.cid='".$cid."' ) limit 0,$pagesize";
- $title = $db->query($sql1,1);
- while($row1 = $db->fetch_array($title)){
- $p->set_var($row1);
- $p->set_var(array("city"=> $cid.".html","time"=> date("Y-m-j",$row1["btime"])));
- $p->parse("blo","block_list",true);
- }
- }
- $p->parse("s_".$value,"sid_".$value,true);
- }
- ?>