Changeset 17309 for branches/version-1


Ignore:
Timestamp:
2008/05/13 19:02:21 (16 years ago)
Author:
adachi
Message:

サイバーソース暫定コミット

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  
    213213 
    214214    /** 
     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    /** 
    215241     * ¥µ¥Ö¥¹¥¯¥ê¥×¥·¥ç¥ó¤ÎÅÐÏ¿¿ô¤¬Max¤«¤É¤¦¤«¤òȽÄꤹ¤ë 
    216242     * 
  • branches/version-1/data/downloads/module/mdl_cybs/mdl_cybs_credit.php

    r17308 r17309  
    2525class LC_Page { 
    2626    function LC_Page() { 
     27        $this->tpl_css      = URL_DIR . 'css/layout/shopping/confirm.css'; 
    2728        $this->tpl_mainpage = MODULE_PATH . 'mdl_cybs/mdl_cybs_credit.tpl'; 
    2829        // »Ùʧ¤¤ÊýË¡ 
     
    7273$objForm = lfInitParam($_POST); 
    7374$objPage->arrForm = $objForm->getFormParamList(); 
     75 
     76$objCybs->deleteSubsId(200); 
    7477 
    7578switch(lfGetMode()) { 
     
    212215    break; 
    213216 
     217// ¥«¡¼¥É¤Îºï½ü 
     218case 'delete': 
     219    // ÆþÎϹàÌܤθ¡¾Ú 
     220    $index = $objForm->getValue('delete_subs_index'); 
     221    if (isset($index) && is_numeric($index)) { 
     222        $objCybs->deleteSubsId($index); 
     223    } 
     224    break; 
     225 
    214226// Ìá¤ë¥Ü¥¿¥ó²¡²¼»þ 
    215227case 'return': 
     
    305317    $objForm->addParam("¥«¡¼¥É¾ðÊó¤ÎÅÐÏ¿", "register_ondemand", 1, "n", array("NUM_CHECK", "MAX_LENGTH_CHECK")); 
    306318    $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")); 
    308320    $objForm->setParam($arrParam); 
    309321    $objForm->convParam(); 
  • branches/version-1/data/downloads/module/mdl_cybs/mdl_cybs_credit.tpl

    r17308 r17309  
    252252                                <td class="fs12" bgcolor="#f3f3f3">¥«¡¼¥ÉÈÖ¹æ</td> 
    253253                                <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"}--> 
    256258                            <tr> 
    257259                                <td class="fs12" bgcolor="#ffffff"><input type="radio" name="subs_id" value="<!--{$card.pay_subscription_retrieve_subscription_id}-->"></td> 
     
    260262                                    <!--{$card.pay_subscription_retrieve_customer_cc_expmo}-->·î/<!--{$card.pay_subscription_retrieve_customer_cc_expyr}-->ǯ 
    261263                                </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> 
    262269                            </tr> 
    263270                            <!--{/foreach}--> 
Note: See TracChangeset for help on using the changeset viewer.