Changeset 23277 for branches/version-2_13_1/data
- Timestamp:
- 2013/11/18 13:07:02 (9 years ago)
- Location:
- branches/version-2_13_1/data
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_13_1/data/Smarty/templates/default/mypage/refusal_confirm.tpl
r23134 r23277 28 28 <form name="form1" id="form1" method="post" action="?"> 29 29 <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> 30 <input type="hidden" name="refusal_transactionid" value="<!--{$refusal_transactionid}-->" /> 30 31 <input type="hidden" name="mode" value="complete" /> 31 32 -
branches/version-2_13_1/data/Smarty/templates/mobile/mypage/refusal.tpl
r22206 r23277 29 29 <form action="?" method="post"> 30 30 <input type="hidden" name="mode" value="complete"> 31 <input type="hidden" name="refusal_transactionid" value="<!--{$refusal_transactionid}-->" /> 31 32 <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->"> 32 33 -
branches/version-2_13_1/data/Smarty/templates/sphone/mypage/refusal_confirm.tpl
r23134 r23277 28 28 <form name="form1" id="form1" method="post" action="<!--{$smarty.const.HTTPS_URL}-->mypage/refusal.php"> 29 29 <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> 30 <input type="hidden" name="refusal_transactionid" value="<!--{$refusal_transactionid}-->" /> 30 31 <input type="hidden" name="mode" value="complete" /> 31 32 -
branches/version-2_13_1/data/class/pages/mypage/LC_Page_Mypage_Refusal.php
r23124 r23277 64 64 switch ($this->getMode()) { 65 65 case 'confirm': 66 // トークンを設定 67 $this->refusal_transactionid = $this->getRefusalToken(); 68 66 69 $this->tpl_mainpage = 'mypage/refusal_confirm.tpl'; 67 70 $this->tpl_subtitle = '退会手続き(確認ページ)'; … … 69 72 70 73 case 'complete': 74 // トークン入力チェック 75 if(!$this->isValidRefusalToken()) { 76 // エラー画面へ遷移する 77 SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true); 78 SC_Response_Ex::actionExit(); 79 } 80 71 81 $objCustomer = new SC_Customer_Ex(); 72 82 $this->lfDeleteCustomer($objCustomer->getValue('customer_id')); … … 76 86 77 87 default: 88 if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) { 89 $this->refusal_transactionid = $this->getRefusalToken(); 90 } 78 91 break; 79 92 } 80 93 94 } 95 96 /** 97 * トランザクショントークンを取得する 98 * 99 * @return string 100 */ 101 function getRefusalToken() { 102 if (empty($_SESSION['refusal_transactionid'])) { 103 $_SESSION['refusal_transactionid'] = SC_Helper_Session_Ex::createToken(); 104 } 105 return $_SESSION['refusal_transactionid']; 106 } 107 108 /** 109 * トランザクショントークンのチェックを行う 110 */ 111 function isValidRefusalToken() { 112 if(empty($_POST['refusal_transactionid'])) { 113 $ret = false; 114 } else { 115 $ret = $_POST['refusal_transactionid'] === $_SESSION['refusal_transactionid']; 116 } 117 118 return $ret; 119 } 120 121 /** 122 * トランザクショントークを破棄する 123 */ 124 function destroyRefusalToken() { 125 unset($_SESSION['refusal_transactionid']); 81 126 } 82 127
Note: See TracChangeset
for help on using the changeset viewer.