예제 #1
0
 function SC_SiteSession()
 {
     SC_Utils_Ex::sfDomainSessionStart();
     // 前ページでの登録成功判定を引き継ぐ
     $_SESSION['site']['pre_regist_success'] = isset($_SESSION['site']['regist_success']) ? $_SESSION['site']['regist_success'] : "";
     $_SESSION['site']['regist_success'] = false;
     $_SESSION['site']['pre_page'] = isset($_SESSION['site']['now_page']) ? $_SESSION['site']['now_page'] : "";
     $_SESSION['site']['now_page'] = $_SERVER['PHP_SELF'];
 }
예제 #2
0
 function SC_Session()
 {
     // セッション開始
     SC_Utils_Ex::sfDomainSessionStart();
     // セッション情報の保存
     if (isset($_SESSION['cert'])) {
         $this->sid = session_id();
         $this->cert = $_SESSION['cert'];
         $this->login_id = $_SESSION['login_id'];
         $this->authority = $_SESSION['authority'];
         // 管理者:0, 一般:1, 閲覧:2
         $this->member_id = $_SESSION['member_id'];
         if (isset($_SESSION['uniq_id'])) {
             $this->uniqid = $_SESSION['uniq_id'];
         }
         // ログに記録する
         GC_Utils_Ex::gfPrintLog("access : user="******" auth=" . $this->authority . " sid=" . $this->sid);
     } else {
         // ログに記録する
         GC_Utils_Ex::gfPrintLog("access error.");
     }
 }
예제 #3
0
 function SC_SiteView($cart = true)
 {
     parent::SC_View();
     $this->_smarty->template_dir = TEMPLATE_DIR;
     $this->_smarty->compile_dir = COMPILE_DIR;
     $this->initpath();
     // PHP5ではsessionをスタートする前にヘッダー情報を送信していると警告が出るため、先にセッションをスタートするように変更
     SC_Utils_Ex::sfDomainSessionStart();
     if ($cart) {
         $include_dir = realpath(dirname(__FILE__));
         require_once $include_dir . "/SC_CartSession.php";
         $objCartSess = new SC_CartSession();
         $objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
     }
 }
예제 #4
0
 function SC_CampaignSession($key = "campaign")
 {
     SC_Utils_Ex::sfDomainSessionStart();
     $this->key = $key;
 }
예제 #5
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     global $objCampaignSess;
     $conn = new SC_DBConn();
     $this->objView = new SC_SiteView();
     $objCampaignSess = new SC_CampaignSession();
     $objDb = new SC_Helper_DB_Ex();
     $CONF = $objDb->sf_getBasisData();
     // 店舗基本情報
     SC_Utils_Ex::sfDomainSessionStart();
     $objCustomer = new SC_Customer();
     $this->arrData = isset($_SESSION['customer']) ? $_SESSION['customer'] : "";
     // レイアウトデザインを取得
     $layout = new SC_Helper_PageLayout_Ex();
     $layout->sfGetPageLayout($this, false, DEF_LAYOUT);
     //フォーム値変換用カラム
     $arrConvertColumn = 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" => "tel01", "convert" => "n"), array("column" => "tel02", "convert" => "n"), array("column" => "tel03", "convert" => "n"), array("column" => "contents", "convert" => "aKV"));
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'confirm':
             // エラーチェック
             $this->arrForm = $_POST;
             $this->arrForm['email'] = isset($_POST['email']) ? strtolower($_POST['email']) : '';
             $this->arrForm['email02'] = isset($_POST['email02']) ? strtolower($_POST['email02']) : '';
             $this->arrForm = $this->lfConvertParam($this->arrForm, $arrConvertColumn);
             $this->arrErr = $this->lfErrorCheck($this->arrForm);
             if (!$this->arrErr) {
                 // エラー無しで完了画面
                 $this->tpl_mainpage = 'contact/confirm.tpl';
                 $this->tpl_title = 'お問い合わせ(確認ページ)';
             } else {
                 foreach ($this->arrForm as $key => $val) {
                     $this->{$key} = $val;
                 }
             }
             break;
         case 'return':
             foreach ($_POST as $key => $val) {
                 $this->{$key} = $val;
             }
             break;
         case 'complete':
             $this->arrForm = $_POST;
             $this->arrForm['email'] = strtolower($_POST['email']);
             $this->arrForm = $this->lfConvertParam($this->arrForm, $arrConvertColumn);
             $this->arrErr = $this->lfErrorCheck($this->arrForm);
             if (!$this->arrErr) {
                 $this->lfSendMail($CONF, $this);
                 // 完了ページへ移動する
                 $this->sendRedirect($this->getLocation("./complete.php", array(), true));
                 exit;
             } else {
                 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
             }
             break;
         default:
             break;
     }
     //---- ページ表示
     $this->objView->assignobj($this);
     // フレームを選択(キャンペーンページから遷移なら変更)
     $objCampaignSess->pageView($this->objView);
 }
예제 #6
0
 function startSession()
 {
     SC_Utils_Ex::sfDomainSessionStart();
     $_SESSION['customer'] = $this->customer_data;
     // セッション情報の保存
     GC_Utils_Ex::gfPrintLog("access : user="******"\t" . "ip=" . $this->getRemoteHost(), CUSTOMER_LOG_PATH);
 }