Пример #1
0
 /**
  * Enter description here...
  *
  * @param unknown_type $errCode
  * @param unknown_type $errMessage
  */
 function setError($errCode)
 {
     $masterData = new SC_DB_MasterData();
     $arrOStoreErrMsg = $masterData->getMasterData("mtb_ownersstore_err");
     $this->arrData['status'] = OSTORE_STATUS_ERROR;
     $this->arrData['errcode'] = $errCode;
     $this->arrData['msg'] = isset($arrOStoreErrMsg[$errCode]) ? $arrOStoreErrMsg[$errCode] : $arrOStoreErrMsg[OSTORE_E_UNKNOWN];
 }
Пример #2
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $masterData = new SC_DB_MasterData();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->tpl_title = "お届け先の指定";
     $this->httpCacheControl('nocache');
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_onload = "fnCheckInputPoint();";
     $this->tpl_title = "お支払方法・お届け時間等の指定";
     $masterData = new SC_DB_MasterData();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
 }
Пример #4
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'shopping/deliv.tpl';
     $this->tpl_column_num = 1;
     $this->tpl_css = URL_DIR . 'css/layout/shopping/index.css';
     $masterData = new SC_DB_MasterData();
     $this->arrPref = $masterData->getMasterData("mtb_pref", array("pref_id", "pref_name", "rank"));
     $this->tpl_title = "お届け先指定";
     $this->allowClientCache();
 }
Пример #5
0
 function isValidIP()
 {
     $objLog = new LC_Upgrade_Helper_Log();
     $masterData = new SC_DB_MasterData();
     $arrOstoreIPs = $masterData->getMasterData("mtb_ownersstore_ips");
     if (isset($_SERVER['REMOTE_ADDR']) && in_array($_SERVER['REMOTE_ADDR'], $arrOstoreIPs)) {
         $objLog->log('* ip ok ' . $_SERVER['REMOTE_ADDR']);
         return true;
     }
     $objLog->log('* refused ip ' . $_SERVER['REMOTE_ADDR']);
     return false;
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_title = "ご入力内容のご確認";
     $masterData = new SC_DB_MasterData();
     $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');
 }
Пример #7
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'shopping/index.tpl';
     $this->tpl_column_num = 1;
     $masterData = new SC_DB_MasterData();
     $this->arrPref = $masterData->getMasterData("mtb_pref", array("pref_id", "pref_name", "rank"));
     $this->arrSex = $masterData->getMasterData("mtb_sex");
     $this->arrJob = $masterData->getMasterData("mtb_job");
     $this->tpl_onload = 'fnCheckInputDeliv();';
     $this->allowClientCache();
 }
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_mainpage = 'shopping/confirm.tpl';
     $this->tpl_column_num = 1;
     $this->tpl_css = URL_DIR . 'css/layout/shopping/confirm.css';
     $this->tpl_title = "ご入力内容のご確認";
     $masterData = new SC_DB_MasterData();
     $this->arrPref = $masterData->getMasterData("mtb_pref", array("pref_id", "pref_name", "rank"));
     $this->arrSex = $masterData->getMasterData("mtb_sex");
     $this->arrMAILMAGATYPE = $masterData->getMasterData("mtb_mail_magazine_type");
     $this->arrReminder = $masterData->getMasterData("mtb_reminder");
     $this->allowClientCache();
 }
Пример #9
0
 /**
  * ページのレイアウト情報を取得し, 設定する.
  *
  * 現在の URL に応じたページのレイアウト情報を取得し, LC_Page インスタンスに
  * 設定する.
  *
  * @access public
  * @param LC_Page $objPage LC_Page インスタンス
  * @param boolean $preview プレビュー表示の場合 true
  * @param string $url ページのURL($_SERVER['PHP_SELF'] の情報)
  * @param integer $device_type_id 端末種別ID
  * @return void
  */
 function sfGetPageLayout(&$objPage, $preview = false, $url = "", $device_type_id = DEVICE_TYPE_PC)
 {
     // URLを元にページ情報を取得
     if ($preview === false) {
         $url = preg_replace('|^' . preg_quote(ROOT_URLPATH) . '|', '', $url);
         $arrPageData = $this->getPageProperties($device_type_id, null, 'url = ?', array($url));
     } else {
         $arrPageData = $this->getPageProperties($device_type_id, 0);
     }
     $objPage->tpl_mainpage = $this->getTemplatePath($device_type_id) . $arrPageData[0]['filename'] . ".tpl";
     $objPage->arrPageLayout =& $arrPageData[0];
     $objBlob = new SC_Helper_Blob_Ex();
     $containerName = $objBlob->getTemplateContainerName($device_type_id);
     /** pageのテンプレートがなければBlobから取得する */
     if (!is_file($objPage->tpl_mainpage)) {
         $objBlob->getBlob($containerName, $arrPageData[0]['filename'] . ".tpl", $objPage->tpl_mainpage);
     }
     // ページタイトルを設定
     if (SC_Utils_Ex::isBlank($objPage->tpl_title)) {
         $objPage->tpl_title = $objPage->arrPageLayout['page_name'];
     }
     // 該当ページのブロックを取得し, 配置する
     $masterData = new SC_DB_MasterData();
     $arrTarget = $masterData->getMasterData("mtb_target");
     $arrBlocs = $this->getBlocPositions($device_type_id, $objPage->arrPageLayout['page_id']);
     // php_path, tpl_path が存在するものを, 各ターゲットに配置
     foreach (array_keys($arrTarget) as $target_id) {
         foreach ($arrBlocs as $arrBloc) {
             if ($arrBloc['target_id'] != $target_id) {
                 continue;
             }
             /* Blobからすでにファイルを取得している場合*/
             if (is_file($arrBloc['tpl_path'])) {
                 $objPage->arrPageLayout[$arrTarget[$target_id]][] = $arrBloc;
             } else {
                 if ($objBlob->blobExists($containerName, $arrBloc['filename'] . ".tpl")) {
                     $localFilename = $arrBloc['tpl_path'];
                     $objBlob->getBlob($containerName, $arrBloc['filename'] . ".tpl", $localFilename);
                     $objPage->arrPageLayout[$arrTarget[$target_id]][] = $arrBloc;
                 } else {
                     $error = "ブロックが見つかりません\n" . "tpl_path: " . $arrBloc['tpl_path'] . "\n" . "php_path: " . $arrBloc['php_path'];
                     GC_Utils_Ex::gfPrintLog($error);
                 }
             }
         }
     }
     // カラム数を取得する
     $objPage->tpl_column_num = $this->getColumnNum($objPage->arrPageLayout);
 }
Пример #10
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     parent::init();
     $this->tpl_title = 'ログイン';
     $masterData = new SC_DB_MasterData();
     $this->arrPref = $masterData->getMasterData('mtb_pref');
     $this->arrSex = $masterData->getMasterData("mtb_sex");
     $this->arrJob = $masterData->getMasterData("mtb_job");
     $this->tpl_onload = 'fnCheckInputDeliv();';
     $objDate = new SC_Date_Ex(BIRTH_YEAR, date('Y', strtotime('now')));
     $this->arrYear = $objDate->getYear('', START_BIRTH_YEAR, '');
     $this->arrMonth = $objDate->getMonth(true);
     $this->arrDay = $objDate->getDay(true);
     $this->httpCacheControl('nocache');
 }
 function lfGetDateArray($start_day, $end_day)
 {
     $masterData = new SC_DB_MasterData();
     $arrWDAY = $masterData->getMasterData("mtb_wday");
     //配達可能日のスタート値がセットされていれば
     if ($start_day >= 1) {
         $now_time = time();
         $max_day = $start_day + $end_day;
         // 集計
         for ($i = $start_day; $i < $max_day; $i++) {
             // 基本時間から日数を追加していく
             $tmp_time = $now_time + $i * 24 * 3600;
             list($y, $m, $d, $w) = split(" ", date("y m d w", $tmp_time));
             $val = sprintf("%02d/%02d/%02d(%s)", $y, $m, $d, $arrWDAY[$w]);
             $arrDate[$val] = $val;
         }
     } else {
         $arrDate = false;
     }
     return $arrDate;
 }
 /**
  * 配送住所のプルダウン用連想配列を取得する.
  *
  * 会員ログイン済みの場合は, 会員登録住所及び追加登録住所を取得する.
  * 非会員の場合は, 「お届け先の指定」画面で入力した住所を取得する.
  *
  * @param SC_Customer $objCustomer SC_Customer インスタンス
  * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
  * @param integer $uniqid 受注一時テーブルのユニークID
  * @return array 配送住所のプルダウン用連想配列
  */
 function getDelivAddrs(&$objCustomer, &$objPurchase, $uniqid)
 {
     $masterData = new SC_DB_MasterData();
     $arrPref = $masterData->getMasterData('mtb_pref');
     $arrResults = array('' => '選択してください');
     // 会員ログイン時
     if ($objCustomer->isLoginSuccess(true)) {
         $arrAddrs = $objCustomer->getCustomerAddress($objCustomer->getValue('customer_id'));
         foreach ($arrAddrs as $val) {
             $other_deliv_id = SC_Utils_Ex::isBlank($val['other_deliv_id']) ? 0 : $val['other_deliv_id'];
             $arrResults[$other_deliv_id] = $val['name01'] . $val['name02'] . " " . $arrPref[$val['pref']] . $val['addr01'] . $val['addr02'];
         }
     } else {
         $arrShippings = $objPurchase->getShippingTemp();
         foreach ($arrShippings as $shipping_id => $val) {
             $arrResults[$shipping_id] = $val['shipping_name01'] . $val['shipping_name02'] . " " . $arrPref[$val['shipping_pref']] . $val['shipping_addr01'] . $val['shipping_addr02'];
         }
     }
     return $arrResults;
 }