【php开源代码栏目提醒】:文章导读:在新的一年中,各位网友都进入紧张的学习或是工作阶段。网学会员整理了php开源代码-listAlbum.php的相关内容供大家参考,祝大家在新的一年里工作和学习顺利!
<?php
//====================================================
// FileName:listAlbum.php
// Summary: 相册
列表管理
程序 //
//====================================================
require_once("login.php");
require_once("../IBinit.php");
$album = new category($db, "album");
$tpl = new SmartTemplate("admin/listAlbum.htm");
//启用缓存
//$tpl->use_cache();
//条件数组
$condition = array();
//处理action
if(checkAction("listChild"))
{
$condition['absPath'] = $_GET['absPath'];
}
$tmpList = $album->listCat($condition);
//解析树时按相册解析
$albumTree = $album->parseTree("album");
if(!empty($_GET['absPath']))
{
$album->getAllParent($_GET['absPath']);
$navigator = $album->makeNavigator();
$currentAlbum = $album->getNode($_GET['absPath']);
$navigator .= $currentAlbum['catTitle'];
}
else
{
$navigator = $tmpList[0]['catTitle'];
}
$tpl->assign("title", "相册管理");
$tpl->assign("navigator", $navigator);
if($albumTree)
{
$tpl->assign("albumList", $albumTree);
$tpl->assign("noChildClass", "not-display");
}
else
{
$tpl->assign("noChildClass", "light-row");
}
$tpl->assign("queryTime", $db->getQueryTimes());
$tpl->assign("executeTime", $timer->getExecuteTime());
$tpl->output();
?>