Changeset 20664
- Timestamp:
- 2011/03/16 11:49:26 (11 years ago)
- Location:
- branches/version-2_5-dev/data
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-2_5-dev/data/Smarty/templates/admin/basis/payment.tpl
r20509 r20664 29 29 <div class="btn"> 30 30 <ul> 31 <li><a class="btn-action" href="javascript:;" name="subm2" onclick="win03('./payment_input.php','payment_input','620','400');"> 32 <span class="btn-next">支払方法を新規入力</span></a> 33 </li> 31 <li><a class="btn-action" href="javascript:;" name="subm2" onclick="fnChangeAction('./payment_input.php'); fnModeSubmit('','','');"> 32 <span class="btn-next">支払方法を新規入力</span></a></li> 34 33 </ul> 35 34 </div> … … 63 62 <!--{if $arrPaymentListFree[cnt].rule > 0}--><!--{$arrPaymentListFree[cnt].rule|number_format|h}--><!--{else}-->0<!--{/if}-->円 64 63 <!--{if $arrPaymentListFree[cnt].upper_rule > 0}-->~<!--{$arrPaymentListFree[cnt].upper_rule|number_format|h}-->円<!--{elseif $arrPaymentListFree[cnt].upper_rule == "0"}--><!--{else}-->~無制限<!--{/if}--></td> 65 <td class="center"><!--{if $arrPaymentListFree[cnt].fix != 1}--><a href="?" onclick=" win03('./payment_input.php?mode=pre_edit&payment_id=<!--{$arrPaymentListFree[cnt].payment_id}-->','payment_input','620','400'); return false;">編集</a><!--{else}-->-<!--{/if}--></td>64 <td class="center"><!--{if $arrPaymentListFree[cnt].fix != 1}--><a href="?" onclick="fnChangeAction('./payment_input.php'); fnModeSubmit('pre_edit', 'payment_id', <!--{$arrPaymentListFree[cnt].payment_id}-->); return false;">編集</a><!--{else}-->-<!--{/if}--></td> 66 65 <td class="center"><!--{if $arrPaymentListFree[cnt].fix != 1}--><a href="?" onclick="fnModeSubmit('delete', 'payment_id', <!--{$arrPaymentListFree[cnt].payment_id}-->); return false;">削除</a><!--{else}-->-<!--{/if}--></td> 67 66 <td class="center"> -
branches/version-2_5-dev/data/Smarty/templates/admin/basis/payment_input.tpl
r20516 r20664 22 22 */ 23 23 *}--> 24 <!--{include file="`$smarty.const.TEMPLATE_ADMIN_REALDIR`admin_popup_header.tpl"}-->25 26 <script type="text/javascript">27 <!--28 self.moveTo(20,20);self.focus();29 //-->30 </script>31 32 24 <form name="form1" id="form1" method="post" action="./payment_input.php" enctype="multipart/form-data"> 33 25 <input type="hidden" name="<!--{$smarty.const.TRANSACTION_ID_NAME}-->" value="<!--{$transactionid}-->" /> … … 40 32 <!--{/foreach}--> 41 33 <input type="hidden" name="charge_flg" value="<!--{$charge_flg}-->" /> 34 <div id="basis" class="contents-main"> 42 35 <h2>支払方法登録・編集</h2> 43 36 … … 86 79 <span class="attention"><!--{$arrErr[$key]}--></span> 87 80 <!--{if $arrFile[$key].filepath != ""}--> 88 <img src="<!--{$arrFile[$key].filepath}-->" alt="<!--{$arrForm.name|h}-->"> < a href="" onclick="fnModeSubmit('delete_image', 'image_key', '<!--{$key}-->'); return false;">[画像の取り消し]</a><br />81 <img src="<!--{$arrFile[$key].filepath}-->" alt="<!--{$arrForm.name|h}-->"> <br /><a href="" onclick="fnModeSubmit('delete_image', 'image_key', '<!--{$key}-->'); return false;">[画像の取り消し]</a><br /> 89 82 <!--{/if}--> 90 83 <input type="file" name="<!--{$key}-->" size="30" class="box30" style="<!--{$arrErr[$key]|sfGetErrorColor}-->" /> … … 96 89 <div class="btn-area"> 97 90 <ul> 91 <li><a class="btn-action" href="javascript:;" onclick="location.href='./payment.php';"><span class="btn-prev">前のページに戻る</span></a></li> 98 92 <li><a class="btn-action" href="javascript:;" onclick="fnFormModeSubmit('form1', 'edit', '', ''); return false;"><span class="btn-next">この内容で登録する</span></a></li> 99 93 </ul> 100 94 </div> 101 102 95 </div> 103 96 </form> 104 105 <!--{include file="`$smarty.const.TEMPLATE_ADMIN_REALDIR`admin_popup_footer.tpl"}--> -
branches/version-2_5-dev/data/class/pages/admin/basis/LC_Page_Admin_Basis_PaymentInput.php
r20624 r20664 50 50 parent::init(); 51 51 $this->tpl_mainpage = 'basis/payment_input.tpl'; 52 $this->tpl_subnavi = 'basis/subnavi.tpl'; 53 $this->tpl_mainno = 'basis'; 54 $this->tpl_subno = 'payment'; 52 55 $this->tpl_subtitle = '支払方法設定'; 53 56 } … … 69 72 */ 70 73 function action() { 71 $objDb = new SC_Helper_DB_Ex();72 74 $objFormParam = new SC_FormParam_Ex(); 73 74 75 $mode = $this->getMode(); 75 76 $this->lfInitParam($mode, $objFormParam); 76 77 if (!empty($_POST) || !empty($_GET)) {78 79 $param = (empty($_POST))? $_GET : $_POST;80 81 $objFormParam->setParam($param);82 $objFormParam->convParam();83 84 $this->arrErr = $objFormParam->checkError();85 $post = $objFormParam->getHashArray();86 }87 77 88 78 // ファイル管理クラス … … 95 85 switch($mode) { 96 86 case 'edit': 87 $objFormParam->setParam($_REQUEST); 88 $objFormParam->convParam(); 89 $this->arrErr = $objFormParam->checkError(); 90 $post = $objFormParam->getHashArray(); 97 91 $this->charge_flg = $post["charge_flg"]; 98 92 if(count($this->arrErr) == 0) { 99 93 $this->lfRegistData($post['payment_id'], $_SESSION['member_id'], $objFormParam); 100 94 $this->objUpFile->moveTempFile(); 101 $this->tpl_onload ="fnUpdateParent('".ADMIN_PAYMENT_URLPATH."'); window.close();";95 $this->tpl_onload = "location.href = './payment.php'; return;"; 102 96 } 103 97 $this->tpl_payment_id = $post['payment_id']; 104 98 break; 105 99 // 画像のアップロード 106 100 case 'upload_image': 101 $objFormParam->setParam($_REQUEST); 102 $objFormParam->convParam(); 103 $post = $objFormParam->getHashArray(); 107 104 // ファイル存在チェック 108 105 $this->arrErr = $this->objUpFile->checkEXISTS($post['image_key']); 109 106 // 画像保存処理 110 107 $this->arrErr[$post['image_key']] = $this->objUpFile->makeTempFile($post['image_key']); 108 $this->tpl_payment_id = $post['payment_id']; 111 109 break; 112 110 // 画像の削除 113 111 case 'delete_image': 114 115 $this->objUpFile->deleteFile($post['image_key']); 112 $objFormParam->setParam($_REQUEST); 113 $objFormParam->convParam(); 114 $this->arrErr = $objFormParam->checkError(); 115 $post = $objFormParam->getHashArray(); 116 if(count($this->arrErr) == 0) { 117 $this->objUpFile->deleteFile($post['image_key']); 118 } 119 $this->tpl_payment_id = $post['payment_id']; 116 120 break; 117 121 118 122 case 'pre_edit': 123 $objFormParam->setParam($_REQUEST); 124 $objFormParam->convParam(); 125 $this->arrErr = $objFormParam->checkError(); 126 $post = $objFormParam->getHashArray(); 127 if(count($this->arrErr) == 0) { 119 128 $arrRet = $this->lfGetData($post['payment_id']); 120 129 … … 128 137 $this->charge_flg = $arrRet["charge_flg"]; 129 138 $this->objUpFile->setDBFileList($arrRet); 130 $this->tpl_payment_id = $post['payment_id']; 139 } 140 $this->tpl_payment_id = $post['payment_id']; 131 141 break; 132 142 default: 133 143 break; 134 }135 136 if ($_SERVER['REQUEST_METHOD'] === 'POST') {137 $this->tpl_payment_id = $_POST['payment_id'];138 144 } 139 145 … … 144 150 // HIDDEN用に配列を渡す。 145 151 $this->arrHidden = array_merge((array)$this->arrHidden, (array)$this->objUpFile->getHiddenFileList()); 146 $this->setTemplate($this->tpl_mainpage);147 152 } 148 153 … … 178 183 case "upload_image": 179 184 case "delete_image": 185 $objFormParam->addParam('支払いID', 'payment_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); 180 186 $objFormParam->addParam("支払方法", "payment_method", STEXT_LEN, 'KVa', array("EXIST_CHECK", "MAX_LENGTH_CHECK")); 181 187 $objFormParam->addParam("手数料", 'charge', PRICE_LEN, 'n', array("EXIST_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK"));
Note: See TracChangeset
for help on using the changeset viewer.