setting.php
资源名称:BBWPS.rar [点击查看]
上传用户:yttaitong
上传日期:2009-05-10
资源大小:128k
文件大小:1k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
PHP
- <?
- /*
- [BBWPS!] (C)2006-2010 小蜜蜂版权所有.
- This is NOT a freeware, use is subject to license terms
- 时间:2007年12月
- 描述:设置参数
- */
- error_reporting(0);
- $cid=$_GET["cid"];
- 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");
- $sql = $db->query("select cid,cname from ".$prefix."city where clevel='0' order by ".$prefix."city.cid asc ",1);
- $p->set_file("handle","setting.html");
- $p->set_block("handle","op","a");
- while($row = $db->fetch_array($sql)){
- $p->set_var("value",$row["cid"]);
- if($cid==$row["cid"])
- $p->set_var("selected",selected);
- else
- $p->set_var("selected","");
- $p->set_var("name",$row["cname"]);
- $p->parse("a","op",true);
- }
- $setting = "select * from ".$prefix."setting";
- $set = $db->query($setting,1);
- $result = $db->fetch_array($set);
- $p->set_var(array("list"=> $result["list_num"],"sort"=> $result["sort_num"],"new"=> $result["new_message_num"],"day"=> $result["day"],
- "hot"=> $result["hot_message_num"],"update"=> $result["sort_update_num"],"vouch"=> $result["vouch_message_num"]));
- $p->parse("setting","handle");
- $p->p("setting");
- $db->close();
- ?>