Пример #1
0
 public function __construct()
 {
     parent::__construct();
     CacheManager::clearCat();
     CacheManager::clearPost();
     CacheManager::clearTag();
 }
Пример #2
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     date_default_timezone_set("Asia/Shanghai");
     $this->post_id = I('param.post_id', 0);
     error_reporting(E_ERROR | E_WARNING);
 }
 /**
  * [初始化方法, 设置三级联动数据]
  * @return [type] [description]
  */
 function _initialize()
 {
     //验证用户是否登录
     parent::_initialize();
     $Zone = D('Zone');
     $Category = D('Category');
     // 默认取亲子频道
     $navid = I('navid', 1421);
     $cid1 = I('cid1', 0);
     $cid2 = I('cid2', 0);
     $ztype = I('ztype', 0);
     $recommend = I('recommend', 0);
     $status = I('status', 0);
     $isConnected = I('isConnected', 0);
     $navidArr = $Category->getList(array('c_level' => 1, 'c_is_delete' => 'N'));
     $cid1Arr = $Category->getList(array('c_pid' => $navid, 'c_level' => 2, 'c_is_delete' => 'N'));
     $cid2Arr = $Category->getList(array('c_pid' => $cid1, 'c_level' => 3, 'c_is_delete' => 'N'));
     // 写在这里, 方便做选中
     $ztypeArr = array('zone' => '普通专区', 'zcontent' => '内容专区', 'bigzone' => '大专区', 'vote' => '投票专区');
     $recommendArr = array('0' => '全部', 'Y' => '推荐', 'N' => '不推荐');
     $statusArr = array('0' => '全部', 'U' => '待审核', 'Y' => '发布', 'N' => '禁用');
     $data['navidOptions'] = makeSelectOption(array('0' => '选择一级频道') + $navidArr, $navid, 'c_id', 'c_name');
     $data['cid1Options'] = makeSelectOption(array('0' => '选择二级频道') + $cid1Arr, $cid1, 'c_id', 'c_name');
     $data['cid2Options'] = makeSelectOption(array('0' => '选择三级频道') + $cid2Arr, $cid2, 'c_id', 'c_name');
     $data['ztypeOptions'] = makeSelectOption(array('0' => '全部') + $ztypeArr, $ztype);
     $data['recommendOptions'] = makeSelectOption(array('0' => '全部') + $recommendArr, $recommend);
     $data['statusOptions'] = makeSelectOption(array('0' => '全部') + $statusArr, $status);
     // 只有 'manager', 'editor' 有权限发布专区, 所以小编列表只取 au_role in ("manager, editor");
     $editorOptions = D('AdminUser')->getList(array('au_role' => array('in', 'manager, editor')));
     foreach ($editorOptions as $val) {
         $editors .= $val['au_account'] . ',';
     }
     $data['editors'] = trim($editors, ',');
     $this->assign($data);
     unset($data);
 }
Пример #4
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
 }
Пример #5
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     //gc_disable();
 }
Пример #6
0
 /**
  *
  */
 public function __construct()
 {
     parent::__construct();
     error_reporting(E_ERROR | E_WARNING);
 }
Пример #7
0
 public function __construct()
 {
     parent::__construct();
     CacheManager::clearLink();
     CacheManager::clearMenu();
 }