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


PHP Zone::display方法代码示例

本文整理汇总了PHP中Zone::display方法的典型用法代码示例。如果您正苦于以下问题:PHP Zone::display方法的具体用法?PHP Zone::display怎么用?PHP Zone::display使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zone的用法示例。


在下文中一共展示了Zone::display方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: zone_fork

 public function zone_fork($disposition_id, $disposition, $url, $theme, $page, $zone)
 {
     $url = str_replace(url(), '', $url);
     if (!$url || preg_match('#^index(?:\\.|/)#', $url)) {
         $url = '/';
     }
     if (extension($url) == 'html') {
         $url = substr($url, 0, -5) . '/*';
     }
     $url = explode('/', $url);
     if (!empty($url[0]) && ($module = $this->load->module($url[0])) && !empty($module->routes) && ($method = $module->get_method(array_slice($url, 1, -1), TRUE))) {
         $url = array($url[0], $method, '*');
     }
     $url = implode('/', $url);
     if ($page == '*' || !$this->db->select('1')->from('nf_dispositions')->where('page', $url)->row()) {
         foreach ($disposition as &$rows) {
             foreach ($rows->cols as &$col) {
                 foreach ($col->widgets as &$w) {
                     $widget = $this->db->select('widget', 'type', 'title', 'settings')->from('nf_widgets')->where('widget_id', $w->widget_id)->row();
                     $w->widget_id = $this->db->insert('nf_widgets', array('widget' => $widget['widget'], 'type' => $widget['type'], 'title' => $widget['title'], 'settings' => $widget['settings']));
                 }
             }
         }
         return Zone::display($this->db->insert('nf_dispositions', array('theme' => $theme, 'page' => $url, 'zone' => $zone, 'disposition' => serialize($disposition))), $disposition, $url, $zone, TRUE);
     } else {
         $this->model()->delete_disposition($disposition);
         $this->db->where('disposition_id', $disposition_id)->delete('nf_dispositions');
         $disposition = $this->db->select('disposition_id', 'disposition')->from('nf_dispositions')->where('theme', $theme)->where('page', '*')->where('zone', $zone)->row();
         return Zone::display($disposition['disposition_id'], unserialize($disposition['disposition']), '*', $zone, TRUE);
     }
 }
开发者ID:agreements,项目名称:neofrag-cms,代码行数:31,代码来源:ajax.php

示例2: display_zone

 public function display_zone($zone_id)
 {
     static $dispositions;
     if (is_null($dispositions)) {
         $this->db->select('zone', 'disposition_id', 'disposition', 'page')->from('nf_dispositions')->where('theme', $this->load->theme->name)->order_by('page DESC');
         $pages = array('page', '*', 'OR');
         if ($this->config->segments_url[0] == 'index') {
             $pages[] = 'page';
             $pages[] = '/';
             $pages[] = 'OR';
         } else {
             for ($i = count($segments = $this->load->module->segments); $i > 0; $i--) {
                 $pages[] = 'page';
                 $pages[] = implode('/', array_slice($segments, 0, $i)) . '/*';
                 $pages[] = 'OR';
             }
         }
         call_user_func_array(array($this->db, 'where'), $pages);
         foreach ($this->db->get() as $disposition) {
             if (!isset($dispositions[$zone = $disposition['zone']])) {
                 unset($disposition['zone']);
                 $dispositions[$zone] = $disposition;
             }
         }
     }
     if (!empty($dispositions[$zone_id])) {
         $disposition = $dispositions[$zone_id];
         return Zone::display($disposition['disposition_id'], unserialize($disposition['disposition']), $disposition['page'], $zone_id);
     }
     return '';
 }
开发者ID:nsystem1,项目名称:neofrag-cms,代码行数:31,代码来源:output.php


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