本文整理匯總了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);
}