本文整理汇总了PHP中cookie::coll_call方法的典型用法代码示例。如果您正苦于以下问题:PHP cookie::coll_call方法的具体用法?PHP cookie::coll_call怎么用?PHP cookie::coll_call使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类cookie
的用法示例。
在下文中一共展示了cookie::coll_call方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: view
function view()
{
admin::components('livesearch', 'shiftable');
self::clearGarbage();
$arr = array();
$arr_parents = array();
/*
Check empty child
*/
db::table('pages');
db::where('site_id', ADMIN_SITE_ID);
db::where('page_pub', '2', '!=');
db::where('page_folder', '/', '!=');
$res = db::select('page_id', 'page_parent', 'page_child');
while ($row = mysql_fetch_assoc($res)) {
$arr[$row['page_parent']][$row['page_id']] = $row;
if ($row['page_child'] == '1') {
$arr_parents[$row['page_id']] = true;
}
}
foreach ($arr_parents as $k => $v) {
if (isset($arr[$k])) {
unset($arr_parents[$k]);
}
}
unset($arr);
if ($arr_parents) {
db::table('pages');
foreach ($arr_parents as $k => $v) {
db::where('page_id', $k);
}
db::update('page_child', '0');
}
unset($arr_parents);
/*
Load page tree
*/
$page_tree = array();
db::table('pages');
db::where('site_id', ADMIN_SITE_ID);
db::where('page_pub', '2', '!=');
db::order('page_map');
$res = db::select();
while ($row = mysql_fetch_assoc($res)) {
if ($row['page_pub'] == '1') {
$row['page_pub'] = '_pub';
} else {
$row['page_pub'] = '_unpub';
}
if ($row['page_dynamic'] == '0') {
$row['goto_page'] = true;
}
if ($row['page_folder'] == '/') {
$row['index_page'] = true;
$row['page_path'] = 'http://' . ADMIN_SITE;
} else {
$row['add_page'] = true;
$row['page_path'] = 'http://' . ADMIN_SITE . '' . $row['page_folder'];
if ($row['page_child'] == '1') {
$row['parent_pages'] = true;
if (cookie::coll_call('page_tree', $row['page_id'])) {
$row['open_close'] = '_open';
} else {
$row['open_close'] = '_close';
}
$row['page_ico'] = '<a href="javascript:void(null);" class="ico ico11 ico_folder' . $row['open_close'] . '" onclick="new ElementController.toggle(' . $row['page_id'] . ', \'tree_' . $row['page_id'] . '\', this, \'page_tree\');"> </a>';
} else {
$row['all_pages'] = true;
}
}
$row['page_line'] = '<a href="' . SYS_DIR . 'pages/main/edit/' . $row['page_id'] . '/" title="Редактировать" class="page_link">' . $row['page_title'] . '</a>';
$page_tree[$row['page_parent']][$row['page_id']] = $row;
}
s::tree('page_tree', $page_tree);
}