/** * Page のプロセス. * * @return void */ function process() { $objView = new SC_SiteView(false); $objQuery = new SC_Query(); // 正しく値が取得できない場合はキャンペーンTOPへ if ($_GET['campaign_id'] == "" || $_GET['status'] == "") { $this->sendRedirect($this->getLocation(URL_CAMPAIGN_TOP)); exit; } // statusの判別 switch ($_GET['status']) { case 'active': $status = CAMPAIGN_TEMPLATE_ACTIVE; break; case 'end': $status = CAMPAIGN_TEMPLATE_END; break; default: $status = CAMPAIGN_TEMPLATE_ACTIVE; break; } // ディレクトリ名を取得名 $directory_name = $objQuery->get("dtb_campaign", "directory_name", "campaign_id = ?", array($_GET['campaign_id'])); $template_dir = CAMPAIGN_TEMPLATE_PATH . $directory_name . "/" . $status . "preview.tpl"; //---- ページ表示 $objView->assignobj($this); $objView->display($template_dir); }
/** * 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); } }
/** * Page のプロセス. * * @return void */ function process() { $objView = new SC_SiteView(); $objQuery = new SC_Query(); $objCustomer = new SC_Customer(); // クッキー管理クラス $objCookie = new SC_Cookie(COOKIE_EXPIRE); // ログイン判定 if ($objCustomer->isLoginSuccess()) { $this->sendRedirect($this->getLocation("./index.php")); exit; } else { // クッキー判定 $this->tpl_login_email = $objCookie->getCookie('login_email'); if ($this->tpl_login_email != "") { $this->tpl_login_memory = "1"; } // POSTされてきたIDがある場合は優先する。 if (isset($_POST['mypage_login_email']) && $_POST['mypage_login_email'] != "") { $this->tpl_login_email = $_POST['mypage_login_email']; } } //$objpage内の全てのテンプレート変数をsmartyに格納 $objView->assignobj($this); //パスとテンプレート変数の呼び出し、実行 $objView->display(SITE_FRAME); }
/** * Page のプロセス. * * @return void */ function process() { $objCustomer = new SC_Customer(); // クッキー管理クラス $objCookie = new SC_Cookie(COOKIE_EXPIRE); // ログイン判定 if ($objCustomer->isLoginSuccess()) { $this->tpl_login = true; $this->tpl_user_point = $objCustomer->getValue('point'); $this->tpl_name1 = $objCustomer->getValue('name01'); $this->tpl_name2 = $objCustomer->getValue('name02'); } else { // クッキー判定 $this->tpl_login_email = $objCookie->getCookie('login_email'); if ($this->tpl_login_email != "") { $this->tpl_login_memory = "1"; } // POSTされてきたIDがある場合は優先する。 if ($_POST['login_email'] != "") { $this->tpl_login_email = $_POST['login_email']; } } $this->tpl_disable_logout = $this->lfCheckDisableLogout(); $objSubView = new SC_SiteView(); $this->transactionid = $this->getToken(); $objSubView->assignobj($this); $objSubView->display($this->tpl_mainpage); }
/** * Page のプロセス. * * @return void */ function process() { global $objCampaignSess; $objView = new SC_SiteView(); $objCustomer = new SC_Customer(); $objCampaignSess = new SC_CampaignSession(); // レイアウトデザインを取得 $layout = new SC_Helper_PageLayout_Ex(); $layout->sfGetPageLayout($this, false, DEF_LAYOUT); // 規約内容の取得 $objQuery = new SC_Query(); $objQuery->setorder("rank DESC"); $arrRet = $objQuery->select("kiyaku_title, kiyaku_text", "dtb_kiyaku", "del_flg <> 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"; } // キャンペーンからの遷移がチェック $this->is_campaign = $objCampaignSess->getIsCampaign(); $this->campaign_dir = $objCampaignSess->getCampaignDir(); $objView->assignobj($this); // フレームを選択(キャンペーンページから遷移なら変更) $objCampaignSess->pageView($objView); }
/** * 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 */ function process() { $objView = new SC_SiteView(); // ランキングの取得 $this->arrRanking = $this->getRanking(); $objView->assignobj($this); $objView->display($this->tpl_mainpage); //var_dump(getRanking()); }
/** * 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 process() { $objSubView = new SC_SiteView(); $objDb = new SC_Helper_DB_Ex(); // 選択中のカテゴリIDを判定する $arrCategory_id = $objDb->sfGetCategoryId($_GET['product_id'], $_GET['category_id']); // 選択中のカテゴリID $this->tpl_category_id = empty($arrCategory_id) ? array(0) : $arrCategory_id; $this->lfGetCatTree($this->tpl_category_id, true, $this); $objSubView->assignobj($this); $objSubView->display($this->tpl_mainpage); }
/** * 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); }
/** * 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); }
/** * Page のプロセス. * * @return void */ function process() { if (defined("MOBILE_SITE") && MOBILE_SITE) { $objView = new SC_MobileView(); } else { $objView = new SC_SiteView(); } // 休日取得取得 $this->arrHoliday = $this->lfGetHoliday(); // 定休日取得取得 $this->arrRegularHoliday = $this->lfGetRegularHoliday(); // カレンダーデータ取得 $this->arrCalendar = $this->lfGetCalendar(2); $objView->assignobj($this); $objView->display($this->tpl_mainpage); }
/** * 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 process() { if (defined("MOBILE_SITE") && MOBILE_SITE) { $objView = new SC_MobileView(); } else { $objView = new SC_SiteView(); } $objSiteInfo = $objView->objSiteInfo; // 基本情報を渡す $objSiteInfo = new SC_SiteInfo(); $this->arrInfo = $objSiteInfo->data; //おすすめ商品表示 $this->arrBestProducts = $this->lfGetRanking(); $objView->assignobj($this); $objView->display($this->tpl_mainpage); }
/** * 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); }
/** * 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); }
/** * Page のプロセス. * * @return void */ function process() { global $objCampaignSess; $objView = new SC_SiteView(); $objCampaignSess = new SC_CampaignSession(); // transaction check if (!$this->isValidToken()) { SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, "", true); } // レイアウトデザインを取得 $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); }
/** * Page のプロセス. * * @return void */ function process() { $arrSearch = array(); // 検索項目表示用 $objDb = new SC_Helper_DB_Ex(); // 選択中のカテゴリIDを判定する $this->category_id = $objDb->sfGetCategoryId($_GET['product_id'], $_GET['category_id']); // カテゴリ検索用選択リスト $arrRet = $objDb->sfGetCategoryList('', true, ' '); if (is_array($arrRet)) { // 文字サイズを制限する foreach ($arrRet as $key => $val) { $arrRet[$key] = SC_Utils_Ex::sfCutString($val, SEARCH_CATEGORY_LEN, false); } } $this->arrCatList = $arrRet; $objSubView = new SC_SiteView(); $objSubView->assignobj($this); $objSubView->display($this->tpl_mainpage); }
/** * Page のプロセス. * * @return void */ function process() { $objQuery = new SC_Query(); $objView = new SC_SiteView(false); //新着情報を取得 $arrNews = $this->lfGetNews($objQuery); //キャッシュしない(念のため) header("pragma: no-cache"); //XMLテキスト(これがないと正常にRSSとして認識してくれないツールがあるため) header("Content-type: application/xml"); //新着情報をセット $this->arrNews = $arrNews; $this->timestamp = SC_Utils_Ex::sf_mktime("r", $arrNews[0]['hour'], $arrNews[0]['minute'], $arrNews[0]['second'], $arrNews[0]['month'], $arrNews[0]['day'], $arrNews[0]['year']); //店名をセット $this->site_title = $arrNews[0]['shop_name']; //代表Emailアドレスをセット $this->email = $arrNews[0]['email']; //セットしたデータをテンプレートファイルに出力 $objView->assignobj($this); //画面表示 $objView->display($this->tpl_mainpage, true); }
/** * Page のプロセス. * * @return void */ function process() { $conn = new SC_DBconn(ZIP_DSN); $objView = new SC_SiteView(false); // 入力エラーチェック $arrErr = $this->fnErrorCheck($_GET); // 入力エラーの場合は終了 if (count($arrErr) > 0) { $this->tpl_start = "window.close();"; SC_Utils::sfDispSiteError(CUSTOMER_ERROR); } // 郵便番号検索文作成 $zipcode = $_GET['zip1'] . $_GET['zip2']; $zipcode = mb_convert_kana($zipcode, "n"); $sqlse = "SELECT state, city, town FROM mtb_zip WHERE zipcode = ?"; $data_list = $conn->getAll($sqlse, array($zipcode)); if (empty($data_list)) { $data_list = array(); } $masterData = new SC_DB_MasterData_Ex(); $arrPref = $masterData->getMasterData("mtb_pref", array("pref_id", "pref_name", "rank")); // インデックスと値を反転させる。 $arrREV_PREF = array_flip($arrPref); if (!empty($data_list)) { $this->tpl_state = isset($arrREV_PREF[$data_list[0]['state']]) ? $arrREV_PREF[$data_list[0]['state']] : ""; $this->tpl_city = isset($data_list[0]['city']) ? $data_list[0]['city'] : ""; $town = isset($data_list[0]['town']) ? $data_list[0]['town'] : ""; } else { $town = ""; } /* 総務省からダウンロードしたデータをそのままインポートすると 以下のような文字列が入っているので 対策する。 ・(1~19丁目) ・以下に掲載がない場合 */ $town = ereg_replace("(.*)\$", "", $town); $town = ereg_replace("以下に掲載がない場合", "", $town); $this->tpl_town = $town; // 郵便番号が発見された場合 if (!empty($data_list)) { $func = "fnPutAddress('" . $_GET['input1'] . "','" . $_GET['input2'] . "');"; $this->tpl_onload = "{$func}"; $this->tpl_start = "window.close();"; } else { $this->tpl_message = "該当する住所が見つかりませんでした。"; } /* ページの表示 */ $objView->assignobj($this); $objView->display("input_zip.tpl"); }
/** * 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); //パスとテンプレート変数の呼び出し、実行 }
/** * Page のプロセス. * * @return void */ function process() { $objSubView = new SC_SiteView(); $objCart = new SC_CartSession(); $objSiteInfo = new SC_SiteInfo(); if (count($_SESSION[$objCart->key]) > 0) { // カート情報を取得 $arrCartList = $objCart->getCartList(); // カート内の商品ID一覧を取得 $arrAllProductID = $objCart->getAllProductID(); // 商品が1つ以上入っている場合には商品名称を取得 if (count($arrAllProductID) > 0) { $objQuery = new SC_Query(); $arrVal = array(); $sql = ""; $sql = "SELECT name FROM dtb_products WHERE product_id IN ( ?"; $arrVal = array($arrAllProductID[0]); for ($i = 1; $i < count($arrAllProductID); $i++) { $sql .= " ,? "; array_push($arrVal, $arrAllProductID[$i]); } $sql .= " )"; $arrProduct_name = $objQuery->getAll($sql, $arrVal); foreach ($arrProduct_name as $key => $val) { $arrCartList[$key]['product_name'] = $val['name']; } } // 店舗情報の取得 $arrInfo = $objSiteInfo->data; // 購入金額合計 $ProductsTotal = $objCart->getAllProductsTotal($arrInfo); // 合計個数 $TotalQuantity = $objCart->getTotalQuantity(); // 送料無料までの金額 $arrCartList[0]['ProductsTotal'] = $ProductsTotal; $arrCartList[0]['TotalQuantity'] = $TotalQuantity; $deliv_free = $arrInfo['free_rule'] - $ProductsTotal; $arrCartList[0]['free_rule'] = $arrInfo['free_rule']; $arrCartList[0]['deliv_free'] = $deliv_free; $this->arrCartList = $arrCartList; } $objSubView->assignobj($this); $objSubView->display($this->tpl_mainpage); }
/** * 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(); //ログイン判定 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(); $objCartSess = new SC_CartSession("", false); $objDb = new SC_Helper_DB_Ex(); // 管理ページからの確認の場合は、非公開の商品も表示する。 if (isset($_GET['admim']) && $_GET['admin'] == 'on') { $where = "del_flg = 0"; } else { $where = "del_flg = 0 AND status = 1"; } // 値の正当性チェック if (!SC_Utils_Ex::sfIsInt($_GET['product_id']) || !$objDb->sfIsRecord("dtb_products", "product_id", $_GET['product_id'], $where)) { SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND); } $image_key = $_GET['image']; $objQuery = new SC_Query(); // カラムが存在していなければエラー画面を表示 if (!$objDb->sfColumnExists("dtb_products", $image_key)) { SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND); } $col = "name, {$image_key}"; $arrRet = $objQuery->select($col, "dtb_products", "product_id = ?", array($_GET['product_id'])); $image_path = IMAGE_SAVE_DIR . $arrRet[0][$image_key]; if (file_exists($image_path)) { list($width, $height) = getimagesize($image_path); } else { $width = 0; $height = 0; } $this->tpl_width = $width; $this->tpl_height = $height; $this->tpl_table_width = $this->tpl_width + 20; $this->tpl_table_height = $this->tpl_height + 20; $this->tpl_image = $arrRet[0][$image_key]; $this->tpl_name = $arrRet[0]['name']; $objView->assignobj($this); $objView->display($this->tpl_mainpage); }
/** * 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); }
/** * パスワード変更お知らせメールを送信する. * * @param array $CONF 店舗基本情報の配列 * @param string $email 送信先メールアドレス * @param string $customer_name 送信先氏名 * @param string $temp_password 変更後のパスワード * @return void */ function lfSendMail($CONF, $email, $customer_name, $temp_password) { // パスワード変更お知らせメール送信 $this->customer_name = $customer_name; $this->temp_password = $temp_password; $objMailText = new SC_SiteView(); $objMailText->assignobj($this); $toCustomerMail = $objMailText->fetch("mail_templates/forgot_mail.tpl"); $objMail = new SC_SendMail(); $objMail->setItem('', "パスワードが変更されました" . "【" . $CONF["shop_name"] . "】", $toCustomerMail, $CONF["email03"], $CONF["shop_name"], $CONF["email03"], $CONF["email04"], $CONF["email04"]); $objMail->setTo($email, $customer_name . " 様"); $objMail->sendMail(); }
/** * 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); //パスとテンプレート変数の呼び出し、実行 }
function lfRegistPreCustomer($arrData, $arrInfo) { // 購入時の会員登録 $sqlval['name01'] = $arrData['order_name01']; $sqlval['name02'] = $arrData['order_name02']; $sqlval['kana01'] = $arrData['order_kana01']; $sqlval['kana02'] = $arrData['order_kana02']; $sqlval['zip01'] = $arrData['order_zip01']; $sqlval['zip02'] = $arrData['order_zip02']; $sqlval['pref'] = $arrData['order_pref']; $sqlval['addr01'] = $arrData['order_addr01']; $sqlval['addr02'] = $arrData['order_addr02']; $sqlval['email'] = $arrData['order_email']; $sqlval['tel01'] = $arrData['order_tel01']; $sqlval['tel02'] = $arrData['order_tel02']; $sqlval['tel03'] = $arrData['order_tel03']; $sqlval['fax01'] = $arrData['order_fax01']; $sqlval['fax02'] = $arrData['order_fax02']; $sqlval['fax03'] = $arrData['order_fax03']; $sqlval['sex'] = $arrData['order_sex']; $sqlval['password'] = $arrData['password']; $sqlval['reminder'] = $arrData['reminder']; $sqlval['reminder_answer'] = $arrData['reminder_answer']; // メルマガ配信用フラグの判定 switch ($arrData['mail_flag']) { case '1': // HTMLメール $mail_flag = 4; break; case '2': // TEXTメール $mail_flag = 5; break; case '3': // 希望なし $mail_flag = 6; break; default: $mail_flag = 6; break; } // メルマガフラグ $sqlval['mailmaga_flg'] = $mail_flag; // 会員仮登録 $sqlval['status'] = 1; // URL判定用キー $sqlval['secret_key'] = SC_Utils_Ex::sfGetUniqRandomId("t"); $objQuery = new SC_Query(); $sqlval['create_date'] = "now()"; $sqlval['update_date'] = "now()"; $objQuery->insert("dtb_customer", $sqlval); // 顧客IDの取得 $arrRet = $objQuery->select("customer_id", "dtb_customer", "secret_key = ?", array($sqlval['secret_key'])); $customer_id = $arrRet[0]['customer_id']; // 仮登録完了メール送信 $objMailPage = $this; $objMailPage->to_name01 = $arrData['order_name01']; $objMailPage->to_name02 = $arrData['order_name02']; $objMailPage->CONF = $arrInfo; $objMailPage->uniqid = $sqlval['secret_key']; $objMailView = new SC_SiteView(); $objMailView->assignobj($objMailPage); $body = $objMailView->fetch("mail_templates/customer_mail.tpl"); $mailHelper = new SC_Helper_Mail_Ex(); $objMail = new SC_SendMail(); $objMail->setItem('', $mailHelper->sfMakeSubject($objQuery, $objMailView, $objMailPage, "会員登録のご確認"), $body, $arrInfo['email03'], $arrInfo['shop_name'], $arrInfo["email03"], $arrInfo["email04"], $arrInfo["email04"], $arrInfo["email01"]); // 宛先の設定 $name = $arrData['order_name01'] . $arrData['order_name02'] . " 様"; $objMail->setTo($arrData['order_email'], $name); $objMail->sendMail(); return $customer_id; }