public function edit()
 {
     $cls_id = $this->_get('id', 'intval');
     $where['id'] = $cls_id;
     $where['token'] = session('token');
     $where['status'] = array('in', array('1', '0'));
     $classify_db = M('Classify');
     $info = $classify_db->where($where)->find();
     if ($info) {
         $this->assign('info', $info);
         $other_where['token'] = session('token');
         $other_where['status'] = array('in', array('1', '0'));
         $other_where['parent'] = array('neq', $cls_id);
         $other_cls = $classify_db->where($other_where)->select();
         $this->assign('otherCls', $other_cls);
         $this->assign('linktypes', $this->getLinkTypes());
         $this->assign('allActivities', LinkHelper::getActivities());
         $this->assign('allModules', LinkHelper::getModules());
         $this->assign('carModules', LinkHelper::getCarModules());
         $this->assign('sub_cls', $this->getSubClassifies($cls_id));
         $home = M('vweb_setting')->where(array('token' => session('token')))->find();
         $allTmpls = C('web_homepage_tmpl');
         $this->assign('homepage_template', $allTmpls[$home['tmpl_id']]);
         $all_cls_tmpls = C('web_classify_tmpl');
         $this->assign('classify_tmpls', $all_cls_tmpls);
         $this->display();
     } else {
         $this->error('该栏目不存在', U(MODULE_NAME . '/index'));
     }
 }
 public function edit()
 {
     $where['id'] = $this->_get('id', 'intval');
     $where['token'] = $this->token;
     $res = D('Flash')->where($where)->find();
     $this->assign('info', $res);
     $this->assign('linktypes', $this->getLinkTypes());
     $this->assign('allActivities', LinkHelper::getActivities());
     $this->assign('allModules', LinkHelper::getModules());
     $this->assign('carModules', LinkHelper::getCarModules());
     $home = M('vweb_setting')->where(array('token' => $this->token))->find();
     $allTmpls = C('web_homepage_tmpl');
     $this->assign('homepage_template', $allTmpls[$home['tmpl_id']]);
     $this->display();
 }
 public function edit()
 {
     $id = $this->_get('id', 'intval');
     $uid = session('uid');
     $token = session('token');
     $db = D('article');
     $where['uid'] = $uid;
     $where['token'] = $token;
     $where['id'] = $id;
     $where['status'] = 1;
     $article = $db->where($where)->find();
     $this->assign('article', $article);
     $where = array();
     $where['token'] = $token;
     $where['status'] = 1;
     // 只显示链接类型为文章列表的栏目, 其他栏目不能包含文章
     $where['linktype'] = 'articles';
     $db = M('Classify');
     $cls = $db->where($where)->select();
     $this->assign('cls', $cls);
     $this->assign('linktypes', $this->getLinkTypes());
     $this->assign('allActivities', LinkHelper::getActivities());
     $this->assign('allModules', LinkHelper::getModules());
     $this->assign('carModules', LinkHelper::getCarModules());
     $this->display();
 }