Changeset 20142
- Timestamp:
- 2011/02/11 18:57:25 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/class/pages/mypage/LC_Page_Mypage_MailView.php
r20116 r20142 23 23 24 24 // {{{ requires 25 require_once(CLASS_REALDIR . "pages/ LC_Page.php");25 require_once(CLASS_REALDIR . "pages/mypage/LC_Page_AbstractMypage.php"); 26 26 27 27 /** … … 32 32 * @version $Id$ 33 33 */ 34 class LC_Page_Mypage_MailView extends LC_Page {34 class LC_Page_Mypage_MailView extends LC_Page_AbstractMypage { 35 35 36 36 // }}} … … 54 54 function process() { 55 55 parent::process(); 56 $this->action();57 $this->sendResponse();58 56 } 59 57 … … 65 63 function action() { 66 64 $objCustomer = new SC_Customer(); 67 68 // ログインチェック 69 if(!$objCustomer->isLoginSuccess(true)) { 65 if(!SC_Utils_Ex::sfIsInt($_GET['send_id'])) { 70 66 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 71 67 } 72 68 73 if(SC_Utils_Ex::sfIsInt($_GET['send_id'])) { 74 $objQuery = new SC_Query(); 75 $col = "subject, mail_body"; 76 $where = "send_id = ? AND customer_id = ?"; 77 $arrval = array($_GET['send_id'], $objCustomer->getValue('customer_id')); 78 $arrRet = $objQuery->select($col, "dtb_mail_history LEFT JOIN dtb_order USING(order_id)", $where, $arrval); 69 $arrMailView = $this->lfGetMailView($_GET['send_id'], $objCustomer->getValue('customer_id')); 79 70 80 if (empty($arrRet)) { 81 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 82 } 83 $this->tpl_subject = $arrRet[0]['subject']; 84 $this->tpl_body = $arrRet[0]['mail_body']; 71 if (empty($arrMailView)) { 72 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR); 85 73 } 86 74 87 if (Net_UserAgent_Mobile::isMobile() === true){ 88 $this->tpl_title = 'メール履歴詳細'; 75 $this->tpl_subject = $arrMailView[0]['subject']; 76 $this->tpl_body = $arrMailView[0]['mail_body']; 77 78 if (SC_Display::detectDevice() === DEVICE_TYPE_PC){ 79 $this->setTemplate('mypage/mail_view.tpl'); 80 } else { 81 $this->tpl_title = 'メール履歴詳細'; 89 82 $this->tpl_mainpage = 'mypage/mail_view.tpl'; 90 } else {91 $this->setTemplate('mypage/mail_view.tpl');92 83 } 93 84 } … … 101 92 parent::destroy(); 102 93 } 94 95 96 /** 97 * GETで指定された受注idのメール送信内容を返す 98 * 99 * @param mixed $send_id 100 * @param mixed $customer_id 101 * @access private 102 * @return array 103 */ 104 function lfGetMailView($send_id, $customer_id) { 105 $objQuery = SC_Query::getSingletonInstance(); 106 $col = "subject, mail_body"; 107 $where = "send_id = ? AND customer_id = ?"; 108 $arrval = array($send_id, $customer_id); 109 return $objQuery->select($col, "dtb_mail_history LEFT JOIN dtb_order USING(order_id)", $where, $arrval); 110 } 103 111 } 104 ?>
Note: See TracChangeset
for help on using the changeset viewer.