Пример #1
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objQuery = new SC_Query();
     $objCustomer = new SC_Customer();
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, "mypage/index.php");
     // ログインチェック
     if (!$objCustomer->isLoginSuccess()) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     } else {
         //マイページトップ顧客情報表示用
         $this->CustomerName1 = $objCustomer->getvalue('name01');
         $this->CustomerName2 = $objCustomer->getvalue('name02');
         $this->CustomerPoint = $objCustomer->getvalue('point');
     }
     // お気に入り削除
     if ($_POST['mode'] == 'delete_favorite') {
         $customer_id = $objCustomer->getValue('customer_id');
         $this->lfDeleteFavoriteProduct($customer_id, $_POST['product_id']);
     }
     //ページ送り用
     if (isset($_POST['pageno'])) {
         $this->tpl_pageno = htmlspecialchars($_POST['pageno'], ENT_QUOTES, CHAR_CODE);
     }
     $col = "*";
     $from = " (SELECT\r\n                        T2.product_id AS product_id_main,\r\n                        T2.del_flg ,\r\n                        T2.status ,\r\n                        T2.name ,\r\n                        T2.main_list_image ,\r\n                        T1.create_date ,\r\n                        T1.customer_id\r\n                    FROM\r\n                       (SELECT\r\n                            product_id AS product_id_c ,\r\n                            create_date ,\r\n                            customer_id\r\n                        FROM\r\n                           dtb_customer_favorite_products\r\n                        ) AS T1 INNER JOIN dtb_products AS T2 ON T1.product_id_c = T2.product_id\r\n                    ) AS T3 INNER JOIN\r\n                        (SELECT\r\n                            product_id ,\r\n                            MIN(price02) AS price02_min ,\r\n                            MAX(price02) AS price02_max ,\r\n                            MAX(stock) AS stock_max ,\r\n                            MAX(stock_unlimited) AS stock_unlimited_max\r\n                         FROM\r\n                            dtb_products_class\r\n                         GROUP BY\r\n                            product_id\r\n                    ) AS T4 ON T3.product_id_main = T4.product_id";
     $where = "customer_id = ? AND del_flg = 0 AND status = 1";
     // 在庫無し商品の非表示
     if (NOSTOCK_HIDDEN === true) {
         $where .= " AND (stock_max >= 1 OR stock_unlimited_max = 1)";
     }
     $order = "create_date DESC";
     $arrval = array($objCustomer->getvalue('customer_id'));
     //お気に入りの数を取得
     $linemax = $objQuery->count($from, $where, $arrval);
     $this->tpl_linemax = $linemax;
     // ページ送りの取得
     $objNavi = new SC_PageNavi($this->tpl_pageno, $linemax, SEARCH_PMAX, "fnNaviPage", NAVI_PMAX);
     $this->tpl_strnavi = $objNavi->strnavi;
     // 表示文字列
     $startno = $objNavi->start_row;
     // 取得範囲の指定(開始行番号、行数のセット)
     $objQuery->setlimitoffset(SEARCH_PMAX, $startno);
     // 表示順序
     $objQuery->setorder($order);
     //お気に入りの取得
     $this->arrFavorite = $objQuery->select($col, $from, $where, $arrval);
     // パラメータ管理クラス
     $this->objFormParam = new SC_FormParam();
     // POST値の取得
     $this->objFormParam->setParam($_POST);
     // 入力情報を渡す
     $this->arrForm = $this->objFormParam->getFormParamList();
     $objView->assignobj($this);
     //$objpage内の全てのテンプレート変数をsmartyに格納
     $objView->display(SITE_FRAME);
     //パスとテンプレート変数の呼び出し、実行
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $layout = new SC_Helper_PageLayout_Ex();
     $layout->sfGetPageLayout($this, false, $_SERVER['SCRIPT_NAME'], $this->objDisplay->detectDevice());
     $this->arrBreadcrumb[0][0] = array();
     switch ($this->arrPageLayout['url']) {
         case 'products/list.php':
             $category_id = $_GET['category_id'];
             if ($category_id) {
                 $this->arrBreadcrumb[0] = self::getBreadcrumbByCategoryId(intval($category_id));
             } else {
                 if ($_GET['mode'] == 'search') {
                     $this->current_name = '検索結果';
                 } else {
                     $this->current_name = '全商品';
                 }
             }
             break;
         case 'products/detail.php':
             $product_id = $_GET['product_id'];
             $this->arrBreadcrumb = SC_Helper_DB_Ex::sfGetMultiCatTree($product_id);
             $objProduct = new SC_Product_Ex();
             $arrProduct = $objProduct->getDetail($product_id);
             $this->current_name = $arrProduct['name'];
             break;
         case 'index.php':
             $this->current_name = '';
             break;
         default:
             $this->current_name = $this->arrPageLayout['page_name'];
             break;
     }
     $this->arrData = self::loadData();
 }
Пример #3
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     global $objCampaignSess;
     $objView = new SC_SiteView();
     $objQuery = new SC_Query();
     $objCampaignSess = new SC_CampaignSession();
     // キャンペーンからの登録の場合の処理
     if ($_GET["cp"] != "") {
         $arrCampaign = $objQuery->select("directory_name", "dtb_campaign", "campaign_id = ?", array($_GET["cp"]));
         // キャンペーンディレクトリ名を保持
         $dir_name = $arrCampaign[0]['directory_name'];
     } else {
         $dir_name = "";
     }
     // レイアウトデザインを取得
     $helper = new SC_Helper_PageLayout_Ex();
     $helper->sfGetPageLayout($this, false, DEF_LAYOUT);
     $objView->assignobj($this);
     // フレームを選択(キャンペーンページから遷移なら変更)
     if ($this->dir_name != "") {
         $objView->display(CAMPAIGN_TEMPLATE_PATH . $dir_name . "/active/site_frame.tpl");
         $objCampaignSess->delCampaign();
     } else {
         $objView->display(SITE_FRAME);
     }
 }
Пример #4
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);
 }
Пример #5
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     // レイアウトデザインを取得
     $layout = new SC_Helper_PageLayout_Ex();
     $layout->sfGetPageLayout($this, false, "index.php");
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 public function action()
 {
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objFormParam = new SC_FormParam_Ex();
     $this->lfInitParam($objFormParam);
     $objFormParam->setParam($_REQUEST);
     $objFormParam->convParam();
     $this->arrErr = $objFormParam->checkError();
     $is_error = !SC_Utils_Ex::isBlank($this->arrErr);
     $this->device_type_id = $objFormParam->getValue('device_type_id', DEVICE_TYPE_PC);
     $this->page_id = $objFormParam->getValue('page_id');
     switch ($this->getMode()) {
         // 削除
         case 'delete':
             if (!$is_error) {
                 if ($objLayout->isEditablePage($this->device_type_id, $this->page_id)) {
                     $objLayout->lfDelPageData($this->page_id, $this->device_type_id);
                     SC_Response_Ex::reload(array('device_type_id' => $this->device_type_id, 'msg' => 'on'), true);
                     SC_Response_Ex::actionExit();
                 }
             }
             break;
             // 登録/編集
         // 登録/編集
         case 'confirm':
             if (!$is_error) {
                 $this->arrErr = $this->lfCheckError($objFormParam, $this->arrErr);
                 if (SC_Utils_Ex::isBlank($this->arrErr)) {
                     $result = $this->doRegister($objFormParam, $objLayout);
                     if ($result !== false) {
                         $arrQueryString = array('device_type_id' => $this->device_type_id, 'page_id' => $result, 'msg' => 'on');
                         SC_Response_Ex::reload($arrQueryString, true);
                         SC_Response_Ex::actionExit();
                     }
                 }
             }
             break;
         default:
             if (isset($_GET['msg']) && $_GET['msg'] == 'on') {
                 $this->tpl_onload = "alert('登録が完了しました。');";
             }
             break;
     }
     if (!$is_error) {
         $this->arrPageList = $objLayout->getPageProperties($this->device_type_id, null);
         // page_id が指定されている場合にはテンプレートデータの取得
         if (!SC_Utils_Ex::isBlank($this->page_id)) {
             $arrPageData = $this->getTplMainpage($this->device_type_id, $this->page_id, $objLayout);
             $objFormParam->setParam($arrPageData);
         }
     } else {
         // 画面にエラー表示しないため, ログ出力
         GC_Utils_Ex::gfPrintLog('Error: ' . print_r($this->arrErr, true));
     }
     $this->tpl_subtitle = $this->arrDeviceType[$this->device_type_id] . '>' . $this->tpl_subtitle;
     $this->arrForm = $objFormParam->getFormParamList();
 }
Пример #7
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objLayout = new SC_Helper_PageLayout_Ex();
     // レイアウトデザインを取得
     $objLayout->sfGetPageLayout($this);
     // 画面の表示
     $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);
 }
Пример #9
0
 /**
  * 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);
 }
Пример #10
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objQuery = new SC_Query();
     $layout = new SC_Helper_PageLayout_Ex();
     $objDb = new SC_Helper_DB_Ex();
     // レイアウトデザインを取得
     $layout->sfGetPageLayout($this, false, DEF_LAYOUT);
     $this->arrRet = $objDb->sf_getBasisData();
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
Пример #11
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $conn = new SC_DBConn();
     $objView = new SC_AdminView();
     $objSess = new SC_Session();
     $objQuery = new SC_Query();
     // 認証可否の判定
     SC_Utils_Ex::sfIsSuccess($objSess);
     // データの取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $this->arrPageData = $objLayout->lfgetPageData(" edit_flg = 2 ");
     if (isset($_POST['page_id'])) {
         $page_id = $_POST['page_id'];
     } else {
         $page_id = "";
     }
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     if ($_POST['mode'] == "confirm") {
         // エラーチェック
         $this->arrErr[$page_id] = $this->lfErrorCheck($_POST['meta'][$page_id]);
         // エラーがなければデータを更新
         if (count($this->arrErr[$page_id]) == 0) {
             // 更新データの変換
             $arrMETA = $this->lfConvertParam($_POST['meta'][$page_id]);
             // 更新データ配列生成
             $arrUpdData = array($arrMETA['author'], $arrMETA['description'], $arrMETA['keyword'], $page_id);
             // データ更新
             $this->lfUpdPageData($arrUpdData);
         } else {
             // POSTのデータを再表示
             $arrPageData = $this->lfSetData($arrPageData, $_POST['meta']);
             $this->arrPageData = $arrPageData;
         }
     }
     $arrDisp_flg = array();
     // エラーがなければデータの取得
     if (count($this->arrErr[$page_id]) == 0) {
         // データの取得
         $arrPageData = $objLayout->lfgetPageData(" edit_flg = 2 ");
         $this->arrPageData = $arrPageData;
     }
     // 表示・非表示切り替え
     foreach ($arrPageData as $key => $val) {
         $arrDisp_flg[$val['page_id']] = $_POST['disp_flg' . $val['page_id']];
     }
     $this->disp_flg = $arrDisp_flg;
     $objView->assignobj($this);
     $objView->display(MAIN_FRAME);
 }
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objCustomer = new SC_Customer();
     //マイページトップ顧客情報表示用
     $this->CustomerName1 = $objCustomer->getvalue('name01');
     $this->CustomerName2 = $objCustomer->getvalue('name02');
     $this->CustomerPoint = $objCustomer->getvalue('point');
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, "mypage/index.php");
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
Пример #13
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     global $objCampaignSess;
     $objView = new SC_SiteView();
     $objCampaignSess = new SC_CampaignSession();
     // レイアウトデザインを取得
     $layout = new SC_Helper_PageLayout_Ex();
     $layout->sfGetPageLayout($this, false, DEF_LAYOUT);
     // キャンペーンからの遷移かチェック
     $this->is_campaign = $objCampaignSess->getIsCampaign();
     $this->campaign_dir = $objCampaignSess->getCampaignDir();
     $objView->assignobj($this);
     // フレームを選択(キャンペーンページから遷移なら変更)
     $objCampaignSess->pageView($objView);
 }
Пример #14
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objSess = new SC_Session();
     SC_Utils_Ex::sfIsSuccess($objSess);
     if (isset($_SESSION['preview']) && $_SESSION['preview'] === "ON") {
         // レイアウトデザインを取得
         $objLayout = new SC_Helper_PageLayout_Ex();
         $objLayout->sfGetPageLayout($this, true);
         // 画面の表示
         $objView->assignobj($this);
         $objView->display(SITE_FRAME);
         return;
     }
     SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, "", false, "", true);
 }
Пример #15
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objQuery = new SC_Query();
     $objCustomer = new SC_Customer();
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, "mypage/index.php");
     // ログインチェック
     if (!$objCustomer->isLoginSuccess()) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     } else {
         //マイページトップ顧客情報表示用
         $this->CustomerName1 = $objCustomer->getvalue('name01');
         $this->CustomerName2 = $objCustomer->getvalue('name02');
         $this->CustomerPoint = $objCustomer->getvalue('point');
     }
     //ページ送り用
     if (isset($_POST['pageno'])) {
         $this->tpl_pageno = htmlspecialchars($_POST['pageno'], ENT_QUOTES, CHAR_CODE);
     }
     $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;
     // ページ送りの取得
     $objNavi = new SC_PageNavi($this->tpl_pageno, $linemax, SEARCH_PMAX, "fnNaviPage", NAVI_PMAX);
     $this->tpl_strnavi = $objNavi->strnavi;
     // 表示文字列
     $startno = $objNavi->start_row;
     // 取得範囲の指定(開始行番号、行数のセット)
     $objQuery->setlimitoffset(SEARCH_PMAX, $startno);
     // 表示順序
     $objQuery->setorder($order);
     //購入履歴の取得
     $this->arrOrder = $objQuery->select($col, $from, $where, $arrval);
     // 支払い方法の取得
     $objDb = new SC_Helper_DB_Ex();
     $this->arrPayment = $objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method");
     $objView->assignobj($this);
     //$objpage内の全てのテンプレート変数をsmartyに格納
     $objView->display(SITE_FRAME);
     //パスとテンプレート変数の呼び出し、実行
 }
Пример #16
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);
 }
Пример #17
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 public function process()
 {
     parent::process();
     $objView = new SC_SiteView_Ex();
     $objSess = new SC_Session_Ex();
     SC_Utils_Ex::sfIsSuccess($objSess);
     if (isset($_SESSION['preview']) && $_SESSION['preview'] === 'ON') {
         // プレビュー用のレイアウトデザインを取得
         $objLayout = new SC_Helper_PageLayout_Ex();
         $objLayout->sfGetPageLayout($this, true);
         // 画面の表示
         $objView->assignobj($this);
         $objView->display(SITE_FRAME);
         return;
     }
     SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
 }
Пример #18
0
 /**
  * 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);
 }
Пример #19
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     // 開始時刻を設定する。
     $this->timeStart = SC_Utils_Ex::sfMicrotimeFloat();
     $this->tpl_authority = $_SESSION['authority'];
     // ディスプレイクラス生成
     $this->objDisplay = new SC_Display_Ex();
     $layout = new SC_Helper_PageLayout_Ex();
     $layout->sfGetPageLayout($this, false, $_SERVER['PHP_SELF'], $this->objDisplay->detectDevice());
     // プラグインクラス生成
     $this->objPlugin = new SC_Helper_Plugin_Ex();
     $this->objPlugin->preProcess($this);
     // 店舗基本情報取得
     $this->arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisData();
     // トランザクショントークンの検証と生成
     $this->doValidToken();
     $this->setTokenTo();
 }
 /**
  * ブロックファイルに応じて tpl_mainpage を設定する
  *
  * @param  string $bloc_file ブロックファイル名
  * @return void
  */
 public function setTplMainpage($bloc_file)
 {
     if (SC_Utils_Ex::isAbsoluteRealPath($bloc_file)) {
         $this->tpl_mainpage = $bloc_file;
     } else {
         $this->tpl_mainpage = SC_Helper_PageLayout_Ex::getTemplatePath($this->objDisplay->detectDevice()) . BLOC_DIR . $bloc_file;
     }
     $this->setTemplate($this->tpl_mainpage);
 }
Пример #21
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objCustomer = new SC_Customer();
     $objQuery = new SC_Query();
     $objSiteSess = new SC_SiteSession();
     //ログイン判定
     if (!$objCustomer->isLoginSuccess()) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     } else {
         //マイページトップ顧客情報表示用
         $this->CustomerName1 = $objCustomer->getvalue('name01');
         $this->CustomerName2 = $objCustomer->getvalue('name02');
         $this->CustomerPoint = $objCustomer->getvalue('point');
     }
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, "mypage/index.php");
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'confirm':
             $this->tpl_mainpage = TEMPLATE_DIR . 'mypage/refusal_confirm.tpl';
             $this->tpl_title = "MYページ/退会手続き(確認ページ)";
             // 確認ページを経由したことを登録
             $objSiteSess->setRegistFlag();
             // hiddenにuniqidを埋め込む
             $this->tpl_uniqid = $objSiteSess->getUniqId();
             break;
         case 'complete':
             // 正しい遷移かどうかをチェック
             $this->lfIsValidMovement($objSiteSess);
             //会員削除
             $objQuery->exec("UPDATE dtb_customer SET del_flg=1, update_date=now() WHERE customer_id=?", array($objCustomer->getValue('customer_id')));
             $objCustomer->EndSession();
             //完了ページへ
             $this->sendRedirect($this->getLocation("./refusal_complete.php"));
             exit;
     }
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objCustomer = new SC_Customer();
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, "mypage/index.php");
     //ログイン判定
     if (!$objCustomer->isLoginSuccess()) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     } else {
         //マイページトップ顧客情報表示用
         $this->CustomerName1 = $objCustomer->getvalue('name01');
         $this->CustomerName2 = $objCustomer->getvalue('name02');
         $this->CustomerPoint = $objCustomer->getvalue('point');
     }
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
Пример #23
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     // 開始時刻を設定する。
     $this->timeStart = microtime(true);
     $this->tpl_authority = $_SESSION['authority'];
     // ディスプレイクラス生成
     $this->objDisplay = new SC_Display_Ex();
     $layout = new SC_Helper_PageLayout_Ex();
     $layout->sfGetPageLayout($this, false, $_SERVER['SCRIPT_NAME'], $this->objDisplay->detectDevice());
     // スーパーフックポイントを実行.
     $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
     $objPlugin->doAction('LC_Page_preProcess', array($this));
     // 店舗基本情報取得
     $this->arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisData();
     // トランザクショントークンの検証と生成
     $this->doValidToken();
     $this->setTokenTo();
     // ローカルフックポイントを実行.
     $this->doLocalHookpointBefore($objPlugin);
 }
Пример #24
0
 /**
  * ブロックファイルに応じて tpl_mainpage を設定する
  *
  * @param string $bloc_file ブロックファイル名
  * @return void
  */
 function setTplMainpage($bloc_file)
 {
     if (SC_Utils_Ex::isAbsoluteRealPath($bloc_file)) {
         $this->tpl_mainpage = $bloc_file;
     } else {
         $this->tpl_mainpage = SC_Helper_PageLayout_Ex::getTemplatePath($this->objDisplay->detectDevice()) . BLOC_DIR . $bloc_file;
     }
     $this->setTemplate($this->tpl_mainpage);
     $debug_message = "block:" . $this->tpl_mainpage . "\n";
     GC_Utils_Ex::gfDebugLog($debug_message);
 }
Пример #25
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objCustomer = new SC_Customer();
     //ログイン判定
     if (!$objCustomer->isLoginSuccess()) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     } else {
         //マイページトップ顧客情報表示用
         $this->CustomerName1 = $objCustomer->getvalue('name01');
         $this->CustomerName2 = $objCustomer->getvalue('name02');
         $this->CustomerPoint = $objCustomer->getvalue('point');
     }
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, "mypage/index.php");
     $mode = isset($_POST['mode']) ? $_POST['mode'] : '';
     $customerId = $objCustomer->getValue('customer_id');
     switch ($mode) {
         // お届け先の削除
         case 'delete':
             $objForm = $this->initParam();
             if ($objForm->checkError()) {
                 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
                 exit;
             }
             $this->deleteOtherDeliv($customerId, $objForm->getValue('other_deliv_id'));
             break;
             // お届け先の表示
         // お届け先の表示
         default:
             break;
     }
     //別のお届け先情報
     $this->arrOtherDeliv = $this->getOtherDeliv($customerId);
     //お届け先登録数
     $this->tpl_linemax = count($this->arrOtherDeliv);
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $objPagelayout = new SC_Helper_PageLayout_Ex();
     $php_path_dir = HTML_REALDIR;
     $tpl_path_dir = $objPagelayout->getTemplatePath(SC_Display_Ex::$device) . BLOC_DIR;
     $this->arrPageLayout["HeadNavi"] = array();
     $this->arrPageLayout["HeadNavi"][] = array("bloc_name" => "【全ページ】CSS設定", "tpl_path" => "{$tpl_path_dir}settings_css.tpl", "filename" => "settings_css", "php_path" => false ? $php_path_dir : "");
     $this->arrPageLayout["BottomNavi"] = array();
     $this->arrPageLayout["BottomNavi"][] = array("bloc_name" => "【全ページ】フッターナビ共通", "tpl_path" => "{$tpl_path_dir}navi_footer_common.tpl", "filename" => "navi_footer_common", "php_path" => false ? $php_path_dir : "");
     //
     $objCustomer = new SC_Customer_Ex();
     // 画面更新毎に情報を更新する
     if ($objCustomer->isLoginSuccess()) {
         // 初回アクセス時に更新
         $objCustomer->updateSession();
         $this->tpl_login = true;
         // ポイントだけは抑止
         $this->tpl_point = $_SESSION["customer"]["point"];
         $this->tpl_customer_id = $objCustomer->getValue("customer_id");
         $this->tpl_first_buy_date = $objCustomer->getValue("first_buy_date");
         $this->tpl_carrier = $objCustomer->getValue("carrier");
     }
 }
 /**
  * ブロックのテンプレートを取得する.
  *
  * @param integer $device_type_id 端末種別ID
  * @param integer $bloc_id ブロックID
  * @param SC_Helper_PageLayout $objLayout SC_Helper_PageLayout インスタンス
  * @return array ブロック情報の配列
  */
 function getBlocTemplate($device_type_id, $bloc_id, &$objLayout)
 {
     $arrBloc = $objLayout->getBlocs($device_type_id, 'bloc_id = ?', array($bloc_id));
     if (SC_Utils_Ex::isAbsoluteRealPath($arrBloc[0]['tpl_path'])) {
         $tpl_path = $arrBloc[0]['tpl_path'];
     } else {
         $tpl_path = SC_Helper_PageLayout_Ex::getTemplatePath($device_type_id) . BLOC_DIR . $arrBloc[0]['tpl_path'];
     }
     $objBlob = new SC_Helper_Blob_Ex();
     $containerName = $objBlob->getTemplateContainerName($device_type_id);
     if ($objBlob->blobExists($containerName, $arrBloc[0]['filename'] . ".tpl")) {
         $arrBloc[0]['bloc_html'] = $objBlob->getBlobData($containerName, BLOC_DIR . $arrBloc[0]['filename'] . ".tpl");
     }
     return $arrBloc[0];
 }
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objQuery = new SC_Query();
     $objCustomer = new SC_Customer();
     $objDb = new SC_Helper_DB_Ex();
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, "mypage/index.php");
     //不正アクセス判定
     $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() || $cnt == 0) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     } 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');
     }
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData("mtb_pref", array("pref_id", "pref_name", "rank"));
     $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
 /**
  * テンプレートパスをアサインする.
  *
  * @param integer $device_type_id 端末種別ID
  */
 function assignTemplatePath($device_type_id)
 {
     // テンプレート変数を割り当て
     $this->assign("TPL_URLPATH", SC_Helper_PageLayout_Ex::getUserDir($device_type_id, true));
     // ヘッダとフッタを割り当て
     $templatePath = SC_Helper_PageLayout_Ex::getTemplatePath($device_type_id);
     $header_tpl = $templatePath . "header.tpl";
     $footer_tpl = $templatePath . "footer.tpl";
     $this->assign("header_tpl", $header_tpl);
     $this->assign("footer_tpl", $footer_tpl);
 }