/**
  * Page のプロセス.
  *
  * @return void
  */
 function action()
 {
     $objSiteSess = new SC_SiteSession_Ex();
     $objCartSess = new SC_CartSession_Ex();
     $objCustomer = new SC_Customer_Ex();
     $objCookie = new SC_Cookie_Ex();
     $objPurchase = new SC_Helper_Purchase_Ex();
     $objFormParam = new SC_FormParam_Ex();
     $nonmember_mainpage = 'shopping/nonmember_input.tpl';
     $nonmember_title = 'お客様情報入力';
     $this->tpl_uniqid = $objSiteSess->getUniqId();
     $objPurchase->verifyChangeCart($this->tpl_uniqid, $objCartSess);
     $this->cartKey = $objCartSess->getKey();
     // ログイン済みの場合は次画面に遷移
     if ($objCustomer->isLoginSuccess(true)) {
         SC_Response_Ex::sendRedirect($this->getNextlocation($this->cartKey, $this->tpl_uniqid, $objCustomer, $objPurchase, $objSiteSess));
         SC_Response_Ex::actionExit();
     } else {
         if ($this->cartKey == PRODUCT_TYPE_DOWNLOAD) {
             $msg = 'ダウンロード商品を含むお買い物は、会員登録が必要です。<br/>' . 'お手数ですが、会員登録をお願いします。';
             SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, $objSiteSess, false, $msg);
             SC_Response_Ex::actionExit();
         }
     }
     switch ($this->getMode()) {
         // ログイン実行
         case 'login':
             $this->lfInitLoginFormParam($objFormParam);
             $objFormParam->setParam($_POST);
             $objFormParam->trimParam();
             $objFormParam->convParam();
             $objFormParam->toLower('login_email');
             $this->arrErr = $objFormParam->checkError();
             // ログイン判定
             if (SC_Utils_Ex::isBlank($this->arrErr) && $objCustomer->doLogin($objFormParam->getValue('login_email'), $objFormParam->getValue('login_pass'))) {
                 // モバイルサイトで携帯アドレスの登録が無い場合、携帯アドレス登録ページへ遷移
                 if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
                     if (!$objCustomer->hasValue('email_mobile')) {
                         SC_Response_Ex::sendRedirectFromUrlPath('entry/email_mobile.php');
                         SC_Response_Ex::actionExit();
                     }
                 } elseif (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
                     echo SC_Utils_Ex::jsonEncode(array('success' => $this->getNextLocation($this->cartKey, $this->tpl_uniqid, $objCustomer, $objPurchase, $objSiteSess)));
                     SC_Response_Ex::actionExit();
                 }
                 SC_Response_Ex::sendRedirect($this->getNextLocation($this->cartKey, $this->tpl_uniqid, $objCustomer, $objPurchase, $objSiteSess));
                 SC_Response_Ex::actionExit();
             } else {
                 // 仮登録の場合
                 if (SC_Helper_Customer_Ex::checkTempCustomer($objFormParam->getValue('login_email'))) {
                     if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
                         echo $this->lfGetErrorMessage(TEMP_LOGIN_ERROR);
                         SC_Response_Ex::actionExit();
                     } else {
                         SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
                         SC_Response_Ex::actionExit();
                     }
                 } else {
                     if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
                         echo $this->lfGetErrorMessage(SITE_LOGIN_ERROR);
                         SC_Response_Ex::actionExit();
                     } else {
                         SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR);
                         SC_Response_Ex::actionExit();
                     }
                 }
             }
             break;
             // お客様情報登録
         // お客様情報登録
         case 'nonmember_confirm':
             $this->tpl_mainpage = $nonmember_mainpage;
             $this->tpl_title = $nonmember_title;
             $this->lfInitParam($objFormParam);
             $objFormParam->setParam($_POST);
             $this->arrErr = $this->lfCheckError($objFormParam);
             if (SC_Utils_Ex::isBlank($this->arrErr)) {
                 $this->lfRegistData($this->tpl_uniqid, $objPurchase, $objCustomer, $objFormParam);
                 $arrParams = $objFormParam->getHashArray();
                 $shipping_id = $arrParams['deliv_check'] == '1' ? 1 : 0;
                 $objPurchase->setShipmentItemTempForSole($objCartSess, $shipping_id);
                 $objSiteSess->setRegistFlag();
                 SC_Response_Ex::sendRedirect(SHOPPING_PAYMENT_URLPATH);
                 SC_Response_Ex::actionExit();
             }
             break;
             // 前のページに戻る
         // 前のページに戻る
         case 'return':
             SC_Response_Ex::sendRedirect(CART_URLPATH);
             SC_Response_Ex::actionExit();
             break;
             // 複数配送ページへ遷移
         // 複数配送ページへ遷移
         case 'multiple':
             // 複数配送先指定が無効な場合はエラー
             if (USE_MULTIPLE_SHIPPING === false) {
                 SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
                 SC_Response_Ex::actionExit();
             }
             $this->lfInitParam($objFormParam);
             $objFormParam->setParam($_POST);
             $this->arrErr = $this->lfCheckError($objFormParam);
             if (SC_Utils_Ex::isBlank($this->arrErr)) {
                 $this->lfRegistData($this->tpl_uniqid, $objPurchase, $objCustomer, $objFormParam, true);
                 $objSiteSess->setRegistFlag();
                 SC_Response_Ex::sendRedirect(MULTIPLE_URLPATH);
                 SC_Response_Ex::actionExit();
             }
             $this->tpl_mainpage = $nonmember_mainpage;
             $this->tpl_title = $nonmember_title;
             break;
             // お客様情報入力ページの表示
         // お客様情報入力ページの表示
         case 'nonmember':
             $this->tpl_mainpage = $nonmember_mainpage;
             $this->tpl_title = $nonmember_title;
             $this->lfInitParam($objFormParam);
             // ※breakなし
         // ※breakなし
         default:
             // 前のページから戻ってきた場合は, お客様情報入力ページ
             if (isset($_GET['from']) && $_GET['from'] == 'nonmember') {
                 $this->tpl_mainpage = $nonmember_mainpage;
                 $this->tpl_title = $nonmember_title;
                 $this->lfInitParam($objFormParam);
             } else {
                 $this->lfInitLoginFormParam($objFormParam);
             }
             $this->setFormParams($objFormParam, $objPurchase, $this->tpl_uniqid);
             break;
     }
     // 記憶したメールアドレスを取得
     $this->tpl_login_email = $objCookie->getCookie('login_email');
     if (!SC_Utils_Ex::isBlank($this->tpl_login_email)) {
         $this->tpl_login_memory = '1';
     }
     // 入力値の取得
     $this->arrForm = $objFormParam->getFormParamList();
     // 携帯端末IDが一致する会員が存在するかどうかをチェックする。
     if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
         $this->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();
     }
 }