public function info($type = 'admin') { parent::info(); $cid = intval($this->input->get_post('cid')); $options = array(); if ($cid > 0) { $options['where'] = array('cid' => $cid); } $item = $this->model->getOne($options, true); $this->parameters->fromArray(json_to_array($item['params'])); $item['params'] = $this->parameters; $parents = array('顶级栏目'); $where = array(); if ($this->user_info->key != 'root') { $where = array('status >=' => 0); } $item['type'] = $item['type'] ? $item['type'] : $type; $options = array('type' => $item['type'], 'where' => $where, 'order' => " order_id desc,cid desc"); $tree = new Tree(); $tree->init($this->model->getAll2Array($options)); foreach ($tree->getValueOptions() as $k => $tmp) { $parents[$k] = $tmp['title']; } $data = array('parents' => $parents, 'item' => $item); $this->_template('admin/setting/columinfo', $data); }
function info() { parent::info(); $setting = (object) $this->config->config; $this->_template('admin/setting/basic', array('setting' => $setting)); }