Changeset 16443


Ignore:
Timestamp:
2007/10/15 22:39:23 (16 years ago)
Author:
adachi
Message:

DB登録処理作成

Location:
branches/feature-module-update/data
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/feature-module-update/data/Smarty/templates/default/admin/ownersstore/settings.tpl

    r15782 r16443  
    5555                                    <tr> 
    5656                                        <td colspan="2" bgcolor="#f2f1ec" width="678" class="fs12n"> 
    57                                             ※<a href="http://www.lockon.co.jp">EC-CUBEアプリケーション販売ショップ</a>で認証キーを取得しましょう! 
     57                                            ※<a href="http://store.eccube.net" target="_blank">EC-CUBEオーナーズストア</a>で認証キーを取得しましょう! 
    5858                                        </td> 
    5959                                    </tr> 
  • branches/feature-module-update/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Settings.php

    r16411 r16443  
    126126        // エラーがなければDBへ登録 
    127127        $arrForm = $this->objForm->getHashArray(); 
    128         $this->registerAppSettings($arrForm); 
     128        $this->registerOwnersStoreSettings($arrForm); 
    129129 
    130130        $this->arrForm = $arrForm; 
     
    148148 
    149149        $objForm = new SC_FormParam(); 
    150         $objForm->addParam('認証キー', 'public_key', MTEXT_LEN, '', array('EXIST_CHECK', 'ALNUM_CHECK', 'MAX_LENGTH_CHECK')); 
     150        $objForm->addParam('認証キー', 'public_key', LTEXT_LEN, '', array('EXIST_CHECK', 'ALNUM_CHECK', 'MAX_LENGTH_CHECK')); 
    151151        $objForm->setParam($_POST); 
    152152 
     
    172172     */ 
    173173    function execDefaultMode() { 
    174         // $this->arrForm = $this->getAppSettings(); 
     174        $this->arrForm = $this->getOwnersStoreSettings(); 
    175175    } 
    176176 
     
    178178     * DBへ入力内容を登録する. 
    179179     * 
    180      * @param array $arrSettingsData アプリケーション設定の連想配列 
    181      * @return void 
    182      */ 
    183     function registerAppSettings($arrSettingsData) { 
    184  
     180     * @param array $arrSettingsData オーナーズストア設定の連想配列 
     181     * @return void 
     182     */ 
     183    function registerOwnersStoreSettings($arrSettingsData) { 
     184        $table = 'dtb_ownersstore_settings'; 
     185        $objQuery = new SC_Query(); 
     186        $count = $objQuery->count($table); 
     187 
     188        if ($count) { 
     189            $objQuery->update($table, $arrSettingsData); 
     190        } else { 
     191            $objQuery->insert($table, $arrSettingsData); 
     192        } 
    185193    } 
    186194 
     
    191199     * @return array 
    192200     */ 
    193     function getAppSettings(){ 
    194         $table   = 'dtb_application_settings'; 
     201    function getOwnersStoreSettings(){ 
     202        $table   = 'dtb_ownersstore_settings'; 
    195203        $colmuns = '*'; 
    196         $where   = 'app_id = 1'; 
    197204 
    198205        $objQuery = new SC_Query(); 
    199         $arrRet = $objQuery->select($colmuns, $table, $where); 
     206        $arrRet = $objQuery->select($colmuns, $table); 
    200207 
    201208        if (isset($arrRet[0])) return $arrRet[0]; 
Note: See TracChangeset for help on using the changeset viewer.