/**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objCustomer = new SC_Customer();
     // クッキー管理クラス
     $objCookie = new SC_Cookie(COOKIE_EXPIRE);
     // ログイン判定
     if ($objCustomer->isLoginSuccess()) {
         $this->tpl_login = true;
         $this->tpl_user_point = $objCustomer->getValue('point');
         $this->tpl_name1 = $objCustomer->getValue('name01');
         $this->tpl_name2 = $objCustomer->getValue('name02');
     } else {
         // クッキー判定
         $this->tpl_login_email = $objCookie->getCookie('login_email');
         if ($this->tpl_login_email != "") {
             $this->tpl_login_memory = "1";
         }
         // POSTされてきたIDがある場合は優先する。
         if ($_POST['login_email'] != "") {
             $this->tpl_login_email = $_POST['login_email'];
         }
     }
     $this->tpl_disable_logout = $this->lfCheckDisableLogout();
     $objSubView = new SC_SiteView();
     $this->transactionid = $this->getToken();
     $objSubView->assignobj($this);
     $objSubView->display($this->tpl_mainpage);
 }
예제 #2
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objQuery = new SC_Query();
     $objCustomer = new SC_Customer();
     // クッキー管理クラス
     $objCookie = new SC_Cookie(COOKIE_EXPIRE);
     // ログイン判定
     if ($objCustomer->isLoginSuccess()) {
         $this->sendRedirect($this->getLocation("./index.php"));
         exit;
     } else {
         // クッキー判定
         $this->tpl_login_email = $objCookie->getCookie('login_email');
         if ($this->tpl_login_email != "") {
             $this->tpl_login_memory = "1";
         }
         // POSTされてきたIDがある場合は優先する。
         if (isset($_POST['mypage_login_email']) && $_POST['mypage_login_email'] != "") {
             $this->tpl_login_email = $_POST['mypage_login_email'];
         }
     }
     //$objpage内の全てのテンプレート変数をsmartyに格納
     $objView->assignobj($this);
     //パスとテンプレート変数の呼び出し、実行
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objCustomer = new SC_Customer();
     // クッキー管理クラス
     $objCookie = new SC_Cookie(COOKIE_EXPIRE);
     // パラメータ管理クラス
     $this->objFormParam = new SC_FormParam();
     // パラメータ情報の初期化
     $this->lfInitParam();
     //パスワード・Eメールにある空白をトリム
     $_POST["mypage_login_email"] = trim($_POST["mypage_login_email"]);
     $_POST["mypage_login_pass"] = trim($_POST["mypage_login_pass"]);
     //認証用
     $_POST["mypage_login_pass1"] = trim($_POST["mypage_login_pass"]);
     //最小桁数比較用
     $_POST["mypage_login_pass2"] = trim($_POST["mypage_login_pass"]);
     //最大桁数比較用
     // POST値の取得
     $this->objFormParam->setParam($_POST);
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'login':
             $this->objFormParam->toLower('mypage_login_email');
             $arrErr = $this->objFormParam->checkError();
             // エラーの場合はエラー画面に遷移
             if (count($arrErr) > 0) {
                 SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
             }
             $arrForm = $this->objFormParam->getHashArray();
             // クッキー保存判定
             if ($arrForm['mypage_login_memory'] == "1" && $arrForm['mypage_login_email'] != "") {
                 $objCookie->setCookie('login_email', $_POST['mypage_login_email']);
             } else {
                 $objCookie->setCookie('login_email', '');
             }
             if ($objCustomer->getCustomerDataFromEmailPass($arrForm['mypage_login_pass'], $arrForm['mypage_login_email'], true)) {
                 $this->sendRedirect($this->getLocation("./index.php"));
                 exit;
             } else {
                 $arrForm['mypage_login_email'] = strtolower($arrForm['mypage_login_email']);
                 $objQuery = new SC_Query();
                 $where = "(email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0";
                 $ret = $objQuery->count("dtb_customer", $where, array($arrForm['mypage_login_email'], $arrForm['mypage_login_email']));
                 if ($ret > 0) {
                     SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
                 } else {
                     SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR);
                 }
             }
             break;
     }
 }
예제 #4
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $conn = new SC_DBConn();
     $objView = null;
     if (defined("MOBILE_SITE") && MOBILE_SITE) {
         $objView = new SC_MobileView();
     } else {
         $objView = new SC_SiteView();
     }
     $objSess = new SC_Session();
     // 店舗基本情報を取得
     $objDb = new SC_Helper_DB_Ex();
     $CONF = $objDb->sf_getBasisData();
     $masterData = new SC_DB_MasterData_Ex();
     $arrReminder = $masterData->getMasterData("mtb_reminder");
     // クッキー管理クラス
     $objCookie = new SC_Cookie(COOKIE_EXPIRE);
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     if (!isset($_POST['email'])) {
         $_POST['email'] = "";
     }
     if ($_POST['mode'] == 'mail_check') {
         //メアド入力時
         $_POST['email'] = strtolower($_POST['email']);
         // FIXME DBチェックの前に妥当性チェックするべき
         $sql = "SELECT * FROM dtb_customer WHERE (email = ? OR email_mobile = ?) AND status = 2 AND del_flg = 0";
         $result = $conn->getAll($sql, array($_POST['email'], $_POST['email']));
         // 本会員登録済みの場合
         if (isset($result[0]['reminder']) && $result[0]['reminder']) {
             // 入力emailが存在する
             $_SESSION['forgot']['email'] = $_POST['email'];
             $_SESSION['forgot']['reminder'] = $result[0]['reminder'];
             // ヒミツの答え入力画面
             $this->Reminder = $arrReminder[$_SESSION['forgot']['reminder']];
             $this->tpl_mainpage = 'forgot/secret.tpl';
         } else {
             $sql = "SELECT customer_id FROM dtb_customer WHERE (email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0";
             //仮登録中の確認
             $result = $conn->getAll($sql, array($_POST['email'], $_POST['email']));
             if ($result) {
                 $this->errmsg = "ご入力のemailアドレスは現在仮登録中です。<br>登録の際にお送りしたメールのURLにアクセスし、<br>本会員登録をお願いします。";
             } else {
                 // 登録していない場合
                 $this->errmsg = "ご入力のemailアドレスは登録されていません";
             }
         }
     } elseif ($_POST['mode'] == 'secret_check') {
         //ヒミツの答え入力時
         if ($_SESSION['forgot']['email']) {
             // ヒミツの答えの回答が正しいかチェック
             $sql = "SELECT * FROM dtb_customer WHERE (email = ? OR email_mobile = ?) AND del_flg = 0";
             $result = $conn->getAll($sql, array($_SESSION['forgot']['email'], $_SESSION['forgot']['email']));
             $data = $result[0];
             if ($data['reminder_answer'] === $_POST['input_reminder']) {
                 // ヒミツの答えが正しい
                 // 新しいパスワードを設定する
                 $this->temp_password = GC_Utils_Ex::gfMakePassword(8);
                 if (FORGOT_MAIL == 1) {
                     // メールで変更通知をする
                     $this->lfSendMail($CONF, $_SESSION['forgot']['email'], $data['name01'], $this->temp_password);
                 }
                 // DBを書き換える
                 $sql = "UPDATE dtb_customer SET password = ?, update_date = now() WHERE customer_id = ?";
                 $conn->query($sql, array(sha1($this->temp_password . ":" . AUTH_MAGIC), $data['customer_id']));
                 // 完了画面の表示
                 $this->tpl_mainpage = 'forgot/complete.tpl';
                 // セッション変数の解放
                 $_SESSION['forgot'] = array();
                 unset($_SESSION['forgot']);
             } else {
                 // ヒミツの答えが正しくない
                 $this->Reminder = $arrReminder[$_SESSION['forgot']['reminder']];
                 $this->errmsg = "パスワードを忘れたときの質問に対する回答が正しくありません";
                 $this->tpl_mainpage = 'forgot/secret.tpl';
             }
         } else {
             // アクセス元が不正または、セッション保持期間が切れている
             $this->errmsg = "emailアドレスを再度登録してください。<br />前回の入力から時間が経っていますと、本メッセージが表示される可能性があります。";
         }
     }
     // デフォルト入力
     if ($_POST['email'] != "") {
         // POST値を入力
         $this->tpl_login_email = $_POST['email'];
     } else {
         // クッキー値を入力
         $this->tpl_login_email = $objCookie->getCookie('login_email');
     }
     // モバイルサイトの場合はトークン生成
     if (defined("MOBILE_SITE") && MOBILE_SITE) {
         $this->createMobileToken();
     }
     //---- ページ表示
     $objView->assignobj($this);
     $objView->display($this->tpl_mainpage);
 }
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objCustomer = new SC_Customer();
     // 不正なURLがPOSTされた場合はエラー表示
     if (!$this->isValidToken()) {
         GC_Utils_Ex::gfPrintLog('invalid access :login_check.php $POST["url"]=' . $_POST['url']);
         SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
     }
     // クッキー管理クラス
     $objCookie = new SC_Cookie(COOKIE_EXPIRE);
     // パラメータ管理クラス
     $this->objFormParam = new SC_FormParam();
     // パラメータ情報の初期化
     $this->lfInitParam();
     //パスワード・Eメールにある空白をトリム
     $_POST["login_email"] = preg_replace('/^[  \\r\\n]*(.*?)[  \\r\\n]*$/u', '$1', $_POST["login_email"]);
     $_POST["login_pass"] = trim($_POST["login_pass"]);
     //認証用
     $_POST["login_pass1"] = $_POST["login_pass"];
     //最小桁数比較用
     $_POST["login_pass2"] = $_POST["login_pass"];
     //最大桁数比較用
     // POST値の取得
     $this->objFormParam->setParam($_POST);
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'login':
             $this->objFormParam->toLower('login_email');
             $arrErr = $this->objFormParam->checkError();
             // エラーの場合はエラー画面に遷移
             if (count($arrErr) > 0) {
                 SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
             }
             $arrForm = $this->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->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'], true)) {
                     $this->sendRedirect($this->getLocation(URL_DIR, array(), false));
                     exit;
                 } else {
                     $arrForm['login_email'] = strtolower($arrForm['login_email']);
                     $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);
                     } else {
                         SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR);
                     }
                 }
             } else {
                 // 入力エラーの場合、元のアドレスに戻す。
                 $this->sendRedirect($this->getLocation($_POST['url'], array(), false));
                 exit;
             }
             break;
         case 'logout':
             // ログイン情報の解放
             $objCustomer->EndSession();
             $mypage_url_search = strpos('.' . $_POST['url'], "mypage");
             //マイページログイン中はログイン画面へ移行
             if ($mypage_url_search == 2) {
                 $this->sendRedirect($this->getLocation(URL_DIR . "mypage/login.php", array(), false));
             } else {
                 $this->sendRedirect($this->getLocation(URL_DIR, array(), false));
             }
             exit;
             break;
     }
 }
예제 #6
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);
     //パスとテンプレート変数の呼び出し、実行
 }
예제 #7
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 process()
 {
     global $objCampaignSess;
     $objView = new SC_SiteView(false);
     $objQuery = new SC_Query();
     $objCustomer = new SC_Customer();
     $objCampaignSess = new SC_CampaignSession();
     // クッキー管理クラス
     $objCookie = new SC_Cookie(COOKIE_EXPIRE);
     $objLoginFormParam = new SC_FormParam();
     // ログインフォーム用
     $this->lfInitLoginFormParam($objLoginFormParam);
     // 初期設定
     $objLoginFormParam->setParam($_POST);
     // POST値の取得
     // ディレクトリ名を取得
     $dir_name = dirname($_SERVER['PHP_SELF']);
     $arrDir = split('/', $dir_name);
     $dir_name = $arrDir[count($arrDir) - 1];
     /* セッションにキャンペーンデータを書き込む */
     // キャンペーンからの遷移という情報を保持
     $objCampaignSess->setIsCampaign();
     // キャンペーンIDを保持
     $campaign_id = $objQuery->get("dtb_campaign", "campaign_id", "directory_name = ? AND del_flg = 0", array($dir_name));
     $objCampaignSess->setCampaignId($campaign_id);
     // キャンペーンディレクトリ名を保持
     $objCampaignSess->setCampaignDir($dir_name);
     // キャンペーンが開催中かをチェック
     if ($this->lfCheckActive($dir_name, $objQuery)) {
         $status = CAMPAIGN_TEMPLATE_ACTIVE;
         $this->is_active = true;
     } else {
         $status = CAMPAIGN_TEMPLATE_END;
         $this->is_active = false;
     }
     switch ($_POST['mode']) {
         // ログインチェック
         case 'login':
             $objLoginFormParam->toLower('login_email');
             $this->arrErr = $objLoginFormParam->checkError();
             $arrForm = $objLoginFormParam->getHashArray();
             // クッキー保存判定
             if ($arrForm['login_memory'] == "1" && $arrForm['login_email'] != "") {
                 $objCookie->setCookie('login_email', $_POST['login_email']);
             } else {
                 $objCookie->setCookie('login_email', '');
             }
             if (count($this->arrErr) == 0) {
                 // ログイン判定
                 if (!$objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'])) {
                     // 仮登録の判定
                     $where = "email = ? AND status = 1 AND del_flg = 0";
                     $ret = $objQuery->count("dtb_customer", $where, array($arrForm['login_email']));
                     if ($ret > 0) {
                         SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
                     } else {
                         SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR);
                     }
                 } else {
                     // 重複申込チェック
                     $orverlapping_flg = $objQuery->get("dtb_campaign", "orverlapping_flg", "campaign_id = ?", array($objCampaignSess->getCampaignId()));
                     if ($orverlapping_flg) {
                         if ($this->lfOverlappingCheck($objCustomer->getValue('customer_id'), $objQuery)) {
                             $this->arrErr['login_email'] = "※ 複数回ご応募することは出来ません。";
                         }
                     }
                     if (count($this->arrErr) == 0) {
                         // 申込情報を登録
                         $this->lfRegistCampaignOrder($objCustomer->getValue('customer_id'), $objQuery);
                         // 完了ページへリダイレクト
                         $this->sendRedirect($this->getLocation(CAMPAIGN_URL . "{$dir_name}/complete.php"));
                         exit;
                     }
                 }
             }
             break;
         default:
             break;
     }
     // 入力情報を渡す
     $this->arrForm = $_POST;
     $this->dir_name = $dir_name;
     $this->tpl_dir_name = CAMPAIGN_TEMPLATE_PATH . $dir_name . "/" . $status;
     //---- ページ表示
     $objView->assignobj($this);
     $objView->display($this->tpl_mainpage);
 }
예제 #9
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objSiteSess = new SC_SiteSession();
     $objCartSess = new SC_CartSession();
     $objCustomer = new SC_Customer();
     // クッキー管理クラス
     $objCookie = new SC_Cookie(COOKIE_EXPIRE);
     // パラメータ管理クラス
     $this->objFormParam = new SC_FormParam();
     // パラメータ情報の初期化
     $this->lfInitParam();
     // POST値の取得
     $this->lfConvertEmail($_POST["login_email"]);
     $this->lfConvertLoginPass($_POST["login_pass"]);
     $this->objFormParam->setParam($_POST);
     $this->objLoginFormParam = new SC_FormParam();
     // ログインフォーム用
     $this->lfInitLoginFormParam();
     // 初期設定
     $this->objLoginFormParam->setParam($_POST);
     // POST値の取得
     // ユーザユニークIDの取得と購入状態の正当性をチェック
     $uniqid = SC_Utils_Ex::sfCheckNormalAccess($objSiteSess, $objCartSess);
     $this->tpl_uniqid = $uniqid;
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     // ログインチェック
     if ($_POST['mode'] != 'login' && !$objCustomer->isLoginSuccess(true)) {
         // 不正アクセスとみなす
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
     }
     switch ($_POST['mode']) {
         case 'login':
             $this->objLoginFormParam->toLower('login_email');
             $this->arrErr = $this->objLoginFormParam->checkError();
             $arrForm = $this->objLoginFormParam->getHashArray();
             // クッキー保存判定
             if ($arrForm['login_memory'] == "1" && $arrForm['login_email'] != "") {
                 $objCookie->setCookie('login_email', $_POST['login_email']);
             } else {
                 $objCookie->setCookie('login_email', '');
             }
             if (count($this->arrErr) == 0) {
                 // ログイン判定
                 if (!$objCustomer->getCustomerDataFromMobilePhoneIdPass($arrForm['login_pass']) && !$objCustomer->getCustomerDataFromEmailPass($arrForm['login_pass'], $arrForm['login_email'], true)) {
                     // 仮登録の判定
                     $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);
                     }
                 }
             } else {
                 // ログインページに戻る
                 $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_TOP), true);
                 exit;
             }
             // ログインが成功した場合は携帯端末IDを保存する。
             $objCustomer->updateMobilePhoneId();
             /*
              * 携帯メールアドレスが登録されていない場合は,
              * 携帯メールアドレス登録画面へ遷移
              */
             $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;
                 }
             }
             break;
             // 削除
         // 削除
         case 'delete':
             if (SC_Utils_Ex::sfIsInt($_POST['other_deliv_id'])) {
                 $objQuery = new SC_Query();
                 $where = "other_deliv_id = ?";
                 $arrRet = $objQuery->delete("dtb_other_deliv", $where, array($_POST['other_deliv_id']));
                 $this->objFormParam->setValue('select_addr_id', '');
             }
             break;
             // 会員登録住所に送る
         // 会員登録住所に送る
         case 'customer_addr':
             // お届け先がチェックされている場合には更新処理を行う
             if ($_POST['deli'] != "") {
                 // 会員情報の住所を受注一時テーブルに書き込む
                 $this->lfRegistDelivData($uniqid, $objCustomer);
                 // 正常に登録されたことを記録しておく
                 $objSiteSess->setRegistFlag();
                 // お支払い方法選択ページへ移動
                 $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT), true);
                 exit;
             } else {
                 // エラーを返す
                 $arrErr['deli'] = '※ お届け先を選択してください。';
             }
             break;
             // 登録済みの別のお届け先に送る
         // 登録済みの別のお届け先に送る
         case 'other_addr':
             // お届け先がチェックされている場合には更新処理を行う
             if ($_POST['deli'] != "") {
                 if (SC_Utils_Ex::sfIsInt($_POST['other_deliv_id'])) {
                     $objQuery = new SC_Query();
                     $deliv_count = $objQuery->count("dtb_other_deliv", "customer_id=? and other_deliv_id = ?", array($objCustomer->getValue('customer_id'), $_POST['other_deliv_id']));
                     if ($deliv_count != 1) {
                         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
                     }
                     // 登録済みの別のお届け先を受注一時テーブルに書き込む
                     $this->lfRegistOtherDelivData($uniqid, $objCustomer, $_POST['other_deliv_id']);
                     // 正常に登録されたことを記録しておく
                     $objSiteSess->setRegistFlag();
                     // お支払い方法選択ページへ移動
                     $this->sendRedirect($this->getLocation(MOBILE_URL_SHOP_PAYMENT), true);
                     exit;
                 }
             } else {
                 // エラーを返す
                 $arrErr['deli'] = '※ お届け先を選択してください。';
             }
             break;
             // 前のページに戻る
         // 前のページに戻る
         case 'return':
             // 確認ページへ移動
             $this->sendRedirect($this->getLocation(MOBILE_URL_CART_TOP), true);
             exit;
             break;
         default:
             $objQuery = new SC_Query();
             $where = "order_temp_id = ?";
             $arrRet = $objQuery->select("*", "dtb_order_temp", $where, array($uniqid));
             $this->objFormParam->setParam($arrRet[0]);
             break;
     }
     /** 表示処理 **/
     // 会員登録住所の取得
     $col = "name01, name02, pref, addr01, addr02, zip01, zip02";
     $where = "customer_id = ?";
     $objQuery = new SC_Query();
     $arrCustomerAddr = $objQuery->select($col, "dtb_customer", $where, array($_SESSION['customer']['customer_id']));
     // 別のお届け先住所の取得
     $col = "other_deliv_id, name01, name02, pref, addr01, addr02, zip01, zip02";
     $objQuery->setorder("other_deliv_id DESC");
     $objOtherAddr = $objQuery->select($col, "dtb_other_deliv", $where, array($_SESSION['customer']['customer_id']));
     $this->arrAddr = $arrCustomerAddr;
     $cnt = 1;
     foreach ($objOtherAddr as $val) {
         $this->arrAddr[$cnt] = $val;
         $cnt++;
     }
     // 入力値の取得
     if (!isset($arrErr)) {
         $arrErr = array();
     }
     $this->arrForm = $this->objFormParam->getFormParamList();
     $this->arrErr = $arrErr;
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }