/**
  * 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;
     }
 }
 /**
  * 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);
 }