/**
  * 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();
 }
Exemplo n.º 2
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);
     //パスとテンプレート変数の呼び出し、実行
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 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);
 }
Exemplo n.º 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);
 }
Exemplo n.º 6
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);
 }
Exemplo n.º 8
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);
 }
Exemplo n.º 9
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);
 }
 /**
  * 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);
 }
Exemplo n.º 11
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);
 }
Exemplo n.º 12
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);
 }
Exemplo n.º 13
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);
     //パスとテンプレート変数の呼び出し、実行
 }
Exemplo n.º 14
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);
 }
Exemplo n.º 15
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);
 }
Exemplo n.º 16
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);
 }
Exemplo n.º 17
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();
 }
 /**
  * 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);
 }
Exemplo n.º 19
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);
 }
Exemplo n.º 20
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);
 }
Exemplo n.º 21
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 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);
 }
Exemplo n.º 23
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);
 }
Exemplo n.º 24
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $conn = new SC_DBConn();
     $objDb = new SC_Helper_DB_Ex();
     //表示件数の選択
     if (isset($_POST['disp_number']) && SC_Utils_Ex::sfIsInt($_POST['disp_number'])) {
         $this->disp_number = $_POST['disp_number'];
     } else {
         //最小表示件数を選択
         $this->disp_number = current(array_keys($this->arrPRODUCTLISTMAX));
     }
     //表示順序の保存
     $this->orderby = isset($_POST['orderby']) ? $_POST['orderby'] : "";
     // GETのカテゴリIDを元に正しいカテゴリIDを取得する。
     $arrCategory_id = $objDb->sfGetCategoryId("", $_GET['category_id']);
     if (!isset($_GET['mode'])) {
         $_GET['mode'] = "";
     }
     if (!isset($_GET['name'])) {
         $_GET['name'] = "";
     }
     if (!isset($_POST['orderby'])) {
         $_POST['orderby'] = "";
     }
     if (empty($arrCategory_id)) {
         $arrCategory_id = array("0");
     }
     // タイトル編集
     $tpl_subtitle = "";
     if ($_GET['mode'] == 'search') {
         $tpl_subtitle = "検索結果";
     } elseif (empty($arrCategory_id[0])) {
         $tpl_subtitle = "全商品";
     } else {
         $arrFirstCat = $objDb->sfGetFirstCat($arrCategory_id[0]);
         $tpl_subtitle = $arrFirstCat['name'];
     }
     $objQuery = new SC_Query();
     $count = $objQuery->count("dtb_best_products", "category_id = ?", $arrCategory_id);
     // 以下の条件でBEST商品を表示する
     // ・BEST最大数の商品が登録されている。
     // ・カテゴリIDがルートIDである。
     // ・検索モードでない。
     if ($count >= BEST_MIN && $this->lfIsRootCategory($arrCategory_id[0]) && $_GET['mode'] != 'search') {
         // 商品TOPの表示処理
         $this->arrBestItems = SC_Utils_Ex::sfGetBestProducts($conn, $arrCategory_id[0]);
         $this->BEST_ROOP_MAX = ceil((BEST_MAX - 1) / 2);
     } else {
         if ($_GET['mode'] == 'search' && strlen($_GET['category_id']) == 0) {
             // 検索時にcategory_idがGETに存在しない場合は、仮に埋めたIDを空白に戻す
             $arrCategory_id = array(0);
         }
         // 商品一覧の表示処理
         $this->lfDispProductsList($arrCategory_id[0], $_GET['name'], $this->disp_number, $_POST['orderby']);
         // 検索条件を画面に表示
         // カテゴリー検索条件
         if (strlen($_GET['category_id']) == 0) {
             $arrSearch['category'] = "指定なし";
         } else {
             $arrCat = $conn->getOne("SELECT category_name FROM dtb_category WHERE category_id = ?", $arrCategory_id);
             $arrSearch['category'] = $arrCat;
         }
         // 商品名検索条件
         if ($_GET['name'] === "") {
             $arrSearch['name'] = "指定なし";
         } else {
             $arrSearch['name'] = $_GET['name'];
         }
     }
     // レイアウトデザインを取得
     $layout = new SC_Helper_PageLayout_Ex();
     $layout->sfGetPageLayout($this, false, "products/list.php");
     if (isset($_POST['mode']) && $_POST['mode'] == "cart" && $_POST['product_id'] != "") {
         // 値の正当性チェック
         if (!SC_Utils_Ex::sfIsInt($_POST['product_id']) || !$objDb->sfIsRecord("dtb_products", "product_id", $_POST['product_id'], "del_flg = 0 AND status = 1")) {
             SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
         } else {
             // 入力値の変換
             $this->arrErr = $this->lfCheckError($_POST['product_id']);
             if (count($this->arrErr) == 0) {
                 $objCartSess = new SC_CartSession();
                 $classcategory_id = "classcategory_id" . $_POST['product_id'];
                 $classcategory_id1 = $_POST[$classcategory_id . '_1'];
                 $classcategory_id2 = $_POST[$classcategory_id . '_2'];
                 $quantity = "quantity" . $_POST['product_id'];
                 // 規格1が設定されていない場合
                 if (!$this->tpl_classcat_find1[$_POST['product_id']]) {
                     $classcategory_id1 = '0';
                 }
                 // 規格2が設定されていない場合
                 if (!$this->tpl_classcat_find2[$_POST['product_id']]) {
                     $classcategory_id2 = '0';
                 }
                 $objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
                 $objCartSess->addProduct(array($_POST['product_id'], $classcategory_id1, $classcategory_id2), $_POST[$quantity]);
                 $this->sendRedirect($this->getLocation(URL_CART_TOP));
                 exit;
             }
         }
     }
     $this->tpl_subtitle = $tpl_subtitle;
     // 支払方法の取得
     $this->arrPayment = $this->lfGetPayment();
     // 入力情報を渡す
     $this->arrForm = $_POST;
     $this->lfConvertParam();
     $this->category_id = $arrCategory_id[0];
     $this->arrSearch = $arrSearch;
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
Exemplo n.º 25
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $this->objQuery = new SC_Query();
     $this->objCustomer = new SC_Customer();
     $this->objFormParam = new SC_FormParam();
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, "mypage/index.php");
     //日付プルダウン設定
     $objDate = new SC_Date(1901);
     $this->arrYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // ログインチェック
     if (!$this->objCustomer->isLoginSuccess()) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     } else {
         //マイページトップ顧客情報表示用
         $this->CustomerName1 = $this->objCustomer->getvalue('name01');
         $this->CustomerName2 = $this->objCustomer->getvalue('name02');
         $this->CustomerPoint = $this->objCustomer->getvalue('point');
     }
     //---- 登録用カラム配列
     $arrRegistColumn = 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" => "email_mobile", "convert" => "a"), array("column" => "tel01", "convert" => "n"), array("column" => "tel02", "convert" => "n"), array("column" => "tel03", "convert" => "n"), array("column" => "fax01", "convert" => "n"), array("column" => "fax02", "convert" => "n"), array("column" => "fax03", "convert" => "n"), array("column" => "sex", "convert" => "n"), array("column" => "job", "convert" => "n"), array("column" => "birth", "convert" => "n"), array("column" => "password", "convert" => "an"), array("column" => "reminder", "convert" => "n"), array("column" => "reminder_answer", "convert" => "aKV"), array("column" => "mailmaga_flg", "convert" => "n"));
     //メールアドレス種別
     $arrMailType = array("email" => true, "email_mobile" => true);
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'confirm':
             //エラーなしでかつメールアドレスが重複していない場合
             if ($this->checkErrorTotal($arrRegistColumn, $arrMailType)) {
                 //確認ページへ
                 $this->tpl_mainpage = TEMPLATE_DIR . 'mypage/change_confirm.tpl';
                 $this->tpl_title = 'MYページ/会員登録内容変更(確認ページ)';
                 $passlen = strlen($this->arrForm['password']);
                 $this->passlen = $this->lfPassLen($passlen);
             } else {
                 $this->lfFormReturn($this->arrForm, $this);
             }
             break;
         case 'return':
             $this->arrForm = $_POST;
             $this->lfFormReturn($this->arrForm, $this);
             break;
         case 'gmo_oneclick':
             sfGMOMypageEdit();
             $this->arrForm = $this->lfGetCustomerData();
             $this->arrForm['password'] = DEFAULT_PASSWORD;
             $this->arrForm['password02'] = DEFAULT_PASSWORD;
             break;
         case 'complete':
             //エラーなしでかつメールアドレスが重複していない場合
             if ($this->checkErrorTotal($arrRegistColumn, $arrMailType)) {
                 $this->arrForm['customer_id'] = $this->objCustomer->getValue('customer_id');
                 //-- 編集登録
                 $objDb = new SC_Helper_DB_Ex();
                 $objDb->sfEditCustomerData($this->arrForm, $arrRegistColumn);
                 //セッション情報を最新の状態に更新する
                 $this->objCustomer->updateSession();
                 // Do楽SNS連携モジュールユーザ情報更新処理
                 if (function_exists('sfUpdateSourakuSNSUserInfo')) {
                     sfUpdateSourakuSNSUserInfo();
                 }
                 //完了ページへ
                 $this->sendRedirect($this->getLocation("./change_complete.php"));
                 exit;
             } else {
                 SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
             }
             break;
         default:
             //顧客情報取得
             $this->arrForm = $this->lfGetCustomerData();
             $this->arrForm['password'] = DEFAULT_PASSWORD;
             $this->arrForm['password02'] = DEFAULT_PASSWORD;
             break;
     }
     //誕生日データ登録の有無
     $arrCustomer = $this->lfGetCustomerData();
     if ($arrCustomer['birth'] != "") {
         $this->birth_check = true;
     }
     $objView->assignobj($this);
     //$objpage内の全てのテンプレート変数をsmartyに格納
     $objView->display(SITE_FRAME);
     //パスとテンプレート変数の呼び出し、実行
 }
Exemplo n.º 26
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     //---- ページ初期設定
     $objDb = new SC_Helper_DB_Ex();
     $objMobile = new SC_Helper_Mobile_Ex();
     $CONF = $objDb->sf_getBasisData();
     // 店舗基本情報
     $objConn = new SC_DbConn();
     $objView = new SC_MobileView();
     $objCustomer = new SC_Customer();
     $objDate = new SC_Date(START_BIRTH_YEAR, date("Y", strtotime("now")));
     // 空メール
     if (isset($_SESSION['mobile']['kara_mail_from'])) {
         $_POST['email'] = $_SESSION['mobile']['kara_mail_from'];
         $this->tpl_kara_mail_from = $_POST['email'];
     } elseif (MOBILE_USE_KARA_MAIL) {
         $token = $objMobile->gfPrepareKaraMail('entry/index.php');
         if ($token !== false) {
             $this->tpl_mainpage = 'entry/mail.tpl';
             $this->tpl_title = '会員登録(空メール)';
             $this->tpl_kara_mail_to = MOBILE_KARA_MAIL_ADDRESS_USER . MOBILE_KARA_MAIL_ADDRESS_DELIMITER . 'entry_' . $token . '@' . MOBILE_KARA_MAIL_ADDRESS_DOMAIN;
             $this->tpl_from_address = $CONF['email03'];
         }
     }
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     //---- 登録用カラム配列
     $arrRegistColumn = 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" => "email2", "convert" => "a"), array("column" => "email_mobile", "convert" => "a"), array("column" => "email_mobile2", "convert" => "a"), array("column" => "tel01", "convert" => "n"), array("column" => "tel02", "convert" => "n"), array("column" => "tel03", "convert" => "n"), array("column" => "fax01", "convert" => "n"), array("column" => "fax02", "convert" => "n"), array("column" => "fax03", "convert" => "n"), array("column" => "sex", "convert" => "n"), array("column" => "job", "convert" => "n"), array("column" => "birth", "convert" => "n"), array("column" => "reminder", "convert" => "n"), array("column" => "reminder_answer", "convert" => "aKV"), array("column" => "password", "convert" => "a"), array("column" => "password02", "convert" => "a"), array("column" => "mailmaga_flg", "convert" => "n"));
     //---- 登録除外用カラム配列
     $arrRejectRegistColumn = array("year", "month", "day", "email02", "email_mobile02", "password02");
     if ($_SERVER["REQUEST_METHOD"] == "POST") {
         //-- POSTデータの引き継ぎ
         $this->arrForm = $_POST;
         if (isset($this->arrForm['year']) && $this->arrForm['year'] == '----') {
             $this->arrForm['year'] = '';
         }
         $this->arrForm['email'] = strtolower($this->arrForm['email']);
         // emailはすべて小文字で処理
         //-- 入力データの変換
         $this->arrForm = $this->lfConvertParam($this->arrForm, $arrRegistColumn);
         // 戻るボタン用処理
         if (!empty($_POST["return"])) {
             switch ($_POST["mode"]) {
                 case "complete":
                     $_POST["mode"] = "set3";
                     break;
                 case "confirm":
                     $_POST["mode"] = "set2";
                     break;
                 default:
                     $_POST["mode"] = "set1";
                     break;
             }
         }
         //-- 入力エラーチェック
         if ($_POST["mode"] == "set1") {
             $this->arrErr = $this->lfErrorCheck1($this->arrForm);
             $this->tpl_mainpage = 'entry/index.tpl';
             $this->tpl_title = '会員登録(1/3)';
         } elseif ($_POST["mode"] == "set2") {
             $this->arrErr = $this->lfErrorCheck2($this->arrForm);
             $this->tpl_mainpage = 'entry/set1.tpl';
             $this->tpl_title = '会員登録(2/3)';
         } else {
             $this->arrErr = $this->lfErrorCheck3($this->arrForm);
             $this->tpl_mainpage = 'entry/set2.tpl';
             $this->tpl_title = '会員登録(3/3)';
         }
         foreach ($this->arrForm as $key => $val) {
             $this->{$key} = $val;
         }
         if ($this->arrErr || !empty($_POST["return"])) {
             // 入力エラーのチェック
             //-- データの設定
             if ($_POST["mode"] == "set1") {
                 $checkVal = array("email", "password", "reminder", "reminder_answer", "name01", "name02", "kana01", "kana02");
             } elseif ($_POST["mode"] == "set2") {
                 $checkVal = array("sex", "year", "month", "day", "zip01", "zip02");
             } else {
                 $checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03", "mailmaga_flg");
             }
             foreach ($this->arrForm as $key => $val) {
                 if ($key != "mode" && $key != "submit" && $key != "return" && $key != session_name() && !in_array($key, $checkVal)) {
                     $this->list_data[$key] = $val;
                 }
             }
         } else {
             //-- テンプレート設定
             if ($_POST["mode"] == "set1") {
                 $this->tpl_mainpage = 'entry/set1.tpl';
                 $this->tpl_title = '会員登録(2/3)';
             } elseif ($_POST["mode"] == "set2") {
                 $this->tpl_mainpage = 'entry/set2.tpl';
                 $this->tpl_title = '会員登録(3/3)';
                 if (@$this->arrForm['pref'] == "" && @$this->arrForm['addr01'] == "" && @$this->arrForm['addr02'] == "") {
                     $address = $this->lfGetAddress($_REQUEST['zip01'] . $_REQUEST['zip02']);
                     $this->pref = @$address[0]['state'];
                     $this->addr01 = @$address[0]['city'] . @$address[0]['town'];
                 }
             } elseif ($_POST["mode"] == "confirm") {
                 //パスワード表示
                 $passlen = strlen($this->arrForm['password']);
                 $this->passlen = $this->lfPassLen($passlen);
                 //メール受け取り
                 if (!isset($this->arrForm['mailmaga_flg'])) {
                     $this->arrForm['mailmaga_flg'] = "";
                 }
                 if (strtolower($this->arrForm['mailmaga_flg']) == "on") {
                     $this->arrForm['mailmaga_flg'] = "2";
                 } else {
                     $this->arrForm['mailmaga_flg'] = "3";
                 }
                 $this->tpl_mainpage = 'entry/confirm.tpl';
                 $this->tpl_title = '会員登録(確認ページ)';
             }
             //-- データ設定
             unset($this->list_data);
             if ($_POST["mode"] == "set1") {
                 $checkVal = array("sex", "year", "month", "day", "zip01", "zip02");
             } elseif ($_POST["mode"] == "set2") {
                 $checkVal = array("pref", "addr01", "addr02", "tel01", "tel02", "tel03", "mailmaga_flg");
             } else {
                 $checkVal = array();
             }
             foreach ($this->arrForm as $key => $val) {
                 if ($key != "mode" && $key != "submit" && $key != "confirm" && $key != "return" && $key != session_name() && !in_array($key, $checkVal)) {
                     $this->list_data[$key] = $val;
                 }
             }
             //-- 仮登録と完了画面
             if ($_POST["mode"] == "complete") {
                 // 確認画面で再度エラーチェックを行う。(画面1)
                 $arrErr = $this->lfErrorCheck1($this->arrForm);
                 if (count($arrErr) > 0) {
                     $this->tpl_mainpage = 'entry/index.tpl';
                     $this->tpl_title = '会員登録(1/3)';
                     $this->arrErr = $arrErr;
                     //---- ページ表示
                     $objView->assignobj($this);
                     $objView->display(SITE_FRAME);
                     exit;
                 }
                 // 確認画面で再度エラーチェックを行う。(画面2)
                 $arrErr = $this->lfErrorCheck2($this->arrForm);
                 if (count($arrErr) > 0) {
                     $this->tpl_mainpage = 'entry/set1.tpl';
                     $this->tpl_title = '会員登録(2/3)';
                     $this->arrErr = $arrErr;
                     //---- ページ表示
                     $objView->assignobj($this);
                     $objView->display(SITE_FRAME);
                     exit;
                 }
                 // 確認画面で再度エラーチェックを行う。(画面3)
                 $arrErr = $this->lfErrorCheck3($this->arrForm);
                 if (count($arrErr) > 0) {
                     $this->tpl_mainpage = 'entry/set2.tpl';
                     $this->tpl_title = '会員登録(3/3)';
                     $this->arrErr = $arrErr;
                     //---- ページ表示
                     $objView->assignobj($this);
                     $objView->display(SITE_FRAME);
                     exit;
                 }
                 $this->CONF = $CONF;
                 $this->uniqid = $this->lfRegistData($this->arrForm, $arrRegistColumn, $arrRejectRegistColumn, CUSTOMER_CONFIRM_MAIL, true, $this->arrForm["email"]);
                 // 空メールを受信済みの場合はすぐに本登録完了にする。
                 if (isset($_SESSION['mobile']['kara_mail_from'])) {
                     $param = array("mode" => "regist", "id" => $this->uniqid, session_name() => session_id());
                     $this->sendRedirect($this->getLocation(MOBILE_URL_DIR . "regist/index.php", $param));
                     exit;
                 }
                 $this->tpl_mainpage = 'entry/complete.tpl';
                 $this->tpl_title = '会員登録(完了ページ)';
                 $objMobile->sfMobileSetExtSessionId('id', $this->uniqid, 'regist/index.php');
                 // 仮登録完了メール送信
                 $this->to_name01 = $_POST['name01'];
                 $this->to_name02 = $_POST['name02'];
                 $objMailText = new SC_MobileView();
                 $objMailText->assignobj($this);
                 $objHelperMail = new SC_Helper_Mail_Ex();
                 $objQuery = new SC_Query();
                 // 仮会員が有効の場合
                 if (CUSTOMER_CONFIRM_MAIL == true) {
                     // Moba8パラメーターを保持する場合はカラム追加
                     if (isset($_SESSION['a8'])) {
                         $this->etc_value = "&a8=" . $_SESSION['a8'];
                     }
                     $subject = $objHelperMail->sfMakeSubject($objQuery, $objMailText, $this, '会員登録のご確認');
                     $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl");
                 } else {
                     $subject = $objHelperMail->sfMakesubject($objQuery, $objMailText, $this, '会員登録のご完了');
                     $toCustomerMail = $objMailText->fetch("mail_templates/customer_regist_mail.tpl");
                     // ログイン状態にする
                     $objCustomer->setLogin($_POST["email"]);
                 }
                 $objMail = new SC_SendMail();
                 $objMail->setItem('', $subject, $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email03"], $CONF["email04"], $CONF["email04"], $CONF["email01"]);
                 // 宛先の設定
                 $name = $_POST["name01"] . $_POST["name02"] . " 様";
                 $objMail->setTo($_POST["email"], $name);
                 $objMail->sendMail();
                 // 完了ページに移動させる。
                 $this->sendRedirect($this->getLocation("./complete.php"), true);
                 exit;
             }
         }
     }
     //---- ページ表示
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
Exemplo n.º 27
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     global $objCampaignSess;
     $objConn = new SC_DbConn();
     $objQuery = new SC_Query();
     $objView = new SC_SiteView();
     $CONF = $objView->objSiteInfo->data;
     $objCampaignSess = new SC_CampaignSession();
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     //---- 登録用カラム配列
     $arrRegistColumn = 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" => "email2", "convert" => "a"), array("column" => "email_mobile", "convert" => "a"), array("column" => "email_mobile2", "convert" => "a"), array("column" => "tel01", "convert" => "n"), array("column" => "tel02", "convert" => "n"), array("column" => "tel03", "convert" => "n"), array("column" => "fax01", "convert" => "n"), array("column" => "fax02", "convert" => "n"), array("column" => "fax03", "convert" => "n"), array("column" => "sex", "convert" => "n"), array("column" => "job", "convert" => "n"), array("column" => "birth", "convert" => "n"), array("column" => "reminder", "convert" => "n"), array("column" => "reminder_answer", "convert" => "aKV"), array("column" => "password", "convert" => "a"), array("column" => "password02", "convert" => "a"), array("column" => "mailmaga_flg", "convert" => "n"));
     //---- 登録除外用カラム配列
     $arrRejectRegistColumn = array("year", "month", "day", "email02", "email_mobile02", "password02");
     if ($_SERVER["REQUEST_METHOD"] == "POST") {
         //-- POSTデータの引き継ぎ
         $this->arrForm = $_POST;
         if ($this->arrForm['year'] == '----') {
             $this->arrForm['year'] = '';
         }
         $this->arrForm['email'] = strtolower($this->arrForm['email']);
         // emailはすべて小文字で処理
         $this->arrForm['email02'] = strtolower($this->arrForm['email02']);
         // emailはすべて小文字で処理
         //-- 入力データの変換
         $this->arrForm = $this->lfConvertParam($this->arrForm, $arrRegistColumn);
         //-- 入力エラーチェック
         $this->arrErr = $this->lfErrorCheck($this->arrForm);
         if ($this->arrErr || $_POST["mode"] == "return") {
             // 入力エラーのチェック
             foreach ($this->arrForm as $key => $val) {
                 $this->{$key} = $val;
             }
         } else {
             //-- 確認
             if ($_POST["mode"] == "confirm") {
                 foreach ($this->arrForm as $key => $val) {
                     if ($key != "mode" && $key != "subm") {
                         $this->list_data[$key] = $val;
                     }
                 }
                 //パスワード表示
                 $passlen = strlen($this->arrForm['password']);
                 $this->passlen = $this->lfPassLen($passlen);
                 $this->tpl_mainpage = 'entry/confirm.tpl';
                 $this->tpl_title = '会員登録(確認ページ)';
             }
             //--仮登録と完了画面
             if ($_POST["mode"] == "complete") {
                 $this->uniqid = $this->lfRegistData($this->arrForm, $arrRegistColumn, $arrRejectRegistColumn);
                 if ($objCampaignSess->getIsCampaign()) {
                     $this->etc_value = "&cp=" . $objCampaignSess->getCampaignId();
                 }
                 $this->tpl_css = '/css/layout/entry/complete.css';
                 $this->tpl_mainpage = 'entry/complete.tpl';
                 $this->tpl_title = '会員登録(完了ページ)';
                 // 仮登録完了メール送信
                 $this->CONF = $CONF;
                 $this->name01 = $_POST['name01'];
                 $this->name02 = $_POST['name02'];
                 $objMailText = new SC_SiteView();
                 $objMailText->assignobj($this);
                 $objHelperMail = new SC_Helper_Mail_Ex();
                 $objQuery = new SC_Query();
                 $subject = $objHelperMail->sfMakeSubject($objQuery, $objMailText, $this, '会員登録のご確認');
                 $toCustomerMail = $objMailText->fetch("mail_templates/customer_mail.tpl");
                 $objMail = new SC_SendMail();
                 $objMail->setItem('', $subject, $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email03"], $CONF["email04"], $CONF["email04"], $CONF["email01"]);
                 // 宛先の設定
                 $name = $_POST["name01"] . $_POST["name02"] . " 様";
                 $objMail->setTo($_POST["email"], $name);
                 $objMail->sendMail();
                 // キャンペーン受注情報を登録
                 $this->lfRegistCampaignOrder($this->uniqid, $objQuery);
                 // 完了ページに移動させる。
                 $this->sendRedirect($this->getLocation("./complete.php"));
                 exit;
             }
         }
     }
     if ($this->year == '') {
         $this->year = '----';
     }
     //---- ページ表示
     $objView->assignobj($this);
     // フレームを選択(キャンペーンページから遷移なら変更)
     $objCampaignSess->pageView($objView);
 }
Exemplo n.º 28
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView();
     $objCustomer = new SC_Customer();
     $objQuery = new SC_Query();
     $objDb = new SC_Helper_DB_Ex();
     // レイアウトデザインを取得
     $helper = new SC_Helper_PageLayout_Ex();
     $helper->sfGetPageLayout($this, false, "products/detail.php");
     // ログイン中のユーザが商品をお気に入りにいれる処理
     if ($objCustomer->isLoginSuccess() === true && strlen($_POST['mode']) > 0 && $_POST['mode'] == "add_favorite" && strlen($_POST['favorite_product_id']) > 0) {
         // 値の正当性チェック
         if (!SC_Utils_Ex::sfIsInt($_POST['favorite_product_id']) || !$objDb->sfIsRecord("dtb_products", "product_id", $_POST['favorite_product_id'], "del_flg = 0 AND status = 1")) {
             SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
             exit;
         } else {
             $this->arrErr = $this->lfCheckError();
             if (count($this->arrErr) == 0) {
                 $customer_id = $objCustomer->getValue('customer_id');
                 $this->lfRegistFavoriteProduct($customer_id, $_POST['favorite_product_id']);
             }
         }
     }
     // パラメータ管理クラス
     $this->objFormParam = new SC_FormParam();
     // パラメータ情報の初期化
     $this->lfInitParam();
     // POST値の取得
     $this->objFormParam->setParam($_POST);
     // ファイル管理クラス
     $this->objUpFile = new SC_UploadFile(IMAGE_TEMP_DIR, IMAGE_SAVE_DIR);
     // ファイル情報の初期化
     $this->lfInitFile();
     // 管理ページからの確認の場合は、非公開の商品も表示する。
     if (isset($_GET['admin']) && $_GET['admin'] == 'on') {
         SC_Utils_Ex::sfIsSuccess(new SC_Session());
         $status = true;
         $where = "del_flg = 0";
     } else {
         $status = false;
         $where = "del_flg = 0 AND status = 1";
     }
     if (isset($_POST['mode']) && $_POST['mode'] != "") {
         $tmp_id = $_POST['product_id'];
     } else {
         $tmp_id = $_GET['product_id'];
     }
     // 値の正当性チェック
     if (!SC_Utils_Ex::sfIsInt($_GET['product_id']) || !$objDb->sfIsRecord("dtb_products", "product_id", $tmp_id, $where)) {
         SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
     }
     // ログイン判定
     if ($objCustomer->isLoginSuccess() === true) {
         //お気に入りボタン表示
         $this->tpl_login = true;
         /* 閲覧ログ機能は現在未使用
         
                     $table = "dtb_customer_reading";
                     $where = "customer_id = ? ";
                     $arrval[] = $objCustomer->getValue('customer_id');
                     //顧客の閲覧商品数
                     $rpcnt = $objQuery->count($table, $where, $arrval);
         
                     //閲覧数が設定数以下
                     if ($rpcnt < CUSTOMER_READING_MAX){
                         //閲覧履歴に新規追加
                         lfRegistReadingData($tmp_id, $objCustomer->getValue('customer_id'));
                     } else {
                         //閲覧履歴の中で一番古いものを削除して新規追加
                         $oldsql = "SELECT MIN(update_date) FROM ".$table." WHERE customer_id = ?";
                         $old = $objQuery->getone($oldsql, array($objCustomer->getValue("customer_id")));
                         $where = "customer_id = ? AND update_date = ? ";
                         $arrval = array($objCustomer->getValue("customer_id"), $old);
                         //削除
                         $objQuery->delete($table, $where, $arrval);
                         //追加
                         lfRegistReadingData($tmp_id, $objCustomer->getValue('customer_id'));
                     }
                 */
     }
     // 規格選択セレクトボックスの作成
     $this->lfMakeSelect($tmp_id);
     // 商品IDをFORM内に保持する。
     $this->tpl_product_id = $tmp_id;
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'cart':
             // 入力値の変換
             $this->objFormParam->convParam();
             $this->arrErr = $this->lfCheckError();
             if (count($this->arrErr) == 0) {
                 $objCartSess = new SC_CartSession();
                 $classcategory_id1 = $_POST['classcategory_id1'];
                 $classcategory_id2 = $_POST['classcategory_id2'];
                 if (!empty($_POST['gmo_oneclick'])) {
                     $objCartSess->delAllProducts();
                 }
                 // 規格1が設定されていない場合
                 if (!$this->tpl_classcat_find1) {
                     $classcategory_id1 = '0';
                 }
                 // 規格2が設定されていない場合
                 if (!$this->tpl_classcat_find2) {
                     $classcategory_id2 = '0';
                 }
                 $objCartSess->setPrevURL($_SERVER['REQUEST_URI']);
                 $objCartSess->addProduct(array($_POST['product_id'], $classcategory_id1, $classcategory_id2), $this->objFormParam->getValue('quantity'));
                 if (!empty($_POST['gmo_oneclick'])) {
                     $objSiteSess = new SC_SiteSession();
                     $objSiteSess->setRegistFlag();
                     $objCartSess->saveCurrentCart($objSiteSess->getUniqId());
                     $this->sendRedirect($this->getLocation(URL_DIR . 'user_data/gmopg_oneclick_confirm.php', array(), true));
                     exit;
                 }
                 $this->sendRedirect($this->getLocation(URL_CART_TOP));
                 exit;
             }
             break;
         default:
             break;
     }
     $objQuery = new SC_Query();
     // DBから商品情報を取得する。
     $arrRet = $objQuery->select("*, (SELECT count(*) FROM dtb_customer_favorite_products WHERE product_id = alldtl.product_id AND customer_id = ?) AS favorite_count", "vw_products_allclass_detail AS alldtl", "product_id = ?", array($objCustomer->getValue('customer_id'), $tmp_id));
     $this->arrProduct = $arrRet[0];
     // 商品コードの取得
     $code_sql = "SELECT product_code FROM dtb_products_class AS prdcls WHERE prdcls.product_id = ? GROUP BY product_code ORDER BY product_code";
     $arrProductCode = $objQuery->getall($code_sql, array($tmp_id));
     $arrProductCode = SC_Utils_Ex::sfswaparray($arrProductCode);
     $this->arrProductCode = $arrProductCode["product_code"];
     // 購入制限数を取得
     if ($this->arrProduct['sale_unlimited'] == 1 || $this->arrProduct['sale_limit'] > SALE_LIMIT_MAX) {
         $this->tpl_sale_limit = SALE_LIMIT_MAX;
     } else {
         $this->tpl_sale_limit = $this->arrProduct['sale_limit'];
     }
     // サブタイトルを取得
     $arrCategory_id = $objDb->sfGetCategoryId($arrRet[0]['product_id'], '', $status);
     $arrFirstCat = $objDb->sfGetFirstCat($arrCategory_id[0]);
     $this->tpl_subtitle = $arrFirstCat['name'];
     // 関連カテゴリを取得
     $this->arrRelativeCat = $objDb->sfGetMultiCatTree($tmp_id);
     // DBからのデータを引き継ぐ
     $this->objUpFile->setDBFileList($this->arrProduct);
     // ファイル表示用配列を渡す
     $this->arrFile = $this->objUpFile->getFormFileList(IMAGE_TEMP_URL, IMAGE_SAVE_URL, true);
     // 支払方法の取得
     $this->arrPayment = $this->lfGetPayment();
     // 入力情報を渡す
     $this->arrForm = $this->objFormParam->getFormParamList();
     //レビュー情報の取得
     $this->arrReview = $this->lfGetReviewData($tmp_id);
     // トラックバック情報の取得
     // トラックバック機能の稼働状況チェック
     if (SC_Utils_Ex::sfGetSiteControlFlg(SITE_CONTROL_TRACKBACK) != 1) {
         $this->arrTrackbackView = "OFF";
     } else {
         $this->arrTrackbackView = "ON";
         $this->arrTrackback = $this->lfGetTrackbackData($tmp_id);
     }
     $this->trackback_url = TRACKBACK_TO_URL . $tmp_id;
     // タイトルに商品名を入れる
     $this->tpl_title = "商品詳細 " . $this->arrProduct["name"];
     //オススメ商品情報表示
     $this->arrRecommend = $this->lfPreGetRecommendProducts($tmp_id);
     //この商品を買った人はこんな商品も買っています
     $this->arrRelateProducts = $this->lfGetRelateProducts($tmp_id);
     $this->lfConvertParam();
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
Exemplo n.º 29
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objConn = new SC_DbConn();
     $this->arrForm = $_POST;
     // 登録
     if (isset($_REQUEST['btnRegist'])) {
         $this->arrErr = $this->lfMailErrorCheck($this->arrForm, "regist", $objConn);
         // エラーがなければ
         if (count($this->arrErr) == 0) {
             // 確認
             $this->arrForm['kind'] = 'メルマガ登録';
             $this->arrForm['type'] = 'regist';
             $this->arrForm['mail'] = $this->arrForm['regist'];
         } else {
             $this->tpl_mainpage = 'magazine/index.tpl';
             $this->tpl_title = 'メルマガ登録・解除';
         }
         // 解除
     } elseif (isset($_REQUEST['btnCancel'])) {
         $this->arrErr = $this->lfMailErrorCheck($this->arrForm, "cancel", $objConn);
         // エラーがなければ
         if (count($this->arrErr) == 0) {
             // 確認
             $this->arrForm['kind'] = 'メルマガ解除';
             $this->arrForm['type'] = 'cancel';
             $this->arrForm['mail'] = $this->arrForm['cancel'];
         } else {
             $this->tpl_mainpage = 'magazine/index.tpl';
             $this->tpl_title = 'メルマガ登録・解除';
         }
         // 完了
     } elseif ($_REQUEST['mode'] == 'regist' or $_REQUEST['mode'] == 'cancel') {
         $objMailText = new SC_MobileView();
         $helperMail = new SC_Helper_Mail_Ex();
         $objQuery = new SC_Query();
         // 登録
         if ($_REQUEST['mode'] == 'regist') {
             $uniqId = $this->lfRegistData($_POST["email"], $objConn);
             $subject = $helperMail->fMakesubject($objQuery, $objMailText, $this, 'メルマガ登録のご確認');
             // 解除
         } elseif ($_REQUEST['mode'] == 'cancel') {
             $uniqId = $this->lfGetSecretKey($_POST["email"], $objConn);
             $subject = $helperMail->sfMakesubject($objQuery, $objMailText, $this, 'メルマガ解除のご確認');
         }
         $objDb = new SC_Helper_DB_Ex();
         $CONF = $objDb->sf_getBasisData();
         $this->CONF = $CONF;
         $this->tpl_url = SC_Utils_Ex::gfAddSessionId(MOBILE_SSL_URL . "magazine/" . $_REQUEST['mode'] . ".php?id=" . $uniqId);
         $objMailText->assignobj($this);
         $toCustomerMail = $objMailText->fetch("mail_templates/mailmagazine_" . $_REQUEST['mode'] . ".tpl");
         $objMail = new SC_SendMail();
         $objMail->setItem('', $subject, $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email03"], $CONF["email04"], $CONF["email04"], $CONF["email01"]);
         // 宛先の設定
         $objMail->setTo($_POST["email"], $_POST["email"]);
         $objMail->sendMail();
         // 完了ページに移動させる。
         $this->sendRedirect($this->getLocation("./complete.php", array(session_name() => session_id())));
         exit;
     } else {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
     }
     $objView = new SC_MobileView();
     // レイアウトデザインを取得
     $objLayout = new SC_Helper_PageLayout_Ex();
     $objLayout->sfGetPageLayout($this, false, DEF_LAYOUT);
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
Exemplo n.º 30
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);
 }