/** * @todo: 文章标签 * @author Saki <*****@*****.**> * @date 2014-12-24 下午2:20:50 * @version V1.0 */ public function tags() { $model = new \Admin\Model\ArticleTypeModel(); $condition['status'] = 1; $type_list = $model->where($condition)->select(); $this->assign('type_list', $type_list); }
/** * @todo: 编辑类型 * @author Saki <*****@*****.**> * @date 2014-12-10 下午6:07:29 * @version V1.0 */ public function update() { $condition['id'] = $id = $_GET['id']; $model = new \Admin\Model\ArticleTypeModel(); if (isset($_POST['ArticleType'])) { $data = $model->updateType($_POST['ArticleType'], $id); echo json_encode($data); } else { $type_info = $model->where($condition)->find(); $this->assign('type_info', $type_info); $this->assign('action', 'update'); $this->display('form'); } }