/** * 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'); }
/** * 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); }
/** * 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'); }
/** * 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); }
/** * 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'); }
/** * Page を初期化する. * * @return void */ function init() { parent::init(); $this->tpl_mainpage = 'basis/delivery_input.tpl'; $this->tpl_subno = 'delivery'; $this->tpl_mainno = 'basis'; $masterData = new SC_DB_MasterData_Ex(); $this->arrPref = $masterData->getMasterData('mtb_pref'); $this->arrProductType = $masterData->getMasterData('mtb_product_type'); $this->arrPayments = SC_Helper_DB_Ex::sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method'); $this->tpl_maintitle = '基本情報管理'; $this->tpl_subtitle = '配送方法設定'; $this->mode = $this->getMode(); }
/** * 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')); }
/** * 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); }
/** * Page を初期化する. * * @return void */ function init() { parent::init(); $this->tpl_mainpage = 'products/product.tpl'; $this->tpl_mainno = 'products'; $this->tpl_subno = 'product'; $this->tpl_maintitle = t('c_Products_01'); $this->tpl_subtitle = t('c_Product registration_01'); $masterData = new SC_DB_MasterData_Ex(); $this->arrProductType = $masterData->getMasterData('mtb_product_type'); $this->arrDISP = $masterData->getMasterData('mtb_disp'); $this->arrSTATUS = $masterData->getMasterData('mtb_status'); $this->arrSTATUS_IMAGE = $masterData->getMasterData('mtb_status_image'); $this->arrDELIVERYDATE = $masterData->getMasterData('mtb_delivery_date'); $this->arrMaker = SC_Helper_DB_Ex::sfGetIDValueList('dtb_maker', 'maker_id', 'name'); $this->arrAllowedTag = $masterData->getMasterData('mtb_allowed_tag'); }
/** * Page を初期化する. * * @return void */ function init() { parent::init(); $this->tpl_mainpage = 'order/disp.tpl'; $this->tpl_mainno = 'order'; $this->tpl_subnavi = ''; $this->tpl_subno = ''; $this->tpl_subtitle = t('c_Order receipt information display_01'); $masterData = new SC_DB_MasterData_Ex(); $this->arrPref = $masterData->getMasterData('mtb_pref'); $this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status'); $this->arrDeviceType = $masterData->getMasterData('mtb_device_type'); // 支払い方法の取得 $this->arrPayment = SC_Helper_DB_Ex::sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method'); // 配送業者の取得 $this->arrDeliv = SC_Helper_DB_Ex::sfGetIDValueList('dtb_deliv', 'deliv_id', 'name'); }
/** * Page を初期化する. * * @return void */ function init() { parent::init(); $this->tpl_mainpage = 'order/disp.tpl'; $this->tpl_mainno = 'order'; $this->tpl_subnavi = ''; $this->tpl_subno = ''; $this->tpl_subtitle = '受注情報表示'; $masterData = new SC_DB_MasterData_Ex(); $this->arrPref = $masterData->getMasterData('mtb_pref'); $this->arrORDERSTATUS = $masterData->getMasterData("mtb_order_status"); $this->arrDeviceType = $masterData->getMasterData('mtb_device_type'); // 支払い方法の取得 $this->arrPayment = SC_Helper_DB_Ex::sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); // 配送業者の取得 $this->arrDeliv = SC_Helper_DB_Ex::sfGetIDValueList("dtb_deliv", "deliv_id", 'name'); }
/** * Page を初期化する. * * @return void */ function init() { parent::init(); $this->tpl_mainpage = 'products/product.tpl'; $this->tpl_mainno = 'products'; $this->tpl_subno = 'product'; $this->tpl_maintitle = '商品管理'; $this->tpl_subtitle = '商品登録'; $masterData = new SC_DB_MasterData_Ex(); $this->arrProductType = $masterData->getMasterData("mtb_product_type"); $this->arrDISP = $masterData->getMasterData("mtb_disp"); $this->arrCLASS = $masterData->getMasterData("mtb_class"); $this->arrSTATUS = $masterData->getMasterData("mtb_status"); $this->arrSTATUS_IMAGE = $masterData->getMasterData("mtb_status_image"); $this->arrDELIVERYDATE = $masterData->getMasterData("mtb_delivery_date"); $this->arrMaker = SC_Helper_DB_Ex::sfGetIDValueList("dtb_maker", "maker_id", 'name'); $this->arrAllowedTag = $masterData->getMasterData("mtb_allowed_tag"); }
/** * Page を初期化する. * * @return void */ function init() { parent::init(); $this->tpl_mainpage = 'products/upload_csv.tpl'; $this->tpl_mainno = 'products'; $this->tpl_subno = 'upload_csv'; $this->tpl_maintitle = '商品管理'; $this->tpl_subtitle = '商品登録CSV'; $this->csv_id = '1'; $masterData = new SC_DB_MasterData_Ex(); $this->arrDISP = $masterData->getMasterData('mtb_disp'); $this->arrSTATUS = $masterData->getMasterData('mtb_status'); $this->arrDELIVERYDATE = $masterData->getMasterData('mtb_delivery_date'); $this->arrProductType = $masterData->getMasterData('mtb_product_type'); $this->arrMaker = SC_Helper_DB_Ex::sfGetIDValueList('dtb_maker', 'maker_id', 'name'); $this->arrPayments = SC_Helper_DB_Ex::sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method'); $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData(); $this->arrAllowedTag = $masterData->getMasterData('mtb_allowed_tag'); $this->arrTagCheckItem = array(); }
/** * Page のAction. * * @return void */ function action() { $objCustomer = new SC_Customer_Ex(); $customer_id = $objCustomer->getvalue('customer_id'); //ページ送り用 $this->objNavi = new SC_PageNavi_Ex($_REQUEST['pageno'], $this->lfGetOrderHistory($customer_id), SEARCH_PMAX, 'fnNaviPage', NAVI_PMAX, 'pageno=#page#', SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE); $this->arrOrder = $this->lfGetOrderHistory($customer_id, $this->objNavi->start_row); switch ($this->getMode()) { case "getList": echo SC_Utils_Ex::jsonEncode($this->arrOrder); exit; break; default: break; } // 支払い方法の取得 $this->arrPayment = SC_Helper_DB_Ex::sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); // 1ページあたりの件数 $this->dispNumber = SEARCH_PMAX; }
/** * Page を初期化する. * * @return void */ function init() { parent::init(); $this->tpl_mainpage = 'order/edit.tpl'; $this->tpl_mainno = 'order'; $this->tpl_maintitle = '受注管理'; $this->tpl_subtitle = '受注登録'; $masterData = new SC_DB_MasterData_Ex(); $this->arrPref = $masterData->getMasterData('mtb_pref'); $this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status'); $this->arrDeviceType = $masterData->getMasterData('mtb_device_type'); $objDate = new SC_Date_Ex(RELEASE_YEAR); $this->arrYearShippingDate = $objDate->getYear('', date('Y'), ''); $this->arrMonthShippingDate = $objDate->getMonth(true); $this->arrDayShippingDate = $objDate->getDay(true); // 支払い方法の取得 $this->arrPayment = SC_Helper_DB_Ex::sfGetIDValueList('dtb_payment', 'payment_id', 'payment_method'); // 配送業者の取得 $this->arrDeliv = SC_Helper_DB_Ex::sfGetIDValueList('dtb_deliv', 'deliv_id', 'name'); $this->httpCacheControl('nocache'); }
/** * 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); }
/** * 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); }
function lfDispProductsList($ids, &$objQuery) { $objDb = new SC_Helper_DB_Ex(); // 規格名一覧 $arrClassName = $objDb->sfGetIDValueList("dtb_class", "class_id", "name"); // 規格分類名一覧 $arrClassCatName = $objDb->sfGetIDValueList("dtb_classcategory", "classcategory_id", "name"); $arrProductIds = split('-', $ids); if (!is_array($arrProductIds)) { $arrProductIds[0] = $ids; } // where句生成 $count = 0; $where = "product_id IN ("; foreach ($arrProductIds as $key => $val) { if ($count > 0) { $where .= ","; } $where .= "?"; $arrval[] = $val; $count++; } $where .= ")"; // 商品一覧 $arrProducts = $objQuery->select("*", "vw_products_allclass AS allcls", $where, $arrval); for ($i = 0; $i < count($arrProducts); $i++) { $this->lfMakeSelect($arrProducts[$i]['product_id'], $arrClassName, $arrClassCatName); // 購入制限数を取得 $this->lfGetSaleLimit($arrProducts); } foreach ($arrProducts as $key => $val) { $arrCamp[$val['product_id']] = $val; } $this->arrProducts = $arrCamp; }
function lfMakeSelectMobile(&$objPage, $product_id, $request_classcategory_id1) { $classcat_find1 = false; $classcat_find2 = false; // 規格名一覧 $arrClassName = SC_Helper_DB_Ex::sfGetIDValueList('dtb_class', 'class_id', 'name'); // 規格分類名一覧 $arrClassCatName = SC_Helper_DB_Ex::sfGetIDValueList('dtb_classcategory', 'classcategory_id', 'name'); // 商品規格情報の取得 $arrProductsClass = $this->lfGetProductsClass($product_id); // 規格1クラス名の取得 $objPage->tpl_class_name1 = $arrClassName[$arrProductsClass[0]['class_id1']]; // 規格2クラス名の取得 $objPage->tpl_class_name2 = $arrClassName[$arrProductsClass[0]['class_id2']]; // すべての組み合わせ数 $count = count($arrProductsClass); $classcat_id1 = ''; $arrSele1 = array(); $arrSele2 = array(); for ($i = 0; $i < $count; $i++) { // 在庫のチェック if ($arrProductsClass[$i]['stock'] <= 0 && $arrProductsClass[$i]['stock_unlimited'] != '1') { continue; } // 規格1のセレクトボックス用 if ($classcat_id1 != $arrProductsClass[$i]['classcategory_id1']) { $classcat_id1 = $arrProductsClass[$i]['classcategory_id1']; $arrSele1[$classcat_id1] = $arrClassCatName[$classcat_id1]; } // 規格2のセレクトボックス用 if ($arrProductsClass[$i]['classcategory_id1'] == $request_classcategory_id1 and $classcat_id2 != $arrProductsClass[$i]['classcategory_id2']) { $classcat_id2 = $arrProductsClass[$i]['classcategory_id2']; $arrSele2[$classcat_id2] = $arrClassCatName[$classcat_id2]; } } // 規格1 $objPage->arrClassCat1 = $arrSele1; $objPage->arrClassCat2 = $arrSele2; // 規格1が設定されている if (isset($arrProductsClass[0]['classcategory_id1']) && $arrProductsClass[0]['classcategory_id1'] != '0') { $classcat_find1 = true; } // 規格2が設定されている if (isset($arrProductsClass[0]['classcategory_id2']) && $arrProductsClass[0]['classcategory_id2'] != '0') { $classcat_find2 = true; } $objPage->tpl_classcat_find1 = $classcat_find1; $objPage->tpl_classcat_find2 = $classcat_find2; }
/** * 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->objUpFile = new SC_UploadFile(IMAGE_TEMP_DIR, IMAGE_SAVE_DIR); // ファイル情報の初期化 $this->objUpFile = $this->lfInitFile(); // Hiddenからのデータを引き継ぐ $this->objUpFile->setHiddenFileList($_POST); // パラメータ管理クラス $this->objFormParam = new SC_FormParam(); // パラメータ情報の初期化 $this->lfInitParam(); // POST値の取得 $this->objFormParam->setParam($_POST); switch ($_POST['mode']) { case 'edit': // 入力値の変換 $this->objFormParam->convParam(); // エラーチェック $this->arrErr = $this->lfCheckError(); $this->charge_flg = $_POST["charge_flg"]; if (count($this->arrErr) == 0) { $this->lfRegistData($_POST['payment_id']); // 一時ファイルを本番ディレクトリに移動する $this->objUpFile->moveTempFile(); // 親ウィンドウを更新するようにセットする。 $this->tpl_onload = "fnUpdateParent('" . URL_PAYMENT_TOP . "'); window.close();"; } break; // 画像のアップロード // 画像のアップロード case 'upload_image': // ファイル存在チェック $this->arrErr = $this->objUpFile->checkEXISTS($_POST['image_key']); // 画像保存処理 $this->arrErr[$_POST['image_key']] = $this->objUpFile->makeTempFile($_POST['image_key']); break; // 画像の削除 // 画像の削除 case 'delete_image': $this->objUpFile->deleteFile($_POST['image_key']); break; default: break; } if ($_POST['mode'] == "") { switch ($_GET['mode']) { case 'pre_edit': if (SC_Utils_Ex::sfIsInt($_GET['payment_id'])) { $arrRet = $this->lfGetData($_GET['payment_id']); $this->objFormParam->setParam($arrRet); $this->charge_flg = $arrRet["charge_flg"]; // DBデータから画像ファイル名の読込 $this->objUpFile->setDBFileList($arrRet); $this->tpl_payment_id = $_GET['payment_id']; } break; default: break; } } else { $this->tpl_payment_id = $_POST['payment_id']; } $this->arrDelivList = $objDb->sfGetIDValueList("dtb_deliv", "deliv_id", "service_name"); $this->arrForm = $this->objFormParam->getFormParamList(); // FORM表示用配列を渡す。 $this->arrFile = $this->objUpFile->getFormFileList(IMAGE_TEMP_URL, IMAGE_SAVE_URL); // HIDDEN用に配列を渡す。 $this->arrHidden = array_merge((array) $this->arrHidden, (array) $this->objUpFile->getHiddenFileList()); $objView->assignobj($this); $objView->display($this->tpl_mainpage); }
/** * 規格分類の登録された, すべての規格を取得する. * * @access private * @return array 規格分類の登録された, すべての規格 */ function getAllClass() { $arrClass = SC_Helper_DB_Ex::sfGetIDValueList('dtb_class', 'class_id', 'name'); // 規格分類が登録されていない規格は表示しないようにする。 $arrClassCatCount = SC_Utils_Ex::sfGetClassCatCount(); $results = array(); if (!SC_Utils_Ex::isBlank($arrClass)) { foreach ($arrClass as $key => $val) { if ($arrClassCatCount[$key] > 0) { $results[$key] = $arrClass[$key]; } } } return $results; }
function lfMakeSelectMobile(&$objPage, $product_id) { $objDb = new SC_Helper_DB_Ex(); $classcat_find1 = false; $classcat_find2 = false; // 在庫ありの商品の有無 $stock_find = false; // 規格名一覧 $arrClassName = $objDb->sfGetIDValueList("dtb_class", "class_id", "name"); // 規格分類名一覧 $arrClassCatName = $objDb->sfGetIDValueList("dtb_classcategory", "classcategory_id", "name"); // 商品規格情報の取得 $arrProductsClass = $this->lfGetProductsClass($product_id); // 規格1クラス名の取得 $objPage->tpl_class_name1 = $arrClassName[$arrProductsClass[0]['class_id1']]; // 規格2クラス名の取得 $objPage->tpl_class_name2 = $arrClassName[$arrProductsClass[0]['class_id2']]; // すべての組み合わせ数 $count = count($arrProductsClass); $classcat_id1 = ""; $arrSele1 = array(); $arrSele2 = array(); for ($i = 0; $i < $count; $i++) { // 在庫のチェック if ($arrProductsClass[$i]['stock'] <= 0 && $arrProductsClass[$i]['stock_unlimited'] != '1') { continue; } $stock_find = true; // 規格1のセレクトボックス用 if ($classcat_id1 != $arrProductsClass[$i]['classcategory_id1']) { $classcat_id1 = $arrProductsClass[$i]['classcategory_id1']; $arrSele1[$classcat_id1] = $arrClassCatName[$classcat_id1]; } // 規格2のセレクトボックス用 if ($arrProductsClass[$i]['classcategory_id1'] == $_POST['classcategory_id1'] and $classcat_id2 != $arrProductsClass[$i]['classcategory_id2']) { $classcat_id2 = $arrProductsClass[$i]['classcategory_id2']; $arrSele2[$classcat_id2] = $arrClassCatName[$classcat_id2]; } } // 規格1 $objPage->arrClassCat1 = $arrSele1; $objPage->arrClassCat2 = $arrSele2; // 規格1が設定されている if ($arrProductsClass[0]['classcategory_id1'] != '0') { $classcat_find1 = true; } // 規格2が設定されている if ($arrProductsClass[0]['classcategory_id2'] != '0') { $classcat_find2 = true; } $objPage->tpl_classcat_find1 = $classcat_find1; $objPage->tpl_classcat_find2 = $classcat_find2; $objPage->tpl_stock_find = $stock_find; }
/** * 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 action() { $objDb = new SC_Helper_DB_Ex(); $mode = $this->getMode(); if (!empty($_POST)) { $objFormParam = new SC_FormParam_Ex(); $objFormParam->addParam('配送業者ID', 'payment_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK')); $objFormParam->setParam($_POST); $objFormParam->convParam(); $arrErr = $objFormParam->checkError(); if (!empty($this->arrErr['payment_id'])) { trigger_error('', E_USER_ERROR); return; } $post = $objFormParam->getHashArray(); } switch ($this->getMode()) { case 'delete': // ランク付きレコードの削除 $objDb->sfDeleteRankRecord('dtb_payment', 'payment_id', $post['payment_id']); // 再表示 $this->objDisplay->reload(); break; case 'up': $objDb->sfRankUp('dtb_payment', 'payment_id', $post['payment_id']); // 再表示 $this->objDisplay->reload(); break; case 'down': $objDb->sfRankDown('dtb_payment', 'payment_id', $post['payment_id']); // 再表示 $this->objDisplay->reload(); break; } $this->arrDelivList = $objDb->sfGetIDValueList('dtb_deliv', 'deliv_id', 'service_name'); $this->arrPaymentListFree = $this->lfGetPaymentList(); }
/** * メーカーIDをキー, 名前を値とする配列を取得. * * @return array */ public static function getIDValueList() { return SC_Helper_DB_Ex::sfGetIDValueList('dtb_maker', 'maker_id', 'name'); }
function lfRegistOrderDetail(&$objQuery, $order_id, &$objCartSess) { $objDb = new SC_Helper_DB_Ex(); // カート内情報の取得 $arrCart = $objCartSess->getCartList(); $max = count($arrCart); // 既に存在する詳細レコードを消しておく。 $objQuery->delete("dtb_order_detail", "order_id = {$order_id}"); // 規格名一覧 $arrClassName = $objDb->sfGetIDValueList("dtb_class", "class_id", "name"); // 規格分類名一覧 $arrClassCatName = $objDb->sfGetIDValueList("dtb_classcategory", "classcategory_id", "name"); for ($i = 0; $i < $max; $i++) { // 商品規格情報の取得 $arrData = $objDb->sfGetProductsClass($arrCart[$i]['id']); // 存在する商品のみ表示する。 if ($arrData != "") { $sqlval['order_id'] = $order_id; $sqlval['product_id'] = $arrCart[$i]['id'][0]; $sqlval['classcategory_id1'] = $arrCart[$i]['id'][1]; $sqlval['classcategory_id2'] = $arrCart[$i]['id'][2]; $sqlval['product_name'] = $arrData['name']; $sqlval['product_code'] = $arrData['product_code']; $sqlval['classcategory_name1'] = $arrClassCatName[$arrData['classcategory_id1']]; $sqlval['classcategory_name2'] = $arrClassCatName[$arrData['classcategory_id2']]; $sqlval['point_rate'] = $arrCart[$i]['point_rate']; $sqlval['price'] = $arrCart[$i]['price']; $sqlval['quantity'] = $arrCart[$i]['quantity']; $this->lfReduceStock($objQuery, $arrCart[$i]['id'], $arrCart[$i]['quantity']); // INSERTの実行 $objQuery->insert("dtb_order_detail", $sqlval); } else { if (defined("MOBILE_SITE")) { SC_Utils_Ex::sfDispSiteError(CART_NOT_FOUND, "", false, "", true); } else { SC_Utils_Ex::sfDispSiteError(CART_NOT_FOUND); } } } }
function lfProductConfirmPage() { $objDb = new SC_Helper_DB_Ex(); $this->arrForm['mode'] = 'complete'; $this->arrClass = $objDb->sfGetIDValueList("dtb_class", 'class_id', 'name'); $cnt = 0; $check = 0; $no = 1; while ($_POST["classcategory_id1:" . $no] != "") { if ($_POST["check:" . $no] != "") { $check++; } $no++; $cnt++; } $this->tpl_check = $check; $this->tpl_count = $cnt; }
/** * 支払方法IDをキー, 名前を値とする配列を取得. * * @param string $type 値のタイプ * @return array */ public static function getIDValueList($type = 'payment_method') { return SC_Helper_DB_Ex::sfGetIDValueList('dtb_payment', 'payment_id', $type); }
function lfMakeSelectMobile(&$objPage, $product_id, $request_classcategory_id1) { $classcat_find1 = false; $classcat_find2 = false; // 規格名一覧 $arrClassName = SC_Helper_DB_Ex::sfGetIDValueList('dtb_class', 'class_id', 'name'); // 規格分類名一覧 $arrClassCatName = SC_Helper_DB_Ex::sfGetIDValueList('dtb_classcategory', 'classcategory_id', 'name'); // 商品規格情報の取得 $arrProductsClass = $this->lfGetProductsClass($product_id); // 規格1クラス名の取得 $objPage->tpl_class_name1 = $arrClassName[$arrProductsClass[0]['class_id1']]; // 規格2クラス名の取得 $objPage->tpl_class_name2 = $arrClassName[$arrProductsClass[0]['class_id2']]; // すべての組み合わせ数 $count = count($arrProductsClass); $classcat_id1 = ''; $arrSele1 = array(); $arrSele2 = array(); // 規格1 $objPage->arrClassCat1 = $arrSele1; $objPage->arrClassCat2 = $arrSele2; // 規格1が設定されている if (isset($arrProductsClass[0]['classcategory_id1']) && $arrProductsClass[0]['classcategory_id1'] != '0') { $classcat_find1 = true; } // 規格2が設定されている if (isset($arrProductsClass[0]['classcategory_id2']) && $arrProductsClass[0]['classcategory_id2'] != '0') { $classcat_find2 = true; } $objPage->tpl_classcat_find1 = $classcat_find1; $objPage->tpl_classcat_find2 = $classcat_find2; }
/** * Page のプロセス. * * @return void */ function process() { // 認証可否の判定 $objSess = new SC_Session(); SC_Utils_Ex::sfIsSuccess($objSess); $this->objQuery = new SC_Query(); $this->objConn = new SC_DBConn(); $objView = new SC_AdminView(); $objDb = new SC_Helper_DB_Ex(); $objDate = new SC_Date(1901); $this->arrYear = $objDate->getYear(); // 日付プルダウン設定 $this->arrMonth = $objDate->getMonth(); $this->arrDay = $objDate->getDay(); //---- 登録用カラム配列 $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" => "a"), array("column" => "reminder", "convert" => "n"), array("column" => "reminder_answer", "convert" => "aKV"), array("column" => "mailmaga_flg", "convert" => "n"), array("column" => "note", "convert" => "aKV"), array("column" => "point", "convert" => "n"), array("column" => "status", "convert" => "n")); //---- 登録除外用カラム配列 $arrRejectRegistColumn = array("year", "month", "day"); // 検索条件を保持 if ($_POST['mode'] == "edit_search") { $arrSearch = $_POST; } else { $arrSearch = $_POST['search_data']; } if (is_array($arrSearch)) { foreach ($arrSearch as $key => $val) { $arrSearchData[$key] = $val; } } $this->arrSearchData = $arrSearchData; //---- 顧客編集情報取得 if (($_POST["mode"] == "edit" || $_POST["mode"] == "edit_search") && is_numeric($_POST["edit_customer_id"])) { //-- 顧客データ取得 $sql = "SELECT * FROM dtb_customer WHERE del_flg = 0 AND customer_id = ?"; $result = $this->objConn->getAll($sql, array($_POST["edit_customer_id"])); $this->list_data = $result[0]; $birth = split(" ", $this->list_data["birth"]); $birth = split("-", $birth[0]); $this->list_data["year"] = $birth[0]; $this->list_data["month"] = isset($birth[1]) ? $birth[1] : ""; $this->list_data["day"] = isset($birth[2]) ? $birth[2] : ""; $this->list_data["password"] = DEFAULT_PASSWORD; //DB登録のメールアドレスを渡す $this->tpl_edit_email = $result[0]['email']; //購入履歴情報の取得 $this->arrPurchaseHistory = $this->lfPurchaseHistory($_POST['edit_customer_id']); // 支払い方法の取得 $this->arrPayment = $objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); } //---- 顧客情報編集 if ($_POST["mode"] != "edit" && $_POST["mode"] != "edit_search" && is_numeric($_POST["customer_id"])) { //-- POSTデータの引き継ぎ $this->arrForm = $_POST; $this->arrForm['email'] = strtolower($this->arrForm['email']); // emailはすべて小文字で処理 //-- 入力データの変換 $this->arrForm = $this->lfConvertParam($this->arrForm, $arrRegistColumn); //-- 入力チェック $this->arrErr = $this->lfErrorCheck($this->arrForm); //-- 入力エラー発生 or リターン時 if ($this->arrErr || $_POST["mode"] == "return") { foreach ($this->arrForm as $key => $val) { $this->list_data[$key] = $val; } //購入履歴情報の取得 $this->arrPurchaseHistory = $this->lfPurchaseHistory($_POST['customer_id']); // 支払い方法の取得 $this->arrPayment = $objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method"); } else { //-- 確認 if ($_POST["mode"] == "confirm") { $this->tpl_mainpage = 'customer/edit_confirm.tpl'; $passlen = strlen($this->arrForm['password']); $this->passlen = $this->lfPassLen($passlen); } //-- 編集 if ($_POST["mode"] == "complete") { $this->tpl_mainpage = 'customer/edit_complete.tpl'; // 現在の会員情報を取得する $arrCusSts = $this->objQuery->getOne("SELECT status FROM dtb_customer WHERE customer_id = ?", array($_POST["customer_id"])); // 会員情報が変更されている場合にはシークレット№も更新する。 if ($arrCusSts != $_POST['status']) { $secret = SC_Utils_Ex::sfGetUniqRandomId("r"); $this->arrForm['secret_key'] = $secret; array_push($arrRegistColumn, array('column' => 'secret_key', 'convert' => 'n')); } //-- 編集登録 $objDb->sfEditCustomerData($this->arrForm, $arrRegistColumn); } } } //---- ページ表示 $objView->assignobj($this); $objView->display(MAIN_FRAME); }