source: branches/version-2/data/class/pages/shopping/LC_Page_Shopping_Deliv.php @ 17653

Revision 17653, 23.7 KB checked in by takegami, 16 years ago (diff)

#366修正

  • Property svn:eol-style set to LF
  • Property svn:keywords set to Id Revision Date
  • Property svn:mime-type set to text/x-httpd-php; charset=UTF-8
Line 
1<?php
2/*
3 * This file is part of EC-CUBE
4 *
5 * Copyright(c) 2000-2007 LOCKON CO.,LTD. All Rights Reserved.
6 *
7 * http://www.lockon.co.jp/
8 *
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License
11 * as published by the Free Software Foundation; either version 2
12 * of the License, or (at your option) any later version.
13 *
14 * This program is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17 * GNU General Public License for more details.
18 *
19 * You should have received a copy of the GNU General Public License
20 * along with this program; if not, write to the Free Software
21 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
22 */
23
24// {{{ requires
25require_once(CLASS_PATH . "pages/LC_Page.php");
26
27/**
28 * お届け先指定 のページクラス.
29 *
30 * @package Page
31 * @author LOCKON CO.,LTD.
32 * @version $Id:LC_Page_Shopping_Deliv.php 15532 2007-08-31 14:39:46Z nanasess $
33 */
34class LC_Page_Shopping_Deliv extends LC_Page {
35
36    // {{{ properties
37
38    /** フォームパラメータの配列 */
39    var $objFormParam;
40
41    /** ログインフォームパラメータ配列 */
42    var $objLoginFormParam;
43
44    // }}}
45    // {{{ functions
46
47    /**
48     * Page を初期化する.
49     *
50     * @return void
51     */
52    function init() {
53        parent::init();
54        $this->tpl_mainpage = 'shopping/deliv.tpl';
55        $this->tpl_column_num = 1;
56        $this->tpl_css = URL_DIR.'css/layout/shopping/index.css';
57        $masterData = new SC_DB_MasterData();
58        $this->arrPref = $masterData->getMasterData("mtb_pref", array("pref_id", "pref_name", "rank"));
59        $this->tpl_title = "お届け先指定";
60
61        $this->allowClientCache();
62    }
63
64    /**
65     * Page のプロセス.
66     *
67     * @return void
68     */
69    function process() {
70        global $objCampaignSess;
71
72        $objView = new SC_SiteView();
73        $objSiteSess = new SC_SiteSession();
74        $objCartSess = new SC_CartSession();
75        $objCampaignSess = new SC_CampaignSession();
76        $objCustomer = new SC_Customer();
77        // クッキー管理クラス
78        $objCookie = new SC_Cookie(COOKIE_EXPIRE);
79        // パラメータ管理クラス
80        $this->objFormParam = new SC_FormParam();
81        // パラメータ情報の初期化
82        $this->lfInitParam();
83        // POST値の取得
84        $this->objFormParam->setParam($_POST);
85
86        $this->objLoginFormParam = new SC_FormParam();  // ログインフォーム用
87        $this->lfInitLoginFormParam();                      // 初期設定
88        $this->objLoginFormParam->setParam($_POST);     // POST値の取得
89
90        // ユーザユニークIDの取得と購入状態の正当性をチェック
91        $uniqid = SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess);
92        $this->tpl_uniqid = $uniqid;
93
94        if (!isset($_POST['mode'])) $_POST['mode'] = "";
95
96        // ログインチェック
97        if($_POST['mode'] != 'login' && !$objCustomer->isLoginSuccess()) {
98            // 不正アクセスとみなす
99            SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
100        }
101
102        switch($_POST['mode']) {
103        case 'login':
104            $this->objLoginFormParam->toLower('login_email');
105            $this->arrErr = $this->objLoginFormParam->checkError();
106            $arrForm =  $this->objLoginFormParam->getHashArray();
107            // クッキー保存判定
108            if($arrForm['login_memory'] == "1" && $arrForm['login_email'] != "") {
109                $objCookie->setCookie('login_email', $_POST['login_email']);
110            } else {
111                $objCookie->setCookie('login_email', '');
112            }
113
114            if(count($this->arrErr) == 0) {
115                // ログイン判定
116                if(!$objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'])) {
117                    // 仮登録の判定
118                    $objQuery = new SC_Query;
119                    $where = "email = ? AND status = 1 AND del_flg = 0";
120                    $ret = $objQuery->count("dtb_customer", $where, array($arrForm['login_email']));
121
122                    if($ret > 0) {
123                        SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
124                    } else {
125                        SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR);
126                    }
127                }
128            } else {
129                // ログインページに戻る
130                $this->sendRedirect(URL_SHOP_TOP);
131                exit;
132            }
133            break;
134        // 削除
135        case 'delete':
136            if (SC_Utils_Ex::sfIsInt($_POST['other_deliv_id'])) {
137                $objQuery = new SC_Query();
138                $where = "other_deliv_id = ?";
139                $arrRet = $objQuery->delete("dtb_other_deliv", $where, array($_POST['other_deliv_id']));
140                $this->objFormParam->setValue('select_addr_id', '');
141            }
142            break;
143        // 会員登録住所に送る
144        case 'customer_addr':
145            // 会員登録住所がチェックされている場合
146            if ($_POST['deliv_check'] == '-1') {
147                // 会員情報の住所を受注一時テーブルに書き込む
148                $this->lfRegistDelivData($uniqid, $objCustomer);
149                // 正常に登録されたことを記録しておく
150                $objSiteSess->setRegistFlag();
151                // お支払い方法選択ページへ移動
152                $this->sendRedirect($this->getLocation(URL_SHOP_PAYMENT, array(), true));
153                exit;
154            // 別のお届け先がチェックされている場合
155            } elseif($_POST['deliv_check'] >= 1) {
156                if (SC_Utils_Ex::sfIsInt($_POST['deliv_check'])) {
157                    // 登録済みの別のお届け先を受注一時テーブルに書き込む
158                    $this->lfRegistOtherDelivData($uniqid, $objCustomer, $_POST['deliv_check']);
159                    // 正常に登録されたことを記録しておく
160                    $objSiteSess->setRegistFlag();
161                    // お支払い方法選択ページへ移動
162                    $this->sendRedirect($this->getLocation(URL_SHOP_PAYMENT, array(), true));
163                    exit;
164                }
165            }else{
166                // エラーを返す
167                $arrErr['deli'] = '※ お届け先を選択してください。';
168            }
169            break;
170        // 前のページに戻る
171        case 'return':
172            // 確認ページへ移動
173            $this->sendRedirect($this->getLocation(URL_CART_TOP, array(), true));
174            exit;
175            break;
176        default:
177            $objQuery = new SC_Query();
178            $where = "order_temp_id = ?";
179            $arrRet = $objQuery->select("*", "dtb_order_temp", $where, array($uniqid));
180            if (empty($arrRet)) $arrRet = array("");
181            $this->objFormParam->setParam($arrRet[0]);
182            break;
183        }
184
185        /** 表示処理 **/
186
187        // 会員登録住所の取得
188        $col = "name01, name02, pref, addr01, addr02";
189        $where = "customer_id = ?";
190        $objQuery = new SC_Query();
191        $arrCustomerAddr = $objQuery->select($col, "dtb_customer", $where, array($_SESSION['customer']['customer_id']));
192        // 別のお届け先住所の取得
193        $col = "other_deliv_id, name01, name02, pref, addr01, addr02";
194        $objQuery->setorder("other_deliv_id DESC");
195        $objOtherAddr = $objQuery->select($col, "dtb_other_deliv", $where, array($_SESSION['customer']['customer_id']));
196        $this->arrAddr = $arrCustomerAddr;
197        $this->tpl_addrmax = count($objOtherAddr);
198        $cnt = 1;
199        foreach($objOtherAddr as $val) {
200            $this->arrAddr[$cnt] = $val;
201            $cnt++;
202        }
203
204        // 入力値の取得
205        if (!isset($arrErr)) $arrErr = array();
206        $this->arrForm = $this->objFormParam->getFormParamList();
207        $this->arrErr = $arrErr;
208
209        $objView->assignobj($this);
210        // フレームを選択(キャンペーンページから遷移なら変更)
211        $objCampaignSess->pageView($objView);
212    }
213
214    /**
215     * モバイルページを初期化する.
216     *
217     * @return void
218     */
219    function mobileInit() {
220        $this->init();
221    }
222
223    /**
224     * Page のプロセス(モバイル).
225     *
226     * @return void
227     */
228    function mobileProcess() {
229        $objView = new SC_MobileView();
230        $objSiteSess = new SC_SiteSession();
231        $objCartSess = new SC_CartSession();
232        $objCustomer = new SC_Customer();
233        // クッキー管理クラス
234        $objCookie = new SC_Cookie(COOKIE_EXPIRE);
235        // パラメータ管理クラス
236        $this->objFormParam = new SC_FormParam();
237        // パラメータ情報の初期化
238        $this->lfInitParam();
239        // POST値の取得
240        $this->objFormParam->setParam($_POST);
241
242        $this->objLoginFormParam = new SC_FormParam();  // ログインフォーム用
243        $this->lfInitLoginFormParam();                      // 初期設定
244        $this->objLoginFormParam->setParam($_POST);     // POST値の取得
245
246        // ユーザユニークIDの取得と購入状態の正当性をチェック
247        $uniqid = SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess);
248        $this->tpl_uniqid = $uniqid;
249
250        if (!isset($_POST['mode'])) $_POST['mode'] = "";
251
252        // ログインチェック
253        if($_POST['mode'] != 'login' && !$objCustomer->isLoginSuccess(true)) {
254            // 不正アクセスとみなす
255            SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
256        }
257
258        switch($_POST['mode']) {
259        case 'login':
260            $this->objLoginFormParam->toLower('login_email');
261            $this->arrErr = $this->objLoginFormParam->checkError();
262            $arrForm =  $this->objLoginFormParam->getHashArray();
263            // クッキー保存判定
264            if($arrForm['login_memory'] == "1" && $arrForm['login_email'] != "") {
265                $objCookie->setCookie('login_email', $_POST['login_email']);
266            } else {
267                $objCookie->setCookie('login_email', '');
268            }
269
270            if(count($this->arrErr) == 0) {
271                // ログイン判定
272                if(!$objCustomer->getCustomerDataFromMobilePhoneIdPass($arrForm['login_pass']) &&
273                   !$objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'], true)) {
274                    // 仮登録の判定
275                    $objQuery = new SC_Query;
276                    $where = "(email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0";
277                    $ret = $objQuery->count("dtb_customer", $where, array($arrForm['login_email'], $arrForm['login_email']));
278
279                    if($ret > 0) {
280                        SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR, "", false, "", true);
281                    } else {
282                        SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR, "", false, "", true);
283                    }
284                }
285            } else {
286                // ログインページに戻る
287                $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_TOP), true);
288                exit;
289            }
290
291            // ログインが成功した場合は携帯端末IDを保存する。
292            $objCustomer->updateMobilePhoneId();
293
294            /*
295             * 携帯メールアドレスが登録されていない場合は,
296             * 携帯メールアドレス登録画面へ遷移
297             */
298            $objMobile = new SC_Helper_Mobile_Ex();
299            if (!$objMobile->gfIsMobileMailAddress($objCustomer->getValue('email'))) {
300                if (!$objCustomer->hasValue('email_mobile')) {
301                    $this->sendRedirect($this->getLocation("../entry/email_mobile.php"), true);
302                    exit;
303                }
304            }
305            break;
306            // 削除
307        case 'delete':
308            if (SC_Utils_Ex::sfIsInt($_POST['other_deliv_id'])) {
309                $objQuery = new SC_Query();
310                $where = "other_deliv_id = ?";
311                $arrRet = $objQuery->delete("dtb_other_deliv", $where, array($_POST['other_deliv_id']));
312                $this->objFormParam->setValue('select_addr_id', '');
313            }
314            break;
315            // 会員登録住所に送る
316        case 'customer_addr':
317            // お届け先がチェックされている場合には更新処理を行う
318            if ($_POST['deli'] != "") {
319                // 会員情報の住所を受注一時テーブルに書き込む
320                $this->lfRegistDelivData($uniqid, $objCustomer);
321                // 正常に登録されたことを記録しておく
322                $objSiteSess->setRegistFlag();
323                // お支払い方法選択ページへ移動
324                $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT), true);
325                exit;
326            }else{
327                // エラーを返す
328                $arrErr['deli'] = '※ お届け先を選択してください。';
329            }
330            break;
331
332            // 登録済みの別のお届け先に送る
333        case 'other_addr':
334            // お届け先がチェックされている場合には更新処理を行う
335            if ($_POST['deli'] != "") {
336                if (SC_Utils_Ex::sfIsInt($_POST['other_deliv_id'])) {
337                    // 登録済みの別のお届け先を受注一時テーブルに書き込む
338                    $this->lfRegistOtherDelivData($uniqid, $objCustomer, $_POST['other_deliv_id']);
339                    // 正常に登録されたことを記録しておく
340                    $objSiteSess->setRegistFlag();
341                    // お支払い方法選択ページへ移動
342                    $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT), true);
343                    exit;
344                }
345            }else{
346                // エラーを返す
347                $arrErr['deli'] = '※ お届け先を選択してください。';
348            }
349            break;
350
351            /*
352            // 別のお届け先を指定
353            case 'new_addr':
354            // 入力値の変換
355            $this->objFormParam->convParam();
356            $this->arrErr = lfCheckError($arrRet);
357            // 入力エラーなし
358            if(count($this->arrErr) == 0) {
359            // DBへお届け先を登録
360            lfRegistNewAddrData($uniqid, $objCustomer);
361            // 正常に登録されたことを記録しておく
362            $objSiteSess->setRegistFlag();
363            // お支払い方法選択ページへ移動
364            header("Location: " . URL_SHOP_PAYMENT);
365            exit;
366            }
367            break;
368            */
369
370            // 前のページに戻る
371        case 'return':
372            // 確認ページへ移動
373            $this->sendRedirect($this->getLocation(MOBILE_URL_CART_TOP), true);
374            exit;
375            break;
376        default:
377            $objQuery = new SC_Query();
378            $where = "order_temp_id = ?";
379            $arrRet = $objQuery->select("*", "dtb_order_temp", $where, array($uniqid));
380            $this->objFormParam->setParam($arrRet[0]);
381            break;
382        }
383
384        /** 表示処理 **/
385
386        // 会員登録住所の取得
387        $col = "name01, name02, pref, addr01, addr02, zip01, zip02";
388        $where = "customer_id = ?";
389        $objQuery = new SC_Query();
390        $arrCustomerAddr = $objQuery->select($col, "dtb_customer", $where, array($_SESSION['customer']['customer_id']));
391        // 別のお届け先住所の取得
392        $col = "other_deliv_id, name01, name02, pref, addr01, addr02, zip01, zip02";
393        $objQuery->setorder("other_deliv_id DESC");
394        $objOtherAddr = $objQuery->select($col, "dtb_other_deliv", $where, array($_SESSION['customer']['customer_id']));
395        $this->arrAddr = $arrCustomerAddr;
396        $cnt = 1;
397        foreach($objOtherAddr as $val) {
398            $this->arrAddr[$cnt] = $val;
399            $cnt++;
400        }
401
402        // 入力値の取得
403        if (!isset($arrErr)) $arrErr = array();
404        $this->arrForm = $this->objFormParam->getFormParamList();
405        $this->arrErr = $arrErr;
406        $objView->assignobj($this);
407        $objView->display(SITE_FRAME);
408    }
409
410    /**
411     * デストラクタ.
412     *
413     * @return void
414     */
415    function destroy() {
416        parent::destroy();
417    }
418
419    /* パラメータ情報の初期化 */
420    function lfInitParam() {
421        $this->objFormParam->addParam("お名前1", "deliv_name01", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
422        $this->objFormParam->addParam("お名前2", "deliv_name02", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
423        $this->objFormParam->addParam("フリガナ1", "deliv_kana01", STEXT_LEN, "KVCa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
424        $this->objFormParam->addParam("フリガナ2", "deliv_kana02", STEXT_LEN, "KVCa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
425        $this->objFormParam->addParam("郵便番号1", "deliv_zip01", ZIP01_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
426        $this->objFormParam->addParam("郵便番号2", "deliv_zip02", ZIP02_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "NUM_COUNT_CHECK"));
427        $this->objFormParam->addParam("都道府県", "deliv_pref", INT_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK", "NUM_CHECK"));
428        $this->objFormParam->addParam("住所1", "deliv_addr01", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
429        $this->objFormParam->addParam("住所2", "deliv_addr02", STEXT_LEN, "KVa", array("EXIST_CHECK", "SPTAB_CHECK", "MAX_LENGTH_CHECK"));
430        $this->objFormParam->addParam("電話番号1", "deliv_tel01", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
431        $this->objFormParam->addParam("電話番号2", "deliv_tel02", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
432        $this->objFormParam->addParam("電話番号3", "deliv_tel03", TEL_ITEM_LEN, "n", array("EXIST_CHECK", "MAX_LENGTH_CHECK" ,"NUM_CHECK"));
433        $this->objFormParam->addParam("", "deliv_check");
434    }
435
436    function lfInitLoginFormParam() {
437        $this->objLoginFormParam->addParam("記憶する", "login_memory", INT_LEN, "n", array("MAX_LENGTH_CHECK", "NUM_CHECK"));
438        $this->objLoginFormParam->addParam("メールアドレス", "login_email", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
439        $this->objLoginFormParam->addParam("パスワード", "login_pass", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
440    }
441
442    /* DBへデータの登録 */
443    function lfRegistNewAddrData($uniqid, $objCustomer) {
444        $arrRet = $this->objFormParam->getHashArray();
445        $sqlval = $this->objFormParam->getDbArray();
446        // 登録データの作成
447        $sqlval['deliv_check'] = '1';
448        $sqlval['order_temp_id'] = $uniqid;
449        $sqlval['update_date'] = 'Now()';
450        $sqlval['customer_id'] = $objCustomer->getValue('customer_id');
451        $sqlval['order_birth'] = $objCustomer->getValue('birth');
452
453        $objDb = new SC_Helper_DB_Ex();
454        $objDb->sfRegistTempOrder($uniqid, $sqlval);
455    }
456
457    /* 会員情報の住所を一時受注テーブルへ */
458    function lfRegistDelivData($uniqid, $objCustomer) {
459        // 登録データの作成
460        $sqlval['order_temp_id'] = $uniqid;
461        $sqlval['update_date'] = 'Now()';
462        $sqlval['customer_id'] = $objCustomer->getValue('customer_id');
463        $sqlval['deliv_check'] = '-1';
464        $sqlval['order_name01'] = $objCustomer->getValue('name01');
465        $sqlval['order_name02'] = $objCustomer->getValue('name02');
466        $sqlval['order_kana01'] = $objCustomer->getValue('kana01');
467        $sqlval['order_kana02'] = $objCustomer->getValue('kana02');
468        $sqlval['order_zip01'] = $objCustomer->getValue('zip01');
469        $sqlval['order_zip02'] = $objCustomer->getValue('zip02');
470        $sqlval['order_pref'] = $objCustomer->getValue('pref');
471        $sqlval['order_addr01'] = $objCustomer->getValue('addr01');
472        $sqlval['order_addr02'] = $objCustomer->getValue('addr02');
473        $sqlval['order_tel01'] = $objCustomer->getValue('tel01');
474        $sqlval['order_tel02'] = $objCustomer->getValue('tel02');
475        $sqlval['order_tel03'] = $objCustomer->getValue('tel03');
476        $sqlval['order_fax01'] = $objCustomer->getValue('fax01');
477        $sqlval['order_fax02'] = $objCustomer->getValue('fax02');
478        $sqlval['order_fax03'] = $objCustomer->getValue('fax03');
479        $sqlval['deliv_name01'] = $objCustomer->getValue('name01');
480        $sqlval['deliv_name02'] = $objCustomer->getValue('name02');
481        $sqlval['deliv_kana01'] = $objCustomer->getValue('kana01');
482        $sqlval['deliv_kana02'] = $objCustomer->getValue('kana02');
483        $sqlval['deliv_zip01'] = $objCustomer->getValue('zip01');
484        $sqlval['deliv_zip02'] = $objCustomer->getValue('zip02');
485        $sqlval['deliv_pref'] = $objCustomer->getValue('pref');
486        $sqlval['deliv_addr01'] = $objCustomer->getValue('addr01');
487        $sqlval['deliv_addr02'] = $objCustomer->getValue('addr02');
488        $sqlval['deliv_tel01'] = $objCustomer->getValue('tel01');
489        $sqlval['deliv_tel02'] = $objCustomer->getValue('tel02');
490        $sqlval['deliv_tel03'] = $objCustomer->getValue('tel03');
491        $sqlval['deliv_fax01'] = $objCustomer->getValue('fax01');
492        $sqlval['deliv_fax02'] = $objCustomer->getValue('fax02');
493        $sqlval['deliv_fax03'] = $objCustomer->getValue('fax03');
494
495        $objDb = new SC_Helper_DB_Ex();
496        $objDb->sfRegistTempOrder($uniqid, $sqlval);
497    }
498
499    /* 別のお届け先住所を一時受注テーブルへ */
500    function lfRegistOtherDelivData($uniqid, $objCustomer, $other_deliv_id) {
501        // 登録データの作成
502        $sqlval['order_temp_id'] = $uniqid;
503        $sqlval['update_date'] = 'Now()';
504        $sqlval['customer_id'] = $objCustomer->getValue('customer_id');
505        $sqlval['order_birth'] = $objCustomer->getValue('birth');
506
507        $objQuery = new SC_Query();
508        $where = "other_deliv_id = ?";
509        $arrRet = $objQuery->select("*", "dtb_other_deliv", $where, array($other_deliv_id));
510
511        $sqlval['deliv_check'] = $other_deliv_id;
512        $sqlval['deliv_name01'] = $arrRet[0]['name01'];
513        $sqlval['deliv_name02'] = $arrRet[0]['name02'];
514        $sqlval['deliv_kana01'] = $arrRet[0]['kana01'];
515        $sqlval['deliv_kana02'] = $arrRet[0]['kana02'];
516        $sqlval['deliv_zip01'] = $arrRet[0]['zip01'];
517        $sqlval['deliv_zip02'] = $arrRet[0]['zip02'];
518        $sqlval['deliv_pref'] = $arrRet[0]['pref'];
519        $sqlval['deliv_addr01'] = $arrRet[0]['addr01'];
520        $sqlval['deliv_addr02'] = $arrRet[0]['addr02'];
521        $sqlval['deliv_tel01'] = $arrRet[0]['tel01'];
522        $sqlval['deliv_tel02'] = $arrRet[0]['tel02'];
523        $sqlval['deliv_tel03'] = $arrRet[0]['tel03'];
524        $objDb = new SC_Helper_DB_Ex();
525        $objDb->sfRegistTempOrder($uniqid, $sqlval);
526    }
527
528    /* 入力内容のチェック */
529    function lfCheckError() {
530        // 入力データを渡す。
531        $arrRet =  $this->objFormParam->getHashArray();
532        $objErr = new SC_CheckError($arrRet);
533        $objErr->arrErr = $this->objFormParam->checkError();
534        // 複数項目チェック
535        if ($_POST['mode'] == 'login'){
536            $objErr->doFunc(array("メールアドレス", "login_email", STEXT_LEN), array("EXIST_CHECK"));
537            $objErr->doFunc(array("パスワード", "login_pass", STEXT_LEN), array("EXIST_CHECK"));
538        }
539        $objErr->doFunc(array("TEL", "deliv_tel01", "deliv_tel02", "deliv_tel03", TEL_ITEM_LEN), array("TEL_CHECK"));
540        return $objErr->arrErr;
541    }
542}
543?>
Note: See TracBrowser for help on using the repository browser.