Changeset 20205
- Timestamp:
- 2011/02/19 19:48:25 (11 years ago)
- Location:
- branches/version-2_5-dev/data
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/Smarty/templates/admin/mail/preview.tpl
r20116 r20205 22 22 */ 23 23 *}--> 24 <!--{if $ escape_flag eq 1}--><!--{$body|h|nl2br}--><!--{else}--><!--{$body}--><!--{/if}-->24 <!--{if $mail.mail_method eq 2}--><!--{$mail.body|h|nl2br}--><!--{else}--><!--{$mail.body}--><!--{/if}--> -
branches/version-2_5-dev/data/Smarty/templates/admin/mail/template.tpl
r20203 r20205 49 49 <!--{assign var=type value=$arrTemplates[data].mail_method|h}--> 50 50 <td><!--{$arrMagazineType[$type]}--></td> 51 <td>< !--{if $arrTemplates[data].mail_method eq 3}--><a href="./htmlmail.php?mode=edit&template_id=<!--{$arrTemplates[data].template_id}-->"><!--{else}--><a href="./template_input.php?mode=edit&template_id=<!--{$arrTemplates[data].template_id}-->"><!--{/if}-->編集</a></td>51 <td><a href="./template_input.php?mode=edit&template_id=<!--{$arrTemplates[data].template_id}-->">編集</a></td> 52 52 <td><a href="#" onclick="fnDelete('?mode=delete&id=<!--{$arrTemplates[data].template_id}-->'); return false;">削除</a></td> 53 <td>< !--{if $arrTemplates[data].mail_method eq 3}--><a href="#" onclick="win03('./preview.php?method=template&id=<!--{$arrTemplates[data].template_id}-->','preview','650','700'); return false;" target="_blank"><!--{else}--><a href="#" onclick="win03('./preview.php?id=<!--{$arrTemplates[data].template_id}-->','preview','650','700'); return false;" target="_blank"><!--{/if}-->プレビュー</a></td>53 <td><a href="#" onclick="win03('./preview.php?mode=template&template_id=<!--{$arrTemplates[data].template_id}-->','preview','650','700'); return false;" target="_blank">プレビュー</a></td> 54 54 </tr> 55 55 <!--{/section}--> -
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.