public function modify()
 {
     $this->checkLogin();
     $category = new CategoryModel();
     $categories = $category->getCategories();
     $this->assign('categories', $categories);
     $Article = new ArticleModel();
     $AR_id = $_GET['AR_id'];
     $article = $Article->getArticle($AR_id);
     $this->assign('article', $article[0]);
     $this->display();
 }
 public static function wxj_category($list, $cat_id = 0, $format = "<option %s>%s</option>")
 {
     $select = "";
     foreach ($list as $key => $value) {
         $empty = "";
         for ($i = 1; $i < $value[level]; $i++) {
             $empty .= '&nbsp;&nbsp;';
         }
         $select .= sprintf($format, "value='" . $value['id'] . "' " . ($cat_id == $value['id'] ? 'selected' : ''), $empty . '├─' . $value['catname']);
         if ($value['_child']) {
             $select .= CategoryModel::wxj_category($value['_child'], $cat_id);
         }
     }
     return $select;
 }