【php开源代码栏目提醒】:网学会员为需要php开源代码的朋友们搜集整理了listCat.php相关资料,希望对各位网友有所帮助!
<?php
//====================================================
// FileName:listCat.php
// Summary: 文章类别
列表管理
程序 //
//====================================================
require_once("login.php");
require_once("../IBinit.php");
$cat = new category($db, "cat");
$tpl = new SmartTemplate("admin/listCat.htm");
//启用缓存
//$tpl->use_cache();
//条件数组
$condition = array();
//处理action
if(checkAction("listChild"))
{
$condition['absPath'] = $_GET['absPath'];
}
$tmpList = $cat->listCat($condition);
$catTree = $cat->parseTree();
if(!empty($_GET['absPath']))
{
$cat->getAllParent($_GET['absPath']);
$navigator = $cat->makeNavigator();
$currentCat = $cat->getNode($_GET['absPath']);
$navigator .= $currentCat['catTitle'];
}
else
{
$navigator = $tmpList[0]['catTitle'];
}
$tpl->assign("title", "文章类别管理");
$tpl->assign("navigator", $navigator);
if($catTree)
{
$tpl->assign("catList", $catTree);
$tpl->assign("noChildClass", "not-display");
}
else
{
$tpl->assign("noChildClass", "light-row");
}
$tpl->assign("queryTime", $db->getQueryTimes());
$tpl->assign("executeTime", $timer->getExecuteTime());
$tpl->output();
?>