Ignore:
Timestamp:
2011/02/20 12:26:39 (13 years ago)
Author:
fukuda
Message:

#963 [管理画面]メルマガ管理 r20245 で混入したバグ修正

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/version-2_5-dev/data/class/pages/admin/mail/LC_Page_Admin_Mail_History.php

    r20203 r20247  
    4949        $this->tpl_subno = "history"; 
    5050        $this->tpl_subtitle = '配信履歴'; 
    51  
     51        $this->tpl_pager = 'pager.tpl'; 
    5252    } 
    5353 
     
    6969    function action() { 
    7070        // ページ初期設定 
    71         $objQuery = new SC_Query(); 
    7271        $objSess = new SC_Session(); 
    73         $objDate = new SC_Date(); 
    74  
    7572        // 認証可否の判定 
    7673        SC_Utils_Ex::sfIsSuccess($objSess); 
    77  
    78         if (!isset($_GET['send_id'])) $_GET['send_id'] = ""; 
    79         if (!isset($_POST['search_pageno'])) $_POST['search_pageno'] = ""; 
    8074 
    8175        switch ($this->getMode()) { 
     
    9286            break; 
    9387        } 
    94         $from = "dtb_send_history"; 
    95  
    96         $where = " del_flg = ?"; 
    97         $arrval[] = "0"; 
    9888 
    9989        // 行数の取得 
    10090        $linemax = $objQuery->count($from, $where, $arrval); 
    101         $this->tpl_linemax = $linemax;              // 何件が該当しました。表示用 
    10291 
    10392        // ページ送りの取得 
     
    10998        $objQuery->setLimitOffset(SEARCH_PMAX, $startno); 
    11099 
    111         // 表示順序 
    112         $order = "start_date DESC, send_id DESC"; 
    113         $objQuery->setOrder($order); 
    114  
    115         $col = "*"; 
    116         $col .= ",(SELECT COUNT(*) FROM dtb_send_customer WHERE dtb_send_customer.send_id = dtb_send_history.send_id) AS count_all"; 
    117         $col .= ",(SELECT COUNT(*) FROM dtb_send_customer WHERE dtb_send_customer.send_id = dtb_send_history.send_id AND send_flag = 1) AS count_sent"; 
    118         $col .= ",(SELECT COUNT(*) FROM dtb_send_customer WHERE dtb_send_customer.send_id = dtb_send_history.send_id AND send_flag = 2) AS count_error"; 
    119         $col .= ",(SELECT COUNT(*) FROM dtb_send_customer WHERE dtb_send_customer.send_id = dtb_send_history.send_id AND send_flag IS NULL) AS count_unsent"; 
    120  
    121100        // 検索結果の取得 
    122         $this->arrDataList = $objQuery->select($col, $from, $where, $arrval); 
     101        $this->arrDataList = $this->lfGetMailHistory(); 
    123102    } 
    124103 
     
    131110        parent::destroy(); 
    132111    } 
     112     
     113    /** 
     114     * 実行履歴の取得 
     115     * 
     116     * @return array( integer 全体件数, mixed メール配信データ一覧配列, mixed SC_PageNaviオブジェクト) 
     117     */ 
     118    function lfGetMailHistory() { 
     119        $objQuery =& SC_Query::getSingletonInstance(); 
     120        $objQuery->setOrder("start_date DESC, send_id DESC"); 
     121         
     122        $col = "*"; 
     123        $col .= ",(SELECT COUNT(*) FROM dtb_send_customer WHERE dtb_send_customer.send_id = dtb_send_history.send_id) AS count_all"; 
     124        $col .= ",(SELECT COUNT(*) FROM dtb_send_customer WHERE dtb_send_customer.send_id = dtb_send_history.send_id AND send_flag = 1) AS count_sent"; 
     125        $col .= ",(SELECT COUNT(*) FROM dtb_send_customer WHERE dtb_send_customer.send_id = dtb_send_history.send_id AND send_flag = 2) AS count_error"; 
     126        $col .= ",(SELECT COUNT(*) FROM dtb_send_customer WHERE dtb_send_customer.send_id = dtb_send_history.send_id AND send_flag IS NULL) AS count_unsent"; 
     127         
     128        $arrResult = $objQuery->select($col, "dtb_send_history", " del_flg = 0"); 
     129        return $arrResult; 
     130         
     131        /* 
     132        $page_rows = $arrParam['page_rows']; 
     133        if(SC_Utils_Ex::sfIsInt($page_rows)) { 
     134            $page_max = $page_rows; 
     135        }else{ 
     136            $page_max = SEARCH_PMAX; 
     137        } 
     138        $disp_pageno = $arrParam['search_pageno']; 
     139        if($disp_pageno == 0) { 
     140            $disp_pageno = 1; 
     141        } 
     142        $offset = $page_max * ($disp_pageno - 1); 
     143        $objSelect->setLimitOffset($page_max, $offset); 
     144        $arrData = $objQuery->getAll($objSelect->getList(), $objSelect->arrVal); 
     145         
     146        // 該当全体件数の取得 
     147        $linemax = $objQuery->getOne($objSelect->getListCount(), $objSelect->arrVal); 
     148        // ページ送りの取得 
     149        $objNavi = new SC_PageNavi($arrParam['search_pageno'], 
     150                                    $linemax, 
     151                                    $page_max, 
     152                                    "fnCustomerPage", 
     153                                    NAVI_PMAX); 
     154        return array($linemax, $arrData, $objNavi); 
     155    }   */ 
     156     
    133157} 
    134158?> 
Note: See TracChangeset for help on using the changeset viewer.