Changeset 20205 for branches/version-2_5-dev/data/class/pages/admin
- Timestamp:
- 2011/02/19 19:48:25 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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.
