当前位置: 首页>>代码示例>>PHP>>正文


PHP cookie::coll_call方法代码示例

本文整理汇总了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\');">&nbsp;</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);
 }
开发者ID:rigidus,项目名称:ea,代码行数:75,代码来源:main.module.php


注:本文中的cookie::coll_call方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。