コード例 #1
0
ファイル: SC_SiteInfo.php プロジェクト: khrisna/eccubedrm
 /**
  * @deprecated SC_Helper_DB::sf_getBasisData() を使用して下さい.
  *
  * FIXME この関数を使用している場合は,
  * SC_Helper_DB::sf_getBasisData() に置き変えて下さい
  *
  */
 function SC_SiteInfo($conn = '')
 {
     /*
     $DB_class_name = "SC_DbConn";
     if ( is_object($conn)){
         if ( is_a($conn, $DB_class_name)){
             // $connが$DB_class_nameのインスタンスである
             $this->conn = $conn;
         }
     } else {
         if (class_exists($DB_class_name)){
             //$DB_class_nameのインスタンスを作成する
             $this->conn = new SC_DbConn();
         }
     }
     
     if ( is_object($this->conn)){
         $conn = $this->conn;
         $sql = "SELECT * FROM dtb_baseinfo";
         $data = $conn->getAll($sql);
         $this->data = $data[0];
         }
     */
     $objDb = new SC_Helper_DB_Ex();
     $this->data = $objDb->sf_getBasisData();
 }
コード例 #2
0
ファイル: LC_Page_Order.php プロジェクト: nanasess/ec-azure
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $objQuery =& SC_Query_Ex::getSingletonInstance();
     $layout = new SC_Helper_PageLayout_Ex();
     $objDb = new SC_Helper_DB_Ex();
     $this->arrOrder = $objDb->sfGetBasisData();
 }
コード例 #3
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'mail/index.tpl';
     $this->tpl_mainno = 'mail';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = 'メルマガ管理';
     $this->tpl_subtitle = '配信内容設定';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrJob['不明'] = '不明';
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageRows = $masterData->getMasterData('mtb_page_max');
     $this->arrHtmlmail = array('' => '両方', 1 => 'HTML', 2 => 'TEXT');
     $this->arrMailType = $masterData->getMasterData('mtb_mail_type');
     // 日付プルダウン設定
     $objDate = new SC_Date_Ex(BIRTH_YEAR);
     $this->arrBirthYear = $objDate->getYear();
     $this->arrRegistYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     $this->objDate = $objDate;
     // カテゴリ一覧設定
     $objDb = new SC_Helper_DB_Ex();
     $this->arrCatList = $objDb->sfGetCategoryList();
     // テンプレート一覧設定
     $this->arrTemplate = $this->lfGetMailTemplateList(SC_Helper_Mail_Ex::sfGetMailmagaTemplate());
     $this->httpCacheControl('nocache');
 }
コード例 #4
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $conn = new SC_DBConn();
     $objView = new SC_AdminView();
     $objSess = new SC_Session();
     $objDb = new SC_Helper_DB_Ex();
     // 認証可否の判定
     SC_Utils_Ex::sfIsSuccess($objSess);
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'delete':
             // ランク付きレコードの削除
             $objDb->sfDeleteRankRecord("dtb_payment", "payment_id", $_POST['payment_id']);
             // 再表示
             $this->reload();
             break;
         case 'up':
             $objDb->sfRankUp("dtb_payment", "payment_id", $_POST['payment_id']);
             // 再表示
             $this->reload();
             break;
         case 'down':
             $objDb->sfRankDown("dtb_payment", "payment_id", $_POST['payment_id']);
             // 再表示
             $this->reload();
             break;
     }
     $this->arrDelivList = $objDb->sfGetIDValueList("dtb_deliv", "deliv_id", "service_name");
     $this->arrPaymentListFree = $this->lfGetPaymentList(2);
     $objView->assignobj($this);
     $objView->display(MAIN_FRAME);
 }
コード例 #5
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 public function init()
 {
     parent::init();
     $this->tpl_mainpage = 'customer/index.tpl';
     $this->tpl_mainno = 'customer';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '会員管理';
     $this->tpl_subtitle = '会員マスター';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrJob['不明'] = '不明';
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     $this->arrStatus = $masterData->getMasterData('mtb_customer_status');
     $this->arrMagazineType = $masterData->getMasterData('mtb_magazine_type');
     // 日付プルダウン設定
     $objDate = new SC_Date_Ex();
     // 登録・更新日検索用
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrRegistYear = $objDate->getYear();
     // 生年月日検索用
     $objDate->setStartYear(BIRTH_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrBirthYear = $objDate->getYear();
     // 月日の設定
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // カテゴリ一覧設定
     $objDb = new SC_Helper_DB_Ex();
     $this->arrCatList = $objDb->sfGetCategoryList();
     $this->httpCacheControl('nocache');
 }
コード例 #6
0
 /**
  * Page のAction.
  *
  * @return void
  */
 function action()
 {
     $objCustomer = new SC_Customer_Ex();
     $objDb = new SC_Helper_DB_Ex();
     $objPurchase = new SC_Helper_Purchase_Ex();
     if (!SC_Utils_Ex::sfIsInt($_GET['order_id'])) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     }
     $order_id = $_GET['order_id'];
     //受注データの取得
     $this->tpl_arrOrderData = $objPurchase->getOrder($order_id, $objCustomer->getValue('customer_id'));
     if (empty($this->tpl_arrOrderData)) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     }
     $this->arrShipping = $this->lfGetShippingDate($objPurchase, $order_id, $this->arrWDAY);
     $this->isMultiple = count($this->arrShipping) > 1;
     // 支払い方法の取得
     $this->arrPayment = $objDb->sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method');
     // 受注商品明細の取得
     $this->tpl_arrOrderDetail = $objPurchase->getOrderDetail($order_id);
     $this->tpl_arrOrderDetail = $this->setMainListImage($this->tpl_arrOrderDetail);
     $objPurchase->setDownloadableFlgTo($this->tpl_arrOrderDetail);
     // モバイルダウンロード対応処理
     $this->lfSetAU($this->tpl_arrOrderDetail);
     // 受注メール送信履歴の取得
     $this->tpl_arrMailHistory = $this->lfGetMailHistory($order_id);
 }
コード例 #7
0
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $objDb = new SC_Helper_DB_Ex();
     $mode = $this->getMode();
     if (!empty($_POST)) {
         $objFormParam = new SC_FormParam_Ex();
         $objFormParam->setParam($_POST);
         $this->arrErr = $this->lfCheckError($mode, $objFormParam);
         if (!empty($this->arrErr['deliv_id'])) {
             SC_Utils_Ex::sfDispException();
             return;
         }
     }
     switch ($mode) {
         case 'delete':
             // ランク付きレコードの削除
             $objDb->sfDeleteRankRecord("dtb_deliv", "deliv_id", $_POST['deliv_id']);
             $this->objDisplay->reload();
             // PRG pattern
             break;
         case 'up':
             $objDb->sfRankUp("dtb_deliv", "deliv_id", $_POST['deliv_id']);
             $this->objDisplay->reload();
             // PRG pattern
             break;
         case 'down':
             $objDb->sfRankDown("dtb_deliv", "deliv_id", $_POST['deliv_id']);
             $this->objDisplay->reload();
             // PRG pattern
             break;
         default:
             break;
     }
     $this->arrDelivList = $this->lfGetDelivList();
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'customer/edit.tpl';
     $this->tpl_mainno = 'customer';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = '会員管理';
     $this->tpl_subtitle = '会員登録';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrReminder = $masterData->getMasterData('mtb_reminder');
     $this->arrStatus = $masterData->getMasterData('mtb_customer_status');
     $this->arrMailMagazineType = $masterData->getMasterData('mtb_mail_magazine_type');
     // 日付プルダウン設定
     $objDate = new SC_Date_Ex(BIRTH_YEAR);
     $this->arrYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // 支払い方法種別
     $objDb = new SC_Helper_DB_Ex();
     $this->arrPayment = $objDb->sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method');
 }
コード例 #9
0
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     parent::action();
     $objQuery = SC_Query_Ex::getSingletonInstance();
     if (is_array($this->arrHidden['search_customer_type'])) {
         $cnt = array_sum($this->arrHidden['search_customer_type']);
         // tpl表示切換用
         $this->search_customer_type = $cnt;
     } elseif (is_array($this->arrForm['search_customer_type']['value'])) {
         $cnt = array_sum($this->arrForm['search_customer_type']['value']);
         // tpl表示切換用
         $this->search_customer_type = $cnt;
     } else {
         $this->search_customer_type = 1;
     }
     if (is_array($this->arrData)) {
         foreach ($this->arrData as &$customer) {
             $customer_id = $customer["customer_id"];
             if ($this->objDb->sfColumnExists("cp_dtb_customer_docomo_mymenu", "customer_id")) {
                 $customer = array_merge(SC_Helper_Customer_Ex::sfGetCustomerData($customer_id), $customer);
                 $customer["mymenu"] = call_user_func("CarrierPay::getCustomerMymenu", array($customer_id));
             }
             if ($this->objDb->sfColumnExists("cp_dtb_point_history", "id")) {
                 $point = $objQuery->getRow(implode(",", array("sum(add_point ) AS add_point", "sum(use_point ) AS use_point", "sum(lost_point) AS lost_point")), "cp_dtb_point_history", "customer_id = ?", array($customer_id));
                 foreach ($point as $key => $value) {
                     $customer[$key] = $value;
                 }
             }
             if ($this->objDb->sfColumnExists("cp_dtb_customer_transaction", "id")) {
                 $customer["transaction"] = $objQuery->select("*", "cp_dtb_customer_transaction", "customer_id = ? AND del_flg = 0 AND continue_account_id IS NOT NULL", array($customer_id));
             }
         }
     }
 }
コード例 #10
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'mail/index.tpl';
     $this->tpl_mainno = 'mail';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = t('c_Mail magazine_02');
     $this->tpl_subtitle = t('c_Delivery content settings_01');
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrJob = $masterData->getMasterData('mtb_job');
     $this->arrJob[t('c_Unknown_01')] = t('c_Unknown_01');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageRows = $masterData->getMasterData('mtb_page_max');
     $this->arrHtmlmail = array('' => t('c_Both_01'), 1 => t('c_HTML_01'), 2 => t('c_TEXT_02'));
     $this->arrMailType = $masterData->getMasterData('mtb_mail_type');
     // 日付プルダウン設定
     $objDate = new SC_Date_Ex(BIRTH_YEAR);
     $this->arrBirthYear = $objDate->getYear();
     $this->arrRegistYear = $objDate->getYear();
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     $this->objDate = $objDate;
     // カテゴリ一覧設定
     $objDb = new SC_Helper_DB_Ex();
     $this->arrCatList = $objDb->sfGetCategoryList();
     // テンプレート一覧設定
     $this->arrTemplate = $this->lfGetMailTemplateList(SC_Helper_Mail_Ex::sfGetMailmagaTemplate());
     $this->httpCacheControl('nocache');
 }
コード例 #11
0
 /**
  * 新着情報を取得する
  *
  * @return array $arrNews 取得結果を配列で返す
  */
 public function lfGetNews()
 {
     $objNews = new SC_Helper_News_Ex();
     $arrNews = $objNews->getList();
     $objDb = new SC_Helper_DB_Ex();
     $arrInfo = $objDb->sfGetBasisData();
     // RSS用に変換
     foreach (array_keys($arrNews) as $key) {
         $netUrlHttpUrl = new Net_URL(HTTP_URL);
         $row =& $arrNews[$key];
         $row['shop_name'] = $arrInfo['shop_name'];
         $row['email'] = $arrInfo['email04'];
         // 日付
         $row['news_date'] = date('r', strtotime($row['news_date']));
         // 新着情報URL
         if (SC_Utils_Ex::isBlank($row['news_url'])) {
             $row['news_url'] = HTTP_URL;
         } elseif ($row['news_url'][0] == '/') {
             // 変換(絶対パス→URL)
             $netUrl = new Net_URL($row['news_url']);
             $netUrl->protocol = $netUrlHttpUrl->protocol;
             $netUrl->user = $netUrlHttpUrl->user;
             $netUrl->pass = $netUrlHttpUrl->pass;
             $netUrl->host = $netUrlHttpUrl->host;
             $netUrl->port = $netUrlHttpUrl->port;
             $row['news_url'] = $netUrl->getUrl();
         }
     }
     return $arrNews;
 }
コード例 #12
0
 /**
  * Page のAction.
  *
  * @return void
  */
 public function action()
 {
     parent::action();
     $objProduct = new SC_Product_Ex();
     $objDb = new SC_Helper_DB_Ex();
     $this->tpl_buy_porduct = array_key_exists($this->tpl_product_id, $this->arrRedownloadProduct);
     $category_id = $objProduct->getCategoryIds($this->tpl_product_id);
     $this->arrProduct["category_id"] = array_shift($category_id);
     $this->arrProduct["category"] = $this->arrCategory[$this->arrProduct["category_id"]];
     $this->arrProduct["category_name"] = $this->arrProduct["category"]["category_name"];
     if ($objDb->sfColumnExists('dtb_category', 'category_code')) {
         $this->arrProduct["category_code"] = $this->arrProduct["category"]["category_code"];
         $this->arrProduct["category_image1"] = $this->arrProduct["category"]["category_image1"] ?: 0;
         $this->arrProduct["category_image2"] = $this->arrProduct["category"]["category_image2"] ?: 0;
         $this->arrProduct["category_image3"] = $this->arrProduct["category"]["category_image3"] ?: 0;
         $this->arrProduct["category_image4"] = $this->arrProduct["category"]["category_image4"] ?: 0;
         $this->arrProduct["category_image5"] = $this->arrProduct["category"]["category_image5"] ?: 0;
     }
     $config = SC_AuonePayment_Ex::getConfig("free_field2");
     $mode = $this->getMode();
     $this->mode = $mode;
     switch ($this->getMode()) {
         case "download":
         case "check_buy_and_download":
             $this->doCheckBuyAndDownload($config);
             break;
         case "download_ok":
         case "check_buy_and_download_ok":
             $this->doCheckBuyAndDownloadOk($config);
             break;
         case "download_ng":
         case "check_buy_and_download_ng":
             unset($_SESSION["product_ktc_vid"]);
             SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, "", true, "このテーマには対応していません。");
             break;
     }
     $bgcolor = $this->arrProduct["bgcolor"];
     $fgcolor = $this->arrProduct["fgcolor"];
     $lkcolor = $this->arrProduct["lkcolor"];
     if (strlen($bgcolor) && strlen($fgcolor) && strlen($fgcolor)) {
         $this->tpl_onload .= "\$('section.cont01:eq(0)  ').css({\n            'background-color':'#{$bgcolor}','color':'#{$fgcolor}'\n        });";
         $this->tpl_onload .= "\$('section.cont01:eq(0) a[href*=\"www.kisekae-touch.com\"]').css({\n            'color':'#{$lkcolor}'\n        });";
     }
     switch (basename($_SERVER["SCRIPT_NAME"], ".php")) {
         case "detail":
             $this->check_os();
             break;
         case "detail_spass":
             if (!isset($this->arrProduct["product_code_spass"])) {
                 SC_Utils::sfDispSiteError(PRODUCT_NOT_FOUND);
             }
             $objQuery = SC_Query_Ex::getSingletonInstance();
             $objQuery->setWhere("spass_provide_start_date <= NOW()");
             $objQuery->andWhere("spass_provide_end_date   >= NOW()");
             $objQuery->andWhere("product_id                = ? ");
             $this->arrSpassProduct = $objProduct->findProductCount($objQuery, array($this->tpl_product_id));
             break;
     }
 }
コード例 #13
0
ファイル: LC_Page_Order.php プロジェクト: khrisna/eccubedrm
 /**
  * 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);
 }
コード例 #14
0
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $objDb = new SC_Helper_DB_Ex();
     // パラメーター管理クラス
     $objFormParam = new SC_FormParam_Ex();
     // パラメーター情報の初期化
     $this->lfInitParam($objFormParam);
     $objFormParam->setParam($_POST);
     // 入力値の変換
     $objFormParam->convParam();
     $this->arrForm = $objFormParam->getHashArray();
     //        $this->arrForm = $_POST;
     //支払方法の取得
     $this->arrPayment = $objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method");
     switch ($this->getMode()) {
         case 'update':
             switch ($objFormParam->getValue('change_status')) {
                 case '':
                     break;
                     // 削除
                 // 削除
                 case 'delete':
                     $this->lfDelete($objFormParam->getValue('move'));
                     break;
                     // 更新
                 // 更新
                 default:
                     $this->lfStatusMove($objFormParam->getValue('change_status'), $objFormParam->getValue('move'));
                     break;
             }
             // 対応状況
             $status = !is_null($objFormParam->getValue('status')) ? $objFormParam->getValue('status') : "";
             break;
         case 'search':
             // 対応状況
             $status = !is_null($_POST['status']) ? $objFormParam->getValue('status') : "";
             break;
         default:
             // 対応状況
             //デフォルトで新規受付一覧表示
             $status = ORDER_NEW;
             break;
     }
     // 対応状況
     $this->SelectedStatus = $status;
     //検索結果の表示
     $this->lfStatusDisp($status, $objFormParam->getValue('search_pageno'));
 }
コード例 #15
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_AdminView();
     $objSess = new SC_Session();
     $objDb = new SC_Helper_DB_Ex();
     $objQuery = new SC_Query();
     // 認証可否の判定
     $objSess = new SC_Session();
     SC_Utils_Ex::sfIsSuccess($objSess);
     $this->arrForm = $_POST;
     //支払方法の取得
     $this->arrPayment = $objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method");
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     if (!isset($_POST['search_pageno'])) {
         $_POST['search_pageno'] = 1;
     }
     switch ($_POST['mode']) {
         case 'update':
             if (!isset($_POST['change_status'])) {
                 $_POST['change_status'] = "";
             }
             if ($_POST['change_status'] == 'delete') {
                 $this->lfStatusMove("delete", $_POST['move']);
             } elseif (!empty($_POST['change_status'])) {
                 $this->lfStatusMove($_POST['change_status'], $_POST['move']);
             }
             //ステータス情報
             $status = isset($_POST['status']) ? $_POST['status'] : "";
             break;
         case 'search':
             //ステータス情報
             $status = isset($_POST['status']) ? $_POST['status'] : "";
             break;
         default:
             //ステータス情報
             //デフォルトで新規受付一覧表示
             $status = ORDER_NEW;
             break;
     }
     //ステータス情報
     $this->SelectedStatus = $status;
     //検索結果の表示
     $this->lfStatusDisp($status, $_POST['search_pageno']);
     $objView->assignobj($this);
     $objView->display(MAIN_FRAME);
 }
コード例 #16
0
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $objDb = new SC_Helper_DB_Ex();
     $cnt = $objDb->sfGetBasisCount();
     if ($cnt > 0) {
         $this->tpl_mode = 'update';
     } else {
         $this->tpl_mode = 'insert';
     }
     if (!empty($_POST)) {
         $objFormParam = new SC_FormParam_Ex();
         $this->lfInitParam($objFormParam, $_POST);
         $objFormParam->setParam($_POST);
         $objFormParam->convParam();
         $this->arrErr = $this->lfErrorCheck($objFormParam);
         $post = $objFormParam->getHashArray();
         $this->arrForm = $post;
         if (count($this->arrErr) == 0) {
             switch ($this->getMode()) {
                 // 既存編集
                 case 'update':
                     $this->lfUpdateData($this->arrForm);
                     break;
                     // 新規作成
                 // 新規作成
                 case 'insert':
                     $this->lfInsertData($this->arrForm);
                     break;
                 default:
                     break;
             }
             $this->tpl_onload = "fnCheckLimit('downloadable_days', 'downloadable_days_unlimited', '" . DISABLED_RGB . "'); window.alert('SHOPマスターの登録が完了しました。');";
         }
         if (empty($this->arrForm['regular_holiday_ids'])) {
             $this->arrSel = array();
         } else {
             $this->arrSel = $this->arrForm['regular_holiday_ids'];
         }
     } else {
         $arrCol = $this->lfGetCol();
         $col = SC_Utils_Ex::sfGetCommaList($arrCol);
         $arrRet = $objDb->sfGetBasisData(true, $col);
         $this->arrForm = $arrRet;
         $regular_holiday_ids = explode('|', $this->arrForm['regular_holiday_ids']);
         $this->arrForm['regular_holiday_ids'] = $regular_holiday_ids;
         $this->tpl_onload = "fnCheckLimit('downloadable_days', 'downloadable_days_unlimited', '" . DISABLED_RGB . "');";
     }
 }
コード例 #17
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'order/index.tpl';
     $this->tpl_mainno = 'order';
     $this->tpl_subno = 'index';
     $this->tpl_pager = 'pager.tpl';
     $this->tpl_maintitle = t('c_Orders_01');
     $this->tpl_subtitle = t('c_Order master_01');
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
     $this->arrORDERSTATUS_COLOR = $masterData->getMasterData('mtb_order_status_color');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
     $objDate = new SC_Date_Ex();
     // 登録・更新日検索用
     $objDate->setStartYear(RELEASE_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrRegistYear = $objDate->getYear();
     // 生年月日検索用
     $objDate->setStartYear(BIRTH_YEAR);
     $objDate->setEndYear(DATE('Y'));
     $this->arrBirthYear = $objDate->getYear();
     // 月日の設定
     $this->arrMonth = $objDate->getMonth();
     $this->arrDay = $objDate->getDay();
     // 支払い方法の取得
     $this->arrPayments = SC_Helper_DB_Ex::sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method');
     $this->httpCacheControl('nocache');
 }
コード例 #18
0
 /**
  * Page のプロセス(モバイル).
  *
  * @return void
  */
 function mobileProcess()
 {
     $objView = new SC_MobileView();
     $objQuery = new SC_Query();
     $objCustomer = new SC_Customer();
     $objDb = new SC_Helper_DB_Ex();
     //不正アクセス判定
     $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(true) or $cnt == 0) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR, "", false, "", true);
     } 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');
     }
     $objView->assignobj($this);
     $objView->display(SITE_FRAME);
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 public function action()
 {
     // 基本情報を渡す
     $objSiteInfo = SC_Helper_DB_Ex::sfGetBasisData();
     $this->arrInfo = $objSiteInfo->data;
     //おすすめ商品表示
     $this->arrBestProducts = $this->lfGetRanking();
 }
コード例 #20
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $objCustomer = new SC_Customer_Ex();
     // 画面更新毎に情報を更新する
     if ($objCustomer->isLoginSuccess()) {
         // 初回アクセス時に更新
         $objCustomer->updateSession();
         $this->tpl_login = true;
         $this->tpl_point = $objCustomer->getValue("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");
     }
     $objDB = new SC_Helper_DB_Ex();
     $this->arrSiteInfo = $objDB->sfGetBasisData();
 }
コード例 #21
0
 function action()
 {
     $objDb = new SC_Helper_DB_Ex();
     $objFormParam = new SC_FormParam_Ex();
     $this->lfInitParam($objFormParam);
     $objFormParam->setParam($_POST);
     $objFormParam->convParam();
     $this->tpl_questionnaire_id = $objFormParam->getValue('questionnaire_id');
     $mode = $this->getMode();
     switch ($mode) {
         case 'csv':
             if (is_numeric($this->tpl_questionnaire_id)) {
                 $this->lfDoCSV($this->tpl_questionnaire_id);
             }
             break;
         case 'delete':
             if (is_numeric($this->tpl_questionnaire_id)) {
                 $objDb->sfDeleteRankRecord('dtb_questionnaire', 'questionnaire_id', $this->tpl_questionnaire_id);
                 $this->objDisplay->reload();
             }
             break;
         case 'pre_edit':
             if (is_numeric($this->tpl_questionnaire_id)) {
                 $arrContents = reset($this->lfGetContents($this->tpl_questionnaire_id));
                 $arrContents['question'] = unserialize($arrContents['question']);
                 $objFormParam->setParam($arrContents);
             }
             break;
             //---- 新規登録/編集登録
         //---- 新規登録/編集登録
         case 'confirm':
             $this->arrErr = $this->lfCheckError($objFormParam);
             if (SC_Utils_Ex::isBlank($this->arrErr)) {
                 // IDの値がPOSTされて来た場合は既存データの編集とみなす
                 $member_id = $_SESSION['member_id'];
                 $this->lfRegistData($objFormParam, $member_id, $this->tpl_questionnaire_id);
                 $this->tpl_onload = "window.alert('登録が完了しました');";
             }
             break;
         default:
             break;
     }
     $this->arrForm = $objFormParam->getFormParamList();
     $this->arrContents = $this->lfGetContents();
 }
コード例 #22
0
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $objDb = new SC_Helper_DB_Ex();
     // パラメーター管理クラス
     $objFormParam = new SC_FormParam_Ex();
     // パラメーター情報の初期化
     $this->lfInitParam($objFormParam);
     // POST値の取得
     $objFormParam->setParam($_POST);
     $cnt = $objDb->sfGetBasisCount();
     if ($cnt > 0) {
         $this->tpl_mode = 'update';
     } else {
         $this->tpl_mode = 'insert';
     }
     if (!empty($_POST)) {
         // 入力値の変換
         $objFormParam->convParam();
         $this->arrErr = $objFormParam->checkError();
         if (count($this->arrErr) == 0) {
             switch ($this->getMode()) {
                 case 'update':
                     $this->lfUpdateData($objFormParam->getHashArray());
                     // 既存編集
                     break;
                 case 'insert':
                     $this->lfInsertData($objFormParam->getHashArray());
                     // 新規作成
                     break;
                 default:
                     break;
             }
             // 再表示
             $this->tpl_onload = "window.alert('ポイント設定が完了しました。');";
         }
     } else {
         $arrCol = $objFormParam->getKeyList();
         // キー名一覧を取得
         $col = SC_Utils_Ex::sfGetCommaList($arrCol);
         $arrRet = $objDb->sfGetBasisData(true, $col);
         $objFormParam->setParam($arrRet);
     }
     $this->arrForm = $objFormParam->getFormParamList();
 }
コード例 #23
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $conn = new SC_DBConn();
     $objView = new SC_AdminView();
     $objSess = new SC_Session();
     $objDb = new SC_Helper_DB_Ex();
     // 認証可否の判定
     SC_Utils_Ex::sfIsSuccess($objSess);
     $this->tpl_pageno = isset($_POST['pageno']) ? $_POST['pageno'] : "";
     // 通常時は親カテゴリを0に設定する。
     $this->arrForm['parent_category_id'] = isset($_POST['parent_category_id']) ? $_POST['parent_category_id'] : 0;
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'up':
             $where = "category_id = " . SC_Utils_Ex::sfQuoteSmart($_POST['parent_category_id']);
             $objDb->sfRankUp("dtb_product_categories", "product_id", $_POST['product_id'], $where);
             break;
         case 'down':
             $where = "category_id = " . SC_Utils_Ex::sfQuoteSmart($_POST['parent_category_id']);
             $objDb->sfRankDown("dtb_product_categories", "product_id", $_POST['product_id'], $where);
             break;
         case 'move':
             $key = "pos-" . $_POST['product_id'];
             $input_pos = mb_convert_kana($_POST[$key], "n");
             if (SC_Utils_Ex::sfIsInt($input_pos)) {
                 $where = "category_id = " . SC_Utils_Ex::sfQuoteSmart($_POST['parent_category_id']);
                 $objDb->sfMoveRank("dtb_product_categories", "product_id", $_POST['product_id'], $input_pos, $where);
             }
             break;
         case 'tree':
             // カテゴリの切替は、ページ番号をクリアする。
             $this->tpl_pageno = "";
             break;
         default:
             break;
     }
     $this->arrTree = $objDb->sfGetCatTree($this->arrForm['parent_category_id']);
     $this->arrProductsList = $this->lfGetProduct($this->arrForm['parent_category_id']);
     $objView->assignobj($this);
     $objView->display(MAIN_FRAME);
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 public function action()
 {
     parent::action();
     //ヘッダーナビのカート情報を取得
     $objCart = new SC_CartSession_Ex();
     $cartKeys = $objCart->getKeys();
     $arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
     $this->freeRule = $arrInfo['free_rule'];
     $this->arrCartList = $this->lfGetCartData($objCart, $arrInfo, $cartKeys);
 }
コード例 #25
0
 /**
  * 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);
 }
コード例 #26
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $conn = new SC_DBConn();
     $objView = new SC_AdminView();
     $objSess = new SC_Session();
     // 認証可否の判定
     SC_Utils_Ex::sfIsSuccess($objSess);
     // DBバージョンの取得
     $objDb = new SC_Helper_DB_Ex();
     $this->db_version = $objDb->sfGetDBVersion();
     // PHPバージョンの取得
     $this->php_version = "PHP " . phpversion();
     // 現在の会員数
     $this->customer_cnt = $this->lfGetCustomerCnt($conn);
     // 昨日の売上高
     $this->order_yesterday_amount = $this->lfGetOrderYesterday($conn, "SUM");
     // 昨日の売上件数
     $this->order_yesterday_cnt = $this->lfGetOrderYesterday($conn, "COUNT");
     // 今月の売上高
     $this->order_month_amount = $this->lfGetOrderMonth($conn, "SUM");
     // 今月の売上件数
     $this->order_month_cnt = $this->lfGetOrderMonth($conn, "COUNT");
     // 顧客の累計ポイント
     $this->customer_point = $this->lfGetTotalCustomerPoint();
     //昨日のレビュー書き込み数
     $this->review_yesterday_cnt = $this->lfGetReviewYesterday($conn);
     //レビュー書き込み非表示数
     $this->review_nondisp_cnt = $this->lfGetReviewNonDisp($conn);
     // 品切れ商品
     $this->arrSoldout = $this->lfGetSoldOut();
     // 新規受付一覧
     $arrNewOrder = $this->lfGetNewOrder();
     foreach ($arrNewOrder as $key => $val) {
         $arrNewOrder[$key]['create_date'] = str_replace("-", "/", substr($val['create_date'], 0, 19));
     }
     $this->arrNewOrder = $arrNewOrder;
     // お知らせ一覧の取得
     $this->arrInfo = $this->lfGetInfo();
     $objView->assignobj($this);
     $objView->display(MAIN_FRAME);
 }
コード例 #27
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $conn = new SC_DBConn();
     $objView = new SC_AdminView();
     $objSess = new SC_Session();
     $objQuery = new SC_Query();
     $objDb = new SC_Helper_DB_Ex();
     // 認証可否の判定
     SC_Utils_Ex::sfIsSuccess($objSess);
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     switch ($_POST['mode']) {
         case 'delete':
             // ランク付きレコードの削除
             $objDb->sfDeleteRankRecord("dtb_deliv", "deliv_id", $_POST['deliv_id']);
             // 再表示
             SC_Utils_Ex::sfReload();
             break;
         case 'up':
             $objDb->sfRankUp("dtb_deliv", "deliv_id", $_POST['deliv_id']);
             // 再表示
             SC_Utils_Ex::sfReload();
             break;
         case 'down':
             $objDb->sfRankDown("dtb_deliv", "deliv_id", $_POST['deliv_id']);
             // 再表示
             SC_Utils_Ex::sfReload();
             break;
         default:
             break;
     }
     // 配送業者一覧の取得
     $col = "deliv_id, name, service_name";
     $where = "del_flg = 0";
     $table = "dtb_deliv";
     $objQuery->setorder("rank DESC");
     $this->arrDelivList = $objQuery->select($col, $table, $where);
     $objView->assignobj($this);
     $objView->display(MAIN_FRAME);
 }
コード例 #28
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_title = 'ご入力内容のご確認';
     $masterData = new SC_DB_MasterData_Ex();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrSex = $masterData->getMasterData('mtb_sex');
     $this->arrMAILMAGATYPE = $masterData->getMasterData('mtb_mail_magazine_type');
     $this->arrReminder = $masterData->getMasterData('mtb_reminder');
     $this->arrDeliv = SC_Helper_DB_Ex::sfGetIDValueList('dtb_deliv', 'deliv_id', 'service_name');
     $this->httpCacheControl('nocache');
 }
コード例 #29
0
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $objDb = new SC_Helper_DB_Ex();
     $objFormParam = new SC_FormParam_Ex();
     $this->lfInitParam($objFormParam);
     $objFormParam->setParam($_POST);
     if ($objDb->sfGetBasisExists()) {
         $this->tpl_mode = 'update';
     } else {
         $this->tpl_mode = 'insert';
     }
     if (!empty($_POST)) {
         // 入力値の変換
         $objFormParam->convParam();
         $this->arrErr = $this->lfCheckError($objFormParam);
         if (count($this->arrErr) == 0) {
             switch ($this->getMode()) {
                 case 'update':
                     $this->lfUpdateData($objFormParam->getHashArray());
                     // 既存編集
                     break;
                 case 'insert':
                     $this->lfInsertData($objFormParam->getHashArray());
                     // 新規作成
                     break;
                 default:
                     break;
             }
             // 再表示
             $this->tpl_onload = "window.alert('" . t('c_Registration of the Act on Specified Commercial Transactions is complete._01') . "');";
         }
     } else {
         $arrCol = $objFormParam->getKeyList();
         // キー名一覧を取得
         $col = SC_Utils_Ex::sfGetCommaList($arrCol);
         $arrRet = $objDb->sfGetBasisData(true, $col);
         $objFormParam->setParam($arrRet);
     }
     $this->arrForm = $objFormParam->getFormParamList();
 }
 /**
  * Page を初期化する.
  * LC_Page_Adminクラス内でエラーページを表示しようとした際に無限ループに陥るのを防ぐため,
  * ここでは, parent::init() を行わない.(フロントのエラー画面出力と同様の仕様)
  *
  * @return void
  */
 public function init()
 {
     $this->template = LOGIN_FRAME;
     $this->tpl_mainpage = 'login_error.tpl';
     $this->tpl_title = 'ログインエラー';
     // ディスプレイクラス生成
     $this->objDisplay = new SC_Display_Ex();
     // transformでフックしているばあいに, 再度エラーが発生するため, コールバックを無効化.
     $objHelperPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
     $objHelperPlugin->arrRegistedPluginActions = array();
     // キャッシュから店舗情報取得(DBへの接続は行わない)
     $this->arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisDataCache(false);
 }