Exemple #1
0
 public function view_categoryList()
 {
     /* -----  获取全部的分类列表  -----*/
     $msgcat_obj = new messagecategoryModel();
     $lp_ojb = new LocalPowerModel();
     $powerlist = $lp_ojb->getEbayPowerlist($_SESSION['userId']);
     if (empty($powerlist['field'])) {
         $filsql = '0';
     } else {
         $filsql = implode(', ', $powerlist['field']);
     }
     $arrlist = $msgcat_obj->getAllCategoryInfoList(' and id in (' . $filsql . ') order by category_name');
     $msg_obj = new messageModel();
     if (in_array('-1', $powerlist['field'])) {
         $arrlist[] = array('id' => -1, 'category_name' => '迷途文件夹', 'ebay_account' => '');
     }
     foreach ($arrlist as &$listval) {
         /* ---- 计算某个分类下已经回复的数量  ---- */
         $replyed_num = $msg_obj->getNumber($listval['id'], array(2, 3));
         $listval['replyed'] = $replyed_num;
         /* ---- 计算某个分类下未回复的数量  ---- */
         $noreply_num = $msg_obj->getNumber($listval['id'], array(0));
         $listval['noreply'] = $noreply_num;
     }
     $this->smarty->assign('sec_menue', 1);
     $this->smarty->assign('toplevel', 1);
     $this->smarty->assign('categorylist', $arrlist);
     $this->smarty->assign('toptitle', 'message类别列表');
     $this->smarty->display('msgcategorylist.htm');
 }