Changeset 20247
- Timestamp:
- 2011/02/20 12:26:39 (13 years ago)
- Location:
- branches/version-2_5-dev/data
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/Smarty/templates/admin/mail/history.tpl
r20116 r20247 25 25 <input type="hidden" name="search_pageno" value="" /> 26 26 <input type="hidden" name="mode" value="" /> 27 <!--{include file=$tpl_pager}--> 27 28 <!--{if count($arrDataList) > 0}--> 28 29 <div id="mail" class="contents-main"> … … 46 47 <td><!--{$arrDataList[cnt].end_date|sfDispDBDate|h}--></td> 47 48 <td class="left"><!--{$arrDataList[cnt].subject|h}--></td> 48 <td><a href="javascript:;" onclick="win03('./preview.php? send_id=<!--{$arrDataList[cnt].send_id|h}-->', 'confirm', '720', '600'); return false;">確認</a></td>49 <td><a href="javascript:;" onclick="win03('./preview.php?mode=history&send_id=<!--{$arrDataList[cnt].send_id|h}-->', 'confirm', '720', '600'); return false;">確認</a></td> 49 50 <td><a href="javascript:;" onclick="win03('./<!--{$smarty.const.DIR_INDEX_PATH}-->?mode=query&send_id=<!--{$arrDataList[cnt].send_id|h}-->','query','615','800'); return false;">確認</a></td> 50 51 <td><!--{$arrDataList[cnt].count_all|h}--></td> … … 67 68 </div> 68 69 <!--{else}--> 69 70 71 72 70 <div id="complete"> 71 <div class="complete-top"></div> 72 <div class="contents"> 73 <div class="message"> 73 74 配信履歴はありません 74 75 76 77 78 79 80 81 82 83 75 </div> 76 </div> 77 <div class="btn-area-top"></div> 78 <div class="btn-area"> 79 <ul> 80 <li><a class="btn-action" href="./<!--{$smarty.const.DIR_INDEX_PATH}-->"><span class="btn-prev">配信内容設定へ戻る</span></a></li> 81 </ul> 82 </div> 83 <div class="btn-area-bottom"></div> 84 </div> 84 85 <!--{/if}--> 85 86 </form> -
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.