Changeset 20247 for branches/version-2_5-dev/data/class/pages/admin/mail
- Timestamp:
- 2011/02/20 12:26:39 (13 years ago)
- 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 49 49 $this->tpl_subno = "history"; 50 50 $this->tpl_subtitle = '配信履歴'; 51 51 $this->tpl_pager = 'pager.tpl'; 52 52 } 53 53 … … 69 69 function action() { 70 70 // ページ初期設定 71 $objQuery = new SC_Query();72 71 $objSess = new SC_Session(); 73 $objDate = new SC_Date();74 75 72 // 認証可否の判定 76 73 SC_Utils_Ex::sfIsSuccess($objSess); 77 78 if (!isset($_GET['send_id'])) $_GET['send_id'] = "";79 if (!isset($_POST['search_pageno'])) $_POST['search_pageno'] = "";80 74 81 75 switch ($this->getMode()) { … … 92 86 break; 93 87 } 94 $from = "dtb_send_history";95 96 $where = " del_flg = ?";97 $arrval[] = "0";98 88 99 89 // 行数の取得 100 90 $linemax = $objQuery->count($from, $where, $arrval); 101 $this->tpl_linemax = $linemax; // 何件が該当しました。表示用102 91 103 92 // ページ送りの取得 … … 109 98 $objQuery->setLimitOffset(SEARCH_PMAX, $startno); 110 99 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 121 100 // 検索結果の取得 122 $this->arrDataList = $ objQuery->select($col, $from, $where, $arrval);101 $this->arrDataList = $this->lfGetMailHistory(); 123 102 } 124 103 … … 131 110 parent::destroy(); 132 111 } 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 133 157 } 134 158 ?>
Note: See TracChangeset
for help on using the changeset viewer.