Changeset 20205 for branches/version-2_5-dev/data/class
- Timestamp:
- 2011/02/19 19:48:25 (15 years ago)
- Location:
- branches/version-2_5-dev/data/class
- Files:
-
- 2 edited
-
helper/SC_Helper_Mail.php (modified) (1 diff)
-
pages/admin/mail/LC_Page_Admin_Mail_Preview.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/helper/SC_Helper_Mail.php
r20203 r20205 355 355 return $arrResults; 356 356 } 357 358 /** 359 * 保存されている送信履歴の取得 360 * @param integer 特定の送信履歴を取り出したい時はsend_idを指定。未指定時は全件取得 361 * @return array 送信履歴情報を格納した配列 362 */ 363 function sfGetSendHistory($send_id = null){ 364 // 初期化 365 $where = ''; 366 $objQuery =& SC_Query::getSingletonInstance(); 367 368 // 条件文 369 $where = 'del_flg = ?'; 370 $arrValues[] = 0; 371 372 //send_id指定時 373 if (SC_Utils_Ex::sfIsInt($send_id) === true) { 374 $where .= 'AND send_id = ?'; 375 $arrValues[] = $send_id; 376 } 377 378 // 表示順 379 $objQuery->setOrder("create_date DESC"); 380 381 $arrResults = $objQuery->select('*', 'dtb_send_history', $where, $arrValues); 382 return $arrResults; 383 } 357 384 } 358 385 ?> -
branches/version-2_5-dev/data/class/pages/admin/mail/LC_Page_Admin_Mail_Preview.php
r20203 r20205 63 63 */ 64 64 function action() { 65 $objQuery = new SC_Query(); 65 66 $objMailHelper = new SC_Helper_Mail_Ex(); 66 67 $objSess = new SC_Session(); 67 $objDate = new SC_Date();68 69 68 // 認証可否の判定 70 69 SC_Utils_Ex::sfIsSuccess($objSess); 71 70 72 if (SC_Utils_Ex::sfIsInt($_GET['send_id']) 73 || SC_Utils_Ex::sfIsInt($_GET['id'])){ 74 75 if (is_numeric($_GET["send_id"])) { 76 $id = $_GET["send_id"]; 77 $sql = "SELECT body, mail_method FROM dtb_send_history WHERE send_id = ?"; 78 } else { 79 $sql = "SELECT body, mail_method FROM dtb_mailmaga_template WHERE template_id = ?"; 80 $id = $_GET['id']; 71 switch ($this->getMode()) { 72 case 'template': 73 if (SC_Utils_Ex::sfIsInt($_GET['template_id'])){ 74 $arrMail = $objMailHelper->sfGetMailTemplate($_GET['template_id']); 81 75 } 82 $result = $objQuery->getAll($sql, array($id)); 76 break; 77 case 'history'; 78 if (SC_Utils_Ex::sfIsInt($_GET['send_id'])){ 79 $arrMail = $objMailHelper->sfGetSendHistory($_GET['send_id']); 80 } 81 break; 82 default: 83 } 83 84 84 if ( $result ){ 85 if ( $result[0]["mail_method"] == 2 ){ 86 // テキスト形式の時はタグ文字をエスケープ 87 $this->escape_flag = 1; 88 } 89 $this->body = $result[0]["body"]; 90 } 91 } 85 $this->mail = $arrMail[0]; 92 86 $this->setTemplate($this->tpl_mainpage); 93 87 }
Note: See TracChangeset
for help on using the changeset viewer.
