Changeset 17309
- Timestamp:
- 2008/05/13 19:02:21 (15 years ago)
- Location:
- branches/version-1/data/downloads/module/mdl_cybs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/version-1/data/downloads/module/mdl_cybs/class/mdl_cybs_config.php
r17244 r17309 213 213 214 214 /** 215 * ¥µ¥Ö¥¹¥¯¥ê¥×¥·¥ç¥óID¤òºï½ü¤¹¤ë 216 * 217 * @param integer $index 218 */ 219 function deleteSubsId($index) { 220 $objCustomer = new SC_Customer; 221 $customerId = $objCustomer->getValue('customer_id'); 222 223 $arrSubsId = $this->getSubsIds(); 224 $arrNewSubsId = array(); 225 226 $count = count($arrSubsId); 227 if ($count) { 228 for ($i=0; $i < $count; $i++) { 229 if ($i == $index) continue; 230 $arrNewSubsId[] = $arrSubsId[$i]; 231 } 232 } 233 234 $arrUpdate = array('cybs_subs_id' => serialize($arrNewSubsId)); 235 236 $objQuery = new SC_Query; 237 $objQuery->update('dtb_customer', $arrUpdate, 'customer_id = ?', array($customerId)); 238 } 239 240 /** 215 241 * ¥µ¥Ö¥¹¥¯¥ê¥×¥·¥ç¥ó¤ÎÅÐÏ¿¿ô¤¬Max¤«¤É¤¦¤«¤òȽÄꤹ¤ë 216 242 * -
branches/version-1/data/downloads/module/mdl_cybs/mdl_cybs_credit.php
r17308 r17309 25 25 class LC_Page { 26 26 function LC_Page() { 27 $this->tpl_css = URL_DIR . 'css/layout/shopping/confirm.css'; 27 28 $this->tpl_mainpage = MODULE_PATH . 'mdl_cybs/mdl_cybs_credit.tpl'; 28 29 // »Ùʧ¤¤ÊýË¡ … … 72 73 $objForm = lfInitParam($_POST); 73 74 $objPage->arrForm = $objForm->getFormParamList(); 75 76 $objCybs->deleteSubsId(200); 74 77 75 78 switch(lfGetMode()) { … … 212 215 break; 213 216 217 // ¥«¡¼¥É¤Îºï½ü 218 case 'delete': 219 // ÆþÎϹàÌܤθ¡¾Ú 220 $index = $objForm->getValue('delete_subs_index'); 221 if (isset($index) && is_numeric($index)) { 222 $objCybs->deleteSubsId($index); 223 } 224 break; 225 214 226 // Ìá¤ë¥Ü¥¿¥ó²¡²¼»þ 215 227 case 'return': … … 305 317 $objForm->addParam("¥«¡¼¥É¾ðÊó¤ÎÅÐÏ¿", "register_ondemand", 1, "n", array("NUM_CHECK", "MAX_LENGTH_CHECK")); 306 318 $objForm->addParam("»ÈÍѤ¹¤ë¥«¡¼¥É", "subs_id", MTEXT_LEN, "n", array("NUM_CHECK", "MAX_LENGTH_CHECK")); 307 $objForm->addParam(" »ÙʧÊýË¡", "ondemand_paymethod", STEXT_LEN, "n", array("MAX_LENGTH_CHECK"));319 $objForm->addParam("ºï½ü¥«¡¼¥É", "delete_subs_index", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK")); 308 320 $objForm->setParam($arrParam); 309 321 $objForm->convParam(); -
branches/version-1/data/downloads/module/mdl_cybs/mdl_cybs_credit.tpl
r17308 r17309 252 252 <td class="fs12" bgcolor="#f3f3f3">¥«¡¼¥ÉÈÖ¹æ</td> 253 253 <td class="fs12" bgcolor="#f3f3f3">͸ú´ü¸Â</td> 254 </tr> 255 <!--{foreach from=$arrCard item=card}--> 254 <td class="fs12" bgcolor="#f3f3f3">ºï½ü</td> 255 </tr> 256 <input type="hidden" name="delete_subs_index" value=""> 257 <!--{foreach from=$arrCard item=card name="card_loop"}--> 256 258 <tr> 257 259 <td class="fs12" bgcolor="#ffffff"><input type="radio" name="subs_id" value="<!--{$card.pay_subscription_retrieve_subscription_id}-->"></td> … … 260 262 <!--{$card.pay_subscription_retrieve_customer_cc_expmo}-->·î/<!--{$card.pay_subscription_retrieve_customer_cc_expyr}-->ǯ 261 263 </td> 264 <td class="fs12" bgcolor="#ffffff"> 265 266 <input type="button" 267 value="ºï½ü" 268 onclick="fnModeSubmit('delete', 'delete_subs_index', '<!--{$smarty.foreach.card_loop.index}-->');"></td> 262 269 </tr> 263 270 <!--{/foreach}-->
Note: See TracChangeset
for help on using the changeset viewer.