Source for file LC_Page_Shopping_Deliv.php

Documentation is available at LC_Page_Shopping_Deliv.php

  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
  25. require_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.  */
  34. class 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"$wherearray($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"$wherearray($_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_PAYMENTarray()true));
  153.                 exit;
  154.             // 別のお届け先がチェックされている場合
  155.             elseif($_POST['deliv_check'>= 1{
  156.                 if (SC_Utils_Ex::sfIsInt($_POST['deliv_check'])) {
  157.                     $objQuery new SC_Query();
  158.                     $deliv_count $objQuery->count("dtb_other_deliv","customer_id=? and other_deliv_id = ?" ,array($objCustomer->getValue('customer_id')$_POST['deliv_check']));
  159.                     if ($deliv_count != 1{
  160.                         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
  161.                     }
  162.                     
  163.                     // 登録済みの別のお届け先を受注一時テーブルに書き込む
  164.                     $this->lfRegistOtherDelivData($uniqid$objCustomer$_POST['deliv_check']);
  165.                     // 正常に登録されたことを記録しておく
  166.                     $objSiteSess->setRegistFlag();
  167.                     // お支払い方法選択ページへ移動
  168.                     $this->sendRedirect($this->getLocation(URL_SHOP_PAYMENTarray()true));
  169.                     exit;
  170.                 }
  171.             }else{
  172.                 // エラーを返す
  173.                 $arrErr['deli''※ お届け先を選択してください。';
  174.             }
  175.             break;
  176.         // 前のページに戻る
  177.         case 'return':
  178.             // 確認ページへ移動
  179.             $this->sendRedirect($this->getLocation(URL_CART_TOParray()true));
  180.             exit;
  181.             break;
  182.         default:
  183.             $objQuery new SC_Query();
  184.             $where "order_temp_id = ?";
  185.             $arrRet $objQuery->select("*""dtb_order_temp"$wherearray($uniqid));
  186.             if (empty($arrRet)) $arrRet array("");
  187.             $this->objFormParam->setParam($arrRet[0]);
  188.             break;
  189.         }
  190.  
  191.         /** 表示処理 **/
  192.  
  193.         // 会員登録住所の取得
  194.         $col "name01, name02, pref, addr01, addr02";
  195.         $where "customer_id = ?";
  196.         $objQuery new SC_Query();
  197.         $arrCustomerAddr $objQuery->select($col"dtb_customer"$wherearray($_SESSION['customer']['customer_id']));
  198.         // 別のお届け先住所の取得
  199.         $col "other_deliv_id, name01, name02, pref, addr01, addr02";
  200.         $objQuery->setorder("other_deliv_id DESC");
  201.         $objOtherAddr $objQuery->select($col"dtb_other_deliv"$wherearray($_SESSION['customer']['customer_id']));
  202.         $this->arrAddr $arrCustomerAddr;
  203.         $this->tpl_addrmax count($objOtherAddr);
  204.         $cnt 1;
  205.         foreach($objOtherAddr as $val{
  206.             $this->arrAddr[$cnt$val;
  207.             $cnt++;
  208.         }
  209.  
  210.         // 入力値の取得
  211.         if (!isset($arrErr)) $arrErr array();
  212.         $this->arrForm $this->objFormParam->getFormParamList();
  213.         $this->arrErr $arrErr;
  214.  
  215.         $objView->assignobj($this);
  216.         // フレームを選択(キャンペーンページから遷移なら変更)
  217.         $objCampaignSess->pageView($objView);
  218.     }
  219.  
  220.     /**
  221.      * モバイルページを初期化する.
  222.      *
  223.      * @return void 
  224.      */
  225.     function mobileInit({
  226.         $this->init();
  227.     }
  228.  
  229.     /**
  230.      * Page のプロセス(モバイル).
  231.      *
  232.      * @return void 
  233.      */
  234.     function mobileProcess({
  235.         $objView new SC_MobileView();
  236.         $objSiteSess new SC_SiteSession();
  237.         $objCartSess new SC_CartSession();
  238.         $objCustomer new SC_Customer();
  239.         // クッキー管理クラス
  240.         $objCookie new SC_Cookie(COOKIE_EXPIRE);
  241.         // パラメータ管理クラス
  242.         $this->objFormParam = new SC_FormParam();
  243.         // パラメータ情報の初期化
  244.         $this->lfInitParam();
  245.         // POST値の取得
  246.         $this->objFormParam->setParam($_POST);
  247.  
  248.         $this->objLoginFormParam = new SC_FormParam();    // ログインフォーム用
  249.         $this->lfInitLoginFormParam();                        // 初期設定
  250.         $this->objLoginFormParam->setParam($_POST);        // POST値の取得
  251.  
  252.         // ユーザユニークIDの取得と購入状態の正当性をチェック
  253.         $uniqid SC_Utils_Ex::sfCheckNormalAccess($objSiteSess$objCartSess);
  254.         $this->tpl_uniqid $uniqid;
  255.  
  256.         if (!isset($_POST['mode'])) $_POST['mode'"";
  257.  
  258.         // ログインチェック
  259.         if($_POST['mode'!= 'login' && !$objCustomer->isLoginSuccess(true)) {
  260.             // 不正アクセスとみなす
  261.             SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR""false""true);
  262.         }
  263.  
  264.         switch($_POST['mode']{
  265.         case 'login':
  266.             $this->objLoginFormParam->toLower('login_email');
  267.             $this->arrErr $this->objLoginFormParam->checkError();
  268.             $arrForm =  $this->objLoginFormParam->getHashArray();
  269.             // クッキー保存判定
  270.             if($arrForm['login_memory'== "1" && $arrForm['login_email'!= ""{
  271.                 $objCookie->setCookie('login_email'$_POST['login_email']);
  272.             else {
  273.                 $objCookie->setCookie('login_email''');
  274.             }
  275.  
  276.             if(count($this->arrErr== 0{
  277.                 // ログイン判定
  278.                 if(!$objCustomer->getCustomerDataFromMobilePhoneIdPass($arrForm['login_pass']&&
  279.                    !$objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass']$arrForm['login_email']true)) {
  280.                     // 仮登録の判定
  281.                     $objQuery new SC_Query;
  282.                     $where "(email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0";
  283.                     $ret $objQuery->count("dtb_customer"$wherearray($arrForm['login_email']$arrForm['login_email']));
  284.  
  285.                     if($ret 0{
  286.                         SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR""false""true);
  287.                     else {
  288.                         SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR""false""true);
  289.                     }
  290.                 }
  291.             else {
  292.                 // ログインページに戻る
  293.                 $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_TOP)true);
  294.                 exit;
  295.             }
  296.  
  297.             // ログインが成功した場合は携帯端末IDを保存する。
  298.             $objCustomer->updateMobilePhoneId();
  299.  
  300.             /*
  301.              * 携帯メールアドレスが登録されていない場合は,
  302.              * 携帯メールアドレス登録画面へ遷移
  303.              */
  304.             $objMobile new SC_Helper_Mobile_Ex();
  305.             if (!$objMobile->gfIsMobileMailAddress($objCustomer->getValue('email'))) {
  306.                 if (!$objCustomer->hasValue('email_mobile')) {
  307.                     $this->sendRedirect($this->getLocation("../entry/email_mobile.php")true);
  308.                     exit;
  309.                 }
  310.             }
  311.             break;
  312.             // 削除
  313.         case 'delete':
  314.             if (SC_Utils_Ex::sfIsInt($_POST['other_deliv_id'])) {
  315.                 $objQuery new SC_Query();
  316.                 $where "other_deliv_id = ?";
  317.                 $arrRet $objQuery->delete("dtb_other_deliv"$wherearray($_POST['other_deliv_id']));
  318.                 $this->objFormParam->setValue('select_addr_id''');
  319.             }
  320.             break;
  321.             // 会員登録住所に送る
  322.         case 'customer_addr':
  323.             // お届け先がチェックされている場合には更新処理を行う
  324.             if ($_POST['deli'!= ""{
  325.                 // 会員情報の住所を受注一時テーブルに書き込む
  326.                 $this->lfRegistDelivData($uniqid$objCustomer);
  327.                 // 正常に登録されたことを記録しておく
  328.                 $objSiteSess->setRegistFlag();
  329.                 // お支払い方法選択ページへ移動
  330.                 $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT)true);
  331.                 exit;
  332.             }else{
  333.                 // エラーを返す
  334.                 $arrErr['deli''※ お届け先を選択してください。';
  335.             }
  336.             break;
  337.  
  338.             // 登録済みの別のお届け先に送る
  339.         case 'other_addr':
  340.             // お届け先がチェックされている場合には更新処理を行う
  341.             if ($_POST['deli'!= ""{
  342.                 if (SC_Utils_Ex::sfIsInt($_POST['other_deliv_id'])) {
  343.                     $objQuery new SC_Query();
  344.                     $deliv_count $objQuery->count("dtb_other_deliv","customer_id=? and other_deliv_id = ?" ,array($objCustomer->getValue('customer_id')$_POST['other_deliv_id']));
  345.                     if ($deliv_count != 1{
  346.                         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
  347.                     }
  348.                     // 登録済みの別のお届け先を受注一時テーブルに書き込む
  349.                     $this->lfRegistOtherDelivData($uniqid$objCustomer$_POST['other_deliv_id']);
  350.                     // 正常に登録されたことを記録しておく
  351.                     $objSiteSess->setRegistFlag();
  352.                     // お支払い方法選択ページへ移動
  353.                     $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT)true);
  354.                     exit;
  355.                 }
  356.             }else{
  357.                 // エラーを返す
  358.                 $arrErr['deli''※ お届け先を選択してください。';
  359.             }
  360.             break;
  361.  
  362.             // 前のページに戻る
  363.         case 'return':
  364.             // 確認ページへ移動
  365.             $this->sendRedirect($this->getLocation(MOBILE_URL_CART_TOP)true);
  366.             exit;
  367.             break;
  368.         default:
  369.             $objQuery new SC_Query();
  370.             $where "order_temp_id = ?";
  371.             $arrRet $objQuery->select("*""dtb_order_temp"$wherearray($uniqid));
  372.             $this->objFormParam->setParam($arrRet[0]);
  373.             break;
  374.         }
  375.  
  376.         /** 表示処理 **/
  377.  
  378.         // 会員登録住所の取得
  379.         $col "name01, name02, pref, addr01, addr02, zip01, zip02";
  380.         $where "customer_id = ?";
  381.         $objQuery new SC_Query();
  382.         $arrCustomerAddr $objQuery->select($col"dtb_customer"$wherearray($_SESSION['customer']['customer_id']));
  383.         // 別のお届け先住所の取得
  384.         $col "other_deliv_id, name01, name02, pref, addr01, addr02, zip01, zip02";
  385.         $objQuery->setorder("other_deliv_id DESC");
  386.         $objOtherAddr $objQuery->select($col"dtb_other_deliv"$wherearray($_SESSION['customer']['customer_id']));
  387.         $this->arrAddr $arrCustomerAddr;
  388.         $cnt 1;
  389.         foreach($objOtherAddr as $val{
  390.             $this->arrAddr[$cnt$val;
  391.             $cnt++;
  392.         }
  393.  
  394.         // 入力値の取得
  395.         if (!isset($arrErr)) $arrErr array();
  396.         $this->arrForm $this->objFormParam->getFormParamList();
  397.         $this->arrErr $arrErr;
  398.         $objView->assignobj($this);
  399.         $objView->display(SITE_FRAME);
  400.     }
  401.  
  402.     /**
  403.      * デストラクタ.
  404.      *
  405.      * @return void 
  406.      */
  407.     function destroy({
  408.         parent::destroy();
  409.     }
  410.  
  411.     /* パラメータ情報の初期化 */
  412.     function lfInitParam({
  413.         $this->objFormParam->addParam("お名前1""deliv_name01"STEXT_LEN"KVa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  414.         $this->objFormParam->addParam("お名前2""deliv_name02"STEXT_LEN"KVa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  415.         $this->objFormParam->addParam("フリガナ1""deliv_kana01"STEXT_LEN"KVCa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  416.         $this->objFormParam->addParam("フリガナ2""deliv_kana02"STEXT_LEN"KVCa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  417.         $this->objFormParam->addParam("郵便番号1""deliv_zip01"ZIP01_LEN"n"array("EXIST_CHECK""NUM_CHECK""NUM_COUNT_CHECK"));
  418.         $this->objFormParam->addParam("郵便番号2""deliv_zip02"ZIP02_LEN"n"array("EXIST_CHECK""NUM_CHECK""NUM_COUNT_CHECK"));
  419.         $this->objFormParam->addParam("都道府県""deliv_pref"INT_LEN"n"array("EXIST_CHECK""MAX_LENGTH_CHECK""NUM_CHECK"));
  420.         $this->objFormParam->addParam("住所1""deliv_addr01"STEXT_LEN"KVa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  421.         $this->objFormParam->addParam("住所2""deliv_addr02"STEXT_LEN"KVa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  422.         $this->objFormParam->addParam("電話番号1""deliv_tel01"TEL_ITEM_LEN"n"array("EXIST_CHECK""MAX_LENGTH_CHECK" ,"NUM_CHECK"));
  423.         $this->objFormParam->addParam("電話番号2""deliv_tel02"TEL_ITEM_LEN"n"array("EXIST_CHECK""MAX_LENGTH_CHECK" ,"NUM_CHECK"));
  424.         $this->objFormParam->addParam("電話番号3""deliv_tel03"TEL_ITEM_LEN"n"array("EXIST_CHECK""MAX_LENGTH_CHECK" ,"NUM_CHECK"));
  425.         $this->objFormParam->addParam("""deliv_check");
  426.     }
  427.  
  428.     function lfInitLoginFormParam({
  429.         $this->objLoginFormParam->addParam("記憶する""login_memory"INT_LEN"n"array("MAX_LENGTH_CHECK""NUM_CHECK"));
  430.         $this->objLoginFormParam->addParam("メールアドレス""login_email"STEXT_LEN"KVa"array("EXIST_CHECK""MAX_LENGTH_CHECK"));
  431.         $this->objLoginFormParam->addParam("パスワード""login_pass"STEXT_LEN"KVa"array("EXIST_CHECK""MAX_LENGTH_CHECK"));
  432.     }
  433.  
  434.     /* DBへデータの登録 */
  435.     function lfRegistNewAddrData($uniqid$objCustomer{
  436.         $arrRet $this->objFormParam->getHashArray();
  437.         $sqlval $this->objFormParam->getDbArray();
  438.         // 登録データの作成
  439.         $sqlval['deliv_check''1';
  440.         $sqlval['order_temp_id'$uniqid;
  441.         $sqlval['update_date''Now()';
  442.         $sqlval['customer_id'$objCustomer->getValue('customer_id');
  443.         $sqlval['order_birth'$objCustomer->getValue('birth');
  444.  
  445.         $objDb new SC_Helper_DB_Ex();
  446.         $objDb->sfRegistTempOrder($uniqid$sqlval);
  447.     }
  448.  
  449.     /* 会員情報の住所を一時受注テーブルへ */
  450.     function lfRegistDelivData($uniqid$objCustomer{
  451.         // 登録データの作成
  452.         $sqlval['order_temp_id'$uniqid;
  453.         $sqlval['update_date''Now()';
  454.         $sqlval['customer_id'$objCustomer->getValue('customer_id');
  455.         $sqlval['deliv_check''-1';
  456.         $sqlval['order_name01'$objCustomer->getValue('name01');
  457.         $sqlval['order_name02'$objCustomer->getValue('name02');
  458.         $sqlval['order_kana01'$objCustomer->getValue('kana01');
  459.         $sqlval['order_kana02'$objCustomer->getValue('kana02');
  460.         $sqlval['order_zip01'$objCustomer->getValue('zip01');
  461.         $sqlval['order_zip02'$objCustomer->getValue('zip02');
  462.         $sqlval['order_pref'$objCustomer->getValue('pref');
  463.         $sqlval['order_addr01'$objCustomer->getValue('addr01');
  464.         $sqlval['order_addr02'$objCustomer->getValue('addr02');
  465.         $sqlval['order_tel01'$objCustomer->getValue('tel01');
  466.         $sqlval['order_tel02'$objCustomer->getValue('tel02');
  467.         $sqlval['order_tel03'$objCustomer->getValue('tel03');
  468.         $sqlval['order_fax01'$objCustomer->getValue('fax01');
  469.         $sqlval['order_fax02'$objCustomer->getValue('fax02');
  470.         $sqlval['order_fax03'$objCustomer->getValue('fax03');
  471.         $sqlval['deliv_name01'$objCustomer->getValue('name01');
  472.         $sqlval['deliv_name02'$objCustomer->getValue('name02');
  473.         $sqlval['deliv_kana01'$objCustomer->getValue('kana01');
  474.         $sqlval['deliv_kana02'$objCustomer->getValue('kana02');
  475.         $sqlval['deliv_zip01'$objCustomer->getValue('zip01');
  476.         $sqlval['deliv_zip02'$objCustomer->getValue('zip02');
  477.         $sqlval['deliv_pref'$objCustomer->getValue('pref');
  478.         $sqlval['deliv_addr01'$objCustomer->getValue('addr01');
  479.         $sqlval['deliv_addr02'$objCustomer->getValue('addr02');
  480.         $sqlval['deliv_tel01'$objCustomer->getValue('tel01');
  481.         $sqlval['deliv_tel02'$objCustomer->getValue('tel02');
  482.         $sqlval['deliv_tel03'$objCustomer->getValue('tel03');
  483.         $sqlval['deliv_fax01'$objCustomer->getValue('fax01');
  484.         $sqlval['deliv_fax02'$objCustomer->getValue('fax02');
  485.         $sqlval['deliv_fax03'$objCustomer->getValue('fax03');
  486.  
  487.         $objDb new SC_Helper_DB_Ex();
  488.         $objDb->sfRegistTempOrder($uniqid$sqlval);
  489.     }
  490.  
  491.     /* 別のお届け先住所を一時受注テーブルへ */
  492.     function lfRegistOtherDelivData($uniqid$objCustomer$other_deliv_id{
  493.         // 登録データの作成
  494.         $sqlval['order_temp_id'$uniqid;
  495.         $sqlval['update_date''Now()';
  496.         $sqlval['customer_id'$objCustomer->getValue('customer_id');
  497.         $sqlval['order_birth'$objCustomer->getValue('birth');
  498.  
  499.         $objQuery new SC_Query();
  500.         $where "other_deliv_id = ?";
  501.         $arrRet $objQuery->select("*""dtb_other_deliv"$wherearray($other_deliv_id));
  502.  
  503.         $sqlval['deliv_check'$other_deliv_id;
  504.         $sqlval['deliv_name01'$arrRet[0]['name01'];
  505.         $sqlval['deliv_name02'$arrRet[0]['name02'];
  506.         $sqlval['deliv_kana01'$arrRet[0]['kana01'];
  507.         $sqlval['deliv_kana02'$arrRet[0]['kana02'];
  508.         $sqlval['deliv_zip01'$arrRet[0]['zip01'];
  509.         $sqlval['deliv_zip02'$arrRet[0]['zip02'];
  510.         $sqlval['deliv_pref'$arrRet[0]['pref'];
  511.         $sqlval['deliv_addr01'$arrRet[0]['addr01'];
  512.         $sqlval['deliv_addr02'$arrRet[0]['addr02'];
  513.         $sqlval['deliv_tel01'$arrRet[0]['tel01'];
  514.         $sqlval['deliv_tel02'$arrRet[0]['tel02'];
  515.         $sqlval['deliv_tel03'$arrRet[0]['tel03'];
  516.         $objDb new SC_Helper_DB_Ex();
  517.         $objDb->sfRegistTempOrder($uniqid$sqlval);
  518.     }
  519.  
  520.     /* 入力内容のチェック */
  521.     function lfCheckError({
  522.         // 入力データを渡す。
  523.         $arrRet =  $this->objFormParam->getHashArray();
  524.         $objErr new SC_CheckError($arrRet);
  525.         $objErr->arrErr $this->objFormParam->checkError();
  526.         // 複数項目チェック
  527.         if ($_POST['mode'== 'login'){
  528.             $objErr->doFunc(array("メールアドレス""login_email"STEXT_LEN)array("EXIST_CHECK"));
  529.             $objErr->doFunc(array("パスワード""login_pass"STEXT_LEN)array("EXIST_CHECK"));
  530.         }
  531.         $objErr->doFunc(array("TEL""deliv_tel01""deliv_tel02""deliv_tel03"TEL_ITEM_LEN)array("TEL_CHECK"));
  532.         return $objErr->arrErr;
  533.     }
  534. }
  535. ?>

Documentation generated on Tue, 28 Apr 2009 18:12:56 +0900 by phpDocumentor 1.4.2