public function __construct() { parent::__construct(); //$this->infos = array(array("id"=>1,'name'=>"中国","category_id"=>0),array("id"=>2,'name'=>"北京","category_id"=>1),array("id"=>3,'name'=>"上海","category_id"=>1),array("id"=>4,'name'=>"美国","category_id"=>0),array("id"=>5,'name'=>"纽约","category_id"=>4),array("id"=>6,'name'=>"华盛顿","category_id"=>4),array("id"=>7,'name'=>"加州福尼亚","category_id"=>4),array("id"=>8,'name'=>"北京市通州区","category_id"=>2)); $articlecatemodel = new ArticleCategoryController(); $ArticleCateList = $articlecatemodel->GetArticleCateList(false); $ArticleCateList['ArticleCateList'] = $this->FormartArticleCate($ArticleCateList['ArticleCateList']); $this->infos = $ArticleCateList['ArticleCateList']; /* $this->infos = array( array("id"=>1,"name"=>"PHP","pid"=>0,"sort"=>1), array("id"=>2,"name"=>"Javascript","pid"=>0,"sort"=>2), array("id"=>3,"name"=>"MySQL","pid"=>0,"sort"=>3), array("id"=>4,"name"=>"php类","pid"=>1,"sort"=>1), array("id"=>5,"name"=>"smarty","pid"=>1,"sort"=>2), array("id"=>6,"name"=>"私有方法","pid"=>4,"sort"=>1), array("id"=>7,"name"=>"jQuery","pid"=>2,"sort"=>1), );*/ }
public function UpdateShow() { $ArticleCate = new ArticleCategoryController(); $ArticleCateList = $ArticleCate->GetArticleCateList(false); $ArticleCateList['ArticleCateList'] = $ArticleCate->FormatArticleCate($ArticleCateList['ArticleCateList']); $this->assign("ArticleCateList", $ArticleCateList['ArticleCateList']); $where = "article_id = " . I('get.id'); $res = $this->ArticleModel->where($where)->select(); $arr = array("ArticleList" => $res); $datas = $this->FillArticleList($arr); //var_dump($datas); //die; $this->assign('ArticleList', $datas['ArticleList'][0]); $ArticleTagData = $this->ArticleTagObject->GetArticleCateList(false); $this->assign("ArticleTagData", $ArticleTagData['ArticleTag']); $this->display('addshow'); }
public function UpdateShow() { $ArticleCate = new ArticleCategoryController(); $ArticleCateList = $ArticleCate->GetArticleCateList(); $this->assign("ArticleCateList", $ArticleCateList); $where = "article_id = " . I('get.id'); $res = $this->ArticleModel->where($where)->select(); $this->assign('ArticleList', $res[0]); $this->display('addshow'); }