Exemplo n.º 1
0
 public function view_categoryListAmazon()
 {
     /* -----  获取全部的分类列表  -----*/
     $msgcat_obj = new amazonmessagecategoryModel();
     $lp_ojb = new LocalPowerAmazonModel();
     $powerlist = $lp_ojb->getAmazonPowerlist($_SESSION['userId']);
     //获得该用户能看到的邮件目录id
     //print_r($powerlist);
     if (empty($powerlist)) {
         $filsql = '0';
     } else {
         $filsql = $powerlist;
     }
     $arrlist = $msgcat_obj->getAllCategoryInfoList(' and id in (' . $filsql . ') order by id desc');
     $msg_obj = new amazonmessageModel();
     foreach ($arrlist as &$listval) {
         /* ---- 计算已经回复的数量  ---- */
         $replyed_num = $msg_obj->getAmazonNumber($listval['id'], array(2, 3));
         $listval['replyed'] = $replyed_num;
         /* ---- 计算未回复的数量  ---- */
         $noreply_num = $msg_obj->getAmazonNumber($listval['id'], array(0));
         $listval['noreply'] = $noreply_num;
     }
     $msg_obj->addAccountToGlobal();
     $msg_obj->addAccountToLocal();
     $msg_obj->turnState();
     $this->smarty->assign('sec_menue', 3);
     $this->smarty->assign('toplevel', 1);
     $this->smarty->assign('categorylist', $arrlist);
     $this->smarty->assign('toptitle', 'Amazon message类别列表');
     $this->smarty->display('msgcategorylistAmazon.htm');
 }