Exemple #1
0
 public function view_categoryListAli()
 {
     /* -----  获取全部的分类列表  -----*/
     $msgcat_obj = new messagecategoryModel();
     $lp_ojb = new LocalPowerModel();
     $powerlist = $lp_ojb->getAliPowerlist($_SESSION['userId']);
     // print_r($powerlist);exit;
     if (empty($powerlist['field'])) {
         $filsql = '0';
     } else {
         $filsql = implode(', ', $powerlist['field']);
     }
     //echo $filsql;exit;
     $arrlist = $msgcat_obj->getAllCategoryInfoList(' and id in (' . $filsql . ') and platform=2 order by category_name');
     $msg_obj = new AliOderMessageModel();
     foreach ($arrlist as &$listval) {
         /* ---- 计算某个分类下已经读取的数量 <订单留言>  ---- */
         $replyed_num_order = $msg_obj->culculateNumberOrder(" and fieldId={$listval['id']} and hasread=1");
         $listval['replyed_order'] = $replyed_num_order;
         /* ---- 计算某个分类下未读的数量  <订单留言>---- */
         $noreply_num_order = $msg_obj->culculateNumberOrder(" and fieldId={$listval['id']} and hasread=0");
         $listval['noreply_order'] = $noreply_num_order;
         /* ---- 计算某个分类下已读的数量 <站内信>  ---- */
         $replyed_num_site = $msg_obj->culculateNumberSite(" and fieldId={$listval['id']} and hasread=1");
         $listval['replyed_site'] = $replyed_num_site;
         /* ---- 计算某个分类下未读的数量  <站内信>---- */
         $noreply_num_site = $msg_obj->culculateNumberSite(" and fieldId={$listval['id']} and hasread=0");
         $listval['noreply_site'] = $noreply_num_site;
     }
     $this->smarty->assign('sec_menue', 2);
     $this->smarty->assign('toplevel', 1);
     $this->smarty->assign('categorylist', $arrlist);
     $this->smarty->assign('toptitle', 'message类别列表-速卖通');
     $this->smarty->display('msgcategorylistAli.htm');
 }