ms.php
资源名称:BBWPS.rar [点击查看]
上传用户:yttaitong
上传日期:2009-05-10
资源大小:128k
文件大小:2k
源码类别:
WEB源码(ASP,PHP,...)
开发平台:
PHP
- <?php
- /*
- [BBWPS!] (C)2006-2010 小蜜蜂版权所有.
- This is NOT a freeware, use is subject to license terms
- 时间:2007年12月
- 描述:管理分类
- */
- error_reporting(0);
- $sid = $_GET["sid"];
- 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");
- $result=$db->query("select sname,sid from ".$prefix."sort where slevel = '0' order by ".$prefix."sort.seq desc",1);
- $p->set_file("handle","ms.html");
- $p->set_block("handle","op","a");
- $p->set_block("op","ap","b");
- //*********显示一级分类*************
- while($row=$db->fetch_array($result)){
- $p->set_var("b","");
- $p->set_var("value1",$row["sid"]);
- if($sid==$row["sid"])
- $p->set_var("selected1",selected);
- else
- $p->set_var("selected1","");
- $p->set_var("name1","|-".$row["sname"]);
- $sql=$db->query("select sname,sid from ".$prefix."sort where sparent = '".$row["sid"]."'",1);
- //*********显示二级分类*************
- while($cel=$db->fetch_array($sql)){
- $p->set_var("value2",$cel["sid"]);
- if($sid==$cel["sid"])
- $p->set_var("selected2",selected);
- else
- $p->set_var("selected2","");
- $p->set_var("name2"," "." "."|-".$cel["sname"]);
- $p->parse("b","ap",true);
- }
- $p->parse("a","op",true);
- }
- $p->parse("ms","handle",true);
- $p->p("ms");
- $db->close();
- ?>