/**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objSubView = new SC_MobileView();
     $this->lfGetMainCat(true, $this);
     $objSubView->assignobj($this);
     $objSubView->display($this->tpl_mainpage);
 }
示例#2
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     $objView = new SC_MobileView();
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
示例#3
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_MobileView();
     // レイアウトデザインを取得
     //$objHelper = new SC_Helper_PageLayout_Ex();
     //$objHelper->sfGetPageLayout($this, false, DEF_LAYOUT);
     $objView->assignobj($this);
     $objView->display($this->tpl_mainpage);
 }
示例#4
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $conn = new SC_DBConn();
     $objCustomer = new SC_Customer();
     $objView = new SC_MobileView();
     $objView->assign("isLogin", $objCustomer->isLoginSuccess(true));
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     // 利用規約を取得する。
     $this->lfGetKiyaku(intval(@$_GET['page']), $this);
     $objView = new SC_MobileView();
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     // カテゴリー情報を取得する。
     $this->lfGetCategories(@$_GET['category_id'], true, $this);
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     if (defined("MOBILE_SITE") && MOBILE_SITE) {
         $objSubView = new SC_SiteView();
     } else {
         $objSubView = new SC_MobileView();
     }
     //新着情報取得
     $this->arrNews = $this->lfGetNews();
     $objSubView->assignobj($this);
     $objSubView->display($this->tpl_mainpage);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objCustomer = new SC_Customer();
     $objFormParam = new SC_FormParam();
     if (isset($_SESSION['mobile']['kara_mail_from'])) {
         $_SERVER['REQUEST_METHOD'] = 'POST';
         $_POST['email_mobile'] = $_SESSION['mobile']['kara_mail_from'];
     }
     $this->lfInitParam($objFormParam);
     if ($_SERVER['REQUEST_METHOD'] == 'POST') {
         $objFormParam->setParam($_POST);
         $objFormParam->convParam();
         $this->arrErr = $this->lfCheckError($objFormParam, $objCustomer);
         if (empty($this->arrErr)) {
             $this->lfRegister($objFormParam, $objCustomer);
             $this->tpl_mainpage = 'entry/email_mobile_complete.tpl';
             $this->tpl_title = '携帯メール登録完了';
         }
     }
     // 空メール用のトークンを作成する。
     if (MOBILE_USE_KARA_MAIL) {
         $objMobile = new SC_Helper_Mobile_Ex();
         $token = $objMobile->gfPrepareKaraMail('entry/email_mobile.php');
         if ($token !== false) {
             $this->tpl_kara_mail_to = MOBILE_KARA_MAIL_ADDRESS_USER . MOBILE_KARA_MAIL_ADDRESS_DELIMITER . 'entry_' . $token . '@' . MOBILE_KARA_MAIL_ADDRESS_DOMAIN;
         }
     }
     $this->tpl_name = $objCustomer->getValue('name01');
     $this->arrForm = $objFormParam->getFormParamList();
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objQuery = new SC_Query();
     $objCustomer = new SC_Customer();
     $objDb = new SC_Helper_DB_Ex();
     //不正アクセス判定
     $from = "dtb_order";
     $where = "del_flg = 0 AND customer_id = ? AND order_id = ? ";
     $arrval = array($objCustomer->getValue('customer_id'), $_POST['order_id']);
     //DBに情報があるか判定
     $cnt = $objQuery->count($from, $where, $arrval);
     //ログインしていない、またはDBに情報が無い場合
     if (!$objCustomer->isLoginSuccess(true) or $cnt == 0) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
     } else {
         //受注詳細データの取得
         $this->arrDisp = $this->lfGetOrderData($_POST['order_id']);
         // 支払い方法の取得
         $this->arrPayment = $objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method");
         // 配送時間の取得
         $arrRet = $objDb->sfGetDelivTime($this->arrDisp['payment_id']);
         $this->arrDelivTime = SC_Utils_Ex::sfArrKeyValue($arrRet, 'time_id', 'deliv_time');
         //マイページトップ顧客情報表示用
         $this->CustomerName1 = $objCustomer->getvalue('name01');
         $this->CustomerName2 = $objCustomer->getvalue('name02');
         $this->CustomerPoint = $objCustomer->getvalue('point');
     }
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objQuery = new SC_Query();
     // secret_keyの取得
     $key = $_GET['id'];
     if (empty($key) or !$this->lfExistKey($key, $objQuery)) {
         SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, "", false, "", true);
     } else {
         $this->lfChangeData($key, $objQuery);
     }
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     $objView = new SC_MobileView();
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
示例#11
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     switch (@$_GET['page']) {
         case '1':
         case '2':
         case '3':
         case '4':
             $this->tpl_mainpage = 'guide/usage' . $_GET['page'] . '.tpl';
             break;
     }
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     $objView = new SC_MobileView();
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objCustomer = new SC_Customer();
     //マイページトップ顧客情報表示用
     $this->CustomerName1 = $objCustomer->getvalue('name01');
     $this->CustomerName2 = $objCustomer->getvalue('name02');
     $this->CustomerPoint = $objCustomer->getvalue('point');
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objConn = new SC_DbConn();
     $this->arrForm = $_POST;
     // 登録
     if (isset($_REQUEST['btnRegist'])) {
         $this->arrErr = $this->lfMailErrorCheck($this->arrForm, "regist", $objConn);
         // エラーがなければ
         if (count($this->arrErr) == 0) {
             // 確認
             $this->arrForm['kind'] = 'メルマガ登録';
             $this->arrForm['type'] = 'regist';
             $this->arrForm['mail'] = $this->arrForm['regist'];
         } else {
             $this->tpl_mainpage = 'magazine/index.tpl';
             $this->tpl_title = 'メルマガ登録・解除';
         }
         // 解除
     } elseif (isset($_REQUEST['btnCancel'])) {
         $this->arrErr = $this->lfMailErrorCheck($this->arrForm, "cancel", $objConn);
         // エラーがなければ
         if (count($this->arrErr) == 0) {
             // 確認
             $this->arrForm['kind'] = 'メルマガ解除';
             $this->arrForm['type'] = 'cancel';
             $this->arrForm['mail'] = $this->arrForm['cancel'];
         } else {
             $this->tpl_mainpage = 'magazine/index.tpl';
             $this->tpl_title = 'メルマガ登録・解除';
         }
         // 完了
     } elseif ($_REQUEST['mode'] == 'regist' or $_REQUEST['mode'] == 'cancel') {
         $objMailText = new SC_MobileView();
         $helperMail = new SC_Helper_Mail_Ex();
         $objQuery = new SC_Query();
         // 登録
         if ($_REQUEST['mode'] == 'regist') {
             $uniqId = $this->lfRegistData($_POST["email"], $objConn);
             $subject = $helperMail->fMakesubject($objQuery, $objMailText, $this, 'メルマガ登録のご確認');
             // 解除
         } elseif ($_REQUEST['mode'] == 'cancel') {
             $uniqId = $this->lfGetSecretKey($_POST["email"], $objConn);
             $subject = $helperMail->sfMakesubject($objQuery, $objMailText, $this, 'メルマガ解除のご確認');
         }
         $objDb = new SC_Helper_DB_Ex();
         $CONF = $objDb->sf_getBasisData();
         $this->CONF = $CONF;
         $this->tpl_url = SC_Utils_Ex::gfAddSessionId(MOBILE_SSL_URL . "magazine/" . $_REQUEST['mode'] . ".php?id=" . $uniqId);
         $objMailText->assignobj($this);
         $toCustomerMail = $objMailText->fetch("mail_templates/mailmagazine_" . $_REQUEST['mode'] . ".tpl");
         $objMail = new SC_SendMail();
         $objMail->setItem('', $subject, $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email03"], $CONF["email04"], $CONF["email04"], $CONF["email01"]);
         // 宛先の設定
         $objMail->setTo($_POST["email"], $_POST["email"]);
         $objMail->sendMail();
         // 完了ページに移動させる。
         $this->sendRedirect($this->getLocation("./complete.php", array(session_name() => session_id())));
         exit;
     } else {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
     }
     $objView = new SC_MobileView();
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
示例#14
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
示例#15
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     //---- ページ初期設定
     $objDb = new SC_Helper_DB_Ex();
     $objMobile = new SC_Helper_Mobile_Ex();
     $CONF = $objDb->sf_getBasisData();
     // 店舗基本情報
     $objConn = new SC_DbConn();
     $objView = new SC_MobileView();
     $objCustomer = new SC_Customer();
     $objDate = new SC_Date(START_BIRTH_YEAR, date("Y", strtotime("now")));
     // 空メール
     if (isset($_SESSION['mobile']['kara_mail_from'])) {
         $_POST['email'] = $_SESSION['mobile']['kara_mail_from'];
         $this->tpl_kara_mail_from = $_POST['email'];
     } elseif (MOBILE_USE_KARA_MAIL) {
         $token = $objMobile->gfPrepareKaraMail('entry/index.php');
         if ($token !== false) {
             $this->tpl_mainpage = 'entry/mail.tpl';
             $this->tpl_title = '会員登録(空メール)';
             $this->tpl_kara_mail_to = MOBILE_KARA_MAIL_ADDRESS_USER . MOBILE_KARA_MAIL_ADDRESS_DELIMITER . 'entry_' . $token . '@' . MOBILE_KARA_MAIL_ADDRESS_DOMAIN;
             $this->tpl_from_address = $CONF['email03'];
         }
     }
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     //---- 登録用カラム配列
     $arrRegistColumn = array(array("column" => "name01", "convert" => "aKV"), array("column" => "name02", "convert" => "aKV"), array("column" => "kana01", "convert" => "CKV"), array("column" => "kana02", "convert" => "CKV"), array("column" => "zip01", "convert" => "n"), array("column" => "zip02", "convert" => "n"), array("column" => "pref", "convert" => "n"), array("column" => "addr01", "convert" => "aKV"), array("column" => "addr02", "convert" => "aKV"), array("column" => "email", "convert" => "a"), array("column" => "email2", "convert" => "a"), array("column" => "email_mobile", "convert" => "a"), array("column" => "email_mobile2", "convert" => "a"), array("column" => "tel01", "convert" => "n"), array("column" => "tel02", "convert" => "n"), array("column" => "tel03", "convert" => "n"), array("column" => "fax01", "convert" => "n"), array("column" => "fax02", "convert" => "n"), array("column" => "fax03", "convert" => "n"), array("column" => "sex", "convert" => "n"), array("column" => "job", "convert" => "n"), array("column" => "birth", "convert" => "n"), array("column" => "reminder", "convert" => "n"), array("column" => "reminder_answer", "convert" => "aKV"), array("column" => "password", "convert" => "a"), array("column" => "password02", "convert" => "a"), array("column" => "mailmaga_flg", "convert" => "n"));
     //---- 登録除外用カラム配列
     $arrRejectRegistColumn = array("year", "month", "day", "email02", "email_mobile02", "password02");
     if ($_SERVER["REQUEST_METHOD"] == "POST") {
         //-- POSTデータの引き継ぎ
         $this->arrForm = $_POST;
         if (isset($this->arrForm['year']) && $this->arrForm['year'] == '----') {
             $this->arrForm['year'] = '';
         }
         $this->arrForm['email'] = strtolower($this->arrForm['email']);
         // emailはすべて小文字で処理
         //-- 入力データの変換
         $this->arrForm = $this->lfConvertParam($this->arrForm, $arrRegistColumn);
         // 戻るボタン用処理
         if (!empty($_POST["return"])) {
             switch ($_POST["mode"]) {
                 case "complete":
                     $_POST["mode"] = "set3";
                     break;
                 case "confirm":
                     $_POST["mode"] = "set2";
                     break;
                 default:
                     $_POST["mode"] = "set1";
                     break;
             }
         }
         //-- 入力エラーチェック
         if ($_POST["mode"] == "set1") {
             $this->arrErr = $this->lfErrorCheck1($this->arrForm);
             $this->tpl_mainpage = 'entry/index.tpl';
             $this->tpl_title = '会員登録(1/3)';
         } elseif ($_POST["mode"] == "set2") {
             $this->arrErr = $this->lfErrorCheck2($this->arrForm);
             $this->tpl_mainpage = 'entry/set1.tpl';
             $this->tpl_title = '会員登録(2/3)';
         } else {
             $this->arrErr = $this->lfErrorCheck3($this->arrForm);
             $this->tpl_mainpage = 'entry/set2.tpl';
             $this->tpl_title = '会員登録(3/3)';
         }
         foreach ($this->arrForm as $key => $val) {
             $this->{$key} = $val;
         }
         if ($this->arrErr || !empty($_POST["return"])) {
             // 入力エラーのチェック
             //-- データの設定
             if ($_POST["mode"] == "set1") {
                 $checkVal = array("email", "password", "reminder", "reminder_answer", "name01", "name02", "kana01", "kana02");
             } elseif ($_POST["mode"] == "set2") {
                 $checkVal = array("sex", "year", "month", "day", "zip01", "zip02");
             } else {
                 $checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03", "mailmaga_flg");
             }
             foreach ($this->arrForm as $key => $val) {
                 if ($key != "mode" && $key != "submit" && $key != "return" && $key != session_name() && !in_array($key, $checkVal)) {
                     $this->list_data[$key] = $val;
                 }
             }
         } else {
             //-- テンプレート設定
             if ($_POST["mode"] == "set1") {
                 $this->tpl_mainpage = 'entry/set1.tpl';
                 $this->tpl_title = '会員登録(2/3)';
             } elseif ($_POST["mode"] == "set2") {
                 $this->tpl_mainpage = 'entry/set2.tpl';
                 $this->tpl_title = '会員登録(3/3)';
                 if (@$this->arrForm['pref'] == "" && @$this->arrForm['addr01'] == "" && @$this->arrForm['addr02'] == "") {
                     $address = $this->lfGetAddress($_REQUEST['zip01'] . $_REQUEST['zip02']);
                     $this->pref = @$address[0]['state'];
                     $this->addr01 = @$address[0]['city'] . @$address[0]['town'];
                 }
             } elseif ($_POST["mode"] == "confirm") {
                 //パスワード表示
                 $passlen = strlen($this->arrForm['password']);
                 $this->passlen = $this->lfPassLen($passlen);
                 //メール受け取り
                 if (!isset($this->arrForm['mailmaga_flg'])) {
                     $this->arrForm['mailmaga_flg'] = "";
                 }
                 if (strtolower($this->arrForm['mailmaga_flg']) == "on") {
                     $this->arrForm['mailmaga_flg'] = "2";
                 } else {
                     $this->arrForm['mailmaga_flg'] = "3";
                 }
                 $this->tpl_mainpage = 'entry/confirm.tpl';
                 $this->tpl_title = '会員登録(確認ページ)';
             }
             //-- データ設定
             unset($this->list_data);
             if ($_POST["mode"] == "set1") {
                 $checkVal = array("sex", "year", "month", "day", "zip01", "zip02");
             } elseif ($_POST["mode"] == "set2") {
                 $checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03", "mailmaga_flg");
             } else {
                 $checkVal = array();
             }
             foreach ($this->arrForm as $key => $val) {
                 if ($key != "mode" && $key != "submit" && $key != "confirm" && $key != "return" && $key != session_name() && !in_array($key, $checkVal)) {
                     $this->list_data[$key] = $val;
                 }
             }
             //-- 仮登録と完了画面
             if ($_POST["mode"] == "complete") {
                 // 確認画面で再度エラーチェックを行う。(画面1)
                 $arrErr = $this->lfErrorCheck1($this->arrForm);
                 if (count($arrErr) > 0) {
                     $this->tpl_mainpage = 'entry/index.tpl';
                     $this->tpl_title = '会員登録(1/3)';
                     $this->arrErr = $arrErr;
                     //---- ページ表示
                     $objView->assignobj($this);
                     $objView->display(SITE_FRAME);
                     exit;
                 }
                 // 確認画面で再度エラーチェックを行う。(画面2)
                 $arrErr = $this->lfErrorCheck2($this->arrForm);
                 if (count($arrErr) > 0) {
                     $this->tpl_mainpage = 'entry/set1.tpl';
                     $this->tpl_title = '会員登録(2/3)';
                     $this->arrErr = $arrErr;
                     //---- ページ表示
                     $objView->assignobj($this);
                     $objView->display(SITE_FRAME);
                     exit;
                 }
                 // 確認画面で再度エラーチェックを行う。(画面3)
                 $arrErr = $this->lfErrorCheck3($this->arrForm);
                 if (count($arrErr) > 0) {
                     $this->tpl_mainpage = 'entry/set2.tpl';
                     $this->tpl_title = '会員登録(3/3)';
                     $this->arrErr = $arrErr;
                     //---- ページ表示
                     $objView->assignobj($this);
                     $objView->display(SITE_FRAME);
                     exit;
                 }
                 $this->CONF = $CONF;
                 $this->uniqid = $this->lfRegistData($this->arrForm, $arrRegistColumn, $arrRejectRegistColumn, CUSTOMER_CONFIRM_MAIL, true, $this->arrForm["email"]);
                 // 空メールを受信済みの場合はすぐに本登録完了にする。
                 if (isset($_SESSION['mobile']['kara_mail_from'])) {
                     $param = array("mode" => "regist", "id" => $this->uniqid, session_name() => session_id());
                     $this->sendRedirect($this->getLocation(MOBILE_URL_DIR . "regist/index.php", $param));
                     exit;
                 }
                 $this->tpl_mainpage = 'entry/complete.tpl';
                 $this->tpl_title = '会員登録(完了ページ)';
                 $objMobile->sfMobileSetExtSessionId('id', $this->uniqid, 'regist/index.php');
                 // 仮登録完了メール送信
                 $this->to_name01 = $_POST['name01'];
                 $this->to_name02 = $_POST['name02'];
                 $objMailText = new SC_MobileView();
                 $objMailText->assignobj($this);
                 $objHelperMail = new SC_Helper_Mail_Ex();
                 $objQuery = new SC_Query();
                 // 仮会員が有効の場合
                 if (CUSTOMER_CONFIRM_MAIL == true) {
                     // Moba8パラメーターを保持する場合はカラム追加
                     if (isset($_SESSION['a8'])) {
                         $this->etc_value = "&a8=" . $_SESSION['a8'];
                     }
                     $subject = $objHelperMail->sfMakeSubject($objQuery, $objMailText, $this, '会員登録のご確認');
                     $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl");
                 } else {
                     $subject = $objHelperMail->sfMakesubject($objQuery, $objMailText, $this, '会員登録のご完了');
                     $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl");
                     // ログイン状態にする
                     $objCustomer->setLogin($_POST["email"]);
                 }
                 $objMail = new SC_SendMail();
                 $objMail->setItem('', $subject, $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email03"], $CONF["email04"], $CONF["email04"], $CONF["email01"]);
                 // 宛先の設定
                 $name = $_POST["name01"] . $_POST["name02"] . " 様";
                 $objMail->setTo($_POST["email"], $name);
                 $objMail->sendMail();
                 // 完了ページに移動させる。
                 $this->sendRedirect($this->getLocation("./complete.php"), true);
                 exit;
             }
         }
     }
     //---- ページ表示
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * FIXME 要リファクタリング
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objCustomer = new SC_Customer();
     $objQuery = new SC_Query();
     $objDb = new SC_Helper_DB_Ex();
     // パラメータ管理クラス
     $this->objFormParam = new SC_FormParam();
     // パラメータ情報の初期化
     $this->lfInitParam();
     // POST値の取得
     $this->objFormParam->setParam($_POST);
     // ファイル管理クラス
     $this->objUpFile = new SC_UploadFile(IMAGE_TEMP_DIR, IMAGE_SAVE_DIR);
     // ファイル情報の初期化
     $this->lfInitFile();
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     if (!empty($_POST['mode'])) {
         $tmp_id = $_POST['product_id'];
     } else {
         $tmp_id = $_GET['product_id'];
     }
     // 値の正当性チェック
     if (!SC_Utils_Ex::sfIsInt($tmp_id) || !$objDb->sfIsRecord("dtb_products", "product_id", $tmp_id, 'del_flg = 0 AND status = 1')) {
         SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
     }
     // ログイン判定
     if ($objCustomer->isLoginSuccess(true)) {
         //お気に入りボタン表示
         $this->tpl_login = true;
         /* 閲覧ログ機能は現在未使用
         
                        $table = "dtb_customer_reading";
                        $where = "customer_id = ? ";
                        $arrval[] = $objCustomer->getValue('customer_id');
                        //顧客の閲覧商品数
                        $rpcnt = $objQuery->count($table, $where, $arrval);
         
                        //閲覧数が設定数以下
                        if ($rpcnt < CUSTOMER_READING_MAX){
                        //閲覧履歴に新規追加
                        lfRegistReadingData($tmp_id, $objCustomer->getValue('customer_id'));
                        } else {
                        //閲覧履歴の中で一番古いものを削除して新規追加
                        $oldsql = "SELECT MIN(update_date) FROM ".$table." WHERE customer_id = ?";
                        $old = $objQuery->getone($oldsql, array($objCustomer->getValue("customer_id")));
                        $where = "customer_id = ? AND update_date = ? ";
                        $arrval = array($objCustomer->getValue("customer_id"), $old);
                        //削除
                        $objQuery->delete($table, $where, $arrval);
                        //追加
                        lfRegistReadingData($tmp_id, $objCustomer->getValue('customer_id'));
                        }
                     */
     }
     // 規格選択セレクトボックスの作成
     $this->lfMakeSelectMobile($this, $tmp_id);
     // 商品IDをFORM内に保持する。
     $this->tpl_product_id = $tmp_id;
     switch ($_POST['mode']) {
         case 'select':
             // 規格1が設定されている場合
             if ($this->tpl_classcat_find1) {
                 // templateの変更
                 $this->tpl_mainpage = "products/select_find1.tpl";
                 break;
             }
         case 'select2':
             $this->arrErr = $this->lfCheckError();
             // 規格1が設定されている場合
             if ($this->tpl_classcat_find1 and $this->arrErr['classcategory_id1']) {
                 // templateの変更
                 $this->tpl_mainpage = "products/select_find1.tpl";
                 break;
             }
             // 規格2が設定されている場合
             if ($this->tpl_classcat_find2) {
                 $this->arrErr = array();
                 $this->tpl_mainpage = "products/select_find2.tpl";
                 break;
             }
         case 'selectItem':
             $this->arrErr = $this->lfCheckError();
             // 規格1が設定されている場合
             if ($this->tpl_classcat_find2 and $this->arrErr['classcategory_id2']) {
                 // templateの変更
                 $this->tpl_mainpage = "products/select_find2.tpl";
                 break;
             }
             // 商品数の選択を行う
             $this->tpl_mainpage = "products/select_item.tpl";
             break;
         case 'cart':
             // 入力値の変換
             $this->objFormParam->convParam();
             $this->arrErr = $this->lfCheckError();
             if (count($this->arrErr) == 0) {
                 $objCartSess = new SC_CartSession();
                 $classcategory_id1 = $_POST['classcategory_id1'];
                 $classcategory_id2 = $_POST['classcategory_id2'];
                 // 規格1が設定されていない場合
                 if (!$this->tpl_classcat_find1) {
                     $classcategory_id1 = '0';
                 }
                 // 規格2が設定されていない場合
                 if (!$this->tpl_classcat_find2) {
                     $classcategory_id2 = '0';
                 }
                 $objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
                 $objCartSess->addProduct(array($_POST['product_id'], $classcategory_id1, $classcategory_id2), $this->objFormParam->getValue('quantity'));
                 $this->sendRedirect($this->getLocation(MOBILE_URL_CART_TOP), true);
                 exit;
             }
             break;
         default:
             break;
     }
     $objQuery = new SC_Query();
     // DBから商品情報を取得する。
     $arrRet = $objQuery->select("*", "vw_products_allclass_detail AS alldtl", "product_id = ?", array($tmp_id));
     $this->arrProduct = $arrRet[0];
     // 商品コードの取得
     $code_sql = "SELECT product_code FROM dtb_products_class AS prdcls WHERE prdcls.product_id = ? GROUP BY product_code ORDER BY product_code";
     $arrProductCode = $objQuery->getall($code_sql, array($tmp_id));
     $arrProductCode = SC_Utils_Ex::sfswaparray($arrProductCode);
     $this->arrProductCode = $arrProductCode["product_code"];
     // 購入制限数を取得
     if ($this->arrProduct['sale_unlimited'] == 1 || $this->arrProduct['sale_limit'] > SALE_LIMIT_MAX) {
         $this->tpl_sale_limit = SALE_LIMIT_MAX;
     } else {
         $this->tpl_sale_limit = $this->arrProduct['sale_limit'];
     }
     // サブタイトルを取得
     $arrFirstCat = $objDb->sfGetFirstCat($arrRet[0]['category_id']);
     $tpl_subtitle = $arrFirstCat['name'];
     $this->tpl_subtitle = $tpl_subtitle;
     // DBからのデータを引き継ぐ
     $this->objUpFile->setDBFileList($this->arrProduct);
     // ファイル表示用配列を渡す
     $this->arrFile = $this->objUpFile->getFormFileList(IMAGE_TEMP_URL, IMAGE_SAVE_URL, true);
     // 支払方法の取得
     $this->arrPayment = $this->lfGetPayment();
     // 入力情報を渡す
     $this->arrForm = $this->objFormParam->getFormParamList();
     //レビュー情報の取得
     $this->arrReview = $this->lfGetReviewData($tmp_id);
     // タイトルに商品名を入れる
     $this->tpl_title = "商品詳細 " . $this->arrProduct["name"];
     //オススメ商品情報表示
     $this->arrRecommend = $this->lfPreGetRecommendProducts($tmp_id);
     //この商品を買った人はこんな商品も買っています
     $this->arrRelateProducts = $this->lfGetRelateProducts($tmp_id);
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
示例#17
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objDb = new SC_Helper_DB_Ex();
     $CONF = $objDb->sf_getBasisData();
     // 店舗基本情報
     $objConn = new SC_DbConn();
     $objView = new SC_MobileView();
     $this->objDate = new SC_Date(START_BIRTH_YEAR, date("Y", strtotime("now")));
     $this->arrYear = $this->objDate->getYear();
     $this->arrMonth = $this->objDate->getMonth();
     $this->arrDay = $this->objDate->getDay();
     $this->objQuery = new SC_Query();
     $this->objCustomer = new SC_Customer();
     //メールアドレス種別
     $arrMailType = array("email" => true, "email_mobile" => true);
     //---- 登録用カラム配列
     $arrRegistColumn = array(array("column" => "name01", "convert" => "aKV"), array("column" => "name02", "convert" => "aKV"), array("column" => "kana01", "convert" => "CKV"), array("column" => "kana02", "convert" => "CKV"), array("column" => "zip01", "convert" => "n"), array("column" => "zip02", "convert" => "n"), array("column" => "pref", "convert" => "n"), array("column" => "addr01", "convert" => "aKV"), array("column" => "addr02", "convert" => "aKV"), array("column" => "email", "convert" => "a"), array("column" => "email_mobile", "convert" => "a"), array("column" => "tel01", "convert" => "n"), array("column" => "tel02", "convert" => "n"), array("column" => "tel03", "convert" => "n"), array("column" => "fax01", "convert" => "n"), array("column" => "fax02", "convert" => "n"), array("column" => "fax03", "convert" => "n"), array("column" => "sex", "convert" => "n"), array("column" => "job", "convert" => "n"), array("column" => "birth", "convert" => "n"), array("column" => "reminder", "convert" => "n"), array("column" => "reminder_answer", "convert" => "aKV"), array("column" => "password", "convert" => "a"), array("column" => "mailmaga_flg", "convert" => "n"));
     //---- 登録除外用カラム配列
     $arrRejectRegistColumn = array("year", "month", "day", "email02", "email_mobile02", "password02");
     $this->arrForm = $this->lfGetCustomerData();
     $this->arrForm['password'] = DEFAULT_PASSWORD;
     if ($_SERVER["REQUEST_METHOD"] == "POST") {
         //-- POSTデータの引き継ぎ
         $this->arrForm = array_merge($this->arrForm, $_POST);
         if (!isset($this->arrForm['year'])) {
             $this->arrForm['year'] = "";
         }
         if ($this->arrForm['year'] == '----') {
             $this->arrForm['year'] = '';
         }
         //-- 入力データの変換
         $this->arrForm = $this->lfConvertParam($this->arrForm, $arrRegistColumn);
         // 戻るボタン用処理
         if (!empty($_POST["return"])) {
             switch ($_POST["mode"]) {
                 case "complete":
                     $_POST["mode"] = "set3";
                     break;
                 case "confirm":
                     $_POST["mode"] = "set2";
                     break;
                 default:
                     $_POST["mode"] = "set1";
                     break;
             }
         }
         //-- 入力エラーチェック
         if ($_POST["mode"] == "set1") {
             $this->arrErr = $this->lfErrorCheck1($this->arrForm);
             $this->tpl_mainpage = 'mypage/change.tpl';
             $this->tpl_title = '登録変更(1/3)';
         } elseif ($_POST["mode"] == "set2") {
             $this->arrErr = $this->lfErrorCheck2($this->arrForm);
             $this->tpl_mainpage = 'mypage/set1.tpl';
             $this->tpl_title = '登録変更(2/3)';
         } else {
             $this->arrErr = $this->lfErrorCheck3($this->arrForm);
             $this->tpl_mainpage = 'mypage/set2.tpl';
             $this->tpl_title = '登録変更(3/3)';
         }
         if ($this->arrErr || !empty($_POST["return"])) {
             // 入力エラーのチェック
             //-- データの設定
             if ($_POST["mode"] == "set1") {
                 $checkVal = array("email", "email_mobile", "password", "reminder", "reminder_answer", "name01", "name02", "kana01", "kana02");
             } elseif ($_POST["mode"] == "set2") {
                 $checkVal = array("sex", "year", "month", "day", "zip01", "zip02");
             } else {
                 $checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03", "mailmaga_flg");
             }
             foreach ($this->arrForm as $key => $val) {
                 if ($key != "return" && $key != "mode" && $key != "confirm" && $key != session_name() && !in_array($key, $checkVal)) {
                     $this->list_data[$key] = $val;
                 }
             }
         } else {
             //-- テンプレート設定
             if ($_POST["mode"] == "set1") {
                 $this->tpl_mainpage = 'mypage/set1.tpl';
                 $this->tpl_title = '登録変更(2/3)';
             } elseif ($_POST["mode"] == "set2") {
                 $this->tpl_mainpage = 'mypage/set2.tpl';
                 $this->tpl_title = '登録変更(3/3)';
             } elseif ($_POST["mode"] == "confirm") {
                 //パスワード表示
                 $passlen = strlen($this->arrForm['password']);
                 $this->passlen = $this->lfPassLen($passlen);
                 // メール受け取り
                 if (!isset($_POST['mailmaga_flg'])) {
                     $_POST['mailmaga_flg'] = "";
                 }
                 if (strtolower($_POST['mailmaga_flg']) == "on") {
                     $this->arrForm['mailmaga_flg'] = "2";
                 } else {
                     $this->arrForm['mailmaga_flg'] = "3";
                 }
                 $this->tpl_mainpage = 'mypage/change_confirm.tpl';
                 $this->tpl_title = '登録変更(確認ページ)';
             }
             //-- データ設定
             unset($this->list_data);
             if ($_POST["mode"] == "set1") {
                 $checkVal = array("sex", "year", "month", "day", "zip01", "zip02");
             } elseif ($_POST["mode"] == "set2") {
                 $checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03", "mailmaga_flg");
             } else {
                 $checkVal = array();
             }
             foreach ($this->arrForm as $key => $val) {
                 if ($key != "return" && $key != "mode" && $key != "confirm" && $key != session_name() && !in_array($key, $checkVal)) {
                     $this->list_data[$key] = $val;
                 }
             }
             //-- 仮登録と完了画面
             if ($_POST["mode"] == "complete") {
                 //エラーなしでかつメールアドレスが重複していない場合
                 if ($this->checkErrorTotal($arrRegistColumn, $arrMailType, true)) {
                     $this->arrForm['customer_id'] = $this->objCustomer->getValue('customer_id');
                     //-- 編集登録
                     $objDb->sfEditCustomerData($this->arrForm, $arrRegistColumn);
                     //セッション情報を最新の状態に更新する
                     $this->objCustomer->updateSession();
                     //完了ページへ
                     $this->sendRedirect($this->getLocation("./change_complete.php"), true);
                     exit;
                 } else {
                     SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
                 }
             }
         }
     }
     $arrPrivateVariables = array('secret_key', 'first_buy_date', 'last_buy_date', 'buy_times', 'buy_total', 'point', 'note', 'status', 'create_date', 'update_date', 'del_flg', 'cell01', 'cell02', 'cell03', 'mobile_phone_id');
     foreach ($arrPrivateVariables as $key) {
         unset($this->list_data[$key]);
     }
     //---- ページ表示
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objCustomer = new SC_Customer();
     //セッション情報を最新の状態に更新する
     $objCustomer->updateSession();
     //ログイン判定
     if (!$objCustomer->isLoginSuccess(true)) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
     } else {
         //マイページトップ顧客情報表示用
         $this->CustomerName1 = $objCustomer->getvalue('name01');
         $this->CustomerName2 = $objCustomer->getvalue('name02');
         $this->CustomerPoint = $objCustomer->getvalue('point');
     }
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
示例#19
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $conn = new SC_DBConn();
     $objView = new SC_MobileView();
     $objSiteSess = new SC_SiteSession();
     $objCartSess = new SC_CartSession();
     $objCustomer = new SC_Customer();
     $objCookie = new SC_Cookie();
     $this->objFormParam = new SC_FormParam();
     // フォーム用
     $helperMobile = new SC_Helper_Mobile_Ex();
     $this->lfInitParam();
     // パラメータ情報の初期化
     $this->objFormParam->setParam($_POST);
     // POST値の取得
     // ユーザユニークIDの取得と購入状態の正当性をチェック
     $uniqid = SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess);
     $this->tpl_uniqid = $uniqid;
     // ログインチェック
     if ($objCustomer->isLoginSuccess(true)) {
         // すでにログインされている場合は、お届け先設定画面に転送
         $this->sendRedirect($this->getLocation('./deliv.php'), true);
         exit;
     }
     // 携帯端末IDが一致する会員が存在するかどうかをチェックする。
     $this->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'nonmember_confirm':
             $this->lfSetNonMember($this);
             // ※breakなし
         // ※breakなし
         case 'confirm':
             // 入力値の変換
             $this->objFormParam->convParam();
             $this->objFormParam->toLower('order_mail');
             $this->objFormParam->toLower('order_mail_check');
             $this->arrErr = $this->lfCheckError();
             // 入力エラーなし
             if (count($this->arrErr) == 0) {
                 // DBへのデータ登録
                 $this->lfRegistData($uniqid);
                 // お届け先のコピー
                 $this->lfCopyDeliv($uniqid, $_POST);
                 // 正常に登録されたことを記録しておく
                 $objSiteSess->setRegistFlag();
                 // お支払い方法選択ページへ移動
                 $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT), true);
                 exit;
             }
             break;
             // 前のページに戻る
         // 前のページに戻る
         case 'return':
             // 確認ページへ移動
             $this->sendRedirect($this->getLocation(MOBILE_URL_CART_TOP), true);
             exit;
             break;
         case 'nonmember':
             $this->lfSetNonMember($this);
             // ※breakなし
         // ※breakなし
         default:
             if ($_GET['from'] == 'nonmember') {
                 $this->lfSetNonMember($this);
             }
             // ユーザユニークIDの取得
             $uniqid = $objSiteSess->getUniqId();
             $objQuery = new SC_Query();
             $where = "order_temp_id = ?";
             $arrRet = $objQuery->select("*", "dtb_order_temp", $where, array($uniqid));
             if (empty($arrRet)) {
                 $arrRet = array(array('order_email' => "", 'order_birth' => ""));
             }
             // DB値の取得
             $this->objFormParam->setParam($arrRet[0]);
             $this->objFormParam->setValue('order_email_check', $arrRet[0]['order_email']);
             $this->objFormParam->setDBDate($arrRet[0]['order_birth']);
             break;
     }
     // クッキー判定
     $this->tpl_login_email = $objCookie->getCookie('login_email');
     if ($this->tpl_login_email != "") {
         $this->tpl_login_memory = "1";
     }
     // 選択用日付の取得
     $objDate = new SC_Date(START_BIRTH_YEAR);
     $this->arrYear = $objDate->getYear('', 1950);
     // 日付プルダウン設定
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     if ($this->year == '') {
         $this->year = '----';
     }
     // 入力値の取得
     $this->arrForm = $this->objFormParam->getFormParamList();
     if ($this->arrForm['year']['value'] == "") {
         $this->arrForm['year']['value'] = '----';
     }
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView(false);
     $objQuery = new SC_Query();
     $objCustomer = new SC_Customer();
     $objSiteSess = new SC_SiteSession();
     $objCartSess = new SC_CartSession();
     //ログイン判定
     if (!$objCustomer->isLoginSuccess(true)) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
     }
     $this->arrForm = $_POST;
     //-- データ設定
     foreach ($_POST as $key => $val) {
         if ($key != "mode" && $key != "return" && $key != "submit" && $key != session_name()) {
             $this->list_data[$key] = $val;
         }
     }
     // ユーザユニークIDの取得と購入状態の正当性をチェック
     $uniqid = SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess);
     //別のお届け先DB登録用カラム配列
     $arrRegistColumn = array(array("column" => "name01", "convert" => "aKV"), array("column" => "name02", "convert" => "aKV"), array("column" => "kana01", "convert" => "CKV"), array("column" => "kana02", "convert" => "CKV"), array("column" => "zip01", "convert" => "n"), array("column" => "zip02", "convert" => "n"), array("column" => "pref", "convert" => "n"), array("column" => "addr01", "convert" => "aKV"), array("column" => "addr02", "convert" => "aKV"), array("column" => "tel01", "convert" => "n"), array("column" => "tel02", "convert" => "n"), array("column" => "tel03", "convert" => "n"));
     // 戻るボタン用処理
     if (!empty($_POST["return"])) {
         switch ($_POST["mode"]) {
             case 'complete':
                 $_POST["mode"] = "set2";
                 break;
             case 'set2':
                 $_POST["mode"] = "set1";
                 break;
             default:
                 $this->sendRedirect($this->getLocation("./deliv.php"), true);
                 exit;
         }
     }
     switch ($_POST['mode']) {
         case 'set1':
             $this->arrErr = $this->lfErrorCheck1($this->arrForm);
             if (count($this->arrErr) == 0 && empty($_POST["return"])) {
                 $this->tpl_mainpage = 'shopping/set1.tpl';
                 $checkVal = array("pref", "addr01", "addr02", "addr03", "tel01", "tel02", "tel03");
                 foreach ($checkVal as $key) {
                     unset($this->list_data[$key]);
                 }
                 // 郵便番号から住所の取得
                 if (@$this->arrForm['pref'] == "" && @$this->arrForm['addr01'] == "" && @$this->arrForm['addr02'] == "") {
                     $address = $this->lfGetAddress($_REQUEST['zip01'] . $_REQUEST['zip02']);
                     $this->arrForm['pref'] = @$address[0]['state'];
                     $this->arrForm['addr01'] = @$address[0]['city'] . @$address[0]['town'];
                 }
             } else {
                 $checkVal = array("name01", "name02", "kana01", "kana02", "zip01", "zip02");
                 foreach ($checkVal as $key) {
                     unset($this->list_data[$key]);
                 }
             }
             break;
         case 'set2':
             $this->arrErr = $this->lfErrorCheck2($this->arrForm);
             if (count($this->arrErr) == 0 && empty($_POST["return"])) {
                 $this->tpl_mainpage = 'shopping/set2.tpl';
             } else {
                 $this->tpl_mainpage = 'shopping/set1.tpl';
                 $checkVal = array("pref", "addr01", "addr02", "addr03", "tel01", "tel02", "tel03");
                 foreach ($checkVal as $key) {
                     unset($this->list_data[$key]);
                 }
             }
             break;
         case 'complete':
             $this->arrErr = $this->lfErrorCheck($this->arrForm);
             if (count($this->arrErr) == 0) {
                 // 登録
                 $other_deliv_id = $this->lfRegistData($_POST, $arrRegistColumn, $objCustomer);
                 // 登録済みの別のお届け先を受注一時テーブルに書き込む
                 $this->lfRegistOtherDelivData($uniqid, $objCustomer, $other_deliv_id);
                 // 正常に登録されたことを記録しておく
                 $objSiteSess->setRegistFlag();
                 // お支払い方法選択ページへ移動
                 $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT), true);
                 exit;
             } else {
                 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
             }
             break;
         default:
             $deliv_count = $objQuery->count("dtb_other_deliv", "customer_id=?", array($objCustomer->getValue('customer_id')));
             if ($deliv_count >= DELIV_ADDR_MAX) {
                 SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, "", false, "最大登録件数を超えています。");
             }
     }
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
示例#21
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objSiteInfo = $objView->objSiteInfo;
     $objCustomer = new SC_Customer();
     $objDb = new SC_Helper_DB_Ex();
     $this->CONF = $objDb->sf_getBasisData();
     $arrInfo = $objSiteInfo->data;
     //-- 本登録完了のためにメールから接続した場合
     if ($_GET["mode"] == "regist") {
         //-- 入力チェック
         $this->arrErr = $this->lfErrorCheck($_GET);
         if ($this->arrErr) {
             $this->tpl_mainpage = 'regist/error.tpl';
             $this->tpl_title = 'エラー';
         } else {
             $registSecretKey = $this->lfRegistData($_GET);
             //本会員登録(フラグ変更)
             $this->lfSendRegistMail($registSecretKey);
             //本会員登録完了メール送信
             // ログイン済みの状態にする。
             $objQuery = new SC_Query();
             $email = $objQuery->get("dtb_customer", "email", "secret_key = ?", array($registSecretKey));
             $objCustomer->setLogin($email);
             $this->sendRedirect($this->getLocation("./complete.php"), true);
             exit;
         }
         //-- それ以外のアクセスは無効とする
     } else {
         $this->arrErr["id"] = "無効なアクセスです。";
         $this->tpl_mainpage = 'regist/error.tpl';
         $this->tpl_title = 'エラー';
     }
     //---- ページ表示
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objSiteSess = new SC_SiteSession();
     $objCartSess = new SC_CartSession();
     $this->objCustomer = new SC_Customer();
     $objDb = new SC_Helper_DB_Ex();
     $objSiteInfo = $objView->objSiteInfo;
     $arrInfo = $objSiteInfo->data;
     // パラメータ管理クラス
     $this->objFormParam = new SC_FormParam();
     // パラメータ情報の初期化
     $this->lfInitParam();
     // POST値の取得
     $this->objFormParam->setParam($_POST);
     // ユーザユニークIDの取得と購入状態の正当性をチェック
     $uniqid = SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess);
     // ユニークIDを引き継ぐ
     $this->tpl_uniqid = $uniqid;
     // 会員ログインチェック
     if ($this->objCustomer->isLoginSuccess(true)) {
         $this->tpl_login = '******';
         $this->tpl_user_point = $this->objCustomer->getValue('point');
     }
     // 金額の取得 (購入途中で売り切れた場合にはこの関数内にてその商品の個数が0になる)
     $objDb->sfTotalCart($this, $objCartSess, $arrInfo);
     if (empty($arrData)) {
         $arrData = array();
     }
     $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $arrInfo);
     // カート内の商品の売り切れチェック
     $objCartSess->chkSoldOut($objCartSess->getCartList(), true);
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     // 戻るボタンの処理
     if (!empty($_POST['return'])) {
         switch ($_POST['mode']) {
             case 'confirm':
                 $_POST['mode'] = 'payment';
                 break;
             default:
                 // 正常な推移であることを記録しておく
                 $objSiteSess->setRegistFlag();
                 $this->sendRedirect(MOBILE_URL_SHOP_TOP, true);
                 exit;
         }
     }
     switch ($_POST['mode']) {
         // 支払い方法指定 → 配達日時指定
         case 'deliv_date':
             // 入力値の変換
             $this->objFormParam->convParam();
             $this->arrErr = $this->lfCheckError($this->arrData);
             if (!isset($this->arrErr['payment_id'])) {
                 // 支払い方法の入力エラーなし
                 $this->tpl_mainpage = 'shopping/deliv_date.tpl';
                 $this->tpl_title = "配達日時指定";
                 break;
             } else {
                 // ユーザユニークIDの取得
                 $uniqid = $objSiteSess->getUniqId();
                 // 受注一時テーブルからの情報を格納
                 $this->lfSetOrderTempData($uniqid);
             }
             break;
         case 'confirm':
             // 入力値の変換
             $this->objFormParam->convParam();
             $this->arrErr = $this->lfCheckError($this->arrData);
             // 入力エラーなし
             if (count($this->arrErr) == 0) {
                 // DBへのデータ登録
                 $this->lfRegistData($uniqid);
                 // 正常に登録されたことを記録しておく
                 $objSiteSess->setRegistFlag();
                 // 確認ページへ移動
                 $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_CONFIRM), true);
                 exit;
             } else {
                 // ユーザユニークIDの取得
                 $uniqid = $objSiteSess->getUniqId();
                 // 受注一時テーブルからの情報を格納
                 $this->lfSetOrderTempData($uniqid);
                 if (!isset($this->arrErr['payment_id'])) {
                     // 支払い方法の入力エラーなし
                     $this->tpl_mainpage = 'shopping/deliv_date.tpl';
                     $this->tpl_title = "配達日時指定";
                 }
             }
             break;
             // 前のページに戻る
         // 前のページに戻る
         case 'return':
             // 非会員の場合
             // 正常な推移であることを記録しておく
             $objSiteSess->setRegistFlag();
             $this->sendRedirect(MOBILE_URL_SHOP_TOP, true);
             exit;
             break;
             // 支払い方法が変更された場合
         // 支払い方法が変更された場合
         case 'payment':
             // ここのbreakは、意味があるので外さないで下さい。
             break;
         default:
             // 受注一時テーブルからの情報を格納
             $this->lfSetOrderTempData($uniqid);
             break;
     }
     // 店舗情報の取得
     $arrInfo = $objSiteInfo->data;
     // 購入金額の取得得
     $total_pretax = $objCartSess->getAllProductsTotal($arrInfo);
     // 支払い方法の取得
     $this->arrPayment = $this->lfGetPayment($total_pretax);
     // 配送時間の取得
     $arrRet = $objDb->sfGetDelivTime($this->objFormParam->getValue('payment_id'));
     $this->arrDelivTime = SC_Utils_Ex::sfArrKeyValue($arrRet, 'time_id', 'deliv_time');
     // 配送日一覧の取得
     $this->arrDelivDate = $this->lfGetDelivDate();
     $this->arrForm = $this->objFormParam->getFormParamList();
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
示例#23
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $conn = new SC_DBConn();
     $objView = new SC_MobileView();
     $objDb = new SC_Helper_DB_Ex();
     $CONF = $objDb->sf_getBasisData();
     // 店舗基本情報
     //---- ページ表示
     $objView->assignobj($this);
     $objView->assignarray($CONF);
     $objView->display(SITE_FRAME);
 }
示例#24
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objQuery = new SC_Query();
     $objCustomer = new SC_Customer();
     // クッキー管理クラス
     $objCookie = new SC_Cookie(COOKIE_EXPIRE);
     // パラメータ管理クラス
     $objFormParam = new SC_FormParam();
     // パラメータ情報の初期化
     $this->lfInitParam($objFormParam);
     // POST値の取得
     $objFormParam->setParam($_POST);
     // 携帯端末IDが一致する会員が存在するかどうかをチェックする。
     $this->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     // ログイン処理
     if ($_POST['mode'] == 'login') {
         $objFormParam->toLower('login_email');
         $arrErr = $objFormParam->checkError();
         $arrForm = $objFormParam->getHashArray();
         // クッキー保存判定
         if ($arrForm['login_memory'] == "1" && $arrForm['login_email'] != "") {
             $objCookie->setCookie('login_email', $_POST['login_email']);
         } else {
             $objCookie->setCookie('login_email', '');
         }
         if (count($arrErr) == 0) {
             if ($objCustomer->getCustomerDataFromMobilePhoneIdPass($arrForm['login_pass']) || $objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'], true)) {
                 // ログインが成功した場合は携帯端末IDを保存する。
                 $objCustomer->updateMobilePhoneId();
                 /*
                  * email がモバイルドメインでは無く,
                  * 携帯メールアドレスが登録されていない場合
                  */
                 $objMobile = new SC_Helper_Mobile_Ex();
                 if (!$objMobile->gfIsMobileMailAddress($objCustomer->getValue('email'))) {
                     if (!$objCustomer->hasValue('email_mobile')) {
                         $this->sendRedirect($this->getLocation("../entry/email_mobile.php"), true);
                         exit;
                     }
                 }
             } else {
                 $objQuery = new SC_Query();
                 $where = "(email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0";
                 $ret = $objQuery->count("dtb_customer", $where, array($arrForm['login_email'], $arrForm['login_email']));
                 if ($ret > 0) {
                     SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR, "", false, "", true);
                 } else {
                     SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR, "", false, "", true);
                 }
             }
         }
     }
     /*
      * ログインチェック
      * 携帯メールの登録を必須にする場合は isLoginSuccess(false) にする
      */
     if (!$objCustomer->isLoginSuccess(true)) {
         $this->tpl_mainpage = 'mypage/login.tpl';
         $objView->assignArray($objFormParam->getHashArray());
         if (empty($arrErr)) {
             $arrErr = array();
         }
         $objView->assignArray(array("arrErr" => $arrErr));
     } else {
         //マイページトップ顧客情報表示用
         $this->CustomerName1 = $objCustomer->getvalue('name01');
         $this->CustomerName2 = $objCustomer->getvalue('name02');
     }
     $objView->assignobj($this);
     //$objpage内の全てのテンプレート変数をsmartyに格納
     $objView->display(SITE_FRAME);
     //パスとテンプレート変数の呼び出し、実行
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     // カートが空かどうかを確認する。
     $objCartSess = new SC_CartSession("", false);
     $this->tpl_cart_empty = count($objCartSess->getCartList()) < 1;
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     define("HISTORY_NUM", 5);
     $objView = new SC_MobileView();
     $objQuery = new SC_Query();
     $objCustomer = new SC_Customer();
     $pageNo = isset($_GET['pageno']) ? (int) $_GET['pageno'] : 0;
     // TODO
     // ログインチェック
     if (!isset($_SESSION['customer'])) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
     }
     $col = "order_id, create_date, payment_id, payment_total";
     $from = "dtb_order";
     $where = "del_flg = 0 AND customer_id=?";
     $arrval = array($objCustomer->getvalue('customer_id'));
     $order = "order_id DESC";
     $linemax = $objQuery->count($from, $where, $arrval);
     $this->tpl_linemax = $linemax;
     // 取得範囲の指定(開始行番号、行数のセット)
     $objQuery->setlimitoffset(HISTORY_NUM, $pageNo);
     // 表示順序
     $objQuery->setorder($order);
     //購入履歴の取得
     $this->arrOrder = $objQuery->select($col, $from, $where, $arrval);
     // next
     if ($pageNo + HISTORY_NUM < $linemax) {
         $next = "<a href='history.php?pageno=" . ($pageNo + HISTORY_NUM) . "'>次へ→</a>";
     } else {
         $next = "";
     }
     // previous
     if ($pageNo - HISTORY_NUM > 0) {
         $previous = "<a href='history.php?pageno=" . ($pageNo - HISTORY_NUM) . "'>←前へ</a>";
     } elseif ($pageNo == 0) {
         $previous = "";
     } else {
         $previous = "<a href='history.php?pageno=0'>←前へ</a>";
     }
     // bar
     if ($next != '' && $previous != '') {
         $bar = " | ";
     } else {
         $bar = "";
     }
     $this->tpl_strnavi = $previous . $bar . $next;
     $objView->assignobj($this);
     //$objpage内の全てのテンプレート変数をsmartyに格納
     $objView->display(SITE_FRAME);
     //パスとテンプレート変数の呼び出し、実行
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $conn = new SC_DBConn();
     $objView = new SC_MobileView();
     $this->objSiteSess = new SC_SiteSession();
     $this->objCartSess = new SC_CartSession();
     $objSiteInfo = $objView->objSiteInfo;
     $this->arrInfo = $objSiteInfo->data;
     $this->objCustomer = new SC_Customer();
     $mailHelper = new SC_Helper_Mail_Ex();
     // 前のページで正しく登録手続きが行われたか判定
     SC_Utils_Ex::sfIsPrePage($this->objSiteSess, true);
     // ユーザユニークIDの取得と購入状態の正当性をチェック
     $uniqid = SC_Utils_Ex::sfCheckNormalAccess($this->objSiteSess, $this->objCartSess);
     if ($uniqid != "") {
         // 完了処理
         $objQuery = new SC_Query();
         $objQuery->begin();
         $order_id = $this->lfDoComplete($objQuery, $uniqid);
         $objQuery->commit();
         // セッションに保管されている情報を更新する
         $this->objCustomer->updateSession();
         // 完了メール送信
         if ($order_id != "") {
             $mailHelper->sfSendOrderMail($order_id, '2');
         }
         //その他情報の取得
         $other_data = $objQuery->get("dtb_order", "memo02", "order_id = ? ", array($order_id));
         if ($other_data != "") {
             $arrOther = unserialize($other_data);
             // データを編集
             foreach ($arrOther as $key => $val) {
                 // URLの場合にはリンクつきで表示させる
                 if (preg_match('/^(https?|ftp)(:\\/\\/[-_.!~*\'()a-zA-Z0-9;\\/?:\\@&=+\\$,%#]+)$/', $val["value"])) {
                     $arrOther[$key]["value"] = "<a href='" . $val["value"] . "'>" . $val["value"] . "</a>";
                 }
             }
             $this->arrOther = $arrOther;
         }
         // アフィリエイト用コンバージョンタグの設定
         $this->tpl_conv_page = AFF_SHOPPING_COMPLETE;
         $this->tpl_aff_option = "order_id={$order_id}";
         //合計価格の取得
         $total = $objQuery->get("dtb_order", "total", "order_id = ? ", array($order_id));
         if ($total != "") {
             $this->tpl_aff_option .= "|total={$total}";
         }
         // TS連携モジュールの実行
         if (function_exists('sfTSRequest')) {
             sfTSRequest($order_id);
         }
     }
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objCustomer = new SC_Customer();
     $objQuery = new SC_Query();
     //ログイン判定
     if (!$objCustomer->isLoginSuccess(true)) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
     } else {
         //マイページトップ顧客情報表示用
         $this->CustomerName1 = $objCustomer->getvalue('name01');
         $this->CustomerName2 = $objCustomer->getvalue('name02');
         $this->CustomerPoint = $objCustomer->getvalue('point');
     }
     if (isset($_POST['no'])) {
         $this->sendRedirect($this->getLocation("./index.php"), true);
         exit;
     } elseif (isset($_POST['complete'])) {
         //会員削除
         $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id')));
         $where = "email = ?";
         $objCustomer->EndSession();
         //完了ページへ
         $this->sendRedirect($this->getLocation("./refusal_complete.php"), true);
         exit;
     }
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
示例#29
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objCustomer = new SC_Customer();
     $offset = isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0;
     $next = $offset;
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     // 規約内容の取得
     $objQuery = new SC_Query();
     $count = $objQuery->count("dtb_kiyaku", "del_flg <> 1");
     $objQuery->setorder("rank DESC");
     $objQuery->setlimitoffset(1, $offset);
     $arrRet = $objQuery->select("kiyaku_title, kiyaku_text", "dtb_kiyaku", "del_flg <> 1");
     if ($count > $offset + 1) {
         $next++;
     } else {
         $next = -1;
     }
     $max = count($arrRet);
     $this->tpl_kiyaku_text = "";
     for ($i = 0; $i < $max; $i++) {
         $this->tpl_kiyaku_text .= $arrRet[$i]['kiyaku_title'] . "\n\n";
         $this->tpl_kiyaku_text .= $arrRet[$i]['kiyaku_text'] . "\n\n";
     }
     $objView->assign("offset", $next);
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
示例#30
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     // 買い物を続ける場合
     if (!isset($_REQUEST['continue'])) {
         $_REQUEST['continue'] = "";
     }
     if ($_REQUEST['continue']) {
         $this->sendRedirect($this->getLocation(MOBILE_URL_SITE_TOP), true);
         exit;
     }
     $objView = new SC_MobileView(false);
     $objCartSess = new SC_CartSession("", false);
     $objSiteSess = new SC_SiteSession();
     $objSiteInfo = $objView->objSiteInfo;
     $objCustomer = new SC_Customer();
     $objDb = new SC_Helper_DB_Ex();
     // 基本情報の取得
     $arrInfo = $objSiteInfo->data;
     // 商品購入中にカート内容が変更された。
     if ($objCartSess->getCancelPurchase()) {
         $this->tpl_message = "商品購入中にカート内容が変更されましたので、お手数ですが購入手続きをやり直して下さい。";
     }
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'confirm':
             // カート内情報の取得
             $arrRet = $objCartSess->getCartList();
             $max = count($arrRet);
             $cnt = 0;
             for ($i = 0; $i < $max; $i++) {
                 // 商品規格情報の取得
                 $arrData = $objDb->sfGetProductsClass($arrRet[$i]['id']);
                 // DBに存在する商品
                 if ($arrData != "") {
                     $cnt++;
                 }
             }
             // カート商品が1件以上存在する場合
             if ($cnt > 0) {
                 // 正常に登録されたことを記録しておく
                 $objSiteSess->setRegistFlag();
                 $pre_uniqid = $objSiteSess->getUniqId();
                 // 注文一時IDの発行
                 $objSiteSess->setUniqId();
                 $uniqid = $objSiteSess->getUniqId();
                 // エラーリトライなどで既にuniqidが存在する場合は、設定を引き継ぐ
                 if ($pre_uniqid != "") {
                     $sqlval['order_temp_id'] = $uniqid;
                     $where = "order_temp_id = ?";
                     $objQuery = new SC_Query();
                     $objQuery->update("dtb_order_temp", $sqlval, $where, array($pre_uniqid));
                 }
                 // カートを購入モードに設定
                 $objCartSess->saveCurrentCart($uniqid);
                 // 購入ページへ
                 $this->sendRedirect(MOBILE_URL_SHOP_TOP, true);
                 exit;
             }
             break;
         default:
             break;
     }
     if (!isset($_GET['mode'])) {
         $_GET['mode'] = "";
     }
     /*
      * FIXME sendRedirect() を使った方が良いが無限ループしてしまう...
      */
     switch ($_GET['mode']) {
         case 'up':
             $objCartSess->upQuantity($_GET['cart_no']);
             SC_Utils_Ex::sfReload(session_name() . "=" . session_id());
             break;
         case 'down':
             $objCartSess->downQuantity($_GET['cart_no']);
             SC_Utils_Ex::sfReload(session_name() . "=" . session_id());
             break;
         case 'delete':
             $objCartSess->delProduct($_GET['cart_no']);
             SC_Utils_Ex::sfReload(session_name() . "=" . session_id());
             break;
     }
     // カート集計処理
     if (empty($arrData)) {
         $arrData = array();
     }
     $objDb->sfTotalCart($this, $objCartSess, $arrInfo);
     $this->arrData = $objDb->sfTotalConfirm($arrData, $this, $objCartSess, $arrInfo, $objCustomer);
     $this->arrInfo = $arrInfo;
     // ログイン判定
     if ($objCustomer->isLoginSuccess(true)) {
         $this->tpl_login = true;
         $this->tpl_user_point = $objCustomer->getValue('point');
         $this->tpl_name = $objCustomer->getValue('name01');
     }
     // 送料無料までの金額を計算
     $tpl_deliv_free = $this->arrInfo['free_rule'] - $this->tpl_total_pretax;
     $this->tpl_deliv_free = $tpl_deliv_free;
     // 前頁のURLを取得
     $this->tpl_prev_url = $objCartSess->getPrevURL();
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }