示例#1
0
 public function view_ebayFeedbackManage()
 {
     $userId = isset($_GET['userId']) ? post_check($_GET['userId']) : '';
     $sku = isset($_GET['sku']) ? post_check($_GET['sku']) : '';
     $latest_type = isset($_GET['latest_type']) ? post_check($_GET['latest_type']) : '';
     $original_type = isset($_GET['original_type']) ? post_check($_GET['original_type']) : '';
     $account = isset($_GET['account']) ? post_check($_GET['account']) : '';
     $sort_type = isset($_GET['sort_type']) ? post_check($_GET['sort_type']) : '1';
     $start_time = isset($_GET['start_time']) ? post_check($_GET['start_time']) : '';
     $end_time = isset($_GET['end_time']) ? post_check($_GET['end_time']) : '';
     $feedbackReasonId = isset($_GET['feedbackReasonId']) ? post_check($_GET['feedbackReasonId']) : '';
     $this->smarty->assign('userId', $userId);
     $this->smarty->assign('sku', $sku);
     $this->smarty->assign('latest_type', $latest_type);
     $this->smarty->assign('original_type', $original_type);
     $this->smarty->assign('account', $account);
     $this->smarty->assign('sort_type', $sort_type);
     $this->smarty->assign('start_time', $start_time);
     $this->smarty->assign('end_time', $end_time);
     $this->smarty->assign('feedbackReasonId', $feedbackReasonId);
     $where = 'where is_delete = 0';
     if ($start_time != '') {
         $where .= " and feedbacktime >= '" . strtotime($start_time . '00:00:00') . "'";
     }
     if ($end_time != '') {
         $where .= " and feedbacktime <= '" . strtotime($end_time . '23:59:59') . "'";
     }
     if ($account != '') {
         $where .= " and account = '{$account}'";
     }
     if ($sku != '') {
         $where .= " and sku = '{$sku}'";
     }
     if ($userId != '') {
         $where .= " and CommentingUser = '******'";
     }
     if ($feedbackReasonId != '') {
         $where .= " and reasonId = '{$feedbackReasonId}'";
     }
     if ($original_type != '') {
         if ($original_type == "Neutral") {
             if ($latest_type != '') {
                 if ($latest_type == "Positive") {
                     $where .= " and status='21'";
                 } else {
                     if ($latest_type == "Negative") {
                         $where .= " and status='23'";
                     } else {
                         if ($latest_type == "Neutral") {
                             $where .= " and CommentType='Neutral' and status!='32'";
                         }
                     }
                 }
             } else {
                 $where .= " and (CommentType='Neutral' and status !='32' or status='21')";
             }
         } else {
             if ($original_type == "Negative") {
                 if ($latest_type != '') {
                     if ($latest_type == "Positive") {
                         $where .= " and status='31'";
                     } else {
                         if ($latest_type == "Neutral") {
                             $where .= " and status='32'";
                         } else {
                             if ($latest_type == "Negative") {
                                 $where .= " and CommentType='Negative'";
                             }
                         }
                     }
                 } else {
                     $where .= " and (CommentType='Negative' or status='31' or status='32')";
                 }
             }
         }
     }
     $FBAct = new EbayFeedbackAct();
     $total = $FBAct->act_getOrderNum($where);
     $num = 50;
     //每页显示的个数
     $page = new Page($total, $num, '', 'CN');
     if ($sort_type != '1') {
         $where .= " order by feedbacktime asc " . $page->limit;
     } else {
         $where .= " order by feedbacktime desc " . $page->limit;
     }
     //echo $where;
     $fbkList = $FBAct->act_getOrderList('*', $where);
     //var_dump($fbkList[0]);
     if (!empty($_GET['page'])) {
         if (intval($_GET['page']) <= 1 || intval($_GET['page']) > ceil($total / $num)) {
             $n = 1;
         } else {
             $n = (intval($_GET['page']) - 1) * $num + 1;
         }
     } else {
         $n = 1;
     }
     if ($total > $num) {
         //输出分页显示
         $show_page = $page->fpage(array(0, 2, 3, 4, 5, 6, 7, 8, 9));
     } else {
         $show_page = $page->fpage(array(0, 2, 3));
     }
     $this->smarty->assign('show_page', $show_page);
     $this->smarty->assign('fbkList', $fbkList);
     $accAct = new AccountAct();
     $accountList = $accAct->act_getAccountList('id,account', 'where platformId = 1 and is_delete = 0');
     $this->smarty->assign('accountList', $accountList);
     $reasonList = $FBAct->act_getEbayReasonCategoryInfo('*', '');
     $this->smarty->assign('reasonList', $reasonList);
     $this->smarty->assign('state', $state);
     $this->smarty->assign('secnev', '1');
     //二级导航
     $this->smarty->assign('module', 'SKU等待领取');
     $this->smarty->assign('username', $_SESSION['userName']);
     $this->smarty->display('ebayFeedbackManage.htm');
 }