/**
  * Page のAction.
  *
  * @return void
  */
 public function action()
 {
     switch ($this->getMode()) {
         case 'confirm':
             // トークンを設定
             $this->refusal_transactionid = $this->getRefusalToken();
             $this->tpl_mainpage = 'mypage/refusal_confirm.tpl';
             $this->tpl_subtitle = '退会手続き(確認ページ)';
             break;
         case 'complete':
             // トークン入力チェック
             if (!$this->isValidRefusalToken()) {
                 // エラー画面へ遷移する
                 SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
                 SC_Response_Ex::actionExit();
             }
             $objCustomer = new SC_Customer_Ex();
             $this->lfDeleteCustomer($objCustomer->getValue('customer_id'));
             $objCustomer->EndSession();
             SC_Response_Ex::sendRedirect('refusal_complete.php');
             break;
         default:
             if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
                 $this->refusal_transactionid = $this->getRefusalToken();
             }
             break;
     }
 }
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_AdminView();
     // 認証可否の判定
     $objSess = new SC_Session();
     SC_Utils_Ex::sfIsSuccess($objSess);
     $css_path = USER_PATH . "css/common.css";
     if (!isset($_POST['mode'])) {
         $_POST['mode'] = "";
     }
     // データ更新処理
     if ($_POST['mode'] == 'confirm') {
         // プレビュー用テンプレートに書き込み
         $fp = fopen($css_path, "w");
         // TODO
         fwrite($fp, $_POST['css']);
         fclose($fp);
         $this->tpl_onload = "alert('登録が完了しました。');";
     }
     // CSSファイルの読み込み
     if (file_exists($css_path)) {
         $css_data = file_get_contents($css_path);
     }
     // テキストエリアに表示
     $this->css_data = $css_data;
     // 画面の表示
     $objView->assignobj($this);
     $objView->display(MAIN_FRAME);
 }
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $conn = new SC_DBConn();
     $objView = new SC_AdminView();
     $objSess = new SC_Session();
     // 認証可否の判定
     SC_Utils_Ex::sfIsSuccess($objSess);
     if (!isset($_GET['mode'])) {
         $_GET['mode'] = "";
     }
     if (!isset($_GET['id'])) {
         $_GET['id'] = "";
     }
     if ($_GET['mode'] == "delete" && SC_Utils_Ex::sfCheckNumLength($_GET['id']) === true) {
         // メール担当の画像があれば削除しておく
         $sql = "SELECT charge_image FROM dtb_mailmaga_template WHERE template_id = ?";
         $result = $conn->getOne($sql, array($_GET["id"]));
         if (strlen($result) > 0) {
             @unlink(IMAGE_SAVE_DIR . $result);
         }
         // 登録削除
         $sql = "UPDATE dtb_mailmaga_template SET del_flg = 1 WHERE template_id = ?";
         $conn->query($sql, array($_GET['id']));
         $this->reload(null, true);
     }
     $sql = "SELECT *, create_date as disp_date FROM dtb_mailmaga_template WHERE del_flg = 0 ORDER BY create_date DESC";
     $this->list_data = $conn->getAll($sql);
     $this->list_data['disp_date'] = substr($this->list_data['disp_date'], 0, 19);
     $objView->assignobj($this);
     $objView->display(MAIN_FRAME);
 }
 /**
  * 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 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);
 }
Пример #6
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     $this->template = MAIN_FRAME;
     //IP制限チェック
     $allow_hosts = unserialize(ADMIN_ALLOW_HOSTS);
     if (is_array($allow_hosts) && count($allow_hosts) > 0) {
         if (array_search($_SERVER["REMOTE_ADDR"], $allow_hosts) === FALSE) {
             SC_Utils_Ex::sfDispError(AUTH_ERROR);
         }
     }
     //SSL制限チェック
     if (ADMIN_FORCE_SSL == TRUE) {
         if (SC_Utils_Ex::sfIsHTTPS() === false) {
             SC_Response_Ex::sendRedirect($_SERVER["REQUEST_URI"], $_GET, FALSE, TRUE);
         }
     }
     $this->tpl_authority = $_SESSION['authority'];
     // ディスプレイクラス生成
     $this->objDisplay = new SC_Display_Ex();
     // プラグインクラス生成
     $this->objPlagin = new SC_Helper_Plugin_Ex();
     $this->objPlagin->preProcess($this);
     // トランザクショントークンの検証と生成
     $this->doValidToken(true);
     $this->setTokenTo();
 }
Пример #7
0
 /**
  * Page を初期化する.
  *
  * @return void
  */
 function init()
 {
     $this->template = MAIN_FRAME;
     //IP制限チェック
     $allow_hosts = unserialize(ADMIN_ALLOW_HOSTS);
     if (is_array($allow_hosts) && count($allow_hosts) > 0) {
         if (array_search($_SERVER['REMOTE_ADDR'], $allow_hosts) === FALSE) {
             SC_Utils_Ex::sfDispError(AUTH_ERROR);
         }
     }
     //SSL制限チェック
     if (ADMIN_FORCE_SSL == TRUE) {
         if (SC_Utils_Ex::sfIsHTTPS() === false) {
             SC_Response_Ex::sendRedirect($_SERVER['REQUEST_URI'], $_GET, FALSE, TRUE);
         }
     }
     $this->tpl_authority = $_SESSION['authority'];
     // ディスプレイクラス生成
     $this->objDisplay = new SC_Display_Ex();
     // スーパーフックポイントを実行.
     $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
     $objPlugin->doAction('LC_Page_preProcess', array($this));
     // トランザクショントークンの検証と生成
     $this->doValidToken(true);
     $this->setTokenTo();
     // ローカルフックポイントを実行
     $parent_class_name = get_parent_class($this);
     $objPlugin->doAction($parent_class_name . '_action_before', array($this));
     $class_name = get_class($this);
     if ($class_name != $parent_class_name) {
         $objPlugin->doAction($class_name . '_action_before', array($this));
     }
 }
 /**
  * お届け先を登録
  *
  * @param array $sqlval
  * @return array()
  */
 function registAddress($sqlval)
 {
     $objQuery =& SC_Query_Ex::getSingletonInstance();
     $customer_id = $sqlval['customer_id'];
     $other_deliv_id = $sqlval['other_deliv_id'];
     // 顧客IDのチェック
     if (is_null($customer_id) || !is_numeric($customer_id) || !preg_match("/^\\d+\$/", $customer_id)) {
         SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '顧客IDを正しく指定して下さい。');
     }
     // 追加
     if (strlen($other_deliv_id == 0)) {
         // 別のお届け先登録数の取得
         $deliv_count = $objQuery->count('dtb_other_deliv', 'customer_id = ?', array($customer_id));
         // 別のお届け先最大登録数に達している場合、エラー
         if ($deliv_count >= DELIV_ADDR_MAX) {
             SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '別のお届け先最大登録数に達しています。');
         }
         // 実行
         $sqlval['other_deliv_id'] = $objQuery->nextVal('dtb_other_deliv_other_deliv_id');
         $objQuery->insert('dtb_other_deliv', $sqlval);
         // 変更
     } else {
         $deliv_count = $objQuery->count('dtb_other_deliv', 'other_deliv_id = ?', array($other_deliv_id));
         if ($deliv_count != 1) {
             SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '一致する別のお届け先がありません。');
         }
         // 実行
         $objQuery->update('dtb_other_deliv', $sqlval, 'other_deliv_id = ?', array($other_deliv_id));
     }
 }
Пример #9
0
 /**
  * Page のAction.
  *
  * @return void
  */
 function action()
 {
     $objCustomer = new SC_Customer_Ex();
     if (!SC_Utils_Ex::sfIsInt($_GET['send_id'])) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     }
     $arrMailView = $this->lfGetMailView($_GET['send_id'], $objCustomer->getValue('customer_id'));
     if (empty($arrMailView)) {
         SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
     }
     $this->tpl_subject = $arrMailView[0]['subject'];
     $this->tpl_body = $arrMailView[0]['mail_body'];
     if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_PC) {
         $this->setTemplate('mypage/mail_view.tpl');
     } else {
         $this->tpl_title = 'メール履歴詳細';
         $this->tpl_mainpage = 'mypage/mail_view.tpl';
     }
     switch ($this->getMode()) {
         case 'getDetail':
             echo SC_Utils_Ex::jsonEncode($arrMailView);
             SC_Response_Ex::actionExit();
             break;
         default:
             break;
     }
 }
 /**
  * CSVファイルを送信する
  *
  * @param integer $csv_id
  *            CSVフォーマットID
  * @param string $where
  *            WHERE条件文
  * @param array $arrVal
  *            プリペアドステートメントの実行時に使用される配列。配列の要素数は、クエリ内のプレースホルダの数と同じでなければなりません。
  * @param string $order
  *            ORDER文
  * @param boolean $is_download
  *            true:ダウンロード用出力までさせる false:CSVの内容を返す(旧方式、メモリを食います。)
  * @return boolean|string $is_download = true時 成功失敗フラグ(boolean) 、$is_downalod = false時 string
  */
 public function sfDownloadCsv($csv_id, $where = '', $arrVal = array(), $order = '', $is_download = false)
 {
     switch ($csv_id) {
         case 1:
         case 2:
         case 3:
         case 4:
         case 5:
             return parent::sfDownloadCsv($csv_id, $where, $arrVal, $order, $is_download);
     }
     $objQuery =& SC_Query_Ex::getSingletonInstance();
     // CSV出力タイトル行の作成
     $arrOutput = SC_Utils_Ex::sfSwapArray($this->sfGetCsvOutput($csv_id, 'status = ' . CSV_COLUMN_STATUS_FLG_ENABLE));
     if (count($arrOutput) <= 0) {
         SC_Utils_Ex::sfDispError("");
         return false;
         // 失敗終了
     }
     $arrOutputCols = $arrOutput['col'];
     $cols = SC_Utils_Ex::sfGetCommaList($arrOutputCols, true);
     switch ($csv_id) {
         case 6:
             // キャラクター
             $from = 'cp_dtb_character';
             break;
         case 7:
             // 端末
             $from = 'cp_dtb_device';
             break;
     }
     $objQuery->setOrder($order);
     $sql = $objQuery->getSql($cols, $from, $where);
     return $this->sfDownloadCsvFromSql($sql, $arrVal, $this->arrSubnavi[$csv_id], $arrOutput['disp_name'], $is_download);
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 public function action()
 {
     if (strpos(HTTPS_URL, 'https://') !== FALSE) {
         $this->tpl_enable_ssl = TRUE;
     }
     $objFormParam = new SC_FormParam_Ex();
     // パラメーターの初期化
     $this->initParam($objFormParam, $_POST);
     if (count($_POST) > 0) {
         // エラーチェック
         $arrErr = $objFormParam->checkError();
         $this->arrForm = $objFormParam->getHashArray();
         //設定ファイルの権限チェック
         if (!is_writable(CONFIG_REALFILE)) {
             $arrErr['all'] = CONFIG_REALFILE . ' を変更する権限がありません。';
         }
         //管理画面ディレクトリのチェック
         $this->lfCheckAdminArea($this->arrForm, $arrErr);
         if (SC_Utils_Ex::isBlank($arrErr) && $this->lfUpdateAdminData($this->arrForm)) {
             $this->tpl_onload = "window.alert('管理機能の設定を変更しました。URLを変更した場合は、新しいURLにアクセスしてください。');";
         } else {
             $this->tpl_onload = "window.alert('設定内容に誤りがあります。設定内容を確認してください。');";
             $this->arrErr = array_merge($arrErr, $this->arrErr);
         }
     } else {
         $admin_dir = str_replace('/', '', ADMIN_DIR);
         $this->arrForm = array('admin_dir' => $admin_dir, 'admin_force_ssl' => ADMIN_FORCE_SSL, 'admin_allow_hosts' => '');
         if (defined('ADMIN_ALLOW_HOSTS')) {
             $allow_hosts = unserialize(ADMIN_ALLOW_HOSTS);
             $this->arrForm['admin_allow_hosts'] = implode("\n", $allow_hosts);
         }
     }
 }
 /**
  * Page のAction.
  *
  * @return void
  */
 public function action()
 {
     $objCustomer = new SC_Customer_Ex();
     $customer_id = $objCustomer->getValue('customer_id');
     switch ($this->getMode()) {
         case 'delete_favorite':
             // お気に入り削除
             $this->lfDeleteFavoriteProduct($customer_id, intval($_POST['product_id']));
             break;
         case 'getList':
             // スマートフォン版のもっと見るボタン用
             // ページ送り用
             if (isset($_POST['pageno'])) {
                 $this->tpl_pageno = intval($_POST['pageno']);
             }
             $this->arrFavorite = $this->lfGetFavoriteProduct($customer_id, $this);
             SC_Product_Ex::setPriceTaxTo($this->arrFavorite);
             // 一覧メイン画像の指定が無い商品のための処理
             foreach ($this->arrFavorite as $key => $val) {
                 $this->arrFavorite[$key]['main_list_image'] = SC_Utils_Ex::sfNoImageMainList($val['main_list_image']);
             }
             echo SC_Utils_Ex::jsonEncode($this->arrFavorite);
             SC_Response_Ex::actionExit();
             break;
         default:
             break;
     }
     // ページ送り用
     if (isset($_POST['pageno'])) {
         $this->tpl_pageno = intval($_POST['pageno']);
     }
     $this->arrFavorite = $this->lfGetFavoriteProduct($customer_id, $this);
     // 1ページあたりの件数
     $this->dispNumber = SEARCH_PMAX;
 }
Пример #13
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $objView = new SC_SiteView_Ex(false);
     // 入力エラーチェック
     $arrErr = $this->fnErrorCheck($_GET);
     // 入力エラーの場合は終了
     if (count($arrErr) > 0) {
         $tpl_message = "";
         foreach ($arrErr as $key => $val) {
             $tpl_message .= preg_replace("/<br \\/>/", "\n", $val);
         }
         echo $tpl_message;
         // エラー無し
     } else {
         // 郵便番号検索文作成
         $zipcode = $_GET['zip1'] . $_GET['zip2'];
         $zipcode = mb_convert_kana($zipcode, 'n');
         // 郵便番号検索
         $arrAdsList = SC_Utils_Ex::sfGetAddress($zipcode);
         // 郵便番号が発見された場合
         if (!empty($arrAdsList)) {
             $data = $arrAdsList[0]['state'] . "|" . $arrAdsList[0]['city'] . "|" . $arrAdsList[0]['town'];
             echo $data;
             // 該当無し
         } else {
             echo "該当する住所が見つかりませんでした。";
         }
     }
 }
Пример #14
0
/**
 * モジュールリスト一覧をjson出力する
 *
 */
function displayProductsList()
{
    $arrRet = array('status' => 'SUCCESS', 'data' => $GLOBALS['productsList']);
    // FIXME 一覧を取得するたびに更新されるのは微妙かも..
    updateModuleTable($GLOBALS['productsList']);
    echo SC_Utils_Ex::jsonEncode($arrRet);
}
 /**
  * Page のプロセス.
  *
  * POST パラメーター "mode" が register の場合は登録処理を行う.
  * 登録処理の後, 自ページをリロードし, GET パラメーター "mode" を付与する.
  * 登録に成功し, GET パラメーター "mode" の値が success の場合は
  * 「登録に成功しました」というメッセージをポップアップで表示する.
  * 登録に失敗し, GET パラメーター "mode" の値が failure の場合は
  * 「登録に失敗しました」というメッセージをポップアップで表示する.
  *
  * TODO Transaction Token を使用する
  *
  * @return void
  */
 function process()
 {
     // 認証可否の判定
     SC_Utils_Ex::sfIsSuccess(new SC_Session());
     switch ($_POST["mode"]) {
         case "register":
             if ($this->register($_POST['ga_ua'])) {
                 SC_Response_Ex::reload(array("mode" => "success"), true);
                 exit;
             } else {
                 SC_Response_Ex::reload(array("mode" => "failure"), true);
                 exit;
             }
             break;
         default:
     }
     switch ($_GET["mode"]) {
         case "success":
             $this->tpl_onload .= "window.alert('登録に成功しました。');";
             break;
         case "failure":
             $this->tpl_onload .= "window.alert('登録に失敗しました。');";
             break;
         default:
     }
     $objView = new SC_AdminView_Ex();
     $objView->assignobj($this);
     $objView->display(MAIN_FRAME);
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     if (strpos(HTTPS_URL, 'https://') !== FALSE) {
         $this->tpl_enable_ssl = TRUE;
     }
     $objFormParam = new SC_FormParam_Ex();
     // パラメーターの初期化
     $this->initParam($objFormParam, $_POST);
     if (count($_POST) > 0) {
         // エラーチェック
         $arrErr = $objFormParam->checkError();
         $this->arrForm = $objFormParam->getHashArray();
         //設定ファイルの権限チェック
         if (!is_writable(CONFIG_REALFILE)) {
             $arrErr['all'] = t('c_You do not have access to change T_ARG1._01', array('T_ARG1' => CONFIG_REALFILE));
         }
         //管理画面ディレクトリのチェック
         $this->lfCheckAdminArea($this->arrForm, $arrErr);
         if (SC_Utils_Ex::isBlank($arrErr) && $this->lfUpdateAdminData($this->arrForm)) {
             $this->tpl_onload = "window.alert('" . t('c_Management area settings were revised. If the URL was changed, access the new URL._01') . "');";
         } else {
             $this->tpl_onload = "window.alert('" . t('c_There is an error in the settings details. Check the settings details._01') . "');";
             $this->arrErr = array_merge($arrErr, $this->arrErr);
         }
     } else {
         $admin_dir = str_replace('/', '', ADMIN_DIR);
         $this->arrForm = array('admin_dir' => $admin_dir, 'admin_force_ssl' => ADMIN_FORCE_SSL, 'admin_allow_hosts' => '');
         if (defined('ADMIN_ALLOW_HOSTS')) {
             $allow_hosts = unserialize(ADMIN_ALLOW_HOSTS);
             $this->arrForm['admin_allow_hosts'] = implode("\n", $allow_hosts);
         }
     }
 }
Пример #17
0
 /**
  * Page のAction.
  *
  * @return void
  */
 function action()
 {
     $objProduct = new SC_Product_Ex();
     $objCustomer = new SC_Customer_Ex();
     $customer_id = $objCustomer->getValue('customer_id');
     switch ($this->getMode()) {
         case 'delete_favorite':
             // お気に入り削除
             $this->lfDeleteFavoriteProduct($customer_id, intval($_POST['product_id']));
             break;
         case 'getList':
             // スマートフォン版のもっと見るボタン用
             // ページ送り用
             if (isset($_POST['pageno'])) {
                 $this->tpl_pageno = intval($_POST['pageno']);
             }
             $this->arrFavorite = $this->lfGetFavoriteProduct($customer_id, $this);
             $this->arrFavorite = $objProduct->setPriceTaxTo($this->arrFavorite);
             echo SC_Utils_Ex::jsonEncode($this->arrFavorite);
             SC_Response_Ex::actionExit();
             break;
     }
     // ページ送り用
     if (isset($_POST['pageno'])) {
         $this->tpl_pageno = intval($_POST['pageno']);
     }
     $this->arrFavorite = $this->lfGetFavoriteProduct($customer_id, $this);
     // 1ページあたりの件数
     $this->dispNumber = SEARCH_PMAX;
 }
Пример #18
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 public function process()
 {
     // 入力エラーチェック
     $arrErr = $this->fnErrorCheck($_GET);
     // 入力エラーの場合は終了
     if (count($arrErr) > 0) {
         $tpl_message = '';
         foreach ($arrErr as $val) {
             $tpl_message .= preg_replace("/<br \\/>/", "\n", $val);
         }
         echo $tpl_message;
         // エラー無し
     } else {
         // 郵便番号検索文作成
         $zipcode = $_GET['zip1'] . $_GET['zip2'];
         // 郵便番号検索
         $arrAdsList = SC_Utils_Ex::sfGetAddress($zipcode);
         // 郵便番号が発見された場合
         if (!empty($arrAdsList)) {
             $data = $arrAdsList[0]['state'] . '|' . $arrAdsList[0]['city'] . '|' . $arrAdsList[0]['town'];
             echo $data;
             // 該当無し
         } else {
             echo '該当する住所が見つかりませんでした。';
         }
     }
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     // チェック後のデータを格納
     $arrClean = array();
     // $_GET['move'] が想定値かどうかチェック
     switch ($_GET['move']) {
         case 'up':
         case 'down':
             $arrClean['move'] = $_GET['move'];
             break;
         default:
             $arrClean['move'] = "";
             break;
     }
     // 正当な数値であればOK
     if (SC_Utils_Ex::sfIsInt($_GET['id'])) {
         $arrClean['id'] = $_GET['id'];
         switch ($arrClean['move']) {
             case 'up':
                 $this->lfRunkUp($arrClean['id']);
                 break;
             case 'down':
                 $this->lfRunkDown($arrClean['id']);
                 break;
             default:
                 break;
         }
     } else {
         GC_Utils_Ex::gfPrintLog("error id=" . $_GET['id']);
     }
     // ページの表示
     SC_Response_Ex::sendRedirect(ADMIN_SYSTEM_URLPATH);
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $objFormParam = new SC_FormParam_Ex();
     $this->lfInitParam($objFormParam);
     $objFormParam->setParam($_POST);
     $objFormParam->convParam();
     $arrForm = array();
     switch ($this->getMode()) {
         case 'edit':
             $arrForm = $objFormParam->getHashArray();
             $this->arrErr = $objFormParam->checkError();
             // エラーなしの場合にはデータを更新
             if (count($this->arrErr) == 0) {
                 // データ更新
                 $this->arrErr = $this->updateData($arrForm);
                 if (count($this->arrErr) == 0) {
                     // コンパイルファイルのクリア処理
                     SC_Utils_Ex::clearCompliedTemplate();
                     $this->tpl_onload = "alert('登録が完了しました。');";
                 }
             }
             break;
         default:
             // プラグイン情報を取得.
             $plugin = SC_Plugin_Util_Ex::getPluginByPluginCode("AddProduct");
             $arrForm['ssl'] = $plugin['free_field1'];
             break;
     }
     $this->arrForm = $arrForm;
     $this->setTemplate($this->tpl_mainpage);
 }
Пример #21
0
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     $conn = new SC_DBConn();
     $this->objSess = new SC_Session();
     $ret = false;
     if (!isset($_POST['login_id'])) {
         $_POST['login_id'] = "";
     }
     if (!isset($_POST['password'])) {
         $_POST['password'] = "";
     }
     // 入力判定
     if (strlen($_POST['login_id']) > 0 && strlen($_POST['password']) >= ID_MIN_LEN && strlen($_POST['password']) <= ID_MAX_LEN) {
         // 認証パスワードの判定
         $ret = $this->fnCheckPassword($conn);
     }
     if ($ret) {
         // 成功
         $this->sendRedirect($this->getLocation(URL_HOME));
         exit;
     } else {
         // エラーページの表示
         SC_Utils_Ex::sfDispError(LOGIN_ERROR);
         exit;
     }
 }
Пример #22
0
 function update(array $arrPlugin, SC_Plugin_Installer $installer)
 {
     $base_dir = dirname(__FILE__);
     GC_Utils_Ex::gfPrintLog("[" . $arrPlugin["plugin_code"] . "]更新処理を実行します。", PLUGIN_LOG_REALFILE, FALSE);
     $log = "";
     $xdir = PLUGIN_UPLOAD_REALDIR . $arrPlugin["plugin_code"];
     if (!is_dir($xdir . "_" . date("Ymd") . "/")) {
         rename($xdir . "/", $xdir . "_" . date("Ymd") . "/");
     }
     SC_Helper_FileManager_Ex::deleteFile($xdir . "/", false);
     $log .= SC_Utils_Ex::sfCopyDir("{$base_dir}/", PLUGIN_UPLOAD_REALDIR . $arrPlugin["plugin_code"] . "/", '', true);
     // logo コピー
     $installer->copyDirectory("copy/plugin_dir/", "");
     GC_Utils_Ex::gfPrintLog($log, PLUGIN_LOG_REALFILE, false);
     $core = new SupportDeviceCore($arrPlugin);
     $plugin_version = $arrPlugin["plugin_version"];
     switch ($plugin_version) {
         case "0.0.0":
         case "0.0.1":
             // 再インストール
             $core->install($arrPlugin, $installer);
             $core->update($arrPlugin, $installer, "0.0.0");
             break;
         default:
             $core->update($arrPlugin, $installer, $plugin_version);
             break;
     }
     $core->createCash();
     $objQuery = SC_Query_Ex::getSingletonInstance();
     $objQuery->begin();
     GC_Utils_Ex::gfPrintLog("[" . $arrPlugin["plugin_code"] . "]更新処理を実行完了しました。", PLUGIN_LOG_REALFILE, FALSE);
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 public function action()
 {
     // パラメーター管理クラス
     $objFormParam = new SC_FormParam_Ex();
     // パラメーター設定
     $this->lfInitParam($objFormParam);
     $objFormParam->setParam($_POST);
     $objFormParam->convParam();
     // パラメーター読み込み
     $this->arrForm = $objFormParam->getFormParamList();
     // 入力パラメーターチェック
     $this->arrErr = $this->lfCheckError($objFormParam);
     if (SC_Utils_Ex::isBlank($this->arrErr)) {
         // POSTのモードがsearchなら会員検索開始
         switch ($this->getMode()) {
             case 'search':
                 list($this->tpl_linemax, $this->arrCustomer, $this->objNavi) = $this->lfDoSearch($objFormParam->getHashArray());
                 $this->tpl_strnavi = $this->objNavi->strnavi;
                 break;
             default:
                 break;
         }
     }
     $this->setTemplate($this->tpl_mainpage);
 }
Пример #24
0
 /**
  * Page のAction.
  *
  * @return void
  */
 public function action()
 {
     //決済処理中ステータスのロールバック
     $objPurchase = new SC_Helper_Purchase_Ex();
     $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
     $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, 'eccube.movePage', 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);
             SC_Response_Ex::actionExit();
             break;
         default:
             break;
     }
     // 支払い方法の取得
     $this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
     // 1ページあたりの件数
     $this->dispNumber = SEARCH_PMAX;
     $this->json_payment = SC_Utils::jsonEncode($this->arrPayment);
     $this->json_customer_order_status = SC_Utils::jsonEncode($this->arrCustomerOrderStatus);
 }
 /**
  * Page のプロセス.
  *
  * @return void
  */
 function process()
 {
     // 認証可否の判定
     SC_Utils_Ex::sfIsSuccess(new SC_Session());
     $objView = new SC_AdminView_Ex();
     $objView->assignobj($this);
     $objView->display(MAIN_FRAME);
 }
 public function testSfIsMatchHashPassword_ハッシュ化後の文字列が一致する場合_trueが返る()
 {
     $pass = '******';
     $salt = 'salt';
     $hashpass = SC_Utils_Ex::sfGetHashString($pass, $salt);
     $this->expected = TRUE;
     $this->actual = SC_Utils::sfIsMatchHashPassword($pass, $hashpass, $salt);
     $this->verify('パスワード文字列比較結果');
 }
 /**
  * マスターデータ名チェックを行う
  *
  * @access private
  * @param array $arrMasterDataName
  *            マスターデータテーブル名のリスト
  * @return string $master_data_name 選択しているマスターデータのテーブル名
  */
 public function checkMasterDataName(&$arrParams, &$arrMasterDataName)
 {
     if (in_array($arrParams['master_data_name'], $arrMasterDataName)) {
         $master_data_name = $arrParams['master_data_name'];
         return $master_data_name;
     } else {
         SC_Utils_Ex::sfDispError('');
     }
 }
Пример #28
0
 /**
  *
  * @param Mobile_Detect $detect
  */
 function check_os()
 {
     $detect = new Mobile_Detect();
     if ($detect->is("iOS")) {
         // OK
     } else {
         SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
     }
 }
 /**
  * ブロックファイルに応じて tpl_mainpage を設定する
  *
  * @param  string $bloc_file ブロックファイル名
  * @return void
  */
 public function setTplMainpage($bloc_file)
 {
     if (SC_Utils_Ex::isAbsoluteRealPath($bloc_file)) {
         $this->tpl_mainpage = $bloc_file;
     } else {
         $this->tpl_mainpage = SC_Helper_PageLayout_Ex::getTemplatePath($this->objDisplay->detectDevice()) . BLOC_DIR . $bloc_file;
     }
     $this->setTemplate($this->tpl_mainpage);
 }
 /**
  * Page のアクション.
  *
  * @return void
  */
 function action()
 {
     $send_id = $_GET['send_id'];
     if (SC_Utils_Ex::sfIsInt($send_id)) {
         $mailHistory = $this->getMailHistory($send_id);
         $this->tpl_subject = $mailHistory[0]['subject'];
         $this->tpl_body = $mailHistory[0]['mail_body'];
     }
     $this->setTemplate($this->tpl_mainpage);
 }