コード例 #1
0
ファイル: taxo.php プロジェクト: johnlion/srcms
 public function add()
 {
     $this->put("msgbox", '');
     $_id = $this->input->get('tid');
     if (IS_POST) {
         $_data['data'] = $_POST;
         if (isset($_id) && is_numeric($_id)) {
             $_data['data']['parentid'] = $_id;
         } else {
             $_data['data']['parentid'] = 0;
         }
         $_result = $this->citaxonomy->insert($_data);
         if ($_result['status'] == 1) {
             $this->put("msgbox", theme_msgbox('添加成功', 'alert alert-info'));
         } else {
             $this->put("msgbox", theme_msgbox('添加失败,请稍后再试!', 'alert alert-warning'));
         }
     }
     $entity = array('tid' => '', 'ttitle' => '', 'icon' => '', 'parentid' => '', 'taxotpl' => '', 'sortid' => '', 'ishide' => '', 'isdelete' => '', 'addtime' => '', 'topid' => '', 'roomids' => '', 'machinename' => '', 'taxonomyimg' => '', 'links' => '', 'link_silder' => '', 'description' => '', 'keyword' => '', 'contenttpl' => '');
     $this->put("entity", $entity);
     $this->render('taxo_edit.html');
 }
コード例 #2
0
ファイル: main.php プロジェクト: johnlion/srcms
 public function nopermission()
 {
     $this->put("msgbox", theme_msgbox('没有权限', 'alert alert-warning'));
     $this->render('nopermission.html');
 }