Page
[ class tree: Page ] [ index: Page ] [ all elements ]

Source for file LC_Page_Shopping.php

Documentation is available at LC_Page_Shopping.php

  1. <?php
  2. /*
  3.  * This file is part of EC-CUBE
  4.  *
  5.  * Copyright(c) 2000-2010 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.php 15532 2007-08-31 14:39:46Z nanasess $
  33.  */
  34. class LC_Page_Shopping extends LC_Page {
  35.  
  36.     // {{{ properties
  37.  
  38.     /** フォームパラメータ */
  39.     var $objFormParam;
  40.  
  41.     /** 年 */
  42.     var $year;
  43.  
  44.     // }}}
  45.     // {{{ functions
  46.  
  47.     /**
  48.      * Page を初期化する.
  49.      *
  50.      * @return void 
  51.      */
  52.     function init({
  53.         parent::init();
  54.         $this->tpl_mainpage = 'shopping/index.tpl';
  55.         $this->tpl_column_num = 1;
  56.         $masterData new SC_DB_MasterData();
  57.         $this->arrPref $masterData->getMasterData("mtb_pref"array("pref_id""pref_name""rank"));
  58.         $this->arrSex $masterData->getMasterData("mtb_sex");
  59.         $this->arrJob $masterData->getMasterData("mtb_job");
  60.         $this->tpl_onload = 'fnCheckInputDeliv();';
  61.         $this->allowClientCache();
  62.     }
  63.  
  64.     /**
  65.      * Page のプロセス.
  66.      *
  67.      * @return void 
  68.      */
  69.     function process({
  70.         global $objCampaignSess;
  71.  
  72.         $conn new SC_DBConn();
  73.         $objView new SC_SiteView();
  74.         $objSiteSess new SC_SiteSession();
  75.         $objCartSess new SC_CartSession();
  76.         $objCampaignSess new SC_CampaignSession();
  77.         $objCustomer new SC_Customer();
  78.         $objCookie new SC_Cookie();
  79.         $this->objFormParam = new SC_FormParam();            // フォーム用
  80.         $this->lfInitParam();                                // パラメータ情報の初期化
  81.         $this->objFormParam->setParam($_POST);            // POST値の取得
  82.  
  83.         // ユーザユニークIDの取得と購入状態の正当性をチェック
  84.         $uniqid SC_Utils_Ex::sfCheckNormalAccess($objSiteSess$objCartSess);
  85.         $this->tpl_uniqid $uniqid;
  86.  
  87.         // ログインチェック
  88.         if($objCustomer->isLoginSuccess()) {
  89.             // すでにログインされている場合は、お届け先設定画面に転送
  90.             $this->sendRedirect($this->getLocation("./deliv.php")array());
  91.             exit;
  92.         }
  93.  
  94.         if ($_SERVER["REQUEST_METHOD"== "POST"{
  95.             if (!$this->isValidToken()) {
  96.                 SC_Utils_Ex::sfDispSiteError(PAGE_ERROR""true);
  97.             }
  98.         }
  99.  
  100.         if (!isset($_POST['mode'])) $_POST['mode'"";
  101.  
  102.         switch($_POST['mode']{
  103.         case 'nonmember_confirm':
  104.             $this->lfSetNonMember($this);
  105.             // ※breakなし
  106.         case 'confirm':
  107.             // 入力値の変換
  108.             $this->objFormParam->convParam();
  109.             $this->objFormParam->toLower('order_mail');
  110.             $this->objFormParam->toLower('order_mail_check');
  111.  
  112.             $this->arrErr $this->lfCheckError();
  113.  
  114.             // 入力エラーなし
  115.             if(count($this->arrErr== 0{
  116.                 // DBへのデータ登録
  117.                 $this->lfRegistData($uniqid);
  118.  
  119.                 // お届け先のコピー
  120.                 $this->lfCopyDeliv($uniqid$_POST);
  121.  
  122.                 // 正常に登録されたことを記録しておく
  123.                 $objSiteSess->setRegistFlag();
  124.                 // お支払い方法選択ページへ移動
  125.                 $this->sendRedirect($this->getLocation(URL_SHOP_PAYMENT));
  126.                 exit;
  127.             }
  128.  
  129.             break;
  130.         // 前のページに戻る
  131.         case 'return':
  132.             // 確認ページへ移動
  133.             $this->sendRedirect($this->getLocation(URL_CART_TOP));
  134.             exit;
  135.             break;
  136.         case 'nonmember':
  137.             $this->lfSetNonMember($this);
  138.             // ※breakなし
  139.         default:
  140.             if(isset($_GET['from']&& $_GET['from'== 'nonmember'{
  141.                 $this->lfSetNonMember($this);
  142.             }
  143.             // ユーザユニークIDの取得
  144.             $uniqid $objSiteSess->getUniqId();
  145.             $objQuery new SC_Query();
  146.             $where "order_temp_id = ?";
  147.             $arrRet $objQuery->select("*""dtb_order_temp"$wherearray($uniqid));
  148.             if (empty($arrRet)) $arrRet array(
  149.                                                 array('order_email' => "",
  150.                                                       'order_birth' => ""));
  151.  
  152.             // DB値の取得
  153.             $this->objFormParam->setParam($arrRet[0]);
  154.             $this->objFormParam->setValue('order_email_check'$arrRet[0]['order_email']);
  155.             $this->objFormParam->setDBDate($arrRet[0]['order_birth']);
  156.             break;
  157.         }
  158.  
  159.         // クッキー判定
  160.         $this->tpl_login_email = $objCookie->getCookie('login_email');
  161.         if($this->tpl_login_email != ""{
  162.             $this->tpl_login_memory "1";
  163.         }
  164.  
  165.         // 選択用日付の取得
  166.         $objDate new SC_Date(START_BIRTH_YEAR);
  167.         $this->arrYear $objDate->getYear(''1950);    // 日付プルダウン設定
  168.         $this->arrMonth $objDate->getMonth();
  169.         $this->arrDay $objDate->getDay();
  170.  
  171.         if($this->year == ''{
  172.             $this->year = '----';
  173.         }
  174.  
  175.         // 入力値の取得
  176.         $this->arrForm $this->objFormParam->getFormParamList();
  177.  
  178.         if(empty($this->arrForm['year']['value'])){
  179.             $this->arrForm['year']['value''----';
  180.         }
  181.  
  182.         $this->transactionid = $this->getToken();
  183.         $objView->assignobj($this);
  184.         // フレームを選択(キャンペーンページから遷移なら変更)
  185.         $objCampaignSess->pageView($objView);
  186.     }
  187.  
  188.     /**
  189.      * モバイルページを初期化する.
  190.      *
  191.      * @return void 
  192.      */
  193.     function mobileInit({
  194.         $this->init();
  195.         $this->tpl_mainpage = MOBILE_TEMPLATE_DIR 'shopping/index.tpl';
  196.     }
  197.  
  198.     /**
  199.      * Page のプロセス(モバイル).
  200.      *
  201.      * @return void 
  202.      */
  203.     function mobileProcess({
  204.         $conn new SC_DBConn();
  205.         $objView new SC_MobileView();
  206.         $objSiteSess new SC_SiteSession();
  207.         $objCartSess new SC_CartSession();
  208.         $objCustomer new SC_Customer();
  209.         $objCookie new SC_Cookie();
  210.         $this->objFormParam = new SC_FormParam();            // フォーム用
  211.         $helperMobile new SC_Helper_Mobile_Ex();
  212.         $this->lfInitParam();                                // パラメータ情報の初期化
  213.         $this->objFormParam->setParam($_POST);            // POST値の取得
  214.  
  215.         // ユーザユニークIDの取得と購入状態の正当性をチェック
  216.         $uniqid SC_Utils_Ex::sfCheckNormalAccess($objSiteSess$objCartSess);
  217.  
  218.         $this->tpl_uniqid $uniqid;
  219.  
  220.         // ログインチェック
  221.         if($objCustomer->isLoginSuccess(true)) {
  222.             // すでにログインされている場合は、お届け先設定画面に転送
  223.             $this->sendRedirect($this->getLocation('./deliv.php')true);
  224.             exit;
  225.         }
  226.  
  227.         // 携帯端末IDが一致する会員が存在するかどうかをチェックする。
  228.         $this->tpl_valid_phone_id $objCustomer->checkMobilePhoneId();
  229.  
  230.         if (!isset($_POST['mode'])) $_POST['mode'"";
  231.  
  232.         switch($_POST['mode']{
  233.         case 'nonmember_confirm':
  234.             $this->lfSetNonMember($this);
  235.             // ※breakなし
  236.         case 'confirm':
  237.             // 入力値の変換
  238.             $this->objFormParam->convParam();
  239.             $this->objFormParam->toLower('order_mail');
  240.             $this->objFormParam->toLower('order_mail_check');
  241.  
  242.             $this->arrErr $this->lfCheckError();
  243.  
  244.             // 入力エラーなし
  245.             if(count($this->arrErr== 0{
  246.                 // DBへのデータ登録
  247.                 $this->lfRegistData($uniqid);
  248.  
  249.                 // お届け先のコピー
  250.                 $this->lfCopyDeliv($uniqid$_POST);
  251.  
  252.                 // 正常に登録されたことを記録しておく
  253.                 $objSiteSess->setRegistFlag();
  254.                 // お支払い方法選択ページへ移動
  255.                 $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT)true);
  256.                 exit;
  257.             }
  258.  
  259.             break;
  260.             // 前のページに戻る
  261.         case 'return':
  262.             // 確認ページへ移動
  263.             $this->sendRedirect($this->getLocation(MOBILE_URL_CART_TOP)true);
  264.             exit;
  265.             break;
  266.         case 'nonmember':
  267.             $this->lfSetNonMember($this);
  268.             // ※breakなし
  269.         default:
  270.             if($_GET['from'== 'nonmember'{
  271.                 $this->lfSetNonMember($this);
  272.             }
  273.             // ユーザユニークIDの取得
  274.             $uniqid $objSiteSess->getUniqId();
  275.             $objQuery new SC_Query();
  276.             $where "order_temp_id = ?";
  277.             $arrRet $objQuery->select("*""dtb_order_temp"$wherearray($uniqid));
  278.  
  279.             if (empty($arrRet)) $arrRet array(
  280.                                                 array('order_email' => "",
  281.                                                       'order_birth' => ""));
  282.  
  283.             // DB値の取得
  284.             $this->objFormParam->setParam($arrRet[0]);
  285.             $this->objFormParam->setValue('order_email_check'$arrRet[0]['order_email']);
  286.             $this->objFormParam->setDBDate($arrRet[0]['order_birth']);
  287.             break;
  288.         }
  289.  
  290.         // クッキー判定
  291.         $this->tpl_login_email = $objCookie->getCookie('login_email');
  292.         if($this->tpl_login_email != ""{
  293.             $this->tpl_login_memory "1";
  294.         }
  295.  
  296.         // 選択用日付の取得
  297.         $objDate new SC_Date(START_BIRTH_YEAR);
  298.         $this->arrYear $objDate->getYear(''1950);    // 日付プルダウン設定
  299.         $this->arrMonth $objDate->getMonth();
  300.         $this->arrDay $objDate->getDay();
  301.  
  302.         if($this->year == ''{
  303.             $this->year = '----';
  304.         }
  305.  
  306.         // 入力値の取得
  307.         $this->arrForm $this->objFormParam->getFormParamList();
  308.  
  309.         if($this->arrForm['year']['value'== ""){
  310.             $this->arrForm['year']['value''----';
  311.         }
  312.  
  313.         $objView->assignobj($this);
  314.         $objView->display(SITE_FRAME);
  315.     }
  316.  
  317.     /**
  318.      * デストラクタ.
  319.      *
  320.      * @return void 
  321.      */
  322.     function destroy({
  323.         parent::destroy();
  324.     }
  325.  
  326.     /* 非会員入力ページのセット */
  327.     function lfSetNonMember(&$objPage{
  328.         $objPage->tpl_mainpage 'shopping/nonmember_input.tpl';
  329.     }
  330.  
  331.     /* パラメータ情報の初期化 */
  332.     function lfInitParam({
  333.         $this->objFormParam->addParam("お名前(姓)""order_name01"STEXT_LEN"KVa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  334.         $this->objFormParam->addParam("お名前(名)""order_name02"STEXT_LEN"KVa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  335.         $this->objFormParam->addParam("フリガナ(セイ)""order_kana01"STEXT_LEN"KVCa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  336.         $this->objFormParam->addParam("フリガナ(メイ)""order_kana02"STEXT_LEN"KVCa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  337.         $this->objFormParam->addParam("郵便番号1""order_zip01"ZIP01_LEN"n"array("EXIST_CHECK""NUM_CHECK""NUM_COUNT_CHECK"));
  338.         $this->objFormParam->addParam("郵便番号2""order_zip02"ZIP02_LEN"n"array("EXIST_CHECK""NUM_CHECK""NUM_COUNT_CHECK"));
  339.         $this->objFormParam->addParam("都道府県""order_pref"INT_LEN"n"array("EXIST_CHECK""MAX_LENGTH_CHECK""NUM_CHECK"));
  340.         $this->objFormParam->addParam("住所1""order_addr01"MTEXT_LEN"KVa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  341.         $this->objFormParam->addParam("住所2""order_addr02"MTEXT_LEN"KVa"array("EXIST_CHECK""SPTAB_CHECK""MAX_LENGTH_CHECK"));
  342.         $this->objFormParam->addParam("電話番号1""order_tel01"TEL_ITEM_LEN"n"array("EXIST_CHECK""MAX_LENGTH_CHECK"));
  343.         $this->objFormParam->addParam("電話番号2""order_tel02"TEL_ITEM_LEN"n"array("EXIST_CHECK""MAX_LENGTH_CHECK"));
  344.         $this->objFormParam->addParam("電話番号3""order_tel03"TEL_ITEM_LEN"n"array("EXIST_CHECK""MAX_LENGTH_CHECK"));
  345.         $this->objFormParam->addParam("FAX番号1""order_fax01"TEL_ITEM_LEN"n"array("MAX_LENGTH_CHECK"));
  346.         $this->objFormParam->addParam("FAX番号2""order_fax02"TEL_ITEM_LEN"n"array("MAX_LENGTH_CHECK"));
  347.         $this->objFormParam->addParam("FAX番号3""order_fax03"TEL_ITEM_LEN"n"array("MAX_LENGTH_CHECK"));
  348.         $this->objFormParam->addParam("メールアドレス""order_email"STEXT_LEN"KVa"array("EXIST_CHECK""SPTAB_CHECK""NO_SPTAB""MAX_LENGTH_CHECK""EMAIL_CHECK""EMAIL_CHAR_CHECK"));
  349.         $this->objFormParam->addParam("メールアドレス(確認)""order_email_check"STEXT_LEN"KVa"array("EXIST_CHECK""SPTAB_CHECK""NO_SPTAB""MAX_LENGTH_CHECK""EMAIL_CHECK""EMAIL_CHAR_CHECK")""false);
  350.         $this->objFormParam->addParam("年""year"INT_LEN"n"array("MAX_LENGTH_CHECK")""false);
  351.         $this->objFormParam->addParam("月""month"INT_LEN"n"array("MAX_LENGTH_CHECK")""false);
  352.         $this->objFormParam->addParam("日""day"INT_LEN"n"array("MAX_LENGTH_CHECK")""false);
  353.         $this->objFormParam->addParam("性別""order_sex"INT_LEN"n"array("EXIST_CHECK""MAX_LENGTH_CHECK""NUM_CHECK"));
  354.         $this->objFormParam->addParam("職業""order_job"INT_LEN"n"array("MAX_LENGTH_CHECK""NUM_CHECK"));
  355.         $this->objFormParam->addParam("別のお届け先""deliv_check"INT_LEN"n"array("MAX_LENGTH_CHECK""NUM_CHECK"));
  356.         $this->objFormParam->addParam("お名前(姓)""deliv_name01"STEXT_LEN"KVa"array("SPTAB_CHECK""MAX_LENGTH_CHECK"));
  357.         $this->objFormParam->addParam("お名前(名)""deliv_name02"STEXT_LEN"KVa"array("SPTAB_CHECK""MAX_LENGTH_CHECK"));
  358.         $this->objFormParam->addParam("フリガナ(セイ)""deliv_kana01"STEXT_LEN"KVCa"array("SPTAB_CHECK""MAX_LENGTH_CHECK"));
  359.         $this->objFormParam->addParam("フリガナ(メイ)""deliv_kana02"STEXT_LEN"KVCa"array("SPTAB_CHECK""MAX_LENGTH_CHECK"));
  360.         $this->objFormParam->addParam("郵便番号1""deliv_zip01"ZIP01_LEN"n"array("NUM_CHECK""NUM_COUNT_CHECK"));
  361.         $this->objFormParam->addParam("郵便番号2""deliv_zip02"ZIP02_LEN"n"array("NUM_CHECK""NUM_COUNT_CHECK"));
  362.         $this->objFormParam->addParam("都道府県""deliv_pref"INT_LEN"n"array("MAX_LENGTH_CHECK""NUM_CHECK"));
  363.         $this->objFormParam->addParam("住所1""deliv_addr01"MTEXT_LEN"KVa"array("SPTAB_CHECK""MAX_LENGTH_CHECK"));
  364.         $this->objFormParam->addParam("住所2""deliv_addr02"MTEXT_LEN"KVa"array("SPTAB_CHECK""MAX_LENGTH_CHECK"));
  365.         $this->objFormParam->addParam("電話番号1""deliv_tel01"TEL_ITEM_LEN"n"array("MAX_LENGTH_CHECK"));
  366.         $this->objFormParam->addParam("電話番号2""deliv_tel02"TEL_ITEM_LEN"n"array("MAX_LENGTH_CHECK"));
  367.         $this->objFormParam->addParam("電話番号3""deliv_tel03"TEL_ITEM_LEN"n"array("MAX_LENGTH_CHECK"));
  368.         $this->objFormParam->addParam("メールマガジン""mail_flag"INT_LEN"n"array("MAX_LENGTH_CHECK""NUM_CHECK")1);
  369.     }
  370.  
  371.     /* DBへデータの登録 */
  372.     function lfRegistData($uniqid{
  373.         $arrRet $this->objFormParam->getHashArray();
  374.         $sqlval $this->objFormParam->getDbArray();
  375.         // 登録データの作成
  376.         $sqlval['order_temp_id'$uniqid;
  377.         $sqlval['order_birth'SC_Utils_Ex::sfGetTimestamp($arrRet['year']$arrRet['month']$arrRet['day']);
  378.         $sqlval['update_date''Now()';
  379.         $sqlval['customer_id''0';
  380.  
  381.         // 既存データのチェック
  382.         $objQuery new SC_Query();
  383.         $where "order_temp_id = ?";
  384.         $cnt $objQuery->count("dtb_order_temp"$wherearray($uniqid));
  385.         // 既存データがない場合
  386.         if ($cnt == 0{
  387.             $sqlval['create_date''Now()';
  388.             $objQuery->insert("dtb_order_temp"$sqlval);
  389.         else {
  390.             $objQuery->update("dtb_order_temp"$sqlval$wherearray($uniqid));
  391.         }
  392.  
  393.     }
  394.  
  395.     /* 入力内容のチェック */
  396.     function lfCheckError({
  397.         // 入力データを渡す。
  398.         $arrRet $this->objFormParam->getHashArray();
  399.         $objErr new SC_CheckError($arrRet);
  400.         $objErr->arrErr $this->objFormParam->checkError();
  401.  
  402.         // 別のお届け先チェック
  403.         if(isset($_POST['deliv_check']&& $_POST['deliv_check'== "1"{
  404.             $objErr->doFunc(array("お名前(姓)""deliv_name01")array("EXIST_CHECK"));
  405.             $objErr->doFunc(array("お名前(名)""deliv_name02")array("EXIST_CHECK"));
  406.             $objErr->doFunc(array("フリガナ(セイ)""deliv_kana01")array("EXIST_CHECK"));
  407.             $objErr->doFunc(array("フリガナ(メイ)""deliv_kana02")array("EXIST_CHECK"));
  408.             $objErr->doFunc(array("郵便番号1""deliv_zip01")array("EXIST_CHECK"));
  409.             $objErr->doFunc(array("郵便番号2""deliv_zip02")array("EXIST_CHECK"));
  410.             $objErr->doFunc(array("都道府県""deliv_pref")array("EXIST_CHECK"));
  411.             $objErr->doFunc(array("住所1""deliv_addr01")array("EXIST_CHECK"));
  412.             $objErr->doFunc(array("住所2""deliv_addr02")array("EXIST_CHECK"));
  413.             $objErr->doFunc(array("電話番号1""deliv_tel01")array("EXIST_CHECK"));
  414.             $objErr->doFunc(array("電話番号2""deliv_tel02")array("EXIST_CHECK"));
  415.             $objErr->doFunc(array("電話番号3""deliv_tel03")array("EXIST_CHECK"));
  416.         }
  417.  
  418.         // 複数項目チェック
  419.         $objErr->doFunc(array("TEL""order_tel01""order_tel02""order_tel03"TEL_ITEM_LEN)array("TEL_CHECK"));
  420.         $objErr->doFunc(array("FAX""order_fax01""order_fax02""order_fax03"TEL_ITEM_LEN)array("TEL_CHECK"));
  421.         $objErr->doFunc(array("郵便番号""order_zip01""order_zip02")array("ALL_EXIST_CHECK"));
  422.         $objErr->doFunc(array("TEL""deliv_tel01""deliv_tel02""deliv_tel03"TEL_ITEM_LEN)array("TEL_CHECK"));
  423.         $objErr->doFunc(array("FAX""deliv_fax01""deliv_fax02""deliv_fax03"TEL_ITEM_LEN)array("TEL_CHECK"));
  424.         $objErr->doFunc(array("郵便番号""deliv_zip01""deliv_zip02")array("ALL_EXIST_CHECK"));
  425.         $objErr->doFunc(array("生年月日""year""month""day")array("CHECK_DATE"));
  426.         $objErr->doFunc(array("メールアドレス""メールアドレス(確認)""order_email""order_email_check")array("EQUAL_CHECK"));
  427.  
  428.         //既存メールアドレスでの登録不可(購入時強制会員登録が有効の場合のみ)
  429.         if (PURCHASE_CUSTOMER_REGIST == '1' && strlen($arrRet["order_email"]0{
  430.             $array['email'strtolower($arrRet['order_email']);
  431.             $objQuery new SC_Query();
  432.             $arrEmailCheck $objQuery->select("email, update_date, del_flg""dtb_customer","email = ? OR email_mobile = ? ORDER BY del_flg"array($array["email"]$array["email"]));
  433.  
  434.             if(!empty($arrEmailCheck)) {
  435.                 if($arrEmailCheck[0]['del_flg'!= '1'{
  436.                     // 会員である場合
  437.                     $objErr->arrErr["order_email".= "※ すでに会員登録で使用されているメールアドレスです。<br />";
  438.                 else {
  439.                     // 退会した会員である場合
  440.                     $leave_time SC_Utils_Ex::sfDBDatetoTime($arrEmailCheck[0]['update_date']);
  441.                     $now_time time();
  442.                     $pass_time $now_time $leave_time;
  443.                     // 退会から何時間-経過しているか判定する。
  444.                     $limit_time ENTRY_LIMIT_HOUR 3600;
  445.                     if($pass_time $limit_time{
  446.                         $objErr->arrErr["order_email".= "※ 退会から一定期間の間は、同じメールアドレスを使用することはできません。<br />";
  447.                     }
  448.                 }
  449.             }
  450.         }
  451.  
  452.         return $objErr->arrErr;
  453.     }
  454.  
  455.     // 受注一時テーブルのお届け先をコピーする
  456.     function lfCopyDeliv($uniqid$arrData{
  457.         $objQuery new SC_Query();
  458.  
  459.         // 別のお届け先を指定していない場合、お届け先に登録住所をコピーする。
  460.         if($arrData["deliv_check"!= "1"{
  461.             $sqlval['deliv_name01'$arrData['order_name01'];
  462.             $sqlval['deliv_name02'$arrData['order_name02'];
  463.             $sqlval['deliv_kana01'$arrData['order_kana01'];
  464.             $sqlval['deliv_kana02'$arrData['order_kana02'];
  465.             $sqlval['deliv_pref'$arrData['order_pref'];
  466.             $sqlval['deliv_zip01'$arrData['order_zip01'];
  467.             $sqlval['deliv_zip02'$arrData['order_zip02'];
  468.             $sqlval['deliv_addr01'$arrData['order_addr01'];
  469.             $sqlval['deliv_addr02'$arrData['order_addr02'];
  470.             $sqlval['deliv_tel01'$arrData['order_tel01'];
  471.             $sqlval['deliv_tel02'$arrData['order_tel02'];
  472.             $sqlval['deliv_tel03'$arrData['order_tel03'];
  473.             $where "order_temp_id = ?";
  474.             $objQuery->update("dtb_order_temp"$sqlval$wherearray($uniqid));
  475.         }
  476.     }
  477. }
  478. ?>

Documentation generated on Fri, 24 Feb 2012 13:59:48 +0900 by Seasoft