';
echo '
';
- SC_Utils_Ex::sfFlush();
+ Utils::sfFlush();
// 画像を一個表示する件数を求める。
$line_all = $this->countZipCsv();
@@ -252,10 +246,10 @@ public function insertMtbZip($start = 1)
// $disp_line件ごとに進捗表示する
if ($cntCurrentLine % $disp_line == 0 && $img_cnt < IMAGE_MAX) {
echo '
';
- SC_Utils_Ex::sfFlush();
+ Utils::sfFlush();
$img_cnt++;
}
- SC_Utils_Ex::extendTimeOut();
+ Utils::extendTimeOut();
}
fclose($fp);
@@ -319,7 +313,7 @@ public function convertZipCsv()
public function countMtbZip()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
return $objQuery->count('mtb_zip');
}
diff --git a/data/class/pages/admin/contents/LC_Page_Admin_Contents_CSV.php b/data/Eccube/Page/Admin/Contents/Csv.php
similarity index 81%
rename from data/class/pages/admin/contents/LC_Page_Admin_Contents_CSV.php
rename to data/Eccube/Page/Admin/Contents/Csv.php
index 2dc19981028..adf771f2f61 100644
--- a/data/class/pages/admin/contents/LC_Page_Admin_Contents_CSV.php
+++ b/data/Eccube/Page/Admin/Contents/Csv.php
@@ -1,36 +1,30 @@
tpl_maintitle = 'コンテンツ管理';
$this->tpl_subtitle = 'CSV出力設定';
- $objCSV = new SC_Helper_CSV_Ex();
+ $objCSV = new CsvHelper();
$this->arrSubnavi = $objCSV->arrSubnavi; // 別名
$this->tpl_subno_csv = $objCSV->arrSubnavi[1]; //デフォルト
$this->arrSubnaviName = $objCSV->arrSubnaviName; // 表示名
@@ -71,7 +65,7 @@ public function process()
public function action()
{
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター設定
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -86,7 +80,7 @@ public function action()
case 'confirm':
// 入力パラメーターチェック
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
// 更新
$this->tpl_is_update = $this->lfUpdCsvOutput($this->tpl_csv_id, $objFormParam->getValue('output_list'));
}
@@ -111,7 +105,7 @@ public function action()
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -131,14 +125,14 @@ public function lfInitParam(&$objFormParam)
*/
public function lfGetCSVColumn($csv_id, $csv_status_flg = '', $order ='rank, no')
{
- $objCSV = new SC_Helper_CSV_Ex();
- if (SC_Utils_Ex::sfIsInt($csv_id)) {
+ $objCSV = new CsvHelper();
+ if (Utils::sfIsInt($csv_id)) {
if ($csv_status_flg !='') {
$arrData = $objCSV->sfGetCsvOutput($csv_id, 'status = ?', array($csv_status_flg), $order);
} else {
$arrData = $objCSV->sfGetCsvOutput($csv_id, '', array(), $order);
}
- $arrData = SC_Utils_Ex::sfSwapArray($arrData);
+ $arrData = Utils::sfSwapArray($arrData);
} else {
$arrData = array();
}
@@ -175,7 +169,7 @@ public function lfGetOptions($csv_id)
$arrData['no'] = array();
$arrData['disp_name'] = array();
}
- $arrData = SC_Utils_Ex::sfArrCombine($arrData['no'], $arrData['disp_name']);
+ $arrData = Utils::sfArrCombine($arrData['no'], $arrData['disp_name']);
return $arrData;
}
@@ -188,10 +182,10 @@ public function lfGetOptions($csv_id)
*/
public function lfGetCsvId($subno_csv)
{
- $objCSV = new SC_Helper_CSV_Ex();
+ $objCSV = new CsvHelper();
$arrKey = array_keys($objCSV->arrSubnavi, $subno_csv);
$csv_id = $arrKey[0];
- if (!SC_Utils_Ex::sfIsInt($csv_id)) {
+ if (!Utils::sfIsInt($csv_id)) {
//初期値取りだし
$arrKey = array_keys($objCSV->arrSubnavi);
$csv_id = $arrKey[0];
@@ -225,7 +219,7 @@ public function lfSetDefaultCsvOutput($csv_id)
*/
public function lfUpdCsvOutput($csv_id, $arrData = array())
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// ひとまず、全部使用しないで更新する
$table = 'dtb_csv';
$where = 'csv_id = ?';
diff --git a/data/class/pages/admin/contents/LC_Page_Admin_Contents_CsvSql.php b/data/Eccube/Page/Admin/Contents/CsvSql.php
similarity index 78%
rename from data/class/pages/admin/contents/LC_Page_Admin_Contents_CsvSql.php
rename to data/Eccube/Page/Admin/Contents/CsvSql.php
index ff713c9cf33..6c309818494 100644
--- a/data/class/pages/admin/contents/LC_Page_Admin_Contents_CsvSql.php
+++ b/data/Eccube/Page/Admin/Contents/CsvSql.php
@@ -1,36 +1,32 @@
lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -78,7 +74,7 @@ public function action()
// データの登録
case 'confirm':
$this->arrErr = $this->lfCheckConfirmError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
// データの更新
$this->arrForm['sql_id'] = $this->lfUpdData($objFormParam->getValue('sql_id'), $objFormParam->getDbArray());
// 完了メッセージ表示
@@ -88,7 +84,7 @@ public function action()
// 確認画面
case 'preview':
$this->arrErr = $this->lfCheckPreviewError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->sqlerr = $this->lfCheckSQL($objFormParam->getValue('csv_sql'));
}
$this->setTemplate('contents/csv_sql_view.tpl');
@@ -98,28 +94,28 @@ public function action()
// 新規作成
case 'new_page':
// リロード
- SC_Response_Ex::reload();
+ Response::reload();
break;
// データ削除
case 'delete':
$this->arrErr = $this->lfCheckDeleteError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->lfDelData($objFormParam->getValue('sql_id'));
- SC_Response_Ex::reload();
- SC_Response_Ex::actionExit();
+ Response::reload();
+ Response::actionExit();
}
break;
// CSV出力
case 'csv_output':
$this->arrErr = $this->lfCheckOutputError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->lfDoCsvOutput($objFormParam->getValue('csv_output_id'));
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
break;
default:
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
// 設定内容を取得する
$this->arrForm = $this->lfGetSqlData($objFormParam);
// カラム一覧を取得する
@@ -137,7 +133,7 @@ public function action()
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -152,7 +148,7 @@ public function lfInitParam(&$objFormParam)
/**
* SQL登録エラーチェック
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return array エラー配列
*/
public function lfCheckConfirmError(&$objFormParam)
@@ -160,17 +156,17 @@ public function lfCheckConfirmError(&$objFormParam)
// パラメーターの基本チェック
$arrErr = $objFormParam->checkError();
// 拡張エラーチェック
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->doFunc(array('名称', 'sql_name'), array('EXIST_CHECK'));
$objErr->doFunc(array('SQL文', 'csv_sql', '30000'), array('EXIST_CHECK', 'MAX_LENGTH_CHECK'));
$objErr->doFunc(array('SQL文には読み込み関係以外のSQLコマンドおよび";"記号', 'csv_sql', $this->lfGetSqlDenyList()), array('PROHIBITED_STR_CHECK'));
- if (!SC_Utils_Ex::isBlank($objErr->arrErr)) {
+ if (!Utils::isBlank($objErr->arrErr)) {
$arrErr = array_merge($arrErr, $objErr->arrErr);
}
// SQL文自体の確認、エラーが無い時のみ実行
- if (SC_Utils_Ex::isBlank($arrErr)) {
+ if (Utils::isBlank($arrErr)) {
$sql_error = $this->lfCheckSQL($objFormParam->getValue('csv_sql'));
- if (!SC_Utils_Ex::isBlank($sql_error)) {
+ if (!Utils::isBlank($sql_error)) {
$arrErr['csv_sql'] = '※ SQL文が不正です。SQL文を見直してください';
}
}
@@ -181,7 +177,7 @@ public function lfCheckConfirmError(&$objFormParam)
/**
* SQL確認エラーチェック
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return array エラー配列
*/
public function lfCheckPreviewError(&$objFormParam)
@@ -189,10 +185,10 @@ public function lfCheckPreviewError(&$objFormParam)
// パラメーターの基本チェック
$arrErr = $objFormParam->checkError();
// 拡張エラーチェック
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->doFunc(array('SQL文', 'csv_sql', '30000'), array('EXIST_CHECK', 'MAX_LENGTH_CHECK'));
$objErr->doFunc(array('SQL文には読み込み関係以外のSQLコマンドおよび";"記号', 'csv_sql', $this->lfGetSqlDenyList()), array('PROHIBITED_STR_CHECK'));
- if (!SC_Utils_Ex::isBlank($objErr->arrErr)) {
+ if (!Utils::isBlank($objErr->arrErr)) {
$arrErr = array_merge($arrErr, $objErr->arrErr);
}
@@ -202,7 +198,7 @@ public function lfCheckPreviewError(&$objFormParam)
/**
* SQL設定 削除エラーチェック
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return array エラー配列
*/
public function lfCheckDeleteError(&$objFormParam)
@@ -210,9 +206,9 @@ public function lfCheckDeleteError(&$objFormParam)
// パラメーターの基本チェック
$arrErr = $objFormParam->checkError();
// 拡張エラーチェック
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->doFunc(array('SQL ID', 'sql_id'), array('EXIST_CHECK'));
- if (!SC_Utils_Ex::isBlank($objErr->arrErr)) {
+ if (!Utils::isBlank($objErr->arrErr)) {
$arrErr = array_merge($arrErr, $objErr->arrErr);
}
@@ -222,7 +218,7 @@ public function lfCheckDeleteError(&$objFormParam)
/**
* SQL設定 CSV出力エラーチェック
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return array エラー配列
*/
public function lfCheckOutputError(&$objFormParam)
@@ -230,9 +226,9 @@ public function lfCheckOutputError(&$objFormParam)
// パラメーターの基本チェック
$arrErr = $objFormParam->checkError();
// 拡張エラーチェック
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->doFunc(array('CSV出力対象SQL ID', 'csv_output_id'), array('EXIST_CHECK'));
- if (!SC_Utils_Ex::isBlank($objErr->arrErr)) {
+ if (!Utils::isBlank($objErr->arrErr)) {
$arrErr = array_merge($arrErr, $objErr->arrErr);
}
@@ -246,10 +242,10 @@ public function lfCheckOutputError(&$objFormParam)
*/
public function lfGetTableList()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// 実テーブル上のカラム設定を見に行く仕様に変更 ref #476
$arrTable = $objQuery->listTables();
- if (SC_Utils_Ex::isBlank($arrTable)) {
+ if (Utils::isBlank($arrTable)) {
return array();
}
$arrRet = array();
@@ -271,13 +267,13 @@ public function lfGetTableList()
*/
public function lfGetColList($table)
{
- if (SC_Utils_Ex::isBlank($table)) {
+ if (Utils::isBlank($table)) {
return array();
}
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// 実テーブル上のカラム設定を見に行く仕様に変更 ref #476
$arrColList = $objQuery->listTableFields($table);
- $arrColList= SC_Utils_Ex::sfArrCombine($arrColList, $arrColList);
+ $arrColList= Utils::sfArrCombine($arrColList, $arrColList);
return $arrColList;
}
@@ -291,7 +287,7 @@ public function lfGetColList($table)
*/
public function lfGetSqlList($where = '' , $arrVal = array())
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$table = 'dtb_csv_sql';
$objQuery->setOrder('sql_id');
@@ -306,12 +302,12 @@ public function lfGetSqlList($where = '' , $arrVal = array())
*/
public function lfCheckSQL($sql)
{
- // FIXME: 意図的に new SC_Query しています。 force_runをtrueにする必要があるので.本当はqueryの引数で制御したい。ref SC_Query
- $objQuery = new SC_Query_Ex('', true);
+ // FIXME: 意図的に new Query しています。 force_runをtrueにする必要があるので.本当はqueryの引数で制御したい。ref Query
+ $objQuery = new Query('', true);
$err = '';
$sql = 'SELECT ' . $sql . ' ';
$objErrMsg = $objQuery->query($sql);
- if (PEAR::isError($objErrMsg)) {
+ if (\PEAR::isError($objErrMsg)) {
$err = $objErrMsg->message . "\n" . $objErrMsg->userinfo;
}
@@ -321,19 +317,19 @@ public function lfCheckSQL($sql)
/**
* SQL詳細設定情報呼び出し (編集中データがある場合はそれを保持する)
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return mixed 表示用パラメーター
*/
public function lfGetSqlData(&$objFormParam)
{
// 編集中データがある場合
- if (!SC_Utils_Ex::isBlank($objFormParam->getValue('sql_name'))
- || !SC_Utils_Ex::isBlank($objFormParam->getValue('csv_sql'))
+ if (!Utils::isBlank($objFormParam->getValue('sql_name'))
+ || !Utils::isBlank($objFormParam->getValue('csv_sql'))
) {
return $objFormParam->getHashArray();
}
$sql_id = $objFormParam->getValue('sql_id');
- if (!SC_Utils_Ex::isBlank($sql_id)) {
+ if (!Utils::isBlank($sql_id)) {
$arrData = $this->lfGetSqlList('sql_id = ?', array($sql_id));
return $arrData[0];
@@ -350,13 +346,13 @@ public function lfGetSqlData(&$objFormParam)
*/
public function lfDoCsvOutput($sql_id)
{
- $objCSV = new SC_Helper_CSV_Ex();
+ $objCSV = new CsvHelper();
$arrData = $this->lfGetSqlList('sql_id = ?', array($sql_id));
$sql = 'SELECT ' . $arrData[0]['csv_sql'];
$objCSV->sfDownloadCsvFromSql($sql, array(), 'contents', null, true);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
/**
@@ -368,10 +364,10 @@ public function lfDoCsvOutput($sql_id)
*/
public function lfUpdData($sql_id, $arrSqlVal)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$table = 'dtb_csv_sql';
$arrSqlVal['update_date'] = 'CURRENT_TIMESTAMP';
- if (SC_Utils_Ex::sfIsInt($sql_id)) {
+ if (Utils::sfIsInt($sql_id)) {
//データ更新
$where = 'sql_id = ?';
$objQuery->update($table, $arrSqlVal, $where, array($sql_id));
@@ -394,10 +390,10 @@ public function lfUpdData($sql_id, $arrSqlVal)
*/
public function lfDelData($sql_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$table = 'dtb_csv_sql';
$where = 'sql_id = ?';
- if (SC_Utils_Ex::sfIsInt($sql_id)) {
+ if (Utils::sfIsInt($sql_id)) {
$objQuery->delete($table, $where, array($sql_id));
return true;
diff --git a/data/class/pages/admin/contents/LC_Page_Admin_Contents_FileManager.php b/data/Eccube/Page/Admin/Contents/FileManager.php
similarity index 81%
rename from data/class/pages/admin/contents/LC_Page_Admin_Contents_FileManager.php
rename to data/Eccube/Page/Admin/Contents/FileManager.php
index 80f84565c88..b163b3c3a8b 100644
--- a/data/class/pages/admin/contents/LC_Page_Admin_Contents_FileManager.php
+++ b/data/Eccube/Page/Admin/Contents/FileManager.php
@@ -1,36 +1,31 @@
lfInitParam($objFormParam);
$objFormParam->setParam($this->createSetParam($_POST));
$objFormParam->convParam();
// ファイル管理クラス
- $objUpFile = new SC_UploadFile_Ex($objFormParam->getValue('now_dir'), $objFormParam->getValue('now_dir'));
+ $objUpFile = new UploadFile($objFormParam->getValue('now_dir'), $objFormParam->getValue('now_dir'));
// ファイル情報の初期化
$this->lfInitFile($objUpFile);
// ファイル操作クラス
- $objFileManager = new SC_Helper_FileManager_Ex();
+ $objFileManager = new FileManagerHelper();
switch ($this->getMode()) {
// フォルダ移動
case 'move':
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParamModeMove($objFormParam);
$objFormParam->setParam($this->createSetParam($_POST));
$objFormParam->convParam();
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$now_dir = $this->lfCheckSelectDir($objFormParam, $objFormParam->getValue('tree_select_file'));
$objFormParam->setValue('now_dir', $now_dir);
}
@@ -97,13 +92,13 @@ public function action()
// ファイル表示
case 'view':
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParamModeView($objFormParam);
$objFormParam->setParam($this->createSetParam($_POST));
$objFormParam->convParam();
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
if ($this->tryView($objFormParam)) {
$pattern = '/' . preg_quote($objFormParam->getValue('top_dir'), '/') . '/';
$file_url = htmlspecialchars(preg_replace($pattern, '', $objFormParam->getValue('select_file')));
@@ -115,47 +110,47 @@ public function action()
// ファイルダウンロード
case 'download':
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParamModeView($objFormParam);
$objFormParam->setParam($this->createSetParam($_POST));
$objFormParam->convParam();
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
if (is_dir($objFormParam->getValue('select_file'))) {
$disp_error = '※ ディレクトリをダウンロードすることは出来ません。
';
$this->setDispError('select_file', $disp_error);
} else {
- $path_exists = SC_Utils_Ex::checkFileExistsWithInBasePath($objFormParam->getValue('select_file'), USER_REALDIR);
+ $path_exists = Utils::checkFileExistsWithInBasePath($objFormParam->getValue('select_file'), USER_REALDIR);
if ($path_exists) {
// ファイルダウンロード
$objFileManager->sfDownloadFile($objFormParam->getValue('select_file'));
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
}
}
break;
// ファイル削除
case 'delete':
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParamModeView($objFormParam);
$objFormParam->setParam($this->createSetParam($_POST));
$objFormParam->convParam();
$this->arrErr = $objFormParam->checkError();
- $path_exists = SC_Utils::checkFileExistsWithInBasePath($objFormParam->getValue('select_file'), USER_REALDIR);
- if (SC_Utils_Ex::isBlank($this->arrErr) && ($path_exists)) {
- SC_Helper_FileManager_Ex::deleteFile($objFormParam->getValue('select_file'));
+ $path_exists = Utils::checkFileExistsWithInBasePath($objFormParam->getValue('select_file'), USER_REALDIR);
+ if (Utils::isBlank($this->arrErr) && ($path_exists)) {
+ FileManagerHelper::deleteFile($objFormParam->getValue('select_file'));
}
break;
// ファイル作成
case 'create':
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParamModeCreate($objFormParam);
$objFormParam->setParam($this->createSetParam($_POST));
$objFormParam->convParam();
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
if (!$this->tryCreateDir($objFileManager, $objFormParam)) {
$disp_error = '※ '.htmlspecialchars($objFormParam->getValue('create_file'), ENT_QUOTES).'の作成に失敗しました。
';
$this->setDispError('create_file', $disp_error);
@@ -169,7 +164,7 @@ public function action()
case 'upload':
// 画像保存処理
$ret = $objUpFile->makeTempFile('upload_file', false);
- if (SC_Utils_Ex::isBlank($ret)) {
+ if (Utils::isBlank($ret)) {
$tpl_onload = "alert('ファイルをアップロードしました。');";
$this->setTplOnLoad($tpl_onload);
} else {
@@ -200,7 +195,7 @@ public function action()
/**
* 初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -212,7 +207,7 @@ public function lfInitParam(&$objFormParam)
/**
* ディレクトリ移動時、パラメーター定義
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParamModeMove(&$objFormParam)
@@ -225,7 +220,7 @@ public function lfInitParamModeMove(&$objFormParam)
/**
* ファイル表示時、パラメーター定義
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParamModeView(&$objFormParam)
@@ -238,7 +233,7 @@ public function lfInitParamModeView(&$objFormParam)
/**
* ファイル表示時、パラメーター定義
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParamModeCreate(&$objFormParam)
@@ -252,7 +247,7 @@ public function lfInitParamModeCreate(&$objFormParam)
/**
* ファイル表示時、パラメーター定義
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParamCommon(&$objFormParam)
@@ -267,7 +262,7 @@ public function lfInitParamCommon(&$objFormParam)
/*
* ファイル情報の初期化
*
- * @param object $objUpFile SC_UploadFileインスタンス
+ * @param object $objUpFile UploadFileインスタンス
* @return void
*/
public function lfInitFile(&$objUpFile)
@@ -287,7 +282,7 @@ public function createSetParam($arrVal)
// Windowsの場合は, ディレクトリの区切り文字を\から/に変換する
$setParam['top_dir'] = (strpos(PHP_OS, 'WIN') === false) ? USER_REALDIR : str_replace('\\', '/', USER_REALDIR);
// 初期表示はルートディレクトリ(user_data/)を表示
- if (SC_Utils_Ex::isBlank($this->getMode())) {
+ if (Utils::isBlank($this->getMode())) {
$setParam['now_dir'] = $setParam['top_dir'];
}
@@ -309,8 +304,8 @@ public function setDispParam($key, $val)
/**
* ディレクトリを作成
*
- * @param SC_Helper_FileManager_Ex $objFileManager SC_Helper_FileManager_Exインスタンス
- * @param SC_FormParam $objFormParam SC_FormParamインスタンス
+ * @param FileManagerHelper $objFileManager FileManagerHelperインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return boolean ディレクトリ作成できたかどうか
*/
public function tryCreateDir($objFileManager, $objFormParam)
@@ -328,7 +323,7 @@ public function tryCreateDir($objFileManager, $objFormParam)
/**
* ファイル表示を行う
*
- * @param SC_FormParam $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return boolean ファイル表示するかどうか
*/
public function tryView(&$objFormParam)
@@ -346,7 +341,7 @@ public function tryView(&$objFormParam)
/**
* 現在の階層の一つ上の階層のディレクトリをテンプレートに渡す
*
- * @param SC_FormParam $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function setParentDir($objFormParam)
@@ -358,7 +353,7 @@ public function setParentDir($objFormParam)
/**
* 現在の階層のパスをテンプレートに渡す
*
- * @param SC_FormParam $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function setDispPath($objFormParam)
@@ -366,7 +361,7 @@ public function setDispPath($objFormParam)
// Windows 環境で DIRECTORY_SEPARATOR が JavaScript に渡るとエスケープ文字と勘違いするので置換
$html_realdir = str_replace(DIRECTORY_SEPARATOR, '/', HTML_REALDIR);
$arrNowDir = preg_split('/\//', str_replace($html_realdir, '', $objFormParam->getValue('now_dir')));
- $this->setDispParam('tpl_now_dir', SC_Utils_Ex::jsonEncode($arrNowDir));
+ $this->setDispParam('tpl_now_dir', Utils::jsonEncode($arrNowDir));
$this->setDispParam('tpl_file_path', $html_realdir);
}
@@ -380,7 +375,7 @@ public function setDispPath($objFormParam)
public function setDispError($key, $value)
{
// 既にエラーがある場合は、処理しない
- if (SC_Utils_Ex::isBlank($this->arrErr[$key])) {
+ if (Utils::isBlank($this->arrErr[$key])) {
$this->arrErr[$key] = $value;
}
}
@@ -399,7 +394,7 @@ public function setTplOnLoad($tpl_onload)
/*
* 選択ディレクトリがUSER_REALDIR以下かチェック
*
- * @param object $objFormParam SC_FormParamインスタンス
+ * @param object $objFormParam FormParamインスタンス
* @param string $dir ディレクトリ
* @return string $select_dir 選択ディレクトリ
*/
@@ -447,8 +442,8 @@ public function lfGetParentDir($dir)
/**
* ディレクトリツリー生成
*
- * @param SC_Helper_FileManager_Ex $objFileManager SC_Helper_FileManager_Exインスタンス
- * @param SC_FormParam $objFormParam SC_FormParamインスタンス
+ * @param FileManagerHelper $objFileManager FileManagerHelperインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function setDispTree($objFileManager, $objFormParam)
@@ -481,7 +476,7 @@ public function setDispTree($objFileManager, $objFormParam)
/**
* 現在の階層がルートディレクトリかどうかテンプレートに渡す
*
- * @param SC_FormParam $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function setIsTopDir($objFormParam)
diff --git a/data/class/pages/admin/contents/LC_Page_Admin_Contents_FileView.php b/data/Eccube/Page/Admin/Contents/FileView.php
similarity index 66%
rename from data/class/pages/admin/contents/LC_Page_Admin_Contents_FileView.php
rename to data/Eccube/Page/Admin/Contents/FileView.php
index 059ea5f0d66..f94b5a7c1c5 100644
--- a/data/class/pages/admin/contents/LC_Page_Admin_Contents_FileView.php
+++ b/data/Eccube/Page/Admin/Contents/FileView.php
@@ -1,36 +1,30 @@
getMode()) {
default:
// フォーム操作クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター情報の初期化
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_GET);
@@ -73,10 +67,10 @@ public function action()
if ($this->checkErrorDispFile($objFormParam)) {
$this->execFileView($objFormParam);
} else {
- SC_Utils_Ex::sfDispError('');
+ Utils::sfDispError('');
}
- SC_Response_Ex::actionExit();
+ Response::actionExit();
break;
}
}
@@ -84,7 +78,7 @@ public function action()
/**
* 初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -95,7 +89,7 @@ public function lfInitParam(&$objFormParam)
/**
* 表示するファイルにエラーチェックを行う
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return boolean $file_check_flg エラーチェックの結果
*/
public function checkErrorDispFile($objFormParam)
@@ -103,7 +97,7 @@ public function checkErrorDispFile($objFormParam)
$file_check_flg = false;
// FIXME パスのチェック関数が必要
$file = $objFormParam->getValue('file');
- $path_exists = SC_Utils::checkFileExistsWithInBasePath($file, USER_REALDIR);
+ $path_exists = Utils::checkFileExistsWithInBasePath($file, USER_REALDIR);
if ($path_exists) {
$file_check_flg = true;
}
@@ -132,12 +126,12 @@ public function execFileView($objFormParam)
$extension = pathinfo($file, PATHINFO_EXTENSION);
if (in_array($extension, $arrViewFile)) {
- $objFileManager = new SC_Helper_FileManager_Ex();
+ $objFileManager = new FileManagerHelper();
// ファイルを読み込んで表示
header("Content-type: text/plain\n\n");
echo $objFileManager->sfReadFile(USER_REALDIR . $file);
} else {
- SC_Response_Ex::sendRedirect(USER_URL . $file);
+ Response::sendRedirect(USER_URL . $file);
}
}
}
diff --git a/data/class/pages/admin/contents/LC_Page_Admin_Contents.php b/data/Eccube/Page/Admin/Contents/Index.php
similarity index 81%
rename from data/class/pages/admin/contents/LC_Page_Admin_Contents.php
rename to data/Eccube/Page/Admin/Contents/Index.php
index fef419d5050..fbe236e05ff 100644
--- a/data/class/pages/admin/contents/LC_Page_Admin_Contents.php
+++ b/data/Eccube/Page/Admin/Contents/Index.php
@@ -1,36 +1,32 @@
tpl_maintitle = 'コンテンツ管理';
$this->tpl_subtitle = '新着情報管理';
//---- 日付プルダウン設定
- $objDate = new SC_Date_Ex(ADMIN_NEWS_STARTYEAR);
+ $objDate = new Date(ADMIN_NEWS_STARTYEAR);
$this->arrYear = $objDate->getYear();
$this->arrMonth = $objDate->getMonth();
$this->arrDay = $objDate->getDay();
@@ -75,9 +71,9 @@ public function process()
*/
public function action()
{
- $objNews = new SC_Helper_News_Ex();
+ $objNews = new NewsHelper();
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$objFormParam->convParam();
@@ -88,7 +84,7 @@ public function action()
switch ($this->getMode()) {
case 'edit':
$this->arrErr = $this->lfCheckError($objFormParam);
- if (!SC_Utils_Ex::isBlank($this->arrErr['news_id'])) {
+ if (isset($this->arrErr['news_id']) && !Utils::isBlank($this->arrErr['news_id'])) {
trigger_error('', E_USER_ERROR);
return;
@@ -122,7 +118,7 @@ public function action()
//---- データ削除
$objNews->deleteNews($news_id);
//自分にリダイレクト(再読込による誤動作防止)
- SC_Response_Ex::reload();
+ Response::reload();
break;
//---- 表示順位移動
@@ -130,23 +126,23 @@ public function action()
$objNews->rankUp($news_id);
// リロード
- SC_Response_Ex::reload();
+ Response::reload();
break;
case 'down':
$objNews->rankDown($news_id);
// リロード
- SC_Response_Ex::reload();
+ Response::reload();
break;
case 'moveRankSet':
//---- 指定表示順位移動
$input_pos = $this->getPostRank($news_id);
- if (SC_Utils_Ex::sfIsInt($input_pos)) {
+ if (Utils::sfIsInt($input_pos)) {
$objNews->moveRank($news_id, $input_pos);
}
- SC_Response_Ex::reload();
+ Response::reload();
break;
default:
@@ -161,12 +157,12 @@ public function action()
/**
* 入力されたパラメーターのエラーチェックを行う。
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @return Array エラー内容
*/
public function lfCheckError(&$objFormParam)
{
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->arrErr = $objFormParam->checkError();
$objErr->doFunc(array('日付', 'year', 'month', 'day'), array('CHECK_DATE'));
@@ -175,7 +171,7 @@ public function lfCheckError(&$objFormParam)
/**
* パラメーターの初期化を行う
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfInitParam(&$objFormParam)
{
@@ -194,10 +190,10 @@ public function lfInitParam(&$objFormParam)
*
* @param integer $news_id
* @param array $sqlval
- * @param SC_Helper_News_Ex $objNews
+ * @param NewsHelper $objNews
* @return multiple
*/
- public function doRegist($news_id, $sqlval, SC_Helper_News_Ex $objNews)
+ public function doRegist($news_id, $sqlval, NewsHelper $objNews)
{
$sqlval['news_id'] = $news_id;
$sqlval['creator_id'] = $_SESSION['member_id'];
diff --git a/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php b/data/Eccube/Page/Admin/Contents/Recommend.php
similarity index 79%
rename from data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php
rename to data/Eccube/Page/Admin/Contents/Recommend.php
index 81d7a167bcb..4266fcc7524 100644
--- a/data/class/pages/admin/contents/LC_Page_Admin_Contents_Recommend.php
+++ b/data/Eccube/Page/Admin/Contents/Recommend.php
@@ -1,36 +1,33 @@
lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$objFormParam->convParam();
$arrPost = $objFormParam->getHashArray();
- $objRecommend = new SC_Helper_BestProducts_Ex();
+ $objRecommend = new BestProductsHelper();
switch ($this->getMode()) {
case 'down': //商品の並び替えをする。
@@ -89,7 +86,7 @@ public function action()
case 'regist': // 商品を登録する。
$this->arrErr[$arrPost['rank']] = $this->lfCheckError($objFormParam);
// 登録処理にエラーがあった場合は商品選択の時と同じ処理を行う。
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$member_id = $_SESSION['member_id'];
$this->insertRecommendProduct($arrPost, $member_id, $objRecommend);
$arrItems = $this->getRecommendProducts($objRecommend);
@@ -114,7 +111,7 @@ public function action()
break;
case 'set_item': // 商品を選択する。
$this->arrErr = $this->lfCheckError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr['rank']) && SC_Utils_Ex::isBlank($this->arrErr['product_id'])) {
+ if (Utils::isBlank($this->arrErr['rank']) && Utils::isBlank($this->arrErr['product_id'])) {
$arrItems = $this->setProducts($arrPost, $this->getRecommendProducts($objRecommend));
$this->checkRank = $arrPost['rank'];
}
@@ -128,13 +125,13 @@ public function action()
$this->arrItems = $arrItems;
// カテゴリ取得
- $objDb = new SC_Helper_DB_Ex();
- $this->arrCatList = $objDb->sfGetCategoryList('level = 1');
+ $objDb = new DbHelper();
+ $this->arrCatList = $objDb->getCategoryList('level = 1');
}
/**
* パラメーターの初期化を行う
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfInitParam(&$objFormParam)
{
@@ -147,12 +144,12 @@ public function lfInitParam(&$objFormParam)
/**
* 入力されたパラメーターのエラーチェックを行う。
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @return Array エラー内容
*/
public function lfCheckError(&$objFormParam)
{
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->arrErr = $objFormParam->checkError();
return $objErr->arrErr;
@@ -160,10 +157,10 @@ public function lfCheckError(&$objFormParam)
/**
* 既に登録されている内容を取得する
- * @param SC_Helper_BestProducts_Ex $objRecommend
+ * @param BestProductsHelper $objRecommend
* @return Array $arrReturnProducts データベースに登録されているおすすめ商品の配列
*/
- public function getRecommendProducts(SC_Helper_BestProducts_Ex &$objRecommend)
+ public function getRecommendProducts(BestProductsHelper &$objRecommend)
{
$arrList = $objRecommend->getList();
// product_id の一覧を作成
@@ -172,8 +169,8 @@ public function getRecommendProducts(SC_Helper_BestProducts_Ex &$objRecommend)
$product_ids[] = $value['product_id'];
}
- $objProduct = new SC_Product_Ex;
- $objQuery = $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objProduct = new Product;
+ $objQuery = $objQuery = Query::getSingletonInstance();
$arrProducts = $objProduct->getListByProductIds($objQuery, $product_ids);
$arrReturnProducts = array();
@@ -190,9 +187,9 @@ public function getRecommendProducts(SC_Helper_BestProducts_Ex &$objRecommend)
* おすすめ商品の新規登録を行う。
* @param Array $arrPost POSTの値を格納した配列
* @param Integer $member_id 登録した管理者を示すID
- * @param SC_Helper_BestProducts_Ex $objRecommend
+ * @param BestProductsHelper $objRecommend
*/
- public function insertRecommendProduct($arrPost, $member_id, SC_Helper_BestProducts_Ex &$objRecommend)
+ public function insertRecommendProduct($arrPost, $member_id, BestProductsHelper &$objRecommend)
{
$sqlval = array();
$sqlval['best_id'] = $arrPost['best_id'];
@@ -208,10 +205,10 @@ public function insertRecommendProduct($arrPost, $member_id, SC_Helper_BestProdu
/**
* データを削除する
* @param Array $arrPost POSTの値を格納した配列
- * @param SC_Helper_BestProducts_Ex $objRecommend
+ * @param BestProductsHelper $objRecommend
* @return void
*/
- public function deleteProduct($arrPost, SC_Helper_BestProducts_Ex &$objRecommend)
+ public function deleteProduct($arrPost, BestProductsHelper &$objRecommend)
{
if ($arrPost['best_id']) {
$target = $arrPost['best_id'];
@@ -229,7 +226,7 @@ public function deleteProduct($arrPost, SC_Helper_BestProducts_Ex &$objRecommend
*/
public function getProduct($product_id)
{
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$arrProduct = $objProduct->getDetail($product_id);
$return = array(
'product_id' => $arrProduct['product_id'],
diff --git a/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php b/data/Eccube/Page/Admin/Contents/RecommendSearch.php
similarity index 73%
rename from data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php
rename to data/Eccube/Page/Admin/Contents/RecommendSearch.php
index 1b908402871..2ef3ef4c0b0 100644
--- a/data/class/pages/admin/contents/LC_Page_Admin_Contents_RecommendSearch.php
+++ b/data/Eccube/Page/Admin/Contents/RecommendSearch.php
@@ -1,36 +1,33 @@
lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$objFormParam->convParam();
@@ -79,16 +76,16 @@ public function action()
$arrPost = $objFormParam->getHashArray();
// 入力された値にエラーがない場合、検索処理を行う。
// 検索結果の数に応じてページャの処理も入れる。
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
- $objProduct = new SC_Product_Ex();
+ if (Utils::isBlank($this->arrErr)) {
+ $objProduct = new Product();
$wheres = $this->createWhere($objFormParam, $objDb);
$this->tpl_linemax = $this->getLineCount($wheres, $objProduct);
- $page_max = SC_Utils_Ex::sfGetSearchPageMax($arrPost['search_page_max']);
+ $page_max = Utils::sfGetSearchPageMax($arrPost['search_page_max']);
// ページ送りの取得
- $objNavi = new SC_PageNavi_Ex($arrPost['search_pageno'], $this->tpl_linemax, $page_max, 'eccube.moveSearchPage', NAVI_PMAX);
+ $objNavi = new PageNavi($arrPost['search_pageno'], $this->tpl_linemax, $page_max, 'eccube.moveSearchPage', NAVI_PMAX);
$this->tpl_strnavi = $objNavi->strnavi; // 表示文字列
$startno = $objNavi->start_row;
@@ -102,14 +99,14 @@ public function action()
}
// カテゴリ取得
- $this->arrCatList = $objDb->sfGetCategoryList();
+ $this->arrCatList = $objDb->getCategoryList();
$this->rank = $rank;
$this->setTemplate('contents/recommend_search.tpl');
}
/**
* パラメーターの初期化を行う
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfInitParam(&$objFormParam)
{
@@ -122,12 +119,12 @@ public function lfInitParam(&$objFormParam)
/**
* 入力されたパラメーターのエラーチェックを行う。
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @return Array エラー内容
*/
public function lfCheckError(&$objFormParam)
{
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->arrErr = $objFormParam->checkError();
return $objErr->arrErr;
@@ -137,8 +134,8 @@ public function lfCheckError(&$objFormParam)
*
* POSTされた値からSQLのWHEREとBINDを配列で返す。
* @return array ('where' => where string, 'bind' => databind array)
- * @param SC_FormParam $objFormParam
- * @param SC_Helper_DB_Ex $objDb
+ * @param FormParam $objFormParam
+ * @param DbHelper $objDb
*/
public function createWhere(&$objFormParam, &$objDb)
{
@@ -156,7 +153,7 @@ public function createWhere(&$objFormParam, &$objDb)
$bind[] = '%'.$val.'%';
break;
case 'search_category_id':
- list($tmp_where, $tmp_bind) = $objDb->sfGetCatWhere($val);
+ list($tmp_where, $tmp_bind) = $objDb->getCatWhere($val);
if ($tmp_where != '') {
$where.= ' AND alldtl.product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')';
$bind = array_merge((array) $bind, (array) $tmp_bind);
@@ -185,14 +182,14 @@ public function createWhere(&$objFormParam, &$objDb)
*
* 検索結果対象となる商品の数を返す。
* @param array $whereAndBind
- * @param SC_Product $objProduct
+ * @param Product $objProduct
*/
- public function getLineCount($whereAndBind, &$objProduct)
+ public function getLineCount($whereAndBind, Product &$objProduct)
{
$where = $whereAndBind['where'];
$bind = $whereAndBind['bind'];
// 検索結果対象となる商品の数を取得
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setWhere($where);
$linemax = $objProduct->findProductCount($objQuery, $bind);
@@ -202,14 +199,14 @@ public function getLineCount($whereAndBind, &$objProduct)
/**
* 検索結果の取得
* @param array $whereAndBind string whereと array bindの連想配列
- * @param SC_Product $objProduct
+ * @param Product $objProduct
* @param integer $page_max
*/
- public function getProducts($whereAndBind, &$objProduct, $page_max, $startno)
+ public function getProducts($whereAndBind, Product &$objProduct, $page_max, $startno)
{
$where = $whereAndBind['where'];
$bind = $whereAndBind['bind'];
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setWhere($where);
// 取得範囲の指定(開始行番号、行数のセット)
$objQuery->setLimitOffset($page_max, $startno);
@@ -221,11 +218,11 @@ public function getProducts($whereAndBind, &$objProduct, $page_max, $startno)
* 商品取得
*
* @param array $arrProductId
- * @param SC_Product $objProduct
+ * @param Product $objProduct
*/
- public function getProductList($arrProductId, &$objProduct)
+ public function getProductList($arrProductId, Product &$objProduct)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// 表示順序
$order = 'update_date DESC, product_id DESC';
diff --git a/data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php b/data/Eccube/Page/Admin/Customer/Edit.php
similarity index 79%
rename from data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php
rename to data/Eccube/Page/Admin/Customer/Edit.php
index 7d8096647e9..4028723d1fb 100644
--- a/data/class/pages/admin/customer/LC_Page_Admin_Customer_Edit.php
+++ b/data/Eccube/Page/Admin/Customer/Edit.php
@@ -1,36 +1,34 @@
tpl_maintitle = '会員管理';
$this->tpl_subtitle = '会員登録';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrCountry = $masterData->getMasterData('mtb_country');
$this->arrJob = $masterData->getMasterData('mtb_job');
@@ -57,13 +55,13 @@ public function init()
$this->arrMailMagazineType = $masterData->getMasterData('mtb_mail_magazine_type');
// 日付プルダウン設定
- $objDate = new SC_Date_Ex(BIRTH_YEAR);
+ $objDate = new Date(BIRTH_YEAR);
$this->arrYear = $objDate->getYear();
$this->arrMonth = $objDate->getMonth();
$this->arrDay = $objDate->getDay();
// 支払い方法種別
- $this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
+ $this->arrPayment = PaymentHelper::getIDValueList();
}
/**
@@ -85,9 +83,9 @@ public function process()
public function action()
{
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// 検索引き継ぎ用パラメーター管理クラス
- $objFormSearchParam = new SC_FormParam_Ex();
+ $objFormSearchParam = new FormParam();
// モードによる処理切り替え
switch ($this->getMode()) {
@@ -97,11 +95,11 @@ public function action()
$objFormSearchParam->setParam($_REQUEST);
$this->arrErr = $this->lfCheckErrorSearchParam($objFormSearchParam);
$this->arrSearchData = $objFormSearchParam->getSearchArray();
- if (!SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (!Utils::isBlank($this->arrErr)) {
return;
}
// 指定会員の情報をセット
- $this->arrForm = SC_Helper_Customer_Ex::sfGetCustomerData($objFormSearchParam->getValue('edit_customer_id'), true);
+ $this->arrForm = CustomerHelper::sfGetCustomerData($objFormSearchParam->getValue('edit_customer_id'), true);
// 購入履歴情報の取得
list($this->tpl_linemax, $this->arrPurchaseHistory, $this->objNavi) = $this->lfPurchaseHistory($objFormSearchParam->getValue('edit_customer_id'));
$this->arrPagenavi = $this->objNavi->arrPagenavi;
@@ -121,7 +119,7 @@ public function action()
$objFormSearchParam->setParam($objFormParam->getValue('search_data'));
$this->arrSearchErr = $this->lfCheckErrorSearchParam($objFormSearchParam);
$this->arrSearchData = $objFormSearchParam->getSearchArray();
- if (!SC_Utils_Ex::isBlank($this->arrErr) or !SC_Utils_Ex::isBlank($this->arrSearchErr)) {
+ if (!Utils::isBlank($this->arrErr) or !Utils::isBlank($this->arrSearchErr)) {
return;
}
// 確認画面テンプレートに切り替え
@@ -140,7 +138,7 @@ public function action()
$objFormSearchParam->setParam($objFormParam->getValue('search_data'));
$this->arrSearchErr = $this->lfCheckErrorSearchParam($objFormSearchParam);
$this->arrSearchData = $objFormSearchParam->getSearchArray();
- if (!SC_Utils_Ex::isBlank($this->arrErr) or !SC_Utils_Ex::isBlank($this->arrSearchErr)) {
+ if (!Utils::isBlank($this->arrErr) or !Utils::isBlank($this->arrSearchErr)) {
return;
}
// 購入履歴情報の取得
@@ -164,7 +162,7 @@ public function action()
$objFormSearchParam->setParam($objFormParam->getValue('search_data'));
$this->arrSearchErr = $this->lfCheckErrorSearchParam($objFormSearchParam);
$this->arrSearchData = $objFormSearchParam->getSearchArray();
- if (!SC_Utils_Ex::isBlank($this->arrErr) or !SC_Utils_Ex::isBlank($this->arrSearchErr)) {
+ if (!Utils::isBlank($this->arrErr) or !Utils::isBlank($this->arrSearchErr)) {
return;
}
$this->lfRegistData($objFormParam);
@@ -179,7 +177,7 @@ public function action()
$objFormSearchParam->setParam($objFormParam->getValue('search_data'));
$this->arrSearchErr = $this->lfCheckErrorSearchParam($objFormSearchParam);
$this->arrSearchData = $objFormSearchParam->getSearchArray();
- if (!SC_Utils_Ex::isBlank($this->arrSearchErr)) {
+ if (!Utils::isBlank($this->arrSearchErr)) {
return;
}
default:
@@ -199,7 +197,7 @@ public function action()
public function lfInitParam(&$objFormParam)
{
// 会員項目のパラメーター取得
- SC_Helper_Customer_Ex::sfCustomerEntryParam($objFormParam, true);
+ CustomerHelper::sfCustomerEntryParam($objFormParam, true);
// 検索結果一覧画面への戻り用パラメーター
$objFormParam->addParam('検索用データ', 'search_data', '', '', array(), '', false);
// 会員購入履歴ページング用
@@ -209,12 +207,12 @@ public function lfInitParam(&$objFormParam)
/**
* 検索パラメーター引き継ぎ用情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return void
*/
public function lfInitSearchParam(&$objFormParam)
{
- SC_Helper_Customer_Ex::sfSetSearchParam($objFormParam);
+ CustomerHelper::sfSetSearchParam($objFormParam);
// 初回受け入れ時用
$objFormParam->addParam('編集対象会員ID', 'edit_customer_id', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
}
@@ -222,12 +220,12 @@ public function lfInitSearchParam(&$objFormParam)
/**
* 検索パラメーターエラーチェック
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return array エラー配列
*/
public function lfCheckErrorSearchParam(&$objFormParam)
{
- return SC_Helper_Customer_Ex::sfCheckErrorSearchParam($objFormParam);
+ return CustomerHelper::sfCheckErrorSearchParam($objFormParam);
}
/**
@@ -238,10 +236,10 @@ public function lfCheckErrorSearchParam(&$objFormParam)
*/
public function lfCheckError(&$objFormParam)
{
- $arrErr = SC_Helper_Customer_Ex::sfCustomerMypageErrorCheck($objFormParam, true);
+ $arrErr = CustomerHelper::sfCustomerMypageErrorCheck($objFormParam, true);
// メアド重複チェック(共通ルーチンは使えない)
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = 'email, email_mobile, customer_id';
$table = 'dtb_customer';
$where = 'del_flg <> 1 AND (email Like ? OR email_mobile Like ?)';
@@ -251,14 +249,14 @@ public function lfCheckError(&$objFormParam)
$arrVal[] = $objFormParam->getValue('customer_id');
}
$arrData = $objQuery->getRow($col, $table, $where, $arrVal);
- if (!SC_Utils_Ex::isBlank($arrData['email'])) {
+ if (!Utils::isBlank($arrData['email'])) {
if ($arrData['email'] == $objFormParam->getValue('email')) {
$arrErr['email'] = '※ すでに他の会員(ID:' . $arrData['customer_id'] . ')が使用しているアドレスです。';
} elseif ($arrData['email'] == $objFormParam->getValue('email_mobile')) {
$arrErr['email_mobile'] = '※ すでに他の会員(ID:' . $arrData['customer_id'] . ')が使用しているアドレスです。';
}
}
- if (!SC_Utils_Ex::isBlank($arrData['email_mobile'])) {
+ if (!Utils::isBlank($arrData['email_mobile'])) {
if ($arrData['email_mobile'] == $objFormParam->getValue('email_mobile')) {
$arrErr['email_mobile'] = '※ すでに他の会員(ID:' . $arrData['customer_id'] . ')が使用している携帯アドレスです。';
} elseif ($arrData['email_mobile'] == $objFormParam->getValue('email')) {
@@ -282,7 +280,7 @@ public function lfRegistData(&$objFormParam)
// 登録用データ取得
$arrData = $objFormParam->getDbArray();
// 足りないものを作る
- if (!SC_Utils_Ex::isBlank($objFormParam->getValue('year'))) {
+ if (!Utils::isBlank($objFormParam->getValue('year'))) {
$arrData['birth'] = $objFormParam->getValue('year') . '/'
. $objFormParam->getValue('month') . '/'
. $objFormParam->getValue('day')
@@ -290,28 +288,28 @@ public function lfRegistData(&$objFormParam)
}
if (!is_numeric($arrData['customer_id'])) {
- $arrData['secret_key'] = SC_Utils_Ex::sfGetUniqRandomId('r');
+ $arrData['secret_key'] = Utils::sfGetUniqRandomId('r');
} else {
- $arrOldCustomerData = SC_Helper_Customer_Ex::sfGetCustomerData($arrData['customer_id']);
+ $arrOldCustomerData = CustomerHelper::sfGetCustomerData($arrData['customer_id']);
if ($arrOldCustomerData['status'] != $arrData['status']) {
- $arrData['secret_key'] = SC_Utils_Ex::sfGetUniqRandomId('r');
+ $arrData['secret_key'] = Utils::sfGetUniqRandomId('r');
}
}
- return SC_Helper_Customer_Ex::sfEditCustomerData($arrData, $arrData['customer_id']);
+ return CustomerHelper::sfEditCustomerData($arrData, $arrData['customer_id']);
}
/**
* 購入履歴情報の取得
*
- * @return array( integer 全体件数, mixed 会員データ一覧配列, mixed SC_PageNaviオブジェクト)
+ * @return array( integer 全体件数, mixed 会員データ一覧配列, mixed PageNaviオブジェクト)
*/
public function lfPurchaseHistory($customer_id, $pageno = 0)
{
- if (SC_Utils_Ex::isBlank($customer_id)) {
+ if (Utils::isBlank($customer_id)) {
return array('0', array(), NULL);
}
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$page_max = SEARCH_PMAX;
$table = 'dtb_order';
$where = 'customer_id = ? AND del_flg <> 1';
@@ -319,7 +317,7 @@ public function lfPurchaseHistory($customer_id, $pageno = 0)
// 購入履歴の件数取得
$linemax = $objQuery->count($table, $where, $arrVal);
// ページ送りの取得
- $objNavi = new SC_PageNavi_Ex($pageno, $linemax, $page_max, 'eccube.moveSecondSearchPage', NAVI_PMAX);
+ $objNavi = new PageNavi($pageno, $linemax, $page_max, 'eccube.moveSecondSearchPage', NAVI_PMAX);
// 取得範囲の指定(開始行番号、行数のセット)
$objQuery->setLimitOffset($page_max, $objNavi->start_row);
// 表示順序
diff --git a/data/class/pages/admin/customer/LC_Page_Admin_Customer.php b/data/Eccube/Page/Admin/Customer/Index.php
similarity index 74%
rename from data/class/pages/admin/customer/LC_Page_Admin_Customer.php
rename to data/Eccube/Page/Admin/Customer/Index.php
index df1b9be6c2a..775ce4d233b 100644
--- a/data/class/pages/admin/customer/LC_Page_Admin_Customer.php
+++ b/data/Eccube/Page/Admin/Customer/Index.php
@@ -1,36 +1,36 @@
tpl_maintitle = '会員管理';
$this->tpl_subtitle = '会員マスター';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrJob = $masterData->getMasterData('mtb_job');
$this->arrJob['不明'] = '不明';
@@ -57,7 +57,7 @@ public function init()
$this->arrMagazineType = $masterData->getMasterData('mtb_magazine_type');
// 日付プルダウン設定
- $objDate = new SC_Date_Ex();
+ $objDate = new Date();
// 登録・更新日検索用
$objDate->setStartYear(RELEASE_YEAR);
$objDate->setEndYear(DATE('Y'));
@@ -71,8 +71,8 @@ public function init()
$this->arrDay = $objDate->getDay();
// カテゴリ一覧設定
- $objDb = new SC_Helper_DB_Ex();
- $this->arrCatList = $objDb->sfGetCategoryList();
+ $objDb = new DbHelper();
+ $this->arrCatList = $objDb->getCategoryList();
$this->httpCacheControl('nocache');
}
@@ -96,7 +96,7 @@ public function process()
public function action()
{
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター設定
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -108,7 +108,7 @@ public function action()
// 入力パラメーターチェック
$this->arrErr = $this->lfCheckError($objFormParam);
- if (!SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (!Utils::isBlank($this->arrErr)) {
return;
}
@@ -131,7 +131,7 @@ public function action()
case 'csv':
$this->lfDoCSV($objFormParam->getHashArray());
- SC_Response_Ex::actionExit();
+ Response::actionExit();
break;
default:
break;
@@ -142,24 +142,24 @@ public function action()
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return void
*/
public function lfInitParam(&$objFormParam)
{
- SC_Helper_Customer_Ex::sfSetSearchParam($objFormParam);
+ CustomerHelper::sfSetSearchParam($objFormParam);
$objFormParam->addParam('編集対象会員ID', 'edit_customer_id', INT_LEN, 'n', array('NUM_CHECK','MAX_LENGTH_CHECK'));
}
/**
* エラーチェック
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return array エラー配列
*/
public function lfCheckError(&$objFormParam)
{
- return SC_Helper_Customer_Ex::sfCheckErrorSearchParam($objFormParam);
+ return CustomerHelper::sfCheckErrorSearchParam($objFormParam);
}
/**
@@ -170,7 +170,7 @@ public function lfCheckError(&$objFormParam)
*/
public function lfDoDeleteCustomer($customer_id)
{
- return SC_Helper_Customer_Ex::delete($customer_id);
+ return CustomerHelper::delete($customer_id);
}
/**
@@ -181,15 +181,15 @@ public function lfDoDeleteCustomer($customer_id)
*/
public function lfDoResendMail($customer_id)
{
- $arrData = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($customer_id);
- if (SC_Utils_Ex::isBlank($arrData) or $arrData['del_flg'] == 1) {
+ $arrData = CustomerHelper::sfGetCustomerDataFromId($customer_id);
+ if (Utils::isBlank($arrData) or $arrData['del_flg'] == 1) {
//対象となるデータが見つからない、または削除済み
return false;
}
//仮登録メール再送
$resend_flg = true;
// 登録メール再送
- $objHelperMail = new SC_Helper_Mail_Ex();
+ $objHelperMail = new MailHelper();
$objHelperMail->setPage($this);
$objHelperMail->sfSendRegistMail($arrData['secret_key'], $customer_id, null, $resend_flg);
return true;
@@ -199,11 +199,11 @@ public function lfDoResendMail($customer_id)
* 会員一覧を検索する処理
*
* @param array $arrParam 検索パラメーター連想配列
- * @return array( integer 全体件数, mixed 会員データ一覧配列, mixed SC_PageNaviオブジェクト)
+ * @return array( integer 全体件数, mixed 会員データ一覧配列, mixed PageNaviオブジェクト)
*/
public function lfDoSearch($arrParam)
{
- return SC_Helper_Customer_Ex::sfGetSearchData($arrParam);
+ return CustomerHelper::sfGetSearchData($arrParam);
}
/**
@@ -214,8 +214,8 @@ public function lfDoSearch($arrParam)
*/
public function lfDoCSV($arrParam)
{
- $objSelect = new SC_CustomerList_Ex($arrParam, 'customer');
- $objCSV = new SC_Helper_CSV_Ex();
+ $objSelect = new CustomerList($arrParam, 'customer');
+ $objCSV = new CsvHelper();
$order = 'update_date DESC, customer_id DESC';
diff --git a/data/class/pages/admin/customer/LC_Page_Admin_Customer_SearchCustomer.php b/data/Eccube/Page/Admin/Customer/SearchCustomer.php
similarity index 61%
rename from data/class/pages/admin/customer/LC_Page_Admin_Customer_SearchCustomer.php
rename to data/Eccube/Page/Admin/Customer/SearchCustomer.php
index c4aac7eb8e8..6689c966d0c 100644
--- a/data/class/pages/admin/customer/LC_Page_Admin_Customer_SearchCustomer.php
+++ b/data/Eccube/Page/Admin/Customer/SearchCustomer.php
@@ -1,36 +1,29 @@
lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -73,7 +66,7 @@ public function action()
$this->arrForm = $objFormParam->getFormParamList();
// 入力パラメーターチェック
$this->arrErr = $this->lfCheckError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
// POSTのモードがsearchなら会員検索開始
switch ($this->getMode()) {
case 'search':
@@ -90,33 +83,33 @@ public function action()
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return void
*/
public function lfInitParam(&$objFormParam)
{
- SC_Helper_Customer_Ex::sfSetSearchParam($objFormParam);
+ CustomerHelper::sfSetSearchParam($objFormParam);
}
/**
* エラーチェック
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return array エラー配列
*/
public function lfCheckError(&$objFormParam)
{
- return SC_Helper_Customer_Ex::sfCheckErrorSearchParam($objFormParam);
+ return CustomerHelper::sfCheckErrorSearchParam($objFormParam);
}
/**
* 会員一覧を検索する処理
*
* @param array $arrParam 検索パラメーター連想配列
- * @return array( integer 全体件数, mixed 会員データ一覧配列, mixed SC_PageNaviオブジェクト)
+ * @return array( integer 全体件数, mixed 会員データ一覧配列, mixed PageNaviオブジェクト)
*/
public function lfDoSearch($arrParam)
{
- return SC_Helper_Customer_Ex::sfGetSearchData($arrParam);
+ return CustomerHelper::sfGetSearchData($arrParam);
}
}
diff --git a/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php b/data/Eccube/Page/Admin/Design/Bloc.php
similarity index 71%
rename from data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php
rename to data/Eccube/Page/Admin/Design/Bloc.php
index b0000a64afb..7a099237643 100644
--- a/data/class/pages/admin/design/LC_Page_Admin_Design_Bloc.php
+++ b/data/Eccube/Page/Admin/Design/Bloc.php
@@ -1,36 +1,33 @@
tpl_mainno = 'design';
$this->tpl_maintitle = 'デザイン管理';
$this->tpl_subtitle = 'ブロック設定';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrDeviceType = $masterData->getMasterData('mtb_device_type');
}
@@ -69,24 +66,24 @@ public function process()
*/
public function action()
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_REQUEST);
$objFormParam->convParam();
$this->arrErr = $objFormParam->checkError();
- $is_error = (!SC_Utils_Ex::isBlank($this->arrErr));
+ $is_error = (!Utils::isBlank($this->arrErr));
$this->bloc_id = $objFormParam->getValue('bloc_id');
$this->device_type_id = $objFormParam->getValue('device_type_id', DEVICE_TYPE_PC);
- $objBloc = new SC_Helper_Bloc_Ex($this->device_type_id);
+ $objBloc = new BlocHelper($this->device_type_id);
switch ($this->getMode()) {
// 登録/更新
case 'confirm':
if (!$is_error) {
$this->arrErr = $this->lfCheckError($objFormParam, $this->arrErr, $objBloc);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$result = $this->doRegister($objFormParam, $objBloc);
if ($result !== false) {
$arrPram = array(
@@ -95,8 +92,8 @@ public function action()
'msg' => 'on',
);
- SC_Response_Ex::reload($arrPram, true);
- SC_Response_Ex::actionExit();
+ Response::reload($arrPram, true);
+ Response::actionExit();
}
}
}
@@ -111,8 +108,8 @@ public function action()
'msg' => 'on',
);
- SC_Response_Ex::reload($arrPram, true);
- SC_Response_Ex::actionExit();
+ Response::reload($arrPram, true);
+ Response::actionExit();
}
}
break;
@@ -129,13 +126,13 @@ public function action()
// ブロック一覧を取得
$this->arrBlocList = $objBloc->getList();
// bloc_id が指定されている場合にはブロックデータの取得
- if (!SC_Utils_Ex::isBlank($this->bloc_id)) {
+ if (!Utils::isBlank($this->bloc_id)) {
$arrBloc = $this->getBlocTemplate($this->bloc_id, $objBloc);
$objFormParam->setParam($arrBloc);
}
} else {
// 画面にエラー表示しないため, ログ出力
- GC_Utils_Ex::gfPrintLog('Error: ' . print_r($this->arrErr, true));
+ GcUtils::gfPrintLog('Error: ' . print_r($this->arrErr, true));
}
$this->tpl_subtitle = $this->arrDeviceType[$this->device_type_id] . '>' . $this->tpl_subtitle;
$this->arrForm = $objFormParam->getFormParamList();
@@ -144,7 +141,7 @@ public function action()
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -160,10 +157,10 @@ public function lfInitParam(&$objFormParam)
* ブロックのテンプレートを取得する.
*
* @param integer $bloc_id ブロックID
- * @param SC_Helper_Bloc_Ex $objBloc SC_Helper_Bloc_Ex インスタンス
+ * @param BlocHelper $objBloc BlocHelper インスタンス
* @return array ブロック情報の配列
*/
- public function getBlocTemplate($bloc_id, SC_Helper_Bloc_Ex &$objBloc)
+ public function getBlocTemplate($bloc_id, BlocHelper &$objBloc)
{
$arrBloc = $objBloc->getBloc($bloc_id);
@@ -176,12 +173,12 @@ public function getBlocTemplate($bloc_id, SC_Helper_Bloc_Ex &$objBloc)
* ファイルの作成に失敗した場合は, エラーメッセージを出力し,
* データベースをロールバックする.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @param SC_Helper_Bloc $objBloc SC_Helper_Bloc インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
+ * @param BlocHelper $objBloc BlocHelper インスタンス
* @return integer|boolean 登録が成功した場合, 登録したブロックID;
* 失敗した場合 false
*/
- public function doRegister(&$objFormParam, SC_Helper_Bloc_Ex &$objBloc)
+ public function doRegister(&$objFormParam, BlocHelper &$objBloc)
{
$arrParams = $objFormParam->getHashArray();
$result = $objBloc->save($arrParams);
@@ -196,11 +193,11 @@ public function doRegister(&$objFormParam, SC_Helper_Bloc_Ex &$objBloc)
/**
* 削除を実行する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @param SC_Helper_Bloc $objBloc SC_Helper_Bloc インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
+ * @param BlocHelper $objBloc BlocHelper インスタンス
* @return boolean 登録が成功した場合 true; 失敗した場合 false
*/
- public function doDelete(&$objFormParam, SC_Helper_Bloc_Ex &$objBloc)
+ public function doDelete(&$objFormParam, BlocHelper &$objBloc)
{
$arrParams = $objFormParam->getHashArray();
$result = $objBloc->delete($arrParams['bloc_id']);
@@ -215,13 +212,13 @@ public function doDelete(&$objFormParam, SC_Helper_Bloc_Ex &$objBloc)
/**
* エラーチェックを行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return array エラーメッセージの配列
*/
- public function lfCheckError(&$objFormParam, &$arrErr, SC_Helper_Bloc_Ex &$objBloc)
+ public function lfCheckError(&$objFormParam, &$arrErr, BlocHelper &$objBloc)
{
$arrParams = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrParams);
+ $objErr = new CheckError($arrParams);
$objErr->arrErr =& $arrErr;
$objErr->doFunc(array('ブロック名', 'bloc_name', STEXT_LEN), array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
$objErr->doFunc(array('ファイル名', 'filename', STEXT_LEN), array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK','FILE_NAME_CHECK_BY_NOUPLOAD'));
@@ -230,12 +227,12 @@ public function lfCheckError(&$objFormParam, &$arrErr, SC_Helper_Bloc_Ex &$objBl
$arrValues = array($arrParams['filename']);
// 変更の場合は自ブロックを除外
- if (!SC_Utils_Ex::isBlank($arrParams['bloc_id'])) {
+ if (!Utils::isBlank($arrParams['bloc_id'])) {
$where .= ' AND bloc_id <> ?';
$arrValues[] = $arrParams['bloc_id'];
}
$arrBloc = $objBloc->getWhere($where, $arrValues);
- if (!SC_Utils_Ex::isBlank($arrBloc)) {
+ if (!Utils::isBlank($arrBloc)) {
$objErr->arrErr['filename'] = '※ 同じファイル名のデータが存在しています。別のファイル名を入力してください。
';
}
diff --git a/data/class/pages/admin/design/LC_Page_Admin_Design_CSS.php b/data/Eccube/Page/Admin/Design/Css.php
similarity index 79%
rename from data/class/pages/admin/design/LC_Page_Admin_Design_CSS.php
rename to data/Eccube/Page/Admin/Design/Css.php
index a050c54b98a..2f1e825b5f5 100644
--- a/data/class/pages/admin/design/LC_Page_Admin_Design_CSS.php
+++ b/data/Eccube/Page/Admin/Design/Css.php
@@ -1,36 +1,34 @@
tpl_mainno = 'design';
$this->tpl_maintitle = 'デザイン管理';
$this->tpl_subtitle = 'CSS設定';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrDeviceType = $masterData->getMasterData('mtb_device_type');
}
@@ -68,14 +66,14 @@ public function process()
*/
public function action()
{
- $objLayout = new SC_Helper_PageLayout_Ex();
+ $objLayout = new PageLayoutHelper();
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_REQUEST);
$objFormParam->convParam();
$this->arrErr = $objFormParam->checkError();
- $is_error = !SC_Utils_Ex::isBlank($this->arrErr);
+ $is_error = !Utils::isBlank($this->arrErr);
// CSSファイル名を取得
$this->css_name = $objFormParam->getValue('css_name');
@@ -90,7 +88,7 @@ public function action()
case 'confirm':
if (!$is_error) {
$this->arrErr = array_merge($this->arrErr, $this->lfCheckError($objFormParam, $this->arrErr));
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
if ($this->doRegister($css_dir, $this->css_name, $this->old_css_name, $css_path,
$objFormParam->getValue('css_data'))) {
$this->tpl_onload = "alert('登録が完了しました。');";
@@ -106,7 +104,7 @@ public function action()
'msg' => 'on',
);
- SC_Response_Ex::reload($arrPram, true);
+ Response::reload($arrPram, true);
}
}
break;
@@ -118,14 +116,14 @@ public function action()
break;
}
- if (SC_Utils_Ex::isBlank($this->arrErr) && $this->checkPath($this->css_name)) {
+ if (Utils::isBlank($this->arrErr) && $this->checkPath($this->css_name)) {
// CSSファイルの読み込み
- if (!SC_Utils_Ex::isBlank($this->css_name)) {
+ if (!Utils::isBlank($this->css_name)) {
$objFormParam->setValue('css_data', file_get_contents($css_path));
}
} else {
// 画面にエラー表示しないため, ログ出力
- GC_Utils_Ex::gfPrintLog('Error: ' . print_r($this->arrErr, true));
+ GcUtils::gfPrintLog('Error: ' . print_r($this->arrErr, true));
}
// ファイルリストを取得
@@ -138,7 +136,7 @@ public function action()
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -163,7 +161,7 @@ public function lfInitParam(&$objFormParam)
*/
public function doRegister($css_dir, $css_name, $old_css_name, $css_path, $css_data)
{
- if (!SC_Utils_Ex::isBlank($old_css_name)
+ if (!Utils::isBlank($old_css_name)
&& $old_css_name != $css_name) {
if (!unlink($css_dir . $old_css_name . '.css')) {
$this->arrErr['err'] = '※ 旧ファイルの削除に失敗しました
';
@@ -172,7 +170,7 @@ public function doRegister($css_dir, $css_name, $old_css_name, $css_path, $css_d
}
}
- if (!SC_Helper_FileManager_Ex::sfWriteFile($css_path, $css_data)) {
+ if (!FileManagerHelper::sfWriteFile($css_path, $css_data)) {
$this->arrErr['err'] = '※ CSSの書き込みに失敗しました
';
return false;
@@ -206,7 +204,7 @@ public function doDelete($css_path)
*/
public function getCSSList($css_dir)
{
- $objFileManager = new SC_Helper_FileManager_Ex();
+ $objFileManager = new FileManagerHelper();
$arrFileList = $objFileManager->sfGetFileList($css_dir);
foreach ($arrFileList as $val) {
@@ -224,13 +222,13 @@ public function getCSSList($css_dir)
/**
* エラーチェックを行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return array エラーメッセージの配列
*/
public function lfCheckError(&$objFormParam, &$arrErr)
{
$arrParams = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrParams);
+ $objErr = new CheckError($arrParams);
$objErr->arrErr =& $arrErr;
$objErr->doFunc(array('CSSファイル名', 'css_name', STEXT_LEN), array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK', 'FILE_NAME_CHECK_BY_NOUPLOAD'));
@@ -240,11 +238,11 @@ public function lfCheckError(&$objFormParam, &$arrErr)
$is_error = false;
// 重複チェック
- if (SC_Utils_Ex::isBlank($objErr->arrErr['css_name'])) {
+ if (Utils::isBlank($objErr->arrErr['css_name'])) {
$arrCSSList = $this->getCSSList($this->getCSSDir($device_type_id));
foreach ($arrCSSList as $val) {
if ($val['css_name'] == $css_name) {
- if (SC_Utils_Ex::isBlank($old_css_name)
+ if (Utils::isBlank($old_css_name)
|| $old_css_name != $css_name) {
$is_error = true;
}
@@ -266,7 +264,7 @@ public function lfCheckError(&$objFormParam, &$arrErr)
*/
public function getCSSDir($device_type_id)
{
- return SC_Helper_PageLayout_Ex::getTemplatePath($device_type_id, true) . 'css/';
+ return PageLayoutHelper::getTemplatePath($device_type_id, true) . 'css/';
}
/**
diff --git a/data/class/pages/admin/design/LC_Page_Admin_Design_Header.php b/data/Eccube/Page/Admin/Design/Header.php
similarity index 74%
rename from data/class/pages/admin/design/LC_Page_Admin_Design_Header.php
rename to data/Eccube/Page/Admin/Design/Header.php
index d8ed08cb9a7..ab588d5d20a 100644
--- a/data/class/pages/admin/design/LC_Page_Admin_Design_Header.php
+++ b/data/Eccube/Page/Admin/Design/Header.php
@@ -1,36 +1,33 @@
tpl_mainno = 'design';
$this->tpl_maintitle = 'デザイン管理';
$this->tpl_subtitle = 'ヘッダー/フッター設定';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrDeviceType = $masterData->getMasterData('mtb_device_type');
}
@@ -69,12 +66,12 @@ public function process()
*/
public function action()
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_REQUEST);
$objFormParam->convParam();
$this->arrErr = $objFormParam->checkError();
- $is_error = (!SC_Utils_Ex::isBlank($this->arrErr));
+ $is_error = (!Utils::isBlank($this->arrErr));
$this->device_type_id = $objFormParam->getValue('device_type_id', DEVICE_TYPE_PC);
@@ -82,7 +79,7 @@ public function action()
// 登録
case 'regist':
$this->arrErr = $this->lfCheckError($objFormParam, $this->arrErr);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
if ($this->doRegister($objFormParam)) {
$this->tpl_onload = "alert('登録が完了しました。');";
}
@@ -105,7 +102,7 @@ public function action()
}
} else {
// 画面にエラー表示しないため, ログ出力
- GC_Utils_Ex::gfPrintLog('Error: ' . print_r($this->arrErr, true));
+ GcUtils::gfPrintLog('Error: ' . print_r($this->arrErr, true));
}
//サブタイトルの追加
@@ -115,7 +112,7 @@ public function action()
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -129,13 +126,13 @@ public function lfInitParam(&$objFormParam)
/**
* エラーチェックを行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return array エラーメッセージの配列
*/
public function lfCheckError(&$objFormParam, &$arrErr)
{
$arrParams = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrParams);
+ $objErr = new CheckError($arrParams);
$objErr->arrErr =& $arrErr;
$objErr->doFunc(array('division', 'division', STEXT_LEN), array('EXIST_CHECK'));
@@ -147,7 +144,7 @@ public function lfCheckError(&$objFormParam, &$arrErr)
*
* ファイルの作成に失敗した場合は, エラーメッセージを出力する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return boolean 登録が成功した場合 true; 失敗した場合 false
*/
public function doRegister(&$objFormParam)
@@ -156,7 +153,7 @@ public function doRegister(&$objFormParam)
$contents = $objFormParam->getValue($division);
$tpl_path = $this->getTemplatePath($objFormParam->getValue('device_type_id'), $division);
if ($tpl_path === false
- || !SC_Helper_FileManager_Ex::sfWriteFile($tpl_path, $contents)) {
+ || !FileManagerHelper::sfWriteFile($tpl_path, $contents)) {
$this->arrErr['err'] = '※ ファイルの書き込みに失敗しました
';
return false;
@@ -174,7 +171,7 @@ public function doRegister(&$objFormParam)
*/
public function getTemplatePath($device_type_id, $division)
{
- $tpl_path = SC_Helper_PageLayout_Ex::getTemplatePath($device_type_id) . '/' . $division . '.tpl';
+ $tpl_path = PageLayoutHelper::getTemplatePath($device_type_id) . '/' . $division . '.tpl';
if (file_exists($tpl_path)) {
return $tpl_path;
} else {
diff --git a/data/class/pages/admin/design/LC_Page_Admin_Design.php b/data/Eccube/Page/Admin/Design/Index.php
similarity index 80%
rename from data/class/pages/admin/design/LC_Page_Admin_Design.php
rename to data/Eccube/Page/Admin/Design/Index.php
index 1d40d562eda..f52dad4010f 100644
--- a/data/class/pages/admin/design/LC_Page_Admin_Design.php
+++ b/data/Eccube/Page/Admin/Design/Index.php
@@ -1,36 +1,32 @@
tpl_mainno = 'design';
$this->tpl_maintitle = 'デザイン管理';
$this->tpl_subtitle = 'レイアウト設定';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrTarget = $masterData->getMasterData('mtb_target');
$this->arrDeviceType = $masterData->getMasterData('mtb_device_type');
}
@@ -68,8 +64,8 @@ public function process()
*/
public function action()
{
- $objLayout = new SC_Helper_PageLayout_Ex();
- $objFormParam = new SC_FormParam_Ex();
+ $objLayout = new PageLayoutHelper();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam, intval($_REQUEST['bloc_cnt']));
$objFormParam->setParam($_REQUEST);
@@ -80,15 +76,15 @@ public function action()
// 新規ブロック作成
case 'new_bloc':
- SC_Response_Ex::sendRedirect('bloc.php', array('device_type_id' => $this->device_type_id));
- SC_Response_Ex::actionExit();
+ Response::sendRedirect('bloc.php', array('device_type_id' => $this->device_type_id));
+ Response::actionExit();
break;
// 新規ページ作成
case 'new_page':
- SC_Response_Ex::sendRedirect('main_edit.php', array('device_type_id' => $this->device_type_id));
- SC_Response_Ex::actionExit();
+ Response::sendRedirect('main_edit.php', array('device_type_id' => $this->device_type_id));
+ Response::actionExit();
break;
// プレビュー
@@ -97,16 +93,16 @@ public function action()
$filename = $this->savePreviewData($this->page_id, $objLayout);
$_SESSION['preview'] = 'ON';
- SC_Response_Ex::sendRedirectFromUrlPath('preview/' . DIR_INDEX_PATH, array('filename' => $filename));
- SC_Response_Ex::actionExit();
+ Response::sendRedirectFromUrlPath('preview/' . DIR_INDEX_PATH, array('filename' => $filename));
+ Response::actionExit();
// 編集実行
case 'confirm':
$this->placingBlocs($objFormParam);
$arrQueryString = array('device_type_id' => $this->device_type_id, 'page_id' => $this->page_id, 'msg' => 'on');
- SC_Response_Ex::reload($arrQueryString, true);
- SC_Response_Ex::actionExit();
+ Response::reload($arrQueryString, true);
+ Response::actionExit();
break;
@@ -116,8 +112,8 @@ public function action()
if ($objLayout->isEditablePage($this->device_type_id, $this->page_id)) {
$objLayout->lfDelPageData($this->page_id, $this->device_type_id);
- SC_Response_Ex::reload(array('device_type_id' => $this->device_type_id), true);
- SC_Response_Ex::actionExit();
+ Response::reload(array('device_type_id' => $this->device_type_id), true);
+ Response::actionExit();
}
break;
@@ -142,7 +138,7 @@ public function action()
/**
* フォームパラメーターの初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス.
+ * @param FormParam $objFormParam FormParam インスタンス.
* @param integer $bloc_cnt ブロック数
* @return void
*/
@@ -166,7 +162,7 @@ public function lfInitParam(&$objFormParam, $bloc_cnt = 0)
*
* @param integer $device_type_id 端末種別ID
* @param integer $page_id ページID
- * @param SC_Helper_PageLayout $objLayout SC_Helper_PageLayout インスタンス
+ * @param PageLayoutHelper $objLayout PageLayoutHelper インスタンス
* @return array レイアウト情報の配列
*/
public function getLayout($device_type_id, $page_id, &$objLayout)
@@ -233,13 +229,13 @@ public function existsBloc($arrBloc, $arrToBlocs)
* プレビューするデータを DB に保存する.
*
* @param integer $page_id プレビューを行うページID
- * @param SC_Helper_PageLayout $objLayout SC_Helper_PageLayout インスタンス
+ * @param PageLayoutHelper $objLayout PageLayoutHelper インスタンス
* @return string プレビューを行う tpl_mainpage ファイル名
*/
public function savePreviewData($page_id, &$objLayout)
{
$arrPageData = $objLayout->getPageProperties(DEVICE_TYPE_PC, $page_id);
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrPageData[0]['page_id'] = 0;
$objQuery->update('dtb_pagelayout', $arrPageData[0], 'page_id = 0 AND device_type_id = ?', array(DEVICE_TYPE_PC));
@@ -249,7 +245,7 @@ public function savePreviewData($page_id, &$objLayout)
/**
* ブロックを配置する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param boolean $is_preview プレビュー時の場合 true
* @return void
*/
@@ -258,7 +254,7 @@ public function placingBlocs(&$objFormParam, $is_preview = false)
$page_id = $is_preview ? 0 : $objFormParam->getValue('page_id');
$device_type_id = $objFormParam->getValue('device_type_id');
$bloc_cnt = $objFormParam->getValue('bloc_cnt');
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
$objQuery->delete('dtb_blocposition', 'page_id = ? AND device_type_id = ?',
array($page_id, $device_type_id));
@@ -266,7 +262,7 @@ public function placingBlocs(&$objFormParam, $is_preview = false)
for ($i = 1; $i <= $bloc_cnt; $i++) {
// bloc_id が取得できない場合は INSERT しない
$id = $objFormParam->getValue('id_' . $i);
- if (SC_Utils_Ex::isBlank($id)) {
+ if (Utils::isBlank($id)) {
continue;
}
// 未使用は INSERT しない
diff --git a/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php b/data/Eccube/Page/Admin/Design/MainEdit.php
similarity index 82%
rename from data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php
rename to data/Eccube/Page/Admin/Design/MainEdit.php
index ea647f93694..29a28f51e5d 100644
--- a/data/class/pages/admin/design/LC_Page_Admin_Design_MainEdit.php
+++ b/data/Eccube/Page/Admin/Design/MainEdit.php
@@ -1,36 +1,35 @@
tpl_mainno = 'design';
$this->tpl_maintitle = 'デザイン管理';
$this->tpl_subtitle = 'ページ詳細設定';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrDeviceType = $masterData->getMasterData('mtb_device_type');
}
@@ -68,13 +67,13 @@ public function process()
*/
public function action()
{
- $objLayout = new SC_Helper_PageLayout_Ex();
- $objFormParam = new SC_FormParam_Ex();
+ $objLayout = new PageLayoutHelper();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_REQUEST);
$objFormParam->convParam();
$this->arrErr = $objFormParam->checkError();
- $is_error = (!SC_Utils_Ex::isBlank($this->arrErr));
+ $is_error = (!Utils::isBlank($this->arrErr));
$this->device_type_id = $objFormParam->getValue('device_type_id', DEVICE_TYPE_PC);
$this->page_id = $objFormParam->getValue('page_id');
@@ -86,9 +85,9 @@ public function action()
if ($objLayout->isEditablePage($this->device_type_id, $this->page_id)) {
$objLayout->lfDelPageData($this->page_id, $this->device_type_id);
- SC_Response_Ex::reload(array('device_type_id' => $this->device_type_id,
+ Response::reload(array('device_type_id' => $this->device_type_id,
'msg' => 'on'), true);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
}
break;
@@ -97,7 +96,7 @@ public function action()
case 'confirm':
if (!$is_error) {
$this->arrErr = $this->lfCheckError($objFormParam, $this->arrErr);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$result = $this->doRegister($objFormParam, $objLayout);
if ($result !== false) {
$arrQueryString = array(
@@ -105,8 +104,8 @@ public function action()
'page_id' => $result,
'msg' => 'on',
);
- SC_Response_Ex::reload($arrQueryString, true);
- SC_Response_Ex::actionExit();
+ Response::reload($arrQueryString, true);
+ Response::actionExit();
}
}
}
@@ -122,13 +121,13 @@ public function action()
if (!$is_error) {
$this->arrPageList = $objLayout->getPageProperties($this->device_type_id, null);
// page_id が指定されている場合にはテンプレートデータの取得
- if (!SC_Utils_Ex::isBlank($this->page_id)) {
+ if (!Utils::isBlank($this->page_id)) {
$arrPageData = $this->getTplMainpage($this->device_type_id, $this->page_id, $objLayout);
$objFormParam->setParam($arrPageData);
}
} else {
// 画面にエラー表示しないため, ログ出力
- GC_Utils_Ex::gfPrintLog('Error: ' . print_r($this->arrErr, true));
+ GcUtils::gfPrintLog('Error: ' . print_r($this->arrErr, true));
}
$this->tpl_subtitle = $this->arrDeviceType[$this->device_type_id] . '>' . $this->tpl_subtitle;
$this->arrForm = $objFormParam->getFormParamList();
@@ -139,7 +138,7 @@ public function action()
*
* XXX URL のフィールドは, 実際は filename なので注意
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -163,7 +162,7 @@ public function lfInitParam(&$objFormParam)
*
* @param integer $device_type_id 端末種別ID
* @param integer $page_id ページID
- * @param SC_Helper_PageLayout $objLayout SC_Helper_PageLayout インスタンス
+ * @param PageLayoutHelper $objLayout PageLayoutHelper インスタンス
* @return array ページデータの配列
*/
public function getTplMainpage($device_type_id, $page_id, &$objLayout)
@@ -187,8 +186,8 @@ public function getTplMainpage($device_type_id, $page_id, &$objLayout)
* ファイルの作成に失敗した場合は, エラーメッセージを出力し,
* データベースをロールバックする.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @param SC_Helper_PageLayout $objLayout SC_Helper_PageLayout インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
+ * @param PageLayoutHelper $objLayout PageLayoutHelper インスタンス
* @return integer|boolean 登録が成功した場合, 登録したページID;
* 失敗した場合 false
*/
@@ -208,7 +207,7 @@ public function doRegister(&$objFormParam, &$objLayout)
$arrParams['keyword'] = $objFormParam->getValue('keyword');
$arrParams['meta_robots'] = $objFormParam->getValue('meta_robots');
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
$page_id = $this->registerPage($arrParams, $objLayout);
@@ -218,7 +217,7 @@ public function doRegister(&$objFormParam, &$objLayout)
* or 編集可能な既存ページ編集時かつ, PHP ファイルが存在しない場合に,
* PHP ファイルを作成する.
*/
- if (SC_Utils_Ex::isBlank($arrParams['page_id'])
+ if (Utils::isBlank($arrParams['page_id'])
|| $objLayout->isEditablePage($arrParams['device_type_id'], $arrParams['page_id'])) {
if (!$this->createPHPFile($filename)) {
$this->arrErr['err'] = '※ PHPファイルの作成に失敗しました
';
@@ -236,7 +235,7 @@ public function doRegister(&$objFormParam, &$objLayout)
$tpl_path = $objLayout->getTemplatePath($arrParams['device_type_id']) . $filename . '.tpl';
}
- if (!SC_Helper_FileManager_Ex::sfWriteFile($tpl_path, $arrParams['tpl_data'])) {
+ if (!FileManagerHelper::sfWriteFile($tpl_path, $arrParams['tpl_data'])) {
$this->arrErr['err'] = '※ TPLファイルの書き込みに失敗しました
';
$objQuery->rollback();
@@ -252,15 +251,15 @@ public function doRegister(&$objFormParam, &$objLayout)
* 入力内容をデータベースに登録する.
*
* @param array $arrParams フォームパラメーターの配列
- * @param SC_Helper_PageLayout $objLayout SC_Helper_PageLayout インスタンス
+ * @param PageLayoutHelper $objLayout PageLayoutHelper インスタンス
* @return integer ページID
*/
public function registerPage($arrParams, &$objLayout)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// ページIDが空の場合は新規登録
- $is_new = SC_Utils_Ex::isBlank($arrParams['page_id']);
+ $is_new = Utils::isBlank($arrParams['page_id']);
// 既存ページの存在チェック
if (!$is_new) {
$arrExists = $objLayout->getPageProperties($arrParams['device_type_id'], $arrParams['page_id']);
@@ -272,7 +271,7 @@ public function registerPage($arrParams, &$objLayout)
$arrValues['update_date'] = 'CURRENT_TIMESTAMP';
// 新規登録
- if ($is_new || SC_Utils_Ex::isBlank($arrExists)) {
+ if ($is_new || Utils::isBlank($arrExists)) {
$objQuery->setOrder('');
$arrValues['page_id'] = 1 + $objQuery->max('page_id', $table, 'device_type_id = ?',
array($arrValues['device_type_id']));
@@ -297,20 +296,20 @@ public function registerPage($arrParams, &$objLayout)
/**
* エラーチェックを行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return array エラーメッセージの配列
*/
public function lfCheckError(&$objFormParam, &$arrErr)
{
$arrParams = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrParams);
+ $objErr = new CheckError($arrParams);
$objErr->arrErr =& $arrErr;
$objErr->doFunc(array('名称', 'page_name', STEXT_LEN), array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
$objErr->doFunc(array('URL', 'filename', STEXT_LEN), array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
/*
* URL チェック
- * ここでチェックするのは, パスのみなので SC_CheckError::URL_CHECK()
+ * ここでチェックするのは, パスのみなので CheckError::URL_CHECK()
* は使用しない
*/
$valid_url = true;
@@ -329,12 +328,12 @@ public function lfCheckError(&$objFormParam, &$arrErr)
$where = 'page_id <> 0 AND device_type_id = ? AND filename = ?';
$arrValues = array($arrParams['device_type_id'], USER_DIR . $arrParams['filename']);
// 変更の場合は自 URL を除外
- if (!SC_Utils_Ex::isBlank($arrParams['page_id'])) {
+ if (!Utils::isBlank($arrParams['page_id'])) {
$where .= ' AND page_id <> ?';
$arrValues[] = $arrParams['page_id'];
}
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$exists = $objQuery->exists('dtb_pagelayout', $where, $arrValues);
if ($exists) {
$objErr->arrErr['filename'] = '※ 同じURLのデータが存在しています。別のURLを入力してください。
';
@@ -370,6 +369,6 @@ public function createPHPFile($filename)
$replaceStrings = "require_once '" . str_repeat('../', substr_count($filename, '/')) . "../require.php';";
$php_contents = str_replace($defaultStrings, $replaceStrings, $php_contents);
- return SC_Helper_FileManager_Ex::sfWriteFile($path, $php_contents);
+ return FileManagerHelper::sfWriteFile($path, $php_contents);
}
}
diff --git a/data/class/pages/admin/design/LC_Page_Admin_Design_Template.php b/data/Eccube/Page/Admin/Design/Template.php
similarity index 82%
rename from data/class/pages/admin/design/LC_Page_Admin_Design_Template.php
rename to data/Eccube/Page/Admin/Design/Template.php
index 30c7d62e313..65c7c99fd83 100644
--- a/data/class/pages/admin/design/LC_Page_Admin_Design_Template.php
+++ b/data/Eccube/Page/Admin/Design/Template.php
@@ -1,36 +1,33 @@
arrErr = array();
$this->arrForm = array();
ini_set('max_execution_time', 300);
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrDeviceType = $masterData->getMasterData('mtb_device_type');
}
@@ -70,7 +67,7 @@ public function process()
*/
public function action()
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_REQUEST);
$objFormParam->convParam();
@@ -83,7 +80,7 @@ public function action()
// 登録ボタン押下時
case 'register':
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
if ($this->doRegister($template_code, $this->device_type_id)) {
$this->tpl_select = $template_code;
$this->tpl_onload = "alert('登録が完了しました。');";
@@ -94,10 +91,10 @@ public function action()
// 削除ボタン押下時
case 'delete':
if ($objFormParam->checkError()) {
- SC_Utils_Ex::sfDispError('');
+ Utils::sfDispError('');
}
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
if ($this->doDelete($template_code, $this->device_type_id)) {
$this->tpl_onload = "alert('削除が完了しました。');";
}
@@ -107,10 +104,10 @@ public function action()
// downloadボタン押下時
case 'download':
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
if ($this->doDownload($template_code) !== false) {
// ブラウザに出力し, 終了する
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
}
break;
@@ -126,7 +123,7 @@ public function action()
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -146,7 +143,7 @@ public function lfInitParam(&$objFormParam)
*/
public function doUpdateMasterData($template_code, $device_type_id)
{
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$defineName = 'TEMPLATE_NAME';
switch ($device_type_id) {
@@ -187,7 +184,7 @@ public function updateBloc($filepath)
// 改行、タブを1スペースに変換
$sql = preg_replace("/[\r\n\t]/", ' ', $sql);
$sql_split = explode(';', $sql);
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
foreach ($sql_split as $val) {
if (trim($val) != '') {
$objQuery->query($val);
@@ -211,7 +208,7 @@ public function doDelete($template_code, $device_type_id)
return false;
} else {
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
$objQuery->delete('dtb_templates', 'template_code = ? AND device_type_id = ?',
array($template_code, $device_type_id));
@@ -219,7 +216,7 @@ public function doDelete($template_code, $device_type_id)
$error = '※ テンプレートの削除ができませんでした
';
// テンプレート削除
$templates_dir = SMARTY_TEMPLATES_REALDIR . $template_code. '/';
- if (SC_Helper_FileManager_Ex::deleteFile($templates_dir) === false) {
+ if (FileManagerHelper::deleteFile($templates_dir) === false) {
$this->arrErr['err'] = $error;
$objQuery->rollback();
@@ -227,7 +224,7 @@ public function doDelete($template_code, $device_type_id)
}
// ユーザーデータ削除
$user_dir = USER_TEMPLATE_REALDIR. $template_code. '/';
- if (SC_Helper_FileManager_Ex::deleteFile($user_dir) === false) {
+ if (FileManagerHelper::deleteFile($user_dir) === false) {
$this->arrErr['err'] = $error;
$objQuery->rollback();
@@ -236,7 +233,7 @@ public function doDelete($template_code, $device_type_id)
// コンパイル削除
$templates_c_dir = DATA_REALDIR. 'Smarty/templates_c/'. $template_code. '/';
- if (SC_Helper_FileManager_Ex::deleteFile($templates_c_dir) === false) {
+ if (FileManagerHelper::deleteFile($templates_c_dir) === false) {
$this->arrErr['err'] = $error;
$objQuery->rollback();
@@ -274,7 +271,7 @@ public function doRegister($template_code, $device_type_id)
$this->doUpdateMasterData($template_code, $device_type_id);
// コンパイルファイルのクリア処理
- $objView = new SC_AdminView_Ex();
+ $objView = new AdminView();
$objView->_smarty->clear_compiled_tpl();
return true;
@@ -293,13 +290,13 @@ public function doDownload($template_code)
{
$from_dir = USER_TEMPLATE_REALDIR . $template_code . '/';
$to_dir = SMARTY_TEMPLATES_REALDIR . $template_code . '/_packages/';
- if (SC_Utils_Ex::recursiveMkdir($to_dir) === false) {
+ if (Utils::recursiveMkdir($to_dir) === false) {
$this->arrErr['err'] = '※ ディレクトリの作成に失敗しました
';
return false;
}
- SC_Utils_Ex::sfCopyDir($from_dir, $to_dir);
- if (SC_Helper_FileManager_Ex::downloadArchiveFiles(SMARTY_TEMPLATES_REALDIR . $template_code, $template_code) === false) {
+ Utils::sfCopyDir($from_dir, $to_dir);
+ if (FileManagerHelper::downloadArchiveFiles(SMARTY_TEMPLATES_REALDIR . $template_code, $template_code) === false) {
$this->arrErr['err'] = '※ アーカイブファイルの作成に失敗しました
';
return false;
@@ -316,7 +313,7 @@ public function doDownload($template_code)
*/
public function getAllTemplates($device_type_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
return $objQuery->select('*', 'dtb_templates', 'device_type_id = ?', array($device_type_id));
}
diff --git a/data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php b/data/Eccube/Page/Admin/Design/UpDown.php
similarity index 78%
rename from data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php
rename to data/Eccube/Page/Admin/Design/UpDown.php
index c95dfb1cb06..d659775f17c 100644
--- a/data/class/pages/admin/design/LC_Page_Admin_Design_UpDown.php
+++ b/data/Eccube/Page/Admin/Design/UpDown.php
@@ -1,36 +1,32 @@
arrErr = array();
$this->arrForm = array();
ini_set('max_execution_time', 300);
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrDeviceType = $masterData->getMasterData('mtb_device_type');
}
@@ -72,7 +68,7 @@ public function process()
*/
public function action()
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_REQUEST);
$objFormParam->convParam();
@@ -84,7 +80,7 @@ public function action()
case 'upload':
$objUpFile = $this->lfInitUploadFile($objFormParam);
$this->arrErr = $this->lfCheckError($objFormParam, $objUpFile);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
if ($this->doUpload($objFormParam, $objUpFile)) {
$this->tpl_onload = "alert('テンプレートファイルをアップロードしました。');";
$objFormParam->setValue('template_name', '');
@@ -102,24 +98,24 @@ public function action()
}
/**
- * SC_UploadFileクラスの初期化.
+ * UploadFileクラスの初期化.
*
- * @param SC_FormParam $objForm SC_FormParamのインスタンス
- * @return SC_UploadFile_Ex SC_UploadFileのインスタンス
+ * @param FormParam $objForm FormParamのインスタンス
+ * @return UploadFile UploadFileのインスタンス
*/
public function lfInitUploadFile($objForm)
{
$pkg_dir = SMARTY_TEMPLATES_REALDIR . $objForm->getValue('template_code');
- $objUpFile = new SC_UploadFile_Ex(TEMPLATE_TEMP_REALDIR, $pkg_dir);
+ $objUpFile = new UploadFile(TEMPLATE_TEMP_REALDIR, $pkg_dir);
$objUpFile->addFile('テンプレートファイル', 'template_file', array(), TEMPLATE_SIZE, true, 0, 0, false);
return $objUpFile;
}
/**
- * SC_FormParamクラスの初期化.
+ * FormParamクラスの初期化.
*
- * @param SC_FormParam $objFormParam SC_FormParamのインスタンス
+ * @param FormParam $objFormParam FormParamのインスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -132,8 +128,8 @@ public function lfInitParam(&$objFormParam)
/**
* uploadモードのパラメーター検証を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParamのインスタンス
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileのインスタンス
+ * @param FormParam $objFormParam FormParamのインスタンス
+ * @param UploadFile $objUpFile UploadFileのインスタンス
* @return array エラー情報を格納した連想配列, エラーが無ければ(多分)nullを返す
*/
public function lfCheckError(&$objFormParam, &$objUpFile)
@@ -156,7 +152,7 @@ public function lfCheckError(&$objFormParam, &$objUpFile)
}
// DBにすでに登録されていないかチェック
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$exists = $objQuery->exists('dtb_templates', 'template_code = ?', array($template_code));
if ($exists) {
$arrErr['template_code'] = '※ すでに登録されているテンプレートコードです。
';
@@ -172,7 +168,7 @@ public function lfCheckError(&$objFormParam, &$objUpFile)
$arrErr['template_file'] = '※ テンプレートファイルが解凍できません。許可されている形式は、tar/tar.gzです。
';
} else {
$make_temp_error = $objUpFile->makeTempFile('template_file', false);
- if (!SC_Utils_Ex::isBlank($make_temp_error)) {
+ if (!Utils::isBlank($make_temp_error)) {
$arrErr['template_file'] = $make_temp_error;
}
}
@@ -185,8 +181,8 @@ public function lfCheckError(&$objFormParam, &$objUpFile)
*
* エラーが発生した場合は, エラーを出力し, false を返す.
*
- * @param SC_FormParam $objFormParam SC_FormParamのインスタンス
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileのインスタンス
+ * @param FormParam $objFormParam FormParamのインスタンス
+ * @param UploadFile $objUpFile UploadFileのインスタンス
* @return boolean 成功した場合 true; 失敗した場合 false
*/
public function doUpload($objFormParam, $objUpFile)
@@ -198,7 +194,7 @@ public function doUpload($objFormParam, $objUpFile)
$template_dir = SMARTY_TEMPLATES_REALDIR . $template_code;
$compile_dir = DATA_REALDIR . 'Smarty/templates_c/' . $template_code;
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
$arrValues = array(
@@ -232,7 +228,7 @@ public function doUpload($objFormParam, $objUpFile)
$objUpFile->moveTempFile();
// 解凍
- if (!SC_Helper_FileManager_Ex::unpackFile($template_dir . '/' . $_FILES['template_file']['name'])) {
+ if (!FileManagerHelper::unpackFile($template_dir . '/' . $_FILES['template_file']['name'])) {
$this->arrErr['err'] = '※ テンプレートファイルの解凍に失敗しました。
';
$objQuery->rollback();
@@ -241,13 +237,13 @@ public function doUpload($objFormParam, $objUpFile)
// ユーザデータの下のファイルをコピーする
$from_dir = SMARTY_TEMPLATES_REALDIR . $template_code . '/_packages/';
$to_dir = USER_REALDIR . 'packages/' . $template_code . '/';
- if (!SC_Utils_Ex::recursiveMkdir($to_dir)) {
+ if (!Utils::recursiveMkdir($to_dir)) {
$this->arrErr['err'] = '※ ' . $to_dir . ' の作成に失敗しました。
';
$objQuery->rollback();
return false;
}
- SC_Utils_Ex::sfCopyDir($from_dir, $to_dir);
+ Utils::sfCopyDir($from_dir, $to_dir);
$objQuery->commit();
diff --git a/data/class/pages/admin/LC_Page_Admin_Home.php b/data/Eccube/Page/Admin/Home.php
similarity index 82%
rename from data/class/pages/admin/LC_Page_Admin_Home.php
rename to data/Eccube/Page/Admin/Home.php
index 2ffd38f2954..b43b38c6cd2 100644
--- a/data/class/pages/admin/LC_Page_Admin_Home.php
+++ b/data/Eccube/Page/Admin/Home.php
@@ -1,37 +1,29 @@
-
sfGetDBVersion();
}
@@ -132,7 +124,7 @@ public function lfGetDBVersion()
*/
public function lfGetCustomerCnt()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = 'COUNT(customer_id)';
$table = 'dtb_customer';
$where = 'del_flg = 0 AND status = 2';
@@ -148,10 +140,10 @@ public function lfGetCustomerCnt()
*/
public function lfGetOrderYesterday($method)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// TODO: DBFactory使わないでも共通化できそうな気もしますが
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
$sql = $dbFactory->getOrderYesterdaySql($method);
return $objQuery->getOne($sql);
@@ -165,11 +157,11 @@ public function lfGetOrderYesterday($method)
*/
public function lfGetOrderMonth($method)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$month = date('Y/m', mktime());
// TODO: DBFactory使わないでも共通化できそうな気もしますが
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
$sql = $dbFactory->getOrderMonthSql($method);
return $objQuery->getOne($sql, array($month));
@@ -182,7 +174,7 @@ public function lfGetOrderMonth($method)
*/
public function lfGetTotalCustomerPoint()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = 'SUM(point)';
$where = 'del_flg = 0';
@@ -198,10 +190,10 @@ public function lfGetTotalCustomerPoint()
*/
public function lfGetReviewYesterday()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// TODO: DBFactory使わないでも共通化できそうな気もしますが
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
$sql = $dbFactory->getReviewYesterdaySql();
return $objQuery->getOne($sql);
@@ -214,7 +206,7 @@ public function lfGetReviewYesterday()
*/
public function lfGetReviewNonDisp()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$table = 'dtb_review AS A LEFT JOIN dtb_products AS B ON A.product_id = B.product_id';
$where = 'A.del_flg = 0 AND A.status = 2 AND B.del_flg = 0';
@@ -229,7 +221,7 @@ public function lfGetReviewNonDisp()
*/
public function lfGetSoldOut()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$cols = 'product_id, name';
$table = 'dtb_products';
@@ -248,7 +240,7 @@ public function lfGetSoldOut()
*/
public function lfGetNewOrder()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setOrder('order_detail_id');
$sql_product_name = $objQuery->getSql('product_name', 'dtb_order_detail', 'order_id = dtb_order.order_id');
@@ -312,10 +304,10 @@ public function lfGetInfo()
$jsonStr = @file_get_contents($url, false, stream_context_create($context));
- $arrTmpData = is_string($jsonStr) ? SC_Utils_Ex::jsonDecode($jsonStr) : null;
+ $arrTmpData = is_string($jsonStr) ? Utils::jsonDecode($jsonStr) : null;
if (empty($arrTmpData)) {
- SC_Utils_Ex::sfErrorHeader('>> 更新情報の取得に失敗しました。');
+ Utils::sfErrorHeader('>> 更新情報の取得に失敗しました。');
return array();
}
diff --git a/data/class/pages/admin/LC_Page_Admin_Index.php b/data/Eccube/Page/Admin/Index.php
similarity index 77%
rename from data/class/pages/admin/LC_Page_Admin_Index.php
rename to data/Eccube/Page/Admin/Index.php
index 9ac52465b73..121584def20 100644
--- a/data/class/pages/admin/LC_Page_Admin_Index.php
+++ b/data/Eccube/Page/Admin/Index.php
@@ -1,36 +1,33 @@
getMode()) {
case 'login':
@@ -71,16 +68,16 @@ public function action()
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$this->arrErr = $this->lfCheckError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->lfDoLogin($objFormParam->getValue('login_id'));
- SC_Response_Ex::sendRedirect(ADMIN_HOME_URLPATH);
+ Response::sendRedirect(ADMIN_HOME_URLPATH);
} else {
// ブルートフォースアタック対策
// ログイン失敗時に遅延させる
sleep(LOGIN_RETRY_INTERVAL);
- SC_Utils_Ex::sfDispError(LOGIN_ERROR);
+ Utils::sfDispError(LOGIN_ERROR);
}
break;
default:
@@ -94,7 +91,7 @@ public function action()
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -108,14 +105,14 @@ public function lfInitParam(&$objFormParam)
*
* TODO: ブルートフォースアタック対策チェックの実装
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return array $arrErr エラー配列
*/
public function lfCheckError(&$objFormParam)
{
// 書式チェック
$arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($arrErr)) {
+ if (Utils::isBlank($arrErr)) {
$arrForm = $objFormParam->getHashArray();
// ログインチェック
if (!$this->lfIsLoginMember($arrForm['login_id'], $arrForm['password'])) {
@@ -136,17 +133,17 @@ public function lfCheckError(&$objFormParam)
*/
public function lfIsLoginMember($login_id, $pass)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
//パスワード、saltの取得
$cols = 'password, salt';
$table = 'dtb_member';
$where = 'login_id = ? AND del_flg <> 1 AND work = 1';
$arrData = $objQuery->getRow($cols, $table, $where, array($login_id));
- if (SC_Utils_Ex::isBlank($arrData)) {
+ if (Utils::isBlank($arrData)) {
return false;
}
// ユーザー入力パスワードの判定
- if (SC_Utils_Ex::sfIsMatchHashPassword($pass, $arrData['password'], $arrData['salt'])) {
+ if (Utils::sfIsMatchHashPassword($pass, $arrData['password'], $arrData['salt'])) {
return true;
}
@@ -161,7 +158,7 @@ public function lfIsLoginMember($login_id, $pass)
*/
public function lfDoLogin($login_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
//メンバー情報取得
$cols = 'member_id, authority, login_date, name';
$table = 'dtb_member';
@@ -186,9 +183,9 @@ public function lfDoLogin($login_id)
public function lfSetLoginSession($member_id, $login_id, $authority, $login_name, $last_login)
{
// Session Fixation対策
- SC_Helper_Session_Ex::regenerateSID();
+ SessionHelper::regenerateSID();
- $objSess = new SC_Session_Ex();
+ $objSess = new Session();
// 認証済みの設定
$objSess->SetSession('cert', CERT_STRING);
$objSess->SetSession('member_id', $member_id);
@@ -196,7 +193,7 @@ public function lfSetLoginSession($member_id, $login_id, $authority, $login_name
$objSess->SetSession('authority', $authority);
$objSess->SetSession('login_name', $login_name);
$objSess->SetSession('uniqid', $objSess->getUniqId());
- if (SC_Utils_Ex::isBlank($last_login)) {
+ if (Utils::isBlank($last_login)) {
$objSess->SetSession('last_login', date('Y-m-d H:i:s'));
} else {
$objSess->SetSession('last_login', $last_login);
@@ -220,10 +217,10 @@ public function lfSetLoginData($sid, $member_id, $login_id, $authority, $last_lo
// ログイン記録ログ出力
$str_log = "login: user=$login_id($member_id) auth=$authority "
. "lastlogin=$last_login sid=$sid";
- GC_Utils_Ex::gfPrintLog($str_log);
+ GcUtils::gfPrintLog($str_log);
// 最終ログイン日時更新
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$sqlval = array();
$sqlval['login_date'] = date('Y-m-d H:i:s');
$table = 'dtb_member';
@@ -241,6 +238,6 @@ public function lfSetLoginData($sid, $member_id, $login_id, $authority, $last_lo
*/
public function lfSetIncorrectData($error_login_id)
{
- GC_Utils_Ex::gfPrintLog($error_login_id . ' password incorrect.');
+ GcUtils::gfPrintLog($error_login_id . ' password incorrect.');
}
}
diff --git a/data/Eccube/Page/Admin/Logout.php b/data/Eccube/Page/Admin/Logout.php
new file mode 100644
index 00000000000..fc95cc09102
--- /dev/null
+++ b/data/Eccube/Page/Admin/Logout.php
@@ -0,0 +1,70 @@
+action();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ $this->lfDoLogout();
+
+ // ログイン画面に遷移
+ Response::sendRedirectFromUrlPath(ADMIN_DIR . DIR_INDEX_PATH);
+ }
+
+ /**
+ * ログアウト処理
+ *
+ * @return void
+ */
+ public function lfDoLogout()
+ {
+ $objSess = new Session();
+ $objSess->logout();
+ }
+}
diff --git a/data/class/pages/admin/mail/LC_Page_Admin_Mail_History.php b/data/Eccube/Page/Admin/Mail/History.php
similarity index 70%
rename from data/class/pages/admin/mail/LC_Page_Admin_Mail_History.php
rename to data/Eccube/Page/Admin/Mail/History.php
index 0bd1e7c2aa1..bac2490454e 100644
--- a/data/class/pages/admin/mail/LC_Page_Admin_Mail_History.php
+++ b/data/Eccube/Page/Admin/Mail/History.php
@@ -1,36 +1,29 @@
getMode()) {
case 'delete':
- if (SC_Utils_Ex::sfIsInt($_GET['send_id'])) {
+ if (Utils::sfIsInt($_GET['send_id'])) {
// 削除時
$this->lfDeleteHistory($_GET['send_id']);
@@ -86,17 +79,17 @@ public function action()
* 実行履歴の取得
*
* @param integer $search_pageno 表示したいページ番号
- * @return array( integer 全体件数, mixed メール配信データ一覧配列, mixed SC_PageNaviオブジェクト)
+ * @return array( integer 全体件数, mixed メール配信データ一覧配列, mixed PageNaviオブジェクト)
*/
public function lfDoSearch($search_pageno = 1)
{
// 引数の初期化
- if (SC_Utils_Ex::sfIsInt($search_pageno)===false) {
+ if (Utils::sfIsInt($search_pageno)===false) {
$search_pageno = 1;
}
//
- $objSelect =& SC_Query_Ex::getSingletonInstance(); // 一覧データ取得用
- $objQuery =& SC_Query_Ex::getSingletonInstance(); // 件数取得用
+ $objSelect = Query::getSingletonInstance(); // 一覧データ取得用
+ $objQuery = Query::getSingletonInstance(); // 件数取得用
// 該当全体件数の取得
$linemax = $objQuery->count('dtb_send_history', 'del_flg = 0');
@@ -115,7 +108,7 @@ public function lfDoSearch($search_pageno = 1)
$objSelect->setLimitOffset(SEARCH_PMAX, $offset);
$arrResult = $objSelect->select($col, 'dtb_send_history', ' del_flg = 0');
- $objNavi = new SC_PageNavi_Ex($search_pageno,
+ $objNavi = new PageNavi($search_pageno,
$linemax,
SEARCH_PMAX);
@@ -128,7 +121,7 @@ public function lfDoSearch($search_pageno = 1)
*/
public function lfDeleteHistory($send_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->update('dtb_send_history',
array('del_flg' =>1),
'send_id = ?',
diff --git a/data/class/pages/admin/mail/LC_Page_Admin_Mail.php b/data/Eccube/Page/Admin/Mail/Index.php
similarity index 76%
rename from data/class/pages/admin/mail/LC_Page_Admin_Mail.php
rename to data/Eccube/Page/Admin/Mail/Index.php
index b7a07348727..67b888b64fb 100644
--- a/data/class/pages/admin/mail/LC_Page_Admin_Mail.php
+++ b/data/Eccube/Page/Admin/Mail/Index.php
@@ -1,36 +1,35 @@
tpl_maintitle = 'メルマガ管理';
$this->tpl_subtitle = '配信内容設定';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrJob = $masterData->getMasterData('mtb_job');
$this->arrJob['不明'] = '不明';
@@ -57,7 +56,7 @@ public function init()
$this->arrMailType = $masterData->getMasterData('mtb_mail_type');
// 日付プルダウン設定
- $objDate = new SC_Date_Ex(BIRTH_YEAR);
+ $objDate = new Date(BIRTH_YEAR);
$this->arrBirthYear = $objDate->getYear();
$this->arrRegistYear = $objDate->getYear();
$this->arrMonth = $objDate->getMonth();
@@ -65,11 +64,11 @@ public function init()
$this->objDate = $objDate;
// カテゴリ一覧設定
- $objDb = new SC_Helper_DB_Ex();
- $this->arrCatList = $objDb->sfGetCategoryList();
+ $objDb = new DbHelper();
+ $this->arrCatList = $objDb->getCategoryList();
// テンプレート一覧設定
- $this->arrTemplate = $this->lfGetMailTemplateList(SC_Helper_Mail_Ex::sfGetMailmagaTemplate());
+ $this->arrTemplate = $this->lfGetMailTemplateList(MailHelper::sfGetMailmagaTemplate());
$this->httpCacheControl('nocache');
}
@@ -93,7 +92,7 @@ public function process()
public function action()
{
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParamSearchCustomer($objFormParam);
$objFormParam->setParam($_POST);
@@ -101,16 +100,16 @@ public function action()
$this->arrHidden = $objFormParam->getSearchArray();
// 入力パラメーターチェック
- $this->arrErr = SC_Helper_Customer_Ex::sfCheckErrorSearchParam($objFormParam);
+ $this->arrErr = CustomerHelper::sfCheckErrorSearchParam($objFormParam);
$this->arrForm = $objFormParam->getFormParamList();
- if (!SC_Utils_Ex::isBlank($this->arrErr)) return;
+ if (!Utils::isBlank($this->arrErr)) return;
// モードによる処理切り替え
switch ($this->getMode()) {
// 配信先検索
case 'search':
case 'back':
- list($this->tpl_linemax, $this->arrResults, $this->objNavi) = SC_Helper_Customer_Ex::sfGetSearchData($objFormParam->getHashArray());
+ list($this->tpl_linemax, $this->arrResults, $this->objNavi) = CustomerHelper::sfGetSearchData($objFormParam->getHashArray());
$this->arrPagenavi = $this->objNavi->arrPagenavi;
break;
// input:検索結果画面「配信内容を設定する」押下後
@@ -121,7 +120,7 @@ public function action()
case 'template':
case 'regist_back':
$this->tpl_mainpage = 'mail/input.tpl';
- if (SC_Utils_Ex::sfIsInt($_POST['template_id']) === true) {
+ if (Utils::sfIsInt($_POST['template_id']) === true) {
$this->lfAddParamSelectTemplate($objFormParam);
$this->lfGetTemplateData($objFormParam, $_POST['template_id']);
// regist_back時、subject,bodyにはテンプレートを読み込むのではなく、入力内容で上書き
@@ -135,33 +134,33 @@ public function action()
$this->lfAddParamSelectTemplate($objFormParam);
$objFormParam->setParam($_POST);
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) $this->tpl_mainpage = 'mail/input_confirm.tpl';
+ if (Utils::isBlank($this->arrErr)) $this->tpl_mainpage = 'mail/input_confirm.tpl';
break;
case 'regist_complete':
$this->tpl_mainpage = 'mail/input.tpl';
$this->lfAddParamSelectTemplate($objFormParam);
$objFormParam->setParam($_POST);
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->tpl_mainpage = 'mail/index.tpl';
- SC_Helper_Mail_Ex::sfSendMailmagazine($this->lfRegisterData($objFormParam)); // DB登録・送信
+ MailHelper::sfSendMailmagazine($this->lfRegisterData($objFormParam)); // DB登録・送信
- SC_Response_Ex::sendRedirect('./history.php');
+ Response::sendRedirect('./history.php');
}
break;
// query:配信履歴から「確認」
case 'query':
- if (SC_Utils_Ex::sfIsInt($_GET['send_id'])) {
+ if (Utils::sfIsInt($_GET['send_id'])) {
$this->arrSearchData = $this->lfGetMailQuery($_GET['send_id']);
}
$this->setTemplate('mail/query.tpl');
break;
// query:配信履歴から「再送信」
case 'retry':
- if (SC_Utils_Ex::sfIsInt($_GET['send_id'])) {
- SC_Helper_Mail_Ex::sfSendMailmagazine($_GET['send_id']); // DB登録・送信
+ if (Utils::sfIsInt($_GET['send_id'])) {
+ MailHelper::sfSendMailmagazine($_GET['send_id']); // DB登録・送信
- SC_Response_Ex::sendRedirect('./history.php');
+ Response::sendRedirect('./history.php');
} else {
$this->tpl_onload = "window.alert('メール送信IDが正しくありません');";
}
@@ -175,12 +174,12 @@ public function action()
/**
* パラメーター情報の初期化(初期会員検索時)
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return void
*/
public function lfInitParamSearchCustomer(&$objFormParam)
{
- SC_Helper_Customer_Ex::sfSetSearchParam($objFormParam);
+ CustomerHelper::sfSetSearchParam($objFormParam);
$objFormParam->addParam('配信形式', 'search_htmlmail', INT_LEN, 'n', array('NUM_CHECK','MAX_LENGTH_CHECK'));
$objFormParam->addParam('配信メールアドレス種別', 'search_mail_type', INT_LEN, 'n', array('NUM_CHECK','MAX_LENGTH_CHECK'));
}
@@ -188,7 +187,7 @@ public function lfInitParamSearchCustomer(&$objFormParam)
/**
* パラメーター情報の追加(テンプレート選択)
*
- * @param SC_FormParam $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return void
*/
public function lfAddParamSelectTemplate(&$objFormParam)
@@ -202,7 +201,7 @@ public function lfAddParamSelectTemplate(&$objFormParam)
/**
* メルマガテンプレート一覧情報の取得
*
- * @param array $arrTemplate SC_Helper_Mail_Ex::sfGetMailmagaTemplate()の戻り値
+ * @param array $arrTemplate MailHelper::sfGetMailmagaTemplate()の戻り値
* @return array key:template_id value:サブジェクト【配信形式】
*/
public function lfGetMailTemplateList($arrTemplate)
@@ -219,13 +218,13 @@ public function lfGetMailTemplateList($arrTemplate)
/**
* テンプレートIDから情報の取得して$objFormParamにset_paramする
*
- * @param SC_FormParam $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @param array $template_id テンプレートID
* @return void
*/
public function lfGetTemplateData(&$objFormParam, $template_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setOrder('template_id DESC');
$where = 'template_id = ?';
$arrResults = $objQuery->getRow('*', 'dtb_mailmaga_template', $where, array($template_id));
@@ -235,14 +234,14 @@ public function lfGetTemplateData(&$objFormParam, $template_id)
/**
* 配信内容と配信リストを書き込む
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return integer 登録した行の dtb_send_history.send_id の値
*/
public function lfRegisterData(&$objFormParam)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
- list($linemax, $arrSendCustomer, $objNavi) = SC_Helper_Customer_Ex::sfGetSearchData($objFormParam->getHashArray(), 'All');
+ list($linemax, $arrSendCustomer, $objNavi) = CustomerHelper::sfGetSearchData($objFormParam->getHashArray(), 'All');
$send_customer_cnt = count($arrSendCustomer);
$send_id = $objQuery->nextVal('dtb_send_history_send_id');
@@ -285,7 +284,7 @@ public function lfRegisterData(&$objFormParam)
*/
public function lfGetMailQuery($send_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// 送信履歴より、送信条件確認画面
$sql = 'SELECT search_data FROM dtb_send_history WHERE send_id = ?';
diff --git a/data/class/pages/admin/mail/LC_Page_Admin_Mail_Preview.php b/data/Eccube/Page/Admin/Mail/Preview.php
similarity index 57%
rename from data/class/pages/admin/mail/LC_Page_Admin_Mail_Preview.php
rename to data/Eccube/Page/Admin/Mail/Preview.php
index e6f43ea4be7..11f450a3778 100644
--- a/data/class/pages/admin/mail/LC_Page_Admin_Mail_Preview.php
+++ b/data/Eccube/Page/Admin/Mail/Preview.php
@@ -1,36 +1,28 @@
getMode()) {
case 'template':
- if (SC_Utils_Ex::sfIsInt($_GET['template_id'])) {
+ if (Utils::sfIsInt($_GET['template_id'])) {
$arrMail = $objMailHelper->sfGetMailmagaTemplate($_GET['template_id']);
$this->mail = $arrMail[0];
}
break;
case 'history';
- if (SC_Utils_Ex::sfIsInt($_GET['send_id'])) {
+ if (Utils::sfIsInt($_GET['send_id'])) {
$arrMail = $objMailHelper->sfGetSendHistory($_GET['send_id']);
$this->mail = $arrMail[0];
}
diff --git a/data/class/pages/admin/mail/LC_Page_Admin_Mail_Template.php b/data/Eccube/Page/Admin/Mail/Template.php
similarity index 61%
rename from data/class/pages/admin/mail/LC_Page_Admin_Mail_Template.php
rename to data/Eccube/Page/Admin/Mail/Template.php
index ee4654af1ef..3ae8a960961 100644
--- a/data/class/pages/admin/mail/LC_Page_Admin_Mail_Template.php
+++ b/data/Eccube/Page/Admin/Mail/Template.php
@@ -1,36 +1,30 @@
tpl_maintitle = 'メルマガ管理';
$this->tpl_subtitle = 'テンプレート設定';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrMagazineType = $masterData->getMasterData('mtb_magazine_type');
}
@@ -68,11 +62,11 @@ public function process()
*/
public function action()
{
- $objMailHelper = new SC_Helper_Mail_Ex();
+ $objMailHelper = new MailHelper();
switch ($this->getMode()) {
case 'delete':
- if (SC_Utils_Ex::sfIsInt($_GET['id'])===true) {
+ if (Utils::sfIsInt($_GET['id'])===true) {
$this->lfDeleteMailTemplate($_GET['id']);
$this->objDisplay->reload(null, true);
@@ -91,7 +85,7 @@ public function action()
*/
public function lfDeleteMailTemplate($template_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->update('dtb_mailmaga_template',
array('del_flg' =>1),
'template_id = ?',
diff --git a/data/class/pages/admin/mail/LC_Page_Admin_Mail_TemplateInput.php b/data/Eccube/Page/Admin/Mail/TemplateInput.php
similarity index 73%
rename from data/class/pages/admin/mail/LC_Page_Admin_Mail_TemplateInput.php
rename to data/Eccube/Page/Admin/Mail/TemplateInput.php
index 68100dac961..a1e15442695 100644
--- a/data/class/pages/admin/mail/LC_Page_Admin_Mail_TemplateInput.php
+++ b/data/Eccube/Page/Admin/Mail/TemplateInput.php
@@ -1,36 +1,31 @@
tpl_subtitle = 'テンプレート設定';
$this->tpl_subno = 'template';
$this->mode = 'regist';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrMagazineType = $masterData->getMasterData('mtb_magazine_type');
}
@@ -68,26 +63,26 @@ public function process()
*/
public function action()
{
- $objMailHelper = new SC_Helper_Mail_Ex();
+ $objMailHelper = new MailHelper();
switch ($this->getMode()) {
case 'edit':
// 編集
- if (SC_Utils_Ex::sfIsInt($_GET['template_id'])===true) {
+ if (Utils::sfIsInt($_GET['template_id'])===true) {
$arrMail = $objMailHelper->sfGetMailmagaTemplate($_GET['template_id']);
$this->arrForm = $arrMail[0];
}
break;
case 'regist':
// 新規登録
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$this->arrErr = $objFormParam->checkError();
$this->arrForm = $objFormParam->getHashArray();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
// エラーが無いときは登録・編集
$this->lfRegistData($objFormParam, $objFormParam->getValue('template_id'));
@@ -110,19 +105,19 @@ public function action()
/**
* メルマガテンプレートデータの登録・更新を行う
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param integer template_id 更新時は指定
* @return void
*/
public function lfRegistData(&$objFormParam, $template_id = null)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$sqlval = $objFormParam->getDbArray();
$sqlval['creator_id'] = $_SESSION['member_id'];
$sqlval['update_date'] = 'CURRENT_TIMESTAMP';
- if (SC_Utils_Ex::sfIsInt($template_id)) {
+ if (Utils::sfIsInt($template_id)) {
// 更新時
$objQuery->update('dtb_mailmaga_template',
$sqlval,
@@ -139,7 +134,7 @@ public function lfRegistData(&$objFormParam, $template_id = null)
/**
* お問い合わせ入力時のパラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
diff --git a/data/class/pages/admin/order/LC_Page_Admin_Order_Disp.php b/data/Eccube/Page/Admin/Order/Disp.php
similarity index 88%
rename from data/class/pages/admin/order/LC_Page_Admin_Order_Disp.php
rename to data/Eccube/Page/Admin/Order/Disp.php
index b532e8fcf73..3893f5980ed 100644
--- a/data/class/pages/admin/order/LC_Page_Admin_Order_Disp.php
+++ b/data/Eccube/Page/Admin/Order/Disp.php
@@ -1,36 +1,33 @@
tpl_subno = '';
$this->tpl_subtitle = '受注情報表示';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
$this->arrDeviceType = $masterData->getMasterData('mtb_device_type');
@@ -91,10 +88,10 @@ public function init()
$this->arrJob = $masterData->getMasterData('mtb_job');
// 支払い方法の取得
- $this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
+ $this->arrPayment = PaymentHelper::getIDValueList();
// 配送業者の取得
- $this->arrDeliv = SC_Helper_Delivery_Ex::getIDValueList();
+ $this->arrDeliv = DeliveryHelper::getIDValueList();
}
/**
@@ -115,8 +112,8 @@ public function process()
*/
public function action()
{
- $objPurchase = new SC_Helper_Purchase_Ex();
- $objFormParam = new SC_FormParam_Ex();
+ $objPurchase = new PurchaseHelper();
+ $objFormParam = new FormParam();
// パラメータ情報の初期化
$this->lfInitParam($objFormParam);
@@ -129,9 +126,9 @@ public function action()
$this->arrForm = $objFormParam->getFormParamList();
$this->arrAllShipping = $objFormParam->getSwapArray(array_merge($this->arrShippingKeys, $this->arrShipmentItemKeys));
- $this->tpl_shipping_quantity = count($this->arrAllShipping);
- $this->arrDelivTime = SC_Helper_Delivery_Ex::getDelivTime($objFormParam->getValue('deliv_id'));
- $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
+ $this->tpl_shipping_quantity = count($this->arrAllShipping);
+ $this->arrDelivTime = DeliveryHelper::getDelivTime($objFormParam->getValue('deliv_id'));
+ $this->arrInfo = DbHelper::getBasisData();
$this->setTemplate($this->tpl_mainpage);
}
@@ -139,7 +136,7 @@ public function action()
/**
* パラメータ情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -166,11 +163,11 @@ public function lfInitParam(&$objFormParam)
$objFormParam->addParam('電話番号1', 'order_tel01', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK'));
$objFormParam->addParam('電話番号2', 'order_tel02', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK'));
$objFormParam->addParam('電話番号3', 'order_tel03', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK'));
- $objFormParam->addParam('性別', 'order_sex', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK'));
+ $objFormParam->addParam('性別', 'order_sex', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK'));
$objFormParam->addParam('職業', 'order_job', TEL_ITEM_LEN, 'n', array('MAX_LENGTH_CHECK' ,'NUM_CHECK'));
- $objFormParam->addParam('生年月日(年)', 'order_birth_year', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
- $objFormParam->addParam('生年月日(月)', 'order_birth_month', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
- $objFormParam->addParam('生年月日(日)', 'order_birth_day', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
+ $objFormParam->addParam('生年月日(年)', 'order_birth_year', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
+ $objFormParam->addParam('生年月日(月)', 'order_birth_month', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
+ $objFormParam->addParam('生年月日(日)', 'order_birth_day', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
// 受注商品情報
$objFormParam->addParam('値引き', 'discount', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'), '0');
@@ -263,25 +260,25 @@ public function lfInitParam(&$objFormParam)
}
/**
- * 受注データを取得して, SC_FormParam へ設定する.
+ * 受注データを取得して, FormParam へ設定する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param integer $order_id 取得元の受注ID
* @return void
*/
public function setOrderToFormParam(&$objFormParam, $order_id)
{
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
// 受注詳細を設定
$arrOrderDetail = $objPurchase->getOrderDetail($order_id, false);
- $objFormParam->setParam(SC_Utils_Ex::sfSwapArray($arrOrderDetail));
+ $objFormParam->setParam(Utils::sfSwapArray($arrOrderDetail));
$arrShippingsTmp = $objPurchase->getShippings($order_id);
$arrShippings = array();
foreach ($arrShippingsTmp as $row) {
// お届け日の処理
- if (!SC_Utils_Ex::isBlank($row['shipping_date'])) {
+ if (!Utils::isBlank($row['shipping_date'])) {
$ts = strtotime($row['shipping_date']);
$row['shipping_date_year'] = date('Y', $ts);
$row['shipping_date_month'] = date('n', $ts);
@@ -289,7 +286,7 @@ public function setOrderToFormParam(&$objFormParam, $order_id)
}
$arrShippings[$row['shipping_id']] = $row;
}
- $objFormParam->setParam(SC_Utils_Ex::sfSwapArray($arrShippings));
+ $objFormParam->setParam(Utils::sfSwapArray($arrShippings));
/*
* 配送商品を設定
@@ -317,26 +314,26 @@ public function setOrderToFormParam(&$objFormParam, $order_id)
*/
$arrOrder = $objPurchase->getOrder($order_id);
- // 生年月日の処理
- if (!SC_Utils_Ex::isBlank($arrOrder['order_birth'])) {
- $order_birth = substr($arrOrder['order_birth'], 0, 10);
- $arrOrderBirth = explode("-", $order_birth);
- $arrOrder['order_birth_year'] = intval($arrOrderBirth[0]);
- $arrOrder['order_birth_month'] = intval($arrOrderBirth[1]);
- $arrOrder['order_birth_day'] = intval($arrOrderBirth[2]);
+ // 生年月日の処理
+ if (!Utils::isBlank($arrOrder['order_birth'])) {
+ $order_birth = substr($arrOrder['order_birth'], 0, 10);
+ $arrOrderBirth = explode("-", $order_birth);
+ $arrOrder['order_birth_year'] = intval($arrOrderBirth[0]);
+ $arrOrder['order_birth_month'] = intval($arrOrderBirth[1]);
+ $arrOrder['order_birth_day'] = intval($arrOrderBirth[2]);
}
$objFormParam->setParam($arrOrder);
// ポイントを設定
- list($db_point, $rollback_point) = SC_Helper_DB_Ex::sfGetRollbackPoint(
+ list($db_point, $rollback_point) = DbHelper::getRollbackPoint(
$order_id, $arrOrder['use_point'], $arrOrder['add_point'], $arrOrder['status']
);
$objFormParam->setValue('total_point', $db_point);
$objFormParam->setValue('point', $rollback_point);
- if (!SC_Utils_Ex::isBlank($objFormParam->getValue('customer_id'))) {
- $arrCustomer = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($objFormParam->getValue('customer_id'));
+ if (!Utils::isBlank($objFormParam->getValue('customer_id'))) {
+ $arrCustomer = CustomerHelper::sfGetCustomerDataFromId($objFormParam->getValue('customer_id'));
$objFormParam->setValue('customer_point', $arrCustomer['point']);
}
}
diff --git a/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php b/data/Eccube/Page/Admin/Order/Edit.php
similarity index 90%
rename from data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
rename to data/Eccube/Page/Admin/Order/Edit.php
index 71b2012bd8d..5c83b2da2a6 100644
--- a/data/class/pages/admin/order/LC_Page_Admin_Order_Edit.php
+++ b/data/Eccube/Page/Admin/Order/Edit.php
@@ -1,36 +1,38 @@
tpl_maintitle = '受注管理';
$this->tpl_subtitle = '受注登録';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrCountry = $masterData->getMasterData('mtb_country');
$this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
@@ -104,21 +106,21 @@ public function init()
$this->arrSex = $masterData->getMasterData('mtb_sex');
$this->arrJob = $masterData->getMasterData('mtb_job');
- $objShippingDate = new SC_Date_Ex(RELEASE_YEAR);
+ $objShippingDate = new Date(RELEASE_YEAR);
$this->arrYearShippingDate = $objShippingDate->getYear('', date('Y'), '');
$this->arrMonthShippingDate = $objShippingDate->getMonth(true);
$this->arrDayShippingDate = $objShippingDate->getDay(true);
- $objBirthDate = new SC_Date_Ex(BIRTH_YEAR, date('Y'));
+ $objBirthDate = new Date(BIRTH_YEAR, date('Y'));
$this->arrBirthYear = $objBirthDate->getYear('', START_BIRTH_YEAR, '');
$this->arrBirthMonth = $objBirthDate->getMonth(true);
$this->arrBirthDay = $objBirthDate->getDay(true);
// 支払い方法の取得
- $this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
+ $this->arrPayment = PaymentHelper::getIDValueList();
// 配送業者の取得
- $this->arrDeliv = SC_Helper_Delivery_Ex::getIDValueList();
+ $this->arrDeliv = DeliveryHelper::getIDValueList();
$this->httpCacheControl('nocache');
}
@@ -141,8 +143,8 @@ public function process()
*/
public function action()
{
- $objPurchase = new SC_Helper_Purchase_Ex();
- $objFormParam = new SC_FormParam_Ex();
+ $objPurchase = new PurchaseHelper();
+ $objFormParam = new FormParam();
// パラメーター情報の初期化
$this->lfInitParam($objFormParam);
@@ -152,7 +154,7 @@ public function action()
$arrValuesBefore = array();
// DBから受注情報を読み込む
- if (!SC_Utils_Ex::isBlank($order_id)) {
+ if (!Utils::isBlank($order_id)) {
$this->setOrderToFormParam($objFormParam, $order_id);
$this->tpl_subno = 'index';
$arrValuesBefore['deliv_id'] = $objFormParam->getValue('deliv_id');
@@ -169,9 +171,9 @@ public function action()
$objFormParam->setValue('shipping_id', $arrShippingIds);
// 新規受注登録で入力エラーがあった場合の画面表示用に、会員の現在ポイントを取得
- if (!SC_Utils_Ex::isBlank($objFormParam->getValue('customer_id'))) {
+ if (!Utils::isBlank($objFormParam->getValue('customer_id'))) {
$customer_id = $objFormParam->getValue('customer_id');
- $arrCustomer = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($customer_id);
+ $arrCustomer = CustomerHelper::sfGetCustomerDataFromId($customer_id);
$objFormParam->setValue('customer_point', $arrCustomer['point']);
// 新規受注登録で、ポイント利用できるように現在ポイントを設定
@@ -192,7 +194,7 @@ public function action()
//複数配送時に各商品の総量を設定
$this->setProductsQuantity($objFormParam);
$this->arrErr = $this->lfCheckError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$message = '受注を編集しました。';
$order_id = $this->doRegister($order_id, $objPurchase, $objFormParam, $message, $arrValuesBefore);
if ($order_id >= 0) {
@@ -209,7 +211,7 @@ public function action()
//複数配送時に各商品の総量を設定
$this->setProductsQuantity($objFormParam);
$this->arrErr = $this->lfCheckError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$message = '受注を登録しました。';
$order_id = $this->doRegister(null, $objPurchase, $objFormParam, $message, $arrValuesBefore);
if ($order_id >= 0) {
@@ -315,12 +317,12 @@ public function action()
$this->arrAllShipping = $objFormParam->getSwapArray(array_merge($this->arrShippingKeys, $this->arrShipmentItemKeys));
$this->tpl_shipping_quantity = count($this->arrAllShipping);
$this->top_shipping_id = array_shift((array_keys($this->arrAllShipping)));
- $this->arrDelivTime = SC_Helper_Delivery_Ex::getDelivTime($objFormParam->getValue('deliv_id'));
+ $this->arrDelivTime = DeliveryHelper::getDelivTime($objFormParam->getValue('deliv_id'));
$this->tpl_onload .= $this->getAnchorKey($objFormParam);
if ($arrValuesBefore['deliv_id']) {
// 受注当時の配送業者名はdtb_orderにないので、
// 削除済みの配送業者も含めて情報を取得。
- $objDelivery = new SC_Helper_Delivery_Ex();
+ $objDelivery = new DeliveryHelper();
$arrDelivery = $objDelivery->get($arrValuesBefore['deliv_id'], true);
$this->arrDeliv[$arrValuesBefore['deliv_id']] = $arrDelivery['name'];
}
@@ -331,7 +333,7 @@ public function action()
/**
* パラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -462,7 +464,7 @@ public function lfInitParam(&$objFormParam)
/**
* 複数配送用フォームの初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitMultipleParam(&$objFormParam)
@@ -478,9 +480,9 @@ public function lfInitMultipleParam(&$objFormParam)
}
/**
- * 複数配送入力フォームで入力された値を SC_FormParam へ設定する.
+ * 複数配送入力フォームで入力された値を FormParam へ設定する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function setMultipleItemTo(&$objFormParam)
@@ -552,19 +554,19 @@ public function setMultipleItemTo(&$objFormParam)
}
/**
- * 受注データを取得して, SC_FormParam へ設定する.
+ * 受注データを取得して, FormParam へ設定する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param integer $order_id 取得元の受注ID
* @return void
*/
public function setOrderToFormParam(&$objFormParam, $order_id)
{
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
// 受注詳細を設定
$arrOrderDetail = $objPurchase->getOrderDetail($order_id, false);
- $objFormParam->setParam(SC_Utils_Ex::sfSwapArray($arrOrderDetail));
+ $objFormParam->setParam(Utils::sfSwapArray($arrOrderDetail));
$arrShippingsTmp = $objPurchase->getShippings($order_id);
$arrShippings = array();
@@ -572,7 +574,7 @@ public function setOrderToFormParam(&$objFormParam, $order_id)
if ($arrShippingsTmp) {
foreach ($arrShippingsTmp as $row) {
// お届け日の処理
- if (!SC_Utils_Ex::isBlank($row['shipping_date'])) {
+ if (!Utils::isBlank($row['shipping_date'])) {
$ts = strtotime($row['shipping_date']);
$row['shipping_date_year'] = date('Y', $ts);
$row['shipping_date_month'] = date('n', $ts);
@@ -591,7 +593,7 @@ public function setOrderToFormParam(&$objFormParam, $order_id)
$arrShippings[0]['shipment_item'][$key]['quantity'] = $value['quantity'];
}
}
- $objFormParam->setParam(SC_Utils_Ex::sfSwapArray($arrShippings));
+ $objFormParam->setParam(Utils::sfSwapArray($arrShippings));
/*
* 配送商品を設定
@@ -617,7 +619,7 @@ public function setOrderToFormParam(&$objFormParam, $order_id)
$arrOrder = $objPurchase->getOrder($order_id);
// 生年月日の処理
- if (!SC_Utils_Ex::isBlank($arrOrder['order_birth'])) {
+ if (!Utils::isBlank($arrOrder['order_birth'])) {
$order_birth = substr($arrOrder['order_birth'], 0, 10);
$arrOrderBirth = explode("-", $order_birth);
@@ -630,7 +632,7 @@ public function setOrderToFormParam(&$objFormParam, $order_id)
// ポイントを設定
if (USE_POINT !== false) {
- list($db_point, $rollback_point) = SC_Helper_DB_Ex::sfGetRollbackPoint(
+ list($db_point, $rollback_point) = DbHelper::getRollbackPoint(
$order_id, $arrOrder['use_point'],
$arrOrder['add_point'], $arrOrder['status']
);
@@ -641,8 +643,8 @@ public function setOrderToFormParam(&$objFormParam, $order_id)
$objFormParam->setValue('point', 0);
}
- if (!SC_Utils_Ex::isBlank($objFormParam->getValue('customer_id'))) {
- $arrCustomer = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($objFormParam->getValue('customer_id'));
+ if (!Utils::isBlank($objFormParam->getValue('customer_id'))) {
+ $arrCustomer = CustomerHelper::sfGetCustomerDataFromId($objFormParam->getValue('customer_id'));
$objFormParam->setValue('customer_point', $arrCustomer['point']);
}
}
@@ -650,12 +652,12 @@ public function setOrderToFormParam(&$objFormParam, $order_id)
/**
* 入力内容のチェックを行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return array エラーメッセージの配列
*/
public function lfCheckError(&$objFormParam)
{
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$arrValues = $objFormParam->getHashArray();
$arrErr = array();
$arrErrTemp = $objFormParam->checkError();
@@ -663,7 +665,7 @@ public function lfCheckError(&$objFormParam)
foreach ($arrValues['shipping_date_year'] as $key_index => $year) {
$month = $arrValues['shipping_date_month'][$key_index];
$day = $arrValues['shipping_date_day'][$key_index];
- $objError = new SC_CheckError_Ex(array('shipping_date_year' => $year,
+ $objError = new CheckError(array('shipping_date_year' => $year,
'shipping_date_month' => $month,
'shipping_date_day' => $day));
$objError->doFunc(array('お届け日', 'shipping_date_year', 'shipping_date_month', 'shipping_date_day'), array('CHECK_DATE'));
@@ -675,7 +677,7 @@ public function lfCheckError(&$objFormParam)
$year = $arrValues['order_birth_year'];
$month = $arrValues['order_birth_month'];
$day = $arrValues['order_birth_day'];
- $objError = new SC_CheckError_Ex(array('order_birth_year' => $year,
+ $objError = new CheckError(array('order_birth_year' => $year,
'order_birth_month' => $month,
'order_birth_day' => $day));
$objError->doFunc(array('生年月日', 'order_birth_year', 'order_birth_month', 'order_birth_day'),
@@ -689,25 +691,25 @@ public function lfCheckError(&$objFormParam)
$totaltax = 0;
for ($i = 0; $i < $max; $i++) {
// 小計の計算
- $subtotal += SC_Helper_DB_Ex::sfCalcIncTax($arrValues['price'][$i], $arrValues['tax_rate'][$i], $arrValues['tax_rule'][$i]) * $arrValues['quantity'][$i];
+ $subtotal += DbHelper::calcIncTax($arrValues['price'][$i], $arrValues['tax_rate'][$i], $arrValues['tax_rule'][$i]) * $arrValues['quantity'][$i];
// 小計の計算
- $totaltax += SC_Utils_Ex::sfTax($arrValues['price'][$i], $arrValues['tax_rate'][$i], $arrValues['tax_rule'][$i]) * $arrValues['quantity'][$i];
+ $totaltax += Utils::sfTax($arrValues['price'][$i], $arrValues['tax_rate'][$i], $arrValues['tax_rule'][$i]) * $arrValues['quantity'][$i];
// 加算ポイントの計算
- $totalpoint += SC_Utils_Ex::sfPrePoint($arrValues['price'][$i], $arrValues['point_rate'][$i]) * $arrValues['quantity'][$i];
+ $totalpoint += Utils::sfPrePoint($arrValues['price'][$i], $arrValues['point_rate'][$i]) * $arrValues['quantity'][$i];
// 在庫数のチェック
$arrProduct = $objProduct->getDetailAndProductsClass($arrValues['product_class_id'][$i]);
// 編集前の値と比較するため受注詳細を取得
- $objPurchase = new SC_Helper_Purchase_Ex();
- $arrOrderDetail = SC_Utils_Ex::sfSwapArray($objPurchase->getOrderDetail($objFormParam->getValue('order_id'), false));
+ $objPurchase = new PurchaseHelper();
+ $arrOrderDetail = Utils::sfSwapArray($objPurchase->getOrderDetail($objFormParam->getValue('order_id'), false));
if ($arrProduct['stock_unlimited'] != '1'
&& $arrProduct['stock'] < $arrValues['quantity'][$i] - $arrOrderDetail['quantity'][$i]) {
$class_name1 = $arrValues['classcategory_name1'][$i];
- $class_name1 = SC_Utils_Ex::isBlank($class_name1) ? 'なし' : $class_name1;
+ $class_name1 = Utils::isBlank($class_name1) ? 'なし' : $class_name1;
$class_name2 = $arrValues['classcategory_name2'][$i];
- $class_name2 = SC_Utils_Ex::isBlank($class_name2) ? 'なし' : $class_name2;
+ $class_name2 = Utils::isBlank($class_name2) ? 'なし' : $class_name2;
$arrErr['quantity'][$i] .= $arrValues['product_name'][$i]
. '/(' . $class_name1 . ')/(' . $class_name2 . ') の在庫が不足しています。 設定できる数量は「'
. ($arrOrderDetail['quantity'][$i] + $arrProduct['stock']) . '」までです。
';
@@ -724,7 +726,7 @@ public function lfCheckError(&$objFormParam)
$arrValues['payment_total'] = $arrValues['total'] - ($arrValues['use_point'] * POINT_VALUE);
// 加算ポイント
- $arrValues['add_point'] = SC_Helper_DB_Ex::sfGetAddPoint($totalpoint, $arrValues['use_point']) + $arrValues['birth_point'];
+ $arrValues['add_point'] = DbHelper::getAddPoint($totalpoint, $arrValues['use_point']) + $arrValues['birth_point'];
// 最終保持ポイント
$arrValues['total_point'] = $objFormParam->getValue('point') - $arrValues['use_point'];
@@ -751,17 +753,17 @@ public function lfCheckError(&$objFormParam)
* DB更新処理
*
* @param integer $order_id 受注ID
- * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param PurchaseHelper $objPurchase PurchaseHelper インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param string $message 通知メッセージ
* @param array $arrValuesBefore 更新前の受注情報
* @return integer $order_id 受注ID
*
* エラー発生時は負数を返す。
*/
- public function doRegister($order_id, &$objPurchase, &$objFormParam, &$message, &$arrValuesBefore)
+ public function doRegister($order_id, PurchaseHelper &$objPurchase, &$objFormParam, &$message, &$arrValuesBefore)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrValues = $objFormParam->getDbArray();
$where = 'order_id = ?';
@@ -775,7 +777,7 @@ public function doRegister($order_id, &$objPurchase, &$objFormParam, &$message,
}
// 生年月日の調整
- $arrValues['order_birth'] = SC_Utils_Ex::sfGetTimestamp($arrValues['order_birth_year'], $arrValues['order_birth_month'], $arrValues['order_birth_day']);
+ $arrValues['order_birth'] = Utils::sfGetTimestamp($arrValues['order_birth_year'], $arrValues['order_birth_month'], $arrValues['order_birth_day']);
// 受注テーブルの更新
$order_id = $objPurchase->registerOrder($order_id, $arrValues);
@@ -841,7 +843,7 @@ public function doRegister($order_id, &$objPurchase, &$objFormParam, &$message,
$arrAllShipping = $objFormParam->getSwapArray($this->arrShippingKeys);
$arrAllShipmentItem = $objFormParam->getSwapArray($this->arrShipmentItemKeys);
- $arrDelivTime = SC_Helper_Delivery_Ex::getDelivTime($objFormParam->getValue('deliv_id'));
+ $arrDelivTime = DeliveryHelper::getDelivTime($objFormParam->getValue('deliv_id'));
//商品単価を複数配送にも適応
$arrShippingValues = array();
$arrIsNotQuantityUp = array();
@@ -850,7 +852,7 @@ public function doRegister($order_id, &$objPurchase, &$objFormParam, &$message,
$arrShippingValues[$shipping_index] = $arrShipping;
$arrShippingValues[$shipping_index]['shipping_date']
- = SC_Utils_Ex::sfGetTimestamp($arrShipping['shipping_date_year'],
+ = Utils::sfGetTimestamp($arrShipping['shipping_date_year'],
$arrShipping['shipping_date_month'],
$arrShipping['shipping_date_day']);
@@ -869,7 +871,7 @@ public function doRegister($order_id, &$objPurchase, &$objFormParam, &$message,
$arrShippingValues[$shipping_index]['shipping_time'] = $arrDelivTime[$arrShipping['time_id']];
// 複数配送の場合は配送商品を登録
- if (!SC_Utils_Ex::isBlank($arrAllShipmentItem)) {
+ if (!Utils::isBlank($arrAllShipmentItem)) {
$arrShipmentValues = array();
foreach ($arrAllShipmentItem[$shipping_index] as $key => $arrItem) {
@@ -898,13 +900,13 @@ public function doRegister($order_id, &$objPurchase, &$objFormParam, &$message,
*
* 小画面で選択した受注商品をフォームに反映させる.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function doRegisterProduct(&$objFormParam)
{
$product_class_id = $objFormParam->getValue('add_product_class_id');
- if (SC_Utils_Ex::isBlank($product_class_id)) {
+ if (Utils::isBlank($product_class_id)) {
$product_class_id = $objFormParam->getValue('edit_product_class_id');
$changed_no = $objFormParam->getValue('no');
$this->shipmentEditProduct($objFormParam, $product_class_id, $changed_no);
@@ -917,7 +919,7 @@ public function doRegisterProduct(&$objFormParam)
* 受注商品を削除する.
*
* @param integer $delete_no 削除する受注商品の項番
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function doDeleteProduct($delete_no, &$objFormParam)
@@ -952,7 +954,7 @@ public function doDeleteProduct($delete_no, &$objFormParam)
/**
* お届け先を追加する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function addShipping(&$objFormParam)
@@ -966,18 +968,18 @@ public function addShipping(&$objFormParam)
* 会員情報をフォームに設定する.
*
* @param integer $customer_id 会員ID
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function setCustomerTo($customer_id, &$objFormParam)
{
- $arrCustomer = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($customer_id);
+ $arrCustomer = CustomerHelper::sfGetCustomerDataFromId($customer_id);
foreach ($arrCustomer as $key => $val) {
$objFormParam->setValue('order_' . $key, $val);
}
// 誕生日の処理
- if (!SC_Utils_Ex::isBlank($objFormParam->getValue('order_birth'))) {
+ if (!Utils::isBlank($objFormParam->getValue('order_birth'))) {
$order_birth = substr($objFormParam->getValue('order_birth'), 0, 10);
$arrOrderBirth = explode("-", $order_birth);
@@ -993,13 +995,13 @@ public function setCustomerTo($customer_id, &$objFormParam)
/**
* アンカーキーを取得する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return string アンカーキーの文字列
*/
public function getAnchorKey(&$objFormParam)
{
$ancor_key = $objFormParam->getValue('anchor_key');
- if (!SC_Utils_Ex::isBlank($ancor_key)) {
+ if (!Utils::isBlank($ancor_key)) {
return "location.hash='#" . htmlentities(urlencode($ancor_key), ENT_QUOTES) . "'";
}
@@ -1009,7 +1011,7 @@ public function getAnchorKey(&$objFormParam)
/**
* 商品を追加
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param integer $add_product_class_id 追加商品規格ID
* @return void
*/
@@ -1030,7 +1032,7 @@ public function shipmentAddProduct(&$objFormParam, $add_product_class_id)
}
} else {
//届け先に選択商品がない場合
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$arrAddProductInfo = $objProduct->getDetailAndProductsClass($add_product_class_id);
$arrShipmentProducts['shipment_product_class_id'][$select_shipping_id][] = $add_product_class_id;
@@ -1050,7 +1052,7 @@ public function shipmentAddProduct(&$objFormParam, $add_product_class_id)
/**
* 商品を変更
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param integer $edit_product_class_id 変更商品規格ID
* @param integer $change_no 変更対象
* @return void
@@ -1075,7 +1077,7 @@ public function shipmentEditProduct(&$objFormParam, $edit_product_class_id, $cha
}
}
} else {
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$arrAddProductInfo = $objProduct->getDetailAndProductsClass($edit_product_class_id);
//上書き
@@ -1106,7 +1108,7 @@ public function shipmentEditProduct(&$objFormParam, $edit_product_class_id, $cha
/**
* 複数配送のパラメータを取り出す
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return array 配送データ
*/
public function getShipmentProducts(&$objFormParam)
@@ -1151,7 +1153,7 @@ public function changeShipmentProducts(&$arrShipmentProducts, $arrProductInfo, $
/**
* 商品側の総量計算&セット
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function setProductsQuantity(&$objFormParam)
@@ -1159,7 +1161,7 @@ public function setProductsQuantity(&$objFormParam)
$arrShipmentsItems = $objFormParam->getSwapArray(array('shipment_product_class_id', 'shipment_quantity'));
// 配送先が存在する時のみ、商品個数の再設定を行います
- if (!SC_Utils_Ex::isBlank($arrShipmentsItems)) {
+ if (!Utils::isBlank($arrShipmentsItems)) {
$arrUpdateQuantity = array();
foreach ($arrShipmentsItems as $arritems) {
foreach ($arritems['shipment_product_class_id'] as $relation_index => $shipment_product_class_id) {
@@ -1179,7 +1181,7 @@ public function setProductsQuantity(&$objFormParam)
/**
* 削除対象の確認、削除をする
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param array $arrProductClassIds 削除対象配列の商品規格ID
* @param integer $delete_product_class_id 削除商品規? ?ID
* @param array $arrDeleteKeys 削除項目
@@ -1208,7 +1210,7 @@ public function checkDeleteProducts(&$objFormParam, $arrProductClassIds, $delete
/**
* 配送先商品の削除の削除
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param array $arrShipmentDeleteKeys 削除項目
* @param int $delete_shipping_id 削除配送ID
* @param int $delete_no 削除対象
@@ -1235,7 +1237,7 @@ public function deleteShipment(&$objFormParam, $arrShipmentDeleteKeys, $delete_s
/**
* 受注商品一覧側に商品を追加
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param array $arrProductClassIds 対象配列の商品規格ID
* @param int $insert_product_class_id 追加商品規格ID
* @param array $arrAddProductInfo 追加データ
@@ -1245,7 +1247,7 @@ public function checkInsertOrderProducts(&$objFormParam, $arrProductClassIds, $i
{
if (!$arrProductClassIds || !in_array($insert_product_class_id, $arrProductClassIds)) {
$arrAddProducts = array();
- $arrTax = SC_Helper_TaxRule_Ex::getTaxRule(0, $insert_product_class_id);
+ $arrTax = TaxRuleHelper::getTaxRule(0, $insert_product_class_id);
$arrAddProductInfo['product_name'] = ($arrAddProductInfo['product_name'])
? $arrAddProductInfo['product_name']
diff --git a/data/class/pages/admin/order/LC_Page_Admin_Order.php b/data/Eccube/Page/Admin/Order/Index.php
similarity index 87%
rename from data/class/pages/admin/order/LC_Page_Admin_Order.php
rename to data/Eccube/Page/Admin/Order/Index.php
index a873ce0710d..55e1e17a938 100644
--- a/data/class/pages/admin/order/LC_Page_Admin_Order.php
+++ b/data/Eccube/Page/Admin/Order/Index.php
@@ -1,36 +1,39 @@
tpl_maintitle = '受注管理';
$this->tpl_subtitle = '受注管理';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$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 = new Date();
// 登録・更新日検索用
$objDate->setStartYear(RELEASE_YEAR);
$objDate->setEndYear(DATE('Y'));
@@ -67,7 +70,7 @@ public function init()
$this->arrDay = $objDate->getDay();
// 支払い方法の取得
- $this->arrPayments = SC_Helper_Payment_Ex::getIDValueList();
+ $this->arrPayments = PaymentHelper::getIDValueList();
$this->httpCacheControl('nocache');
}
@@ -90,13 +93,13 @@ public function process()
*/
public function action()
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$this->arrHidden = $objFormParam->getSearchArray();
$this->arrForm = $objFormParam->getFormParamList();
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
switch ($this->getMode()) {
// 削除
@@ -136,7 +139,7 @@ public function action()
case 'csv':
$this->doOutputCSV($where, $arrWhereVal, $order);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
break;
// 全件削除(ADMIN_MODE)
@@ -154,9 +157,9 @@ public function action()
// 行数の取得
$this->tpl_linemax = $this->getNumberOfLines($where, $arrWhereVal);
// ページ送りの処理
- $page_max = SC_Utils_Ex::sfGetSearchPageMax($objFormParam->getValue('search_page_max'));
+ $page_max = Utils::sfGetSearchPageMax($objFormParam->getValue('search_page_max'));
// ページ送りの取得
- $objNavi = new SC_PageNavi_Ex($this->arrHidden['search_pageno'],
+ $objNavi = new PageNavi($this->arrHidden['search_pageno'],
$this->tpl_linemax, $page_max,
'eccube.moveNaviPage', NAVI_PMAX);
$this->arrPagenavi = $objNavi->arrPagenavi;
@@ -177,7 +180,7 @@ public function action()
/**
* パラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -225,12 +228,12 @@ public function lfInitParam(&$objFormParam)
/**
* 入力内容のチェックを行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfCheckError(&$objFormParam)
{
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->arrErr = $objFormParam->checkError();
// 相関チェック
@@ -257,19 +260,19 @@ public function lfCheckError(&$objFormParam)
* クエリを構築する.
*
* 検索条件のキーに応じた WHERE 句と, クエリパラメーターを構築する.
- * クエリパラメーターは, SC_FormParam の入力値から取得する.
+ * クエリパラメーターは, FormParam の入力値から取得する.
*
* 構築内容は, 引数の $where 及び $arrValues にそれぞれ追加される.
*
* @param string $key 検索条件のキー
* @param string $where 構築する WHERE 句
* @param array $arrValues 構築するクエリパラメーター
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function buildQuery($key, &$where, &$arrValues, &$objFormParam)
{
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
switch ($key) {
case 'search_product_name':
$where .= ' AND EXISTS (SELECT 1 FROM dtb_order_detail od WHERE od.order_id = dtb_order.order_id AND od.product_name LIKE ?)';
@@ -295,7 +298,7 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam)
$tmp_where = '';
foreach ($objFormParam->getValue($key) as $element) {
if ($element != '') {
- if (SC_Utils_Ex::isBlank($tmp_where)) {
+ if (Utils::isBlank($tmp_where)) {
$tmp_where .= ' AND (order_sex = ?';
} else {
$tmp_where .= ' OR order_sex = ?';
@@ -304,14 +307,14 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam)
}
}
- if (!SC_Utils_Ex::isBlank($tmp_where)) {
+ if (!Utils::isBlank($tmp_where)) {
$tmp_where .= ')';
$where .= " $tmp_where ";
}
break;
case 'search_order_tel':
$where .= ' AND (' . $dbFactory->concatColumn(array('order_tel01', 'order_tel02', 'order_tel03')) . ' LIKE ?)';
- $arrValues[] = SC_SelectSql_Ex::addSearchStr(preg_replace('/[()-]+/', '', $objFormParam->getValue($key)));
+ $arrValues[] = SelectSql::addSearchStr(preg_replace('/[()-]+/', '', $objFormParam->getValue($key)));
break;
case 'search_order_email':
$where .= ' AND order_email LIKE ?';
@@ -330,7 +333,7 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam)
}
}
- if (!SC_Utils_Ex::isBlank($tmp_where)) {
+ if (!Utils::isBlank($tmp_where)) {
$tmp_where .= ')';
$where .= " $tmp_where ";
}
@@ -344,42 +347,42 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam)
$arrValues[] = sprintf('%d', $objFormParam->getValue($key));
break;
case 'search_sorderyear':
- $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_sorderyear'),
+ $date = Utils::sfGetTimestamp($objFormParam->getValue('search_sorderyear'),
$objFormParam->getValue('search_sordermonth'),
$objFormParam->getValue('search_sorderday'));
$where.= ' AND create_date >= ?';
$arrValues[] = $date;
break;
case 'search_eorderyear':
- $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_eorderyear'),
+ $date = Utils::sfGetTimestamp($objFormParam->getValue('search_eorderyear'),
$objFormParam->getValue('search_eordermonth'),
$objFormParam->getValue('search_eorderday'), true);
$where.= ' AND create_date <= ?';
$arrValues[] = $date;
break;
case 'search_supdateyear':
- $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_supdateyear'),
+ $date = Utils::sfGetTimestamp($objFormParam->getValue('search_supdateyear'),
$objFormParam->getValue('search_supdatemonth'),
$objFormParam->getValue('search_supdateday'));
$where.= ' AND update_date >= ?';
$arrValues[] = $date;
break;
case 'search_eupdateyear':
- $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_eupdateyear'),
+ $date = Utils::sfGetTimestamp($objFormParam->getValue('search_eupdateyear'),
$objFormParam->getValue('search_eupdatemonth'),
$objFormParam->getValue('search_eupdateday'), true);
$where.= ' AND update_date <= ?';
$arrValues[] = $date;
break;
case 'search_sbirthyear':
- $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_sbirthyear'),
+ $date = Utils::sfGetTimestamp($objFormParam->getValue('search_sbirthyear'),
$objFormParam->getValue('search_sbirthmonth'),
$objFormParam->getValue('search_sbirthday'));
$where.= ' AND order_birth >= ?';
$arrValues[] = $date;
break;
case 'search_ebirthyear':
- $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_ebirthyear'),
+ $date = Utils::sfGetTimestamp($objFormParam->getValue('search_ebirthyear'),
$objFormParam->getValue('search_ebirthmonth'),
$objFormParam->getValue('search_ebirthday'), true);
$where.= ' AND order_birth <= ?';
@@ -403,7 +406,7 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam)
*/
public function doDelete($where, $arrParam = array())
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$sqlval['del_flg'] = 1;
$sqlval['update_date'] = 'CURRENT_TIMESTAMP';
$objQuery->update('dtb_order', $sqlval, $where, $arrParam);
@@ -422,7 +425,7 @@ public function doDelete($where, $arrParam = array())
*/
public function doOutputCSV($where, $arrVal, $order)
{
- $objCSV = new SC_Helper_CSV_Ex();
+ $objCSV = new CsvHelper();
$objCSV->sfDownloadCsv('3', $where, $arrVal, $order, true);
}
@@ -435,7 +438,7 @@ public function doOutputCSV($where, $arrVal, $order)
*/
public function getNumberOfLines($where, $arrValues)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
return $objQuery->count('dtb_order', $where, $arrValues);
}
@@ -452,7 +455,7 @@ public function getNumberOfLines($where, $arrValues)
*/
public function findOrders($where, $arrValues, $limit, $offset, $order)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
if ($limit != 0) {
$objQuery->setLimitOffset($limit, $offset);
}
diff --git a/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php b/data/Eccube/Page/Admin/Order/Mail.php
similarity index 79%
rename from data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php
rename to data/Eccube/Page/Admin/Order/Mail.php
index 1bacfea8c7a..4bb589492f0 100644
--- a/data/class/pages/admin/order/LC_Page_Admin_Order_Mail.php
+++ b/data/Eccube/Page/Admin/Order/Mail.php
@@ -1,36 +1,32 @@
tpl_maintitle = '受注管理';
$this->tpl_subtitle = '受注管理';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrMAILTEMPLATE = $masterData->getMasterData('mtb_mail_template');
$this->httpCacheControl('nocache');
}
@@ -82,19 +78,19 @@ public function action()
$this->order_id_array = $post['order_id_array'];
} else {
//エラーで元に戻す
- SC_Response_Ex::sendRedirect(ADMIN_ORDER_URLPATH);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(ADMIN_ORDER_URLPATH);
+ Response::actionExit();
}
//メール本文の確認例は初めの1受注とする
- if (!SC_Utils_Ex::isBlank($this->order_id_array)) {
+ if (!Utils::isBlank($this->order_id_array)) {
$order_id_array = split(',', $this->order_id_array);
$post['order_id'] = intval($order_id_array[0]);
$this->order_id_count = count($order_id_array);
}
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター情報の初期化
$this->lfInitParam($objFormParam);
@@ -107,7 +103,7 @@ public function action()
$this->arrSearchHidden = $objFormParam->getSearchArray();
// 履歴を読み込むか
- $load_history = SC_Utils_Ex::sfIsInt($this->tpl_order_id);
+ $load_history = Utils::sfIsInt($this->tpl_order_id);
switch ($this->getMode()) {
case 'confirm':
@@ -122,8 +118,8 @@ public function action()
case 'send':
$sendStatus = $this->doSend($objFormParam);
if ($sendStatus === true) {
- SC_Response_Ex::sendRedirect(ADMIN_ORDER_URLPATH);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(ADMIN_ORDER_URLPATH);
+ Response::actionExit();
}
$this->arrErr = $sendStatus;
break;
@@ -153,7 +149,7 @@ public function action()
*/
public function getMailHistory($order_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = 'send_date, subject, template_id, send_id';
$where = 'order_id = ?';
$objQuery->setOrder('send_date DESC');
@@ -164,7 +160,7 @@ public function getMailHistory($order_id)
/**
*
* メールを送る。
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
*/
public function doSend(&$objFormParam)
{
@@ -175,14 +171,14 @@ public function doSend(&$objFormParam)
// 注文受付メール(複数受注ID対応)
$order_id_array = explode(',', $this->order_id_array);
foreach ($order_id_array as $order_id) {
- $objMail = new SC_Helper_Mail_Ex();
+ $objMail = new MailHelper();
$objSendMail = $objMail->sfSendOrderMail($order_id,
$objFormParam->getValue('template_id'),
$objFormParam->getValue('subject'),
$objFormParam->getValue('header'),
$objFormParam->getValue('footer'));
}
- // TODO $SC_SendMail から送信がちゃんと出来たか確認できたら素敵。
+ // TODO $SendMail から送信がちゃんと出来たか確認できたら素敵。
return true;
}
@@ -191,7 +187,7 @@ public function doSend(&$objFormParam)
/**
* 確認画面を表示する為の準備
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
*/
public function confirm(&$objFormParam)
{
@@ -199,7 +195,7 @@ public function confirm(&$objFormParam)
// メールの送信
if (count($arrErr) == 0) {
// 注文受付メール(送信なし)
- $objMail = new SC_Helper_Mail_Ex();
+ $objMail = new MailHelper();
$objSendMail = $objMail->sfSendOrderMail(
$objFormParam->getValue('order_id'),
$objFormParam->getValue('template_id'),
@@ -221,7 +217,7 @@ public function confirm(&$objFormParam)
/**
*
* テンプレートの文言をフォームに入れる。
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
*/
public function changeData(&$objFormParam)
{
@@ -231,8 +227,8 @@ public function changeData(&$objFormParam)
if (strlen($template_id) === 0) {
$mailTemplates = null;
// 有効選択時
- } elseif (SC_Utils_Ex::sfIsInt($template_id)) {
- $objMailtemplate = new SC_Helper_Mailtemplate_Ex();
+ } elseif (Utils::sfIsInt($template_id)) {
+ $objMailtemplate = new MailtemplateHelper();
$mailTemplates = $objMailtemplate->get($template_id);
// 不正選択時
} else {
@@ -252,7 +248,7 @@ public function changeData(&$objFormParam)
/**
* パラメーター情報の初期化
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfInitParam(&$objFormParam)
{
diff --git a/data/class/pages/admin/order/LC_Page_Admin_Order_MailView.php b/data/Eccube/Page/Admin/Order/MailView.php
similarity index 60%
rename from data/class/pages/admin/order/LC_Page_Admin_Order_MailView.php
rename to data/Eccube/Page/Admin/Order/MailView.php
index 447aaf2a469..efe94b79685 100644
--- a/data/class/pages/admin/order/LC_Page_Admin_Order_MailView.php
+++ b/data/Eccube/Page/Admin/Order/MailView.php
@@ -1,36 +1,28 @@
getMailHistory($send_id);
$this->tpl_subject = $mailHistory[0]['subject'];
$this->tpl_body = $mailHistory[0]['mail_body'];
@@ -79,7 +71,7 @@ public function action()
*/
public function getMailHistory($send_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = 'subject, mail_body';
$where = 'send_id = ?';
$mailHistory = $objQuery->select($col, 'dtb_mail_history', $where, array($send_id));
diff --git a/data/class/pages/admin/order/LC_Page_Admin_Order_Multiple.php b/data/Eccube/Page/Admin/Order/Multiple.php
similarity index 52%
rename from data/class/pages/admin/order/LC_Page_Admin_Order_Multiple.php
rename to data/Eccube/Page/Admin/Order/Multiple.php
index e96f9602a97..44c954ba65b 100644
--- a/data/class/pages/admin/order/LC_Page_Admin_Order_Multiple.php
+++ b/data/Eccube/Page/Admin/Order/Multiple.php
@@ -1,37 +1,26 @@
-
setStartYear(RELEASE_YEAR);
$this->arrYear = $objDate->getYear();
$this->arrMonth = $objDate->getMonth();
$this->arrDay = $objDate->getDay();
// パラメーター管理クラス
- $this->objFormParam = new SC_FormParam_Ex();
+ $this->objFormParam = new FormParam();
// パラメーター情報の初期化
$this->lfInitParam($this->objFormParam);
$this->objFormParam->setParam($_POST);
@@ -96,7 +93,7 @@ public function action()
$status = $this->createPdf($this->objFormParam);
if ($status === true) {
- SC_Response_Ex::actionExit();
+ Response::actionExit();
} else {
$this->arrErr = $status;
}
@@ -130,7 +127,7 @@ public function createFromValues($order_id, $pdf_order_id)
$arrForm['msg3'] = 'ご確認くださいますよう、お願いいたします。';
// 注文番号があったら、セットする
- if (SC_Utils_Ex::sfIsInt($order_id)) {
+ if (Utils::sfIsInt($order_id)) {
$arrForm['order_id'][0] = $order_id;
} elseif (is_array($pdf_order_id)) {
sort($pdf_order_id);
@@ -145,7 +142,7 @@ public function createFromValues($order_id, $pdf_order_id)
/**
*
* PDFの作成
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
*/
public function createPdf(&$objFormParam)
{
@@ -158,7 +155,7 @@ public function createPdf(&$objFormParam)
$this->arrForm = $arrRet;
// エラー入力なし
if (count($arrErr) == 0) {
- $objFpdf = new SC_Fpdf_Ex($arrRet['download'], $arrRet['title']);
+ $objFpdf = new Fpdf($arrRet['download'], $arrRet['title']);
foreach ($arrRet['order_id'] AS $key => $val) {
$arrPdfData = $arrRet;
$arrPdfData['order_id'] = $val;
@@ -174,8 +171,8 @@ public function createPdf(&$objFormParam)
/**
* パラメーター情報の初期化
- * @param SC_FormParam
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam
+ * @param FormParam $objFormParam
*/
public function lfInitParam(&$objFormParam)
{
@@ -198,8 +195,8 @@ public function lfInitParam(&$objFormParam)
/**
* 入力内容のチェック
- * @var SC_FormParam
- * @param SC_FormParam $objFormParam
+ * @var FormParam
+ * @param FormParam $objFormParam
*/
public function lfCheckError(&$objFormParam)
@@ -207,7 +204,7 @@ public function lfCheckError(&$objFormParam)
// 入力データを渡す。
$arrParams = $objFormParam->getHashArray();
$arrErr = $objFormParam->checkError();
- $objError = new SC_CheckError_Ex($arrParams);
+ $objError = new CheckError($arrParams);
$year = $objFormParam->getValue('year');
if (!is_numeric($year)) {
diff --git a/data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php b/data/Eccube/Page/Admin/Order/ProductSelect.php
similarity index 80%
rename from data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php
rename to data/Eccube/Page/Admin/Order/ProductSelect.php
index 4b8c6c21163..9748c28732c 100644
--- a/data/class/pages/admin/order/LC_Page_Admin_Order_ProductSelect.php
+++ b/data/Eccube/Page/Admin/Order/ProductSelect.php
@@ -1,36 +1,33 @@
tpl_maintitle = '受注管理';
$this->tpl_subtitle = '商品選択';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPRODUCTSTATUS_COLOR = $masterData->getMasterData('mtb_product_status_color');
}
@@ -68,8 +65,8 @@ public function process()
*/
public function action()
{
- $objDb = new SC_Helper_DB_Ex();
- $objFormParam = new SC_FormParam_Ex();
+ $objDb = new DbHelper();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$objFormParam->convParam();
@@ -79,17 +76,17 @@ public function action()
switch ($this->getMode()) {
case 'search':
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$this->arrForm = $objFormParam->getHashArray();
$wheres = $this->createWhere($objFormParam, $objDb);
$this->tpl_linemax = $this->getLineCount($wheres, $objProduct);
//ぶった斬りポイント==================================================================
// ページ送りの処理
- $page_max = SC_Utils_Ex::sfGetSearchPageMax($_POST['search_page_max']);
+ $page_max = Utils::sfGetSearchPageMax($_POST['search_page_max']);
// ページ送りの取得
- $objNavi = new SC_PageNavi_Ex($_POST['search_pageno'], $this->tpl_linemax, $page_max, 'eccube.moveSearchPage', NAVI_PMAX);
+ $objNavi = new PageNavi($_POST['search_pageno'], $this->tpl_linemax, $page_max, 'eccube.moveSearchPage', NAVI_PMAX);
$this->tpl_strnavi = $objNavi->strnavi; // 表示文字列
$startno = $objNavi->start_row;
$arrProduct_id = $this->getProducts($wheres, $objProduct, $page_max, $startno);
@@ -120,7 +117,7 @@ public function action()
}
// カテゴリ取得
- $this->arrCatList = $objDb->sfGetCategoryList();
+ $this->arrCatList = $objDb->getCategoryList();
$this->setTemplate($this->tpl_mainpage);
}
@@ -128,11 +125,11 @@ public function action()
* 商品取得
*
* @param array $arrProductId
- * @param SC_Product $objProduct
+ * @param Product $objProduct
*/
- public function getProductList($arrProductId, &$objProduct)
+ public function getProductList($arrProductId, Product &$objProduct)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// 表示順序
$order = 'update_date DESC, product_id DESC';
@@ -156,24 +153,24 @@ public function getFnOnload($arrProducts)
/**
* 規格クラス用JavaScript生成
- * @param SC_Product $objProduct
+ * @param Product $objProduct
*/
- public function getTplJavascript(&$objProduct)
+ public function getTplJavascript(Product &$objProduct)
{
- return 'eccube.productsClassCategories = ' . SC_Utils_Ex::jsonEncode($objProduct->classCategories) . '; ';
+ return 'eccube.productsClassCategories = ' . Utils::jsonEncode($objProduct->classCategories) . '; ';
}
/**
* 検索結果の取得
* @param array $whereAndBind string whereと array bindの連想配列
- * @param SC_Product $objProduct
+ * @param Product $objProduct
* @param integer $page_max
*/
- public function getProducts($whereAndBind, &$objProduct, $page_max, $startno)
+ public function getProducts($whereAndBind, Product &$objProduct, $page_max, $startno)
{
$where = $whereAndBind['where'];
$bind = $whereAndBind['bind'];
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setWhere($where);
// 取得範囲の指定(開始行番号、行数のセット)
$objQuery->setLimitOffset($page_max, $startno);
@@ -188,14 +185,14 @@ public function getProducts($whereAndBind, &$objProduct, $page_max, $startno)
*
* 検索結果対象となる商品の数を返す。
* @param array $whereAndBind
- * @param SC_Product $objProduct
+ * @param Product $objProduct
*/
public function getLineCount($whereAndBind, &$objProduct)
{
$where = $whereAndBind['where'];
$bind = $whereAndBind['bind'];
// 検索結果対象となる商品の数を取得
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setWhere($where);
$linemax = $objProduct->findProductCount($objQuery, $bind);
@@ -206,8 +203,8 @@ public function getLineCount($whereAndBind, &$objProduct)
*
* POSTされた値からSQLのWHEREとBINDを配列で返す。
* @return array ('where' => where string, 'bind' => databind array)
- * @param SC_FormParam $objFormParam
- * @param SC_Helper_DB_Ex $objDb
+ * @param FormParam $objFormParam
+ * @param DbHelper $objDb
*/
public function createWhere(&$objFormParam, &$objDb)
{
@@ -225,7 +222,7 @@ public function createWhere(&$objFormParam, &$objDb)
$bind[] = '%'.$val.'%';
break;
case 'search_category_id':
- list($tmp_where, $tmp_bind) = $objDb->sfGetCatWhere($val);
+ list($tmp_where, $tmp_bind) = $objDb->getCatWhere($val);
if ($tmp_where != '') {
$where.= ' AND alldtl.product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')';
$bind = array_merge((array) $bind, (array) $tmp_bind);
@@ -298,7 +295,7 @@ public function sortProducts($arrProduct_id, $productList)
/**
* パラメーター情報の初期化
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfInitParam(&$objFormParam)
{
diff --git a/data/class/pages/admin/order/LC_Page_Admin_Order_Status.php b/data/Eccube/Page/Admin/Order/Status.php
similarity index 77%
rename from data/class/pages/admin/order/LC_Page_Admin_Order_Status.php
rename to data/Eccube/Page/Admin/Order/Status.php
index 89cb78a85dd..be78c2c4c77 100644
--- a/data/class/pages/admin/order/LC_Page_Admin_Order_Status.php
+++ b/data/Eccube/Page/Admin/Order/Status.php
@@ -1,36 +1,33 @@
tpl_maintitle = '受注管理';
$this->tpl_subtitle = '対応状況管理';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
$this->arrORDERSTATUS_COLOR = $masterData->getMasterData('mtb_order_status_color');
}
@@ -69,10 +66,10 @@ public function process()
*/
public function action()
{
- $objDb = new SC_Helper_DB_Ex();
+ $objDb = new DbHelper();
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター情報の初期化
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -82,7 +79,7 @@ public function action()
$this->arrForm = $objFormParam->getHashArray();
//支払方法の取得
- $this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
+ $this->arrPayment = PaymentHelper::getIDValueList();
switch ($this->getMode()) {
case 'update':
@@ -116,8 +113,8 @@ public function action()
/**
* パラメーター情報の初期化
- * @param SC_FormParam
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam
+ * @param FormParam $objFormParam
*/
public function lfInitParam(&$objFormParam)
{
@@ -132,7 +129,7 @@ public function lfInitParam(&$objFormParam)
/**
* 入力内容のチェック
- * @param SC_FormParam
+ * @param FormParam
*/
public function lfCheckError(&$objFormParam)
{
@@ -147,7 +144,7 @@ public function lfCheckError(&$objFormParam)
// 対応状況一覧の表示
public function lfStatusDisp($status,$pageno)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$select ='*';
$from = 'dtb_order';
@@ -162,7 +159,7 @@ public function lfStatusDisp($status,$pageno)
$page_max = ORDER_STATUS_MAX;
// ページ送りの取得
- $objNavi = new SC_PageNavi_Ex($pageno, $linemax, $page_max, 'eccube.moveSearchPage', NAVI_PMAX);
+ $objNavi = new PageNavi($pageno, $linemax, $page_max, 'eccube.moveSearchPage', NAVI_PMAX);
$this->tpl_strnavi = $objNavi->strnavi; // 表示文字列
$startno = $objNavi->start_row;
@@ -183,13 +180,13 @@ public function lfStatusDisp($status,$pageno)
*/
public function lfStatusMove($statusId, $arrOrderId)
{
- $objPurchase = new SC_Helper_Purchase_Ex();
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objPurchase = new PurchaseHelper();
+ $objQuery = Query::getSingletonInstance();
if (!isset($arrOrderId) || !is_array($arrOrderId)) {
return false;
}
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$arrORDERSTATUS = $masterData->getMasterData('mtb_order_status');
$objQuery->begin();
@@ -210,13 +207,13 @@ public function lfStatusMove($statusId, $arrOrderId)
*/
public function lfDelete($arrOrderId)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
if (!isset($arrOrderId) || !is_array($arrOrderId)) {
return false;
}
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
foreach ($arrOrderId as $orderId) {
$objPurchase->cancelOrder($orderId, ORDER_CANCEL, true);
}
diff --git a/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore.php b/data/Eccube/Page/Admin/Ownersstore/Index.php
similarity index 90%
rename from data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore.php
rename to data/Eccube/Page/Admin/Ownersstore/Index.php
index 8c9336e1a9e..c9f23799839 100644
--- a/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore.php
+++ b/data/Eccube/Page/Admin/Ownersstore/Index.php
@@ -1,36 +1,35 @@
getMode();
// パラメーター情報の初期化
$this->initParam($objFormParam, $mode);
@@ -83,7 +82,7 @@ public function action()
$this->arrErr = $this->installPlugin($archive_file_name, 'plugin_file');
if ($this->isError($this->arrErr) === false) {
// コンパイルファイルのクリア処理
- SC_Utils_Ex::clearCompliedTemplate();
+ Utils::clearCompliedTemplate();
$this->tpl_onload = "alert('プラグインをインストールしました。');";
}
}
@@ -94,13 +93,13 @@ public function action()
$this->arrErr = $objFormParam->checkError();
if ($this->isError($this->arrErr) === false) {
$plugin_id = $objFormParam->getValue('plugin_id');
- $plugin = SC_Plugin_Util_Ex::getPluginByPluginId($plugin_id);
+ $plugin = PluginUtil::getPluginByPluginId($plugin_id);
$this->arrErr = $this->uninstallPlugin($plugin);
if ($this->isError($this->arrErr) === false) {
// TODO 全プラグインのインスタンスを保持したまま後続処理が実行されるので、全てのインスタンスを解放する。
- unset($GLOBALS['_SC_Helper_Plugin_instance']);
+ unset($GLOBALS['_PluginHelper_instance']);
// コンパイルファイルのクリア処理
- SC_Utils_Ex::clearCompliedTemplate();
+ Utils::clearCompliedTemplate();
$this->tpl_onload = "alert('" . $plugin['plugin_name'] ."を削除しました。');";
}
}
@@ -112,13 +111,13 @@ public function action()
if ($this->isError($this->arrErr) === false) {
$plugin_id = $objFormParam->getValue('plugin_id');
// プラグイン取得.
- $plugin = SC_Plugin_Util_Ex::getPluginByPluginId($plugin_id);
+ $plugin = PluginUtil::getPluginByPluginId($plugin_id);
$this->arrErr = $this->enablePlugin($plugin);
if ($this->isError($this->arrErr) === false) {
// TODO 全プラグインのインスタンスを保持したまま後続処理が実行されるので、全てのインスタンスを解放する。
- unset($GLOBALS['_SC_Helper_Plugin_instance']);
+ unset($GLOBALS['_PluginHelper_instance']);
// コンパイルファイルのクリア処理
- SC_Utils_Ex::clearCompliedTemplate();
+ Utils::clearCompliedTemplate();
$this->tpl_onload = "alert('" . $plugin['plugin_name'] . "を有効にしました。');";
}
}
@@ -130,13 +129,13 @@ public function action()
if ($this->isError($this->arrErr) === false) {
$plugin_id = $objFormParam->getValue('plugin_id');
// プラグイン取得.
- $plugin = SC_Plugin_Util_Ex::getPluginByPluginId($plugin_id);
+ $plugin = PluginUtil::getPluginByPluginId($plugin_id);
$this->arrErr = $this->disablePlugin($plugin);
if ($this->isError($this->arrErr) === false) {
// TODO 全プラグインのインスタンスを保持したまま後続処理が実行されるので、全てのインスタンスを解放する。
- unset($GLOBALS['_SC_Helper_Plugin_instance']);
+ unset($GLOBALS['_PluginHelper_instance']);
// コンパイルファイルのクリア処理
- SC_Utils_Ex::clearCompliedTemplate();
+ Utils::clearCompliedTemplate();
$this->tpl_onload = "alert('" . $plugin['plugin_name'] . "を無効にしました。');";
}
}
@@ -147,7 +146,7 @@ public function action()
$this->arrErr = $objFormParam->checkError();
if ($this->isError($this->arrErr) === false) {
$plugin_id = $objFormParam->getValue('plugin_id');
- $plugin = SC_Plugin_Util_Ex::getPluginByPluginId($plugin_id);
+ $plugin = PluginUtil::getPluginByPluginId($plugin_id);
$target_plugin_code = $plugin['plugin_code']; // アップデート対象のプラグインコード
$this->arrErr = $this->checkUploadFile($target_plugin_code);
@@ -155,11 +154,11 @@ public function action()
$update_plugin_file = $_FILES[$target_plugin_code];
$update_plugin_file_name = $update_plugin_file['name']; // アップデートファイルのファイル名.
// インストール処理.
- $target_plugin = SC_Plugin_Util_Ex::getPluginByPluginCode($target_plugin_code);
+ $target_plugin = PluginUtil::getPluginByPluginCode($target_plugin_code);
$this->arrErr = $this->updatePlugin($target_plugin, $update_plugin_file_name, $target_plugin_code);
if ($this->isError($this->arrErr) === false) {
// コンパイルファイルのクリア処理
- SC_Utils_Ex::clearCompliedTemplate();
+ Utils::clearCompliedTemplate();
$this->tpl_onload = "alert('プラグインをアップデートしました。');";
}
}
@@ -175,7 +174,7 @@ public function action()
$priority = $objFormParam->getValue('priority');
$this->updatePriority($plugin_id, $priority);
// コンパイルファイルのクリア処理
- SC_Utils_Ex::clearCompliedTemplate();
+ Utils::clearCompliedTemplate();
} else {
// エラーメッセージを詰め直す.
$this->arrErr['priority'][$plugin_id] = $arrErr['priority'];
@@ -186,7 +185,7 @@ public function action()
break;
}
// DBからプラグイン情報を取得
- $plugins = SC_Plugin_Util_Ex::getAllPlugin();
+ $plugins = PluginUtil::getAllPlugin();
foreach ($plugins as $key => $plugin) {
// ロゴファイルへのパスを生成(ロゴが無い場合はNO_IMAGEを表示)
@@ -201,7 +200,7 @@ public function action()
if ($plugins[$key]['enable'] === PLUGIN_ENABLE_TRUE) {
// 競合するプラグインがあるかを判定.
//$plugins[$key]['conflict_message']= $this->checkConflictPlugin($plugin['plugin_id']);
- $plugins[$key]['conflict_message'] = SC_Plugin_Util_Ex::checkConflictPlugin($plugin['plugin_id']);
+ $plugins[$key]['conflict_message'] = PluginUtil::checkConflictPlugin($plugin['plugin_id']);
}
}
$this->plugins = $plugins;
@@ -210,7 +209,7 @@ public function action()
/**
* パラメーター初期化.
*
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @param string $mode モード
* @return void
*/
@@ -226,7 +225,7 @@ public function initParam(&$objFormParam, $mode)
/**
* ファイルパラメーター初期化.
*
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileのインスタンス.
+ * @param UploadFile $objUpFile UploadFileのインスタンス.
* @param string $key 登録するキー.
* @return void
*/
@@ -243,7 +242,7 @@ public function initUploadFile(&$objUpFile, $key)
*/
public function checkUploadFile($file_key)
{
- $objErr = new SC_CheckError_Ex();
+ $objErr = new CheckError();
// 拡張子チェック
$objErr->doFunc(array('プラグインファイル', $file_key, explode(',', PLUGIN_EXTENSION)), array('FILE_EXT_CHECK'));
// ファイルサイズチェック
@@ -262,7 +261,7 @@ public function checkUploadFile($file_key)
*/
public function isInstalledPlugin($plugin_code)
{
- $plugin = SC_Plugin_Util_Ex::getPluginByPluginCode($plugin_code);
+ $plugin = PluginUtil::getPluginByPluginCode($plugin_code);
if (!empty($plugin)) {
return true;
}
@@ -339,13 +338,13 @@ public function getPluginFilePath($plugin_code , $plugin_class)
*/
public function installPlugin($archive_file_name, $key)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
// 一時展開ディレクトリにファイルがある場合は事前に削除.
- $arrFileHash = SC_Helper_FileManager_Ex::sfGetFileList(DOWNLOADS_TEMP_PLUGIN_INSTALL_DIR);
+ $arrFileHash = FileManagerHelper::sfGetFileList(DOWNLOADS_TEMP_PLUGIN_INSTALL_DIR);
if (count($arrFileHash) > 0) {
- SC_Helper_FileManager_Ex::deleteFile(DOWNLOADS_TEMP_PLUGIN_INSTALL_DIR, false);
+ FileManagerHelper::deleteFile(DOWNLOADS_TEMP_PLUGIN_INSTALL_DIR, false);
}
//シンタックスエラーがあるtar.gzをアップ後、削除するとたまにディレクトリが消えるので追加
@@ -353,7 +352,7 @@ public function installPlugin($archive_file_name, $key)
$arrErr = array();
// 必須拡張モジュールのチェック
- $arrErr = SC_Plugin_Util_Ex::checkExtension($key);
+ $arrErr = PluginUtil::checkExtension($key);
if ($this->isError($arrErr) === true) {
return $arrErr;
}
@@ -400,10 +399,10 @@ public function installPlugin($archive_file_name, $key)
// プラグイン保存ディレクトリを作成し、一時展開用ディレクトリから移動します.
$plugin_dir_path = $this->getPluginDir($arrPluginInfo['PLUGIN_CODE']);
$this->makeDir($plugin_dir_path);
- SC_Utils_Ex::copyDirectory(DOWNLOADS_TEMP_PLUGIN_INSTALL_DIR, $plugin_dir_path);
+ Utils::copyDirectory(DOWNLOADS_TEMP_PLUGIN_INSTALL_DIR, $plugin_dir_path);
// プラグイン情報を取得
- $plugin = SC_Plugin_Util_Ex::getPluginByPluginCode($arrPluginInfo['PLUGIN_CODE']);
+ $plugin = PluginUtil::getPluginByPluginCode($arrPluginInfo['PLUGIN_CODE']);
// クラスファイルを読み込み.
$plugin_class_file_path = $this->getPluginFilePath($plugin['plugin_code'], $plugin['class_name']);
@@ -429,7 +428,7 @@ public function installPlugin($archive_file_name, $key)
$objQuery->commit();
// 不要なファイルの削除
- SC_Helper_FileManager_Ex::deleteFile(DOWNLOADS_TEMP_PLUGIN_INSTALL_DIR, false);
+ FileManagerHelper::deleteFile(DOWNLOADS_TEMP_PLUGIN_INSTALL_DIR, false);
return $arrErr;
}
@@ -445,14 +444,14 @@ public function installPlugin($archive_file_name, $key)
public function rollBack($temp_dir, $plugin_id = '', $plugin_html_dir_path ='')
{
// 一時ディレクトリを削除.
- SC_Helper_FileManager_Ex::deleteFile($temp_dir, false);
+ FileManagerHelper::deleteFile($temp_dir, false);
// DBからプラグイン情報を削除
if (empty($plugin_id) === false) {
- SC_Plugin_Util_Ex::deletePluginByPluginId($plugin_id);
+ PluginUtil::deletePluginByPluginId($plugin_id);
}
// htmlディレクトリを削除
if (empty($plugin_html_dir_path) === false) {
- SC_Helper_FileManager_Ex::deleteFile($plugin_html_dir_path, true);
+ FileManagerHelper::deleteFile($plugin_html_dir_path, true);
}
}
@@ -549,7 +548,7 @@ public function checkPluginConstants(ReflectionClass $objReflection, $dir_path)
return $arrErr;
}
- $objErr = new SC_CheckError_Ex($arrPluginInfo);
+ $objErr = new CheckError($arrPluginInfo);
$objErr->doFunc(array('PLUGIN_CODE', 'PLUGIN_CODE', STEXT_LEN), array('MAX_LENGTH_CHECK','GRAPH_CHECK'));
$objErr->doFunc(array('PLUGIN_NAME', 'PLUGIN_NAME', STEXT_LEN), array('MAX_LENGTH_CHECK'));
$objErr->doFunc(array('CLASS_NAME', 'CLASS_NAME', STEXT_LEN), array('MAX_LENGTH_CHECK','GRAPH_CHECK'));
@@ -584,7 +583,7 @@ public function checkPluginConstants(ReflectionClass $objReflection, $dir_path)
public function updatePlugin($target_plugin, $upload_file_name)
{
// アップデート前に不要なファイルを消しておきます.
- SC_Helper_FileManager_Ex::deleteFile(DOWNLOADS_TEMP_PLUGIN_UPDATE_DIR, false);
+ FileManagerHelper::deleteFile(DOWNLOADS_TEMP_PLUGIN_UPDATE_DIR, false);
$arrErr = array();
@@ -628,7 +627,7 @@ public function updatePlugin($target_plugin, $upload_file_name)
}
// 保存ディレクトリの削除.
- SC_Helper_FileManager_Ex::deleteFile(DOWNLOADS_TEMP_PLUGIN_UPDATE_DIR, false);
+ FileManagerHelper::deleteFile(DOWNLOADS_TEMP_PLUGIN_UPDATE_DIR, false);
return $arrErr;
}
@@ -645,7 +644,7 @@ public function unpackPluginFile($unpack_file_name, $unpack_dir_path, $file_key)
{
$arrErr = array();
// 解凍ディレクトリディレクトリを作成し、一時ディレクトリからファイルを移動
- $objUpFile = new SC_UploadFile_Ex(PLUGIN_TEMP_REALDIR, $unpack_dir_path);
+ $objUpFile = new UploadFile(PLUGIN_TEMP_REALDIR, $unpack_dir_path);
$this->initUploadFile($objUpFile, $file_key);
$arrErr = $objUpFile->makeTempFile($file_key, false);
if ($this->isError($arrErr) === true) {
@@ -766,7 +765,7 @@ public function disablePlugin($plugin)
*/
public function updatePriority($plugin_id, $priority)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// UPDATEする値を作成する。
$sqlval['priority'] = $priority;
$sqlval['update_date'] = 'CURRENT_TIMESTAMP';
@@ -787,7 +786,7 @@ public function updatePriority($plugin_id, $priority)
public function registerData($arrPluginInfo, $mode = 'install')
{
// プラグイン情報をDB登録.
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arr_sqlval_plugin = array();
$arr_sqlval_plugin['plugin_name'] = $arrPluginInfo['PLUGIN_NAME'];
$arr_sqlval_plugin['plugin_code'] = $arrPluginInfo['PLUGIN_CODE'];
@@ -825,7 +824,7 @@ public function registerData($arrPluginInfo, $mode = 'install')
// 該当プラグインのフックポイントを一旦削除
$objQuery->delete('dtb_plugin_hookpoint', 'plugin_id = ? ', array($plugin_id));
} else {
- GC_Utils_Ex::gfPrintLog("モードの指定が不正($mode)", ERROR_LOG_REALFILE);
+ GcUtils::gfPrintLog("モードの指定が不正($mode)", ERROR_LOG_REALFILE);
return false;
}
@@ -896,7 +895,7 @@ public function requirePluginFile($file_path, $key)
*/
public function execPlugin($obj, $class_name, $exec_func)
{
- $objPluginInstaller = new SC_Plugin_Installer($exec_func, $obj);
+ $objPluginInstaller = new PluginInstaller($exec_func, $obj);
$arrErr = array();
if (method_exists($class_name, $exec_func) === true) {
@@ -933,7 +932,7 @@ public function unpackPluginArchive($path)
// 指定されたフォルダ内に解凍する
$result = $tar->extractModify($dir . '/', '');
- GC_Utils_Ex::gfPrintLog("解凍: $path -> $dir");
+ GcUtils::gfPrintLog("解凍: $path -> $dir");
// 解凍元のファイルを削除する.
unlink($path);
@@ -949,7 +948,7 @@ public function unpackPluginArchive($path)
*/
public function updatePluginEnable($plugin_id, $enable_flg)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// UPDATEする値を作成する。
$sqlval['enable'] = $enable_flg;
$sqlval['update_date'] = 'CURRENT_TIMESTAMP';
@@ -970,16 +969,16 @@ public function updatePluginEnable($plugin_id, $enable_flg)
public function deletePlugin($plugin_id, $plugin_code)
{
$arrErr = array();
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
- SC_Plugin_Util_Ex::deletePluginByPluginId($plugin_id);
+ PluginUtil::deletePluginByPluginId($plugin_id);
- if (SC_Helper_FileManager_Ex::deleteFile($this->getPluginDir($plugin_code)) === false) {
+ if (FileManagerHelper::deleteFile($this->getPluginDir($plugin_code)) === false) {
// TODO エラー処理
}
- if (SC_Helper_FileManager_Ex::deleteFile($this->getHtmlPluginDir($plugin_code)) === false) {
+ if (FileManagerHelper::deleteFile($this->getHtmlPluginDir($plugin_code)) === false) {
// TODO エラー処理
}
@@ -1054,7 +1053,7 @@ public function checkConflictPlugin($plugin_id)
$conflict_alert_message = '';
$arrConflictPluginName = array();
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
foreach ($hookPoints as $hookPoint) {
// 競合するプラグインを取得する,
$table = 'dtb_plugin_hookpoint AS T1 LEFT JOIN dtb_plugin AS T2 ON T1.plugin_id = T2.plugin_id';
@@ -1100,7 +1099,7 @@ public function isError($error)
*/
public function getHookPoint($plugin_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$table = 'dtb_plugin_hookpoint';
$where = 'plugin_id = ?';
diff --git a/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Log.php b/data/Eccube/Page/Admin/Ownersstore/Log.php
similarity index 69%
rename from data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Log.php
rename to data/Eccube/Page/Admin/Ownersstore/Log.php
index e3e507fbfb9..e663c3497bb 100644
--- a/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Log.php
+++ b/data/Eccube/Page/Admin/Ownersstore/Log.php
@@ -1,36 +1,29 @@
initParam();
if ($objForm->checkError()) {
- SC_Utils_Ex::sfDispError('');
+ Utils::sfDispError('');
}
$this->arrLogDetail = $this->getLogDetail($objForm->getValue('log_id'));
if (count($this->arrLogDetail) == 0) {
- SC_Utils_Ex::sfDispError('');
+ Utils::sfDispError('');
}
$this->tpl_mainpage = 'ownersstore/log_detail.tpl';
break;
@@ -99,7 +92,7 @@ public function getLogs()
) AS modules ON dtb_module_update_logs.module_id = modules.module_id
ORDER BY update_date DESC
END;
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrRet = $objQuery->getAll($sql);
return isset($arrRet) ? $arrRet : array();
@@ -107,7 +100,7 @@ public function getLogs()
public function initParam()
{
- $objForm = new SC_FormParam_Ex();
+ $objForm = new FormParam();
$objForm->addParam('log_id', 'log_id', INT_LEN, '', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK'));
$objForm->setParam($_GET);
@@ -130,7 +123,7 @@ public function getLogDetail($log_id)
WHERE
log_id = ?
END;
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrRet = $objQuery->getAll($sql, array($log_id));
return isset($arrRet[0]) ? $arrRet[0] : array();
diff --git a/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Module.php b/data/Eccube/Page/Admin/Ownersstore/Module.php
similarity index 53%
rename from data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Module.php
rename to data/Eccube/Page/Admin/Ownersstore/Module.php
index da1f3ca06e5..479d2888dda 100644
--- a/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Module.php
+++ b/data/Eccube/Page/Admin/Ownersstore/Module.php
@@ -1,36 +1,26 @@
initParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -89,18 +78,18 @@ public function action()
$arrPluginHookpointUse = $objFormParam->getValue('plugin_hookpoint_use');
$plugin_hookpoint_id = $objFormParam->getValue('plugin_hookpoint_id');
$use_flg = ($arrPluginHookpointUse[$plugin_hookpoint_id] == 1) ? 1 : 0;
- SC_Plugin_Util_Ex::setPluginHookPointChangeUse($plugin_hookpoint_id, $use_flg);
+ PluginUtil::setPluginHookPointChangeUse($plugin_hookpoint_id, $use_flg);
// Smartyコンパイルファイルをクリア
- SC_Utils_Ex::clearCompliedTemplate();
+ Utils::clearCompliedTemplate();
}
break;
default:
break;
}
// DBからプラグイン情報を取得
- $arrRet = SC_Plugin_Util_Ex::getPluginHookPointList();
+ $arrRet = PluginUtil::getPluginHookPointList();
// 競合チェック
- $this->arrConflict = SC_Plugin_Util_Ex::checkConflictPlugin();
+ $this->arrConflict = PluginUtil::checkConflictPlugin();
$arrHookPoint = array();
foreach ($arrRet AS $key => $val) {
$arrHookPoint[$val['hook_point']][$val['plugin_id']] = $val;
@@ -111,7 +100,7 @@ public function action()
/**
* パラメーター初期化.
*
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @return void
*/
public function initParam(&$objFormParam)
diff --git a/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Settings.php b/data/Eccube/Page/Admin/Ownersstore/Settings.php
similarity index 78%
rename from data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Settings.php
rename to data/Eccube/Page/Admin/Ownersstore/Settings.php
index 147162e9f6a..2c50e10ff12 100644
--- a/data/class/pages/admin/ownersstore/LC_Page_Admin_OwnersStore_Settings.php
+++ b/data/Eccube/Page/Admin/Ownersstore/Settings.php
@@ -1,38 +1,30 @@
addParam('認証キー', 'public_key', LTEXT_LEN, '', array('EXIST_CHECK', 'ALNUM_CHECK', 'MAX_LENGTH_CHECK'));
$objForm->setParam($_POST);
@@ -171,7 +163,7 @@ public function execDefaultMode()
public function registerOwnersStoreSettings($arrSettingsData)
{
$table = 'dtb_ownersstore_settings';
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$exists = $objQuery->exists($table);
if ($exists) {
@@ -192,7 +184,7 @@ public function getOwnersStoreSettings()
$table = 'dtb_ownersstore_settings';
$colmuns = '*';
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrRet = $objQuery->select($colmuns, $table);
if (isset($arrRet[0])) return $arrRet[0];
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php b/data/Eccube/Page/Admin/Products/Category.php
similarity index 84%
rename from data/class/pages/admin/products/LC_Page_Admin_Products_Category.php
rename to data/Eccube/Page/Admin/Products/Category.php
index 41d0d1a644a..3132f37dc3b 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_Category.php
+++ b/data/Eccube/Page/Admin/Products/Category.php
@@ -1,36 +1,33 @@
initParam($objFormParam);
@@ -100,7 +97,7 @@ public function action()
// DnDしたカテゴリと移動先のセットを分解する
$keys = explode('-', $_POST['keySet']);
if ($keys[0] && $keys[1]) {
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
// 移動したデータのrank、level、parent_category_idを取得
@@ -155,10 +152,10 @@ public function action()
// CSVダウンロード
case 'csv':
// CSVを送信する
- $objCSV = new SC_Helper_CSV_Ex();
+ $objCSV = new CsvHelper();
$objCSV->sfDownloadCsv('5', '', array(), '', true);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
break;
default:
break;
@@ -178,7 +175,7 @@ public function action()
$this->arrList = $objCategory->getTreeBranch($parent_category_id);
// ぱんくずの生成
$arrBread = $objCategory->getTreeTrail($this->arrForm['parent_category_id'], FALSE);
- $this->tpl_bread_crumbs = SC_Utils_Ex::jsonEncode(array_reverse($arrBread));
+ $this->tpl_bread_crumbs = Utils::jsonEncode(array_reverse($arrBread));
}
/**
@@ -191,12 +188,12 @@ public function action()
*
* カテゴリの削除は、物理削除で行う.
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return void
*/
public function doDelete(&$objFormParam)
{
- $objCategory = new SC_Helper_Category_Ex(false);
+ $objCategory = new CategoryHelper(false);
$category_id = $objFormParam->getValue('category_id');
// 子カテゴリのチェック
@@ -219,14 +216,14 @@ public function doDelete(&$objFormParam)
/**
* 編集対象のカテゴリ名を, 入力ボックスへ表示する.
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return void
*/
public function doPreEdit(&$objFormParam)
{
$category_id = $objFormParam->getValue('category_id');
- $objCategory = new SC_Helper_Category_Ex();
+ $objCategory = new CategoryHelper();
$arrRes = $objCategory->get($category_id);
$objFormParam->setParam($arrRes);
@@ -243,7 +240,7 @@ public function doPreEdit(&$objFormParam)
* - 階層登録数の上限を超える場合 (登録時のみ評価)
* - カテゴリ名がすでに使用されている場合 (登録時のみ評価)
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return void
*/
public function doEdit(&$objFormParam)
@@ -254,7 +251,7 @@ public function doEdit(&$objFormParam)
// エラーがない場合、追加・更新処理
if (empty($this->arrErr)) {
$arrCategory = $objFormParam->getDbArray();
- $objCategory = new SC_Helper_Category_Ex();
+ $objCategory = new CategoryHelper();
$objCategory->save($arrCategory);
// エラーがある場合、入力値の再表示
} else {
@@ -265,12 +262,12 @@ public function doEdit(&$objFormParam)
/**
* エラーチェック
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return array
*/
public function checkError(&$objFormParam)
{
- $objCategory = new SC_Helper_Category_Ex();
+ $objCategory = new CategoryHelper();
// 入力項目チェック
$arrErr = $objFormParam->checkError();
@@ -321,12 +318,12 @@ public function checkError(&$objFormParam)
/**
* カテゴリの表示順序を上へ移動する.
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return void
*/
public function doUp(&$objFormParam)
{
- $objCategory = new SC_Helper_Category_Ex(false);
+ $objCategory = new CategoryHelper(false);
$category_id = $objFormParam->getValue('category_id');
$objCategory->rankUp($category_id);
}
@@ -334,12 +331,12 @@ public function doUp(&$objFormParam)
/**
* カテゴリの表示順序を下へ移動する.
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return void
*/
public function doDown(&$objFormParam)
{
- $objCategory = new SC_Helper_Category_Ex(false);
+ $objCategory = new CategoryHelper(false);
$category_id = $objFormParam->getValue('category_id');
$objCategory->rankDown($category_id);
}
@@ -347,7 +344,7 @@ public function doDown(&$objFormParam)
/**
* パラメーターの初期化を行う
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return void
*/
public function initParam(&$objFormParam)
@@ -358,32 +355,32 @@ public function initParam(&$objFormParam)
}
/**
- * @param SC_Query $objQuery
+ * @param Query $objQuery
* @param string $table
* @param string $pid_name
* @param string $id_name
*/
public function lfCountChilds($objQuery, $table, $pid_name, $id_name, $id)
{
- $objDb = new SC_Helper_DB_Ex();
+ $objDb = new DbHelper();
// 子ID一覧を取得
- $arrRet = $objDb->sfGetChildrenArray($table, $pid_name, $id_name, $id);
+ $arrRet = $objDb->getChildrenArray($table, $pid_name, $id_name, $id);
return count($arrRet);
}
/**
- * @param SC_Query $objQuery
+ * @param Query $objQuery
* @param string $table
* @param string $pid_name
* @param string $id_name
*/
public function lfUpRankChilds($objQuery, $table, $pid_name, $id_name, $id, $count)
{
- $objDb = new SC_Helper_DB_Ex();
+ $objDb = new DbHelper();
// 子ID一覧を取得
- $arrRet = $objDb->sfGetChildrenArray($table, $pid_name, $id_name, $id);
- $line = SC_Utils_Ex::sfGetCommaList($arrRet);
+ $arrRet = $objDb->getChildrenArray($table, $pid_name, $id_name, $id);
+ $line = Utils::sfGetCommaList($arrRet);
$where = "$id_name IN ($line) AND del_flg = 0";
$arrRawVal = array(
'rank' => "(rank + $count)",
@@ -393,7 +390,7 @@ public function lfUpRankChilds($objQuery, $table, $pid_name, $id_name, $id, $cou
}
/**
- * @param SC_Query $objQuery
+ * @param Query $objQuery
* @param string $table
* @param string $pid_name
* @param string $id_name
@@ -401,10 +398,10 @@ public function lfUpRankChilds($objQuery, $table, $pid_name, $id_name, $id, $cou
*/
public function lfDownRankChilds($objQuery, $table, $pid_name, $id_name, $id, $count)
{
- $objDb = new SC_Helper_DB_Ex();
+ $objDb = new DbHelper();
// 子ID一覧を取得
- $arrRet = $objDb->sfGetChildrenArray($table, $pid_name, $id_name, $id);
- $line = SC_Utils_Ex::sfGetCommaList($arrRet);
+ $arrRet = $objDb->getChildrenArray($table, $pid_name, $id_name, $id);
+ $line = Utils::sfGetCommaList($arrRet);
$where = "$id_name IN ($line) AND del_flg = 0";
$arrRawVal = array(
'rank' => "(rank - $count)",
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_ClassCategory.php b/data/Eccube/Page/Admin/Products/ClassCategory.php
similarity index 78%
rename from data/class/pages/admin/products/LC_Page_Admin_Products_ClassCategory.php
rename to data/Eccube/Page/Admin/Products/ClassCategory.php
index 04cb1d758d2..823c7487569 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_ClassCategory.php
+++ b/data/Eccube/Page/Admin/Products/ClassCategory.php
@@ -1,36 +1,31 @@
lfInitParam($objFormParam);
$objFormParam->setParam($_REQUEST);
@@ -81,7 +76,7 @@ public function action()
$this->arrForm = $objFormParam->getHashArray();
// 入力パラメーターチェック
$this->arrErr = $this->lfCheckError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
//新規規格追加かどうかを判定する
$is_insert = $this->lfCheckInsert($classcategory_id);
if ($is_insert) {
@@ -93,7 +88,7 @@ public function action()
}
// 再表示
- SC_Response_Ex::reload();
+ Response::reload();
}
break;
// 削除
@@ -101,7 +96,7 @@ public function action()
// ランク付きレコードの削除
$this->lfDeleteClassCat($class_id, $classcategory_id);
- SC_Response_Ex::reload();
+ Response::reload();
break;
// 編集前処理
case 'pre_edit':
@@ -114,13 +109,13 @@ public function action()
//並び順を下げる
$this->lfDownRank($class_id, $classcategory_id);
- SC_Response_Ex::reload();
+ Response::reload();
break;
case 'up':
//並び順を上げる
$this->lfUpRank($class_id, $classcategory_id);
- SC_Response_Ex::reload();
+ Response::reload();
break;
default:
break;
@@ -136,7 +131,7 @@ public function action()
/**
* パラメーターの初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -154,7 +149,7 @@ public function lfInitParam(&$objFormParam)
*/
public function lfGetClassCat($class_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$where = 'del_flg <> 1 AND class_id = ?';
$objQuery->setOrder('rank DESC'); // XXX 降順
@@ -171,7 +166,7 @@ public function lfGetClassCat($class_id)
*/
public function lfGetClassName($class_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$where = 'class_id = ?';
$name = $objQuery->get('name', 'dtb_class', $where, array($class_id));
@@ -187,7 +182,7 @@ public function lfGetClassName($class_id)
*/
public function lfGetClassCatName($classcategory_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$where = 'classcategory_id = ?';
$name = $objQuery->get('name', 'dtb_classcategory', $where, array($classcategory_id));
@@ -202,12 +197,12 @@ public function lfGetClassCatName($classcategory_id)
*/
public function lfInsertClass($arrForm)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
// 親規格IDの存在チェック
$where = 'del_flg <> 1 AND class_id = ?';
$class_id = $objQuery->get('class_id', 'dtb_class', $where, array($arrForm['class_id']));
- if (!SC_Utils_Ex::isBlank($class_id)) {
+ if (!Utils::isBlank($class_id)) {
// INSERTする値を作成する。
$sqlval['name'] = $arrForm['name'];
$sqlval['class_id'] = $arrForm['class_id'];
@@ -232,7 +227,7 @@ public function lfInsertClass($arrForm)
*/
public function lfUpdateClass($arrForm)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// UPDATEする値を作成する。
$sqlval['name'] = $arrForm['name'];
$sqlval['update_date'] = 'CURRENT_TIMESTAMP';
@@ -246,16 +241,16 @@ public function lfUpdateClass($arrForm)
/**
* エラーチェック
*
- * @param SC_FormParam $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return array エラー配列
*/
public function lfCheckError(&$objFormParam)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrForm = $objFormParam->getHashArray();
// パラメーターの基本チェック
$arrErr = $objFormParam->checkError();
- if (!SC_Utils_Ex::isBlank($arrErr)) {
+ if (!Utils::isBlank($arrErr)) {
return $arrErr;
} else {
$arrForm = $objFormParam->getHashArray();
@@ -296,9 +291,9 @@ public function lfCheckInsert($classcategory_id)
*/
public function lfDeleteClassCat($class_id, $classcategory_id)
{
- $objDb = new SC_Helper_DB_Ex();
- $where = 'class_id = ' . SC_Utils_Ex::sfQuoteSmart($class_id);
- $objDb->sfDeleteRankRecord('dtb_classcategory', 'classcategory_id', $classcategory_id, $where, true);
+ $objDb = new DbHelper();
+ $where = 'class_id = ' . Utils::sfQuoteSmart($class_id);
+ $objDb->deleteRankRecord('dtb_classcategory', 'classcategory_id', $classcategory_id, $where, true);
}
/**
* 並び順を上げる
@@ -309,9 +304,9 @@ public function lfDeleteClassCat($class_id, $classcategory_id)
*/
public function lfUpRank($class_id, $classcategory_id)
{
- $objDb = new SC_Helper_DB_Ex();
- $where = 'class_id = ' . SC_Utils_Ex::sfQuoteSmart($class_id);
- $objDb->sfRankUp('dtb_classcategory', 'classcategory_id', $classcategory_id, $where);
+ $objDb = new DbHelper();
+ $where = 'class_id = ' . Utils::sfQuoteSmart($class_id);
+ $objDb->rankUp('dtb_classcategory', 'classcategory_id', $classcategory_id, $where);
}
/**
* 並び順を下げる
@@ -322,8 +317,8 @@ public function lfUpRank($class_id, $classcategory_id)
*/
public function lfDownRank($class_id, $classcategory_id)
{
- $objDb = new SC_Helper_DB_Ex();
- $where = 'class_id = ' . SC_Utils_Ex::sfQuoteSmart($class_id);
- $objDb->sfRankDown('dtb_classcategory', 'classcategory_id', $classcategory_id, $where);
+ $objDb = new DbHelper();
+ $where = 'class_id = ' . Utils::sfQuoteSmart($class_id);
+ $objDb->rankDown('dtb_classcategory', 'classcategory_id', $classcategory_id, $where);
}
}
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_Class.php b/data/Eccube/Page/Admin/Products/ClassList.php
similarity index 76%
rename from data/class/pages/admin/products/LC_Page_Admin_Products_Class.php
rename to data/Eccube/Page/Admin/Products/ClassList.php
index d19a643dc35..a014870de63 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_Class.php
+++ b/data/Eccube/Page/Admin/Products/ClassList.php
@@ -1,36 +1,31 @@
lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -80,7 +75,7 @@ public function action()
$this->arrForm = $objFormParam->getHashArray();
// 入力パラメーターチェック
$this->arrErr = $this->lfCheckError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
//新規規格追加かどうかを判定する
$is_insert = $this->lfCheckInsert($this->arrForm);
if ($is_insert) {
@@ -90,7 +85,7 @@ public function action()
}
// 再表示
- SC_Response_Ex::reload();
+ Response::reload();
}
break;
// 削除
@@ -99,7 +94,7 @@ public function action()
$this->lfDeleteClass($class_id);
// 再表示
- SC_Response_Ex::reload();
+ Response::reload();
break;
// 編集前処理
case 'pre_edit':
@@ -112,20 +107,20 @@ public function action()
$this->lfDownRank($class_id);
// 再表示
- SC_Response_Ex::reload();
+ Response::reload();
break;
case 'up':
$this->lfUpRank($class_id);
// 再表示
- SC_Response_Ex::reload();
+ Response::reload();
break;
default:
break;
}
// 規格の読込
$this->arrClass = $this->lfGetClass();
- $this->arrClassCatCount = SC_Utils_Ex::sfGetClassCatCount();
+ $this->arrClassCatCount = Utils::sfGetClassCatCount();
// POSTデータを引き継ぐ
$this->tpl_class_id = $class_id;
}
@@ -133,7 +128,7 @@ public function action()
/**
* パラメーターの初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -149,7 +144,7 @@ public function lfInitParam(&$objFormParam)
*/
public function lfGetClass()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$where = 'del_flg <> 1';
$objQuery->setOrder('rank DESC');
@@ -166,7 +161,7 @@ public function lfGetClass()
*/
public function lfGetClassName($class_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$where = 'class_id = ?';
$class_name = $objQuery->get('name', 'dtb_class', $where, array($class_id));
@@ -181,7 +176,7 @@ public function lfGetClassName($class_id)
*/
public function lfInsertClass($arrForm)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// INSERTする値を作成する。
$sqlval['name'] = $arrForm['name'];
$sqlval['creator_id'] = $_SESSION['member_id'];
@@ -203,7 +198,7 @@ public function lfInsertClass($arrForm)
*/
public function lfUpdateClass($arrForm)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// UPDATEする値を作成する。
$sqlval['name'] = $arrForm['name'];
$sqlval['update_date'] = 'CURRENT_TIMESTAMP';
@@ -222,10 +217,10 @@ public function lfUpdateClass($arrForm)
*/
public function lfDeleteClass($class_id)
{
- $objDb = new SC_Helper_DB_Ex();
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objDb = new DbHelper();
+ $objQuery = Query::getSingletonInstance();
- $ret = $objDb->sfDeleteRankRecord('dtb_class', 'class_id', $class_id, '', true);
+ $ret = $objDb->deleteRankRecord('dtb_class', 'class_id', $class_id, '', true);
$where= 'class_id = ?';
$objQuery->delete('dtb_classcategory', $where, array($class_id));
@@ -235,16 +230,16 @@ public function lfDeleteClass($class_id)
/**
* エラーチェック
*
- * @param SC_FormParam $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return array エラー配列
*/
public function lfCheckError(&$objFormParam)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrForm = $objFormParam->getHashArray();
// パラメーターの基本チェック
$arrErr = $objFormParam->checkError();
- if (!SC_Utils_Ex::isBlank($arrErr)) {
+ if (!Utils::isBlank($arrErr)) {
return $arrErr;
} else {
$arrForm = $objFormParam->getHashArray();
@@ -283,8 +278,8 @@ public function lfCheckInsert($arrForm)
*/
public function lfUpRank($class_id)
{
- $objDb = new SC_Helper_DB_Ex();
- $objDb->sfRankUp('dtb_class', 'class_id', $class_id);
+ $objDb = new DbHelper();
+ $objDb->rankUp('dtb_class', 'class_id', $class_id);
}
/**
* 並び順を下げる
@@ -294,7 +289,7 @@ public function lfUpRank($class_id)
*/
public function lfDownRank($class_id)
{
- $objDb = new SC_Helper_DB_Ex();
- $objDb->sfRankDown('dtb_class', 'class_id', $class_id);
+ $objDb = new DbHelper();
+ $objDb->rankDown('dtb_class', 'class_id', $class_id);
}
}
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products.php b/data/Eccube/Page/Admin/Products/Index.php
similarity index 82%
rename from data/class/pages/admin/products/LC_Page_Admin_Products.php
rename to data/Eccube/Page/Admin/Products/Index.php
index 6e9ce4bdd0d..d609e8205b3 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products.php
+++ b/data/Eccube/Page/Admin/Products/Index.php
@@ -1,36 +1,39 @@
tpl_maintitle = '商品管理';
$this->tpl_subtitle = '商品マスター';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPageMax = $masterData->getMasterData('mtb_page_max');
$this->arrDISP = $masterData->getMasterData('mtb_disp');
$this->arrSTATUS = $masterData->getMasterData('mtb_status');
$this->arrPRODUCTSTATUS_COLOR = $masterData->getMasterData('mtb_product_status_color');
- $objDate = new SC_Date_Ex();
+ $objDate = new Date();
// 登録・更新検索開始年
$objDate->setStartYear(RELEASE_YEAR);
$objDate->setEndYear(DATE('Y'));
@@ -86,10 +89,10 @@ public function process()
*/
public function action()
{
- $objDb = new SC_Helper_DB_Ex();
- $objFormParam = new SC_FormParam_Ex();
- $objProduct = new SC_Product_Ex();
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objDb = new DbHelper();
+ $objFormParam = new FormParam();
+ $objProduct = new Product();
+ $objQuery = Query::getSingletonInstance();
// パラメーター情報の初期化
$this->lfInitParam($objFormParam);
@@ -102,8 +105,8 @@ public function action()
// 商品、子テーブル(商品規格)、会員お気に入り商品の削除
$this->doDelete('product_id = ?', array($objFormParam->getValue('product_id')));
// 件数カウントバッチ実行
- $objDb->sfCountCategory($objQuery);
- $objDb->sfCountMaker($objQuery);
+ $objDb->countCategory($objQuery);
+ $objDb->countMaker($objQuery);
// 削除後に検索結果を表示するため breakしない
// 検索パラメーター生成後に処理実行するため breakしない
@@ -134,10 +137,10 @@ public function action()
switch ($this->getMode()) {
// CSVを送信する。
case 'csv':
- $objCSV = new SC_Helper_CSV_Ex();
+ $objCSV = new CsvHelper();
// CSVを送信する。正常終了の場合、終了。
$objCSV->sfDownloadCsv(1, $where, $arrWhereVal, $order, true);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
// 全件削除(ADMIN_MODE)
case 'delete_all':
@@ -149,9 +152,9 @@ public function action()
// 行数の取得
$this->tpl_linemax = $this->getNumberOfLines($where, $arrWhereVal);
// ページ送りの処理
- $page_max = SC_Utils_Ex::sfGetSearchPageMax($objFormParam->getValue('search_page_max'));
+ $page_max = Utils::sfGetSearchPageMax($objFormParam->getValue('search_page_max'));
// ページ送りの取得
- $objNavi = new SC_PageNavi_Ex($this->arrHidden['search_pageno'],
+ $objNavi = new PageNavi($this->arrHidden['search_pageno'],
$this->tpl_linemax, $page_max,
'eccube.moveNaviPage', NAVI_PMAX);
$this->arrPagenavi = $objNavi->arrPagenavi;
@@ -173,14 +176,14 @@ public function action()
}
// カテゴリの読込
- list($this->arrCatKey, $this->arrCatVal) = $objDb->sfGetLevelCatList(false);
+ list($this->arrCatKey, $this->arrCatVal) = $objDb->getLevelCatList(false);
$this->arrCatList = $this->lfGetIDName($this->arrCatKey, $this->arrCatVal);
}
/**
* パラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -211,12 +214,12 @@ public function lfInitParam(&$objFormParam)
/**
* 入力内容のチェックを行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfCheckError(&$objFormParam)
{
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->arrErr = $objFormParam->checkError();
$objErr->doFunc(array('開始日', '終了日', 'search_startyear', 'search_startmonth', 'search_startday', 'search_endyear', 'search_endmonth', 'search_endday'), array('CHECK_SET_TERM'));
@@ -246,7 +249,7 @@ public function lfGetIDName($arrCatKey, $arrCatVal)
*/
public function doDelete($where, $arrParam = array())
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$product_ids = $objQuery->getCol('product_id', "dtb_products", $where, $arrParam);
$sqlval['del_flg'] = 1;
@@ -255,7 +258,7 @@ public function doDelete($where, $arrParam = array())
$objQuery->update('dtb_products_class', $sqlval, "product_id IN (SELECT product_id FROM dtb_products WHERE $where)", $arrParam);
$objQuery->delete('dtb_customer_favorite_products', "product_id IN (SELECT product_id FROM dtb_products WHERE $where)", $arrParam);
- $objRecommend = new SC_Helper_BestProducts_Ex();
+ $objRecommend = new BestProductsHelper();
$objRecommend->deleteByProductIDs($product_ids);
$objQuery->update('dtb_products', $sqlval, $where, $arrParam);
@@ -266,20 +269,20 @@ public function doDelete($where, $arrParam = array())
* クエリを構築する.
*
* 検索条件のキーに応じた WHERE 句と, クエリパラメーターを構築する.
- * クエリパラメーターは, SC_FormParam の入力値から取得する.
+ * クエリパラメーターは, FormParam の入力値から取得する.
*
* 構築内容は, 引数の $where 及び $arrValues にそれぞれ追加される.
*
* @param string $key 検索条件のキー
* @param string $where 構築する WHERE 句
* @param array $arrValues 構築するクエリパラメーター
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @param SC_FormParam $objDb SC_Helper_DB_Ex インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
+ * @param FormParam $objDb DbHelper インスタンス
* @return void
*/
public function buildQuery($key, &$where, &$arrValues, &$objFormParam, &$objDb)
{
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
switch ($key) {
// 商品ID
case 'search_product_id':
@@ -298,7 +301,7 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam, &$objDb)
break;
// カテゴリ
case 'search_category_id':
- list($tmp_where, $tmp_Values) = $objDb->sfGetCatWhere($objFormParam->getValue($key));
+ list($tmp_where, $tmp_Values) = $objDb->getCatWhere($objFormParam->getValue($key));
if ($tmp_where != '') {
$where.= ' AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')';
$arrValues = array_merge((array) $arrValues, (array) $tmp_Values);
@@ -309,7 +312,7 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam, &$objDb)
$tmp_where = '';
foreach ($objFormParam->getValue($key) as $element) {
if ($element != '') {
- if (SC_Utils_Ex::isBlank($tmp_where)) {
+ if (Utils::isBlank($tmp_where)) {
$tmp_where .= ' AND (status = ?';
} else {
$tmp_where .= ' OR status = ?';
@@ -318,14 +321,14 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam, &$objDb)
}
}
- if (!SC_Utils_Ex::isBlank($tmp_where)) {
+ if (!Utils::isBlank($tmp_where)) {
$tmp_where .= ')';
$where .= " $tmp_where ";
}
break;
// 登録・更新日(開始)
case 'search_startyear':
- $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_startyear'),
+ $date = Utils::sfGetTimestamp($objFormParam->getValue('search_startyear'),
$objFormParam->getValue('search_startmonth'),
$objFormParam->getValue('search_startday'));
$where.= ' AND update_date >= ?';
@@ -333,7 +336,7 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam, &$objDb)
break;
// 登録・更新日(終了)
case 'search_endyear':
- $date = SC_Utils_Ex::sfGetTimestamp($objFormParam->getValue('search_endyear'),
+ $date = Utils::sfGetTimestamp($objFormParam->getValue('search_endyear'),
$objFormParam->getValue('search_endmonth'),
$objFormParam->getValue('search_endday'), true);
$where.= ' AND update_date <= ?';
@@ -346,7 +349,7 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam, &$objDb)
if ($count >= 1) {
$where .= ' '
. 'AND product_id IN ('
- . ' SELECT product_id FROM dtb_product_status WHERE product_status_id IN (' . SC_Utils_Ex::repeatStrWithSeparator('?', $count) . ')'
+ . ' SELECT product_id FROM dtb_product_status WHERE product_status_id IN (' . Utils::repeatStrWithSeparator('?', $count) . ')'
. ')';
$arrValues = array_merge($arrValues, $arrPartVal);
}
@@ -365,7 +368,7 @@ public function buildQuery($key, &$where, &$arrValues, &$objFormParam, &$objDb)
*/
public function getNumberOfLines($where, $arrValues)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
return $objQuery->count('dtb_products', $where, $arrValues);
}
@@ -378,12 +381,12 @@ public function getNumberOfLines($where, $arrValues)
* @param integer $limit 表示件数
* @param integer $offset 開始件数
* @param string $order 検索結果の並び順
- * @param SC_Product $objProduct SC_Product インスタンス
+ * @param Product $objProduct Product インスタンス
* @return array 商品の検索結果
*/
- public function findProducts($where, $arrValues, $limit, $offset, $order, &$objProduct)
+ public function findProducts($where, $arrValues, $limit, $offset, $order, Product &$objProduct)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// 読み込む列とテーブルの指定
$col = 'product_id, name, main_list_image, status, product_code_min, product_code_max, price02_min, price02_max, stock_min, stock_max, stock_unlimited_min, stock_unlimited_max, update_date';
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_Maker.php b/data/Eccube/Page/Admin/Products/Maker.php
similarity index 74%
rename from data/class/pages/admin/products/LC_Page_Admin_Products_Maker.php
rename to data/Eccube/Page/Admin/Products/Maker.php
index 061b32be9b4..713110e1783 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_Maker.php
+++ b/data/Eccube/Page/Admin/Products/Maker.php
@@ -1,36 +1,30 @@
lfInitParam($objFormParam);
@@ -86,7 +80,7 @@ public function action()
case 'edit':
// エラーチェック
$this->arrErr = $this->lfCheckError($objFormParam, $objMaker);
- if (!SC_Utils_Ex::isBlank($this->arrErr['maker_id'])) {
+ if (!Utils::isBlank($this->arrErr['maker_id'])) {
trigger_error('', E_USER_ERROR);
return;
@@ -100,7 +94,7 @@ public function action()
if ($res_maker_id !== FALSE) {
// 完了メッセージ
$this->tpl_onload = "alert('登録が完了しました。');";
- SC_Response_Ex::reload();
+ Response::reload();
} else {
$this->arrErr['maker_id'] = '登録に失敗しました。';
}
@@ -121,14 +115,14 @@ public function action()
$objMaker->rankUp($maker_id);
// リロード
- SC_Response_Ex::reload();
+ Response::reload();
break;
case 'down':
$objMaker->rankDown($maker_id);
// リロード
- SC_Response_Ex::reload();
+ Response::reload();
break;
// 削除
@@ -136,7 +130,7 @@ public function action()
$objMaker->delete($maker_id);
// リロード
- SC_Response_Ex::reload();
+ Response::reload();
break;
default:
@@ -152,7 +146,7 @@ public function action()
/**
* パラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -166,10 +160,10 @@ public function lfInitParam(&$objFormParam)
*
* @param integer $maker_id
* @param array $sqlval
- * @param SC_Helper_Maker_Ex $objMaker
+ * @param MakerHelper $objMaker
* @return multiple
*/
- public function doRegist($maker_id, $sqlval, SC_Helper_Maker_Ex $objMaker)
+ public function doRegist($maker_id, $sqlval, MakerHelper $objMaker)
{
$sqlval['maker_id'] = $maker_id;
$sqlval['creator_id'] = $_SESSION['member_id'];
@@ -180,18 +174,18 @@ public function doRegist($maker_id, $sqlval, SC_Helper_Maker_Ex $objMaker)
/**
* 入力エラーチェック.
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return array $objErr->arrErr エラー内容
*/
- public function lfCheckError(&$objFormParam, SC_Helper_Maker_Ex &$objMaker)
+ public function lfCheckError(&$objFormParam, MakerHelper &$objMaker)
{
$arrErr = $objFormParam->checkError();
$arrForm = $objFormParam->getHashArray();
// maker_id の正当性チェック
if (!empty($arrForm['maker_id'])) {
- if (!SC_Utils_Ex::sfIsInt($arrForm['maker_id'])
- || SC_Utils_Ex::sfIsZeroFilling($arrForm['maker_id'])
+ if (!Utils::sfIsInt($arrForm['maker_id'])
+ || Utils::sfIsZeroFilling($arrForm['maker_id'])
|| !$objMaker->getMaker($arrForm['maker_id'])
) {
// maker_idが指定されていて、且つその値が不正と思われる場合はエラー
@@ -203,7 +197,7 @@ public function lfCheckError(&$objFormParam, SC_Helper_Maker_Ex &$objMaker)
// 編集中のレコード以外に同じ名称が存在する場合
if (
- !SC_Utils_Ex::isBlank($arrMaker)
+ !Utils::isBlank($arrMaker)
&& $arrMaker['maker_id'] != $arrForm['maker_id']
&& $arrMaker['name'] == $arrForm['name']
) {
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php b/data/Eccube/Page/Admin/Products/ProductClass.php
similarity index 84%
rename from data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php
rename to data/Eccube/Page/Admin/Products/ProductClass.php
index b7875dc02e4..e96c26fc3cc 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_ProductClass.php
+++ b/data/Eccube/Page/Admin/Products/ProductClass.php
@@ -1,36 +1,36 @@
tpl_subno = 'product';
$this->tpl_maintitle = '商品管理';
$this->tpl_subtitle = '商品登録(商品規格)';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrProductType = $masterData->getMasterData('mtb_product_type');
// 規格プルダウンのリスト
$this->arrClass = $this->getAllClass();
@@ -70,7 +70,7 @@ public function process()
public function action()
{
// 商品マスターの検索条件パラメーターを初期化
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->initParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -84,7 +84,7 @@ public function action()
$this->arrErr = $this->lfCheckProductsClass($objFormParam);
// エラーの無い場合は確認画面を表示
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->tpl_mainpage = 'products/product_class_confirm.tpl';
$this->doDisp($objFormParam);
$this->fillCheckboxesValue('stock_unlimited', $_POST['total']);
@@ -113,7 +113,7 @@ public function action()
// 「表示する」ボタン押下時
case 'disp':
$this->arrErr = $this->lfCheckSelectClass();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->doDisp($objFormParam);
$this->initDispParam($objFormParam);
}
@@ -157,7 +157,7 @@ public function action()
/**
* パラメーター初期化
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function initParam(&$objFormParam)
@@ -216,8 +216,8 @@ public function initParam(&$objFormParam)
*/
public function registerProductClass($arrList, $product_id, $total)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
- $objDb = new SC_Helper_DB_Ex();
+ $objQuery = Query::getSingletonInstance();
+ $objDb = new DbHelper();
$objQuery->begin();
@@ -233,8 +233,8 @@ public function registerProductClass($arrList, $product_id, $total)
$objQuery->delete('dtb_products_class', 'product_id = ? AND (classcategory_id1 <> 0 OR classcategory_id2 <> 0)', array($product_id));
for ($i = 0; $i < $total; $i++) {
- $del_flg = SC_Utils_Ex::isBlank($arrList['check'][$i]) ? 1 : 0;
- $price02 = SC_Utils_Ex::isBlank($arrList['price02'][$i]) ? 0 : $arrList['price02'][$i];
+ $del_flg = Utils::isBlank($arrList['check'][$i]) ? 1 : 0;
+ $price02 = Utils::isBlank($arrList['price02'][$i]) ? 0 : $arrList['price02'][$i];
// dtb_products_class 登録/更新用
$registerKeys = array(
'classcategory_id1', 'classcategory_id2',
@@ -265,7 +265,7 @@ public function registerProductClass($arrList, $product_id, $total)
$arrPC['create_date'] = 'CURRENT_TIMESTAMP';
// 更新の場合は, product_class_id を使い回す
- if (!SC_Utils_Ex::isBlank($arrList['product_class_id'][$i])) {
+ if (!Utils::isBlank($arrList['product_class_id'][$i])) {
$arrPC['product_class_id'] = $arrList['product_class_id'][$i];
} else {
$arrPC['product_class_id'] = $objQuery->nextVal('dtb_products_class_product_class_id');
@@ -274,13 +274,13 @@ public function registerProductClass($arrList, $product_id, $total)
/*
* チェックを入れない商品は product_type_id が NULL になるので, 0 を入れる
*/
- $arrPC['product_type_id'] = SC_Utils_Ex::isBlank($arrPC['product_type_id']) ? 0 : $arrPC['product_type_id'];
+ $arrPC['product_type_id'] = Utils::isBlank($arrPC['product_type_id']) ? 0 : $arrPC['product_type_id'];
$objQuery->insert('dtb_products_class', $arrPC);
// 税情報登録/更新
if (OPTION_PRODUCT_TAX_RULE) {
- SC_Helper_TaxRule_Ex::setTaxRuleForProduct($arrList['tax_rate'][$i], $arrPC['product_id'], $arrPC['product_class_id']);
+ TaxRuleHelper::setTaxRuleForProduct($arrList['tax_rate'][$i], $arrPC['product_id'], $arrPC['product_class_id']);
}
}
@@ -292,20 +292,20 @@ public function registerProductClass($arrList, $product_id, $total)
array($product_id));
// 件数カウントバッチ実行
- $objDb->sfCountCategory($objQuery);
+ $objDb->countCategory($objQuery);
$objQuery->commit();
}
/**
* 規格選択エラーチェックを行う
*
- * ※SC_FormParamで対応していないエラーチェックのため, SC_CheckErrorを使用している.
+ * ※FormParamで対応していないエラーチェックのため, CheckErrorを使用している.
*
* @return array エラーの配列
*/
public function lfCheckSelectClass()
{
- $objErr = new SC_CheckError_Ex();
+ $objErr = new CheckError();
$objErr->doFunc(array('規格1', 'class_id1'), array('EXIST_CHECK'));
$objErr->doFunc(array('規格', 'class_id1', 'select_class_id2'), array('TOP_EXIST_CHECK'));
$objErr->doFunc(array('規格1', '規格2', 'class_id1', 'class_id2'), array('DIFFERENT_CHECK'));
@@ -316,7 +316,7 @@ public function lfCheckSelectClass()
/**
* 商品規格エラーチェック.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return array エラー結果の配列
*/
public function lfCheckProductsClass(&$objFormParam)
@@ -325,60 +325,60 @@ public function lfCheckProductsClass(&$objFormParam)
$arrErr = $objFormParam->checkError();
$total = $objFormParam->getValue('total');
- if (SC_Utils_Ex::isBlank($arrValues['check'])) {
+ if (Utils::isBlank($arrValues['check'])) {
$arrErr['check_empty'] = '※ 規格が選択されていません。
';
}
for ($i = 0; $i < $total; $i++) {
/*
* チェックボックスの入っている項目のみ, 必須チェックを行う.
- * エラーを配列で返す必要があるため, SC_CheckError を使用しない.
+ * エラーを配列で返す必要があるため, CheckError を使用しない.
*/
- if (!SC_Utils_Ex::isBlank($arrValues['check'][$i])) {
+ if (!Utils::isBlank($arrValues['check'][$i])) {
/*
* 販売価格の必須チェック
*/
- if (SC_Utils_Ex::isBlank($arrValues['price02'][$i])) {
+ if (Utils::isBlank($arrValues['price02'][$i])) {
$arrErr['price02'][$i] = '※ ' . SALE_PRICE_TITLE . 'が入力されていません。
';
}
/*
* 在庫数の必須チェック
*/
- if ((SC_Utils_Ex::isBlank($arrValues['stock_unlimited'][$i]) || $arrValues['stock_unlimited'][$i] != 1)
- && SC_Utils_Ex::isBlank($arrValues['stock'][$i])
+ if ((Utils::isBlank($arrValues['stock_unlimited'][$i]) || $arrValues['stock_unlimited'][$i] != 1)
+ && Utils::isBlank($arrValues['stock'][$i])
) {
$arrErr['stock'][$i] = '※ 在庫数が入力されていません。
';
}
/*
* 消費税率の必須チェック
*/
- if (OPTION_PRODUCT_TAX_RULE && SC_Utils_Ex::isBlank($arrValues['tax_rate'][$i])) {
+ if (OPTION_PRODUCT_TAX_RULE && Utils::isBlank($arrValues['tax_rate'][$i])) {
$arrErr['tax_rate'][$i] = '※ 消費税率が入力されていません。
';
}
/*
* 商品種別の必須チェック
*/
- if (SC_Utils_Ex::isBlank($arrValues['product_type_id'][$i])) {
+ if (Utils::isBlank($arrValues['product_type_id'][$i])) {
$arrErr['product_type_id'][$i] = '※ 商品種別は、いずれかを選択してください。
';
}
/*
* ダウンロード商品の必須チェック
*/
if ($arrValues['product_type_id'][$i] == PRODUCT_TYPE_DOWNLOAD) {
- if (SC_Utils_Ex::isBlank($arrValues['down_filename'][$i])) {
+ if (Utils::isBlank($arrValues['down_filename'][$i])) {
$arrErr['down_filename'][$i] = '※ ダウンロード商品の場合はダウンロードファイル名を入力してください。
';
}
- if (SC_Utils_Ex::isBlank($arrValues['down_realfilename'][$i])) {
+ if (Utils::isBlank($arrValues['down_realfilename'][$i])) {
$arrErr['down_realfilename'][$i] = '※ ダウンロード商品の場合はダウンロード商品用ファイルをアップロードしてください。
';
}
/*
* 通常商品チェック
*/
} elseif ($arrValues['product_type_id'][$i] != PRODUCT_TYPE_DOWNLOAD) {
- if (!SC_Utils_Ex::isBlank($arrValues['down_filename'][$i])) {
+ if (!Utils::isBlank($arrValues['down_filename'][$i])) {
$arrErr['down_filename'][$i] = '※ ダウンロード商品ではない場合、ダウンロードファイル名を設定できません。
';
}
- if (!SC_Utils_Ex::isBlank($arrValues['down_realfilename'][$i])) {
+ if (!Utils::isBlank($arrValues['down_realfilename'][$i])) {
$arrErr['down_realfilename'][$i] = '※ ダウンロード商品ではない場合、ダウンロード商品用ファイルをアップロードできません。
ファイルを取り消してください。
';
}
}
@@ -394,7 +394,7 @@ public function lfCheckProductsClass(&$objFormParam)
* 規格1, 規格2における規格分類の全ての組み合わせを取得し,
* 該当商品の商品規格の内容を取得後, フォームに設定する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function doDisp(&$objFormParam)
@@ -407,7 +407,7 @@ public function doDisp(&$objFormParam)
$arrClassCat = $this->getAllClassCategory($class_id1, $class_id2);
$total = count($arrClassCat);
$objFormParam->setValue('total', $total);
- $objFormParam->setParam(SC_Utils_Ex::sfSwapArray($arrClassCat));
+ $objFormParam->setParam(Utils::sfSwapArray($arrClassCat));
// class_id1, class_id2 を, 入力値で上書き
$objFormParam->setValue('class_id1', $class_id1);
@@ -431,7 +431,7 @@ public function doDisp(&$objFormParam)
/**
* 「表示する」ボタンをクリックされたときのパラメーター初期化処理
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function initDispParam(&$objFormParam)
@@ -441,7 +441,7 @@ public function initDispParam(&$objFormParam)
// 規格2が選択されていない場合、規格2名称初期化
$class_id2 = $objFormParam->getValue('class_id2');
- if (SC_Utils_Ex::isBlank($class_id2) == true) {
+ if (Utils::isBlank($class_id2) == true) {
$objFormParam->setValue('classcategory_name2', '');
}
}
@@ -449,12 +449,12 @@ public function initDispParam(&$objFormParam)
/**
* 規格編集画面を表示する
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
*/
public function doPreEdit(&$objFormParam)
{
$product_id = $objFormParam->getValue('product_id');
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$existsProductsClass = $objProduct->getProductsClassFullByProductId($product_id);
// 規格のデフォルト値(全ての組み合わせ)を取得し, フォームに反映
@@ -491,7 +491,7 @@ public function doPreEdit(&$objFormParam)
foreach ($arrClassCatKey as $arrC1) {
foreach ($arrC1 as $arrValues) {
$arrValues['del_flg'] = (string) $arrValues['del_flg'];
- if (SC_Utils_Ex::isBlank($arrValues['del_flg'])
+ if (Utils::isBlank($arrValues['del_flg'])
|| $arrValues['del_flg'] === '1') {
$arrValues['del_flg'] = '1';
} else {
@@ -500,7 +500,7 @@ public function doPreEdit(&$objFormParam)
// 消費税率を設定
if (OPTION_PRODUCT_TAX_RULE) {
- $arrRet = SC_Helper_TaxRule_Ex::getTaxRule($arrValues['product_id'], $arrValues['product_class_id']);
+ $arrRet = TaxRuleHelper::getTaxRule($arrValues['product_id'], $arrValues['product_class_id']);
$arrValues['tax_rate'] = $arrRet['tax_rate'];
}
@@ -509,7 +509,7 @@ public function doPreEdit(&$objFormParam)
}
// 登録済みのデータで上書き
- $objFormParam->setParam(SC_Utils_Ex::sfSwapArray($arrMergeProductsClass));
+ $objFormParam->setParam(Utils::sfSwapArray($arrMergeProductsClass));
// $arrMergeProductsClass で product_id が配列になってしまうため数値で上書き
$objFormParam->setValue('product_id', $product_id);
@@ -538,7 +538,7 @@ public function doPreEdit(&$objFormParam)
*/
public function doDelete($product_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
@@ -555,8 +555,8 @@ public function doDelete($product_id)
// 在庫無し商品の非表示対応
if (NOSTOCK_HIDDEN) {
// 件数カウントバッチ実行
- $objDb = new SC_Helper_DB_Ex();
- $objDb->sfCountCategory($objQuery);
+ $objDb = new DbHelper();
+ $objDb->countCategory($objQuery);
}
}
@@ -568,10 +568,10 @@ public function doDelete($product_id)
* 2. 拡張子チェック
*
* TODO
- * SC_CheckError クラスや, SC_UploadFile クラスが多次元配列に対応して
+ * CheckError クラスや, UploadFile クラスが多次元配列に対応して
* いないため, 独自のロジックを使用している.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function doFileUpload(&$objFormParam)
@@ -590,13 +590,13 @@ public function doFileUpload(&$objFormParam)
}
$this->arrErr['down_realfilename'][$index] = '※ ダウンロード販売用ファイル名のファイルサイズは' . $size . $byte . '以下のものを使用してください。
';
} else {
- // SC_CheckError::FILE_EXT_CHECK とのソース互換を強めるための配列
+ // CheckError::FILE_EXT_CHECK とのソース互換を強めるための配列
$value = array(
0 => 'ダウンロード販売用ファイル名',
1 => 'down_realfilename',
2 => explode(',', DOWNLOAD_EXTENSION),
);
- // ▼SC_CheckError::FILE_EXT_CHECK から移植
+ // ▼CheckError::FILE_EXT_CHECK から移植
$match = false;
if (strlen($_FILES[$value[1]]['name'][$index]) >= 1) {
$filename = $_FILES[$value[1]]['name'][$index];
@@ -612,7 +612,7 @@ public function doFileUpload(&$objFormParam)
if ($match === false) {
$str_ext = implode('・', $value[2]);
$this->arrErr[$value[1]][$index] = '※ ' . $value[0] . 'で許可されている形式は、' . $str_ext . 'です。
';
- // ▲SC_CheckError::FILE_EXT_CHECK から移植
+ // ▲CheckError::FILE_EXT_CHECK から移植
} else {
$uniqname = date('mdHi') . '_' . uniqid('').'.';
$temp_file = preg_replace("/^.*\./", $uniqname, $_FILES['down_realfilename']['name'][$index]);
@@ -620,10 +620,10 @@ public function doFileUpload(&$objFormParam)
if (move_uploaded_file($_FILES['down_realfilename']['tmp_name'][$index], DOWN_TEMP_REALDIR . $temp_file)) {
$arrDownRealFiles[$index] = $temp_file;
$objFormParam->setValue('down_realfilename', $arrDownRealFiles);
- GC_Utils_Ex::gfPrintLog($_FILES['down_realfilename']['name'][$index] .' -> '. realpath(DOWN_TEMP_REALDIR . $temp_file));
+ GcUtils::gfPrintLog($_FILES['down_realfilename']['name'][$index] .' -> '. realpath(DOWN_TEMP_REALDIR . $temp_file));
} else {
$objErr->arrErr[$keyname] = '※ ファイルのアップロードに失敗しました。
';
- GC_Utils_Ex::gfPrintLog('File Upload Error!: ' . $_FILES['down_realfilename']['name'][$index] . ' -> ' . DOWN_TEMP_REALDIR . $temp_file);
+ GcUtils::gfPrintLog('File Upload Error!: ' . $_FILES['down_realfilename']['name'][$index] . ' -> ' . DOWN_TEMP_REALDIR . $temp_file);
}
}
}
@@ -634,12 +634,12 @@ public function doFileUpload(&$objFormParam)
*
* TODO 一時ファイルの削除
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function doFileDelete(&$objFormParam)
{
- $objImage = new SC_Image_Ex(DOWN_TEMP_REALDIR);
+ $objImage = new Image(DOWN_TEMP_REALDIR);
$arrRealFileName = $objFormParam->getValue('down_realfilename');
$index = $objFormParam->getValue('upload_index');
$objImage->deleteImage($arrRealFileName[$index], DOWN_SAVE_REALDIR);
@@ -650,12 +650,12 @@ public function doFileDelete(&$objFormParam)
/**
* アップロードした一時ファイルを保存する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function doUploadComplete(&$objFormParam)
{
- $objImage = new SC_Image_Ex(DOWN_TEMP_REALDIR);
+ $objImage = new Image(DOWN_TEMP_REALDIR);
$arrRealFileName = $objFormParam->getValue('down_realfilename');
if (is_array($arrRealFileName)) {
foreach ($arrRealFileName as $real_file_name) {
@@ -673,7 +673,7 @@ public function doUploadComplete(&$objFormParam)
*/
public function getAllClassCategory($class_id1, $class_id2 = null)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = <<< __EOF__
T1.class_id AS class_id1,
@@ -683,7 +683,7 @@ public function getAllClassCategory($class_id1, $class_id2 = null)
__EOF__;
$table = '';
$arrParams = array();
- if (SC_Utils_Ex::isBlank($class_id2)) {
+ if (Utils::isBlank($class_id2)) {
$col .= ',0 AS classcategory_id2';
$table = 'dtb_classcategory T1 ';
$objQuery->setWhere('T1.class_id = ?');
@@ -715,7 +715,7 @@ public function getAllClassCategory($class_id1, $class_id2 = null)
*/
public function getProductName($product_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
return $objQuery->get('name', 'dtb_products', 'product_id = ?', array($product_id));
}
@@ -728,13 +728,13 @@ public function getProductName($product_id)
*/
public function getAllClass()
{
- $arrClass = SC_Helper_DB_Ex::sfGetIDValueList('dtb_class', 'class_id', 'name');
+ $arrClass = DbHelper::getIDValueList('dtb_class', 'class_id', 'name');
// 規格分類が登録されていない規格は表示しないようにする。
- $arrClassCatCount = SC_Utils_Ex::sfGetClassCatCount();
+ $arrClassCatCount = Utils::sfGetClassCatCount();
$results = array();
- if (!SC_Utils_Ex::isBlank($arrClass)) {
+ if (!Utils::isBlank($arrClass)) {
foreach ($arrClass as $key => $val) {
if ($arrClassCatCount[$key] > 0) {
$results[$key] = $arrClass[$key];
@@ -755,7 +755,7 @@ public function getAllClass()
*/
public function getProductsClass($product_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = 'product_code, price01, price02, stock, stock_unlimited, sale_limit, deliv_fee, point_rate';
$where = 'product_id = ? AND classcategory_id1 = 0 AND classcategory_id2 = 0';
@@ -766,7 +766,7 @@ public function getProductsClass($product_id)
* チェックボックスの値を埋める.
*
* チェックボックスが, 全て空で submit されると, $_POST の値が全く渡らない
- * ため, SC_FormParam::getValue() で取得できない.
+ * ため, FormParam::getValue() で取得できない.
* これを防ぐため, $_POST[$key] を直接操作し, 指定の長さで空白の配列を作成する
*
* @param string $key $_POST のキー
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php b/data/Eccube/Page/Admin/Products/ProductEdit.php
similarity index 88%
rename from data/class/pages/admin/products/LC_Page_Admin_Products_Product.php
rename to data/Eccube/Page/Admin/Products/ProductEdit.php
index ca15f2554c3..3f37df49007 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_Product.php
+++ b/data/Eccube/Page/Admin/Products/ProductEdit.php
@@ -1,36 +1,37 @@
tpl_maintitle = '商品管理';
$this->tpl_subtitle = '商品登録';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$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_Maker_Ex::getIDValueList();
+ $this->arrMaker = MakerHelper::getIDValueList();
$this->arrAllowedTag = $masterData->getMasterData('mtb_allowed_tag');
}
@@ -74,15 +75,15 @@ public function process()
*/
public function action()
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// アップロードファイル情報の初期化
- $objUpFile = new SC_UploadFile_Ex(IMAGE_TEMP_REALDIR, IMAGE_SAVE_REALDIR);
+ $objUpFile = new UploadFile(IMAGE_TEMP_REALDIR, IMAGE_SAVE_REALDIR);
$this->lfInitFile($objUpFile);
$objUpFile->setHiddenFileList($_POST);
// ダウンロード販売ファイル情報の初期化
- $objDownFile = new SC_UploadFile_Ex(DOWN_TEMP_REALDIR, DOWN_SAVE_REALDIR);
+ $objDownFile = new UploadFile(DOWN_TEMP_REALDIR, DOWN_SAVE_REALDIR);
$this->lfInitDownFile($objDownFile);
$objDownFile->setHiddenFileList($_POST);
@@ -160,10 +161,10 @@ public function action()
$product_id = $this->lfRegistProduct($objUpFile, $objDownFile, $arrForm);
// 件数カウントバッチ実行
- $objQuery =& SC_Query_Ex::getSingletonInstance();
- $objDb = new SC_Helper_DB_Ex();
- $objDb->sfCountCategory($objQuery);
- $objDb->sfCountMaker($objQuery);
+ $objQuery = Query::getSingletonInstance();
+ $objDb = new DbHelper();
+ $objDb->countCategory($objQuery);
+ $objDb->countMaker($objQuery);
// ダウンロード商品の複製時に、ダウンロード商品用ファイルを
// 変更すると、複製元のファイルが削除されるのを回避。
@@ -289,7 +290,7 @@ public function action()
* パラメーター情報の初期化
* - 編集/複製モード
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @param array $arrPost $_POSTデータ
* @return void
*/
@@ -303,7 +304,7 @@ public function lfInitFormParam_PreEdit(&$objFormParam, $arrPost)
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @param array $arrPost $_POSTデータ
* @return void
*/
@@ -376,7 +377,7 @@ public function lfInitFormParam(&$objFormParam, $arrPost)
* パラメーター情報の初期化
* - 画像ファイルアップロードモード
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function lfInitFormParam_UploadImage(&$objFormParam)
@@ -388,7 +389,7 @@ public function lfInitFormParam_UploadImage(&$objFormParam)
* パラメーター情報の初期化
* - ダウンロード商品ファイルアップロードモード
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function lfInitFormParam_UploadDown(&$objFormParam)
@@ -400,7 +401,7 @@ public function lfInitFormParam_UploadDown(&$objFormParam)
* パラメーター情報の初期化
* - 関連商品追加モード
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return void
*/
public function lfInitFormParam_RecommendSelect(&$objFormParam)
@@ -413,7 +414,7 @@ public function lfInitFormParam_RecommendSelect(&$objFormParam)
* アップロードファイルパラメーター情報の初期化
* - 画像ファイル用
*
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileインスタンス
+ * @param UploadFile $objUpFile UploadFileインスタンス
* @return void
*/
public function lfInitFile(&$objUpFile)
@@ -431,7 +432,7 @@ public function lfInitFile(&$objUpFile)
* アップロードファイルパラメーター情報の初期化
* - ダウンロード商品ファイル用
*
- * @param SC_UploadFile_Ex $objDownFile SC_UploadFileインスタンス
+ * @param UploadFile $objDownFile UploadFileインスタンス
* @return void
*/
public function lfInitDownFile(&$objDownFile)
@@ -442,15 +443,15 @@ public function lfInitDownFile(&$objDownFile)
/**
* フォーム入力パラメーターのエラーチェック
*
- * @param object $objFormParam SC_FormParamインスタンス
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileインスタンス
- * @param SC_UploadFile_Ex $objDownFile SC_UploadFileインスタンス
+ * @param object $objFormParam FormParamインスタンス
+ * @param UploadFile $objUpFile UploadFileインスタンス
+ * @param UploadFile $objDownFile UploadFileインスタンス
* @param array $arrForm フォーム入力パラメーター配列
* @return array エラー情報を格納した連想配列
*/
public function lfCheckError_Edit(&$objFormParam, &$objUpFile, &$objDownFile, $arrForm)
{
- $objErr = new SC_CheckError_Ex($arrForm);
+ $objErr = new CheckError($arrForm);
$arrErr = array();
// 入力パラメーターチェック
@@ -522,7 +523,7 @@ public function lfCheckError_RecommendSelect(&$arrForm, &$arrErr)
public function lfGetSearchParam($arrPost)
{
$arrSearchParam = array();
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
parent::lfInitParam($objFormParam);
$objFormParam->setParam($arrPost);
@@ -535,8 +536,8 @@ public function lfGetSearchParam($arrPost)
* フォームパラメーター取得
* - 編集/複製モード
*
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileインスタンス
- * @param SC_UploadFile_Ex $objDownFile SC_UploadFileインスタンス
+ * @param UploadFile $objUpFile UploadFileインスタンス
+ * @param UploadFile $objDownFile UploadFileインスタンス
* @param integer $product_id 商品ID
* @return array フォームパラメーター配列
*/
@@ -558,13 +559,13 @@ public function lfGetFormParam_PreEdit(&$objUpFile, &$objDownFile, $product_id)
* フォームパラメーター取得
* - 登録モード
*
- * @param SC_FormParam_Ex $objFormParam SC_FormParamインスタンス
+ * @param FormParam $objFormParam FormParamインスタンス
* @return array フォームパラメーター配列
*/
public function lfGetFormParam_Complete(&$objFormParam)
{
$arrForm = $objFormParam->getHashArray();
- $arrForm['category_id'] = SC_Utils_Ex::jsonDecode($arrForm['category_id']);
+ $arrForm['category_id'] = Utils::jsonDecode($arrForm['category_id']);
$objFormParam->setValue('category_id', $arrForm['category_id']);
return $arrForm;
@@ -574,21 +575,21 @@ public function lfGetFormParam_Complete(&$objFormParam)
* 表示用フォームパラメーター取得
* - 入力画面
*
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileインスタンス
- * @param SC_UploadFile_Ex $objDownFile SC_UploadFileインスタンス
+ * @param UploadFile $objUpFile UploadFileインスタンス
+ * @param UploadFile $objDownFile UploadFileインスタンス
* @param array $arrForm フォーム入力パラメーター配列
* @return array 表示用フォームパラメーター配列
*/
public function lfSetViewParam_InputPage(&$objUpFile, &$objDownFile, &$arrForm)
{
// カテゴリマスターデータ取得
- $objDb = new SC_Helper_DB_Ex();
- list($this->arrCatVal, $this->arrCatOut) = $objDb->sfGetLevelCatList(false);
+ $objDb = new DbHelper();
+ list($this->arrCatVal, $this->arrCatOut) = $objDb->getLevelCatList(false);
if (isset($arrForm['category_id']) && !is_array($arrForm['category_id'])) {
- $arrForm['category_id'] = SC_Utils_Ex::jsonDecode($arrForm['category_id']);
+ $arrForm['category_id'] = Utils::jsonDecode($arrForm['category_id']);
}
- $this->tpl_json_category_id = !empty($arrForm['category_id']) ? SC_Utils_Ex::jsonEncode($arrForm['category_id']) : SC_Utils_Ex::jsonEncode(array());
+ $this->tpl_json_category_id = !empty($arrForm['category_id']) ? Utils::jsonEncode($arrForm['category_id']) : Utils::jsonEncode(array());
if ($arrForm['status'] == '') {
$arrForm['status'] = DEFAULT_PRODUCT_DISP;
}
@@ -598,9 +599,9 @@ public function lfSetViewParam_InputPage(&$objUpFile, &$objDownFile, &$arrForm)
if (OPTION_PRODUCT_TAX_RULE) {
// 編集の場合は設定された税率、新規の場合はデフォルトの税率を取得
if ($arrForm['product_id'] == '') {
- $arrRet = SC_Helper_TaxRule_Ex::getTaxRule();
+ $arrRet = TaxRuleHelper::getTaxRule();
} else {
- $arrRet = SC_Helper_TaxRule_Ex::getTaxRule($arrForm['product_id'], $arrForm['product_class_id']);
+ $arrRet = TaxRuleHelper::getTaxRule($arrForm['product_id'], $arrForm['product_class_id']);
}
$arrForm['tax_rate'] = $arrRet['tax_rate'];
}
@@ -615,7 +616,7 @@ public function lfSetViewParam_InputPage(&$objUpFile, &$objDownFile, &$arrForm)
$arrForm['down_realfilename'] = $objDownFile->getFormDownFile();
// 基本情報(デフォルトポイントレート用)
- $arrForm['arrInfo'] = SC_Helper_DB_Ex::sfGetBasisData();
+ $arrForm['arrInfo'] = DbHelper::getBasisData();
// サブ情報ありなしフラグ
$arrForm['sub_find'] = $this->hasSubProductData($arrForm);
@@ -627,8 +628,8 @@ public function lfSetViewParam_InputPage(&$objUpFile, &$objDownFile, &$arrForm)
* 表示用フォームパラメーター取得
* - 確認画面
*
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileインスタンス
- * @param SC_UploadFile_Ex $objDownFile SC_UploadFileインスタンス
+ * @param UploadFile $objUpFile UploadFileインスタンス
+ * @param UploadFile $objDownFile UploadFileインスタンス
* @param array $arrForm フォーム入力パラメーター配列
* @return array 表示用フォームパラメーター配列
*/
@@ -637,7 +638,7 @@ public function lfSetViewParam_ConfirmPage(&$objUpFile, &$objDownFile, &$arrForm
// カテゴリ表示用
$arrForm['arrCategoryId'] = $arrForm['category_id'];
// hidden に渡す値は serialize する
- $arrForm['category_id'] = SC_Utils_Ex::jsonEncode($arrForm['category_id']);
+ $arrForm['category_id'] = Utils::jsonEncode($arrForm['category_id']);
// 画像ファイル用データ取得
$arrForm['arrFile'] = $objUpFile->getFormFileList(IMAGE_TEMP_URLPATH, IMAGE_SAVE_URLPATH);
// ダウンロード商品実ファイル名取得
@@ -649,7 +650,7 @@ public function lfSetViewParam_ConfirmPage(&$objUpFile, &$objDownFile, &$arrForm
/**
* 縮小した画像をセットする
*
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileインスタンス
+ * @param UploadFile $objUpFile UploadFileインスタンス
* @param string $image_key 画像ファイルキー
* @return void
*/
@@ -676,7 +677,7 @@ public function lfSetScaleImage(&$objUpFile, $image_key)
/**
* 画像ファイルのコピー
*
- * @param object $objUpFile SC_UploadFileインスタンス
+ * @param object $objUpFile UploadFileインスタンス
* @return void
*/
public function lfCopyProductImageFiles(&$objUpFile)
@@ -692,7 +693,7 @@ public function lfCopyProductImageFiles(&$objUpFile)
/**
* 縮小画像生成
*
- * @param object $objUpFile SC_UploadFileインスタンス
+ * @param object $objUpFile UploadFileインスタンス
* @param string $from_key 元画像ファイルキー
* @param string $to_key 縮小画像ファイルキー
* @param boolean $forced
@@ -733,13 +734,13 @@ public function lfMakeScaleImage(&$objUpFile, $from_key, $to_key, $forced = fals
* アップロードファイルパラメーター情報から削除
* 一時ディレクトリに保存されている実ファイルも削除する
*
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileインスタンス
+ * @param UploadFile $objUpFile UploadFileインスタンス
* @param string $image_key 画像ファイルキー
* @return void
*/
public function lfDeleteTempFile(&$objUpFile, $image_key)
{
- // TODO: SC_UploadFile::deleteFileの画像削除条件見直し要
+ // TODO: UploadFile::deleteFileの画像削除条件見直し要
$arrTempFile = $objUpFile->temp_file;
$arrKeyName = $objUpFile->keyname;
@@ -766,15 +767,15 @@ public function lfDeleteTempFile(&$objUpFile, $image_key)
/**
* アップロードファイルを保存する
*
- * @param object $objUpFile SC_UploadFileインスタンス
- * @param object $objDownFile SC_UploadFileインスタンス
+ * @param object $objUpFile UploadFileインスタンス
+ * @param object $objDownFile UploadFileインスタンス
* @param integer $product_id 商品ID
* @return void
*/
public function lfSaveUploadFiles(&$objUpFile, &$objDownFile, $product_id)
{
- // TODO: SC_UploadFile::moveTempFileの画像削除条件見直し要
- $objImage = new SC_Image_Ex($objUpFile->temp_dir);
+ // TODO: UploadFile::moveTempFileの画像削除条件見直し要
+ $objImage = new Image($objUpFile->temp_dir);
$arrKeyName = $objUpFile->keyname;
$arrTempFile = $objUpFile->temp_file;
$arrSaveFile = $objUpFile->save_file;
@@ -808,7 +809,7 @@ public function lfSaveUploadFiles(&$objUpFile, &$objDownFile, $product_id)
*/
public function lfHasSameProductImage($product_id, $arrImageKey, $image_file_name)
{
- if (!SC_Utils_Ex::sfIsInt($product_id)) return false;
+ if (!Utils::sfIsInt($product_id)) return false;
if (!$arrImageKey) return false;
if (!$image_file_name) return false;
@@ -829,7 +830,7 @@ public function lfHasSameProductImage($product_id, $arrImageKey, $image_file_nam
}
$where .= ')';
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$exists = $objQuery->exists('dtb_products', $where, $sqlval);
return $exists;
@@ -843,7 +844,7 @@ public function lfHasSameProductImage($product_id, $arrImageKey, $image_file_nam
*/
public function lfGetProductData_FromDB($product_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrProduct = array();
// 商品データ取得
@@ -879,16 +880,16 @@ public function lfGetProductData_FromDB($product_id)
$arrProduct[0]['category_id'] = $objQuery->getCol($col, $table, $where, array($product_id));
// 規格情報ありなしフラグ取得
- $objDb = new SC_Helper_DB_Ex();
- $arrProduct[0]['has_product_class'] = $objDb->sfHasProductClass($product_id);
+ $objDb = new DbHelper();
+ $arrProduct[0]['has_product_class'] = $objDb->hasProductClass($product_id);
// 規格が登録されていなければ規格ID取得
if ($arrProduct[0]['has_product_class'] == false) {
- $arrProduct[0]['product_class_id'] = SC_Utils_Ex::sfGetProductClassId($product_id, '0', '0');
+ $arrProduct[0]['product_class_id'] = Utils::sfGetProductClassId($product_id, '0', '0');
}
// 商品ステータス取得
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$productStatus = $objProduct->getProductStatus(array($product_id));
$arrProduct[0]['product_status'] = $productStatus[$product_id];
@@ -907,7 +908,7 @@ public function lfGetProductData_FromDB($product_id)
*/
public function lfGetRecommendProductsData_FromDB($product_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrRecommendProducts = array();
$col = 'recommend_product_id,';
@@ -945,7 +946,7 @@ public function lfGetRecommendProducts(&$arrForm)
if (!isset($arrForm[$delkey])) $arrForm[$delkey] = null;
if ((isset($arrForm[$keyname]) && !empty($arrForm[$keyname])) && $arrForm[$delkey] != 1) {
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$arrRecommend[$i] = $objProduct->getDetail($arrForm[$keyname]);
$arrRecommend[$i]['product_id'] = $arrForm[$keyname];
$arrRecommend[$i]['comment'] = $arrForm[$commentkey];
@@ -964,10 +965,10 @@ public function lfGetRecommendProducts(&$arrForm)
*/
public function lfGetCategoryList_Edit()
{
- $objDb = new SC_Helper_DB_Ex();
+ $objDb = new DbHelper();
$arrCategoryList = array();
- list($arrCatVal, $arrCatOut) = $objDb->sfGetLevelCatList(false);
+ list($arrCatVal, $arrCatOut) = $objDb->getLevelCatList(false);
for ($i = 0; $i < count($arrCatVal); $i++) {
$arrCategoryList[$arrCatVal[$i]] = $arrCatOut[$i];
}
@@ -990,15 +991,15 @@ public function lfSetOnloadJavaScript_InputPage($anchor_hash = '')
/**
* DBに商品データを登録する
*
- * @param SC_UploadFile_Ex $objUpFile SC_UploadFileインスタンス
- * @param SC_UploadFile_Ex $objDownFile SC_UploadFileインスタンス
+ * @param UploadFile $objUpFile UploadFileインスタンス
+ * @param UploadFile $objDownFile UploadFileインスタンス
* @param array $arrList フォーム入力パラメーター配列
* @return integer 登録商品ID
*/
public function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
- $objDb = new SC_Helper_DB_Ex();
+ $objQuery = Query::getSingletonInstance();
+ $objDb = new DbHelper();
// 配列の添字を定義
$checkArray = array('name', 'status',
@@ -1006,7 +1007,7 @@ public function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList)
'deliv_fee', 'comment1', 'comment2', 'comment3',
'comment4', 'comment5', 'comment6',
'sale_limit', 'deliv_date_id', 'maker_id', 'note');
- $arrList = SC_Utils_Ex::arrayDefineIndexes($arrList, $checkArray);
+ $arrList = Utils::arrayDefineIndexes($arrList, $checkArray);
// INSERTする値を作成する。
$sqlval['name'] = $arrList['name'];
@@ -1049,14 +1050,14 @@ public function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList)
$objDb->updateProductCategories($arrList['category_id'], $product_id);
// 複製商品の場合には規格も複製する
- if ($arrList['copy_product_id'] != '' && SC_Utils_Ex::sfIsInt($arrList['copy_product_id'])) {
+ if ($arrList['copy_product_id'] != '' && Utils::sfIsInt($arrList['copy_product_id'])) {
if (!$arrList['has_product_class']) {
//規格なしの場合、複製は価格等の入力が発生しているため、その内容で追加登録を行う
$this->lfCopyProductClass($arrList, $objQuery);
} else {
//規格がある場合の複製は複製元の内容で追加登録を行う
// dtb_products_class のカラムを取得
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
$arrColList = $objQuery->listTableFields('dtb_products_class');
$arrColList_tmp = array_flip($arrColList);
@@ -1066,14 +1067,14 @@ public function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList)
unset($arrColList[$arrColList_tmp['create_date']]);
// 複製元商品の規格データ取得
- $col = SC_Utils_Ex::sfGetCommaList($arrColList);
+ $col = Utils::sfGetCommaList($arrColList);
$table = 'dtb_products_class';
$where = 'product_id = ?';
$objQuery->setOrder('product_class_id');
$arrProductsClass = $objQuery->select($col, $table, $where, array($arrList['copy_product_id']));
// 規格データ登録
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
foreach ($arrProductsClass as $arrData) {
$sqlval = $arrData;
$sqlval['product_class_id'] = $objQuery->nextVal('dtb_products_class_product_class_id');
@@ -1092,8 +1093,8 @@ public function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList)
$product_id = $arrList['product_id'];
// 削除要求のあった既存ファイルの削除
$arrRet = $this->lfGetProductData_FromDB($arrList['product_id']);
- // TODO: SC_UploadFile::deleteDBFileの画像削除条件見直し要
- $objImage = new SC_Image_Ex($objUpFile->temp_dir);
+ // TODO: UploadFile::deleteDBFileの画像削除条件見直し要
+ $objImage = new Image($objUpFile->temp_dir);
$arrKeyName = $objUpFile->keyname;
$arrSaveFile = $objUpFile->save_file;
$arrImageKey = array();
@@ -1118,7 +1119,7 @@ public function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList)
// 商品登録の時は規格を生成する。複製の場合は規格も複製されるのでこの処理は不要。
if ($arrList['copy_product_id'] == '') {
// 規格登録
- if ($objDb->sfHasProductClass($product_id)) {
+ if ($objDb->hasProductClass($product_id)) {
// 規格あり商品(商品規格テーブルのうち、商品登録フォームで設定するパラメーターのみ更新)
$this->lfUpdateProductClass($arrList);
} else {
@@ -1128,12 +1129,12 @@ public function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList)
}
// 商品ステータス設定
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$objProduct->setProductStatus($product_id, $arrList['product_status']);
// 税情報設定
- if (OPTION_PRODUCT_TAX_RULE && !$objDb->sfHasProductClass($product_id)) {
- SC_Helper_TaxRule_Ex::setTaxRuleForProduct($arrList['tax_rate'], $arrList['product_id'], $arrList['product_class_id']);
+ if (OPTION_PRODUCT_TAX_RULE && !$objDb->hasProductClass($product_id)) {
+ TaxRuleHelper::setTaxRuleForProduct($arrList['tax_rate'], $arrList['product_id'], $arrList['product_class_id']);
}
// 関連商品登録
@@ -1152,13 +1153,13 @@ public function lfRegistProduct(&$objUpFile, &$objDownFile, $arrList)
*/
public function lfInsertDummyProductClass($arrList)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
- $objDb = new SC_Helper_DB_Ex();
+ $objQuery = Query::getSingletonInstance();
+ $objDb = new DbHelper();
// 配列の添字を定義
$checkArray = array('product_class_id', 'product_id', 'product_code', 'stock', 'stock_unlimited', 'price01', 'price02', 'sale_limit', 'deliv_fee', 'point_rate', 'product_type_id', 'down_filename', 'down_realfilename');
- $sqlval = SC_Utils_Ex::sfArrayIntersectKeys($arrList, $checkArray);
- $sqlval = SC_Utils_Ex::arrayDefineIndexes($sqlval, $checkArray);
+ $sqlval = Utils::sfArrayIntersectKeys($arrList, $checkArray);
+ $sqlval = Utils::arrayDefineIndexes($sqlval, $checkArray);
$sqlval['stock_unlimited'] = $sqlval['stock_unlimited'] ? UNLIMITED_FLG_UNLIMITED : UNLIMITED_FLG_LIMITED;
$sqlval['creator_id'] = strlen($_SESSION['member_id']) >= 1 ? $_SESSION['member_id'] : '0';
@@ -1186,7 +1187,7 @@ public function lfInsertDummyProductClass($arrList)
*/
public function lfUpdateProductClass($arrList)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$sqlval = array();
$sqlval['deliv_fee'] = $arrList['deliv_fee'];
@@ -1199,7 +1200,7 @@ public function lfUpdateProductClass($arrList)
/**
* DBに関連商品データを登録する
*
- * @param SC_Query $objQuery SC_Queryインスタンス
+ * @param Query $objQuery Queryインスタンス
* @param string $arrList フォーム入力パラメーター配列
* @param integer $product_id 登録する商品ID
* @return void
@@ -1234,7 +1235,7 @@ public function lfInsertRecommendProducts(&$objQuery, $arrList, $product_id)
* 規格データをコピーする
*
* @param array $arrList フォーム入力パラメーター配列
- * @param SC_Query $objQuery SC_Queryインスタンス
+ * @param Query $objQuery Queryインスタンス
* @return boolean エラーフラグ
*/
public function lfCopyProductClass($arrList, &$objQuery)
@@ -1323,12 +1324,12 @@ public function hasSubProductData($arrSubProductData)
$has_subproduct_data = false;
for ($i = 1; $i <= PRODUCTSUB_MAX; $i++) {
- if (SC_Utils_Ex::isBlank($arrSubProductData['sub_title'.$i]) == false
- || SC_Utils_Ex::isBlank($arrSubProductData['sub_comment'.$i]) == false
- || SC_Utils_Ex::isBlank($arrSubProductData['sub_image'.$i]) == false
- || SC_Utils_Ex::isBlank($arrSubProductData['sub_large_image'.$i]) == false
- || SC_Utils_Ex::isBlank($arrSubProductData['temp_sub_image'.$i]) == false
- || SC_Utils_Ex::isBlank($arrSubProductData['temp_sub_large_image'.$i]) == false
+ if (Utils::isBlank($arrSubProductData['sub_title'.$i]) == false
+ || Utils::isBlank($arrSubProductData['sub_comment'.$i]) == false
+ || Utils::isBlank($arrSubProductData['sub_image'.$i]) == false
+ || Utils::isBlank($arrSubProductData['sub_large_image'.$i]) == false
+ || Utils::isBlank($arrSubProductData['temp_sub_image'.$i]) == false
+ || Utils::isBlank($arrSubProductData['temp_sub_large_image'.$i]) == false
) {
$has_subproduct_data = true;
break;
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_ProductRank.php b/data/Eccube/Page/Admin/Products/ProductRank.php
similarity index 71%
rename from data/class/pages/admin/products/LC_Page_Admin_Products_ProductRank.php
rename to data/Eccube/Page/Admin/Products/ProductRank.php
index 139164e6665..35143aff412 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_ProductRank.php
+++ b/data/Eccube/Page/Admin/Products/ProductRank.php
@@ -1,36 +1,32 @@
tpl_pageno = isset($_POST['pageno']) ? $_POST['pageno'] : '';
@@ -101,16 +97,16 @@ public function action()
$this->arrParentID = $objCategory->getTreeTrail($this->arrForm['parent_category_id']);
$this->arrProductsList = $this->lfGetProduct($this->arrForm['parent_category_id']);
$arrBread = $objCategory->getTreeTrail($this->arrForm['parent_category_id'], FALSE);
- $this->tpl_bread_crumbs = SC_Utils_Ex::jsonEncode(array_reverse($arrBread));
+ $this->tpl_bread_crumbs = Utils::jsonEncode(array_reverse($arrBread));
}
/* 商品読み込み */
public function lfGetProduct($category_id)
{
- // FIXME SC_Product クラスを使用した実装
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ // FIXME Product クラスを使用した実装
+ $objQuery = Query::getSingletonInstance();
$col = 'alldtl.product_id, name, main_list_image, product_code_min, product_code_max, status';
- $objProduct = new SC_Product();
+ $objProduct = new Product();
$table = $objProduct->alldtlSQL();
$table.= ' LEFT JOIN dtb_product_categories AS T5 ON alldtl.product_id = T5.product_id';
$where = 'del_flg = 0 AND category_id = ?';
@@ -120,7 +116,7 @@ public function lfGetProduct($category_id)
// 該当件数表示用
$this->tpl_linemax = $linemax;
- $objNavi = new SC_PageNavi_Ex($this->tpl_pageno, $linemax, SEARCH_PMAX, 'eccube.movePage', NAVI_PMAX);
+ $objNavi = new PageNavi($this->tpl_pageno, $linemax, SEARCH_PMAX, 'eccube.movePage', NAVI_PMAX);
$startno = $objNavi->start_row;
$this->tpl_start_row = $objNavi->start_row;
$this->tpl_strnavi = $objNavi->strnavi; // Navi表示文字列
@@ -142,7 +138,7 @@ public function lfGetProduct($category_id)
*/
public function lfRenumber($parent_category_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$sql = <<< __EOS__
UPDATE dtb_product_categories
@@ -168,33 +164,33 @@ public function lfRenumber($parent_category_id)
}
/**
- * @param SC_Helper_DB_Ex $objDb
+ * @param DbHelper $objDb
*/
public function lfRankUp(&$objDb, $parent_category_id, $product_id)
{
- $where = 'category_id = ' . SC_Utils_Ex::sfQuoteSmart($parent_category_id);
- $objDb->sfRankUp('dtb_product_categories', 'product_id', $product_id, $where);
+ $where = 'category_id = ' . Utils::sfQuoteSmart($parent_category_id);
+ $objDb->rankUp('dtb_product_categories', 'product_id', $product_id, $where);
}
/**
- * @param SC_Helper_DB_Ex $objDb
+ * @param DbHelper $objDb
*/
public function lfRankDown(&$objDb, $parent_category_id, $product_id)
{
- $where = 'category_id = ' . SC_Utils_Ex::sfQuoteSmart($parent_category_id);
- $objDb->sfRankDown('dtb_product_categories', 'product_id', $product_id, $where);
+ $where = 'category_id = ' . Utils::sfQuoteSmart($parent_category_id);
+ $objDb->rankDown('dtb_product_categories', 'product_id', $product_id, $where);
}
/**
- * @param SC_Helper_DB_Ex $objDb
+ * @param DbHelper $objDb
*/
public function lfRankMove(&$objDb, $parent_category_id, $product_id)
{
$key = 'pos-'.$product_id;
$input_pos = mb_convert_kana($_POST[$key], 'n');
- if (SC_Utils_Ex::sfIsInt($input_pos)) {
- $where = 'category_id = ' . SC_Utils_Ex::sfQuoteSmart($parent_category_id);
- $objDb->sfMoveRank('dtb_product_categories', 'product_id', $product_id, $input_pos, $where);
+ if (Utils::sfIsInt($input_pos)) {
+ $where = 'category_id = ' . Utils::sfQuoteSmart($parent_category_id);
+ $objDb->moveRank('dtb_product_categories', 'product_id', $product_id, $input_pos, $where);
}
}
}
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_ProductSelect.php b/data/Eccube/Page/Admin/Products/ProductSelect.php
similarity index 70%
rename from data/class/pages/admin/products/LC_Page_Admin_Products_ProductSelect.php
rename to data/Eccube/Page/Admin/Products/ProductSelect.php
index 73272b0237e..80a7151fd90 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_ProductSelect.php
+++ b/data/Eccube/Page/Admin/Products/ProductSelect.php
@@ -1,36 +1,33 @@
tpl_maintitle = '商品管理';
$this->tpl_subtitle = '商品選択';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPRODUCTSTATUS_COLOR = $masterData->getMasterData('mtb_product_status_color');
}
@@ -68,9 +65,9 @@ public function process()
*/
public function action()
{
- $objDb = new SC_Helper_DB_Ex();
+ $objDb = new DbHelper();
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$objFormParam->convParam();
@@ -85,14 +82,14 @@ public function action()
}
// カテゴリ取得
- $this->arrCatList = $objDb->sfGetCategoryList();
+ $this->arrCatList = $objDb->getCategoryList();
$this->setTemplate($this->tpl_mainpage);
}
/**
* パラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -105,7 +102,7 @@ public function lfInitParam(&$objFormParam)
/* 商品検索結果取得 */
/**
- * @param SC_Helper_DB_Ex $objDb
+ * @param DbHelper $objDb
*/
public function lfGetProducts(&$objDb)
{
@@ -122,7 +119,7 @@ public function lfGetProducts(&$objDb)
$arrWhereVal[] = "%$val%";
break;
case 'search_category_id':
- list($tmp_where, $arrTmp) = $objDb->sfGetCatWhere($val);
+ list($tmp_where, $arrTmp) = $objDb->getCatWhere($val);
if ($tmp_where != '') {
$where.= ' AND product_id IN (SELECT product_id FROM dtb_product_categories WHERE ' . $tmp_where . ')';
$arrWhereVal = array_merge((array) $arrWhereVal, (array) $arrTmp);
@@ -139,16 +136,16 @@ public function lfGetProducts(&$objDb)
$order = 'update_date DESC, product_id DESC ';
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// 行数の取得
$linemax = $objQuery->count('dtb_products', $where, $arrWhereVal);
$this->tpl_linemax = $linemax; // 何件が該当しました。表示用
// ページ送りの処理
- $page_max = SC_Utils_Ex::sfGetSearchPageMax($_POST['search_page_max']);
+ $page_max = Utils::sfGetSearchPageMax($_POST['search_page_max']);
// ページ送りの取得
- $objNavi = new SC_PageNavi_Ex($_POST['search_pageno'], $linemax, $page_max, 'eccube.moveSearchPage', NAVI_PMAX);
+ $objNavi = new PageNavi($_POST['search_pageno'], $linemax, $page_max, 'eccube.moveSearchPage', NAVI_PMAX);
$this->tpl_strnavi = $objNavi->strnavi; // 表示文字列
$startno = $objNavi->start_row;
@@ -159,7 +156,7 @@ public function lfGetProducts(&$objDb)
// 検索結果の取得
// FIXME 商品コードの表示
- $arrProducts = $objQuery->select('*', SC_Product_Ex::alldtlSQL(), $where, $arrWhereVal);
+ $arrProducts = $objQuery->select('*', Product::alldtlSQL(), $where, $arrWhereVal);
return $arrProducts;
}
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php b/data/Eccube/Page/Admin/Products/UploadCSV.php
similarity index 91%
rename from data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php
rename to data/Eccube/Page/Admin/Products/UploadCSV.php
index 69db97cc840..b17f195d099 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSV.php
+++ b/data/Eccube/Page/Admin/Products/UploadCSV.php
@@ -1,38 +1,39 @@
tpl_subtitle = '商品登録CSV';
$this->csv_id = '1';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$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_Maker_Ex::getIDValueList();
- $this->arrPayments = SC_Helper_Payment_Ex::getIDValueList();
- $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
+ $this->arrMaker = MakerHelper::getIDValueList();
+ $this->arrPayments = PaymentHelper::getIDValueList();
+ $this->arrInfo = DbHelper::getBasisData();
$this->arrAllowedTag = $masterData->getMasterData('mtb_allowed_tag');
$this->arrTagCheckItem = array();
}
@@ -95,10 +96,10 @@ public function process()
*/
public function action()
{
- $this->objDb = new SC_Helper_DB_Ex();
+ $this->objDb = new DbHelper();
// CSV管理ヘルパー
- $objCSV = new SC_Helper_CSV_Ex();
+ $objCSV = new CsvHelper();
// CSV構造読み込み
$arrCSVFrame = $objCSV->sfGetCsvOutput($this->csv_id);
@@ -112,14 +113,14 @@ public function action()
$this->tpl_is_update = $objCSV->sfIsUpdateCSVFrame($arrCSVFrame);
// CSVファイルアップロード情報の初期化
- $objUpFile = new SC_UploadFile_Ex(CSV_TEMP_REALDIR, CSV_TEMP_REALDIR);
+ $objUpFile = new UploadFile(CSV_TEMP_REALDIR, CSV_TEMP_REALDIR);
$this->lfInitFile($objUpFile);
// パラメーター情報の初期化
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam, $arrCSVFrame);
- $this->max_upload_csv_size = SC_Utils_Ex::getUnitDataSize(CSV_SIZE);
+ $this->max_upload_csv_size = Utils::getUnitDataSize(CSV_SIZE);
$objFormParam->setHtmlDispNameArray();
$this->arrTitle = $objFormParam->getHtmlDispNameArray();
@@ -211,7 +212,7 @@ public function lfReadCSVFile(&$objFormParam, &$fp, $objQuery = null)
$product_id = $objFormParam->getValue('product_id');
$product_class_id = $objFormParam->getValue('product_class_id');
if ($product_class_id == '' && $product_id != '') {
- $product_class_id = SC_Utils_Ex::sfGetProductClassId($product_id, $objFormParam->getValue('classcategory_id1'), $objFormParam->getValue('classcategory_id2'));
+ $product_class_id = Utils::sfGetProductClassId($product_id, $objFormParam->getValue('classcategory_id1'), $objFormParam->getValue('classcategory_id2'));
$objFormParam->setValue('product_class_id', $product_class_id);
}
@@ -231,7 +232,7 @@ public function lfReadCSVFile(&$objFormParam, &$fp, $objQuery = null)
$this->addRowResult($line_count, '商品ID:'.$arrParam['product_id'] . ' / 商品名:' . $arrParam['name']);
}
- SC_Utils_Ex::extendTimeOut();
+ Utils::extendTimeOut();
}
return $errFlag;
@@ -258,12 +259,12 @@ public function doUploadCsv(&$objFormParam, &$objUpFile)
// 一時ファイル名の取得
$filepath = $objUpFile->getTempFilePath('csv_file');
// CSVファイルの文字コード変換
- $enc_filepath = SC_Utils_Ex::sfEncodeFile($filepath, CHAR_CODE, CSV_TEMP_REALDIR);
+ $enc_filepath = Utils::sfEncodeFile($filepath, CHAR_CODE, CSV_TEMP_REALDIR);
// CSVファイルのオープン
$fp = fopen($enc_filepath, 'r');
// 失敗した場合はエラー表示
if (!$fp) {
- SC_Utils_Ex::sfDispError('');
+ Utils::sfDispError('');
}
// 登録先テーブル カラム情報の初期化
@@ -272,7 +273,7 @@ public function doUploadCsv(&$objFormParam, &$objUpFile)
// 登録フォーム カラム情報
$this->arrFormKeyList = $objFormParam->getKeyList();
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
// CSVからの読み込み、入力エラーチェック
@@ -297,8 +298,8 @@ public function doUploadCsv(&$objFormParam, &$objUpFile)
$objQuery->commit();
// 商品件数カウント関数の実行
- $this->objDb->sfCountCategory($objQuery);
- $this->objDb->sfCountMaker($objQuery);
+ $this->objDb->countCategory($objQuery);
+ $this->objDb->countMaker($objQuery);
}
/**
@@ -367,7 +368,7 @@ public function lfCheckError(&$objFormParam)
{
// 入力データを渡す。
$arrRet = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrRet);
+ $objErr = new CheckError($arrRet);
$objErr->arrErr = $objFormParam->checkError(false);
// HTMLタグチェックの実行
foreach ($this->arrTagCheckItem as $item) {
@@ -388,7 +389,7 @@ public function lfCheckError(&$objFormParam)
*/
public function lfInitTableInfo()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$this->arrProductColumn = $objQuery->listTableFields('dtb_products');
$this->arrProductClassColumn = $objQuery->listTableFields('dtb_products_class');
}
@@ -398,13 +399,13 @@ public function lfInitTableInfo()
*
* FIXME: 商品登録の実処理自体は、LC_Page_Admin_Products_Productと共通化して欲しい。
*
- * @param SC_Query $objQuery SC_Queryインスタンス
+ * @param Query $objQuery Queryインスタンス
* @param string|integer $line 処理中の行数
* @return void
*/
public function lfRegistProduct($objQuery, $line = '', &$objFormParam)
{
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
// 登録データ対象取得
$arrList = $objFormParam->getDbArray();
@@ -413,7 +414,7 @@ public function lfRegistProduct($objQuery, $line = '', &$objFormParam)
// 商品登録情報を生成する。
// 商品テーブルのカラムに存在しているもののうち、Form投入設定されていないデータは上書きしない。
- $sqlval = SC_Utils_Ex::sfArrayIntersectKeys($arrList, $this->arrProductColumn);
+ $sqlval = Utils::sfArrayIntersectKeys($arrList, $this->arrProductColumn);
// 必須入力では無い項目だが、空文字では問題のある特殊なカラム値の初期値設定
$sqlval = $this->lfSetProductDefaultData($sqlval);
@@ -467,7 +468,7 @@ public function lfRegistProduct($objQuery, $line = '', &$objFormParam)
*
* FIXME: 商品規格登録の実処理自体は、LC_Page_Admin_Products_Productと共通化して欲しい。
*
- * @param SC_Query $objQuery SC_Queryインスタンス
+ * @param Query $objQuery Queryインスタンス
* @param array $arrList 商品規格情報配列
* @param integer $product_id 商品ID
* @param integer $product_class_id 商品規格ID
@@ -475,7 +476,7 @@ public function lfRegistProduct($objQuery, $line = '', &$objFormParam)
*/
public function lfRegistProductClass($objQuery, $arrList, $product_id, $product_class_id)
{
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
// FIXME: dtb_csvテーブルの中で古いカラム名(右辺)が設定されている。sfArrayIntersectKeysでフィルタされてしまうので、名称を変更する必要がある
if (array_key_exists('classcategory_id', $arrList) && $arrList['classcategory_id'] != '') {
@@ -487,7 +488,7 @@ public function lfRegistProductClass($objQuery, $arrList, $product_id, $product_
// 商品規格登録情報を生成する。
// 商品規格テーブルのカラムに存在しているもののうち、Form投入設定されていないデータは上書きしない。
- $sqlval = SC_Utils_Ex::sfArrayIntersectKeys($arrList, $this->arrProductClassColumn);
+ $sqlval = Utils::sfArrayIntersectKeys($arrList, $this->arrProductClassColumn);
if ($product_class_id == '') {
// 新規登録
@@ -514,7 +515,7 @@ public function lfRegistProductClass($objQuery, $arrList, $product_id, $product_
* FIXME: 商品規格登録の実処理自体は、LC_Page_Admin_Products_Productと共通化して欲しい。
* DELETE/INSERT ではなく UPDATEへの変更も・・・
*
- * @param SC_Query $objQuery SC_Queryインスタンス
+ * @param Query $objQuery Queryインスタンス
* @param array $arrList 商品規格情報配列
* @param integer $product_id 商品ID
* @return void
@@ -679,7 +680,7 @@ public function lfCheckErrorDetail($item, $arrErr)
if ($item['product_id'] == '') {
$arrErr['product_class_id'] = '※ 商品規格ID指定時には商品IDの指定が必須です。';
} else {
- if (!$this->objDb->sfIsRecord('dtb_products_class', 'product_id, product_class_id',
+ if (!$this->objDb->isRecord('dtb_products_class', 'product_id, product_class_id',
array($item['product_id'], $item['product_class_id']))
) {
$arrErr['product_class_id'] = '※ 指定の商品IDと商品規格IDの組合せは正しくありません。';
@@ -688,7 +689,7 @@ public function lfCheckErrorDetail($item, $arrErr)
// product_class_idは(product_id, classcategory_id1, classcategory_id2)に対して一意。既に異なるproduct_class_idが存在した場合はエラー
$classcategory_id1 = $item['classcategory_id'] ? $item['classcategory_id'] : 0;
$classcategory_id2 = $item['parent_classcategory_id'] ? $item['parent_classcategory_id'] : 0;
- $product_class_id = SC_Utils_Ex::sfGetProductClassId($item['product_id'], $classcategory_id1, $classcategory_id2);
+ $product_class_id = Utils::sfGetProductClassId($item['product_id'], $classcategory_id1, $classcategory_id2);
if ($product_class_id && $product_class_id != $item['product_class_id']) {
$arrErr['product_class_id'] = '※ 指定の商品ID/規格分類と、商品規格IDの組合せは正しくありません。';
}
@@ -717,7 +718,7 @@ public function lfCheckErrorDetail($item, $arrErr)
if ((array_search($recommend_product_id_key, $this->arrFormKeyList) !== FALSE)
&& ($item[$recommend_product_id_key] != '')) {
// 商品IDの存在チェック
- if (!$this->objDb->sfIsRecord('dtb_products', 'product_id', (array) $item[$recommend_product_id_key])) {
+ if (!$this->objDb->isRecord('dtb_products', 'product_id', (array) $item[$recommend_product_id_key])) {
$arrErr[$recommend_product_id_key] = "※ 指定の関連商品ID($i)は、登録されていません。";
continue;
}
@@ -860,9 +861,9 @@ public function lfIsDbRecordMulti($table, $tblkey, $keyname, $item, $delimiter =
return false;
}
$count = count($arrItems);
- $where = $tblkey .' IN (' . SC_Utils_Ex::repeatStrWithSeparator('?', $count) . ')';
+ $where = $tblkey .' IN (' . Utils::repeatStrWithSeparator('?', $count) . ')';
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$db_count = $objQuery->count($table, $where, $arrItems);
if ($count != $db_count) {
return false;
@@ -883,7 +884,7 @@ public function lfIsDbRecord($table, $keyname, $item)
{
if (array_search($keyname, $this->arrFormKeyList) !== FALSE //入力対象である
&& $item[$keyname] != '' // 空ではない
- && !$this->objDb->sfIsRecord($table, $keyname, (array) $item[$keyname]) //DBに存在するか
+ && !$this->objDb->isRecord($table, $keyname, (array) $item[$keyname]) //DBに存在するか
) {
return false;
}
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php b/data/Eccube/Page/Admin/Products/UploadCSVCategory.php
similarity index 87%
rename from data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php
rename to data/Eccube/Page/Admin/Products/UploadCSVCategory.php
index ae38a4f2416..ca30ffaa7f1 100644
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_UploadCSVCategory.php
+++ b/data/Eccube/Page/Admin/Products/UploadCSVCategory.php
@@ -1,27 +1,27 @@
tpl_subtitle = 'カテゴリ登録CSV';
$this->csv_id = '5';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrAllowedTag = $masterData->getMasterData('mtb_allowed_tag');
$this->arrTagCheckItem = array();
}
@@ -111,7 +110,7 @@ public function process()
public function action()
{
// CSV管理ヘルパー
- $objCSV = new SC_Helper_CSV_Ex();
+ $objCSV = new CsvHelper();
// CSV構造読み込み
$arrCSVFrame = $objCSV->sfGetCsvOutput($this->csv_id);
@@ -125,14 +124,14 @@ public function action()
$this->tpl_is_update = $objCSV->sfIsUpdateCSVFrame($arrCSVFrame);
// CSVファイルアップロード情報の初期化
- $objUpFile = new SC_UploadFile_Ex(CSV_TEMP_REALDIR, CSV_TEMP_REALDIR);
+ $objUpFile = new UploadFile(CSV_TEMP_REALDIR, CSV_TEMP_REALDIR);
$this->lfInitFile($objUpFile);
// パラメーター情報の初期化
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam, $arrCSVFrame);
- $this->max_upload_csv_size = SC_Utils_Ex::getUnitDataSize(CSV_SIZE);
+ $this->max_upload_csv_size = Utils::getUnitDataSize(CSV_SIZE);
$objFormParam->setHtmlDispNameArray();
$this->arrTitle = $objFormParam->getHtmlDispNameArray();
@@ -174,8 +173,8 @@ public function addRowErr($line_count, $message)
/**
* CSVアップロードを実行する
*
- * @param SC_FormParam $objFormParam
- * @param SC_UploadFile $objUpFile
+ * @param FormParam $objFormParam
+ * @param UploadFile $objUpFile
* @return void
*/
public function doUploadCsv(&$objFormParam, &$objUpFile)
@@ -191,12 +190,12 @@ public function doUploadCsv(&$objFormParam, &$objUpFile)
// 一時ファイル名の取得
$filepath = $objUpFile->getTempFilePath('csv_file');
// CSVファイルの文字コード変換
- $enc_filepath = SC_Utils_Ex::sfEncodeFile($filepath, CHAR_CODE, CSV_TEMP_REALDIR);
+ $enc_filepath = Utils::sfEncodeFile($filepath, CHAR_CODE, CSV_TEMP_REALDIR);
// CSVファイルのオープン
$fp = fopen($enc_filepath, 'r');
// 失敗した場合はエラー表示
if (!$fp) {
- SC_Utils_Ex::sfDispError('');
+ Utils::sfDispError('');
}
// 登録先テーブル カラム情報の初期化
@@ -210,7 +209,7 @@ public function doUploadCsv(&$objFormParam, &$objUpFile)
// 行数
$line_count = 0;
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
$errFlag = false;
@@ -268,8 +267,8 @@ public function doUploadCsv(&$objFormParam, &$objUpFile)
$objQuery->commit();
// カテゴリ件数を更新
- $objDb = new SC_Helper_DB_Ex();
- $objDb->sfCountCategory($objQuery);
+ $objDb = new DbHelper();
+ $objDb->countCategory($objQuery);
return;
}
@@ -277,10 +276,10 @@ public function doUploadCsv(&$objFormParam, &$objUpFile)
/**
* ファイル情報の初期化を行う.
*
- * @param SC_UploadFile $objUpFile
+ * @param UploadFile $objUpFile
* @return void
*/
- public function lfInitFile(SC_UploadFile &$objUpFile)
+ public function lfInitFile(UploadFile &$objUpFile)
{
$objUpFile->addFile('CSVファイル', 'csv_file', array('csv'), CSV_SIZE, true, 0, 0, false);
}
@@ -288,11 +287,11 @@ public function lfInitFile(SC_UploadFile &$objUpFile)
/**
* 入力情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @param array $arrCSVFrame CSV構造設定配列
* @return void
*/
- public function lfInitParam(SC_FormParam &$objFormParam, &$arrCSVFrame)
+ public function lfInitParam(FormParam &$objFormParam, &$arrCSVFrame)
{
// 固有の初期値調整
$arrCSVFrame = $this->lfSetParamDefaultValue($arrCSVFrame);
@@ -336,14 +335,14 @@ public function lfInitParam(SC_FormParam &$objFormParam, &$arrCSVFrame)
/**
* 入力チェックを行う.
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return array
*/
- public function lfCheckError(SC_FormParam &$objFormParam)
+ public function lfCheckError(FormParam &$objFormParam)
{
// 入力データを渡す。
$arrRet = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrRet);
+ $objErr = new CheckError($arrRet);
$objErr->arrErr = $objFormParam->checkError(false);
// HTMLタグチェックの実行
foreach ($this->arrTagCheckItem as $item) {
@@ -364,7 +363,7 @@ public function lfCheckError(SC_FormParam &$objFormParam)
*/
public function lfInitTableInfo()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$this->arrRegistColumn = $objQuery->listTableFields('dtb_category');
}
@@ -374,22 +373,22 @@ public function lfInitTableInfo()
* FIXME: 登録の実処理自体は、LC_Page_Admin_Products_Categoryと共通化して欲しい。
*
* @param integer $line 処理中の行数
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @return integer カテゴリID
*/
- public function lfRegisterCategory($line, SC_FormParam &$objFormParam)
+ public function lfRegisterCategory($line, FormParam &$objFormParam)
{
// 登録データ対象取得
$arrList = $objFormParam->getDbArray();
// 登録情報を生成する。
// テーブルのカラムに存在しているもののうち、Form投入設定されていないデータは上書きしない。
- $sqlval = SC_Utils_Ex::sfArrayIntersectKeys($arrList, $this->arrRegistColumn);
+ $sqlval = Utils::sfArrayIntersectKeys($arrList, $this->arrRegistColumn);
// 必須入力では無い項目だが、空文字では問題のある特殊なカラム値の初期値設定
$sqlval = $this->lfSetCategoryDefaultData($sqlval);
- $objCategory = new SC_Helper_Category_Ex();
+ $objCategory = new CategoryHelper();
$category_id = $objCategory->save($sqlval);
return $category_id;
@@ -449,7 +448,7 @@ public function lfSetCategoryDefaultData(&$sqlval)
*/
public function lfCheckErrorDetail($item, $arrErr)
{
- $objCategory = new SC_Helper_Category_Ex();
+ $objCategory = new CategoryHelper();
// スタティック変数を初期化
$objCategory->getTree(true);
/*
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_AdminArea.php b/data/Eccube/Page/Admin/System/AdminArea.php
similarity index 86%
rename from data/class/pages/admin/system/LC_Page_Admin_System_AdminArea.php
rename to data/Eccube/Page/Admin/System/AdminArea.php
index 5e43a830d40..c726633c49a 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System_AdminArea.php
+++ b/data/Eccube/Page/Admin/System/AdminArea.php
@@ -1,27 +1,20 @@
tpl_enable_ssl = TRUE;
}
- $objFormParam = new SC_FormParam_Ex;
+ $objFormParam = new FormParam;
// パラメーターの初期化
$this->initParam($objFormParam, $_POST);
@@ -89,7 +82,7 @@ public function action()
//管理画面ディレクトリのチェック
$this->lfCheckAdminArea($this->arrForm, $arrErr);
- if (SC_Utils_Ex::isBlank($arrErr) && $this->lfUpdateAdminData($this->arrForm)) {
+ if (Utils::isBlank($arrErr) && $this->lfUpdateAdminData($this->arrForm)) {
$this->tpl_onload = "window.alert('管理機能の設定を変更しました。URLを変更した場合は、新しいURLにアクセスしてください。');";
} else {
$this->tpl_onload = "window.alert('設定内容に誤りがあります。設定内容を確認してください。');";
@@ -110,7 +103,7 @@ public function action()
/**
* パラメーター初期化.
*
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @param array $arrParams $_POST値
* @return void
*/
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Bkup.php b/data/Eccube/Page/Admin/System/Bkup.php
similarity index 87%
rename from data/class/pages/admin/system/LC_Page_Admin_System_Bkup.php
rename to data/Eccube/Page/Admin/System/Bkup.php
index e361c99c5c6..588b489657c 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System_Bkup.php
+++ b/data/Eccube/Page/Admin/System/Bkup.php
@@ -1,36 +1,32 @@
initParam($objFormParam, $_POST);
@@ -97,22 +93,22 @@ public function action()
$arrErrTmp[1] = $objFormParam->checkError();
// データ型に問題がない場合
- if (SC_Utils_Ex::isBlank($arrErrTmp[1])) {
+ if (Utils::isBlank($arrErrTmp[1])) {
// データ型以外のエラーチェック
$arrErrTmp[2] = $this->lfCheckError($objFormParam->getHashArray(), $this->mode);
}
// エラーがなければバックアップ処理を行う
- if (SC_Utils_Ex::isBlank($arrErrTmp[1]) && SC_Utils_Ex::isBlank($arrErrTmp[2])) {
+ if (Utils::isBlank($arrErrTmp[1]) && Utils::isBlank($arrErrTmp[2])) {
$arrData = $objFormParam->getHashArray();
$work_dir = $this->bkup_dir . $arrData['bkup_name'] . '/';
// バックアップデータの事前削除
- SC_Helper_FileManager_Ex::deleteFile($work_dir);
+ FileManagerHelper::deleteFile($work_dir);
// バックアップファイル作成
$res = $this->lfCreateBkupData($arrData['bkup_name'], $work_dir);
// バックアップデータの事後削除
- SC_Helper_FileManager_Ex::deleteFile($work_dir);
+ FileManagerHelper::deleteFile($work_dir);
$arrErrTmp[3] = array();
if ($res !== true) {
@@ -120,7 +116,7 @@ public function action()
}
// DBにデータ更新
- if (SC_Utils_Ex::isBlank($arrErrTmp[3])) {
+ if (Utils::isBlank($arrErrTmp[3])) {
$this->lfUpdBkupData($arrData);
} else {
$arrForm = $arrData;
@@ -141,11 +137,11 @@ public function action()
$arrErr = $this->lfCheckError($objFormParam->getHashArray(), $this->mode);
// エラーがなければリストア処理を行う
- if (SC_Utils_Ex::isBlank($arrErr)) {
+ if (Utils::isBlank($arrErr)) {
$arrData = $objFormParam->getHashArray();
$msg = '「' . $arrData['list_name'] . '」のリストアを開始します。';
- GC_Utils_Ex::gfPrintLog($msg);
+ GcUtils::gfPrintLog($msg);
$success = $this->lfRestore($arrData['list_name'], $this->bkup_dir, $this->bkup_ext, $this->mode);
@@ -153,7 +149,7 @@ public function action()
$msg .= $success ? 'リストアを終了しました。' : 'リストアに失敗しました。';
$this->tpl_restore_msg .= $msg . "\n";
- GC_Utils_Ex::gfPrintLog($msg);
+ GcUtils::gfPrintLog($msg);
}
break;
@@ -164,7 +160,7 @@ public function action()
$arrErr = $this->lfCheckError($objFormParam->getHashArray(), $this->mode);
// エラーがなければリストア処理を行う
- if (SC_Utils_Ex::isBlank($arrErr)) {
+ if (Utils::isBlank($arrErr)) {
$arrData = $objFormParam->getHashArray();
// DBとファイルを削除
@@ -180,17 +176,17 @@ public function action()
$arrErr = $this->lfCheckError($objFormParam->getHashArray(), $this->mode);
// エラーがなければダウンロード処理を行う
- if (SC_Utils_Ex::isBlank($arrErr)) {
+ if (Utils::isBlank($arrErr)) {
$arrData = $objFormParam->getHashArray();
$filename = $arrData['list_name'] . $this->bkup_ext;
$dl_file = $this->bkup_dir.$arrData['list_name'] . $this->bkup_ext;
// ダウンロード開始
- SC_Response_Ex::headerForDownload($filename);
+ Response::headerForDownload($filename);
header('Content-Length: ' . filesize($dl_file));
readfile($dl_file);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
break;
}
@@ -212,7 +208,7 @@ public function action()
/**
* パラメーター初期化.
*
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @param array $arrParams $_POST値
* @return void
*/
@@ -271,7 +267,7 @@ public function lfCheckError(&$arrForm, $mode)
*/
public function lfCreateBkupData($bkup_name, $work_dir)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$csv_autoinc = '';
$arrData = array();
@@ -309,7 +305,7 @@ public function lfCreateBkupData($bkup_name, $work_dir)
}
// タイムアウトを防ぐ
- SC_Utils_Ex::sfFlush();
+ Utils::sfFlush();
}
// 自動採番型の構成を取得する
@@ -357,7 +353,7 @@ public function cbOutputCSV($data)
$this->output_header = false;
}
fputcsv($this->fpOutput, $data);
- SC_Utils_Ex::extendTimeOut();
+ Utils::extendTimeOut();
return true;
}
@@ -372,7 +368,7 @@ public function cbOutputCSV($data)
*/
public function lfGetAutoIncrement()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrSequences = $objQuery->listSequences();
foreach ($arrSequences as $name) {
@@ -380,7 +376,7 @@ public function lfGetAutoIncrement()
continue 1;
}
- // XXX SC_Query::currVal は、PostgreSQL で nextval と等しい値を戻すケースがある。欠番を生じうるが、さして問題無いと推測している。
+ // XXX Query::currVal は、PostgreSQL で nextval と等しい値を戻すケースがある。欠番を生じうるが、さして問題無いと推測している。
$seq = $objQuery->currVal($name);
// TODO CSV 生成の共通処理を使う
@@ -395,7 +391,7 @@ public function lfGetAutoIncrement()
// バックアップテーブルにデータを更新する
public function lfUpdBkupData($data)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrVal = array();
$arrVal['bkup_name'] = $data['bkup_name'];
@@ -410,7 +406,7 @@ public function lfUpdBkupData($data)
*/
public function lfGetBkupData($sql_option = '', $filter_bkup_name = '')
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// テーブルから取得
$arrVal = array();
@@ -464,7 +460,7 @@ public function lfGetBkupData($sql_option = '', $filter_bkup_name = '')
*/
public function lfRestore($bkup_name, $bkup_dir, $bkup_ext, $mode)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$bkup_filepath = $bkup_dir . $bkup_name . $bkup_ext;
$work_dir = $bkup_dir . $bkup_name . '/';
@@ -502,7 +498,7 @@ public function lfRestore($bkup_name, $bkup_dir, $bkup_ext, $mode)
// FIXME この辺りで、バックアップ時と同等の一時ファイルの削除を実行すべきでは?
- SC_Utils_Ex::extendTimeOut();
+ Utils::extendTimeOut();
return $success;
}
@@ -510,7 +506,7 @@ public function lfRestore($bkup_name, $bkup_dir, $bkup_ext, $mode)
/**
* CSVファイルからインサート実行.
*
- * @param SC_Query $objQuery
+ * @param Query $objQuery
* @param string $dir
* @param string $mode
* @return boolean
@@ -548,7 +544,7 @@ public function lfExeInsertSQL(&$objQuery, $dir, $mode)
trigger_error($file_name . ' のファイルオープンに失敗しました。', E_USER_ERROR);
}
- GC_Utils_Ex::gfPrintLog('リストア実行: ' . $table);
+ GcUtils::gfPrintLog('リストア実行: ' . $table);
$objQuery->delete($table);
$line = 0;
@@ -573,7 +569,7 @@ public function lfExeInsertSQL(&$objQuery, $dir, $mode)
$arrVal = array_combine($arrColName, $arrCsvLine);
$objQuery->insert($table, $arrVal);
- SC_Utils_Ex::extendTimeOut();
+ Utils::extendTimeOut();
}
fclose($fp);
@@ -585,7 +581,7 @@ public function lfExeInsertSQL(&$objQuery, $dir, $mode)
/**
* シーケンス生成器を復元する
* @param string $csv
- * @param SC_Query $objQuery
+ * @param Query $objQuery
*/
public function restoreSequence(&$objQuery, $csv)
{
@@ -609,7 +605,7 @@ public function restoreSequence(&$objQuery, $csv)
// 選択したバックアップをDBから削除
public function lfDeleteBackUp(&$arrForm, $bkup_dir, $bkup_ext)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$del_file = $bkup_dir.$arrForm['list_name'] . $bkup_ext;
// ファイルの削除
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Delete.php b/data/Eccube/Page/Admin/System/Delete.php
similarity index 70%
rename from data/class/pages/admin/system/LC_Page_Admin_System_Delete.php
rename to data/Eccube/Page/Admin/System/Delete.php
index 95c5b49dbcf..b8362f30c26 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System_Delete.php
+++ b/data/Eccube/Page/Admin/System/Delete.php
@@ -1,36 +1,31 @@
initParam($objFormParam, $_GET);
// パラメーターの検証
if ($objFormParam->checkError()
- || !SC_Utils_ex::sfIsInt($id = $objFormParam->getValue('id'))) {
- GC_Utils_Ex::gfPrintLog("error id=$id");
- SC_Utils_Ex::sfDispError(INVALID_MOVE_ERRORR);
+ || !Utils::sfIsInt($id = $objFormParam->getValue('id'))) {
+ GcUtils::gfPrintLog("error id=$id");
+ Utils::sfDispError(INVALID_MOVE_ERRORR);
}
$id = $objFormParam->getValue('id');
@@ -81,13 +76,13 @@ public function action()
$url = $this->getLocation(ADMIN_SYSTEM_URLPATH)
. '?pageno=' . $objFormParam->getValue('pageno');
- SC_Response_Ex::sendRedirect($url);
+ Response::sendRedirect($url);
}
/**
* パラメーター初期化.
*
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @param array $arrParams $_GET値
* @return void
*/
@@ -106,7 +101,7 @@ public function initParam(&$objFormParam, &$arrParams)
*/
public function deleteMember($id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->begin();
$this->renumberRank($objQuery, $id);
@@ -118,7 +113,7 @@ public function deleteMember($id)
/**
* ランキングの振り直し.
*
- * @param SC_Query $objQuery
+ * @param Query $objQuery
* @param integer $id 削除対象のmember_id
* @return void|UPDATE の結果フラグ
*/
@@ -138,7 +133,7 @@ public function renumberRank(&$objQuery, $id)
/**
* レコードの削除(削除フラグをONにする).
*
- * @param SC_Query $objQuery
+ * @param Query $objQuery
* @param integer $id 削除対象のmember_id
* @return void|UPDATE の結果フラグ
*/
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php b/data/Eccube/Page/Admin/System/Editdb.php
similarity index 83%
rename from data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php
rename to data/Eccube/Page/Admin/System/Editdb.php
index 8455fc48456..e83f5a7ffde 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System_Editdb.php
+++ b/data/Eccube/Page/Admin/System/Editdb.php
@@ -1,36 +1,29 @@
initForm($objFormParam, $_POST);
@@ -88,7 +81,7 @@ public function action()
/**
* フォームパラメーター初期化
*
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @param array $arrParams $_POST値
* @return void
*/
@@ -103,11 +96,11 @@ public function initForm(&$objFormParam, &$arrParams)
}
/**
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfDoChange(&$objFormParam)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrTarget = $this->lfGetTargetData($objFormParam);
$message = '';
if (is_array($arrTarget) && count($arrTarget) == 0) {
@@ -134,11 +127,11 @@ public function lfDoChange(&$objFormParam)
}
/**
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfGetTargetData(&$objFormParam)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrIndexFlag = $objFormParam->getValue('indexflag');
$arrIndexFlagNew = $objFormParam->getValue('indexflag_new');
$arrTableName = $objFormParam->getValue('table_name');
@@ -153,7 +146,7 @@ public function lfGetTargetData(&$objFormParam)
'indexflag_new' => $arrIndexFlagNew[$i],
'table_name' => $arrTableName[$i],
'column_name' => $arrColumnName[$i]);
- $objErr = new SC_CheckError_Ex($param);
+ $objErr = new CheckError($param);
$objErr->doFunc(array('インデックス(' . $i . ')', 'indexflag', INT_LEN), array('NUM_CHECK'));
$objErr->doFunc(array('インデックス変更後(' . $i . ')', 'indexflag_new', INT_LEN), array('NUM_CHECK'));
$objErr->doFunc(array('インデックス変更後(' . $i . ')', 'indexflag_new', INT_LEN), array('NUM_CHECK'));
@@ -185,7 +178,7 @@ public function lfGetTargetData(&$objFormParam)
public function lfGetIndexList()
{
// データベースからインデックス設定一覧を取得する
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setOrder('table_name, column_name');
$arrIndexList = $objQuery->select('table_name , column_name , recommend_flg, recommend_comment', 'dtb_index_list');
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System.php b/data/Eccube/Page/Admin/System/Index.php
similarity index 78%
rename from data/class/pages/admin/system/LC_Page_Admin_System.php
rename to data/Eccube/Page/Admin/System/Index.php
index 7717776d026..1a2ed4c2a01 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System.php
+++ b/data/Eccube/Page/Admin/System/Index.php
@@ -1,36 +1,30 @@
tpl_maintitle = 'システム設定';
$this->tpl_subtitle = 'メンバー管理';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrAUTHORITY = $masterData->getMasterData('mtb_authority');
$this->arrWORK = $masterData->getMasterData('mtb_work');
}
@@ -84,7 +78,7 @@ public function action()
// ページ送りの処理 $_GET['pageno']が信頼しうる値かどうかチェックする。
$pageno = $this->lfCheckPageNo($_GET['pageno']);
- $objNavi = new SC_PageNavi_Ex($pageno, $linemax, MEMBER_PMAX, 'eccube.moveMemberPage', NAVI_PMAX);
+ $objNavi = new PageNavi($pageno, $linemax, MEMBER_PMAX, 'eccube.moveMemberPage', NAVI_PMAX);
$this->tpl_strnavi = $objNavi->strnavi;
$this->tpl_disppage = $objNavi->now_page;
$this->tpl_pagemax = $objNavi->max_page;
@@ -104,7 +98,7 @@ public function action()
*/
public function getMemberCount($where)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$table = 'dtb_member';
return $objQuery->count($table, $where);
@@ -122,7 +116,7 @@ public function getMemberData($startno)
$col = 'member_id,name,department,login_id,authority,rank,work';
$from = 'dtb_member';
$where = 'del_flg <> 1 AND member_id <> ?';
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setOrder('rank DESC');
$objQuery->setLimitOffset(MEMBER_PMAX, $startno);
$arrMemberData = $objQuery->select($col, $from, $where, array(ADMIN_ID));
@@ -164,7 +158,7 @@ public function lfCheckPageNo($pageno)
$clean_pageno = '';
// $pagenoが0以上の整数かチェック
- if (SC_Utils_Ex::sfIsInt($pageno) && $pageno > 0) {
+ if (Utils::sfIsInt($pageno) && $pageno > 0) {
$clean_pageno = $pageno;
// 例外は全て1とする
} else {
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Input.php b/data/Eccube/Page/Admin/System/Input.php
similarity index 87%
rename from data/class/pages/admin/system/LC_Page_Admin_System_Input.php
rename to data/Eccube/Page/Admin/System/Input.php
index c406ae1cdd2..ed07f55fe51 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System_Input.php
+++ b/data/Eccube/Page/Admin/System/Input.php
@@ -1,36 +1,31 @@
tpl_mainpage = 'system/input.tpl';
// マスターデータから権限配列を取得
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrAUTHORITY = $masterData->getMasterData('mtb_authority');
$this->arrWORK = $masterData->getMasterData('mtb_work');
@@ -70,7 +65,7 @@ public function process()
*/
public function action()
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// ページ送りの処理 $_REQUEST['pageno']が信頼しうる値かどうかチェックする。
$this->tpl_pageno = $this->lfCheckPageNo($_REQUEST['pageno']);
@@ -87,7 +82,7 @@ public function action()
$arrErr = $this->validateData($objFormParam, $_POST, $this->getMode());
$this->arrForm = $objFormParam->getHashArray();
- if (SC_Utils_Ex::isBlank($arrErr)) {
+ if (Utils::isBlank($arrErr)) {
$this->insertMemberData($this->arrForm);
// 親ウィンドウを更新後、自ウィンドウを閉じる。
$url = ADMIN_SYSTEM_URLPATH . '?pageno=' . $this->arrForm['pageno'];
@@ -114,7 +109,7 @@ public function action()
$arrErr = $this->validateData($objFormParam, $_POST, $this->getMode());
$this->arrForm = $objFormParam->getHashArray();
- if (SC_Utils_Ex::isBlank($arrErr)) {
+ if (Utils::isBlank($arrErr)) {
$this->updateMemberData($this->arrForm['member_id'], $this->arrForm);
// 親ウィンドウを更新後、自ウィンドウを閉じる。
$url = ADMIN_SYSTEM_URLPATH . '?pageno=' . $this->arrForm['pageno'];
@@ -141,7 +136,7 @@ public function action()
$clean_mode_flg = 'new';
// idが0より大きい数字で整数の場合
- if (isset($_GET['id']) && SC_Utils_Ex::sfIsInt($_GET['id']) && $_GET['id'] > 0) {
+ if (isset($_GET['id']) && Utils::sfIsInt($_GET['id']) && $_GET['id'] > 0) {
if ($this->memberDataExists('member_id = ? AND del_flg = 0', $_GET['id'])) {
$clean_id = $_GET['id'];
$clean_mode_flg = 'edit';
@@ -173,7 +168,7 @@ public function action()
/**
* フォームパラメーター初期化
*
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @param array $arrParams $_POST値
* @param string $mode editの時は指定
* @return void
@@ -205,7 +200,7 @@ public function initForm(&$objFormParam, &$arrParams, $mode = '')
*
* @param void
* @param string|null $mode
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @return array エラー情報の連想配列
*/
public function validateData(&$objFormParam, &$arrParams, $mode)
@@ -214,7 +209,7 @@ public function validateData(&$objFormParam, &$arrParams, $mode)
if (isset($arrErr) && count($arrErr) > 0) return $arrErr;
// ログインID・パスワードの文字数チェック
- $objErr = new SC_CheckError_Ex();
+ $objErr = new CheckError();
if ($mode == 'new') {
$objErr->doFunc(array('パスワード', 'password', ID_MIN_LEN, ID_MAX_LEN), array('NUM_RANGE_CHECK'));
$objErr->doFunc(array('ログインID', 'login_id', ID_MIN_LEN, ID_MAX_LEN), array('NUM_RANGE_CHECK'));
@@ -263,7 +258,7 @@ public function getMemberData($id)
$columns = 'name,department,login_id,authority, work';
$where = 'member_id = ?';
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
return $objQuery->getRow($columns, $table, $where, array($id));
}
@@ -277,7 +272,7 @@ public function getMemberData($id)
*/
public function memberDataExists($where, $val)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$table = 'dtb_member';
@@ -298,7 +293,7 @@ public function lfCheckPageNo($pageno)
$clean_pageno = '';
// $pagenoが0以上の整数かチェック
- if (SC_Utils_Ex::sfIsInt($pageno) && $pageno > 0) {
+ if (Utils::sfIsInt($pageno) && $pageno > 0) {
$clean_pageno = $pageno;
// 例外は全て1とする
} else {
@@ -316,15 +311,15 @@ public function lfCheckPageNo($pageno)
*/
public function insertMemberData($arrMemberData)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// INSERTする値を作成する.
- $salt = SC_Utils_Ex::sfGetRandomString(10);
+ $salt = Utils::sfGetRandomString(10);
$sqlVal = array();
$sqlVal['name'] = $arrMemberData['name'];
$sqlVal['department'] = $arrMemberData['department'];
$sqlVal['login_id'] = $arrMemberData['login_id'];
- $sqlVal['password'] = SC_Utils_Ex::sfGetHashString($arrMemberData['password'], $salt);
+ $sqlVal['password'] = Utils::sfGetHashString($arrMemberData['password'], $salt);
$sqlVal['salt'] = $salt;
$sqlVal['authority'] = $arrMemberData['authority'];
$sqlVal['rank'] = $objQuery->max('rank', 'dtb_member') + 1;
@@ -347,7 +342,7 @@ public function insertMemberData($arrMemberData)
*/
public function updateMemberData($member_id, $arrMemberData)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// Updateする値を作成する.
$sqlVal = array();
@@ -358,9 +353,9 @@ public function updateMemberData($member_id, $arrMemberData)
$sqlVal['work'] = $arrMemberData['work'];
$sqlVal['update_date'] = 'CURRENT_TIMESTAMP';
if ($arrMemberData['password'] != DEFAULT_PASSWORD) {
- $salt = SC_Utils_Ex::sfGetRandomString(10);
+ $salt = Utils::sfGetRandomString(10);
$sqlVal['salt'] = $salt;
- $sqlVal['password'] = SC_Utils_Ex::sfGetHashString($arrMemberData['password'], $salt);
+ $sqlVal['password'] = Utils::sfGetHashString($arrMemberData['password'], $salt);
}
$where = 'member_id = ?';
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Log.php b/data/Eccube/Page/Admin/System/Log.php
similarity index 83%
rename from data/class/pages/admin/system/LC_Page_Admin_System_Log.php
rename to data/Eccube/Page/Admin/System/Log.php
index 495c0536d38..10ab5d62244 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System_Log.php
+++ b/data/Eccube/Page/Admin/System/Log.php
@@ -1,36 +1,27 @@
lfInitParam($objFormParam);
@@ -92,7 +83,7 @@ public function action()
/**
* パラメーターの初期化.
*
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @return void
*/
public function lfInitParam(&$objFormParam)
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Masterdata.php b/data/Eccube/Page/Admin/System/Masterdata.php
similarity index 81%
rename from data/class/pages/admin/system/LC_Page_Admin_System_Masterdata.php
rename to data/Eccube/Page/Admin/System/Masterdata.php
index 52ee4b4968c..34c86e5db9c 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System_Masterdata.php
+++ b/data/Eccube/Page/Admin/System/Masterdata.php
@@ -1,36 +1,30 @@
arrMasterDataName = $this->getMasterDataNames(array('mtb_pref', 'mtb_zip', 'mtb_constants'));
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
switch ($this->getMode()) {
case 'edit':
@@ -110,7 +104,7 @@ public function checkMasterDataName(&$arrParams, &$arrMasterDataName)
return $master_data_name;
} else {
- SC_Utils_Ex::sfDispError('');
+ Utils::sfDispError('');
}
}
@@ -124,7 +118,7 @@ public function checkMasterDataName(&$arrParams, &$arrMasterDataName)
*/
public function getMasterDataNames($ignores = array())
{
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
$arrMasterDataName = $dbFactory->findTableNames('mtb_');
$i = 0;
@@ -169,7 +163,7 @@ public function checkUniqueID(&$arrParams)
*
* @access private{
* @param array $arrParams $_POST値
- * @param SC_DB_MasterData_Ex $masterData SC_DB_MasterData_Ex()
+ * @param MasterData $masterData MasterData()
* @param string $master_data_name 登録対象のマスターデータのテーブル名
* @return void
*/
@@ -184,7 +178,7 @@ public function registMasterData($arrParams, &$masterData, $master_data_name)
}
// マスターデータを更新
- $masterData->objQuery =& SC_Query_Ex::getSingletonInstance();
+ $masterData->objQuery = Query::getSingletonInstance();
$masterData->objQuery->begin();
$masterData->deleteMasterData($master_data_name, false);
// TODO カラム名はメタデータから取得した方が良い
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Parameter.php b/data/Eccube/Page/Admin/System/Parameter.php
similarity index 73%
rename from data/class/pages/admin/system/LC_Page_Admin_System_Parameter.php
rename to data/Eccube/Page/Admin/System/Parameter.php
index 18b54d80e1d..aac815f88d4 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System_Parameter.php
+++ b/data/Eccube/Page/Admin/System/Parameter.php
@@ -1,36 +1,29 @@
arrKeys = $this->getParamKeys($masterData);
@@ -91,7 +84,7 @@ public function action()
$this->update($this->arrKeys, $this->arrForm);
$this->tpl_onload = "window.alert('パラメーターの設定が完了しました。');";
} else {
- $this->arrValues = SC_Utils_Ex::getHash2Array($this->arrForm, $this->arrKeys);
+ $this->arrValues = Utils::getHash2Array($this->arrForm, $this->arrKeys);
$this->tpl_onload = "window.alert('エラーが発生しました。入力内容をご確認下さい。');";
}
break;
@@ -100,11 +93,11 @@ public function action()
}
if (empty($this->arrErr)) {
- $this->arrValues = SC_Utils_Ex::getHash2Array($masterData->getDBMasterData('mtb_constants'));
+ $this->arrValues = Utils::getHash2Array($masterData->getDBMasterData('mtb_constants'));
}
// コメント, 値の配列を生成
- $this->arrComments = SC_Utils_Ex::getHash2Array($masterData->getDBMasterData('mtb_constants',
+ $this->arrComments = Utils::getHash2Array($masterData->getDBMasterData('mtb_constants',
array('id', 'remarks', 'rank')));
}
@@ -119,7 +112,7 @@ public function action()
public function update(&$arrKeys, &$arrForm)
{
$data = array();
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
foreach ($arrKeys as $key) {
$data[$key] = $arrForm[$key];
}
@@ -140,7 +133,7 @@ public function update(&$arrKeys, &$arrForm)
*/
public function errorCheck(&$arrKeys, &$arrForm)
{
- $objErr = new SC_CheckError_Ex($arrForm);
+ $objErr = new CheckError($arrForm);
for ($i = 0; $i < count($arrKeys); $i++) {
$objErr->doFunc(array($arrKeys[$i],
$arrForm[$arrKeys[$i]]),
@@ -154,7 +147,7 @@ public function errorCheck(&$arrKeys, &$arrForm)
* パラメーターのキーを配列で返す.
*
* @access private
- * @param SC_DB_MasterData_Ex $masterData
+ * @param MasterData $masterData
* @return array パラメーターのキーの配列
*/
public function getParamKeys(&$masterData)
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_Rank.php b/data/Eccube/Page/Admin/System/Rank.php
similarity index 77%
rename from data/class/pages/admin/system/LC_Page_Admin_System_Rank.php
rename to data/Eccube/Page/Admin/System/Rank.php
index 1d03c083089..a8db1a20071 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System_Rank.php
+++ b/data/Eccube/Page/Admin/System/Rank.php
@@ -1,36 +1,30 @@
getOne('SELECT rank FROM dtb_member WHERE member_id = ?', array($id));
@@ -133,7 +127,7 @@ public function lfRunkUp($id)
// ランキングを下げる。
public function lfRunkDown($id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
// 自身のランクを取得する。
$rank = $objQuery->getOne('SELECT rank FROM dtb_member WHERE member_id = ?', array($id));
diff --git a/data/class/pages/admin/system/LC_Page_Admin_System_System.php b/data/Eccube/Page/Admin/System/System.php
similarity index 72%
rename from data/class/pages/admin/system/LC_Page_Admin_System_System.php
rename to data/Eccube/Page/Admin/System/System.php
index c9193cbc579..64ca277ed0c 100644
--- a/data/class/pages/admin/system/LC_Page_Admin_System_System.php
+++ b/data/Eccube/Page/Admin/System/System.php
@@ -1,36 +1,29 @@
initForm($objFormParam, $_GET);
switch ($this->getMode()) {
// PHP INFOを表示
case 'info':
phpinfo();
- SC_Response_Ex::actionExit();
+ Response::actionExit();
break;
default:
@@ -85,7 +78,7 @@ public function action()
/**
* フォームパラメーター初期化.
*
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @param array $arrParams $_GET値
* @return void
*/
@@ -102,7 +95,7 @@ public function initForm(&$objFormParam, &$arrParams)
*/
public function getSystemInfo()
{
- $objDB = SC_DB_DBFactory_Ex::getInstance();
+ $objDB = DBFactory::getInstance();
$arrSystemInfo = array(
array('title' => 'EC-CUBE', 'value' => ECCUBE_VERSION),
diff --git a/data/class/pages/admin/total/LC_Page_Admin_Total.php b/data/Eccube/Page/Admin/Total/Index.php
similarity index 92%
rename from data/class/pages/admin/total/LC_Page_Admin_Total.php
rename to data/Eccube/Page/Admin/Total/Index.php
index 66cf51dc9d3..b415dbadd87 100644
--- a/data/class/pages/admin/total/LC_Page_Admin_Total.php
+++ b/data/Eccube/Page/Admin/Total/Index.php
@@ -1,35 +1,37 @@
tpl_maintitle = '売上集計';
$this->tpl_mainno = 'total';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrWDAY = $masterData->getMasterData('mtb_wday');
$this->arrSex = $masterData->getMasterData('mtb_sex');
$this->arrJob = $masterData->getMasterData('mtb_job');
// 登録・更新日検索用
- $objDate = new SC_Date_Ex();
+ $objDate = new Date();
$objDate->setStartYear(RELEASE_YEAR);
$objDate->setEndYear(DATE('Y'));
$this->arrYear = $objDate->getYear();
@@ -107,7 +109,7 @@ public function action()
}
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター情報の初期化
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_REQUEST);
@@ -137,14 +139,14 @@ public function action()
if ($this->getMode() == 'csv') {
// CSV出力タイトル行の取得
list($arrTitleCol, $arrDataCol) = $this->lfGetCSVColum($page);
- $head = SC_Utils_Ex::sfGetCSVList($arrTitleCol);
+ $head = Utils::sfGetCSVList($arrTitleCol);
$data = $this->lfGetDataColCSV($this->arrResults, $arrDataCol);
// CSVを送信する。
- list($fime_name, $data) = SC_Utils_Ex::sfGetCSVData($head.$data);
+ list($fime_name, $data) = Utils::sfGetCSVData($head.$data);
$this->sendResponseCSV($fime_name, $data);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
}
break;
@@ -191,7 +193,7 @@ public function lfGetDateDefault()
/* パラメーター情報の初期化 */
/**
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfInitParam(&$objFormParam)
{
@@ -219,12 +221,12 @@ public function lfInitParam(&$objFormParam)
/* 入力内容のチェック */
/**
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfCheckError(&$objFormParam)
{
$objFormParam->convParam();
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->arrErr = $objFormParam->checkError();
// 特殊項目チェック
@@ -274,7 +276,7 @@ public function lfGetDateInit()
/* フォームで入力された日付を適切な形にする */
/**
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfSetStartEndDate(&$objFormParam)
{
@@ -282,7 +284,7 @@ public function lfSetStartEndDate(&$objFormParam)
// 月度集計
if ($arrRet['search_form'] == 1) {
- list($sdate, $edate) = SC_Utils_Ex::sfTermMonth($arrRet['search_startyear_m'],
+ list($sdate, $edate) = Utils::sfTermMonth($arrRet['search_startyear_m'],
$arrRet['search_startmonth_m'],
CLOSE_DAY);
// 期間集計
@@ -310,7 +312,7 @@ public function lfGetGraphLine($arrResults, $keyname, $type, $xtitle, $ytitle, $
// 結果が0行以上ある場合のみグラフを生成する。
if (count($arrResults) > 0 && $this->install_GD) {
// グラフの生成
- $arrList = SC_Utils_Ex::sfArrKeyValue($arrResults, $keyname, 'total');
+ $arrList = Utils::sfArrKeyValue($arrResults, $keyname, 'total');
// 一時ファイル名の取得
$pngname = $this->lfGetGraphPng($type);
@@ -322,7 +324,7 @@ public function lfGetGraphLine($arrResults, $keyname, $type, $xtitle, $ytitle, $
if ($interval < 1) {
$interval = 1;
}
- $objGraphLine = new SC_Graph_Line();
+ $objGraphLine = new LineGraph();
// 値のセット
$objGraphLine->setData($arrList);
@@ -350,7 +352,7 @@ public function lfGetGraphLine($arrResults, $keyname, $type, $xtitle, $ytitle, $
// グラフの出力
if (DRAW_IMAGE) {
$objGraphLine->outputGraph();
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
// ファイルパスを返す
@@ -372,7 +374,7 @@ public function lfGetGraphPie($arrResults, $keyname, $type, $title = '', $sdate
// 結果が0行以上ある場合のみグラフを生成する。
if (count($arrResults) > 0 && $this->install_GD) {
// グラフの生成
- $arrList = SC_Utils_Ex::sfArrKeyValue($arrResults, $keyname,
+ $arrList = Utils::sfArrKeyValue($arrResults, $keyname,
'total', GRAPH_PIE_MAX,
GRAPH_LABEL_MAX);
@@ -380,7 +382,7 @@ public function lfGetGraphPie($arrResults, $keyname, $type, $title = '', $sdate
$pngname = $this->lfGetGraphPng($type);
$path = GRAPH_REALDIR . $pngname;
- $objGraphPie = new SC_Graph_Pie();
+ $objGraphPie = new PieGraph();
// データをセットする
$objGraphPie->setData($arrList);
@@ -400,7 +402,7 @@ public function lfGetGraphPie($arrResults, $keyname, $type, $title = '', $sdate
// グラフの出力
if (DRAW_IMAGE) {
$objGraphPie->outputGraph();
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
// ファイルパスを返す
@@ -425,13 +427,13 @@ public function lfGetGraphBar($arrResults, $keyname, $type, $xtitle, $ytitle, $s
// 結果が0行以上ある場合のみグラフを生成する。
if (count($arrResults) > 0 && $this->install_GD) {
// グラフの生成
- $arrList = SC_Utils_Ex::sfArrKeyValue($arrResults, $keyname, 'total', GRAPH_PIE_MAX, GRAPH_LABEL_MAX);
+ $arrList = Utils::sfArrKeyValue($arrResults, $keyname, 'total', GRAPH_PIE_MAX, GRAPH_LABEL_MAX);
// 一時ファイル名の取得
$pngname = $this->lfGetGraphPng($type);
$path = GRAPH_REALDIR . $pngname;
- $objGraphBar = new SC_Graph_Bar();
+ $objGraphBar = new BarGraph();
foreach ($arrList as $key => $value) {
$arrKey[] = preg_replace('/~/u', '-', $key);
@@ -455,7 +457,7 @@ public function lfGetGraphBar($arrResults, $keyname, $type, $xtitle, $ytitle, $s
if (DRAW_IMAGE) {
$objGraphBar->outputGraph();
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
// ファイルパスを返す
@@ -532,7 +534,7 @@ public function lfGetWhereMember($col_date, $sdate, $edate, $type, $col_member =
/** 会員別集計 **/
public function lfGetOrderMember($type, $sdate, $edate)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
list($where, $arrWhereVal) = $this->lfGetWhereMember('create_date', $sdate, $edate, $type);
$where .= ' AND del_flg = 0 AND status <> ?';
@@ -574,7 +576,7 @@ public function lfGetOrderMember($type, $sdate, $edate)
/** 商品別集計 **/
public function lfGetOrderProducts($type, $sdate, $edate)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
list($where, $arrWhereVal) = $this->lfGetWhereMember('create_date', $sdate, $edate, $type);
@@ -606,7 +608,7 @@ public function lfGetOrderProducts($type, $sdate, $edate)
/** 職業別集計 **/
public function lfGetOrderJob($type, $sdate, $edate)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
list($where, $arrWhereVal) = $this->lfGetWhereMember('dtb_order.create_date', $sdate, $edate, $type);
$col = <<< __EOS__
@@ -643,11 +645,11 @@ public function lfGetOrderJob($type, $sdate, $edate)
/** 年代別集計 **/
public function lfGetOrderAge($type, $sdate, $edate)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
list($where, $arrWhereVal) = $this->lfGetWhereMember('create_date', $sdate, $edate, $type);
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
$col = $dbFactory->getOrderTotalAgeColSql() . ' AS age';
$col .= ',COUNT(order_id) AS order_count';
$col .= ',SUM(total) AS total';
@@ -681,7 +683,7 @@ public function lfGetOrderAge($type, $sdate, $edate)
// todo あいだの日付埋める
public function lfGetOrderTerm($type, $sdate, $edate)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
list($where, $arrWhereVal) = $this->lfGetWhereMember('create_date', $sdate, $edate);
$where .= ' AND del_flg = 0 AND status <> ?';
@@ -716,7 +718,7 @@ public function lfGetOrderTerm($type, $sdate, $edate)
break;
}
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
// todo postgres
$col = $dbFactory->getOrderTotalDaysWhereSql($type);
@@ -837,7 +839,7 @@ public function lfGetDataColCSV($arrData, $arrDataCol)
if (($i === $max -1) && isset($arrRet[$i]['str_date'])) {
$arrRet[$i]['str_date'] = '合計';
}
- $csv_data.= SC_Utils_Ex::sfGetCSVList($arrRet[$i]);
+ $csv_data.= Utils::sfGetCSVList($arrRet[$i]);
}
return $csv_data;
diff --git a/data/Eccube/Page/Api/Index.php b/data/Eccube/Page/Api/Index.php
new file mode 100644
index 00000000000..1e1ff991fbc
--- /dev/null
+++ b/data/Eccube/Page/Api/Index.php
@@ -0,0 +1,61 @@
+action();
+// $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ $arrParam = $_REQUEST;
+
+ list($response_outer, $arrResponse) = Operation::doApiAction($arrParam);
+ Operation::sendApiResponse('xml', $response_outer, $arrResponse);
+ Response::actionExit();
+ }
+}
diff --git a/data/Eccube/Page/Api/Json.php b/data/Eccube/Page/Api/Json.php
new file mode 100644
index 00000000000..2b610c2cf91
--- /dev/null
+++ b/data/Eccube/Page/Api/Json.php
@@ -0,0 +1,66 @@
+action();
+// $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ $arrParam = $_REQUEST;
+
+ list($response_outer, $arrResponse) = Operation::doApiAction($arrParam);
+
+ if (isset($arrParam["callback"])) {
+ $arrResponse["callback"] = $arrParam["callback"];
+ }
+
+ Operation::sendApiResponse('json', $response_outer, $arrResponse);
+ Response::actionExit();
+ }
+}
diff --git a/data/Eccube/Page/Api/Php.php b/data/Eccube/Page/Api/Php.php
new file mode 100644
index 00000000000..e4e21842af9
--- /dev/null
+++ b/data/Eccube/Page/Api/Php.php
@@ -0,0 +1,61 @@
+action();
+// $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ $arrParam = $_REQUEST;
+
+ list($response_outer, $arrResponse) = Operation::doApiAction($arrParam);
+ Operation::sendApiResponse('php', $response_outer, $arrResponse);
+ Response::actionExit();
+ }
+}
diff --git a/data/Eccube/Page/Api/Xml.php b/data/Eccube/Page/Api/Xml.php
new file mode 100644
index 00000000000..cf877d17b54
--- /dev/null
+++ b/data/Eccube/Page/Api/Xml.php
@@ -0,0 +1,61 @@
+action();
+// $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ $arrParam = $_REQUEST;
+
+ list($response_outer, $arrResponse) = Operation::doApiAction($arrParam);
+ Operation::sendApiResponse('xml', $response_outer, $arrResponse);
+ Response::actionExit();
+ }
+}
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php b/data/Eccube/Page/Bloc/AbstractBloc.php
similarity index 53%
rename from data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php
rename to data/Eccube/Page/Bloc/AbstractBloc.php
index 3ec61883888..58ceb092545 100644
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc.php
+++ b/data/Eccube/Page/Bloc/AbstractBloc.php
@@ -1,37 +1,36 @@
tpl_authority = $_SESSION['authority'];
// ディスプレイクラス生成
- $this->objDisplay = new SC_Display_Ex();
+ $this->objDisplay = new Display();
$this->setTplMainpage($this->blocItems['tpl_path']);
@@ -53,7 +52,7 @@ public function init()
$this->setTokenTo();
// ローカルフックポイントを実行.
- $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
+ $objPlugin = PluginHelper::getSingletonInstance($this->plugin_activate_flg);
$this->doLocalHookpointBefore($objPlugin);
}
@@ -65,10 +64,10 @@ public function init()
*/
public function setTplMainpage($bloc_file)
{
- if (SC_Utils_Ex::isAbsoluteRealPath($bloc_file)) {
+ if (Utils::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->tpl_mainpage = PageLayoutHelper::getTemplatePath($this->objDisplay->detectDevice()) . BLOC_DIR . $bloc_file;
}
$this->setTemplate($this->tpl_mainpage);
diff --git a/data/Eccube/Page/Bloc/Calendar.php b/data/Eccube/Page/Bloc/Calendar.php
new file mode 100644
index 00000000000..ed4ba8ef746
--- /dev/null
+++ b/data/Eccube/Page/Bloc/Calendar.php
@@ -0,0 +1,94 @@
+action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ // カレンダーデータ取得
+ $this->arrCalendar = $this->lfGetCalendar(2);
+ }
+
+ /**
+ * カレンダー情報取得.
+ *
+ * @param integer $disp_month 表示する月数
+ * @return array カレンダー情報の配列を返す
+ */
+ public function lfGetCalendar($disp_month = 1)
+ {
+ $objDate = new Date();
+ $arrCalendar = array();
+ $today = date('Y/m/d');
+
+ for ($j = 0; $j <= $disp_month - 1; $j++) {
+ $time = mktime(0, 0, 0, date('n') + $j, 1);
+ $year = date('Y', $time);
+ $month = date('n', $time);
+
+ $objMonth = new \Calendar_Month_Weekdays($year, $month, 0);
+ $objMonth->build();
+ $i = 0;
+ while ($objDay = $objMonth->fetch()) {
+ $arrCalendar[$j][$i]['in_month'] = $month == $objDay->month;
+ $arrCalendar[$j][$i]['first'] = $objDay->first;
+ $arrCalendar[$j][$i]['last'] = $objDay->last;
+ $arrCalendar[$j][$i]['empty'] = $objDay->empty;
+ $arrCalendar[$j][$i]['year'] = $year;
+ $arrCalendar[$j][$i]['month'] = $month;
+ $arrCalendar[$j][$i]['day'] = $objDay->day;
+ $arrCalendar[$j][$i]['holiday'] = $objDate->isHoliday($year, $month, $objDay->day);
+ $arrCalendar[$j][$i]['today'] = $today === sprintf('%04d/%02d/%02d', $year, $month, $objDay->day);
+
+ $i++;
+ }
+ }
+
+ return $arrCalendar;
+ }
+}
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php b/data/Eccube/Page/Bloc/Cart.php
similarity index 64%
rename from data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php
rename to data/Eccube/Page/Bloc/Cart.php
index b164e2d55d0..02f9d0e431d 100644
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart.php
+++ b/data/Eccube/Page/Bloc/Cart.php
@@ -1,36 +1,28 @@
arrProductType = $masterData->getMasterData('mtb_product_type'); //商品種類を取得
}
@@ -62,7 +54,7 @@ public function process()
*/
public function action()
{
- $objCart = new SC_CartSession_Ex();
+ $objCart = new CartSession();
$this->isMultiple = $objCart->isMultiple();
$this->hasDownload = $objCart->hasProductType(PRODUCT_TYPE_DOWNLOAD);
// 旧仕様との互換のため、不自然なセットとなっている
@@ -72,10 +64,10 @@ public function action()
/**
* カートの情報を取得する
*
- * @param SC_CartSession $objCart カートセッション管理クラス
+ * @param Eccube\CartSession $objCart カートセッション管理クラス
* @return array カートデータ配列
*/
- public function lfGetCartData(&$objCart)
+ public function lfGetCartData(CartSession &$objCart)
{
$arrCartKeys = $objCart->getKeys();
foreach ($arrCartKeys as $cart_key) {
@@ -96,7 +88,7 @@ public function lfGetCartData(&$objCart)
$arrCartList['TotalQuantity'] = $total_quantity;
// 店舗情報の取得
- $arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
+ $arrInfo = DbHelper::getBasisData();
$arrCartList['free_rule'] = $arrInfo['free_rule'];
// 送料無料までの金額
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Category.php b/data/Eccube/Page/Bloc/Category.php
similarity index 77%
rename from data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Category.php
rename to data/Eccube/Page/Bloc/Category.php
index a673f2646f1..78428d6fc49 100644
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Category.php
+++ b/data/Eccube/Page/Bloc/Category.php
@@ -1,36 +1,30 @@
arrCat = $this->lfGetMainCat(true);
@@ -97,8 +91,8 @@ public function lfGetSelectedCategoryId($arrRequest)
$category_id = $arrRequest['category_id'];
}
// 選択中のカテゴリIDを判定する
- $objDb = new SC_Helper_DB_Ex();
- $arrCategoryId = $objDb->sfGetCategoryId($product_id, $category_id);
+ $objDb = new DbHelper();
+ $arrCategoryId = $objDb->getCategoryId($product_id, $category_id);
if (empty($arrCategoryId)) {
$arrCategoryId = array(0);
}
@@ -115,7 +109,7 @@ public function lfGetSelectedCategoryId($arrRequest)
*/
public function lfGetCatTree($arrParentCategoryId, $count_check = false)
{
- $objCategory = new SC_Helper_Category_Ex($count_check);
+ $objCategory = new CategoryHelper($count_check);
$arrTree = $objCategory->getTree();
$this->arrParentID = array();
@@ -136,7 +130,7 @@ public function lfGetCatTree($arrParentCategoryId, $count_check = false)
*/
public function lfGetMainCat($count_check = false)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = '*';
$from = 'dtb_category left join dtb_category_total_count ON dtb_category.category_id = dtb_category_total_count.category_id';
// メインカテゴリとその直下のカテゴリを取得する。
@@ -154,7 +148,7 @@ public function lfGetMainCat($count_check = false)
continue;
}
// 子カテゴリを持つかどうかを調べる。
- $arrChildrenID = SC_Utils_Ex::sfGetUnderChildrenArray(
+ $arrChildrenID = Utils::sfGetUnderChildrenArray(
$arrRet,
'parent_category_id',
'category_id',
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Login.php b/data/Eccube/Page/Bloc/Login.php
similarity index 65%
rename from data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Login.php
rename to data/Eccube/Page/Bloc/Login.php
index ccd2b59c817..cdc73830151 100644
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Login.php
+++ b/data/Eccube/Page/Bloc/Login.php
@@ -1,36 +1,29 @@
isLoginSuccess()) {
@@ -87,7 +80,7 @@ public function action()
$this->tpl_disable_logout = $this->lfCheckDisableLogout();
//スマートフォン版ログアウト処理で不正なページ移動エラーを防ぐ為、トークンをセット
- $this->transactionid = SC_Helper_Session_Ex::getToken();
+ $this->transactionid = SessionHelper::getToken();
}
/**
@@ -97,7 +90,7 @@ public function action()
*/
public function lfCheckDisableLogout()
{
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$arrDisableLogout = $masterData->getMasterData('mtb_disable_logout');
$current_page = $_SERVER['SCRIPT_NAME'];
diff --git a/data/Eccube/Page/Bloc/LoginFooter.php b/data/Eccube/Page/Bloc/LoginFooter.php
new file mode 100644
index 00000000000..a562c677767
--- /dev/null
+++ b/data/Eccube/Page/Bloc/LoginFooter.php
@@ -0,0 +1,53 @@
+action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ parent::action();
+ }
+}
diff --git a/data/Eccube/Page/Bloc/LoginHeader.php b/data/Eccube/Page/Bloc/LoginHeader.php
new file mode 100644
index 00000000000..ac088efc26c
--- /dev/null
+++ b/data/Eccube/Page/Bloc/LoginHeader.php
@@ -0,0 +1,53 @@
+action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ parent::action();
+ }
+}
diff --git a/data/Eccube/Page/Bloc/NaviFooter.php b/data/Eccube/Page/Bloc/NaviFooter.php
new file mode 100644
index 00000000000..244a949c8e0
--- /dev/null
+++ b/data/Eccube/Page/Bloc/NaviFooter.php
@@ -0,0 +1,53 @@
+action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ parent::action();
+ }
+}
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_NaviHeader.php b/data/Eccube/Page/Bloc/NaviHeader.php
similarity index 62%
rename from data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_NaviHeader.php
rename to data/Eccube/Page/Bloc/NaviHeader.php
index 0685ed48b3c..e191ce5d959 100644
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_NaviHeader.php
+++ b/data/Eccube/Page/Bloc/NaviHeader.php
@@ -1,36 +1,28 @@
arrProductType = $masterData->getMasterData('mtb_product_type'); //商品種類を取得
}
@@ -65,9 +57,9 @@ public function action()
parent::action();
//ヘッダーナビのカート情報を取得
- $objCart = new SC_CartSession_Ex();
+ $objCart = new CartSession();
$cartKeys = $objCart->getKeys();
- $arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
+ $arrInfo = DbHelper::getBasisData();
$this->freeRule = $arrInfo['free_rule'];
$this->arrCartList = $this->lfGetCartData($objCart, $arrInfo, $cartKeys);
}
@@ -75,12 +67,12 @@ public function action()
/**
* カートの情報を取得する
*
- * @param SC_CartSession $objCart カートセッション管理クラス
+ * @param CartSession $objCart カートセッション管理クラス
* @param Array $arrInfo 基本情報配列
* @param Array $cartKeys 商品種類配列
* @return array $arrCartList カートデータ配列
*/
- public function lfGetCartData($objCart, $arrInfo, $cartKeys)
+ public function lfGetCartData(CartSession $objCart, $arrInfo, $cartKeys)
{
$cartList = array();
foreach ($cartKeys as $key) {
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_News.php b/data/Eccube/Page/Bloc/News.php
similarity index 68%
rename from data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_News.php
rename to data/Eccube/Page/Bloc/News.php
index 3cc3143d00b..fe965c065d3 100644
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_News.php
+++ b/data/Eccube/Page/Bloc/News.php
@@ -1,36 +1,30 @@
getMode()) {
case 'getList':
$this->lfInitNewsParam($objFormParam);
@@ -72,10 +66,10 @@ public function action()
$arrData = $objFormParam->getHashArray();
$json = $this->lfGetNewsForJson($arrData, $objNews);
echo $json;
- SC_Response_Ex::actionExit();
+ Response::actionExit();
} else {
echo $this->lfGetErrors($this->arrErr);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
break;
case 'getDetail':
@@ -87,10 +81,10 @@ public function action()
$arrData = $objFormParam->getHashArray();
$json = $this->lfGetNewsDetailForJson($arrData);
echo $json;
- SC_Response_Ex::actionExit();
+ Response::actionExit();
} else {
echo $this->lfGetErrors($this->arrErr);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
break;
default:
@@ -104,10 +98,10 @@ public function action()
/**
* 新着情報パラメーター初期化
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return void
*/
- public function lfInitNewsParam(&$objFormParam)
+ public function lfInitNewsParam(FormParam &$objFormParam)
{
$objFormParam->addParam('現在ページ', 'pageno', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'), '', false);
$objFormParam->addParam('表示件数', 'disp_number', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'), '', false);
@@ -119,16 +113,16 @@ public function lfInitNewsParam(&$objFormParam)
*
* @return array $arrNewsList 新着情報の配列を返す
*/
- public function lfGetNews($dispNumber, $pageNo, SC_Helper_News_Ex $objNews)
+ public function lfGetNews($dispNumber, $pageNo, NewsHelper $objNews)
{
$arrNewsList = $objNews->getList($dispNumber, $pageNo);
// モバイルサイトのセッション保持 (#797)
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE) {
foreach ($arrNewsList as $key => $value) {
$arrRow =& $arrNewsList[$key];
- if (SC_Utils_Ex::isAppInnerUrl($arrRow['news_url'])) {
- $netUrl = new Net_URL($arrRow['news_url']);
+ if (Utils::isAppInnerUrl($arrRow['news_url'])) {
+ $netUrl = new \Net_URL($arrRow['news_url']);
$netUrl->addQueryString(session_name(), session_id());
$arrRow['news_url'] = $netUrl->getURL();
}
@@ -143,10 +137,10 @@ public function lfGetNews($dispNumber, $pageNo, SC_Helper_News_Ex $objNews)
* (ページと表示件数を指定)
*
* @param array $arrData フォーム入力値
- * @param SC_Helper_News_Ex $objNews
+ * @param NewsHelper $objNews
* @return String $json 新着情報のJSONを返す
*/
- public function lfGetNewsForJson($arrData, SC_Helper_News_Ex $objNews)
+ public function lfGetNewsForJson($arrData, NewsHelper $objNews)
{
$dispNumber = $arrData['disp_number'];
$pageNo = $arrData['pageno'];
@@ -156,7 +150,7 @@ public function lfGetNewsForJson($arrData, SC_Helper_News_Ex $objNews)
$newsCount = $objNews->getCount();
$arrNewsList['news_page_count'] = ceil($newsCount / 3);
- $json = SC_Utils_Ex::jsonEncode($arrNewsList); //JSON形式
+ $json = Utils::jsonEncode($arrNewsList); //JSON形式
return $json;
}
@@ -170,8 +164,8 @@ public function lfGetNewsForJson($arrData, SC_Helper_News_Ex $objNews)
*/
public function lfGetNewsDetailForJson($arrData)
{
- $arrNewsList = SC_Helper_News_Ex::getNews($arrData['news_id']);
- $json = SC_Utils_Ex::jsonEncode($arrNewsList); //JSON形式
+ $arrNewsList = NewsHelper::getNews($arrData['news_id']);
+ $json = Utils::jsonEncode($arrNewsList); //JSON形式
return $json;
}
@@ -189,6 +183,6 @@ public function lfGetErrors($arrErr)
$messages .= $val . "\n";
}
- return SC_Utils_Ex::jsonEncode(array('error' => $messages));
+ return Utils::jsonEncode(array('error' => $messages));
}
}
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php b/data/Eccube/Page/Bloc/Recommend.php
similarity index 61%
rename from data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php
rename to data/Eccube/Page/Bloc/Recommend.php
index 7fbcaa5d493..eda0613b167 100644
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend.php
+++ b/data/Eccube/Page/Bloc/Recommend.php
@@ -1,36 +1,29 @@
arrInfo = $objSiteInfo->data;
//おすすめ商品表示
- $this->arrBestProducts = $this->lfGetRanking();
+ $this->arrBestProductsHelper = $this->lfGetRanking();
}
/**
* おすすめ商品検索.
*
- * @return array $arrBestProducts 検索結果配列
+ * @return array $arrBestProductsHelper 検索結果配列
*/
public function lfGetRanking()
{
- $objRecommend = new SC_Helper_BestProducts_Ex();
+ $objRecommend = new BestProductsHelper();
// おすすめ商品取得
$arrRecommends = $objRecommend->getList(RECOMMEND_NUM);
@@ -83,8 +76,8 @@ public function lfGetRanking()
$response = array();
if (count($arrRecommends) > 0) {
// 商品一覧を取得
- $objQuery =& SC_Query_Ex::getSingletonInstance();
- $objProduct = new SC_Product_Ex();
+ $objQuery = Query::getSingletonInstance();
+ $objProduct = new Product();
// where条件生成&セット
$arrProductId = array();
foreach ($arrRecommends as $key => $val) {
@@ -93,7 +86,7 @@ public function lfGetRanking()
$arrProducts = $objProduct->getListByProductIds($objQuery, $arrProductId);
// 税込金額を設定する
- SC_Product_Ex::setIncTaxToProducts($arrProducts);
+ Product::setIncTaxToProducts($arrProducts);
// おすすめ商品情報にマージ
foreach ($arrRecommends as $key => $value) {
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_SearchProducts.php b/data/Eccube/Page/Bloc/SearchProducts.php
similarity index 72%
rename from data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_SearchProducts.php
rename to data/Eccube/Page/Bloc/SearchProducts.php
index bde452ba72b..d55626e9e44 100644
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_SearchProducts.php
+++ b/data/Eccube/Page/Bloc/SearchProducts.php
@@ -1,36 +1,27 @@
sfGetCategoryId($product_id, $category_id);
+ $objDb = new DbHelper();
+ $arrCategoryId = $objDb->getCategoryId($product_id, $category_id);
return $arrCategoryId;
}
@@ -147,8 +138,8 @@ public function lfGetSelectedCategoryId($product_id, $category_id)
public function lfGetSelectedMakerId($product_id, $maker_id)
{
// 選択中のメーカーIDを判定する
- $objDb = new SC_Helper_DB_Ex();
- $arrMakerId = $objDb->sfGetMakerId($product_id, $maker_id);
+ $objDb = new DbHelper();
+ $arrMakerId = $objDb->getMakerId($product_id, $maker_id);
return $arrMakerId;
}
@@ -160,13 +151,13 @@ public function lfGetSelectedMakerId($product_id, $maker_id)
*/
public function lfGetCategoryList()
{
- $objDb = new SC_Helper_DB_Ex();
+ $objDb = new DbHelper();
// カテゴリ検索用選択リスト
- $arrCategoryList = $objDb->sfGetCategoryList('', true, ' ');
+ $arrCategoryList = $objDb->getCategoryList('', true, ' ');
if (is_array($arrCategoryList)) {
// 文字サイズを制限する
foreach ($arrCategoryList as $key => $val) {
- $truncate_str = SC_Utils_Ex::sfCutString($val, SEARCH_CATEGORY_LEN, false);
+ $truncate_str = Utils::sfCutString($val, SEARCH_CATEGORY_LEN, false);
$arrCategoryList[$key] = preg_replace('/ /u', ' ', $truncate_str);
}
}
@@ -181,13 +172,13 @@ public function lfGetCategoryList()
*/
public function lfGetMakerList()
{
- $objDb = new SC_Helper_DB_Ex();
+ $objDb = new DbHelper();
// メーカー検索用選択リスト
- $arrMakerList = $objDb->sfGetMakerList('', true);
+ $arrMakerList = $objDb->getMakerList('', true);
if (is_array($arrMakerList)) {
// 文字サイズを制限する
foreach ($arrMakerList as $key => $val) {
- $arrMakerList[$key] = SC_Utils_Ex::sfCutString($val, SEARCH_CATEGORY_LEN, false);
+ $arrMakerList[$key] = Utils::sfCutString($val, SEARCH_CATEGORY_LEN, false);
}
}
diff --git a/data/class/pages/cart/LC_Page_Cart.php b/data/Eccube/Page/Cart/Index.php
similarity index 79%
rename from data/class/pages/cart/LC_Page_Cart.php
rename to data/Eccube/Page/Cart/Index.php
index 854ee8aa41c..f2be1aa7097 100644
--- a/data/class/pages/cart/LC_Page_Cart.php
+++ b/data/Eccube/Page/Cart/Index.php
@@ -1,37 +1,39 @@
tpl_title = '現在のカゴの中';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrProductType = $masterData->getMasterData('mtb_product_type');
}
@@ -74,18 +76,18 @@ public function process()
public function action()
{
//決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
- $objCartSess = new SC_CartSession_Ex();
- $objSiteSess = new SC_SiteSession_Ex();
- $objCustomer = new SC_Customer_Ex();
+ $objCartSess = new CartSession();
+ $objSiteSess = new SiteSession();
+ $objCustomer = new Customer();
$objFormParam = $this->lfInitParam($_POST);
$this->mode = $this->getMode();
// モバイル対応
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE) {
if (isset($_GET['cart_no'])) {
$objFormParam->setValue('cart_no', $_GET['cart_no']);
}
@@ -108,8 +110,8 @@ public function action()
// エラーチェック
$arrError = $objFormParam->checkError();
if (isset($arrError) && !empty($arrError)) {
- SC_Utils_Ex::sfDispSiteError(CART_NOT_FOUND);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(CART_NOT_FOUND);
+ Response::actionExit();
}
$objFormParam4OpenCategoryTree =
@@ -136,38 +138,38 @@ public function action()
$this->lfSetCurrentCart($objSiteSess, $objCartSess, $cartKey);
// 購入ページへ
- SC_Response_Ex::sendRedirect(SHOPPING_URL);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(SHOPPING_URL);
+ Response::actionExit();
}
break;
case 'up'://1個追加
$objCartSess->upQuantity($cart_no, $cartKey);
- SC_Response_Ex::reload($arrQueryString, true);
- SC_Response_Ex::actionExit();
+ Response::reload($arrQueryString, true);
+ Response::actionExit();
break;
case 'down'://1個減らす
$objCartSess->downQuantity($cart_no, $cartKey);
- SC_Response_Ex::reload($arrQueryString, true);
- SC_Response_Ex::actionExit();
+ Response::reload($arrQueryString, true);
+ Response::actionExit();
break;
case 'setQuantity'://数量変更
$objCartSess->setQuantity($objFormParam->getValue('quantity'), $cart_no, $cartKey);
- SC_Response_Ex::reload($arrQueryString, true);
- SC_Response_Ex::actionExit();
+ Response::reload($arrQueryString, true);
+ Response::actionExit();
break;
case 'delete'://カートから削除
$objCartSess->delProduct($cart_no, $cartKey);
- SC_Response_Ex::reload($arrQueryString, true);
- SC_Response_Ex::actionExit();
+ Response::reload($arrQueryString, true);
+ Response::actionExit();
break;
default:
break;
}
- $this->arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
+ $this->arrInfo = DbHelper::getBasisData();
$totalIncTax = 0;
foreach ($this->cartKeys as $key) {
// カート集計処理
@@ -203,7 +205,7 @@ public function action()
}
// 前頁のURLを取得
- // TODO: SC_CartSession::setPrevURL()利用不可。
+ // TODO: CartSession::setPrevURL()利用不可。
$this->lfGetCartPrevUrl($_SESSION, $_SERVER['HTTP_REFERER']);
$this->tpl_prev_url = (isset($_SESSION['cart_prev_url'])) ? $_SESSION['cart_prev_url'] : '';
@@ -214,11 +216,11 @@ public function action()
/**
* ユーザ入力値の処理
*
- * @return SC_FormParam_Ex
+ * @return FormParam
*/
public function lfInitParam($arrRequest)
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$objFormParam->addParam('カートキー', 'cartKey', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
$objFormParam->addParam('カートナンバー', 'cart_no', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
// スマートフォン版での数量変更用
@@ -234,11 +236,11 @@ public function lfInitParam($arrRequest)
/**
* PC版での開いているカテゴリーツリーの維持用の入力値
*
- * @return SC_FormParam_Ex
+ * @return FormParam
*/
public function lfInitParam4OpenCategoryTree($arrRequest)
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$objFormParam->addParam('カテゴリID', 'category_id', INT_LEN, 'n',
array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
@@ -262,7 +264,7 @@ public function lfUpdateOrderTempid($pre_uniqid, $uniqid)
{
$sqlval['order_temp_id'] = $uniqid;
$where = 'order_temp_id = ?';
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$res = $objQuery->update('dtb_order_temp', $sqlval, $where, array($pre_uniqid));
if ($res != 1) {
return false;
@@ -291,7 +293,7 @@ public function lfGetCartPrevUrl(&$session, $referer)
}
}
// 妥当性チェック
- if (!SC_Utils_Ex::sfIsInternalDomain($session['cart_prev_url'])) {
+ if (!Utils::sfIsInternalDomain($session['cart_prev_url'])) {
$session['cart_prev_url'] = '';
}
}
@@ -299,8 +301,8 @@ public function lfGetCartPrevUrl(&$session, $referer)
/**
* カートを購入モードに設定
*
- * @param SC_SiteSession_Ex $objSiteSess
- * @param SC_CartSession_Ex $objCartSess
+ * @param SiteSession $objSiteSess
+ * @param CartSession $objCartSess
* @return void
*/
public function lfSetCurrentCart(&$objSiteSess, &$objCartSess, $cartKey)
diff --git a/data/class/pages/contact/LC_Page_Contact_Complete.php b/data/Eccube/Page/Contact/Complete.php
similarity index 50%
rename from data/class/pages/contact/LC_Page_Contact_Complete.php
rename to data/Eccube/Page/Contact/Complete.php
index 5138c28bf84..3f5c585baef 100644
--- a/data/class/pages/contact/LC_Page_Contact_Complete.php
+++ b/data/Eccube/Page/Contact/Complete.php
@@ -1,36 +1,26 @@
tpl_title = 'お問い合わせ';
} else {
$this->tpl_title = 'お問い合わせ(入力ページ)';
}
$this->httpCacheControl('nocache');
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPref = $masterData->getMasterData('mtb_pref');
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE) {
// @deprecated EC-CUBE 2.11 テンプレート互換用
- $this->CONF = SC_Helper_DB_Ex::sfGetBasisData();
+ $this->CONF = DbHelper::getBasisData();
}
}
@@ -75,7 +73,7 @@ public function process()
*/
public function action()
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->arrData = isset($_SESSION['customer']) ? $_SESSION['customer'] : '';
@@ -91,7 +89,7 @@ public function action()
// 入力値の取得
$this->arrForm = $objFormParam->getFormParamList();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
// エラー無しで完了画面
$this->tpl_mainpage = 'contact/confirm.tpl';
$this->tpl_title = 'お問い合わせ(確認ページ)';
@@ -111,15 +109,15 @@ public function action()
$objFormParam->setParam($_POST);
$this->arrErr = $objFormParam->checkError();
$this->arrForm = $objFormParam->getFormParamList();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->lfSendMail($this);
// 完了ページへ移動する
- SC_Response_Ex::sendRedirect('complete.php');
- SC_Response_Ex::actionExit();
+ Response::sendRedirect('complete.php');
+ Response::actionExit();
} else {
- SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(CUSTOMER_ERROR);
+ Response::actionExit();
}
break;
@@ -132,7 +130,7 @@ public function action()
/**
* お問い合わせ入力時のパラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -157,14 +155,14 @@ public function lfInitParam(&$objFormParam)
/**
* 入力内容のチェックを行なう.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return array 入力チェック結果の配列
*/
public function lfCheckError(&$objFormParam)
{
// 入力データを渡す。
$arrForm = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrForm);
+ $objErr = new CheckError($arrForm);
$objErr->arrErr = $objFormParam->checkError();
$objErr->doFunc(array('メールアドレス', 'メールアドレス(確認)', 'email', 'email02'), array('EQUAL_CHECK'));
@@ -179,10 +177,10 @@ public function lfCheckError(&$objFormParam)
*/
public function lfSendMail(&$objPage)
{
- $CONF = SC_Helper_DB_Ex::sfGetBasisData();
+ $CONF = DbHelper::getBasisData();
$objPage->tpl_shopname = $CONF['shop_name'];
$objPage->tpl_infoemail = $CONF['email02'];
- $helperMail = new SC_Helper_Mail_Ex();
+ $helperMail = new MailHelper();
$helperMail->setPage($this);
$helperMail->sfSendTemplateMail(
$objPage->arrForm['email']['value'], // to
diff --git a/data/class/pages/entry/LC_Page_Entry_Complete.php b/data/Eccube/Page/Entry/Complete.php
similarity index 58%
rename from data/class/pages/entry/LC_Page_Entry_Complete.php
rename to data/Eccube/Page/Entry/Complete.php
index 0d406485ca7..705bb4a86f4 100644
--- a/data/class/pages/entry/LC_Page_Entry_Complete.php
+++ b/data/Eccube/Page/Entry/Complete.php
@@ -1,36 +1,28 @@
getKeys();
$this->tpl_cart_empty = true;
foreach ($arrCartKeys as $cart_key) {
@@ -79,7 +71,7 @@ public function action()
$this->tpl_mainpage = 'entry/complete.tpl';
} else {
// 本会員登録完了
- SC_Response_Ex::sendRedirectFromUrlPath('regist/complete.php');
+ Response::sendRedirectFromUrlPath('regist/complete.php');
}
}
diff --git a/data/class/pages/entry/LC_Page_Entry_EmailMobile.php b/data/Eccube/Page/Entry/EmailMobile.php
similarity index 72%
rename from data/class/pages/entry/LC_Page_Entry_EmailMobile.php
rename to data/Eccube/Page/Entry/EmailMobile.php
index 1fc7a027a75..b99eb961bbd 100644
--- a/data/class/pages/entry/LC_Page_Entry_EmailMobile.php
+++ b/data/Eccube/Page/Entry/EmailMobile.php
@@ -1,36 +1,30 @@
lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -88,7 +82,7 @@ public function action()
* lfInitParam
*
* @access public
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -100,14 +94,14 @@ public function lfInitParam(&$objFormParam)
/**
* エラーチェックする
*
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
* @access private
* @return array エラー情報の配列
*/
public function lfCheckError(&$objFormParam)
{
$objFormParam->convParam();
- $objErr = new SC_CheckError_Ex();
+ $objErr = new CheckError();
$objErr->arrErr = $objFormParam->checkError();
// FIXME: lfInitParam() で設定すれば良いように感じる
@@ -128,7 +122,7 @@ public function lfCheckError(&$objFormParam)
*/
public function lfRegistEmailMobile($email_mobile, $customer_id)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->update('dtb_customer',
array('email_mobile' => $email_mobile),
'customer_id = ?', array($customer_id));
diff --git a/data/class/pages/entry/LC_Page_Entry.php b/data/Eccube/Page/Entry/Index.php
similarity index 77%
rename from data/class/pages/entry/LC_Page_Entry.php
rename to data/Eccube/Page/Entry/Index.php
index c0d30565abc..5600224e8a2 100644
--- a/data/class/pages/entry/LC_Page_Entry.php
+++ b/data/Eccube/Page/Entry/Index.php
@@ -1,36 +1,40 @@
arrPref = $masterData->getMasterData('mtb_pref');
$this->arrJob = $masterData->getMasterData('mtb_job');
$this->arrReminder = $masterData->getMasterData('mtb_reminder');
@@ -48,7 +52,7 @@ public function init()
$this->arrMAILMAGATYPE = $masterData->getMasterData('mtb_mail_magazine_type');
// 生年月日選択肢の取得
- $objDate = new SC_Date_Ex(BIRTH_YEAR, date('Y'));
+ $objDate = new Date(BIRTH_YEAR, date('Y'));
$this->arrYear = $objDate->getYear('', START_BIRTH_YEAR, '');
$this->arrMonth = $objDate->getMonth(true);
$this->arrDay = $objDate->getDay(true);
@@ -75,17 +79,17 @@ public function process()
public function action()
{
//決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// PC時は規約ページからの遷移でなければエラー画面へ遷移する
if ($this->lfCheckReferer() === false) {
- SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
+ Utils::sfDispSiteError(PAGE_ERROR, '', true);
}
- SC_Helper_Customer_Ex::sfCustomerEntryParam($objFormParam);
+ CustomerHelper::sfCustomerEntryParam($objFormParam);
$objFormParam->setParam($_POST);
// mobile用(戻るボタンでの遷移かどうかを判定)
@@ -104,7 +108,7 @@ public function action()
$zipcode = $_POST['zip01'] . $_POST['zip02'];
// 郵便番号検索
- $arrAdsList = SC_Utils_Ex::sfGetAddress($zipcode);
+ $arrAdsList = Utils::sfGetAddress($zipcode);
// 郵便番号が発見された場合
if (!empty($arrAdsList)) {
@@ -121,11 +125,11 @@ public function action()
}
//-- 確認
- $this->arrErr = SC_Helper_Customer_Ex::sfCustomerEntryErrorCheck($objFormParam);
+ $this->arrErr = CustomerHelper::sfCustomerEntryErrorCheck($objFormParam);
// 入力エラーなし
if (empty($this->arrErr)) {
//パスワード表示
- $this->passlen = SC_Utils_Ex::sfPassLen(strlen($objFormParam->getValue('password')));
+ $this->passlen = Utils::sfPassLen(strlen($objFormParam->getValue('password')));
$this->tpl_mainpage = 'entry/confirm.tpl';
$this->tpl_title = '会員登録(確認ページ)';
@@ -133,7 +137,7 @@ public function action()
break;
case 'complete':
//-- 会員登録と完了画面
- $this->arrErr = SC_Helper_Customer_Ex::sfCustomerEntryErrorCheck($objFormParam);
+ $this->arrErr = CustomerHelper::sfCustomerEntryErrorCheck($objFormParam);
if (empty($this->arrErr)) {
$uniqid = $this->lfRegistCustomerData($this->lfMakeSqlVal($objFormParam));
@@ -142,12 +146,12 @@ public function action()
// 仮会員が無効の場合
if (CUSTOMER_CONFIRM_MAIL == false) {
// ログイン状態にする
- $objCustomer = new SC_Customer_Ex();
+ $objCustomer = new Customer();
$objCustomer->setLogin($objFormParam->getValue('email'));
}
// 完了ページに移動させる。
- SC_Response_Ex::sendRedirect('complete.php', array('ci' => SC_Helper_Customer_Ex::sfGetCustomerId($uniqid)));
+ Response::sendRedirect('complete.php', array('ci' => CustomerHelper::sfGetCustomerId($uniqid)));
}
break;
case 'return':
@@ -167,7 +171,7 @@ public function action()
*/
public function lfRegistCustomerData($sqlval)
{
- SC_Helper_Customer_Ex::sfEditCustomerData($sqlval);
+ CustomerHelper::sfEditCustomerData($sqlval);
return $sqlval['secret_key'];
}
@@ -179,7 +183,7 @@ public function lfRegistCustomerData($sqlval)
* モバイル端末の場合は, email を email_mobile にコピーし,
* mobile_phone_id に携帯端末IDを格納する.
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @access private
* @return $arrResults
*/
@@ -189,7 +193,7 @@ public function lfMakeSqlVal(&$objFormParam)
$arrResults = $objFormParam->getDbArray();
// 生年月日の作成
- $arrResults['birth'] = SC_Utils_Ex::sfGetTimestamp($arrForm['year'], $arrForm['month'], $arrForm['day']);
+ $arrResults['birth'] = Utils::sfGetTimestamp($arrForm['year'], $arrForm['month'], $arrForm['day']);
// 仮会員 1 本会員 2
$arrResults['status'] = (CUSTOMER_CONFIRM_MAIL == true) ? '1' : '2';
@@ -198,17 +202,17 @@ public function lfMakeSqlVal(&$objFormParam)
* secret_keyは、テーブルで重複許可されていない場合があるので、
* 本会員登録では利用されないがセットしておく。
*/
- $arrResults['secret_key'] = SC_Helper_Customer_Ex::sfGetUniqSecretKey();
+ $arrResults['secret_key'] = CustomerHelper::sfGetUniqSecretKey();
// 入会時ポイント
- $CONF = SC_Helper_DB_Ex::sfGetBasisData();
+ $CONF = DbHelper::getBasisData();
$arrResults['point'] = $CONF['welcome_point'];
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE) {
// 携帯メールアドレス
$arrResults['email_mobile'] = $arrResults['email'];
// PHONE_IDを取り出す
- $arrResults['mobile_phone_id'] = SC_MobileUserAgent_Ex::getId();
+ $arrResults['mobile_phone_id'] = MobileUserAgent::getId();
}
return $arrResults;
@@ -222,9 +226,9 @@ public function lfMakeSqlVal(&$objFormParam)
*/
public function lfSendMail($uniqid, $arrForm)
{
- $CONF = SC_Helper_DB_Ex::sfGetBasisData();
+ $CONF = DbHelper::getBasisData();
- $objMailText = new SC_SiteView_Ex();
+ $objMailText = new SiteView();
$objMailText->setPage($this);
$objMailText->assign('CONF', $CONF);
$objMailText->assign('name01', $arrForm['name01']);
@@ -232,7 +236,7 @@ public function lfSendMail($uniqid, $arrForm)
$objMailText->assign('uniqid', $uniqid);
$objMailText->assignobj($this);
- $objHelperMail = new SC_Helper_Mail_Ex();
+ $objHelperMail = new MailHelper();
$objHelperMail->setPage($this);
// 仮会員が有効の場合
@@ -244,7 +248,7 @@ public function lfSendMail($uniqid, $arrForm)
$toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl');
}
- $objMail = new SC_SendMail_Ex();
+ $objMail = new SendMail();
$objMail->setItem(
'', // 宛先
$subject, // サブジェクト
@@ -289,7 +293,7 @@ public function lfCheckReferer()
$entry_urlpath,
);
- if (SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE
+ if (Display::detectDevice() !== DEVICE_TYPE_MOBILE
&& !in_array($referer_urlpath, $allowed_urlpath)) {
return false;
}
@@ -306,7 +310,7 @@ public function lfCheckReferer()
public function lfCheckError($arrRequest)
{
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター情報の初期化
$objFormParam->addParam('郵便番号1', 'zip01', ZIP01_LEN, 'n', array('EXIST_CHECK', 'NUM_COUNT_CHECK', 'NUM_CHECK'));
$objFormParam->addParam('郵便番号2', 'zip02', ZIP02_LEN, 'n', array('EXIST_CHECK', 'NUM_COUNT_CHECK', 'NUM_CHECK'));
diff --git a/data/class/pages/entry/LC_Page_Entry_Kiyaku.php b/data/Eccube/Page/Entry/Kiyaku.php
similarity index 69%
rename from data/class/pages/entry/LC_Page_Entry_Kiyaku.php
rename to data/Eccube/Page/Entry/Kiyaku.php
index d2369d3f434..7be289ac622 100644
--- a/data/class/pages/entry/LC_Page_Entry_Kiyaku.php
+++ b/data/Eccube/Page/Entry/Kiyaku.php
@@ -1,36 +1,29 @@
cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
$arrKiyaku = $this->lfGetKiyakuData();
$this->max = count($arrKiyaku);
// mobile時はGETでページ指定
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE) {
$this->offset = $this->lfSetOffset($_GET['offset']);
+ } else {
+ $this->offset = null;
}
$this->tpl_kiyaku_text = $this->lfMakeKiyakuText($arrKiyaku, $this->max, $this->offset);
@@ -88,7 +83,7 @@ public function action()
*/
public function lfMakeKiyakuText($arrKiyaku, $max, $offset)
{
- $this->tpl_kiyaku_text = '';
+ $tpl_kiyaku_text = '';
for ($i = 0; $i < $max; $i++) {
if ($offset !== null && ($offset - 1) <> $i) continue;
$tpl_kiyaku_text.=$arrKiyaku[$i]['kiyaku_title'] . "\n\n";
@@ -106,7 +101,7 @@ public function lfMakeKiyakuText($arrKiyaku, $max, $offset)
*/
public function lfGetKiyakuData()
{
- $objKiyaku = new SC_Helper_Kiyaku_Ex();
+ $objKiyaku = new KiyakuHelper();
$arrKiyaku = $objKiyaku->getList();
return $arrKiyaku;
diff --git a/data/class/pages/error/LC_Page_Error_DispError.php b/data/Eccube/Page/Error/DispError.php
similarity index 67%
rename from data/class/pages/error/LC_Page_Error_DispError.php
rename to data/Eccube/Page/Error/DispError.php
index cb59ac2a2f0..498874466c4 100644
--- a/data/class/pages/error/LC_Page_Error_DispError.php
+++ b/data/Eccube/Page/Error/DispError.php
@@ -1,36 +1,31 @@
template = LOGIN_FRAME;
$this->tpl_mainpage = 'login_error.tpl';
$this->tpl_title = 'ログインエラー';
// ディスプレイクラス生成
- $this->objDisplay = new SC_Display_Ex();
+ $this->objDisplay = new Display();
// transformでフックしている場合に, 再度エラーが発生するため, コールバックを無効化.
- $objHelperPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
+ $objHelperPlugin = PluginHelper::getSingletonInstance($this->plugin_activate_flg);
$objHelperPlugin->arrRegistedPluginActions = array();
// キャッシュから店舗情報取得(DBへの接続は行わない)
- $this->arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisDataCache(false);
+ $this->arrSiteInfo = DbHelper::getBasisDataCache(false);
}
/**
@@ -75,7 +70,7 @@ public function process()
*/
public function action()
{
- SC_Response_Ex::sendHttpStatus(500);
+ Response::sendHttpStatus(500);
switch ($this->type) {
case LOGIN_ERROR:
@@ -86,7 +81,7 @@ public function action()
break;
case AUTH_ERROR:
$this->tpl_error='このページにはアクセスできません';
- SC_Response_Ex::sendHttpStatus(403);
+ Response::sendHttpStatus(403);
break;
case INVALID_MOVE_ERRORR:
$this->tpl_error='不正なページ移動です。
もう一度ご確認のうえ、再度入力してください。';
diff --git a/data/class/pages/error/LC_Page_Error.php b/data/Eccube/Page/Error/Index.php
similarity index 82%
rename from data/class/pages/error/LC_Page_Error.php
rename to data/Eccube/Page/Error/Index.php
index 449527aee52..cbdeb0cbb4d 100644
--- a/data/class/pages/error/LC_Page_Error.php
+++ b/data/Eccube/Page/Error/Index.php
@@ -1,41 +1,37 @@
tpl_mainpage = 'error.tpl';
$this->tpl_title = 'エラー';
// ディスプレイクラス生成
- $this->objDisplay = new SC_Display_Ex();
+ $this->objDisplay = new Display();
- $objHelperPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
+ $objHelperPlugin = PluginHelper::getSingletonInstance($this->plugin_activate_flg);
if (is_object($objHelperPlugin)) {
// transformでフックしている場合に, 再度エラーが発生するため, コールバックを無効化.
$objHelperPlugin->arrRegistedPluginActions = array();
}
// キャッシュから店舗情報取得(DBへの接続は行わない)
- $this->arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisDataCache(false);
+ $this->arrSiteInfo = DbHelper::getBasisDataCache(false);
}
/**
@@ -92,12 +88,12 @@ public function process()
*/
public function action()
{
- SC_Response_Ex::sendHttpStatus(500);
+ Response::sendHttpStatus(500);
switch ($this->type) {
case PRODUCT_NOT_FOUND:
$this->tpl_error='ご指定のページはございません。';
- SC_Response_Ex::sendHttpStatus(404);
+ Response::sendHttpStatus(404);
break;
case PAGE_ERROR:
$this->tpl_error='不正なページ移動です。';
@@ -113,7 +109,7 @@ public function action()
break;
case CATEGORY_NOT_FOUND:
$this->tpl_error='ご指定のカテゴリは存在しません。';
- SC_Response_Ex::sendHttpStatus(404);
+ Response::sendHttpStatus(404);
break;
case SITE_LOGIN_ERROR:
$this->tpl_error='メールアドレスもしくはパスワードが正しくありません。';
diff --git a/data/class/pages/error/LC_Page_Error_SystemError.php b/data/Eccube/Page/Error/SystemError.php
similarity index 72%
rename from data/class/pages/error/LC_Page_Error_SystemError.php
rename to data/Eccube/Page/Error/SystemError.php
index acbfc324bb5..487caff7d5f 100644
--- a/data/class/pages/error/LC_Page_Error_SystemError.php
+++ b/data/Eccube/Page/Error/SystemError.php
@@ -1,27 +1,19 @@
tpl_error = 'システムエラーが発生しました。
大変お手数ですが、サイト管理者までご連絡ください。';
@@ -94,7 +85,7 @@ public function action()
*/
public function sendResponse()
{
- $this->adminPage = GC_Utils_Ex::isAdminFunction();
+ $this->adminPage = GcUtils::isAdminFunction();
if ($this->adminPage) {
$this->tpl_mainpage = 'login_error.tpl';
@@ -141,13 +132,13 @@ public function sfGetErrMsg()
if (!is_null($this->pearResult)) {
$errmsg .= $this->pearResult->message . "\n\n";
$errmsg .= $this->pearResult->userinfo . "\n\n";
- $errmsg .= GC_Utils_Ex::toStringBacktrace($this->pearResult->backtrace);
+ $errmsg .= GcUtils::toStringBacktrace($this->pearResult->backtrace);
// (上に該当せず)バックトレーススタックが指定されている場合
} else if (is_array($this->backtrace)) {
- $errmsg .= GC_Utils_Ex::toStringBacktrace($this->backtrace);
+ $errmsg .= GcUtils::toStringBacktrace($this->backtrace);
} else {
- $arrBacktrace = GC_Utils_Ex::getDebugBacktrace();
- $errmsg .= GC_Utils_Ex::toStringBacktrace($arrBacktrace);
+ $arrBacktrace = GcUtils::getDebugBacktrace();
+ $errmsg .= GcUtils::toStringBacktrace($arrBacktrace);
}
return $errmsg;
@@ -161,7 +152,7 @@ public function sfGetErrMsg()
public function lfGetErrMsgHead()
{
$errmsg = '';
- $errmsg .= GC_Utils_Ex::getUrl() . "\n";
+ $errmsg .= GcUtils::getUrl() . "\n";
$errmsg .= "\n";
$errmsg .= 'SERVER_ADDR: ' . $_SERVER['SERVER_ADDR'] . "\n";
$errmsg .= 'REMOTE_ADDR: ' . $_SERVER['REMOTE_ADDR'] . "\n";
diff --git a/data/class/pages/forgot/LC_Page_Forgot.php b/data/Eccube/Page/Forgot/Index.php
similarity index 83%
rename from data/class/pages/forgot/LC_Page_Forgot.php
rename to data/Eccube/Page/Forgot/Index.php
index a8827607266..f2d9dd15b82 100644
--- a/data/class/pages/forgot/LC_Page_Forgot.php
+++ b/data/Eccube/Page/Forgot/Index.php
@@ -1,36 +1,38 @@
tpl_title = 'パスワードを忘れた方';
$this->tpl_mainpage = 'forgot/index.tpl';
$this->tpl_mainno = '';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrReminder = $masterData->getMasterData('mtb_reminder');
- $this->device_type = SC_Display_Ex::detectDevice();
+ $this->device_type = Display::detectDevice();
$this->httpCacheControl('nocache');
// デフォルトログインアドレスロード
- $objCookie = new SC_Cookie_Ex();
+ $objCookie = new Cookie();
$this->tpl_login_email = $objCookie->getCookie('login_email');
}
@@ -85,7 +87,7 @@ public function process()
public function action()
{
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
switch ($this->getMode()) {
case 'mail_check':
@@ -95,9 +97,9 @@ public function action()
$objFormParam->toLower('email');
$this->arrForm = $objFormParam->getHashArray();
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->errmsg = $this->lfCheckForgotMail($this->arrForm, $this->arrReminder);
- if (SC_Utils_Ex::isBlank($this->errmsg)) {
+ if (Utils::isBlank($this->errmsg)) {
$this->tpl_mainpage = 'forgot/secret.tpl';
}
}
@@ -109,9 +111,9 @@ public function action()
$objFormParam->toLower('email');
$this->arrForm = $objFormParam->getHashArray();
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->errmsg = $this->lfCheckForgotSecret($this->arrForm, $this->arrReminder);
- if (SC_Utils_Ex::isBlank($this->errmsg)) {
+ if (Utils::isBlank($this->errmsg)) {
// 完了ページへ移動する
$this->tpl_mainpage = 'forgot/complete.tpl';
// transactionidを更新させたいので呼び出し元(ログインフォーム側)をリロード。
@@ -146,7 +148,7 @@ public function action()
public function lfCheckForgotMail(&$arrForm, &$arrReminder)
{
$errmsg = NULL;
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$where = '(email = ? OR email_mobile = ?) AND name01 = ? AND name02 = ? AND del_flg = 0';
$arrVal = array($arrForm['email'], $arrForm['email'], $arrForm['name01'], $arrForm['name02']);
$result = $objQuery->select('reminder, status', 'dtb_customer', $where, $arrVal);
@@ -169,7 +171,7 @@ public function lfCheckForgotMail(&$arrForm, &$arrReminder)
/**
* メールアドレス確認におけるパラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @param array $device_type デバイスタイプ
* @return void
*/
@@ -196,7 +198,7 @@ public function lfInitMailCheckParam(&$objFormParam, $device_type)
public function lfCheckForgotSecret(&$arrForm, &$arrReminder)
{
$errmsg = '';
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$cols = 'customer_id, reminder, reminder_answer, salt';
$table = 'dtb_customer';
$where = '(email = ? OR email_mobile = ?)'
@@ -213,7 +215,7 @@ public function lfCheckForgotSecret(&$arrForm, &$arrReminder)
if ($result[0]['reminder_answer'] == $arrForm['reminder_answer']) {
$is_authorized = true;
}
- } elseif (SC_Utils_Ex::sfIsMatchHashPassword($arrForm['reminder_answer'],
+ } elseif (Utils::sfIsMatchHashPassword($arrForm['reminder_answer'],
$result[0]['reminder_answer'], $result[0]['salt'])) {
$is_authorized = true;
}
@@ -221,16 +223,16 @@ public function lfCheckForgotSecret(&$arrForm, &$arrReminder)
if ($is_authorized) {
// 秘密の答えが一致
// 新しいパスワードを設定する
- $new_password = GC_Utils_Ex::gfMakePassword(8);
+ $new_password = GcUtils::gfMakePassword(8);
if (FORGOT_MAIL == 1) {
// メールで変更通知をする
- $objDb = new SC_Helper_DB_Ex();
- $CONF = $objDb->sfGetBasisData();
+ $objDb = new DbHelper();
+ $CONF = $objDb->getBasisData();
$this->lfSendMail($CONF, $arrForm['email'], $arrForm['name01'], $new_password);
}
$sqlval = array();
$sqlval['password'] = $new_password;
- SC_Helper_Customer_Ex::sfEditCustomerData($sqlval, $result[0]['customer_id']);
+ CustomerHelper::sfEditCustomerData($sqlval, $result[0]['customer_id']);
$arrForm['new_password'] = $new_password;
} else {
// 秘密の答えが一致しなかった
@@ -239,7 +241,7 @@ public function lfCheckForgotSecret(&$arrForm, &$arrReminder)
} else {
//不正なアクセス リマインダー値が前画面と異なる。
// 新リファクタリング基準ではここで遷移は不許可なのでエラー表示
- //SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
+ //Utils::sfDispSiteError(PAGE_ERROR, '', true);
$errmsg = '秘密の質問が一致しませんでした。';
}
@@ -249,7 +251,7 @@ public function lfCheckForgotSecret(&$arrForm, &$arrReminder)
/**
* 秘密の質問確認におけるパラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @param array $device_type デバイスタイプ
* @return void
*/
@@ -278,17 +280,17 @@ public function lfInitSecretCheckParam(&$objFormParam, $device_type)
public function lfSendMail(&$CONF, $email, $customer_name, $new_password)
{
// パスワード変更お知らせメール送信
- $objMailText = new SC_SiteView_Ex(false);
+ $objMailText = new SiteView(false);
$objMailText->setPage($this);
$objMailText->assign('customer_name', $customer_name);
$objMailText->assign('new_password', $new_password);
$toCustomerMail = $objMailText->fetch('mail_templates/forgot_mail.tpl');
- $objHelperMail = new SC_Helper_Mail_Ex();
+ $objHelperMail = new MailHelper();
$objHelperMail->setPage($this);
// メール送信オブジェクトによる送信処理
- $objMail = new SC_SendMail_Ex();
+ $objMail = new SendMail();
$objMail->setItem(
'', //宛先
$objHelperMail->sfMakeSubject('パスワードを変更いたしました。'),
diff --git a/data/class/pages/frontparts/LC_Page_FrontParts_LoginCheck.php b/data/Eccube/Page/Frontparts/LoginCheck.php
similarity index 68%
rename from data/class/pages/frontparts/LC_Page_FrontParts_LoginCheck.php
rename to data/Eccube/Page/Frontparts/LoginCheck.php
index a02b2f2f1eb..06ced87ce79 100644
--- a/data/class/pages/frontparts/LC_Page_FrontParts_LoginCheck.php
+++ b/data/Eccube/Page/Frontparts/LoginCheck.php
@@ -1,27 +1,27 @@
cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
// 会員管理クラス
- $objCustomer = new SC_Customer_Ex();
+ $objCustomer = new Customer();
// クッキー管理クラス
- $objCookie = new SC_Cookie_Ex();
+ $objCookie = new Cookie();
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター情報の初期化
$this->lfInitParam($objFormParam);
@@ -94,12 +93,12 @@ public function action()
// エラーの場合はエラー画面に遷移
if (count($arrErr) > 0) {
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
+ if (Display::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo $this->lfGetErrorMessage(TEMP_LOGIN_ERROR);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
} else {
- SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(TEMP_LOGIN_ERROR);
+ Response::actionExit();
}
}
@@ -117,7 +116,7 @@ public function action()
if (count($arrErr) == 0) {
// ログイン処理
if ($objCustomer->doLogin($arrForm['login_email'], $arrForm['login_pass'])) {
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() === DEVICE_TYPE_MOBILE) {
// ログインが成功した場合は携帯端末IDを保存する。
$objCustomer->updateMobilePhoneId();
@@ -125,22 +124,22 @@ public function action()
* email がモバイルドメインでは無く,
* 携帯メールアドレスが登録されていない場合
*/
- $objMobile = new SC_Helper_Mobile_Ex();
+ $objMobile = new MobileHelper();
if (!$objMobile->gfIsMobileMailAddress($objCustomer->getValue('email'))) {
if (!$objCustomer->hasValue('email_mobile')) {
- SC_Response_Ex::sendRedirectFromUrlPath('entry/email_mobile.php');
- SC_Response_Ex::actionExit();
+ Response::sendRedirectFromUrlPath('entry/email_mobile.php');
+ Response::actionExit();
}
}
}
// --- ログインに成功した場合
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
- echo SC_Utils_Ex::jsonEncode(array('success' => $url));
+ if (Display::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
+ echo Utils::jsonEncode(array('success' => $url));
} else {
- SC_Response_Ex::sendRedirect($url);
+ Response::sendRedirect($url);
}
- SC_Response_Ex::actionExit();
+ Response::actionExit();
} else {
// --- ログインに失敗した場合
@@ -149,33 +148,33 @@ public function action()
sleep(LOGIN_RETRY_INTERVAL);
$arrForm['login_email'] = strtolower($arrForm['login_email']);
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$where = '(email = ? OR email_mobile = ?) AND status = 1 AND del_flg = 0';
$exists = $objQuery->exists('dtb_customer', $where, array($arrForm['login_email'], $arrForm['login_email']));
// ログインエラー表示 TODO リファクタリング
if ($exists) {
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
+ if (Display::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo $this->lfGetErrorMessage(TEMP_LOGIN_ERROR);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
} else {
- SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(TEMP_LOGIN_ERROR);
+ Response::actionExit();
}
} else {
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
+ if (Display::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo $this->lfGetErrorMessage(SITE_LOGIN_ERROR);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
} else {
- SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(SITE_LOGIN_ERROR);
+ Response::actionExit();
}
}
}
} else {
// XXX 到達しない?
// 入力エラーの場合、元のアドレスに戻す。
- SC_Response_Ex::sendRedirect($url);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect($url);
+ Response::actionExit();
}
break;
@@ -188,12 +187,12 @@ public function action()
$mypage_url_search = strpos('.'.$url, 'mypage');
if ($mypage_url_search == 2) {
// マイページログイン中はログイン画面へ移行
- SC_Response_Ex::sendRedirectFromUrlPath('mypage/login.php');
+ Response::sendRedirectFromUrlPath('mypage/login.php');
} else {
// 上記以外の場合、トップへ遷移
- SC_Response_Ex::sendRedirect(TOP_URL);
+ Response::sendRedirect(TOP_URL);
}
- SC_Response_Ex::actionExit();
+ Response::actionExit();
break;
default:
@@ -205,7 +204,7 @@ public function action()
/**
* パラメーター情報の初期化.
*
- * @param SC_FormParam $objFormParam パラメーター管理クラス
+ * @param FormParam $objFormParam パラメーター管理クラス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -236,6 +235,6 @@ public function lfGetErrorMessage($error)
$msg = 'メールアドレスもしくはパスワードが正しくありません。';
}
- return SC_Utils_Ex::jsonEncode(array('login_error' => $msg));
+ return Utils::jsonEncode(array('login_error' => $msg));
}
}
diff --git a/data/Eccube/Page/Guide/About.php b/data/Eccube/Page/Guide/About.php
new file mode 100644
index 00000000000..56af52efa10
--- /dev/null
+++ b/data/Eccube/Page/Guide/About.php
@@ -0,0 +1,58 @@
+arrPref = $masterData->getMasterData('mtb_pref');
+ }
+
+ /**
+ * Page のプロセス.
+ *
+ * @return void
+ */
+ public function process()
+ {
+ parent::process();
+ $this->action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ }
+}
diff --git a/data/Eccube/Page/Guide/Charge.php b/data/Eccube/Page/Guide/Charge.php
new file mode 100644
index 00000000000..c3307a7c51b
--- /dev/null
+++ b/data/Eccube/Page/Guide/Charge.php
@@ -0,0 +1,55 @@
+action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ }
+}
diff --git a/data/Eccube/Page/Guide/Index.php b/data/Eccube/Page/Guide/Index.php
new file mode 100644
index 00000000000..16275a94a15
--- /dev/null
+++ b/data/Eccube/Page/Guide/Index.php
@@ -0,0 +1,55 @@
+action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ }
+}
diff --git a/data/class/pages/guide/LC_Page_Guide_Kiyaku.php b/data/Eccube/Page/Guide/Kiyaku.php
similarity index 66%
rename from data/class/pages/guide/LC_Page_Guide_Kiyaku.php
rename to data/Eccube/Page/Guide/Kiyaku.php
index 5bb3d59597a..f15c9c1487b 100644
--- a/data/class/pages/guide/LC_Page_Guide_Kiyaku.php
+++ b/data/Eccube/Page/Guide/Kiyaku.php
@@ -1,36 +1,27 @@
getList();
$number = count($arrKiyaku);
diff --git a/data/Eccube/Page/Guide/Privacy.php b/data/Eccube/Page/Guide/Privacy.php
new file mode 100644
index 00000000000..a919a4fc70b
--- /dev/null
+++ b/data/Eccube/Page/Guide/Privacy.php
@@ -0,0 +1,55 @@
+action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ }
+}
diff --git a/data/Eccube/Page/Guide/Usage.php b/data/Eccube/Page/Guide/Usage.php
new file mode 100644
index 00000000000..8238b8d99b4
--- /dev/null
+++ b/data/Eccube/Page/Guide/Usage.php
@@ -0,0 +1,55 @@
+action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ }
+}
diff --git a/data/Eccube/Page/Index.php b/data/Eccube/Page/Index.php
new file mode 100644
index 00000000000..4f01fdc7149
--- /dev/null
+++ b/data/Eccube/Page/Index.php
@@ -0,0 +1,60 @@
+action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ //決済処理中ステータスのロールバック
+ $objPurchase = new \Eccube\Common\Helper\PurchaseHelper();
+ $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
+
+ $this->tpl_title = '';
+ $objCustomer = new \Eccube\Common\Customer();
+ $this->isLogin = $objCustomer->isLoginSuccess(true);
+ }
+}
diff --git a/data/class/pages/LC_Page_InputZip.php b/data/Eccube/Page/InputZip.php
similarity index 94%
rename from data/class/pages/LC_Page_InputZip.php
rename to data/Eccube/Page/InputZip.php
index 45b8acbc1fc..1e275d2cf0f 100644
--- a/data/class/pages/LC_Page_InputZip.php
+++ b/data/Eccube/Page/InputZip.php
@@ -21,16 +21,18 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-require_once CLASS_EX_REALDIR . 'page_extends/LC_Page_Ex.php';
+namespace Eccube\Page;
+
+use Eccube\Common\FormParam;
+use Eccube\Common\Util\Utils;
/**
* 郵便番号入力 のページクラス.
*
* @package Page
* @author LOCKON CO.,LTD.
- * @version $Id$
*/
-class LC_Page_InputZip extends LC_Page_Ex
+class InputZip extends AbstractPage
{
/**
* Page を初期化する.
@@ -67,7 +69,7 @@ public function process()
$zipcode = $_GET['zip1'] . $_GET['zip2'];
// 郵便番号検索
- $arrAdsList = SC_Utils_Ex::sfGetAddress($zipcode);
+ $arrAdsList = Utils::sfGetAddress($zipcode);
// 郵便番号が発見された場合
if (!empty($arrAdsList)) {
@@ -90,7 +92,7 @@ public function process()
public function fnErrorCheck($arrRequest)
{
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター情報の初期化
$objFormParam->addParam('郵便番号1', 'zip1', ZIP01_LEN, 'n', array('NUM_COUNT_CHECK', 'NUM_CHECK'));
$objFormParam->addParam('郵便番号2', 'zip2', ZIP02_LEN, 'n', array('NUM_COUNT_CHECK', 'NUM_CHECK'));
diff --git a/data/class/pages/mypage/LC_Page_AbstractMypage.php b/data/Eccube/Page/Mypage/AbstractMypage.php
old mode 100755
new mode 100644
similarity index 68%
rename from data/class/pages/mypage/LC_Page_AbstractMypage.php
rename to data/Eccube/Page/Mypage/AbstractMypage.php
index d4aa0676e7f..0eb25bb0fbb
--- a/data/class/pages/mypage/LC_Page_AbstractMypage.php
+++ b/data/Eccube/Page/Mypage/AbstractMypage.php
@@ -1,36 +1,29 @@
isLoginSuccess(true) === false) {
// クッキー管理クラス
- $objCookie = new SC_Cookie_Ex();
+ $objCookie = new Cookie();
// クッキー判定(メールアドレスをクッキーに保存しているか)
$this->tpl_login_email = $objCookie->getCookie('login_email');
if ($this->tpl_login_email != '') {
@@ -75,7 +68,7 @@ public function process()
}
// 携帯端末IDが一致する会員が存在するかどうかをチェックする。
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() === DEVICE_TYPE_MOBILE) {
$this->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();
}
$this->tpl_title = 'MYページ(ログイン)';
diff --git a/data/class/pages/mypage/LC_Page_Mypage_Change.php b/data/Eccube/Page/Mypage/Change.php
similarity index 72%
rename from data/class/pages/mypage/LC_Page_Mypage_Change.php
rename to data/Eccube/Page/Mypage/Change.php
index fadb7102256..59ef1c892de 100644
--- a/data/class/pages/mypage/LC_Page_Mypage_Change.php
+++ b/data/Eccube/Page/Mypage/Change.php
@@ -1,36 +1,32 @@
tpl_subtitle = '会員登録内容変更(入力ページ)';
$this->tpl_mypageno = 'change';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrReminder = $masterData->getMasterData('mtb_reminder');
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrCountry = $masterData->getMasterData('mtb_country');
@@ -53,7 +49,7 @@ public function init()
$this->httpCacheControl('nocache');
// 生年月日選択肢の取得
- $objDate = new SC_Date_Ex(BIRTH_YEAR, date('Y'));
+ $objDate = new Date(BIRTH_YEAR, date('Y'));
$this->arrYear = $objDate->getYear('', START_BIRTH_YEAR, '');
$this->arrMonth = $objDate->getMonth(true);
$this->arrDay = $objDate->getDay(true);
@@ -75,7 +71,7 @@ public function process()
*/
public function action()
{
- $objCustomer = new SC_Customer_Ex();
+ $objCustomer = new Customer();
$customer_id = $objCustomer->getValue('customer_id');
// mobile用(戻るボタンでの遷移かどうかを判定)
@@ -84,8 +80,8 @@ public function action()
}
// パラメーター管理クラス,パラメーター情報の初期化
- $objFormParam = new SC_FormParam_Ex();
- SC_Helper_Customer_Ex::sfCustomerMypageParam($objFormParam);
+ $objFormParam = new FormParam();
+ CustomerHelper::sfCustomerMypageParam($objFormParam);
$objFormParam->setParam($_POST); // POST値の取得
switch ($this->getMode()) {
@@ -100,7 +96,7 @@ public function action()
$zipcode = $_POST['zip01'] . $_POST['zip02'];
// 郵便番号検索
- $arrAdsList = SC_Utils_Ex::sfGetAddress($zipcode);
+ $arrAdsList = Utils::sfGetAddress($zipcode);
// 郵便番号が発見された場合
if (!empty($arrAdsList)) {
@@ -114,12 +110,12 @@ public function action()
}
break;
}
- $this->arrErr = SC_Helper_Customer_Ex::sfCustomerMypageErrorCheck($objFormParam);
+ $this->arrErr = CustomerHelper::sfCustomerMypageErrorCheck($objFormParam);
// 入力エラーなし
if (empty($this->arrErr)) {
//パスワード表示
- $this->passlen = SC_Utils_Ex::sfPassLen(strlen($objFormParam->getValue('password')));
+ $this->passlen = Utils::sfPassLen(strlen($objFormParam->getValue('password')));
$this->tpl_mainpage = 'mypage/change_confirm.tpl';
$this->tpl_title = '会員登録(確認ページ)';
@@ -128,7 +124,7 @@ public function action()
break;
// 会員登録と完了画面
case 'complete':
- $this->arrErr = SC_Helper_Customer_Ex::sfCustomerMypageErrorCheck($objFormParam);
+ $this->arrErr = CustomerHelper::sfCustomerMypageErrorCheck($objFormParam);
// 入力エラーなし
if (empty($this->arrErr)) {
@@ -139,7 +135,7 @@ public function action()
$objCustomer->updateSession();
// 完了ページに移動させる。
- SC_Response_Ex::sendRedirect('change_complete.php');
+ Response::sendRedirect('change_complete.php');
}
break;
// 確認ページからの戻り
@@ -147,7 +143,7 @@ public function action()
// quiet.
break;
default:
- $objFormParam->setParam(SC_Helper_Customer_Ex::sfGetCustomerData($customer_id));
+ $objFormParam->setParam(CustomerHelper::sfGetCustomerData($customer_id));
break;
}
$this->arrForm = $objFormParam->getFormParamList();
@@ -156,7 +152,7 @@ public function action()
/**
* 会員情報を登録する
*
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
* @param mixed $customer_id
* @access private
* @return void
@@ -165,9 +161,9 @@ public function lfRegistCustomerData(&$objFormParam, $customer_id)
{
$arrRet = $objFormParam->getHashArray();
$sqlval = $objFormParam->getDbArray();
- $sqlval['birth'] = SC_Utils_Ex::sfGetTimestamp($arrRet['year'], $arrRet['month'], $arrRet['day']);
+ $sqlval['birth'] = Utils::sfGetTimestamp($arrRet['year'], $arrRet['month'], $arrRet['day']);
- SC_Helper_Customer_Ex::sfEditCustomerData($sqlval, $customer_id);
+ CustomerHelper::sfEditCustomerData($sqlval, $customer_id);
}
/**
@@ -179,7 +175,7 @@ public function lfRegistCustomerData(&$objFormParam, $customer_id)
public function lfCheckError($arrRequest)
{
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター情報の初期化
$objFormParam->addParam('郵便番号1', 'zip01', ZIP01_LEN, 'n', array('EXIST_CHECK', 'NUM_COUNT_CHECK', 'NUM_CHECK'));
$objFormParam->addParam('郵便番号2', 'zip02', ZIP02_LEN, 'n', array('EXIST_CHECK', 'NUM_COUNT_CHECK', 'NUM_CHECK'));
diff --git a/data/Eccube/Page/Mypage/ChangeComplete.php b/data/Eccube/Page/Mypage/ChangeComplete.php
new file mode 100644
index 00000000000..29b5928d778
--- /dev/null
+++ b/data/Eccube/Page/Mypage/ChangeComplete.php
@@ -0,0 +1,53 @@
+tpl_subtitle = '会員登録内容変更(完了ページ)';
+ $this->tpl_mypageno = 'change';
+ }
+
+ /**
+ * Page のプロセス.
+ *
+ * @return void
+ */
+ public function process()
+ {
+ parent::process();
+ }
+
+ /**
+ * Page のAction.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ }
+}
diff --git a/data/class/pages/mypage/LC_Page_Mypage_Delivery.php b/data/Eccube/Page/Mypage/Delivery.php
similarity index 67%
rename from data/class/pages/mypage/LC_Page_Mypage_Delivery.php
rename to data/Eccube/Page/Mypage/Delivery.php
index a54ef84467b..4b823bb1824 100644
--- a/data/class/pages/mypage/LC_Page_Mypage_Delivery.php
+++ b/data/Eccube/Page/Mypage/Delivery.php
@@ -1,36 +1,31 @@
tpl_subtitle = 'お届け先追加・変更';
$this->tpl_mypageno = 'delivery';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrCountry = $masterData->getMasterData('mtb_country');
$this->httpCacheControl('nocache');
@@ -65,10 +60,10 @@ public function process()
*/
public function action()
{
- $objCustomer = new SC_Customer_Ex();
+ $objCustomer = new Customer();
$customer_id = $objCustomer->getValue('customer_id');
- $objAddress = new SC_Helper_Address_Ex();
- $objFormParam = new SC_FormParam_Ex();
+ $objAddress = new AddressHelper();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -78,13 +73,13 @@ public function action()
// お届け先の削除
case 'delete':
if ($objFormParam->checkError()) {
- SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(CUSTOMER_ERROR);
+ Response::actionExit();
}
if (!$objAddress->deleteAddress($objFormParam->getValue('other_deliv_id'), $customer_id)) {
- SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '別のお届け先を削除できませんでした。');
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(FREE_ERROR_MSG, '', false, '別のお届け先を削除できませんでした。');
+ Response::actionExit();
}
break;
@@ -98,8 +93,8 @@ public function action()
$arrOtherDeliv['delivCount'] = count($arrOtherDeliv);
$this->arrOtherDeliv = $arrOtherDeliv;
- echo SC_Utils_Ex::jsonEncode($this->arrOtherDeliv);
- SC_Response_Ex::actionExit();
+ echo Utils::jsonEncode($this->arrOtherDeliv);
+ Response::actionExit();
break;
// お届け先の表示
@@ -120,8 +115,8 @@ public function action()
/**
* フォームパラメータの初期化
*
- * @param SC_FormParam_Ex $objFormParam
- * @return SC_FormParam
+ * @param FormParam $objFormParam
+ * @return FormParam
*/
public function lfInitParam(&$objFormParam)
{
diff --git a/data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php b/data/Eccube/Page/Mypage/DeliveryAddr.php
similarity index 72%
rename from data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php
rename to data/Eccube/Page/Mypage/DeliveryAddr.php
index adf9488ac50..af813b7cae3 100644
--- a/data/class/pages/mypage/LC_Page_Mypage_DeliveryAddr.php
+++ b/data/Eccube/Page/Mypage/DeliveryAddr.php
@@ -1,27 +1,25 @@
skip_load_page_layout = true;
parent::init();
$this->tpl_title = 'お届け先の追加・変更';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrCountry = $masterData->getMasterData('mtb_country');
$this->httpCacheControl('nocache');
@@ -70,8 +68,8 @@ public function process()
*/
public function action()
{
- $objCustomer = new SC_Customer_Ex();
- $objAddress = new SC_Helper_Address_Ex();
+ $objCustomer = new Customer();
+ $objAddress = new AddressHelper();
$ParentPage = MYPAGE_DELIVADDR_URLPATH;
// GETでページを指定されている場合には指定ページに戻す
@@ -83,7 +81,7 @@ public function action()
// 正しい遷移かをチェック
$arrParentPageList = array(DELIV_URLPATH, MYPAGE_DELIVADDR_URLPATH, MULTIPLE_URLPATH);
- if (!SC_Utils_Ex::isBlank($ParentPage) && !in_array($ParentPage, $arrParentPageList)) {
+ if (!Utils::isBlank($ParentPage) && !in_array($ParentPage, $arrParentPageList)) {
// 遷移が正しくない場合、デフォルトであるマイページの配送先追加の画面を設定する
$ParentPage = MYPAGE_DELIVADDR_URLPATH;
}
@@ -104,7 +102,7 @@ public function action()
$_SESSION['other_deliv_id'] = $_REQUEST['other_deliv_id'];
// パラメーター管理クラス,パラメーター情報の初期化
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$objAddress->setFormParam($objFormParam);
$objFormParam->setParam($_POST);
@@ -118,7 +116,7 @@ public function action()
if (in_array($_POST['ParentPage'], $this->validUrl)) {
$this->tpl_onload = "eccube.changeParentUrl('". $this->getLocation($_POST['ParentPage']) ."'); window.close();";
} else {
- SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
+ Utils::sfDispSiteError(CUSTOMER_ERROR);
}
if ($objCustomer->isLoginSuccess(true)) {
@@ -127,10 +125,10 @@ public function action()
$this->lfRegistDataNonMember($objFormParam);
}
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() === DEVICE_TYPE_MOBILE) {
// モバイルの場合、元のページに遷移
- SC_Response_Ex::sendRedirect($this->getLocation($_POST['ParentPage']));
- SC_Response_Ex::actionExit();
+ Response::sendRedirect($this->getLocation($_POST['ParentPage']));
+ Response::actionExit();
}
}
break;
@@ -144,7 +142,7 @@ public function action()
//不正アクセス判定
if (!$objCustomer->isLoginSuccess(true) || !$arrOtherDeliv) {
- SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
+ Utils::sfDispSiteError(CUSTOMER_ERROR);
}
//別のお届け先情報取得
@@ -154,7 +152,7 @@ public function action()
}
$this->arrForm = $objFormParam->getFormParamList();
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() === DEVICE_TYPE_MOBILE) {
$this->tpl_mainpage = 'mypage/delivery_addr.tpl';
} else {
$this->setTemplate('mypage/delivery_addr.tpl');
@@ -165,8 +163,8 @@ public function action()
/* 登録実行 */
/**
- * @param SC_Helper_Address_Ex $objAddress
- * @param SC_FormParam $objFormParam
+ * @param AddressHelper $objAddress
+ * @param FormParam $objFormParam
*/
public function lfRegistData($objAddress, $objFormParam, $customer_id)
{
@@ -177,13 +175,13 @@ public function lfRegistData($objAddress, $objFormParam, $customer_id)
$sqlval['customer_id'] = $customer_id;
if (!$objAddress->registAddress($sqlval)) {
- SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '別のお届け先を登録できませんでした。');
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(FREE_ERROR_MSG, '', false, '別のお届け先を登録できませんでした。');
+ Response::actionExit();
}
}
/**
- * @param SC_FormParam $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfRegistDataNonMember($objFormParam)
{
@@ -192,7 +190,7 @@ public function lfRegistDataNonMember($objFormParam)
$arrRegist['shipping_' . $key ] = $val;
}
if (count($_SESSION['shipping']) >= DELIV_ADDR_MAX) {
- SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '別のお届け先最大登録数に達しています。');
+ Utils::sfDispSiteError(FREE_ERROR_MSG, '', false, '別のお届け先最大登録数に達しています。');
} else {
$_SESSION['shipping'][] = $arrRegist;
}
diff --git a/data/class/pages/mypage/LC_Page_Mypage_DownLoad.php b/data/Eccube/Page/Mypage/Download.php
similarity index 82%
rename from data/class/pages/mypage/LC_Page_Mypage_DownLoad.php
rename to data/Eccube/Page/Mypage/Download.php
index f7f337a669f..217a7ed483f 100644
--- a/data/class/pages/mypage/LC_Page_Mypage_DownLoad.php
+++ b/data/Eccube/Page/Mypage/Download.php
@@ -1,35 +1,37 @@
isLoginSuccess(true)) {
- SC_Utils_Ex::sfDispSiteError(DOWNFILE_NOT_FOUND, '', true);
+ Utils::sfDispSiteError(DOWNFILE_NOT_FOUND, '', true);
}
// パラメーターチェック
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
// GET、SESSION['customer']値の取得
$objFormParam->setParam($_SESSION['customer']);
$objFormParam->setParam($_GET);
$this->arrErr = $this->lfCheckError($objFormParam);
if (count($this->arrErr)!=0) {
- SC_Utils_Ex::sfDispSiteError(DOWNFILE_NOT_FOUND, '', true);
+ Utils::sfDispSiteError(DOWNFILE_NOT_FOUND, '', true);
}
}
@@ -104,7 +106,7 @@ public function action()
public function sendResponse()
{
// TODO sendResponseをオーバーライドしている為、afterフックポイントが実行されない.直接実行する.(#1790)
- $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
+ $objPlugin = PluginHelper::getSingletonInstance($this->plugin_activate_flg);
$objPlugin->doAction('LC_Page_Mypage_DownLoad_action_after', array($this));
$this->objDisplay->noAction();
@@ -119,12 +121,12 @@ public function sendResponse()
//ファイル情報が無い場合はNG
if ($arrForm['down_realfilename'] == '') {
- SC_Utils_Ex::sfDispSiteError(DOWNFILE_NOT_FOUND, '', true);
+ Utils::sfDispSiteError(DOWNFILE_NOT_FOUND, '', true);
}
//ファイルそのものが無い場合もとりあえずNG
$realpath = DOWN_SAVE_REALDIR . $arrForm['down_realfilename'];
if (!file_exists($realpath)) {
- SC_Utils_Ex::sfDispSiteError(DOWNFILE_NOT_FOUND, '', true);
+ Utils::sfDispSiteError(DOWNFILE_NOT_FOUND, '', true);
}
//ファイル名をエンコードする Safariの対策はUTF-8で様子を見る
$encoding = 'Shift_JIS';
@@ -133,13 +135,13 @@ public function sendResponse()
}
$sdown_filename = mb_convert_encoding($arrForm['down_filename'], $encoding, 'auto');
- // flushなどを利用しているので、現行のSC_Displayは利用できません。
- // SC_DisplayやSC_Responseに大容量ファイルレスポンスが実装されたら移行可能だと思います。
+ // flushなどを利用しているので、現行のDisplayは利用できません。
+ // DisplayやResponseに大容量ファイルレスポンスが実装されたら移行可能だと思います。
// ダウンロード実行 モバイル端末はダウンロード方法が異なる
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE) {
// キャリアがAUのモバイル端末はさらにダウンロード方法が異なる
- if (SC_MobileUserAgent::getCarrier() == 'ezweb') {
+ if (MobileUserAgent::getCarrier() == 'ezweb') {
// AUモバイル
$this->lfMobileAuDownload($realpath, $sdown_filename);
} else {
@@ -162,7 +164,7 @@ public function sendResponse()
*/
public function lfGetRealFileName($customer_id, $order_id, $product_class_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = <<< __EOS__
pc.down_realfilename AS down_realfilename,
pc.down_filename AS down_filename
@@ -174,7 +176,7 @@ public function lfGetRealFileName($customer_id, $order_id, $product_class_id)
JOIN dtb_products_class AS pc USING(product_id, product_class_id)
__EOS__;
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
$where = 'o.customer_id = ? AND o.order_id = ? AND od.product_class_id = ?';
$where .= ' AND ' . $dbFactory->getDownloadableDaysWhereSql('o');
$where .= ' = 1';
@@ -187,7 +189,7 @@ public function lfGetRealFileName($customer_id, $order_id, $product_class_id)
/* パラメーター情報の初期化 */
/**
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfInitParam(&$objFormParam)
{
@@ -199,11 +201,11 @@ public function lfInitParam(&$objFormParam)
/* 入力内容のチェック */
/**
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfCheckError(&$objFormParam)
{
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
+ $objErr = new CheckError($objFormParam->getHashArray());
$objErr->arrErr = $objFormParam->checkError();
return $objErr->arrErr;
@@ -217,7 +219,7 @@ public function lfCheckError(&$objFormParam)
*/
public function lfMobileHeader($realpath, $sdown_filename)
{
- $objHelperMobile = new SC_Helper_Mobile_Ex();
+ $objHelperMobile = new MobileHelper();
//ファイルの拡張子からコンテンツタイプを取得する
$mime_type = $objHelperMobile->getMIMEType($realpath);
header('Content-Type: ' . $mime_type);
@@ -256,7 +258,7 @@ public function lfMobileAuDownload($realpath, $sdown_filename)
header('Content-Length: ' . $content_length);
}
echo fread($fp, $content_length);
- SC_Utils_Ex::sfFlush();
+ Utils::sfFlush();
}
/**
@@ -309,8 +311,8 @@ public function lfMobileDownload($realpath, $sdown_filename)
while (!feof($realpath) && (!connection_aborted()) && ($bytes_send<$new_length)) {
$buffer = fread($realpath, $chunksize);
print($buffer);
- SC_Utils_Ex::sfFlush();
- SC_Utils_Ex::extendTimeOut();
+ Utils::sfFlush();
+ Utils::extendTimeOut();
$bytes_send += strlen($buffer);
}
fclose($realpath);
@@ -350,13 +352,13 @@ public function lfDownload($realpath, $sdown_filename)
//ファイル読み込み
$handle = fopen($realpath, 'rb');
if ($handle === false) {
- SC_Utils_Ex::sfDispSiteError(DOWNFILE_NOT_FOUND, '', true);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(DOWNFILE_NOT_FOUND, '', true);
+ Response::actionExit();
}
while (!feof($handle)) {
echo fread($handle, DOWNLOAD_BLOCK*1024);
- SC_Utils_Ex::sfFlush();
- SC_Utils_Ex::extendTimeOut();
+ Utils::sfFlush();
+ Utils::extendTimeOut();
}
fclose($handle);
}
diff --git a/data/class/pages/mypage/LC_Page_Mypage_Favorite.php b/data/Eccube/Page/Mypage/Favorite.php
similarity index 75%
rename from data/class/pages/mypage/LC_Page_Mypage_Favorite.php
rename to data/Eccube/Page/Mypage/Favorite.php
index 344533bcbf8..0ada6a11cbf 100644
--- a/data/class/pages/mypage/LC_Page_Mypage_Favorite.php
+++ b/data/Eccube/Page/Mypage/Favorite.php
@@ -1,36 +1,31 @@
getValue('customer_id');
@@ -81,16 +76,16 @@ public function action()
$this->tpl_pageno = intval($_POST['pageno']);
}
$this->arrFavorite = $this->lfGetFavoriteProduct($customer_id, $this);
- SC_Product_Ex::setPriceTaxTo($this->arrFavorite);
+ Product::setPriceTaxTo($this->arrFavorite);
// 一覧メイン画像の指定が無い商品のための処理
foreach ($this->arrFavorite as $key => $val) {
- $this->arrFavorite[$key]['main_list_image'] = SC_Utils_Ex::sfNoImageMainList($val['main_list_image']);
+ $this->arrFavorite[$key]['main_list_image'] = Utils::sfNoImageMainList($val['main_list_image']);
}
- echo SC_Utils_Ex::jsonEncode($this->arrFavorite);
- SC_Response_Ex::actionExit();
+ echo Utils::jsonEncode($this->arrFavorite);
+ Response::actionExit();
break;
default:
@@ -116,8 +111,8 @@ public function action()
*/
public function lfGetFavoriteProduct($customer_id, &$objPage)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
- $objProduct = new SC_Product_Ex();
+ $objQuery = Query::getSingletonInstance();
+ $objProduct = new Product();
$objQuery->setOrder('f.create_date DESC');
$where = 'f.customer_id = ? and p.status = 1';
@@ -126,18 +121,18 @@ public function lfGetFavoriteProduct($customer_id, &$objPage)
}
$arrProductId = $objQuery->getCol('f.product_id', 'dtb_customer_favorite_products f inner join dtb_products p using (product_id)', $where, array($customer_id));
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setWhere($this->lfMakeWhere('alldtl.', $arrProductId));
$linemax = $objProduct->findProductCount($objQuery);
$objPage->tpl_linemax = $linemax; // 何件が該当しました。表示用
// ページ送りの取得
- $objNavi = new SC_PageNavi_Ex($objPage->tpl_pageno, $linemax, SEARCH_PMAX, 'eccube.movePage', NAVI_PMAX);
+ $objNavi = new PageNavi($objPage->tpl_pageno, $linemax, SEARCH_PMAX, 'eccube.movePage', NAVI_PMAX);
$this->tpl_strnavi = $objNavi->strnavi; // 表示文字列
$startno = $objNavi->start_row;
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
//$objQuery->setLimitOffset(SEARCH_PMAX, $startno);
// 取得範囲の指定(開始行番号、行数のセット)
$arrProductId = array_slice($arrProductId, $startno, SEARCH_PMAX);
@@ -158,7 +153,7 @@ public function lfGetFavoriteProduct($customer_id, &$objPage)
}
// 税込金額を設定する
- SC_Product_Ex::setIncTaxToProducts($arrProductsList);
+ Product::setIncTaxToProducts($arrProductsList);
return $arrProductsList;
}
@@ -189,7 +184,7 @@ public function lfMakeWhere($tablename, $arrProductId)
*/
public function lfDeleteFavoriteProduct($customer_id, $product_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$exists = $objQuery->exists('dtb_customer_favorite_products', 'customer_id = ? AND product_id = ?', array($customer_id, $product_id));
diff --git a/data/class/pages/mypage/LC_Page_Mypage_History.php b/data/Eccube/Page/Mypage/History.php
similarity index 78%
rename from data/class/pages/mypage/LC_Page_Mypage_History.php
rename to data/Eccube/Page/Mypage/History.php
index 234294c02de..da112f5e060 100644
--- a/data/class/pages/mypage/LC_Page_Mypage_History.php
+++ b/data/Eccube/Page/Mypage/History.php
@@ -1,36 +1,36 @@
tpl_subtitle = '購入履歴詳細';
$this->httpCacheControl('nocache');
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrMAILTEMPLATE = $masterData->getMasterData('mtb_mail_template');
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrCountry = $masterData->getMasterData('mtb_country');
@@ -71,14 +71,14 @@ public function process()
public function action()
{
//決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
- $objCustomer = new SC_Customer_Ex();
- $objProduct = new SC_Product();
+ $objCustomer = new Customer();
+ $objProduct = new Product();
- if (!SC_Utils_Ex::sfIsInt($_GET['order_id'])) {
- SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
+ if (!Utils::sfIsInt($_GET['order_id'])) {
+ Utils::sfDispSiteError(CUSTOMER_ERROR);
}
$order_id = $_GET['order_id'];
@@ -88,14 +88,14 @@ public function action()
$this->tpl_arrOrderData = $objPurchase->getOrder($order_id, $objCustomer->getValue('customer_id'));
if (empty($this->tpl_arrOrderData)) {
- SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
+ Utils::sfDispSiteError(CUSTOMER_ERROR);
}
$this->arrShipping = $this->lfGetShippingDate($objPurchase, $order_id, $this->arrWDAY);
$this->isMultiple = count($this->arrShipping) > 1;
// 支払い方法の取得
- $this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
+ $this->arrPayment = PaymentHelper::getIDValueList();
// 受注商品明細の取得
$this->tpl_arrOrderDetail = $objPurchase->getOrderDetail($order_id);
foreach ($this->tpl_arrOrderDetail as $product_index => $arrOrderProductDetail) {
@@ -103,12 +103,12 @@ public function action()
$arrTempProductDetail = $objProduct->getProductsClass($arrOrderProductDetail['product_class_id']);
// 税計算
$this->tpl_arrOrderDetail[$product_index]['price_inctax'] = $this->tpl_arrOrderDetail[$product_index]['price'] +
- SC_Helper_TaxRule_Ex::calcTax(
+ TaxRuleHelper::calcTax(
$this->tpl_arrOrderDetail[$product_index]['price'],
$this->tpl_arrOrderDetail[$product_index]['tax_rate'],
$this->tpl_arrOrderDetail[$product_index]['tax_rule']
);
- $arrTempProductDetail['price02_inctax'] = SC_Helper_TaxRule_Ex::sfCalcIncTax(
+ $arrTempProductDetail['price02_inctax'] = TaxRuleHelper::sfCalcIncTax(
$arrTempProductDetail['price02'],
$arrTempProductDetail['product_id'],
$arrTempProductDetail['product_class_id']
@@ -135,7 +135,7 @@ public function action()
*/
public function lfGetMailHistory($order_id)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = 'send_date, subject, template_id, send_id';
$where = 'order_id = ?';
$objQuery->setOrder('send_date DESC');
@@ -146,7 +146,7 @@ public function lfGetMailHistory($order_id)
/**
* 受注お届け先情報の取得
*
- * @param SC_Helper_Purchase_Ex $objPurchase object SC_Helper_Purchaseクラス
+ * @param PurchaseHelper $objPurchase object PurchaseHelperクラス
* @param $order_id integer 注文番号
* @param $arrWDAY array 曜日データの配列
* @return array お届け先情報
@@ -157,7 +157,7 @@ public function lfGetShippingDate(&$objPurchase, $order_id, $arrWDAY)
foreach ($arrShipping as $shipping_index => $shippingData) {
foreach ($shippingData as $key => $val) {
- if ($key == 'shipping_date' && SC_Utils_Ex::isBlank($val) == false) {
+ if ($key == 'shipping_date' && Utils::isBlank($val) == false) {
// お届け日を整形
list($y, $m, $d, $w) = explode(' ', date('Y m d w', strtotime($val)));
$arrShipping[$shipping_index]['shipping_date'] = sprintf('%04d/%02d/%02d(%s)', $y, $m, $d, $arrWDAY[$w]);
@@ -178,7 +178,7 @@ public function setMainListImage($arrOrderDetails)
{
$i = 0;
foreach ($arrOrderDetails as $arrOrderDetail) {
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrProduct = $objQuery->select('main_list_image', 'dtb_products', 'product_id = ?', array($arrOrderDetail['product_id']));
$arrOrderDetails[$i]['main_list_image'] = $arrProduct[0]['main_list_image'];
$i++;
@@ -195,10 +195,10 @@ public function setMainListImage($arrOrderDetails)
*/
public function lfSetMimetype($arrOrderDetails)
{
- $objHelperMobile = new SC_Helper_Mobile_Ex();
+ $objHelperMobile = new MobileHelper();
$i = 0;
foreach ($arrOrderDetails as $arrOrderDetail) {
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrProduct = $objQuery->select('down_realfilename,down_filename', 'dtb_products_class', 'product_id = ? AND product_class_id = ?', array($arrOrderDetail['product_id'],$arrOrderDetail['product_class_id']));
$arrOrderDetails[$i]['mime_type'] = $objHelperMobile->getMimeType($arrProduct[0]['down_realfilename']);
$arrOrderDetails[$i]['down_filename'] = $arrProduct[0]['down_filename'];
@@ -219,7 +219,7 @@ public function lfSetAU($arrOrderDetails)
{
$this->isAU = false;
// モバイル端末かつ、キャリアがAUの場合に処理を行う
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE && SC_MobileUserAgent::getCarrier() == 'ezweb') {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE && MobileUserAgent::getCarrier() == 'ezweb') {
// MIMETYPE、ファイル名のセット
$this->tpl_arrOrderDetail = $this->lfSetMimetype($arrOrderDetails);
diff --git a/data/class/pages/mypage/LC_Page_Mypage.php b/data/Eccube/Page/Mypage/Index.php
similarity index 62%
rename from data/class/pages/mypage/LC_Page_Mypage.php
rename to data/Eccube/Page/Mypage/Index.php
index 43a102edf2e..11f10e17ec4 100644
--- a/data/class/pages/mypage/LC_Page_Mypage.php
+++ b/data/Eccube/Page/Mypage/Index.php
@@ -1,36 +1,34 @@
tpl_mypageno = 'index';
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() === DEVICE_TYPE_MOBILE) {
$this->tpl_subtitle = 'MYページ';
} else {
$this->tpl_subtitle = '購入履歴一覧';
}
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrCustomerOrderStatus = $masterData->getMasterData('mtb_customer_order_status');
$this->httpCacheControl('nocache');
@@ -73,38 +71,38 @@ public function process()
public function action()
{
//決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
- $objCustomer = new SC_Customer_Ex();
+ $objCustomer = new Customer();
$customer_id = $objCustomer->getValue('customer_id');
//ページ送り用
- $this->objNavi = new SC_PageNavi_Ex($_REQUEST['pageno'],
+ $this->objNavi = new PageNavi($_REQUEST['pageno'],
$this->lfGetOrderHistory($customer_id),
SEARCH_PMAX,
'eccube.movePage',
NAVI_PMAX,
'pageno=#page#',
- SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE);
+ Display::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();
+ echo Utils::jsonEncode($this->arrOrder);
+ Response::actionExit();
break;
default:
break;
}
// 支払い方法の取得
- $this->arrPayment = SC_Helper_Payment_Ex::getIDValueList();
+ $this->arrPayment = PaymentHelper::getIDValueList();
// 1ページあたりの件数
$this->dispNumber = SEARCH_PMAX;
- $this->json_payment = SC_Utils::jsonEncode($this->arrPayment);
- $this->json_customer_order_status = SC_Utils::jsonEncode($this->arrCustomerOrderStatus);
+ $this->json_payment = Utils::jsonEncode($this->arrPayment);
+ $this->json_customer_order_status = Utils::jsonEncode($this->arrCustomerOrderStatus);
}
/**
@@ -117,7 +115,7 @@ public function action()
*/
public function lfGetOrderHistory($customer_id, $startno = -1)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = 'order_id, create_date, payment_id, payment_total, status';
$from = 'dtb_order';
diff --git a/data/Eccube/Page/Mypage/Login.php b/data/Eccube/Page/Mypage/Login.php
new file mode 100644
index 00000000000..0bf4b05c9ef
--- /dev/null
+++ b/data/Eccube/Page/Mypage/Login.php
@@ -0,0 +1,60 @@
+httpCacheControl('nocache');
+ }
+
+ /**
+ * Page のプロセス.
+ *
+ * @return void
+ */
+ public function process()
+ {
+ parent::process();
+ }
+
+ /**
+ * Page のAction.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ //決済処理中ステータスのロールバック
+ $objPurchase = new PurchaseHelper();
+ $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
+
+ Response::sendRedirect(DIR_INDEX_PATH);
+ }
+}
diff --git a/data/class/pages/mypage/LC_Page_Mypage_MailView.php b/data/Eccube/Page/Mypage/MailView.php
similarity index 59%
rename from data/class/pages/mypage/LC_Page_Mypage_MailView.php
rename to data/Eccube/Page/Mypage/MailView.php
index c45929b8415..8ab5bb7cd0d 100644
--- a/data/class/pages/mypage/LC_Page_Mypage_MailView.php
+++ b/data/Eccube/Page/Mypage/MailView.php
@@ -1,36 +1,30 @@
lfGetMailView($_GET['send_id'], $objCustomer->getValue('customer_id'));
if (empty($arrMailView)) {
- SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
+ Utils::sfDispSiteError(CUSTOMER_ERROR);
}
$this->tpl_subject = $arrMailView[0]['subject'];
$this->tpl_body = $arrMailView[0]['mail_body'];
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_PC) {
+ if (Display::detectDevice() === DEVICE_TYPE_PC) {
$this->setTemplate('mypage/mail_view.tpl');
} else {
$this->tpl_title = 'メール履歴詳細';
@@ -85,8 +79,8 @@ public function action()
switch ($this->getMode()) {
case 'getDetail':
- echo SC_Utils_Ex::jsonEncode($arrMailView);
- SC_Response_Ex::actionExit();
+ echo Utils::jsonEncode($arrMailView);
+ Response::actionExit();
break;
default:
break;
@@ -104,7 +98,7 @@ public function action()
*/
public function lfGetMailView($send_id, $customer_id)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$col = 'subject, mail_body';
$where = 'send_id = ? AND customer_id = ?';
$arrWhereVal = array($send_id, $customer_id);
diff --git a/data/class/pages/mypage/LC_Page_Mypage_Order.php b/data/Eccube/Page/Mypage/Order.php
similarity index 64%
rename from data/class/pages/mypage/LC_Page_Mypage_Order.php
rename to data/Eccube/Page/Mypage/Order.php
index b9a1dceab2a..aa151af7f36 100644
--- a/data/class/pages/mypage/LC_Page_Mypage_Order.php
+++ b/data/Eccube/Page/Mypage/Order.php
@@ -1,36 +1,31 @@
cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
//受注詳細データの取得
@@ -69,19 +64,19 @@ public function action()
//ログインしていない、またはDBに情報が無い場合
if (empty($arrOrderDetail)) {
- SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
+ Utils::sfDispSiteError(CUSTOMER_ERROR);
}
$this->lfAddCartProducts($arrOrderDetail);
- SC_Response_Ex::sendRedirect(CART_URL);
+ Response::sendRedirect(CART_URL);
}
// 受注詳細データの取得
public function lfGetOrderDetail($order_id)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
- $objCustomer = new SC_Customer_Ex();
+ $objCustomer = new Customer();
//customer_idを検証
$customer_id = $objCustomer->getValue('customer_id');
$order_count = $objQuery->count('dtb_order', 'order_id = ? and customer_id = ?', array($order_id, $customer_id));
@@ -99,7 +94,7 @@ public function lfGetOrderDetail($order_id)
// 商品をカートに追加
public function lfAddCartProducts($arrOrderDetail)
{
- $objCartSess = new SC_CartSession_Ex();
+ $objCartSess = new CartSession();
foreach ($arrOrderDetail as $order_row) {
$objCartSess->addProduct($order_row['product_class_id'], $order_row['quantity']);
}
diff --git a/data/class/pages/mypage/LC_Page_Mypage_Refusal.php b/data/Eccube/Page/Mypage/Refusal.php
similarity index 70%
rename from data/class/pages/mypage/LC_Page_Mypage_Refusal.php
rename to data/Eccube/Page/Mypage/Refusal.php
index 412eaddf46b..9bb949025fb 100644
--- a/data/class/pages/mypage/LC_Page_Mypage_Refusal.php
+++ b/data/Eccube/Page/Mypage/Refusal.php
@@ -1,36 +1,35 @@
isValidRefusalToken()) {
// エラー画面へ遷移する
- SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(PAGE_ERROR, '', true);
+ Response::actionExit();
}
- $objCustomer = new SC_Customer_Ex();
+ $objCustomer = new Customer();
$this->lfSendRefusalMail($objCustomer->getValue('customer_id'));
$this->lfDeleteCustomer($objCustomer->getValue('customer_id'));
$objCustomer->EndSession();
- SC_Response_Ex::sendRedirect('refusal_complete.php');
+ Response::sendRedirect('refusal_complete.php');
break;
default:
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE) {
$this->refusal_transactionid = $this->getRefusalToken();
}
break;
@@ -102,7 +101,7 @@ public function action()
*/
function getRefusalToken() {
if (empty($_SESSION['refusal_transactionid'])) {
- $_SESSION['refusal_transactionid'] = SC_Helper_Session_Ex::createToken();
+ $_SESSION['refusal_transactionid'] = SessionHelper::createToken();
}
return $_SESSION['refusal_transactionid'];
}
@@ -135,7 +134,7 @@ function destroyRefusalToken() {
*/
public function lfDeleteCustomer($customer_id)
{
- return SC_Helper_Customer_Ex::delete($customer_id);
+ return CustomerHelper::delete($customer_id);
}
/**
@@ -148,29 +147,29 @@ public function lfDeleteCustomer($customer_id)
public function lfSendRefusalMail($customer_id)
{
// 会員データの取得
- if (SC_Utils_Ex::sfIsInt($customer_id)) {
- $arrCustomerData = SC_Helper_Customer_Ex::sfGetCustomerDataFromId($customer_id);
+ if (Utils::sfIsInt($customer_id)) {
+ $arrCustomerData = CustomerHelper::sfGetCustomerDataFromId($customer_id);
}
- if (SC_Utils_Ex::isBlank($arrCustomerData)) {
+ if (Utils::isBlank($arrCustomerData)) {
return false;
}
- $CONF = SC_Helper_DB_Ex::sfGetBasisData();
+ $CONF = DbHelper::getBasisData();
- $objMailText = new SC_SiteView_Ex();
+ $objMailText = new SiteView();
$objMailText->setPage($this);
$objMailText->assign('CONF', $CONF);
$objMailText->assign('name01', $arrCustomerData['name01']);
$objMailText->assign('name02', $arrCustomerData['name02']);
$objMailText->assignobj($this);
- $objHelperMail = new SC_Helper_Mail_Ex();
+ $objHelperMail = new MailHelper();
$objHelperMail->setPage($this);
$subject = $objHelperMail->sfMakeSubject('退会手続きのご完了', $objMailText);
$toCustomerMail = $objMailText->fetch('mail_templates/customer_refusal_mail.tpl');
- $objMail = new SC_SendMail_Ex();
+ $objMail = new SendMail();
$objMail->setItem(
'', // 宛先
$subject, // サブジェクト
diff --git a/data/Eccube/Page/Mypage/RefusalComplete.php b/data/Eccube/Page/Mypage/RefusalComplete.php
new file mode 100644
index 00000000000..2f1651789e3
--- /dev/null
+++ b/data/Eccube/Page/Mypage/RefusalComplete.php
@@ -0,0 +1,67 @@
+tpl_title = 'MYページ';
+
+ if (Display::detectDevice() === DEVICE_TYPE_MOBILE) {
+ $this->tpl_title .= '/退会手続き(完了ページ)';
+ } else {
+ $this->tpl_subtitle = '退会手続き(完了ページ)';
+ }
+ $this->tpl_navi = PageLayoutHelper::getTemplatePath(Display::detectDevice()) . 'mypage/navi.tpl';
+ $this->tpl_mypageno = 'refusal';
+ $this->point_disp = false;
+ }
+
+ /**
+ * Page のプロセス.
+ *
+ * @return void
+ */
+ public function process()
+ {
+ parent::process();
+ $this->action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のAction.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ }
+}
diff --git a/data/Eccube/Page/Order/Index.php b/data/Eccube/Page/Order/Index.php
new file mode 100644
index 00000000000..86f9967c0db
--- /dev/null
+++ b/data/Eccube/Page/Order/Index.php
@@ -0,0 +1,62 @@
+tpl_title = '特定商取引に関する法律に基づく表記';
+ $masterData = new MasterData();
+ $this->arrPref = $masterData->getMasterData('mtb_pref');
+ }
+
+ /**
+ * Page のプロセス.
+ *
+ * @return void
+ */
+ public function process()
+ {
+ parent::process();
+ $this->action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ $objDb = new DbHelper();
+ $this->arrOrder = $objDb->getBasisData();
+ }
+}
diff --git a/data/Eccube/Page/Preview/Index.php b/data/Eccube/Page/Preview/Index.php
new file mode 100644
index 00000000000..296edd28887
--- /dev/null
+++ b/data/Eccube/Page/Preview/Index.php
@@ -0,0 +1,66 @@
+sfGetPageLayout($this, true);
+
+ // 画面の表示
+ $objView->assignobj($this);
+ $objView->display(SITE_FRAME);
+
+ return;
+ }
+ Utils::sfDispSiteError(PAGE_ERROR);
+ }
+}
diff --git a/data/class/pages/products/LC_Page_Products_CategoryList.php b/data/Eccube/Page/Products/CategoryList.php
similarity index 73%
rename from data/class/pages/products/LC_Page_Products_CategoryList.php
rename to data/Eccube/Page/Products/CategoryList.php
index 242f50de9f1..462b360a6dd 100644
--- a/data/class/pages/products/LC_Page_Products_CategoryList.php
+++ b/data/Eccube/Page/Products/CategoryList.php
@@ -1,36 +1,29 @@
lfCheckCategoryId($objFormParam->getValue('category_id'));
if ($category_id == 0) {
- SC_Utils_Ex::sfDispSiteError(CATEGORY_NOT_FOUND);
+ Utils::sfDispSiteError(CATEGORY_NOT_FOUND);
}
// カテゴリ情報を取得する。
@@ -82,7 +75,7 @@ public function action()
*/
public function lfCheckCategoryId($category_id)
{
- if ($category_id && !SC_Helper_DB_Ex::sfIsRecord('dtb_category', 'category_id', (array) $category_id, 'del_flg = 0')) {
+ if ($category_id && !DbHelper::isRecord('dtb_category', 'category_id', (array) $category_id, 'del_flg = 0')) {
return 0;
}
@@ -102,7 +95,7 @@ public function lfGetCategories($category_id, $count_check = false)
$arrCategory = null; // 選択されたカテゴリ
$arrChildren = array(); // 子カテゴリ
- $arrAll = SC_Helper_DB_Ex::sfGetCatTree($category_id, $count_check);
+ $arrAll = DbHelper::getCatTree($category_id, $count_check);
foreach ($arrAll as $category) {
// 選択されたカテゴリの場合
if ($category['category_id'] == $category_id) {
@@ -116,13 +109,13 @@ public function lfGetCategories($category_id, $count_check = false)
}
// 子カテゴリの場合は、孫カテゴリが存在するかどうかを調べる。
- $arrGrandchildrenID = SC_Utils_Ex::sfGetUnderChildrenArray($arrAll, 'parent_category_id', 'category_id', $category['category_id']);
+ $arrGrandchildrenID = Utils::sfGetUnderChildrenArray($arrAll, 'parent_category_id', 'category_id', $category['category_id']);
$category['has_children'] = count($arrGrandchildrenID) > 0;
$arrChildren[] = $category;
}
if (!isset($arrCategory)) {
- SC_Utils_Ex::sfDispSiteError(CATEGORY_NOT_FOUND);
+ Utils::sfDispSiteError(CATEGORY_NOT_FOUND);
}
// 子カテゴリの商品数を合計する。
@@ -144,11 +137,11 @@ public function lfGetCategories($category_id, $count_check = false)
/**
* ユーザ入力値の処理
*
- * @return SC_FormParam_Ex
+ * @return FormParam
*/
public function lfInitParam($arrRequest)
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$objFormParam->addParam('カテゴリID', 'category_id', INT_LEN, 'n', array('NUM_CHECK','MAX_LENGTH_CHECK'));
// 値の取得
$objFormParam->setParam($arrRequest);
diff --git a/data/class/pages/products/LC_Page_Products_Detail.php b/data/Eccube/Page/Products/Detail.php
similarity index 81%
rename from data/class/pages/products/LC_Page_Products_Detail.php
rename to data/Eccube/Page/Products/Detail.php
index 1f1c8eccce1..b4a132cecdc 100644
--- a/data/class/pages/products/LC_Page_Products_Detail.php
+++ b/data/Eccube/Page/Products/Detail.php
@@ -1,39 +1,42 @@
arrSTATUS = $masterData->getMasterData('mtb_status');
$this->arrSTATUS_IMAGE = $masterData->getMasterData('mtb_status_image');
$this->arrDELIVERYDATE = $masterData->getMasterData('mtb_delivery_date');
@@ -168,23 +168,23 @@ public function process()
public function action()
{
//決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
// 会員クラス
- $objCustomer = new SC_Customer_Ex();
+ $objCustomer = new Customer();
// パラメーター管理クラス
- $this->objFormParam = new SC_FormParam_Ex();
+ $this->objFormParam = new FormParam();
// パラメーター情報の初期化
$this->arrForm = $this->lfInitParam($this->objFormParam);
// ファイル管理クラス
- $this->objUpFile = new SC_UploadFile_Ex(IMAGE_TEMP_REALDIR, IMAGE_SAVE_REALDIR);
+ $this->objUpFile = new UploadFile(IMAGE_TEMP_REALDIR, IMAGE_SAVE_REALDIR);
// ファイル情報の初期化
$this->objUpFile = $this->lfInitFile($this->objUpFile);
$this->mode = $this->getMode();
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
// プロダクトIDの正当性チェック
$product_id = $this->lfCheckProductId($this->objFormParam->getValue('admin'), $this->objFormParam->getValue('product_id'), $objProduct);
@@ -215,13 +215,13 @@ public function action()
$this->js_lnOnload .= $this->lfMakeSelect();
}
- $this->tpl_javascript .= 'eccube.classCategories = ' . SC_Utils_Ex::jsonEncode($objProduct->classCategories[$product_id]) . ';';
+ $this->tpl_javascript .= 'eccube.classCategories = ' . Utils::jsonEncode($objProduct->classCategories[$product_id]) . ';';
$this->tpl_javascript .= 'function lnOnLoad()
{' . $this->js_lnOnload . '}';
$this->tpl_onload .= 'lnOnLoad();';
// モバイル用 規格選択セレクトボックスの作成
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE) {
$this->lfMakeSelectMobile($this, $product_id, $this->objFormParam->getValue('classcategory_id1'));
}
@@ -257,7 +257,7 @@ public function action()
}
// モバイル用 ポストバック処理
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE) {
switch ($this->mode) {
case 'select':
$this->doMobileSelect();
@@ -289,7 +289,7 @@ public function action()
// 関連カテゴリを取得
$arrCategory_id = $objProduct->getCategoryIds($product_id);
- $objCategory = new SC_Helper_Category_Ex();
+ $objCategory = new CategoryHelper();
$this->arrRelativeCat = array();
foreach ($arrCategory_id as $category_id) {
$this->arrRelativeCat[] = $objCategory->getTreeTrail($category_id, false);
@@ -300,12 +300,9 @@ public function action()
// 画像ファイル指定がない場合の置換処理
$this->arrProduct['main_image']
- = SC_Utils_Ex::sfNoImageMain($this->arrProduct['main_image']);
+ = Utils::sfNoImageMain($this->arrProduct['main_image']);
$this->subImageFlag = $this->lfSetFile($this->objUpFile, $this->arrProduct, $this->arrFile);
- //レビュー情報の取得
- $objReview = new SC_Helper_Review_Ex();
- $this->arrReview = $objReview->getListByProductId($product_id);
//関連商品情報表示
$this->arrRecommend = $this->lfPreGetRecommendProducts($product_id);
@@ -314,7 +311,7 @@ public function action()
if ($objCustomer->isLoginSuccess() === true) {
//お気に入りボタン表示
$this->tpl_login = true;
- $this->is_favorite = SC_Helper_DB_Ex::sfDataExists('dtb_customer_favorite_products', 'customer_id = ? AND product_id = ?', array($objCustomer->getValue('customer_id'), $product_id));
+ $this->is_favorite = DbHelper::dataExists('dtb_customer_favorite_products', 'customer_id = ? AND product_id = ?', array($objCustomer->getValue('customer_id'), $product_id));
}
}
@@ -323,20 +320,20 @@ public function action()
*
* @param string $admin_mode
* @param int $product_id
- * @param SC_Product $objProduct
+ * @param Product $objProduct
* @return integer
*/
- public function lfCheckProductId($admin_mode, $product_id, SC_Product $objProduct)
+ public function lfCheckProductId($admin_mode, $product_id, Product $objProduct)
{
// 管理機能からの確認の場合は、非公開の商品も表示する。
- if (isset($admin_mode) && $admin_mode == 'on' && SC_Utils_Ex::sfIsSuccess(new SC_Session_Ex(), false)) {
+ if (isset($admin_mode) && $admin_mode == 'on' && Utils::sfIsSuccess(new Session(), false)) {
$include_hidden = true;
} else {
$include_hidden = false;
}
if (!$objProduct->isValidProductId($product_id, $include_hidden)) {
- SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
+ Utils::sfDispSiteError(PRODUCT_NOT_FOUND);
}
return $product_id;
@@ -345,10 +342,10 @@ public function lfCheckProductId($admin_mode, $product_id, SC_Product $objProduc
/**
* ファイル情報の初期化
*
- * @param SC_UploadFile $objUpFile
- * @return SC_UploadFile
+ * @param Eccube\UploadFile $objUpFile
+ * @return Eccube\UploadFile
*/
- public function lfInitFile(SC_UploadFile $objUpFile)
+ public function lfInitFile(UploadFile $objUpFile)
{
$objUpFile->addFile('詳細-メイン画像', 'main_image', array('jpg'), IMAGE_SIZE);
for ($cnt = 1; $cnt <= PRODUCTSUB_MAX; $cnt++) {
@@ -363,7 +360,7 @@ public function lfMakeSelect()
{
return 'fnSetClassCategories('
. 'document.form1, '
- . SC_Utils_Ex::jsonEncode($this->objFormParam->getValue('classcategory_id2'))
+ . Utils::jsonEncode($this->objFormParam->getValue('classcategory_id2'))
. '); ';
}
@@ -379,9 +376,9 @@ public function lfMakeSelectMobile(&$objPage, $product_id, $request_classcategor
$classcat_find2 = false;
// 規格名一覧
- $arrClassName = SC_Helper_DB_Ex::sfGetIDValueList('dtb_class', 'class_id', 'name');
+ $arrClassName = DbHelper::getIDValueList('dtb_class', 'class_id', 'name');
// 規格分類名一覧
- $arrClassCatName = SC_Helper_DB_Ex::sfGetIDValueList('dtb_classcategory', 'classcategory_id', 'name');
+ $arrClassCatName = DbHelper::getIDValueList('dtb_classcategory', 'classcategory_id', 'name');
// 商品規格情報の取得
$arrProductsClass = $this->lfGetProductsClass($product_id);
@@ -439,10 +436,10 @@ public function lfMakeSelectMobile(&$objPage, $product_id, $request_classcategor
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam $objFormParam
+ * @param Eccube\FormParam $objFormParam
* @return array
*/
- public function lfInitParam(SC_FormParam &$objFormParam)
+ public function lfInitParam(FormParam &$objFormParam)
{
$objFormParam->addParam('規格1', 'classcategory_id1', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
$objFormParam->addParam('規格2', 'classcategory_id2', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
@@ -466,7 +463,7 @@ public function lfInitParam(SC_FormParam &$objFormParam)
*/
public function lfGetProductsClass($product_id)
{
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
return $objProduct->getProductsClassFullByProductId($product_id);
}
@@ -478,8 +475,8 @@ public function lfGetProductsClass($product_id)
*/
public function lfPreGetRecommendProducts($product_id)
{
- $objProduct = new SC_Product_Ex();
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objProduct = new Product();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setOrder('rank DESC');
$arrRecommendData = $objQuery->select('recommend_product_id, comment', 'dtb_recommend_products as t1 left join dtb_products as t2 on t1.recommend_product_id = t2.product_id', 't1.product_id = ? and t2.del_flg = 0 and t2.status = 1', array($product_id));
@@ -489,7 +486,7 @@ public function lfPreGetRecommendProducts($product_id)
$recommendProductIds[] = $recommend['recommend_product_id'];
}
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrProducts = $objProduct->getListByProductIds($objQuery, $recommendProductIds);
foreach ($arrRecommendData as $key => $arrRow) {
@@ -506,23 +503,23 @@ public function lfPreGetRecommendProducts($product_id)
* @param boolean $tpl_classcat_find1
* @param boolean $tpl_classcat_find2
*/
- public function lfCheckError($mode, SC_FormParam &$objFormParam, $tpl_classcat_find1 = null, $tpl_classcat_find2 = null)
+ public function lfCheckError($mode, FormParam &$objFormParam, $tpl_classcat_find1 = null, $tpl_classcat_find2 = null)
{
switch ($mode) {
case 'add_favorite_sphone':
case 'add_favorite':
- $objCustomer = new SC_Customer_Ex();
- $objErr = new SC_CheckError_Ex();
+ $objCustomer = new Customer();
+ $objErr = new CheckError();
$customer_id = $objCustomer->getValue('customer_id');
$favorite_product_id = $objFormParam->getValue('favorite_product_id');
- if (SC_Helper_DB_Ex::sfDataExists('dtb_customer_favorite_products', 'customer_id = ? AND product_id = ?', array($customer_id, $favorite_product_id))) {
+ if (DbHelper::dataExists('dtb_customer_favorite_products', 'customer_id = ? AND product_id = ?', array($customer_id, $favorite_product_id))) {
$objErr->arrErr['add_favorite'.$favorite_product_id] = '※ この商品は既にお気に入りに追加されています。
';
}
break;
default:
// 入力データを渡す。
$arrRet = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrRet);
+ $objErr = new CheckError($arrRet);
$objErr->arrErr = $objFormParam->checkError();
// 複数項目チェック
@@ -541,12 +538,12 @@ public function lfCheckError($mode, SC_FormParam &$objFormParam, $tpl_classcat_f
/**
* ファイルの情報をセットする
*
- * @param SC_UploadFile $objUpFile
+ * @param UploadFile $objUpFile
* @param array $arrProduct
* @param array $arrFile
* @return bool
*/
- public function lfSetFile(SC_UploadFile $objUpFile, $arrProduct, &$arrFile)
+ public function lfSetFile(UploadFile $objUpFile, $arrProduct, &$arrFile)
{
// DBからのデータを引き継ぐ
$objUpFile->setDBFileList($arrProduct);
@@ -556,7 +553,7 @@ public function lfSetFile(SC_UploadFile $objUpFile, $arrProduct, &$arrFile)
// サブ画像の有無を判定
$subImageFlag = false;
for ($i = 1; $i <= PRODUCTSUB_MAX; $i++) {
- if ($arrFile['sub_image' . $i]['filepath'] != '') {
+ if (isset($arrFile['sub_image' . $i]['filepath']) && $arrFile['sub_image' . $i]['filepath'] != '') {
$subImageFlag = true;
}
}
@@ -571,12 +568,12 @@ public function lfSetFile(SC_UploadFile $objUpFile, $arrProduct, &$arrFile)
public function lfRegistFavoriteProduct($favorite_product_id, $customer_id)
{
// ログイン中のユーザが商品をお気に入りにいれる処理
- if (!SC_Helper_DB_Ex::sfIsRecord('dtb_products', 'product_id', $favorite_product_id, 'del_flg = 0 AND status = 1')) {
- SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
+ if (!DbHelper::isRecord('dtb_products', 'product_id', $favorite_product_id, 'del_flg = 0 AND status = 1')) {
+ Utils::sfDispSiteError(PRODUCT_NOT_FOUND);
return false;
} else {
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$exists = $objQuery->exists('dtb_customer_favorite_products', 'customer_id = ? AND product_id = ?', array($customer_id, $favorite_product_id));
if (!$exists) {
@@ -607,7 +604,7 @@ public function doCart()
$this->tpl_classcat_find1,
$this->tpl_classcat_find2);
if (count($this->arrErr) == 0) {
- $objCartSess = new SC_CartSession_Ex();
+ $objCartSess = new CartSession();
$product_class_id = $this->objFormParam->getValue('product_class_id');
$objCartSess->addProduct($product_class_id, $this->objFormParam->getValue('quantity'));
@@ -617,27 +614,27 @@ public function doCart()
'product_id' => $this->objFormParam->getValue('product_id'),
);
- SC_Response_Ex::sendRedirect(CART_URL, $arrQueryString);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(CART_URL, $arrQueryString);
+ Response::actionExit();
}
}
/**
* Add product to authenticated user's favorites.
*
- * @param SC_Customer $objCustomer
+ * @param Eccube\Customer $objCustomer
* @return void
*/
- public function doAddFavorite(SC_Customer &$objCustomer)
+ public function doAddFavorite(Customer &$objCustomer)
{
// ログイン中のユーザが商品をお気に入りにいれる処理
if ($objCustomer->isLoginSuccess() === true && $this->objFormParam->getValue('favorite_product_id') > 0) {
$this->arrErr = $this->lfCheckError($this->mode, $this->objFormParam);
if (count($this->arrErr) == 0) {
if (!$this->lfRegistFavoriteProduct($this->objFormParam->getValue('favorite_product_id'), $objCustomer->getValue('customer_id'))) {
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
- $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
+ $objPlugin = PluginHelper::getSingletonInstance($this->plugin_activate_flg);
$objPlugin->doAction('LC_Page_Products_Detail_action_add_favorite', array($this));
}
}
@@ -646,24 +643,24 @@ public function doAddFavorite(SC_Customer &$objCustomer)
/**
* Add product to authenticated user's favorites. (for Smart phone)
*
- * @param SC_Customer $objCustomer
+ * @param Customer $objCustomer
* @return void
*/
- public function doAddFavoriteSphone(SC_Customer $objCustomer)
+ public function doAddFavoriteSphone(Customer $objCustomer)
{
// ログイン中のユーザが商品をお気に入りにいれる処理(スマートフォン用)
if ($objCustomer->isLoginSuccess() === true && $this->objFormParam->getValue('favorite_product_id') > 0) {
$this->arrErr = $this->lfCheckError($this->mode, $this->objFormParam);
if (count($this->arrErr) == 0) {
if ($this->lfRegistFavoriteProduct($this->objFormParam->getValue('favorite_product_id'), $objCustomer->getValue('customer_id'))) {
- $objPlugin = SC_Helper_Plugin_Ex::getSingletonInstance($this->plugin_activate_flg);
+ $objPlugin = PluginHelper::getSingletonInstance($this->plugin_activate_flg);
$objPlugin->doAction('LC_Page_Products_Detail_action_add_favorite_sphone', array($this));
print 'true';
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
}
print 'error';
- SC_Response_Ex::actionExit();
+ Response::actionExit();
}
}
@@ -675,7 +672,7 @@ public function doAddFavoriteSphone(SC_Customer $objCustomer)
public function doDefault()
{
// カート「戻るボタン」用に保持
- $netURL = new Net_URL();
+ $netURL = new \Net_URL();
$_SESSION['cart_referer_url'] = $netURL->getURL();
}
@@ -731,7 +728,7 @@ public function doMobileSelect2()
*/
public function doMobileSelectItem()
{
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$this->arrErr = $this->lfCheckError($this->mode, $this->objFormParam, $this->tpl_classcat_find1, $this->tpl_classcat_find2);
@@ -756,7 +753,7 @@ public function doMobileSelectItem()
}
// 規格2が設定されている場合.
- if (SC_Utils_Ex::isBlank($this->objFormParam->getValue('classcategory_id2')) == false) {
+ if (Utils::isBlank($this->objFormParam->getValue('classcategory_id2')) == false) {
$value2 = '#' . $this->objFormParam->getValue('classcategory_id2');
} else {
$value2 = '#0';
diff --git a/data/class/pages/products/LC_Page_Products_List.php b/data/Eccube/Page/Products/ProductsList.php
similarity index 84%
rename from data/class/pages/products/LC_Page_Products_List.php
rename to data/Eccube/Page/Products/ProductsList.php
index 5c66d66d045..c255b8e49ce 100644
--- a/data/class/pages/products/LC_Page_Products_List.php
+++ b/data/Eccube/Page/Products/ProductsList.php
@@ -1,36 +1,40 @@
arrSTATUS = $masterData->getMasterData('mtb_status');
$this->arrSTATUS_IMAGE = $masterData->getMasterData('mtb_status_image');
$this->arrDELIVERYDATE = $masterData->getMasterData('mtb_delivery_date');
@@ -92,12 +96,12 @@ public function process()
public function action()
{
//決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
// パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
// パラメーター情報の初期化
$this->lfInitParam($objFormParam);
@@ -137,11 +141,11 @@ public function action()
$this->tpl_linemax = $this->lfGetProductAllNum($arrSearchCondition);
$urlParam = "category_id={$this->arrSearchData['category_id']}&pageno=#page#";
// モバイルの場合に検索条件をURLの引数に追加
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() === DEVICE_TYPE_MOBILE) {
$searchNameUrl = urlencode(mb_convert_encoding($this->arrSearchData['name'], 'SJIS-win', 'UTF-8'));
$urlParam .= "&mode={$this->mode}&name={$searchNameUrl}&orderby={$this->orderby}";
}
- $this->objNavi = new SC_PageNavi_Ex($this->tpl_pageno, $this->tpl_linemax, $this->disp_number, 'eccube.movePage', NAVI_PMAX, $urlParam, SC_Display_Ex::detectDevice() !== DEVICE_TYPE_MOBILE);
+ $this->objNavi = new PageNavi($this->tpl_pageno, $this->tpl_linemax, $this->disp_number, 'eccube.movePage', NAVI_PMAX, $urlParam, Display::detectDevice() !== DEVICE_TYPE_MOBILE);
$this->arrProducts = $this->lfGetProductsList($arrSearchCondition, $this->disp_number, $this->objNavi->start_row, $objProduct);
switch ($this->getMode()) {
@@ -154,13 +158,13 @@ public function action()
break;
}
- $this->tpl_rnd = SC_Utils_Ex::sfGetRandomString(3);
+ $this->tpl_rnd = Utils::sfGetRandomString(3);
}
/**
* パラメーター情報の初期化
*
- * @param SC_FormParam_Ex $objFormParam フォームパラメータークラス
+ * @param FormParam $objFormParam フォームパラメータークラス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -193,22 +197,22 @@ public function lfGetCategoryId($category_id)
if (empty($category_id)) return 0;
// 正当性チェック
- $objCategory = new SC_Helper_Category_Ex();
+ $objCategory = new CategoryHelper();
if ($objCategory->isValidCategoryId($category_id)) {
return $category_id;
} else {
- SC_Utils_Ex::sfDispSiteError(CATEGORY_NOT_FOUND);
+ Utils::sfDispSiteError(CATEGORY_NOT_FOUND);
}
}
/* 商品一覧の表示 */
/**
- * @param SC_Product_Ex $objProduct
+ * @param Product $objProduct
*/
public function lfGetProductsList($searchCondition, $disp_number, $startno, &$objProduct)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrOrderVal = array();
@@ -246,7 +250,7 @@ public function lfGetProductsList($searchCondition, $disp_number, $startno, &$ob
// 表示すべきIDとそのIDの並び順を一気に取得
$arrProductId = $objProduct->findProductIdsOrder($objQuery, array_merge($searchCondition['arrval'], $arrOrderVal));
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrProducts = $objProduct->getListByProductIds($objQuery, $arrProductId);
// 規格を設定
@@ -259,13 +263,13 @@ public function lfGetProductsList($searchCondition, $disp_number, $startno, &$ob
/* 入力内容のチェック */
/**
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfCheckError($objFormParam)
{
// 入力データを渡す。
$arrForm = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrForm);
+ $objErr = new CheckError($arrForm);
$objErr->arrErr = $objFormParam->checkError();
// 動的チェック
@@ -287,7 +291,7 @@ public function lfCheckError($objFormParam)
public function lfGetDisplayNum($display_number)
{
// 表示件数
- return (SC_Utils_Ex::sfIsInt($display_number))
+ return (Utils::sfIsInt($display_number))
? $display_number
: current(array_keys($this->arrPRODUCTLISTMAX));
}
@@ -305,7 +309,7 @@ public function lfGetPageTitle($mode, $category_id = 0)
} elseif ($category_id == 0) {
return '全商品';
} else {
- $objCategory = new SC_Helper_Category_Ex();
+ $objCategory = new CategoryHelper();
$arrCat = $objCategory->get($category_id);
return $arrCat['category_name'];
@@ -319,7 +323,7 @@ public function lfGetPageTitle($mode, $category_id = 0)
*/
public function lfGetSearchConditionDisp($arrSearchData)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrSearch = array('category' => '指定なし', 'maker' => '指定なし', 'name' => '指定なし');
// カテゴリ検索条件
if ($arrSearchData['category_id'] > 0) {
@@ -328,7 +332,7 @@ public function lfGetSearchConditionDisp($arrSearchData)
// メーカー検索条件
if (strlen($arrSearchData['maker_id']) > 0) {
- $objMaker = new SC_Helper_Maker_Ex();
+ $objMaker = new MakerHelper();
$maker = $objMaker->getMaker($arrSearchData['maker_id']);
$arrSearch['maker'] = $maker['name'];
}
@@ -349,9 +353,9 @@ public function lfGetSearchConditionDisp($arrSearchData)
public function lfGetProductAllNum($searchCondition)
{
// 検索結果対象となる商品の数を取得
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$objQuery->setWhere($searchCondition['where_for_count']);
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
return $objProduct->findProductCount($objQuery, $searchCondition['arrval']);
}
@@ -372,11 +376,12 @@ public function lfGetSearchCondition($arrSearchData)
// カテゴリからのWHERE文字列取得
if ($arrSearchData['category_id'] != 0) {
- list($searchCondition['where_category'], $searchCondition['arrvalCategory']) = SC_Helper_DB_Ex::sfGetCatWhere($arrSearchData['category_id']);
+ $objDb = new DbHelper();
+ list($searchCondition['where_category'], $searchCondition['arrvalCategory']) = $objDb->getCatWhere($arrSearchData['category_id']);
}
// ▼対象商品IDの抽出
// 商品検索条件の作成(未削除、表示)
- $searchCondition['where'] = SC_Product_Ex::getProductDispConditions('alldtl');
+ $searchCondition['where'] = Product::getProductDispConditions('alldtl');
if (strlen($searchCondition['where_category']) >= 1) {
$searchCondition['where'] .= ' AND EXISTS (SELECT * FROM dtb_product_categories WHERE ' . $searchCondition['where_category'] . ' AND product_id = alldtl.product_id)';
@@ -432,7 +437,7 @@ public function lfSetSelectedData(&$arrProducts, $arrForm, $arrErr, $product_id)
$arrProducts[$key]['classcategory_id2'] = $arrForm['classcategory_id2'];
$arrProducts[$key]['quantity'] = $arrForm['quantity'];
$arrProducts[$key]['arrErr'] = $arrErr;
- $classcategory_id2 = SC_Utils_Ex::jsonEncode($arrForm['classcategory_id2']);
+ $classcategory_id2 = Utils::jsonEncode($arrForm['classcategory_id2']);
$js_fnOnLoad .= "fnSetClassCategories(document.product_form{$arrProducts[$key]['product_id']}, {$classcategory_id2});";
}
}
@@ -447,7 +452,7 @@ public function lfSetSelectedData(&$arrProducts, $arrForm, $arrErr, $product_id)
*/
public function lfAddCart($arrForm)
{
- $objCartSess = new SC_CartSession_Ex();
+ $objCartSess = new CartSession();
$product_class_id = $arrForm['product_class_id'];
$objCartSess->addProduct($product_class_id, $arrForm['quantity']);
@@ -487,21 +492,21 @@ public function setStatusDataTo($arrProducts, $arrStatus, $arrStatusImage)
public function doJson()
{
$this->arrProducts = $this->setStatusDataTo($this->arrProducts, $this->arrSTATUS, $this->arrSTATUS_IMAGE);
- SC_Product_Ex::setPriceTaxTo($this->arrProducts);
+ Product::setPriceTaxTo($this->arrProducts);
// 一覧メイン画像の指定が無い商品のための処理
foreach ($this->arrProducts as $key=>$val) {
- $this->arrProducts[$key]['main_list_image'] = SC_Utils_Ex::sfNoImageMainList($val['main_list_image']);
+ $this->arrProducts[$key]['main_list_image'] = Utils::sfNoImageMainList($val['main_list_image']);
}
- echo SC_Utils_Ex::jsonEncode($this->arrProducts);
- SC_Response_Ex::actionExit();
+ echo Utils::jsonEncode($this->arrProducts);
+ Response::actionExit();
}
/**
*
- * @param SC_Product_Ex $objProduct
- * @param SC_FormParam_Ex $objFormParam
+ * @param Product $objProduct
+ * @param FormParam $objFormParam
* @return void
*/
public function doDefault(&$objProduct, &$objFormParam)
@@ -529,11 +534,13 @@ public function doDefault(&$objProduct, &$objFormParam)
$this->tpl_product_class_id = $objProduct->product_class_id;
$this->tpl_product_type = $objProduct->product_type;
+ $js_fnOnLoad = '';
+
// 商品ステータスを取得
$this->productStatus = $this->arrProducts['productStatus'];
unset($this->arrProducts['productStatus']);
- $this->tpl_javascript .= 'eccube.productsClassCategories = ' . SC_Utils_Ex::jsonEncode($objProduct->classCategories) . ';';
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_PC) {
+ $this->tpl_javascript .= 'eccube.productsClassCategories = ' . Utils::jsonEncode($objProduct->classCategories) . ';';
+ if (Display::detectDevice() === DEVICE_TYPE_PC) {
//onloadスクリプトを設定. 在庫ありの商品のみ出力する
foreach ($this->arrProducts as $arrProduct) {
if ($arrProduct['stock_unlimited_max'] || $arrProduct['stock_max'] > 0) {
@@ -546,9 +553,9 @@ public function doDefault(&$objProduct, &$objFormParam)
$target_product_id = intval($this->arrForm['product_id']);
if ($target_product_id > 0) {
// 商品IDの正当性チェック
- if (!SC_Utils_Ex::sfIsInt($this->arrForm['product_id'])
- || !SC_Helper_DB_Ex::sfIsRecord('dtb_products', 'product_id', $this->arrForm['product_id'], 'del_flg = 0 AND status = 1')) {
- SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
+ if (!Utils::sfIsInt($this->arrForm['product_id'])
+ || !DbHelper::isRecord('dtb_products', 'product_id', $this->arrForm['product_id'], 'del_flg = 0 AND status = 1')) {
+ Utils::sfDispSiteError(PRODUCT_NOT_FOUND);
}
// 入力内容のチェック
@@ -561,13 +568,13 @@ public function doDefault(&$objProduct, &$objFormParam)
'category_id' => $this->arrForm['category_id'],
);
- SC_Response_Ex::sendRedirect(CART_URL, $arrQueryString);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(CART_URL, $arrQueryString);
+ Response::actionExit();
}
$js_fnOnLoad .= $this->lfSetSelectedData($this->arrProducts, $this->arrForm, $arrErr, $target_product_id);
} else {
// カート「戻るボタン」用に保持
- $netURL = new Net_URL();
+ $netURL = new \Net_URL();
//該当メソッドが無いため、$_SESSIONに直接セット
$_SESSION['cart_referer_url'] = $netURL->getURL();
}
diff --git a/data/Eccube/Page/Products/Search.php b/data/Eccube/Page/Products/Search.php
new file mode 100644
index 00000000000..52fdb9b78c0
--- /dev/null
+++ b/data/Eccube/Page/Products/Search.php
@@ -0,0 +1,55 @@
+action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のプロセス.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ }
+}
diff --git a/data/Eccube/Page/Regist/Complete.php b/data/Eccube/Page/Regist/Complete.php
new file mode 100644
index 00000000000..0e01c8a14b9
--- /dev/null
+++ b/data/Eccube/Page/Regist/Complete.php
@@ -0,0 +1,56 @@
+tpl_title = '会員登録(完了ページ)';
+ }
+
+ /**
+ * Page のプロセス.
+ *
+ * @return void
+ */
+ public function process()
+ {
+ parent::process();
+ $this->action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のAction.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ }
+}
diff --git a/data/class/pages/regist/LC_Page_Regist.php b/data/Eccube/Page/Regist/Index.php
similarity index 69%
rename from data/class/pages/regist/LC_Page_Regist.php
rename to data/Eccube/Page/Regist/Index.php
index da3915eb9e7..ebe31f0ba6d 100644
--- a/data/class/pages/regist/LC_Page_Regist.php
+++ b/data/Eccube/Page/Regist/Index.php
@@ -1,36 +1,36 @@
arrErr = $this->lfCheckError($_GET);
- if ($this->arrErr) SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', true, $this->arrErr['id']);
+ if ($this->arrErr) Utils::sfDispSiteError(FREE_ERROR_MSG, '', true, $this->arrErr['id']);
$registSecretKey = $this->lfRegistData($_GET); //本会員登録(フラグ変更)
$this->lfSendRegistMail($registSecretKey); //本会員登録完了メール送信
- SC_Response_Ex::sendRedirect('complete.php', array('ci' => SC_Helper_Customer_Ex::sfGetCustomerId($registSecretKey)));
+ Response::sendRedirect('complete.php', array('ci' => CustomerHelper::sfGetCustomerId($registSecretKey)));
break;
//-- それ以外のアクセスは無効とする
default:
- SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', true, '無効なアクセスです。');
+ Utils::sfDispSiteError(FREE_ERROR_MSG, '', true, '無効なアクセスです。');
break;
}
@@ -91,8 +91,8 @@ public function action()
*/
public function lfRegistData($array)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
- $arrRegist['secret_key'] = SC_Helper_Customer_Ex::sfGetUniqSecretKey(); //本登録ID発行
+ $objQuery = Query::getSingletonInstance();
+ $arrRegist['secret_key'] = CustomerHelper::sfGetUniqSecretKey(); //本登録ID発行
$arrRegist['status'] = 2;
$arrRegist['update_date'] = 'CURRENT_TIMESTAMP';
@@ -112,10 +112,10 @@ public function lfRegistData($array)
*/
public function lfCheckError($array)
{
- $objErr = new SC_CheckError_Ex($array);
+ $objErr = new CheckError($array);
if (preg_match("/^[[:alnum:]]+$/", $array['id'])) {
- if (!is_numeric(SC_Helper_Customer_Ex::sfGetCustomerId($array['id'], true))) {
+ if (!is_numeric(CustomerHelper::sfGetCustomerId($array['id'], true))) {
$objErr->arrErr['id'] = '※ 既に会員登録が完了しているか、無効なURLです。
';
}
@@ -135,11 +135,11 @@ public function lfCheckError($array)
*/
public function lfSendRegistMail($registSecretKey)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
- $objCustomer = new SC_Customer_Ex();
- $objHelperMail = new SC_Helper_Mail_Ex();
+ $objQuery = Query::getSingletonInstance();
+ $objCustomer = new Customer();
+ $objHelperMail = new MailHelper();
$objHelperMail->setPage($this);
- $CONF = SC_Helper_DB_Ex::sfGetBasisData();
+ $CONF = DbHelper::getBasisData();
//-- 会員データを取得
$arrCustomer = $objQuery->select('*', 'dtb_customer', 'secret_key = ?', array($registSecretKey));
@@ -147,14 +147,14 @@ public function lfSendRegistMail($registSecretKey)
$objCustomer->setLogin($data['email']);
//-- メール送信
- $objMailText = new SC_SiteView_Ex();
+ $objMailText = new SiteView();
$objMailText->setPage($this);
$objMailText->assign('CONF', $CONF);
$objMailText->assign('name01', $data['name01']);
$objMailText->assign('name02', $data['name02']);
$toCustomerMail = $objMailText->fetch('mail_templates/customer_regist_mail.tpl');
$subject = $objHelperMail->sfMakesubject('会員登録が完了しました。');
- $objMail = new SC_SendMail_Ex();
+ $objMail = new SendMail();
$objMail->setItem(
'', // 宛先
diff --git a/data/class/pages/LC_Page_ResizeImage.php b/data/Eccube/Page/ResizeImage.php
similarity index 84%
rename from data/class/pages/LC_Page_ResizeImage.php
rename to data/Eccube/Page/ResizeImage.php
index ad6aae538e7..b0ba3880d63 100644
--- a/data/class/pages/LC_Page_ResizeImage.php
+++ b/data/Eccube/Page/ResizeImage.php
@@ -21,16 +21,21 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-require_once CLASS_EX_REALDIR . 'page_extends/LC_Page_Ex.php';
+namespace Eccube\Page;
+
+use Eccube\Common\FormParam;
+use Eccube\Common\Query;
+use Eccube\Common\Helper\DbHelper;
+use Eccube\Common\Util\Utils;
+use Eccube\Common\Util\GcUtils;
/**
* リサイズイメージ のページクラス.
*
* @package Page
- * @author LOCKON CO.,LTD.
- * @version $Id$
+ * @author LOCKON CO.,LTD.
*/
-class LC_Page_ResizeImage extends LC_Page_Ex
+class ResizeImage extends AbstractPage
{
/**
* Page を初期化する.
@@ -61,11 +66,11 @@ public function process()
*/
public function action()
{
- $objFormParam = new SC_FormParam_Ex();
+ $objFormParam = new FormParam();
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_GET);
$arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($arrErr)) {
+ if (Utils::isBlank($arrErr)) {
$arrForm = $objFormParam->getHashArray();
@@ -73,9 +78,9 @@ public function action()
// NO_IMAGE_REALFILE以外のファイル名が直接渡された場合、ファイル名のチェックを行う
if (strlen($arrForm['image']) >= 1 && $arrForm['image'] !== NO_IMAGE_REALFILE ) {
if (!$this->lfCheckFileName($arrForm['image'])) {
- GC_Utils_Ex::gfPrintLog('invalid access :resize_image.php image=' . $arrForm['image']);
+ GcUtils::gfPrintLog('invalid access :resize_image.php image=' . $arrForm['image']);
}
- $file = SC_Utils_Ex::getSaveImagePath($arrForm['image']);
+ $file = Utils::getSaveImagePath($arrForm['image']);
} else {
// 商品画像を取得する
$file = $this->lfGetProductImage($arrForm);
@@ -87,7 +92,7 @@ public function action()
}
/**
- * @param SC_FormParam_Ex $objFormParam
+ * @param FormParam $objFormParam
*/
public function lfInitParam(&$objFormParam)
{
@@ -123,19 +128,19 @@ public function lfCheckFileName($image)
*/
public function lfGetProductImage($arrForm)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$table = 'dtb_products';
$col = $arrForm['image_key'];
$product_id = $arrForm['product_id'];
//指定されたカラムが存在する場合にのみ商品テーブルからファイル名を取得
- if (SC_Helper_DB_Ex::sfColumnExists($table, $col, '', '', false)) {
+ if (DbHelper::columnExists($table, $col, '', '', false)) {
$product_image = $objQuery->get($col, $table, 'product_id = ?', array($product_id));
} else {
- GC_Utils_Ex::gfPrintLog('invalid access :resize_image.php image_key=' . $col);
+ GcUtils::gfPrintLog('invalid access :resize_image.php image_key=' . $col);
$product_image = '';
}
// ファイル名が正しく、ファイルが存在する場合だけ、$fileを設定
- $file = SC_Utils_Ex::getSaveImagePath($product_image);
+ $file = Utils::getSaveImagePath($product_image);
return $file;
}
diff --git a/data/class/pages/rss/LC_Page_Rss.php b/data/Eccube/Page/Rss/Index.php
similarity index 67%
rename from data/class/pages/rss/LC_Page_Rss.php
rename to data/Eccube/Page/Rss/Index.php
index 66578196399..cbb2da462a6 100644
--- a/data/class/pages/rss/LC_Page_Rss.php
+++ b/data/Eccube/Page/Rss/Index.php
@@ -1,36 +1,30 @@
lfGetNews();
@@ -87,15 +81,15 @@ public function process()
*/
public function lfGetNews()
{
- $objNews = new SC_Helper_News_Ex();
+ $objNews = new NewsHelper();
$arrNews = $objNews->getList();
- $objDb = new SC_Helper_DB_Ex();
- $arrInfo = $objDb->sfGetBasisData();
+ $objDb = new DbHelper();
+ $arrInfo = $objDb->getBasisData();
// RSS用に変換
foreach (array_keys($arrNews) as $key) {
- $netUrlHttpUrl = new Net_URL(HTTP_URL);
+ $netUrlHttpUrl = new \Net_URL(HTTP_URL);
$row =& $arrNews[$key];
$row['shop_name'] = $arrInfo['shop_name'];
@@ -103,11 +97,11 @@ public function lfGetNews()
// 日付
$row['news_date'] = date('r', strtotime($row['news_date']));
// 新着情報URL
- if (SC_Utils_Ex::isBlank($row['news_url'])) {
+ if (Utils::isBlank($row['news_url'])) {
$row['news_url'] = HTTP_URL;
} elseif ($row['news_url'][0] == '/') {
// 変換(絶対パス→URL)
- $netUrl = new Net_URL($row['news_url']);
+ $netUrl = new \Net_URL($row['news_url']);
$netUrl->protocol = $netUrlHttpUrl->protocol;
$netUrl->user = $netUrlHttpUrl->user;
$netUrl->pass = $netUrlHttpUrl->pass;
diff --git a/data/class/pages/rss/LC_Page_Rss_Products.php b/data/Eccube/Page/Rss/Products.php
similarity index 84%
rename from data/class/pages/rss/LC_Page_Rss_Products.php
rename to data/Eccube/Page/Rss/Products.php
index 368ea22397e..974dc2f26f4 100644
--- a/data/class/pages/rss/LC_Page_Rss_Products.php
+++ b/data/Eccube/Page/Rss/Products.php
@@ -1,36 +1,31 @@
arrSiteInfo = SC_Helper_DB_Ex::sfGetBasisData();
+ $this->arrSiteInfo = DbHelper::getBasisData();
//商品IDを取得
if (isset($_GET['product_id']) && $_GET['product_id'] != '' && is_numeric($_GET['product_id'])) {
@@ -125,7 +120,7 @@ public function action()
*/
public function lfGetProductsDetailData($mode, $product_id)
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
//商品詳細を取得
if ($mode == 'all') {
$arrProduct = $this->lfGetProductsDetail($objQuery, $mode);
@@ -135,7 +130,7 @@ public function lfGetProductsDetailData($mode, $product_id)
// 値の整形
foreach (array_keys($arrProduct) as $key) {
//販売価格を税込みに編集
- $arrProduct[$key]['price02'] = SC_Helper_DB_Ex::sfCalcIncTax($arrProduct[$key]['price02']);
+ $arrProduct[$key]['price02'] = DbHelper::calcIncTax($arrProduct[$key]['price02']);
// 画像ファイルのURLセット
if (file_exists(IMAGE_SAVE_REALDIR . $arrProduct[$key]['main_list_image'])) {
$dir = IMAGE_SAVE_RSS_URL;
@@ -156,7 +151,7 @@ public function lfGetProductsDetailData($mode, $product_id)
}
$arrProduct[$key]['main_large_image'] = $dir . $arrProduct[$key]['main_large_image'];
// ポイント計算
- $arrProduct[$key]['point'] = SC_Utils_Ex::sfPrePoint(
+ $arrProduct[$key]['point'] = Utils::sfPrePoint(
$arrProduct[$key]['price02'],
$arrProduct[$key]['point_rate']
);
@@ -178,7 +173,7 @@ public function lfGetProductsDetailData($mode, $product_id)
*/
public function lfGetProductsListData()
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
//商品一覧を取得
$arrProduct = $objQuery->getAll('SELECT product_id, name AS product_name FROM dtb_products');
@@ -192,7 +187,7 @@ public function lfGetProductsListData()
*/
public function lfGetProductsAllData()
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
//商品情報を取得
$arrProduct = $this->lfGetProductsAllclass($objQuery);
// 値の整形
@@ -217,11 +212,11 @@ public function lfGetProductsAllData()
}
$arrProduct[$key]['main_large_image'] = $dir . $arrProduct[$key]['main_large_image'];
// ポイント計算
- $arrProduct[$key]['point_max'] = SC_Utils_Ex::sfPrePoint(
+ $arrProduct[$key]['point_max'] = Utils::sfPrePoint(
$arrProduct[$key]['price02_max'],
$arrProduct[$key]['point_rate']
);
- $arrProduct[$key]['point_min'] = SC_Utils_Ex::sfPrePoint(
+ $arrProduct[$key]['point_min'] = Utils::sfPrePoint(
$arrProduct[$key]['price02_min'],
$arrProduct[$key]['point_rate']
);
@@ -233,13 +228,13 @@ public function lfGetProductsAllData()
/**
* 商品情報を取得する
*
- * @param SC_Query $objQuery DB操作クラス
+ * @param Query $objQuery DB操作クラス
* @param integer $product_id 商品ID
* @return array $arrProduct 取得結果を配列で返す
*/
public function lfGetProductsDetail(&$objQuery, $product_id = 'all')
{
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
// --- 商品詳細の取得
if ($product_id == 'all') {
@@ -277,13 +272,13 @@ public function lfGetProductsDetail(&$objQuery, $product_id = 'all')
/**
* 商品情報を取得する(vw_products_allclass使用)
*
- * @param SC_Query $objQuery DB操作クラス
+ * @param Query $objQuery DB操作クラス
* @return array $arrProduct 取得結果を配列で返す
*/
public function lfGetProductsAllclass(&$objQuery)
{
// --- 商品一覧の取得
- $objProduct = new SC_Product_Ex();
+ $objProduct = new Product();
$objQuery->setWhere($objProduct->getProductDispConditions());
$objQuery->setOrder('product_id');
$arrProductLsit = $objProduct->lists($objQuery);
@@ -310,7 +305,7 @@ public function lfGetProductsAllclass(&$objQuery)
}
// 税込金額を設定する
- SC_Product_Ex::setIncTaxToProducts($arrProducts);
+ Product::setIncTaxToProducts($arrProducts);
return $arrProducts;
}
diff --git a/data/class/pages/shopping/LC_Page_Shopping_Complete.php b/data/Eccube/Page/Shopping/Complete.php
similarity index 52%
rename from data/class/pages/shopping/LC_Page_Shopping_Complete.php
rename to data/Eccube/Page/Shopping/Complete.php
index 7a4e71e4393..2039749988c 100644
--- a/data/class/pages/shopping/LC_Page_Shopping_Complete.php
+++ b/data/Eccube/Page/Shopping/Complete.php
@@ -1,36 +1,27 @@
arrInfo = SC_Helper_DB_Ex::sfGetBasisData();
+ $this->arrInfo = DbHelper::getBasisData();
}
/**
diff --git a/data/Eccube/Page/Shopping/Confirm.php b/data/Eccube/Page/Shopping/Confirm.php
new file mode 100644
index 00000000000..df5435aa122
--- /dev/null
+++ b/data/Eccube/Page/Shopping/Confirm.php
@@ -0,0 +1,298 @@
+tpl_title = '入力内容のご確認';
+ $masterData = new MasterData();
+ $this->arrPref = $masterData->getMasterData('mtb_pref');
+ $this->arrCountry = $masterData->getMasterData('mtb_country');
+ $this->arrSex = $masterData->getMasterData('mtb_sex');
+ $this->arrJob = $masterData->getMasterData('mtb_job');
+ $this->arrMAILMAGATYPE = $masterData->getMasterData('mtb_mail_magazine_type');
+ $this->arrReminder = $masterData->getMasterData('mtb_reminder');
+ $this->httpCacheControl('nocache');
+ }
+
+ /**
+ * Page のプロセス.
+ *
+ * @return void
+ */
+ public function process()
+ {
+ parent::process();
+ $this->action();
+ $this->sendResponse();
+ }
+
+ /**
+ * Page のアクション.
+ *
+ * @return void
+ */
+ public function action()
+ {
+ //決済処理中ステータスのロールバック
+ $objPurchase = new PurchaseHelper();
+ $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
+
+ $objCartSess = new CartSession();
+ $objSiteSess = new SiteSession();
+ $objCustomer = new Customer();
+
+ $this->is_multiple = $objPurchase->isMultiple();
+
+ // 前のページで正しく登録手続きが行われた記録があるか判定
+ if (!$objSiteSess->isPrePage()) {
+ Utils::sfDispSiteError(PAGE_ERROR, $objSiteSess);
+ }
+
+ // ユーザユニークIDの取得と購入状態の正当性をチェック
+ $this->tpl_uniqid = $objSiteSess->getUniqId();
+ $objPurchase->verifyChangeCart($this->tpl_uniqid, $objCartSess);
+
+ $this->cartKey = $objCartSess->getKey();
+
+ // カート内商品のチェック
+ $this->tpl_message = $objCartSess->checkProducts($this->cartKey);
+ if (!Utils::isBlank($this->tpl_message)) {
+ Response::sendRedirect(CART_URL);
+ Response::actionExit();
+ }
+ $this->is_download = ($this->cartKey == PRODUCT_TYPE_DOWNLOAD);
+
+ // カートの商品を取得
+ $this->arrShipping = $objPurchase->getShippingTemp($this->is_multiple);
+ $this->arrCartItems = $objCartSess->getCartList($this->cartKey);
+ // 合計金額
+ $this->tpl_total_inctax = $objCartSess->getAllProductsTotal($this->cartKey);
+ // 税額
+ $this->tpl_total_tax = $objCartSess->getAllProductsTax($this->cartKey);
+ $this->tpl_total_tax = $objCartSess->getAllProductsTax($this->cartKey);
+
+ $objFormParam = new FormParam();
+ $this->lfInitParam($objFormParam, $this->arrShipping);
+ $objFormParam->setParam($_POST);
+ $objFormParam->convParam();
+ $objFormParam->trimParam();
+
+ // 一時受注テーブルの読込
+ $arrOrderTemp = $objPurchase->getOrderTemp($this->tpl_uniqid);
+
+ // 配送業者を取得
+ $objDelivery = new DeliveryHelper();
+ $this->arrDeliv = $objDelivery->getList($this->cartKey, false, true);
+ $this->tpl_is_single_deliv = $objDelivery->isSingleDeliv($this->cartKey);
+
+ // お届け日一覧の取得
+ $this->arrDelivDate = $objPurchase->getDelivDate($objCartSess, $this->cartKey);
+
+ if (Utils::sfIsInt($arrOrderTemp['deliv_id'])) {
+ $this->arrPayment = $objPurchase->getSelectablePayment($objCartSess, $arrOrderTemp['deliv_id'], true);
+ $this->arrDelivTime = DeliveryHelper::getDelivTime($arrOrderTemp['deliv_id']);
+ }
+
+ // カート集計を元に最終計算
+ $arrCalcResults = $objCartSess->calculate($this->cartKey, $objCustomer,
+ $arrOrderTemp['use_point'],
+ $objPurchase->getShippingPref($this->is_multiple),
+ $arrOrderTemp['charge'],
+ $arrOrderTemp['discount'],
+ $arrOrderTemp['deliv_id'],
+ $arrOrderTemp['order_pref'], // 税金計算の為に追加 注文者基準
+ $arrOrderTemp['order_country_id'] // 税金計算の為に追加 注文者基準
+ );
+
+ $this->arrForm = array_merge($arrOrderTemp, $arrCalcResults);
+ foreach ($objFormParam->getHashArray() as $key => $param) {
+ if (!Utils::isBlank($param) && Utils::isBlank($this->arrForm[$key])) {
+ $this->arrForm[$key] = $param;
+ }
+ }
+
+ // 会員ログインチェック
+ if ($objCustomer->isLoginSuccess(true)) {
+ $this->tpl_login = '1';
+ $this->tpl_user_point = $objCustomer->getValue('point');
+ }
+
+ // 決済モジュールを使用するかどうか
+ $this->use_module = PaymentHelper::useModule($this->arrForm['payment_id']);
+
+ switch ($this->getMode()) {
+ case 'select_deliv':
+ $sqlval = $objFormParam->getHashArray();
+ if (Utils::isBlank($sqlval['use_point'])) {
+ $sqlval['use_point'] = '0';
+ }
+ $deliv_id = $objFormParam->getValue('deliv_id');
+ $arrPayment = $objPurchase->getSelectablePayment($objCartSess, $deliv_id);
+ $sqlval['payment_id'] = $arrPayment[0]['payment_id'];
+ $sqlval['payment_method'] = $arrPayment[0]['payment_method'];
+ $objPurchase->saveOrderTemp($this->tpl_uniqid, $sqlval);
+ Response::reload();
+ break;
+ // 前のページに戻る
+ case 'return':
+ // 正常な推移であることを記録しておく
+ $objSiteSess->setRegistFlag();
+
+ Response::sendRedirect(SHOPPING_PAYMENT_URLPATH);
+ Response::actionExit();
+ break;
+ case 'confirm':
+ $this->saveShippings($objFormParam, $this->arrDelivTime);
+ $deliv_id = $objFormParam->getValue('deliv_id');
+ $arrPayment = $objPurchase->getSelectablePayment($objCartSess, $deliv_id);
+ $this->lfRegistPayment($this->tpl_uniqid, $objFormParam->getHashArray(), $objPurchase, $arrPayment);
+ /*
+ * 決済モジュールで必要なため, 受注番号を取得
+ */
+ $this->arrForm['order_id'] = $objPurchase->getNextOrderID();
+ $_SESSION['order_id'] = $this->arrForm['order_id'];
+
+ // 集計結果を受注一時テーブルに反映
+ $objPurchase->saveOrderTemp($this->tpl_uniqid, $this->arrForm,
+ $objCustomer);
+
+ // 正常に登録されたことを記録しておく
+ $objSiteSess->setRegistFlag();
+
+ // 決済モジュールを使用する場合
+ if ($this->use_module) {
+ $objPurchase->completeOrder(ORDER_PENDING);
+
+ Response::sendRedirect(SHOPPING_MODULE_URLPATH);
+ // 購入完了ページ
+ } else {
+ $objPurchase->completeOrder(ORDER_NEW);
+ PurchaseHelper::sendOrderMail($this->arrForm['order_id'], $this);
+
+ Response::sendRedirect(SHOPPING_COMPLETE_URLPATH);
+ }
+ Response::actionExit();
+ break;
+ default:
+ break;
+ }
+
+ }
+
+
+ /**
+ * パラメーター情報の初期化を行う.
+ *
+ * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param array $arrShipping 配送先情報の配列
+ * @return void
+ */
+ public function lfInitParam(&$objFormParam, &$arrShipping)
+ {
+ $objFormParam->addParam('配送業者', 'deliv_id', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'));
+ $objFormParam->addParam('ポイント', 'use_point', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK', 'ZERO_START'));
+ $objFormParam->addParam('その他お問い合わせ', 'message', LTEXT_LEN, 'KVa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
+ $objFormParam->addParam('ポイントを使用する', 'point_check', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '2');
+
+ $objFormParam->addParam('お支払い方法', 'payment_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
+
+ foreach ($arrShipping as $val) {
+ $objFormParam->addParam('お届け時間', 'deliv_time_id' . $val['shipping_id'], INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
+ $objFormParam->addParam('お届け日', 'deliv_date' . $val['shipping_id'], STEXT_LEN, 'KVa', array('MAX_LENGTH_CHECK'));
+ }
+
+ $objFormParam->setParam($arrShipping);
+ $objFormParam->convParam();
+ }
+
+ /**
+ * 配送情報を保存する.
+ *
+ * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param array $arrDelivTime 配送時間の配列
+ */
+ public function saveShippings(&$objFormParam, $arrDelivTime)
+ {
+ // ダウンロード商品の場合は配送先が存在しない
+ if ($this->is_download) return;
+
+ $deliv_id = $objFormParam->getValue('deliv_id');
+ /* TODO
+ * SC_Purchase::getShippingTemp() で取得して,
+ * リファレンスで代入すると, セッションに添字を追加できない?
+ */
+ foreach (array_keys($_SESSION['shipping']) as $key) {
+ $shipping_id = $_SESSION['shipping'][$key]['shipping_id'];
+ $time_id = $objFormParam->getValue('deliv_time_id' . $shipping_id);
+ $_SESSION['shipping'][$key]['deliv_id'] = $deliv_id;
+ $_SESSION['shipping'][$key]['time_id'] = $time_id;
+ $_SESSION['shipping'][$key]['shipping_time'] = $arrDelivTime[$time_id];
+ $_SESSION['shipping'][$key]['shipping_date'] = $objFormParam->getValue("deliv_date{$shipping_id}");
+ }
+ }
+
+ /**
+ * 受注一時テーブルへ登録を行う.
+ *
+ * @param integer $uniqid 受注一時テーブルのユニークID
+ * @param array $arrForm フォームの入力値
+ * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
+ * @param array $arrPayment お支払い方法の配列
+ * @return void
+ */
+ public function lfRegistPayment($uniqid, $arrForm, &$objPurchase, $arrPayment)
+ {
+ $arrForm['order_temp_id'] = $uniqid;
+ $arrForm['update_date'] = 'CURRENT_TIMESTAMP';
+
+ if ($arrForm['point_check'] != '1') {
+ $arrForm['use_point'] = 0;
+ }
+
+ foreach ($arrPayment as $payment) {
+ if ($arrForm['payment_id'] == $payment['payment_id']) {
+ $arrForm['charge'] = $payment['charge'];
+ $arrForm['payment_method'] = $payment['payment_method'];
+ break;
+ }
+ }
+ $this->arrForm = array_merge($this->arrForm, $arrForm);
+ }
+}
diff --git a/data/class/pages/shopping/LC_Page_Shopping_Deliv.php b/data/Eccube/Page/Shopping/Deliv.php
similarity index 72%
rename from data/class/pages/shopping/LC_Page_Shopping_Deliv.php
rename to data/Eccube/Page/Shopping/Deliv.php
index e84ed6f31ab..8f65a3f6798 100644
--- a/data/class/pages/shopping/LC_Page_Shopping_Deliv.php
+++ b/data/Eccube/Page/Shopping/Deliv.php
@@ -1,36 +1,35 @@
arrPref = $masterData->getMasterData('mtb_pref');
$this->arrCountry = $masterData->getMasterData('mtb_country');
$this->tpl_title = 'お届け先の指定';
@@ -67,14 +66,14 @@ public function process()
public function action()
{
//決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
- $objSiteSess = new SC_SiteSession_Ex();
- $objCartSess = new SC_CartSession_Ex();
- $objCustomer = new SC_Customer_Ex();
- $objFormParam = new SC_FormParam_Ex();
- $objAddress = new SC_Helper_Address_Ex();
+ $objSiteSess = new SiteSession();
+ $objCartSess = new CartSession();
+ $objCustomer = new Customer();
+ $objFormParam = new FormParam();
+ $objAddress = new AddressHelper();
$this->tpl_uniqid = $objSiteSess->getUniqId();
$objPurchase->verifyChangeCart($this->tpl_uniqid, $objCartSess);
@@ -83,7 +82,7 @@ public function action()
// ログインチェック
if (!$objCustomer->isLoginSuccess(true)) {
- SC_Utils_Ex::sfDispSiteError(CUSTOMER_ERROR);
+ Utils::sfDispSiteError(CUSTOMER_ERROR);
}
// ダウンロード商品の場合は、支払方法画面に転送
@@ -93,17 +92,17 @@ public function action()
$objPurchase->saveOrderTemp($this->tpl_uniqid, $sqlval, $objCustomer);
$objSiteSess->setRegistFlag();
- SC_Response_Ex::sendRedirect('payment.php');
- SC_Response_Ex::actionExit();
+ Response::sendRedirect('confirm.php');
+ Response::actionExit();
}
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$objFormParam->convParam();
$arrErr = $objFormParam->checkError();
- if (!SC_Utils_Ex::isBlank($arrErr)) {
- SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
- SC_Response_Ex::actionExit();
+ if (!Utils::isBlank($arrErr)) {
+ Utils::sfDispSiteError(PAGE_ERROR, '', true);
+ Response::actionExit();
}
$arrForm = $objFormParam->getHashArray();
@@ -112,8 +111,8 @@ public function action()
// 削除
case 'delete':
if (!$objAddress->deleteAddress($arrForm['other_deliv_id'], $objCustomer->getValue('customer_id'))) {
- SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, '別のお届け先を削除できませんでした。');
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(FREE_ERROR_MSG, '', false, '別のお届け先を削除できませんでした。');
+ Response::actionExit();
}
break;
@@ -124,40 +123,40 @@ public function action()
$shipping_id = $arrForm['deliv_check'] == -1 ? 0 : $arrForm['deliv_check'];
$success = $this->registerDeliv($shipping_id, $this->tpl_uniqid, $objPurchase, $objCustomer, $objAddress);
if (!$success) {
- SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
+ Utils::sfDispSiteError(PAGE_ERROR, '', true);
}
$objPurchase->setShipmentItemTempForSole($objCartSess, $shipping_id);
$objSiteSess->setRegistFlag();
- SC_Response_Ex::sendRedirect(SHOPPING_PAYMENT_URLPATH);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(SHOPPING_CONFIRM_URLPATH);
+ Response::actionExit();
break;
// 前のページに戻る
case 'return':
// 確認ページへ移動
- SC_Response_Ex::sendRedirect(CART_URL);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect('confirm.php');
+ Response::actionExit();
break;
// お届け先複数指定
case 'multiple':
// 複数配送先指定が無効な場合はエラー
if (USE_MULTIPLE_SHIPPING === false) {
- SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(PAGE_ERROR, '', true);
+ Response::actionExit();
}
- SC_Response_Ex::sendRedirect('multiple.php');
- SC_Response_Ex::actionExit();
+ Response::sendRedirect('multiple.php');
+ Response::actionExit();
break;
default:
// 配送IDの取得
$shippingData = $objPurchase->getShippingTemp();
- if (!SC_Utils_Ex::isBlank($shippingData)) {
+ if (!Utils::isBlank($shippingData)) {
$arrShippingId = array_keys($shippingData);
}
if (isset($arrShippingId[0])) {
@@ -196,7 +195,7 @@ public function action()
/**
* パラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
@@ -214,12 +213,12 @@ public function lfInitParam(&$objFormParam)
*
* @param integer $other_deliv_id
* @param string $uniqid 受注一時テーブルのユニークID
- * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
- * @param SC_Customer $objCustomer SC_Customer インスタンス
- * @param SC_Helper_Address_Ex $objAddress
+ * @param PurchaseHelper $objPurchase PurchaseHelper インスタンス
+ * @param Customer $objCustomer Customer インスタンス
+ * @param AddressHelper $objAddress
* @return boolean お届け先チェックの値が妥当な場合 true
*/
- public function registerDeliv($other_deliv_id, $uniqid, &$objPurchase, &$objCustomer, $objAddress)
+ public function registerDeliv($other_deliv_id, $uniqid, &$objPurchase, Customer &$objCustomer, $objAddress)
{
$arrValues = array();
// 会員登録住所がチェックされている場合
diff --git a/data/class/pages/shopping/LC_Page_Shopping.php b/data/Eccube/Page/Shopping/Index.php
similarity index 73%
rename from data/class/pages/shopping/LC_Page_Shopping.php
rename to data/Eccube/Page/Shopping/Index.php
index 4e1e3886d73..4c2ad665ff7 100644
--- a/data/class/pages/shopping/LC_Page_Shopping.php
+++ b/data/Eccube/Page/Shopping/Index.php
@@ -1,36 +1,38 @@
tpl_title = 'ログイン';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPref = $masterData->getMasterData('mtb_pref');
$this->arrCountry = $masterData->getMasterData('mtb_country');
$this->arrSex = $masterData->getMasterData('mtb_sex');
$this->arrJob = $masterData->getMasterData('mtb_job');
$this->tpl_onload = 'eccube.toggleDeliveryForm();';
- $objDate = new SC_Date_Ex(BIRTH_YEAR, date('Y'));
+ $objDate = new Date(BIRTH_YEAR, date('Y'), strtotime('now'));
$this->arrYear = $objDate->getYear('', START_BIRTH_YEAR, '');
$this->arrMonth = $objDate->getMonth(true);
$this->arrDay = $objDate->getDay(true);
@@ -76,14 +78,14 @@ public function process()
public function action()
{
//決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
- $objSiteSess = new SC_SiteSession_Ex();
- $objCartSess = new SC_CartSession_Ex();
- $objCustomer = new SC_Customer_Ex();
- $objCookie = new SC_Cookie_Ex();
- $objFormParam = new SC_FormParam_Ex();
+ $objSiteSess = new SiteSession();
+ $objCartSess = new CartSession();
+ $objCustomer = new Customer();
+ $objCookie = new Cookie();
+ $objFormParam = new FormParam();
$nonmember_mainpage = 'shopping/nonmember_input.tpl';
$nonmember_title = 'お客様情報入力';
@@ -95,23 +97,23 @@ public function action()
// ログイン済みの場合は次画面に遷移
if ($objCustomer->isLoginSuccess(true)) {
- SC_Response_Ex::sendRedirect(
+ Response::sendRedirect(
$this->getNextlocation($this->cartKey, $this->tpl_uniqid,
$objCustomer, $objPurchase,
- $objSiteSess));
- SC_Response_Ex::actionExit();
+ $objSiteSess, $objCartSess));
+ Response::actionExit();
// 非会員かつ, ダウンロード商品の場合はエラー表示
} else {
if ($this->cartKey == PRODUCT_TYPE_DOWNLOAD) {
$msg = 'ダウンロード商品を含むお買い物は、会員登録が必要です。
'
. 'お手数ですが、会員登録をお願いします。';
- SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, $objSiteSess, false, $msg);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(FREE_ERROR_MSG, $objSiteSess, false, $msg);
+ Response::actionExit();
}
}
// 携帯端末IDが一致する会員が存在するかどうかをチェックする。
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() === DEVICE_TYPE_MOBILE) {
$this->tpl_valid_phone_id = $objCustomer->checkMobilePhoneId();
}
@@ -126,7 +128,7 @@ public function action()
$this->arrErr = $objFormParam->checkError();
// ログイン判定
- if (SC_Utils_Ex::isBlank($this->arrErr)
+ if (Utils::isBlank($this->arrErr)
&& $objCustomer->doLogin($objFormParam->getValue('login_email'),
$objFormParam->getValue('login_pass'))) {
// クッキー保存判定
@@ -137,43 +139,43 @@ public function action()
}
// モバイルサイトで携帯アドレスの登録が無い場合、携帯アドレス登録ページへ遷移
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE) {
if (!$objCustomer->hasValue('email_mobile')) {
- SC_Response_Ex::sendRedirectFromUrlPath('entry/email_mobile.php');
- SC_Response_Ex::actionExit();
+ Response::sendRedirectFromUrlPath('entry/email_mobile.php');
+ Response::actionExit();
}
// スマートフォンの場合はログイン成功を返す
- } elseif (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
- echo SC_Utils_Ex::jsonEncode(array('success' =>
+ } elseif (Display::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
+ echo Utils::jsonEncode(array('success' =>
$this->getNextLocation($this->cartKey, $this->tpl_uniqid,
$objCustomer, $objPurchase,
- $objSiteSess)));
- SC_Response_Ex::actionExit();
+ $objSiteSess, $objCartSess)));
+ Response::actionExit();
}
- SC_Response_Ex::sendRedirect(
+ Response::sendRedirect(
$this->getNextLocation($this->cartKey, $this->tpl_uniqid,
$objCustomer, $objPurchase,
$objSiteSess));
- SC_Response_Ex::actionExit();
+ Response::actionExit();
// ログインに失敗した場合
} else {
// 仮登録の場合
- if (SC_Helper_Customer_Ex::checkTempCustomer($objFormParam->getValue('login_email'))) {
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
+ if (CustomerHelper::checkTempCustomer($objFormParam->getValue('login_email'))) {
+ if (Display::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo $this->lfGetErrorMessage(TEMP_LOGIN_ERROR);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
} else {
- SC_Utils_Ex::sfDispSiteError(TEMP_LOGIN_ERROR);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(TEMP_LOGIN_ERROR);
+ Response::actionExit();
}
} else {
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
+ if (Display::detectDevice() === DEVICE_TYPE_SMARTPHONE) {
echo $this->lfGetErrorMessage(SITE_LOGIN_ERROR);
- SC_Response_Ex::actionExit();
+ Response::actionExit();
} else {
- SC_Utils_Ex::sfDispSiteError(SITE_LOGIN_ERROR);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(SITE_LOGIN_ERROR);
+ Response::actionExit();
}
}
}
@@ -186,7 +188,7 @@ public function action()
$objFormParam->setParam($_POST);
$this->arrErr = $this->lfCheckError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->lfRegistData($this->tpl_uniqid, $objPurchase, $objCustomer, $objFormParam);
$arrParams = $objFormParam->getHashArray();
@@ -195,36 +197,36 @@ public function action()
$objSiteSess->setRegistFlag();
- SC_Response_Ex::sendRedirect(SHOPPING_PAYMENT_URLPATH);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(SHOPPING_PAYMENT_URLPATH);
+ Response::actionExit();
}
break;
// 前のページに戻る
case 'return':
- SC_Response_Ex::sendRedirect(CART_URL);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(CART_URL);
+ Response::actionExit();
break;
// 複数配送ページへ遷移
case 'multiple':
// 複数配送先指定が無効な場合はエラー
if (USE_MULTIPLE_SHIPPING === false) {
- SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(PAGE_ERROR, '', true);
+ Response::actionExit();
}
$this->lfInitParam($objFormParam);
$objFormParam->setParam($_POST);
$this->arrErr = $this->lfCheckError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$this->lfRegistData($this->tpl_uniqid, $objPurchase, $objCustomer, $objFormParam, true);
$objSiteSess->setRegistFlag();
- SC_Response_Ex::sendRedirect(MULTIPLE_URLPATH);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(MULTIPLE_URLPATH);
+ Response::actionExit();
}
$this->tpl_mainpage = $nonmember_mainpage;
$this->tpl_title = $nonmember_title;
@@ -257,7 +259,7 @@ public function action()
// 記憶したメールアドレスを取得
$this->tpl_login_email = $objCookie->getCookie('login_email');
- if (!SC_Utils_Ex::isBlank($this->tpl_login_email)) {
+ if (!Utils::isBlank($this->tpl_login_email)) {
$this->tpl_login_memory = '1';
}
}
@@ -265,13 +267,13 @@ public function action()
/**
* お客様情報入力時のパラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitParam(&$objFormParam)
{
- SC_Helper_Customer_Ex::sfCustomerCommonParam($objFormParam, 'order_');
- SC_Helper_Customer_Ex::sfCustomerRegisterParam($objFormParam, false, false, 'order_');
+ CustomerHelper::sfCustomerCommonParam($objFormParam, 'order_');
+ CustomerHelper::sfCustomerRegisterParam($objFormParam, false, false, 'order_');
// 不要なパラメーターの削除
// XXX: 共通化したことをうまく使えば、以前あった購入同時会員登録も復活出来そうですが
@@ -283,13 +285,13 @@ public function lfInitParam(&$objFormParam)
$objFormParam->addParam('別のお届け先', 'deliv_check', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
- SC_Helper_Customer_Ex::sfCustomerCommonParam($objFormParam, 'shipping_');
+ CustomerHelper::sfCustomerCommonParam($objFormParam, 'shipping_');
}
/**
* ログイン時のパラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
public function lfInitLoginFormParam(&$objFormParam)
@@ -316,25 +318,26 @@ public function lfInitLoginFormParam(&$objFormParam)
*
* @param integer $product_type_id 商品種別ID
* @param string $uniqid 受注一時テーブルのユニークID
- * @param SC_Customer $objCustomer SC_Customer インスタンス
- * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
- * @param SC_SiteSession $objSiteSess SC_SiteSession インスタンス
+ * @param Customer $objCustomer Customer インスタンス
+ * @param PurchaseHelper $objPurchase PurchaseHelper インスタンス
+ * @param SiteSession $objSiteSess SiteSession インスタンス
* @return string 遷移先のパス
*/
- public function getNextLocation($product_type_id, $uniqid, &$objCustomer, &$objPurchase, &$objSiteSess)
+ public function getNextLocation($product_type_id, $uniqid, Customer &$objCustomer, &$objPurchase, SiteSession &$objSiteSess, &$objCartSess)
{
+ $objPurchase->setDefaultPurchase($uniqid, $product_type_id, $objCustomer, $objCartSess);
switch ($product_type_id) {
case PRODUCT_TYPE_DOWNLOAD:
$objPurchase->unsetAllShippingTemp(true);
$objPurchase->saveOrderTemp($uniqid, array(), $objCustomer);
- $objSiteSess->setRegistFlag();
-
- return 'payment.php';
+ break;
case PRODUCT_TYPE_NORMAL:
default:
- return 'deliv.php';
+ break;
}
+ $objSiteSess->setRegistFlag();
+ return 'confirm.php';
}
/**
@@ -342,12 +345,12 @@ public function getNextLocation($product_type_id, $uniqid, &$objCustomer, &$objP
*
* 非会員向けの処理
* @param integer $uniqid 受注一時テーブルのユニークID
- * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
- * @param SC_Customer $objCustomer SC_Customer インスタンス
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param PurchaseHelper $objPurchase PurchaseHelper インスタンス
+ * @param Customer $objCustomer Customer インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param boolean $isMultiple 複数配送の場合 true
*/
- public function lfRegistData($uniqid, &$objPurchase, &$objCustomer, &$objFormParam, $isMultiple = false)
+ public function lfRegistData($uniqid, &$objPurchase, Customer &$objCustomer, &$objFormParam, $isMultiple = false)
{
$arrParams = $objFormParam->getHashArray();
@@ -377,7 +380,7 @@ public function lfRegistData($uniqid, &$objPurchase, &$objCustomer, &$objFormPar
$arrValues = $objFormParam->getDbArray();
// 登録データの作成
- $arrValues['order_birth'] = SC_Utils_Ex::sfGetTimestamp($arrParams['order_year'], $arrParams['order_month'], $arrParams['order_day']);
+ $arrValues['order_birth'] = Utils::sfGetTimestamp($arrParams['order_year'], $arrParams['order_month'], $arrParams['order_day']);
$arrValues['update_date'] = 'CURRENT_TIMESTAMP';
$arrValues['customer_id'] = '0';
$objPurchase->saveOrderTemp($uniqid, $arrValues, $objCustomer);
@@ -386,20 +389,20 @@ public function lfRegistData($uniqid, &$objPurchase, &$objCustomer, &$objFormPar
/**
* 入力内容のチェックを行う.
*
- * 追加の必須チェック, 相関チェックを行うため, SC_CheckError を使用する.
+ * 追加の必須チェック, 相関チェックを行うため, CheckError を使用する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return array エラー情報の配
*/
public function lfCheckError(&$objFormParam)
{
$arrParams = $objFormParam->getHashArray();
- $objErr = SC_Helper_Customer_Ex::sfCustomerCommonErrorCheck($objFormParam, 'order_');
+ $objErr = CustomerHelper::sfCustomerCommonErrorCheck($objFormParam, 'order_');
// 別のお届け先チェック
if (isset($arrParams['deliv_check']) && $arrParams['deliv_check'] == '1') {
- $objErr2 = SC_Helper_Customer_Ex::sfCustomerCommonErrorCheck($objFormParam, 'shipping_');
+ $objErr2 = CustomerHelper::sfCustomerCommonErrorCheck($objFormParam, 'shipping_');
$objErr->arrErr = array_merge((array) $objErr->arrErr, (array) $objErr2->arrErr);
} else {
// shipping系のエラーは無視
@@ -423,15 +426,15 @@ public function lfCheckError(&$objFormParam)
* 受注一時テーブル, セッションの配送情報から入力済みの購入情報を取得し,
* フォームに設定する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
+ * @param PurchaseHelper $objPurchase PurchaseHelper インスタンス
* @param integer $uniqid 購入一時情報のユニークID
* @return void
*/
public function setFormParams(&$objFormParam, &$objPurchase, $uniqid)
{
$arrOrderTemp = $objPurchase->getOrderTemp($uniqid);
- if (SC_Utils_Ex::isBlank($arrOrderTemp)) {
+ if (Utils::isBlank($arrOrderTemp)) {
$arrOrderTemp = array(
'order_email' => '',
'order_birth' => '',
@@ -478,6 +481,6 @@ public function lfGetErrorMessage($error)
$msg = 'メールアドレスもしくはパスワードが正しくありません。';
}
- return SC_Utils_Ex::jsonEncode(array('login_error' => $msg));
+ return Utils::jsonEncode(array('login_error' => $msg));
}
}
diff --git a/data/class/pages/shopping/LC_Page_Shopping_LoadPaymentModule.php b/data/Eccube/Page/Shopping/LoadPaymentModule.php
similarity index 72%
rename from data/class/pages/shopping/LC_Page_Shopping_LoadPaymentModule.php
rename to data/Eccube/Page/Shopping/LoadPaymentModule.php
index 57eaca56174..58b826ef0f8 100644
--- a/data/class/pages/shopping/LC_Page_Shopping_LoadPaymentModule.php
+++ b/data/Eccube/Page/Shopping/LoadPaymentModule.php
@@ -1,27 +1,21 @@
getOrderId();
if ($order_id === false) {
- SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
+ Utils::sfDispSiteError(PAGE_ERROR, '', true);
return;
}
@@ -63,7 +57,7 @@ public function process()
$module_path = $this->getModulePath($order_id);
if ($module_path === false) {
$msg = 'モジュールファイルの取得に失敗しました。
この手続きは無効となりました。';
- SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', true, $msg);
+ Utils::sfDispSiteError(FREE_ERROR_MSG, '', true, $msg);
return;
}
@@ -82,8 +76,8 @@ public function process()
*/
public function getModulePath($order_id)
{
- $objPurchase = new SC_Helper_Purchase_Ex();
- $objPayment = new SC_Helper_Payment_Ex();
+ $objPurchase = new PurchaseHelper();
+ $objPayment = new PaymentHelper();
$order = $objPurchase->getOrder($order_id);
$payment = $objPayment->get($order['payment_id']);
@@ -129,20 +123,20 @@ public function getModulePath($order_id)
public function getOrderId()
{
if (isset($_SESSION['order_id'])
- && !SC_Utils_Ex::isBlank($_SESSION['order_id'])
- && SC_Utils_Ex::sfIsInt($_SESSION['order_id'])) {
+ && !Utils::isBlank($_SESSION['order_id'])
+ && Utils::sfIsInt($_SESSION['order_id'])) {
return $_SESSION['order_id'];
}
if (isset($_POST['order_id'])
- && !SC_Utils_Ex::isBlank($_POST['order_id'])
- && SC_Utils_Ex::sfIsInt($_POST['order_id'])) {
+ && !Utils::isBlank($_POST['order_id'])
+ && Utils::sfIsInt($_POST['order_id'])) {
return $_POST['order_id'];
}
if (isset($_GET['order_id'])
- && !SC_Utils_Ex::isBlank($_GET['order_id'])
- && SC_Utils_Ex::sfIsInt($_GET['order_id'])) {
+ && !Utils::isBlank($_GET['order_id'])
+ && Utils::sfIsInt($_GET['order_id'])) {
return $_GET['order_id'];
}
diff --git a/data/class/pages/shopping/LC_Page_Shopping_Multiple.php b/data/Eccube/Page/Shopping/Multiple.php
similarity index 57%
rename from data/class/pages/shopping/LC_Page_Shopping_Multiple.php
rename to data/Eccube/Page/Shopping/Multiple.php
index c7afd684d2f..cc0f8a748d4 100644
--- a/data/class/pages/shopping/LC_Page_Shopping_Multiple.php
+++ b/data/Eccube/Page/Shopping/Multiple.php
@@ -1,36 +1,35 @@
cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
- $objSiteSess = new SC_SiteSession_Ex();
- $objCartSess = new SC_CartSession_Ex();
- $objCustomer = new SC_Customer_Ex();
- $objFormParam = new SC_FormParam_Ex();
- $objAddress = new SC_Helper_Address_Ex();
+ $objSiteSess = new SiteSession();
+ $objCartSess = new CartSession();
+ $objCustomer = new Customer();
+ $objFormParam = new FormParam();
+ $objAddress = new AddressHelper();
// 複数配送先指定が無効な場合はエラー
if (USE_MULTIPLE_SHIPPING === false) {
- SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, '', true);
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(PAGE_ERROR, '', true);
+ Response::actionExit();
}
$this->tpl_uniqid = $objSiteSess->getUniqId();
- $this->addrs = $this->getDelivAddrs($objCustomer, $objPurchase, $objAddress);
- $this->tpl_addrmax = count($this->addrs) - 2; // 「選択してください」と会員の住所をカウントしない
- $this->lfInitParam($objFormParam);
+ $this->arrAddress = $this->getDelivAddress($objCustomer, $objPurchase, $objAddress);
+ $this->tpl_addrmax = count($this->arrAddress) - 2; // 「選択してください」と会員の住所をカウントしない
$objPurchase->verifyChangeCart($this->tpl_uniqid, $objCartSess);
+ $this->arrCartItem = $objCartSess->getCartList($objCartSess->getKey());
+ $this->lfInitParam($objFormParam, $this->arrCartItem);
+ $objFormParam->setParam($_POST);
+ $objFormParam->convParam();
+
switch ($this->getMode()) {
case 'confirm':
- $objFormParam->setParam($_POST);
- $this->arrErr = $this->lfCheckError($objFormParam);
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ $this->arrErr = $this->lfCheckError($objFormParam, $this->arrCartItem);
+ if (Utils::isBlank($this->arrErr)) {
// フォームの情報を一時保存しておく
$_SESSION['multiple_temp'] = $objFormParam->getHashArray();
$this->saveMultipleShippings($this->tpl_uniqid, $objFormParam,
@@ -99,73 +101,46 @@ public function action()
$objAddress);
$objSiteSess->setRegistFlag();
- SC_Response_Ex::sendRedirect('payment.php');
- SC_Response_Ex::actionExit();
+ Response::sendRedirect('confirm.php');
+ Response::actionExit();
}
break;
+ // 前のページに戻る
+ case 'return':
+ $objSiteSess->setRegistFlag();
+
+ // 確認ページへ移動
+ Response::sendRedirect('confirm.php');
+ Response::actionExit();
+ break;
+
default:
- $this->setParamToSplitItems($objFormParam, $objCartSess);
+ break;
}
- // 前のページから戻ってきた場合
- if ($_GET['from'] == 'multiple') {
- $objFormParam->setParam($_SESSION['multiple_temp']);
- }
$this->arrForm = $objFormParam->getFormParamList();
}
/**
* フォームを初期化する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return void
*/
- public function lfInitParam(&$objFormParam)
+ public function lfInitParam(&$objFormParam, &$arrCartItem)
{
$objFormParam->addParam('商品規格ID', 'product_class_id', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'));
- $objFormParam->addParam('商品名', 'name');
- $objFormParam->addParam('規格1', 'class_name1');
- $objFormParam->addParam('規格2', 'class_name2');
- $objFormParam->addParam('規格分類1', 'classcategory_name1');
- $objFormParam->addParam('規格分類2', 'classcategory_name2');
- $objFormParam->addParam('メイン画像', 'main_image');
- $objFormParam->addParam('メイン一覧画像', 'main_list_image');
- $objFormParam->addParam(SALE_PRICE_TITLE, 'price');
- $objFormParam->addParam(SALE_PRICE_TITLE . '(税込)', 'price_inctax');
$objFormParam->addParam('数量', 'quantity', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'), 1);
$objFormParam->addParam('お届け先', 'shipping', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
- $objFormParam->addParam('カート番号', 'cart_no', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'));
$objFormParam->addParam('行数', 'line_of_num', INT_LEN, 'n', array('EXIST_CHECK', 'MAX_LENGTH_CHECK', 'NUM_CHECK'));
- }
-
- /**
- * カートの商品を数量ごとに分割し, フォームに設定する.
- *
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @param SC_CartSession $objCartSess SC_CartSession インスタンス
- * @return void
- */
- public function setParamToSplitItems(&$objFormParam, &$objCartSess)
- {
- $cartLists =& $objCartSess->getCartList($objCartSess->getKey());
- $arrItems = array();
- $index = 0;
- foreach (array_keys($cartLists) as $key) {
- $arrProductsClass = $cartLists[$key]['productsClass'];
- $quantity = (int) $cartLists[$key]['quantity'];
- for ($i = 0; $i < $quantity; $i++) {
- foreach ($arrProductsClass as $key2 => $val) {
- $arrItems[$key2][$index] = $val;
- }
- $arrItems['quantity'][$index] = 1;
- $arrItems['price'][$index] = $cartLists[$key]['price'];
- $arrItems['price_inctax'][$index] = $cartLists[$key]['price_inctax'];
- $index++;
- }
+ $arrItem = array();
+ foreach ($arrCartItem as $item) {
+ $product_class_id = $item['productsClass']['product_class_id'];
+ $arrItem['line_of_num'][$product_class_id] = 1;
+ $arrItem['quantity'][] = 1;
}
- $objFormParam->setParam($arrItems);
- $objFormParam->setValue('line_of_num', $index);
+ $objFormParam->setParam($arrItem);
}
/**
@@ -174,14 +149,14 @@ public function setParamToSplitItems(&$objFormParam, &$objCartSess)
* 会員ログイン済みの場合は, 会員登録住所及び追加登録住所を取得する.
* 非会員の場合は, 「お届け先の指定」画面で入力した住所を取得する.
*
- * @param SC_Customer $objCustomer SC_Customer インスタンス
- * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
- * @param SC_Helper_Address_Ex $objAddress
+ * @param Customer $objCustomer Customer インスタンス
+ * @param PurchaseHelper $objPurchase PurchaseHelper インスタンス
+ * @param AddressHelper $objAddress
* @return array 配送住所のプルダウン用連想配列
*/
- public function getDelivAddrs(&$objCustomer, &$objPurchase, &$objAddress)
+ public function getDelivAddress(Customer &$objCustomer, &$objPurchase, &$objAddress)
{
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$arrPref = $masterData->getMasterData('mtb_pref');
$arrResults = array('' => '選択してください');
@@ -205,9 +180,9 @@ public function getDelivAddrs(&$objCustomer, &$objPurchase, &$objAddress)
'tel03' => $objCustomer->getValue('tel03'),
)
);
- $arrAddrs = array_merge($addr, $objAddress->getList($objCustomer->getValue('customer_id')));
- foreach ($arrAddrs as $val) {
- $other_deliv_id = SC_Utils_Ex::isBlank($val['other_deliv_id']) ? 0 : $val['other_deliv_id'];
+ $arrAddress = array_merge($addr, $objAddress->getList($objCustomer->getValue('customer_id')));
+ foreach ($arrAddress as $val) {
+ $other_deliv_id = Utils::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'];
}
@@ -227,29 +202,26 @@ public function getDelivAddrs(&$objCustomer, &$objPurchase, &$objAddress)
/**
* 入力チェックを行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @return array エラー情報の配列
*/
- public function lfCheckError(&$objFormParam)
+ public function lfCheckError(FormParam &$objFormParam, &$arrCartItem)
{
- $objCartSess = new SC_CartSession_Ex();
+ $objCartSess = new CartSession();
- $objFormParam->convParam();
- // 数量未入力は0に置換
$objFormParam->setValue('quantity', $objFormParam->getValue('quantity', 0));
-
$arrErr = $objFormParam->checkError();
-
$arrParams = $objFormParam->getSwapArray();
if (empty($arrErr)) {
- foreach ($arrParams as $index => $arrParam) {
+ $arrTarget = array('product_class_id', 'quantity', 'shipping');
+ $arrParams = $objFormParam->getSwapArray($arrTarget); foreach ($arrParams as $index => $arrParam) {
// 数量0で、お届け先を選択している場合
- if ($arrParam['quantity'] == 0 && !SC_Utils_Ex::isBlank($arrParam['shipping'])) {
+ if ($arrParam['quantity'] == 0 && !Utils::isBlank($arrParam['shipping'])) {
$arrErr['shipping'][$index] = '※ 数量が0の場合、お届け先を入力できません。
';;
}
// 数量の入力があり、お届け先を選択していない場合
- if ($arrParam['quantity'] > 0 && SC_Utils_Ex::isBlank($arrParam['shipping'])) {
+ if ($arrParam['quantity'] > 0 && Utils::isBlank($arrParam['shipping'])) {
$arrErr['shipping'][$index] = '※ お届け先が入力されていません。
';
}
}
@@ -264,14 +236,13 @@ public function lfCheckError(&$objFormParam)
$arrQuantity[$product_class_id] += $arrParam['quantity'];
}
// カゴの中身と突き合わせ
- $cartLists =& $objCartSess->getCartList($objCartSess->getKey());
- foreach ($cartLists as $arrCartRow) {
- $product_class_id = $arrCartRow['id'];
+ foreach ($arrCartItem as $item) {
+ $product_class_id = $item['id'];
// 差異がある場合、エラーを記録
- if ($arrCartRow['quantity'] != $arrQuantity[$product_class_id]) {
+ if ($item['quantity'] != $arrQuantity[$product_class_id]) {
foreach ($arrParams as $index => $arrParam) {
if ($arrParam['product_class_id'] == $product_class_id) {
- $arrErr['quantity'][$index] = '※ 数量合計を「' . $arrCartRow['quantity'] .'」にしてください。
';
+ $arrErr['line_of_num'][$product_class_id] = "※ 数量合計を「{$item['quantity']}」にしてください。
";
}
}
}
@@ -287,38 +258,41 @@ public function lfCheckError(&$objFormParam)
* 会員ログインしている場合は, その他のお届け先から住所情報を取得する.
*
* @param integer $uniqid 一時受注テーブルのユニークID
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @param SC_Customer $objCustomer SC_Customer インスタンス
- * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
- * @param SC_Helper_Address_Ex $objAddress
+ * @param FormParam $objFormParam FormParam インスタンス
+ * @param Customer $objCustomer Customer インスタンス
+ * @param PurchaseHelper $objPurchase PurchaseHelper インスタンス
+ * @param AddressHelper $objAddress
* @return void
*/
public function saveMultipleShippings($uniqid, &$objFormParam, &$objCustomer, &$objPurchase, &$objAddress)
{
+ $arrValues = array();
+ $arrItemTemp = array();
$arrParams = $objFormParam->getSwapArray();
-
foreach ($arrParams as $arrParam) {
$other_deliv_id = $arrParam['shipping'];
-
if ($objCustomer->isLoginSuccess(true)) {
if ($other_deliv_id != 0) {
$otherDeliv = $objAddress->getAddress($other_deliv_id, $objCustomer->getValue('customer_id'));
-
if (!$otherDeliv) {
- SC_Utils_Ex::sfDispSiteError(FREE_ERROR_MSG, '', false, "入力値が不正です。
正しい値を入力してください。");
- SC_Response_Ex::actionExit();
+ Utils::sfDispSiteError(FREE_ERROR_MSG, '', false, "入力値が不正です。
正しい値を入力してください。");
+ Response::actionExit();
}
-
foreach ($otherDeliv as $key => $val) {
- $arrValues[$other_deliv_id]['shipping_' . $key] = $val;
+ $arrValues[$other_deliv_id]["shipping_{$key}"] = $val;
}
} else {
- $objPurchase->copyFromCustomer($arrValues[0], $objCustomer,
- 'shipping');
+ $objPurchase->copyFromCustomer($arrValues[0], $objCustomer, 'shipping');
}
} else {
$arrValues = $objPurchase->getShippingTemp();
}
+ if (!isset($arrItemTemp[$other_deliv_id])) {
+ $arrItemTemp[$other_deliv_id] = array();
+ }
+ if (!isset($arrItemTemp[$other_deliv_id][$arrParam['product_class_id']])) {
+ $arrItemTemp[$other_deliv_id][$arrParam['product_class_id']] = 0;
+ }
$arrItemTemp[$other_deliv_id][$arrParam['product_class_id']] += $arrParam['quantity'];
}
@@ -331,14 +305,12 @@ public function saveMultipleShippings($uniqid, &$objFormParam, &$objCustomer, &$
foreach ($arrItemTemp as $other_deliv_id => $arrProductClassIds) {
foreach ($arrProductClassIds as $product_class_id => $quantity) {
if ($quantity == 0) continue;
- $objPurchase->setShipmentItemTemp($other_deliv_id,
- $product_class_id,
- $quantity);
+ $objPurchase->setShipmentItemTemp($other_deliv_id, $product_class_id, $quantity);
}
}
//不必要な配送先を削除
- foreach ($_SESSION['shipping'] as $id=>$arrShipping) {
+ foreach ($_SESSION['shipping'] as $id => $arrShipping) {
if (!isset($arrShipping['shipment_item'])) {
$objPurchase->unsetOneShippingTemp($id);
}
diff --git a/data/class/pages/shopping/LC_Page_Shopping_Payment.php b/data/Eccube/Page/Shopping/Payment.php
similarity index 83%
rename from data/class/pages/shopping/LC_Page_Shopping_Payment.php
rename to data/Eccube/Page/Shopping/Payment.php
index cc04d6b9ea4..0529cef5e0b 100644
--- a/data/class/pages/shopping/LC_Page_Shopping_Payment.php
+++ b/data/Eccube/Page/Shopping/Payment.php
@@ -1,36 +1,38 @@
tpl_onload = 'eccube.togglePointForm();';
$this->tpl_title = 'お支払方法・お届け時間等の指定';
- $masterData = new SC_DB_MasterData_Ex();
+ $masterData = new MasterData();
$this->arrPref = $masterData->getMasterData('mtb_pref');
}
@@ -66,14 +68,14 @@ public function process()
public function action()
{
//決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
+ $objPurchase = new PurchaseHelper();
$objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
- $objSiteSess = new SC_SiteSession_Ex();
- $objCartSess = new SC_CartSession_Ex();
- $objCustomer = new SC_Customer_Ex();
- $objFormParam = new SC_FormParam_Ex();
- $objDelivery = new SC_Helper_Delivery_Ex();
+ $objSiteSess = new SiteSession();
+ $objCartSess = new CartSession();
+ $objCustomer = new Customer();
+ $objFormParam = new FormParam();
+ $objDelivery = new DeliveryHelper();
$this->is_multiple = $objPurchase->isMultiple();
@@ -104,16 +106,16 @@ public function action()
$arrOrderTemp = $objPurchase->getOrderTemp($this->tpl_uniqid);
// 正常に受注情報が格納されていない場合はカート画面へ戻す
- if (SC_Utils_Ex::isBlank($arrOrderTemp)) {
- SC_Response_Ex::sendRedirect(CART_URL);
- SC_Response_Ex::actionExit();
+ if (Utils::isBlank($arrOrderTemp)) {
+ Response::sendRedirect(CART_URL);
+ Response::actionExit();
}
// カート内商品の妥当性チェック
$this->tpl_message = $objCartSess->checkProducts($cart_key);
if (strlen($this->tpl_message) >= 1) {
- SC_Response_Ex::sendRedirect(CART_URL);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(CART_URL);
+ Response::actionExit();
}
/*
@@ -134,7 +136,7 @@ public function action()
$this->setFormParams($objFormParam, $arrOrderTemp, true, $this->arrShipping);
$objFormParam->setParam($_POST);
$this->arrErr = $objFormParam->checkError();
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Utils::isBlank($this->arrErr)) {
$deliv_id = $objFormParam->getValue('deliv_id');
$arrSelectedDeliv = $this->getSelectedDeliv($objCartSess, $deliv_id);
$arrSelectedDeliv['error'] = false;
@@ -143,9 +145,9 @@ public function action()
$this->tpl_mainpage = 'shopping/select_deliv.tpl'; // モバイル用
}
- if (SC_Display_Ex::detectDevice() != DEVICE_TYPE_MOBILE) {
- echo SC_Utils_Ex::jsonEncode($arrSelectedDeliv);
- SC_Response_Ex::actionExit();
+ if (Display::detectDevice() != DEVICE_TYPE_MOBILE) {
+ echo Utils::jsonEncode($arrSelectedDeliv);
+ Response::actionExit();
} else {
$this->arrPayment = $arrSelectedDeliv['arrPayment'];
$this->arrDelivTime = $arrSelectedDeliv['arrDelivTime'];
@@ -166,8 +168,8 @@ public function action()
$objSiteSess->setRegistFlag();
// 確認ページへ移動
- SC_Response_Ex::sendRedirect(SHOPPING_CONFIRM_URLPATH);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect(SHOPPING_CONFIRM_URLPATH);
+ Response::actionExit();
} else {
$deliv_id = $objFormParam->getValue('deliv_id');
@@ -204,8 +206,8 @@ public function action()
$url = SHOPPING_URL . '?from=nonmember';
}
- SC_Response_Ex::sendRedirect($url);
- SC_Response_Ex::actionExit();
+ Response::sendRedirect($url);
+ Response::actionExit();
break;
default:
@@ -218,7 +220,7 @@ public function action()
$deliv_id = $this->arrDeliv[0]['deliv_id'];
}
- if (!SC_Utils_Ex::isBlank($deliv_id)) {
+ if (!Utils::isBlank($deliv_id)) {
$objFormParam->setValue('deliv_id', $deliv_id);
$arrSelectedDeliv = $this->getSelectedDeliv($objCartSess, $deliv_id);
$this->arrPayment = $arrSelectedDeliv['arrPayment'];
@@ -229,8 +231,8 @@ public function action()
}
// モバイル用 ポストバック処理
- if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE
- && SC_Utils_Ex::isBlank($this->arrErr)) {
+ if (Display::detectDevice() == DEVICE_TYPE_MOBILE
+ && Utils::isBlank($this->arrErr)) {
$this->tpl_mainpage = $this->getMobileMainpage($this->is_single_deliv, $this->getMode());
}
@@ -240,7 +242,7 @@ public function action()
/**
* パラメーターの初期化を行い, 初期値を設定する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param array $arrParam 設定する値の配列
* @param boolean $deliv_only deliv_id チェックのみの場合 true
* @param array $arrShipping 配送先情報の配列
@@ -255,7 +257,7 @@ public function setFormParams(&$objFormParam, $arrParam, $deliv_only, &$arrShipp
/**
* パラメーター情報の初期化を行う.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param boolean $deliv_only 必須チェックは deliv_id のみの場合 true
* @param array $arrShipping 配送先情報の配列
* @return void
@@ -285,7 +287,7 @@ public function lfInitParam(&$objFormParam, $deliv_only, &$arrShipping)
/**
* 入力内容のチェックを行なう.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param integer $subtotal 購入金額の小計
* @param integer $max_point 会員の保持ポイント
* @return array 入力チェック結果の配列
@@ -294,7 +296,7 @@ public function lfCheckError(&$objFormParam, $subtotal, $max_point)
{
// 入力データを渡す。
$arrForm = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrForm);
+ $objErr = new CheckError($arrForm);
$objErr->arrErr = $objFormParam->checkError();
if (USE_POINT === false) {
@@ -304,7 +306,7 @@ public function lfCheckError(&$objFormParam, $subtotal, $max_point)
$objErr->doFunc(array('ポイントを使用する', 'point_check'), array('EXIST_CHECK'));
if ($arrForm['point_check'] == '1'
- && SC_Utils_Ex::isBlank($objErr->arrErr['use_point'])) {
+ && Utils::isBlank($objErr->arrErr['use_point'])) {
$objErr->doFunc(array('ポイント', 'use_point'), array('EXIST_CHECK'));
if ($max_point == '') {
@@ -318,7 +320,7 @@ public function lfCheckError(&$objFormParam, $subtotal, $max_point)
$objErr->arrErr['use_point'] = '※ ご利用ポイントがご購入金額を超えています。
';
}
// ポイント差し引き後のお支払い方法チェック
- $objPayment = new SC_Helper_Payment_Ex();
+ $objPayment = new PaymentHelper();
$arrPayments = $objPayment->get($arrForm['payment_id']);
if ($arrPayments['rule_max'] > $subtotal - $arrForm['use_point'] * POINT_VALUE) {
$objErr->arrErr['use_point'] = '※ 選択したお支払い方法では、ポイントは'.($subtotal - $arrPayments['rule_max']).'ポイントまでご利用いただけます。
';
@@ -331,7 +333,7 @@ public function lfCheckError(&$objFormParam, $subtotal, $max_point)
/**
* 配送情報を保存する.
*
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
+ * @param FormParam $objFormParam FormParam インスタンス
* @param array $arrDelivTime 配送時間の配列
*/
public function saveShippings(&$objFormParam, $arrDelivTime)
@@ -341,7 +343,7 @@ public function saveShippings(&$objFormParam, $arrDelivTime)
$deliv_id = $objFormParam->getValue('deliv_id');
/* TODO
- * SC_Purchase::getShippingTemp() で取得して,
+ * Purchase::getShippingTemp() で取得して,
* リファレンスで代入すると, セッションに添字を追加できない?
*/
foreach (array_keys($_SESSION['shipping']) as $key) {
@@ -359,7 +361,7 @@ public function saveShippings(&$objFormParam, $arrDelivTime)
*
* @param integer $uniqid 受注一時テーブルのユニークID
* @param array $arrForm フォームの入力値
- * @param SC_Helper_Purchase $objPurchase SC_Helper_Purchase インスタンス
+ * @param PurchaseHelper $objPurchase PurchaseHelper インスタンス
* @param array $arrPayment お支払い方法の配列
* @return void
*/
@@ -390,18 +392,18 @@ public function lfRegistData($uniqid, $arrForm, &$objPurchase, $arrPayment)
* - 'arrPayment' - 支払い方法の配列
* - 'img_show' - 支払い方法の画像の有無
*
- * @param SC_CartSession $objCartSess SC_CartSession インスタンス
+ * @param CartSession $objCartSess CartSession インスタンス
* @param integer $deliv_id 配送業者ID
* @return array 支払い方法, お届け時間を格納した配列
*/
- public function getSelectedDeliv(&$objCartSess, $deliv_id)
+ public function getSelectedDeliv(CartSession &$objCartSess, $deliv_id)
{
$arrResults = array();
if (strval($deliv_id) === strval(intval($deliv_id))) {
- $arrResults['arrDelivTime'] = SC_Helper_Delivery_Ex::getDelivTime($deliv_id);
+ $arrResults['arrDelivTime'] = DeliveryHelper::getDelivTime($deliv_id);
$total = $objCartSess->getAllProductsTotal($objCartSess->getKey());
- $payments_deliv = SC_Helper_Delivery_Ex::getPayments($deliv_id);
- $objPayment = new SC_Helper_Payment_Ex();
+ $payments_deliv = DeliveryHelper::getPayments($deliv_id);
+ $objPayment = new PaymentHelper();
$payments_total = $objPayment->getByPrice($total);
$arrPayment = array();
foreach ($payments_total as $payment) {
@@ -424,7 +426,7 @@ public function getSelectedDeliv(&$objCartSess, $deliv_id)
public function hasPaymentImage($arrPayment)
{
foreach ($arrPayment as $val) {
- if (!SC_Utils_Ex::isBlank($val['payment_image'])) {
+ if (!Utils::isBlank($val['payment_image'])) {
return true;
}
}
diff --git a/data/class/pages/LC_Page_Sitemap.php b/data/Eccube/Page/Sitemap.php
similarity index 96%
rename from data/class/pages/LC_Page_Sitemap.php
rename to data/Eccube/Page/Sitemap.php
index 2a4b9af3431..b38d85ba585 100644
--- a/data/class/pages/LC_Page_Sitemap.php
+++ b/data/Eccube/Page/Sitemap.php
@@ -21,7 +21,10 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-require_once CLASS_EX_REALDIR . 'page_extends/LC_Page_Ex.php';
+namespace Eccube\Page;
+
+use Eccube\Common\Product;
+use Eccube\Common\Query;
/**
* Sitemapプロトコル ファイル生成モジュール.
@@ -49,7 +52,7 @@
* :TODO: 各ページの changefreq や priority を指定できるようにする
* :TODO: filemtime 関数を使えば、静的なページの更新時間も取得できそう
*/
-class LC_Page_Sitemap extends LC_Page_Ex
+class Sitemap extends AbstractPage
{
/** 動的に生成しないページの配列 */
public $staticURL;
@@ -201,7 +204,7 @@ public function getEditablePage($arrPageList)
public function getAllProducts()
{
// XXX: 商品登録の無いカテゴリは除外する方が良い気もする
- $objQuery = SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$sql = 'SELECT category_id FROM dtb_category WHERE del_flg = 0';
$result = $objQuery->getAll($sql);
@@ -223,8 +226,8 @@ public function getAllProducts()
*/
public function getAllDetail()
{
- $objQuery = SC_Query_Ex::getSingletonInstance();
- $sql = 'SELECT product_id, update_date FROM dtb_products WHERE ' . SC_Product_Ex::getProductDispConditions();
+ $objQuery = Query::getSingletonInstance();
+ $sql = 'SELECT product_id, update_date FROM dtb_products WHERE ' . Product::getProductDispConditions();
$result = $objQuery->getAll($sql);
$arrRet = array();
@@ -247,7 +250,7 @@ public function getAllDetail()
*/
public function getPageData($where = '', $arrVal = '')
{
- $objQuery = SC_Query_Ex::getSingletonInstance(); // DB操作オブジェクト
+ $objQuery = Query::getSingletonInstance(); // DB操作オブジェクト
$sql = ''; // データ取得SQL生成用
$arrPageList = array(); // データ取得用
diff --git a/data/Eccube/Page/Unsupported/Index.php b/data/Eccube/Page/Unsupported/Index.php
new file mode 100644
index 00000000000..da441a98079
--- /dev/null
+++ b/data/Eccube/Page/Unsupported/Index.php
@@ -0,0 +1,51 @@
+tpl_title = '未対応デバイス';
+ }
+
+ /**
+ * Page のプロセス.
+ *
+ * @return void
+ */
+ public function process()
+ {
+ parent::process();
+ $this->action();
+ $this->sendResponse();
+ }
+
+ public function action()
+ {
+ }
+}
diff --git a/data/class/pages/upgrade/LC_Page_Upgrade_Base.php b/data/Eccube/Page/Upgrade/AbstractUpgrade.php
similarity index 77%
rename from data/class/pages/upgrade/LC_Page_Upgrade_Base.php
rename to data/Eccube/Page/Upgrade/AbstractUpgrade.php
index ded9da2df3a..0fdaf9e30c6 100644
--- a/data/class/pages/upgrade/LC_Page_Upgrade_Base.php
+++ b/data/Eccube/Page/Upgrade/AbstractUpgrade.php
@@ -1,16 +1,28 @@
select('auto_update_flg', 'dtb_module', $where, array($product_id));
if (isset($arrRet[0]['auto_update_flg'])
@@ -48,11 +60,11 @@ public function autoUpdateEnable($product_id)
*
* @param string $mode
* @param array $arrParams 追加パラメーター.連想配列で渡す.
- * @return string|object レスポンスボディ|エラー時にはPEAR::Errorオブジェクトを返す.
+ * @return string|object レスポンスボディ|エラー時には\PEAR::Errorオブジェクトを返す.
*/
public function request($mode, $arrParams = array(), $arrCookies = array())
{
- $objReq = new HTTP_Request();
+ $objReq = new \HTTP_Request();
$objReq->setUrl(OSTORE_URL . 'upgrade/index.php');
$objReq->setMethod('POST');
$objReq->addPostData('mode', $mode);
@@ -65,7 +77,7 @@ public function request($mode, $arrParams = array(), $arrCookies = array())
}
$e = $objReq->sendRequest();
- if (PEAR::isError($e)) {
+ if (\PEAR::isError($e)) {
return $e;
} else {
return $objReq;
@@ -74,7 +86,7 @@ public function request($mode, $arrParams = array(), $arrCookies = array())
public function isLoggedInAdminPage()
{
- $objSess = new SC_Session_Ex();
+ $objSess = new Session();
if ($objSess->isSuccess() === SUCCESS) {
return true;
@@ -95,7 +107,7 @@ public function createSeed()
public function getPublicKey()
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrRet = $objQuery->select('*', 'dtb_ownersstore_settings');
return isset($arrRet[0]['public_key'])
diff --git a/data/class/pages/upgrade/LC_Page_Upgrade_Download.php b/data/Eccube/Page/Upgrade/Download.php
similarity index 89%
rename from data/class/pages/upgrade/LC_Page_Upgrade_Download.php
rename to data/Eccube/Page/Upgrade/Download.php
index 62f29c1b89b..9103c3e56bd 100644
--- a/data/class/pages/upgrade/LC_Page_Upgrade_Download.php
+++ b/data/Eccube/Page/Upgrade/Download.php
@@ -1,27 +1,22 @@
start($mode);
- $objJson = new LC_Upgrade_Helper_Json;
+ $objJson = new JsonHelper;
// アクセスチェック
$objLog->log('* auth start');
@@ -132,7 +126,7 @@ public function process($mode)
// リクエストチェック
$objLog->log('* http request check start');
- if (PEAR::isError($objReq)) {
+ if (\PEAR::isError($objReq)) {
$objJson->setError(OSTORE_E_C_HTTP_REQ);
$objJson->display();
$objLog->error(OSTORE_E_C_HTTP_REQ, $objReq);
@@ -200,8 +194,7 @@ public function process($mode)
$tar->extract($exract_dir);
$objLog->log('* copy batch start');
- @include_once CLASS_REALDIR . 'batch/SC_Batch_Update.php';
- $objBatch = new SC_Batch_Update();
+ $objBatch = new BatchUpdate();
$arrCopyLog = $objBatch->execute($exract_dir);
$objLog->log('* copy batch check start');
@@ -251,7 +244,7 @@ public function process($mode)
public function initParam()
{
- $this->objForm = new SC_FormParam_Ex();
+ $this->objForm = new FormParam();
$this->objForm->addParam(
'product_id', 'product_id', INT_LEN, '', array('EXIST_CHECK', 'NUM_CHECK', 'MAX_LENGTH_CHECK')
);
@@ -267,7 +260,7 @@ public function updateMdlTable($objRet)
{
$table = 'dtb_module';
$where = 'module_id = ?';
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$exists = $objQuery->exists($table, $where, array($objRet->product_id));
if ($exists) {
@@ -314,7 +307,7 @@ public function notifyDownload($mode, $arrCookies)
*/
public function isValidAccess($mode)
{
- $objLog = new LC_Upgrade_Helper_Log;
+ $objLog = new LogHelper;
switch ($mode) {
// モジュールダウンロード
case 'download':
@@ -328,7 +321,7 @@ public function isValidAccess($mode)
case 'patch_download':
// モジュール自動アップロード
case 'auto_update':
- $objForm = new SC_FormParam;
+ $objForm = new FormParam;
$objForm->addParam('public_key', 'public_key', MTEXT_LEN, '', array('EXIST_CHECK', 'ALNUM_CHECK', 'MAX_LENGTH_CHECK'));
$objForm->addParam('sha1_key', 'sha1_key', MTEXT_LEN, '', array('EXIST_CHECK', 'ALNUM_CHECK', 'MAX_LENGTH_CHECK'));
$objForm->setParam($_POST);
@@ -370,7 +363,7 @@ public function isValidAccess($mode)
public function registerUpdateLog($arrLog, $objRet)
{
- $objQuery =& SC_Query_Ex::getSingletonInstance();
+ $objQuery = Query::getSingletonInstance();
$arrInsert = array(
'log_id' => $objQuery->nextVal('dtb_module_update_logs_log_id'),
'module_id' => $objRet->product_id,
diff --git a/data/class/pages/upgrade/helper/LC_Upgrade_Helper_Json.php b/data/Eccube/Page/Upgrade/Helper/JsonHelper.php
similarity index 79%
rename from data/class/pages/upgrade/helper/LC_Upgrade_Helper_Json.php
rename to data/Eccube/Page/Upgrade/Helper/JsonHelper.php
index 576cb41ada7..6159ee0d3d6 100644
--- a/data/class/pages/upgrade/helper/LC_Upgrade_Helper_Json.php
+++ b/data/Eccube/Page/Upgrade/Helper/JsonHelper.php
@@ -1,9 +1,25 @@
getMasterData('mtb_ownersstore_err');
$this->arrData['status'] = OSTORE_STATUS_ERROR;
@@ -89,10 +105,10 @@ public function display()
*
* @param string $str
* @return StdClass
- * @see SC_Utils_Ex::jsonDecode
+ * @see Utils::jsonDecode
*/
public function decode($str)
{
- return SC_Utils_Ex::jsonDecode($str);
+ return Utils::jsonDecode($str);
}
}
diff --git a/data/class/pages/upgrade/helper/LC_Upgrade_Helper_Log.php b/data/Eccube/Page/Upgrade/Helper/LogHelper.php
similarity index 56%
rename from data/class/pages/upgrade/helper/LC_Upgrade_Helper_Log.php
rename to data/Eccube/Page/Upgrade/Helper/LogHelper.php
index 88c3c68a8e4..c1db267496f 100644
--- a/data/class/pages/upgrade/helper/LC_Upgrade_Helper_Log.php
+++ b/data/Eccube/Page/Upgrade/Helper/LogHelper.php
@@ -1,31 +1,24 @@
start($mode);
@@ -89,7 +81,7 @@ public function process($mode)
// リクエストチェック
$objLog->log('* http request check start');
- if (PEAR::isError($objReq)) {
+ if (\PEAR::isError($objReq)) {
$objJson->setError(OSTORE_E_C_HTTP_REQ);
$objJson->display();
$objLog->error(OSTORE_E_C_HTTP_REQ, $objReq);
@@ -130,7 +122,7 @@ public function process($mode)
foreach ($objRet->data as $product) {
$arrProducts[] = get_object_vars($product);
}
- $objView = new SC_AdminView_Ex();
+ $objView = new AdminView();
$objView->assign('arrProducts', $arrProducts);
$template = 'ownersstore/products_list.tpl';
diff --git a/data/class/pages/upgrade/LC_Page_Upgrade_SiteCheck.php b/data/Eccube/Page/Upgrade/SiteCheck.php
similarity index 51%
rename from data/class/pages/upgrade/LC_Page_Upgrade_SiteCheck.php
rename to data/Eccube/Page/Upgrade/SiteCheck.php
index fe5ac8df9ad..2ca1a55928d 100644
--- a/data/class/pages/upgrade/LC_Page_Upgrade_SiteCheck.php
+++ b/data/Eccube/Page/Upgrade/SiteCheck.php
@@ -1,36 +1,28 @@
start($mode);
- $dbFactory = SC_DB_DBFactory_Ex::getInstance();
+ $dbFactory = DBFactory::getInstance();
$arrSystemInfo = array(
'eccube_version' => ECCUBE_VERSION,
'php_version' => phpversion(),
diff --git a/data/Eccube/RouteMap.php b/data/Eccube/RouteMap.php
new file mode 100644
index 00000000000..2ec0cb599fd
--- /dev/null
+++ b/data/Eccube/RouteMap.php
@@ -0,0 +1,768 @@
+ array(
+ 'method' => 'GET|DELETE',
+ 'class' => '\\customer\\Index',
+ 'action' => 'process',
+ ),
+ 'api/customer' => array(
+ 'method' => 'POST|PUT',
+ 'class' => '\\customer\\Index',
+ 'action' => 'process',
+ ),
+
+// sample
+ 'products/detail/[:product_id]/[:category_id]' => array(
+ 'class' => '\\Products\\Detail',
+ 'action' => 'process',
+ 'template' => 'produdcts_detail',
+ ),
+ 'products/detail/[:product_id]/' => array(
+ 'class' => '\\Products\\Detail',
+ 'action' => 'process',
+ 'template' => 'produdcts_detail',
+ ),
+// front
+ 'index' => array(
+ 'method' => 'GET|POST',
+ 'class' => '\\Index',
+ 'action' => 'process',
+ 'template' => 'index',
+ ),
+ 'abouts' => array(
+ 'class' => '\\Abouts\\Index',
+ 'action' => 'process',
+ 'template' => 'abouts',
+ ),
+ 'cart/index' => array(
+ 'class' => '\\Cart\\Index',
+ 'action' => 'process',
+ 'template' => 'cart',
+ ),
+ 'contact' => array(
+ 'class' => '\\Contact\\Index',
+ 'action' => 'process',
+ 'template' => 'contact',
+ ),
+ 'contact/complete' => array(
+ 'class' => '\\Contact\\Complete',
+ 'action' => 'process',
+ 'template' => 'comtact_complete',
+ ),
+ 'entry' => array(
+ 'class' => '\\Entry\\Index',
+ 'action' => 'process',
+ 'template' => 'entry',
+ ),
+ 'entry/kiyaku' => array(
+ 'class' => '\\Entry\\Kiyaku',
+ 'action' => 'process',
+ 'template' => 'entry_kiyaku',
+ ),
+ 'entry/email_mobile' => array(
+ 'class' => '\\Entry\\EmailMobile',
+ 'action' => 'process',
+ 'template' => 'email_mobile',
+ ),
+ 'entry/complete' => array(
+ 'class' => '\\Entry\\Complete',
+ 'action' => 'process',
+ 'template' => 'entry_complete',
+ ),
+ 'error' => array(
+ 'class' => '\\Error\\Index',
+ 'action' => 'process',
+ 'template' => 'error',
+ ),
+ 'error/disp_error' => array(
+ 'class' => '\\Error\\DispError',
+ 'action' => 'process',
+ 'template' => 'disp_error',
+ ),
+ 'error/system_error' => array(
+ 'class' => '\\Error\\SystemError',
+ 'action' => 'process',
+ 'template' => 'system_error',
+ ),
+ 'forgot' => array(
+ 'class' => '\\Forgot\\Index',
+ 'action' => 'process',
+ 'template' => 'forgot',
+ ),
+ 'frontparts/login_check' => array(
+ 'class' => '\\Frontparts\\LoginCheck',
+ 'action' => 'process',
+ 'template' => 'frontparts_login_check',
+ ),
+ 'guide' => array(
+ 'class' => '\\Guide\\Index',
+ 'action' => 'process',
+ 'template' => 'guide',
+ ),
+ 'guide/about' => array(
+ 'class' => '\\Guide\\About',
+ 'action' => 'process',
+ 'template' => 'guide_about',
+ ),
+ 'guide/charge' => array(
+ 'class' => '\\Guide\\Charge',
+ 'action' => 'process',
+ 'template' => 'guide_charge',
+ ),
+ 'guide/kiyaku' => array(
+ 'class' => '\\Guide\\Kiyaku',
+ 'action' => 'process',
+ 'template' => 'guide_kiyaku',
+ ),
+ 'guide/privacy' => array(
+ 'class' => '\\Guide\\Privacy',
+ 'action' => 'process',
+ 'template' => 'guide_privacy',
+ ),
+ 'guide/usage' => array(
+ 'class' => '\\Guide\\Usage',
+ 'action' => 'process',
+ 'template' => 'guide_usage',
+ ),
+ 'mypage' => array(
+ 'class' => '\\Mypage\\Index',
+ 'action' => 'process',
+ 'template' => 'mypage',
+ ),
+ 'mypage/change' => array(
+ 'class' => '\\Mypage\\Change',
+ 'action' => 'process',
+ 'template' => 'mypage_charge',
+ ),
+ 'mypage/change_complete' => array(
+ 'class' => '\\Mypage\\ChangeComplete',
+ 'action' => 'process',
+ 'template' => 'mypage_change_complete',
+ ),
+ 'mypage/delivery' => array(
+ 'class' => '\\Mypage\\Delivery',
+ 'action' => 'process',
+ 'template' => 'mypage_delivery',
+ ),
+ 'mypage/delivery_addr' => array(
+ 'class' => '\\Mypage\\DeliveryAddr',
+ 'action' => 'process',
+ 'template' => 'mypage_delivery_addr',
+ ),
+ 'mypage/download' => array(
+ 'class' => '\\Mypage\\Download',
+ 'action' => 'process',
+ 'template' => 'mypage_download',
+ ),
+ 'mypage/favorite' => array(
+ 'class' => '\\Mypage\\Favorite',
+ 'action' => 'process',
+ 'template' => 'mypage_favorite',
+ ),
+ 'mypage/history' => array(
+ 'class' => '\\Mypage\\History',
+ 'action' => 'process',
+ 'template' => 'mypage_history',
+ ),
+ 'mypage/login' => array(
+ 'class' => '\\Mypage\\Login',
+ 'action' => 'process',
+ 'template' => 'mypage_login',
+ ),
+ 'mypage/mail_view' => array(
+ 'dir' => '',
+ 'class' => '\\Mypage\\MailView',
+ 'action' => 'process',
+ 'template' => 'mypage_mail_view',
+ ),
+ 'mypage/order' => array(
+ 'class' => '\\Mypage\\Order',
+ 'action' => 'process',
+ 'template' => 'mypage_order',
+ ),
+ 'mypage/refusal' => array(
+ 'class' => '\\Mypage\\Refusal',
+ 'action' => 'process',
+ 'template' => 'mypage_refusal',
+ ),
+ 'mypage/refusal_complete' => array(
+ 'class' => '\\Mypage\\RefusalComplete',
+ 'action' => 'process',
+ 'template' => 'mypage_refusal_complete',
+ ),
+ 'order' => array(
+ 'class' => '\\Order\\Index',
+ 'action' => 'process',
+ 'template' => 'order',
+ ),
+ 'preview' => array(
+ 'class' => '\\Preview\\Index',
+ 'action' => 'process',
+ 'template' => 'preview',
+ ),
+ 'products' => array(
+ 'class' => '\\Prodcuts\\Index',
+ 'action' => 'process',
+ 'template' => 'products',
+ ),
+ 'products/category_list' => array(
+ 'class' => '\\Products\\CategoryList',
+ 'action' => 'process',
+ 'template' => 'products_category_list',
+ ),
+ 'products/list' => array(
+ 'class' => '\\Products\\ProductsList',
+ 'action' => 'process',
+ 'template' => 'products_products_list',
+ ),
+ 'products/detail' => array(
+ 'class' => '\\Products\\Detail',
+ 'action' => 'process',
+ 'template' => 'produdcts_detail',
+ ),
+ 'proudcts/search' => array(
+ 'class' => '\\Products\\Search',
+ 'action' => 'process',
+ 'template' => 'proudcts_search',
+ ),
+ 'regist' => array(
+ 'class' => '\\Regist\\Index',
+ 'action' => 'process',
+ 'template' => 'regist',
+ ),
+ 'regist/complete' => array(
+ 'class' => '\\Regist\\Complete',
+ 'action' => 'process',
+ 'template' => 'regist_complete',
+ ),
+ 'rss' => array(
+ 'class' => '\\Rss\\Index',
+ 'action' => 'process',
+ 'template' => 'rss',
+ ),
+ 'rss/products' => array(
+ 'class' => '\\Rss\\Products',
+ 'action' => 'process',
+ 'template' => 'rss_products',
+ ),
+ 'shopping/index' => array(
+ 'class' => '\\Shopping\\Index',
+ 'action' => 'process',
+ 'template' => 'shopping',
+ ),
+ 'shopping/confirm' => array(
+ 'class' => '\\Shopping\\Confirm',
+ 'action' => 'process',
+ 'template' => 'shopping_confirm',
+ ),
+ 'shopping/complete' => array(
+ 'class' => '\\Shopping\\Complete',
+ 'action' => 'process',
+ 'template' => 'shopping_complete',
+ ),
+ 'shopping/deliv' => array(
+ 'class' => '\\Shopping\\Deliv',
+ 'action' => 'process',
+ 'template' => 'shopping_deliv',
+ ),
+ 'shopping/load_payment_module' => array(
+ 'class' => '\\Shopping\\LoadPaymentModule',
+ 'action' => 'process',
+ 'template' => 'shopping_load_payment_module',
+ ),
+ 'shopping/multiple' => array(
+ 'class' => '\\Shopping\\Multiple',
+ 'action' => 'process',
+ 'template' => 'shopping_multiple',
+ ),
+ 'shopping/payment' => array(
+ 'class' => '\\Shopping\\Payment',
+ 'action' => 'process',
+ 'template' => 'shopping_payment',
+ ),
+ 'unsupported' => array(
+ 'class' => '\\Unsupported\\Index',
+ 'action' => 'process',
+ 'template' => 'unsupported',
+ ),
+ 'upgrade' => array(
+ 'class' => '\\Upgrade\\Index',
+ 'action' => 'process',
+ 'template' => 'upgrade',
+ ),
+ 'upgrade/download' => array(
+ 'class' => '\\Upgrade\\Index',
+ 'action' => 'process',
+ 'template' => 'upgrade_download',
+ ),
+ 'upgrade/products_list' => array(
+ 'class' => '\\Upgrade\\ProductsList',
+ 'action' => 'process',
+ 'template' => 'upgrade_products_list',
+ ),
+ 'upgrade/site_check' => array(
+ 'class' => '\\Upgrade\\SiteCheck',
+ 'action' => 'process',
+ 'template' => 'upgrade_site_check',
+ ),
+ 'input_zip' => array(
+ 'class' => 'InputZip',
+ 'action' => 'process',
+ 'template' => 'input_zip',
+ ),
+ 'resize_image' => array(
+ 'class' => 'ResizeImage',
+ 'action' => 'process',
+ 'template' => 'resize_image',
+ ),
+ 'sitemap' => array(
+ 'class' => 'Sitemap',
+ 'action' => 'process',
+ 'template' => 'sitemap',
+ ),
+
+// admin
+ 'admin/index' => array(
+ 'class' => '\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_index',
+ ),
+ 'admin/home' => array(
+ 'class' => '\\Home',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_home',
+ ),
+ 'admin/logout' => array(
+ 'class' => '\\Logout',
+ 'action' => 'action',
+ 'ssl' => true,
+ 'template' => 'admin_logout',
+ ),
+ 'admin/basis/' => array(
+ 'class' => '\\Basis\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis',
+ ),
+ 'admin/basis/delivery' => array(
+ 'class' => '\\Basis\\Delivery',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis_delivery',
+ ),
+ 'admin/basis/delivery_input' => array(
+ 'class' => '\\Basis\\DeliveryINput',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis_delivery_input',
+ ),
+ 'admin/basis/holiday' => array(
+ 'class' => '\\Basis\\Holiday',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => '',
+ ),
+ 'admin/basis/kiyaku' => array(
+ 'class' => '\\Basis\\Kiyaku',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis_kiyaku',
+ ),
+ 'admin/basis/mail' => array(
+ 'class' => '\\Basis\\Mail',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis_mail',
+ ),
+ 'admin/basis/payment' => array(
+ 'class' => '\\Basis\\Payment',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis_payment',
+ ),
+ 'admin/basis/payment_input' => array(
+ 'class' => '\\Basis\\PaymentInput',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis_payment_input',
+ ),
+ 'admin/basis/point' => array(
+ 'class' => '\\Basis\\Point',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis_point',
+ ),
+ 'admin/basis/tax' => array(
+ 'class' => '\\Basis\\Tax',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis_tax',
+ ),
+ 'admin/basis/tradelaw' => array(
+ 'class' => '\\Basis\\Tradelaw',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis_tradelaw',
+ ),
+ 'admin/basis/zip_install' => array(
+ 'class' => '\\Basis\\ZipInstall',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_basis_zip_install',
+ ),
+ 'admin/contents' => array(
+ 'class' => '\\Contents\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_contents',
+ ),
+ 'admin/contents/csv' => array(
+ 'class' => '\\Contents\\Csv',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_contents_csv',
+ ),
+ 'admin/contents/file_manager' => array(
+ 'class' => '\\Contents\\FileManager',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_contents_file_manager',
+ ),
+ 'admin/contents/file_view' => array(
+ 'class' => '\\Contents\\FileView',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_contentes_file_view',
+ ),
+ 'admin/contents/recommend' => array(
+ 'class' => '\\Contents\\Recommend',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_contents_recommend',
+ ),
+ 'admin/contents/recommend_search' => array(
+ 'class' => '\\Contents\\RecommendSearch',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_contents_recommend_search',
+ ),
+ 'admin/customer/index' => array(
+ 'class' => '\\Customer\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_customer',
+ ),
+ 'admin/customer/edit' => array(
+ 'class' => '\\Customer\\Edit',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_customer_edit',
+ ),
+ 'admin/customer/search_customer' => array(
+ 'class' => '\\Customer\\SearchCustomer',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_customer_search_customer',
+ ),
+ 'admin/design/' => array(
+ 'class' => '\\Design\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin/design',
+ ),
+ 'admin/design/bloc' => array(
+ 'class' => '\\Design\\Bloc',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_design_bloc',
+ ),
+ 'admin/design/css' => array(
+ 'class' => '\\Design\\Css',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_design_css',
+ ),
+ 'admin/design/header' => array(
+ 'class' => '\\Design\\Header',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_design_header',
+ ),
+ 'admin/design/main_edit' => array(
+ 'class' => '\\Design\\MainEdit',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_design_main_edit',
+ ),
+ 'admin/design/template' => array(
+ 'class' => '\\Design\\Template',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_design_template',
+ ),
+ 'admin/design/up_down' => array(
+ 'class' => '\\Design\\UpDown',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_design_up_down',
+ ),
+ 'admin/mail/' => array(
+ 'class' => '\\Mail\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_mail',
+ ),
+ 'admin/mail/history' => array(
+ 'class' => '\\Mail\\History',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_mail_history',
+ ),
+ 'admin/mail/preview' => array(
+ 'class' => '\\Mail\\Preview',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_mail_preview',
+ ),
+ 'admin/mail/template' => array(
+ 'class' => '\\Mail\\Template',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_mail_template',
+ ),
+ 'admin/mail/template_input' => array(
+ 'class' => '\\Mail\\TemplateInput',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_mail_template_input',
+ ),
+ 'admin/order/' => array(
+ 'class' => '\\Order\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_order',
+ ),
+ 'admin/order/disp' => array(
+ 'class' => '\\Order\\Disp',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_order_disp',
+ ),
+ 'admin/order/edit' => array(
+ 'class' => '\\Order\\Edit',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_order_edit',
+ ),
+ 'admin/order/mail' => array(
+ 'class' => '\\Order\\Mail',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_order_mail',
+ ),
+ 'admin/order/mail_view' => array(
+ 'class' => '\\Order\\MailView',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_order_mail_view',
+ ),
+ 'admin/order/multiple' => array(
+ 'class' => '\\Order\\Multiple',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_order_multiple',
+ ),
+ 'admin/order/pdf' => array(
+ 'class' => 'Pdf',
+ 'action' => '\\Order\\process',
+ 'ssl' => true,
+ 'template' => 'admin_order_pdf',
+ ),
+ 'admin/order/product_select' => array(
+ 'class' => '\\Order\\ProductSelect',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_order_product_select',
+ ),
+ 'admin/order/status' => array(
+ 'class' => '\\Order\\Status',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_order_status',
+ ),
+ 'admin/ownersstore/' => array(
+ 'class' => '\\Ownersstore\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_ownersstore',
+ ),
+ 'admin/ownersstore/log' => array(
+ 'class' => '\\Ownersstore\\Log',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_ownersstore_log',
+ ),
+ 'admin/ownersstore/module' => array(
+ 'class' => '\\Ownersstore\\Module',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_ownersstore_module',
+ ),
+ 'admin/ownersstore/plugin_hook_point_list' => array(
+ 'class' => '\\Ownersstore\\PluginHookPointList',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_ownersstore_plugin_hook_point_list',
+ ),
+ 'admin/ownersstore/settgings' => array(
+ 'class' => '\\Ownersstore\\Settings',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_ownersstore_settings',
+ ),
+ 'admin/products/' => array(
+ 'class' => '\\Products\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_products',
+ ),
+ 'admin/products/category' => array(
+ 'class' => '\\Products\\Category',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_products_category',
+ ),
+ 'admin/products/class_category' => array(
+ 'class' => '\\Products\\ClassCategory',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_products_class_category',
+ ),
+ 'admin/products/class_list' => array(
+ 'class' => '\\Products\\ClassList',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_products_class_list',
+ ),
+ 'admin/products/maker' => array(
+ 'class' => '\\Products\\Maker',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_products_maker',
+ ),
+ 'admin/products/product_class' => array(
+ 'class' => '\\Products\\ProductClass',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_products_product_class',
+ ),
+ 'admin/products/product' => array(
+ 'class' => '\\Products\\ProductEdit',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_products_product_edit',
+ ),
+ 'admin/products/product_rank' => array(
+ 'class' => '\\Products\\ProductRank',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_products_product_rank',
+ ),
+ 'admin/products/upload_csv' => array(
+ 'class' => '\\Products\\UploadCSV',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_products_upload_csv',
+ ),
+ 'admin/products/upload_csv_category' => array(
+ 'class' => '\\Products\\UploadCSVCategory',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_products_upload_csv_category',
+ ),
+ 'admin/system/' => array(
+ 'class' => '\\System\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system',
+ ),
+ 'admin/system/admin_area' => array(
+ 'class' => '\\System\\AdminArea',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system_admin_area',
+ ),
+ 'admin/system/bkup' => array(
+ 'class' => '\\System\\Bkup',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system_bkup',
+ ),
+ 'admin/system/delete' => array(
+ 'class' => '\\System\\Delete',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system_delete',
+ ),
+ 'admin/system/editdb' => array(
+ 'class' => '\\System\\Editdb',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system_editdb',
+ ),
+ 'admin/system/input' => array(
+ 'class' => '\\System\\Input',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system_input',
+ ),
+ 'admin/system/log' => array(
+ 'class' => '\\System\\Log',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system_log',
+ ),
+ 'admin/system/masterdata' => array(
+ 'class' => '\\System\\Masterdata',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system_masterdata',
+ ),
+ 'admin/system/parameter' => array(
+ 'class' => '\\System\\Parameter',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system_parameter',
+ ),
+ 'admin/system/rank' => array(
+ 'class' => '\\System\\Rank',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system_rank',
+ ),
+ 'admin/system/system' => array(
+ 'class' => '\\System\\System',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_system_system',
+ ),
+ 'admin/total/' => array(
+ 'class' => '\\Total\\Index',
+ 'action' => 'process',
+ 'ssl' => true,
+ 'template' => 'admin_total',
+ ),
+
+ );
+ }
+
+}
\ No newline at end of file
diff --git a/data/Eccube/Router.php b/data/Eccube/Router.php
new file mode 100644
index 00000000000..d2f0d4aff02
--- /dev/null
+++ b/data/Eccube/Router.php
@@ -0,0 +1,138 @@
+adminDir = (substr(ADMIN_DIR, -1) === '/' ) ? substr(ADMIN_DIR, 0, strlen(ADMIN_DIR) - 1) : ADMIN_DIR;
+ $this->method = ($_SERVER['REQUEST_METHOD']) ?: 'GET';
+ }
+
+ public function action()
+ {
+ // Routingするため値が変わってしまうので戻す
+ $url = parse_url($_SERVER['REQUEST_URI']);
+ $path = $url['path'];
+ /* 既存パス対応 */
+ if (end(split('\.', $path)) !== 'php') {
+ $path .= (substr($path, -1) === '/') ? 'index.php' : '.php';
+ }
+
+ $_SERVER['SCRIPT_NAME'] = $path;
+ $_SERVER['SCRIPT_FILENAME'] = $_SERVER['DOCUMENT_ROOT'] . $path;
+ $this->template = str_replace('.php', '', str_replace(ROOT_URLPATH, '', $path));
+
+ $settings = $this->getSettingsFromUrl();
+
+ $namespace = 'Eccube';
+ if ($this->isApi) {
+ $namespace .= '\\Api';
+ } else {
+ $namespace .= '\\Page';
+ }
+ if ($this->isAdmin) {
+ $namespace .= '\\Admin';
+ }
+ if (!empty($settings['class'])) {
+ $namespace .= $settings['class'];
+ }
+
+ $obj = new $namespace;
+ call_user_func(array($obj, 'init'));
+ call_user_func(array($obj, $settings['action']));
+
+ }
+
+ private function getSettingsFromUrl()
+ {
+ $map = RouteMap::getMap();
+ $this->isAdmin = strpos($this->template, $this->adminDir) !== FALSE;
+ $this->isApi = strpos($this->template, 'api/') !== FALSE;
+ $mapKey= 'index';
+ foreach ($map as $path => $settings) {
+ $pathes = array_filter(explode('/', $path));
+ $templates = array_filter(explode('/', $this->template));
+
+ $pathCount = count($pathes);
+ $tempCount = count($templates);
+
+ // URL構成が合わない定義は評価しない
+ if ($pathCount !== $tempCount) {
+ continue;
+ }
+
+ // methodが合わない定義は評価しない
+ $method = ($settings['method']) ?: "GET|POST";
+ $methods = explode('|', $method);
+ if (!in_array($this->method, $methods)) {
+ continue;
+ }
+ if ($this->isAdmin) {
+ $path = str_replace('admin', $this->adminDir, $path);
+ }
+ // 置換文字列がある場合、対応する値をGETパラメータに設定する
+ if (preg_match_all('/\/\[[^:\]]*(?::([^:\]]*+))?\]/', $path, $matches, PREG_SET_ORDER) > 0) {
+ $classPath = substr($path, 0, strpos($path, '/[:'));
+ $argsPath = substr($path, strpos($path, '/[:'), strlen($path));
+ $args = array_filter(explode('/', $argsPath));
+ if (strpos($this->template, $classPath) !== 0) {
+ continue;
+ }
+ $query = str_replace($classPath, '', $this->template);
+ $queries = array_filter(explode('/', $query));
+
+ foreach ($args as $argKey => $argVal) {
+ $argVal = str_replace(array('[:', ']'), array('', ''), $argVal);
+ $_REQUEST[$argVal] = $queries[$argKey];
+ }
+ $mapKey = $path;
+ } else {
+ if ($pathes == $templates) {
+ $mapKey = $path;
+ }
+ }
+ }
+ return $map[$mapKey];
+ }
+
+ private function getPathSettingsFromTemplate($templateKey)
+ {
+ $map = RouteMap::getMap();
+
+ foreach ($map as $path => $settings) {
+ if ($templateKey === $settings['template']) {
+ return array($$path, $settings);
+ }
+ }
+ }
+
+ public function generatePath($templateKey)
+ {
+ list($path) = $this->getPathSettingsFromTemplate($templateKey);
+ if (strpos($path, 'admin') === 0) {
+ $path = str_replace('admin', $this->adminDir, $path);
+ }
+ $path = $_SERVER['DOCUMENT_ROOT'] . ROOT_URLPATH . $path;
+ return $path;
+ }
+
+ public function generateUrl($templateKey)
+ {
+ list($path, $settings) = $this->getPathSettingsFromTemplate($templateKey);
+ $url = (isset($settings['ssl']) && $settings['ssl'] === true) ? HTTPS_URL : HTTP_URL;
+ if (strpos($path, 'admin') === 0) {
+ $url .= str_replace('admin', $this->adminDir, $path);
+ }
+ return $url;
+ }
+
+}
\ No newline at end of file
diff --git a/data/Smarty/templates/admin/main_frame.tpl b/data/Smarty/templates/admin/main_frame.tpl
index 759ae85ae9d..b2350b92a38 100644
--- a/data/Smarty/templates/admin/main_frame.tpl
+++ b/data/Smarty/templates/admin/main_frame.tpl
@@ -32,6 +32,7 @@
+
diff --git a/data/Smarty/templates/default/shopping/confirm.tpl b/data/Smarty/templates/default/shopping/confirm.tpl
index cbe6d6b4f37..a44404d8564 100644
--- a/data/Smarty/templates/default/shopping/confirm.tpl
+++ b/data/Smarty/templates/default/shopping/confirm.tpl
@@ -50,9 +50,7 @@
-
-
-
-
+
-
@@ -108,18 +106,8 @@
小計 |
- 円 |
+ 円 |
-
-
-
- 値引き(ポイントご使用時) |
-
-
- -円 |
-
-
-
送料 |
円 |
@@ -134,110 +122,69 @@
-
+
-
-
-
-
- ご注文前のポイント |
- Pt |
-
+
-
+
-
- ご注文者
-
-
-
+ 配送方法・お支払方法
+
+
+
-
- お名前 |
- |
-
-
- お名前(フリガナ) |
- |
-
-
- 会社名 |
- |
-
-
-
- 国 |
- |
-
-
- ZIPCODE |
- |
-
-
-
- 郵便番号 |
- 〒- |
-
-
- 住所 |
- |
-
-
- 電話番号 |
- -- |
-
-
- FAX番号 |
-
-
- --
-
- |
-
-
- メールアドレス |
- |
-
-
- 性別 |
- |
-
-
- 職業 |
- |
-
-
- 生年月日 |
-
-
- |
-
+
+ 配送方法 |
+
+
+
+
+
+
+
+
+
+ |
+
+
+ お支払方法 |
+
+
+
+
+ |
+
+ お届け先情報
+
+ 変更する
+
+
+
+
+
- お届け先
+ お届け先
-
-
-
+
+
- お名前 |
- |
-
-
- お名前(フリガナ) |
- |
-
-
- 会社名 |
- |
-
-
-
- 国 |
- |
-
-
- ZIPCODE |
- |
-
-
-
- 郵便番号 |
- 〒- |
-
-
- 住所 |
- |
-
-
- 電話番号 |
- -- |
-
-
- FAX番号 |
+ お届け先 |
+
+
+ ( )
+
+
+
+
+ 〒-
+
+
+
+ TEL:--
- --
+ FAX:--
|
+
お届け日 |
- |
-
-
- お届け時間 |
- |
+
+
+
+
+ お届け日:
+
+ ご指定頂けません。
+
+
+
+
+
+
+ お届け時間:
+
+ |
@@ -337,30 +281,27 @@
- 配送方法・お支払方法・その他お問い合わせ
-
-
-
-
-
- 配送方法 |
- |
-
-
- お支払方法 |
- |
-
-
- その他お問い合わせ |
- |
-
-
-
+
+
お問い合わせ
+
+
+
+
+ お問い合わせ |
+
+
+
+
+ (文字まで)
+ |
+
+
+
-
-
+
-
diff --git a/data/Smarty/templates/default/shopping/deliv.tpl b/data/Smarty/templates/default/shopping/deliv.tpl
index 4be04d7115e..9b842bbc0c4 100644
--- a/data/Smarty/templates/default/shopping/deliv.tpl
+++ b/data/Smarty/templates/default/shopping/deliv.tpl
@@ -35,14 +35,6 @@
※最大件まで登録できます。
-
-
-
この商品を複数の
お届け先に送りますか?
-
-
-
-
-
@@ -122,9 +114,7 @@
-
-
-
-
+
-
diff --git a/data/Smarty/templates/default/shopping/multiple.tpl b/data/Smarty/templates/default/shopping/multiple.tpl
index b428decd6ca..746d01d4874 100644
--- a/data/Smarty/templates/default/shopping/multiple.tpl
+++ b/data/Smarty/templates/default/shopping/multiple.tpl
@@ -20,6 +20,49 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*}-->
+
diff --git a/data/class_extends/SC_AdminView_Ex.php b/data/_class_extends/SC_AdminView_Ex.php
similarity index 100%
rename from data/class_extends/SC_AdminView_Ex.php
rename to data/_class_extends/SC_AdminView_Ex.php
diff --git a/data/class_extends/SC_Batch_Ex.php b/data/_class_extends/SC_Batch_Ex.php
similarity index 100%
rename from data/class_extends/SC_Batch_Ex.php
rename to data/_class_extends/SC_Batch_Ex.php
diff --git a/data/class_extends/SC_Cache_Ex.php b/data/_class_extends/SC_Cache_Ex.php
similarity index 100%
rename from data/class_extends/SC_Cache_Ex.php
rename to data/_class_extends/SC_Cache_Ex.php
diff --git a/data/class_extends/SC_CartSession_Ex.php b/data/_class_extends/SC_CartSession_Ex.php
similarity index 100%
rename from data/class_extends/SC_CartSession_Ex.php
rename to data/_class_extends/SC_CartSession_Ex.php
diff --git a/data/class_extends/SC_CheckError_Ex.php b/data/_class_extends/SC_CheckError_Ex.php
similarity index 100%
rename from data/class_extends/SC_CheckError_Ex.php
rename to data/_class_extends/SC_CheckError_Ex.php
diff --git a/data/class_extends/SC_ClassAutoloader_Ex.php b/data/_class_extends/SC_ClassAutoloader_Ex.php
similarity index 100%
rename from data/class_extends/SC_ClassAutoloader_Ex.php
rename to data/_class_extends/SC_ClassAutoloader_Ex.php
diff --git a/data/class_extends/SC_Cookie_Ex.php b/data/_class_extends/SC_Cookie_Ex.php
similarity index 100%
rename from data/class_extends/SC_Cookie_Ex.php
rename to data/_class_extends/SC_Cookie_Ex.php
diff --git a/data/class_extends/SC_CustomerList_Ex.php b/data/_class_extends/SC_CustomerList_Ex.php
similarity index 100%
rename from data/class_extends/SC_CustomerList_Ex.php
rename to data/_class_extends/SC_CustomerList_Ex.php
diff --git a/data/class_extends/SC_Customer_Ex.php b/data/_class_extends/SC_Customer_Ex.php
similarity index 100%
rename from data/class_extends/SC_Customer_Ex.php
rename to data/_class_extends/SC_Customer_Ex.php
diff --git a/data/class_extends/SC_Date_Ex.php b/data/_class_extends/SC_Date_Ex.php
similarity index 100%
rename from data/class_extends/SC_Date_Ex.php
rename to data/_class_extends/SC_Date_Ex.php
diff --git a/data/class_extends/SC_Display_Ex.php b/data/_class_extends/SC_Display_Ex.php
similarity index 100%
rename from data/class_extends/SC_Display_Ex.php
rename to data/_class_extends/SC_Display_Ex.php
diff --git a/data/class_extends/SC_FormParam_Ex.php b/data/_class_extends/SC_FormParam_Ex.php
similarity index 100%
rename from data/class_extends/SC_FormParam_Ex.php
rename to data/_class_extends/SC_FormParam_Ex.php
diff --git a/data/class_extends/SC_Fpdf_Ex.php b/data/_class_extends/SC_Fpdf_Ex.php
similarity index 100%
rename from data/class_extends/SC_Fpdf_Ex.php
rename to data/_class_extends/SC_Fpdf_Ex.php
diff --git a/data/class_extends/SC_Image_Ex.php b/data/_class_extends/SC_Image_Ex.php
similarity index 100%
rename from data/class_extends/SC_Image_Ex.php
rename to data/_class_extends/SC_Image_Ex.php
diff --git a/data/class_extends/SC_Initial_Ex.php b/data/_class_extends/SC_Initial_Ex.php
similarity index 100%
rename from data/class_extends/SC_Initial_Ex.php
rename to data/_class_extends/SC_Initial_Ex.php
diff --git a/data/class_extends/SC_InstallView_Ex.php b/data/_class_extends/SC_InstallView_Ex.php
similarity index 100%
rename from data/class_extends/SC_InstallView_Ex.php
rename to data/_class_extends/SC_InstallView_Ex.php
diff --git a/data/class_extends/SC_MobileEmoji_Ex.php b/data/_class_extends/SC_MobileEmoji_Ex.php
similarity index 100%
rename from data/class_extends/SC_MobileEmoji_Ex.php
rename to data/_class_extends/SC_MobileEmoji_Ex.php
diff --git a/data/class_extends/SC_MobileImage_Ex.php b/data/_class_extends/SC_MobileImage_Ex.php
similarity index 100%
rename from data/class_extends/SC_MobileImage_Ex.php
rename to data/_class_extends/SC_MobileImage_Ex.php
diff --git a/data/class_extends/SC_MobileUserAgent_Ex.php b/data/_class_extends/SC_MobileUserAgent_Ex.php
similarity index 100%
rename from data/class_extends/SC_MobileUserAgent_Ex.php
rename to data/_class_extends/SC_MobileUserAgent_Ex.php
diff --git a/data/class_extends/SC_MobileView_Ex.php b/data/_class_extends/SC_MobileView_Ex.php
similarity index 100%
rename from data/class_extends/SC_MobileView_Ex.php
rename to data/_class_extends/SC_MobileView_Ex.php
diff --git a/data/class_extends/SC_PageNavi_Ex.php b/data/_class_extends/SC_PageNavi_Ex.php
similarity index 100%
rename from data/class_extends/SC_PageNavi_Ex.php
rename to data/_class_extends/SC_PageNavi_Ex.php
diff --git a/data/class_extends/SC_Product_Ex.php b/data/_class_extends/SC_Product_Ex.php
similarity index 100%
rename from data/class_extends/SC_Product_Ex.php
rename to data/_class_extends/SC_Product_Ex.php
diff --git a/data/class_extends/SC_Query_Ex.php b/data/_class_extends/SC_Query_Ex.php
similarity index 100%
rename from data/class_extends/SC_Query_Ex.php
rename to data/_class_extends/SC_Query_Ex.php
diff --git a/data/class_extends/SC_Response_Ex.php b/data/_class_extends/SC_Response_Ex.php
similarity index 100%
rename from data/class_extends/SC_Response_Ex.php
rename to data/_class_extends/SC_Response_Ex.php
diff --git a/data/class_extends/SC_SelectSql_Ex.php b/data/_class_extends/SC_SelectSql_Ex.php
similarity index 100%
rename from data/class_extends/SC_SelectSql_Ex.php
rename to data/_class_extends/SC_SelectSql_Ex.php
diff --git a/data/class_extends/SC_SendMail_Ex.php b/data/_class_extends/SC_SendMail_Ex.php
similarity index 100%
rename from data/class_extends/SC_SendMail_Ex.php
rename to data/_class_extends/SC_SendMail_Ex.php
diff --git a/data/class_extends/SC_SessionFactory_Ex.php b/data/_class_extends/SC_SessionFactory_Ex.php
similarity index 100%
rename from data/class_extends/SC_SessionFactory_Ex.php
rename to data/_class_extends/SC_SessionFactory_Ex.php
diff --git a/data/class_extends/SC_Session_Ex.php b/data/_class_extends/SC_Session_Ex.php
similarity index 100%
rename from data/class_extends/SC_Session_Ex.php
rename to data/_class_extends/SC_Session_Ex.php
diff --git a/data/class_extends/SC_SiteSession_Ex.php b/data/_class_extends/SC_SiteSession_Ex.php
similarity index 100%
rename from data/class_extends/SC_SiteSession_Ex.php
rename to data/_class_extends/SC_SiteSession_Ex.php
diff --git a/data/class_extends/SC_SiteView_Ex.php b/data/_class_extends/SC_SiteView_Ex.php
similarity index 100%
rename from data/class_extends/SC_SiteView_Ex.php
rename to data/_class_extends/SC_SiteView_Ex.php
diff --git a/data/class_extends/SC_SmartphoneUserAgent_Ex.php b/data/_class_extends/SC_SmartphoneUserAgent_Ex.php
similarity index 100%
rename from data/class_extends/SC_SmartphoneUserAgent_Ex.php
rename to data/_class_extends/SC_SmartphoneUserAgent_Ex.php
diff --git a/data/class_extends/SC_SmartphoneView_Ex.php b/data/_class_extends/SC_SmartphoneView_Ex.php
similarity index 100%
rename from data/class_extends/SC_SmartphoneView_Ex.php
rename to data/_class_extends/SC_SmartphoneView_Ex.php
diff --git a/data/class_extends/SC_UploadFile_Ex.php b/data/_class_extends/SC_UploadFile_Ex.php
similarity index 100%
rename from data/class_extends/SC_UploadFile_Ex.php
rename to data/_class_extends/SC_UploadFile_Ex.php
diff --git a/data/class_extends/SC_View_Ex.php b/data/_class_extends/SC_View_Ex.php
similarity index 100%
rename from data/class_extends/SC_View_Ex.php
rename to data/_class_extends/SC_View_Ex.php
diff --git a/data/class_extends/api_extends/SC_Api_Abstract_Ex.php b/data/_class_extends/api_extends/SC_Api_Abstract_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/SC_Api_Abstract_Ex.php
rename to data/_class_extends/api_extends/SC_Api_Abstract_Ex.php
diff --git a/data/class_extends/api_extends/SC_Api_Operation_Ex.php b/data/_class_extends/api_extends/SC_Api_Operation_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/SC_Api_Operation_Ex.php
rename to data/_class_extends/api_extends/SC_Api_Operation_Ex.php
diff --git a/data/class_extends/api_extends/SC_Api_Utils_Ex.php b/data/_class_extends/api_extends/SC_Api_Utils_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/SC_Api_Utils_Ex.php
rename to data/_class_extends/api_extends/SC_Api_Utils_Ex.php
diff --git a/data/class_extends/api_extends/operations/AddrFromZip_Ex.php b/data/_class_extends/api_extends/operations/AddrFromZip_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/AddrFromZip_Ex.php
rename to data/_class_extends/api_extends/operations/AddrFromZip_Ex.php
diff --git a/data/class_extends/api_extends/operations/BrowseNodeLookup_Ex.php b/data/_class_extends/api_extends/operations/BrowseNodeLookup_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/BrowseNodeLookup_Ex.php
rename to data/_class_extends/api_extends/operations/BrowseNodeLookup_Ex.php
diff --git a/data/class_extends/api_extends/operations/CartAdd_Ex.php b/data/_class_extends/api_extends/operations/CartAdd_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/CartAdd_Ex.php
rename to data/_class_extends/api_extends/operations/CartAdd_Ex.php
diff --git a/data/class_extends/api_extends/operations/CartClear_Ex.php b/data/_class_extends/api_extends/operations/CartClear_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/CartClear_Ex.php
rename to data/_class_extends/api_extends/operations/CartClear_Ex.php
diff --git a/data/class_extends/api_extends/operations/CartCreate_Ex.php b/data/_class_extends/api_extends/operations/CartCreate_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/CartCreate_Ex.php
rename to data/_class_extends/api_extends/operations/CartCreate_Ex.php
diff --git a/data/class_extends/api_extends/operations/CartGet_Ex.php b/data/_class_extends/api_extends/operations/CartGet_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/CartGet_Ex.php
rename to data/_class_extends/api_extends/operations/CartGet_Ex.php
diff --git a/data/class_extends/api_extends/operations/CartModify_Ex.php b/data/_class_extends/api_extends/operations/CartModify_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/CartModify_Ex.php
rename to data/_class_extends/api_extends/operations/CartModify_Ex.php
diff --git a/data/class_extends/api_extends/operations/Default_Ex.php b/data/_class_extends/api_extends/operations/Default_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/Default_Ex.php
rename to data/_class_extends/api_extends/operations/Default_Ex.php
diff --git a/data/class_extends/api_extends/operations/GetVersion_Ex.php b/data/_class_extends/api_extends/operations/GetVersion_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/GetVersion_Ex.php
rename to data/_class_extends/api_extends/operations/GetVersion_Ex.php
diff --git a/data/class_extends/api_extends/operations/ItemLookup_Ex.php b/data/_class_extends/api_extends/operations/ItemLookup_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/ItemLookup_Ex.php
rename to data/_class_extends/api_extends/operations/ItemLookup_Ex.php
diff --git a/data/class_extends/api_extends/operations/ItemSearch_Ex.php b/data/_class_extends/api_extends/operations/ItemSearch_Ex.php
similarity index 100%
rename from data/class_extends/api_extends/operations/ItemSearch_Ex.php
rename to data/_class_extends/api_extends/operations/ItemSearch_Ex.php
diff --git a/data/class_extends/batch_extends/SC_Batch_Update_Ex.php b/data/_class_extends/batch_extends/SC_Batch_Update_Ex.php
similarity index 100%
rename from data/class_extends/batch_extends/SC_Batch_Update_Ex.php
rename to data/_class_extends/batch_extends/SC_Batch_Update_Ex.php
diff --git a/data/class_extends/db_extends/SC_DB_DBFactory_Ex.php b/data/_class_extends/db_extends/SC_DB_DBFactory_Ex.php
similarity index 100%
rename from data/class_extends/db_extends/SC_DB_DBFactory_Ex.php
rename to data/_class_extends/db_extends/SC_DB_DBFactory_Ex.php
diff --git a/data/class_extends/db_extends/SC_DB_MasterData_Ex.php b/data/_class_extends/db_extends/SC_DB_MasterData_Ex.php
similarity index 100%
rename from data/class_extends/db_extends/SC_DB_MasterData_Ex.php
rename to data/_class_extends/db_extends/SC_DB_MasterData_Ex.php
diff --git a/data/class_extends/db_extends/dbfactory/SC_DB_DBFactory_MYSQL_Ex.php b/data/_class_extends/db_extends/dbfactory/SC_DB_DBFactory_MYSQL_Ex.php
similarity index 100%
rename from data/class_extends/db_extends/dbfactory/SC_DB_DBFactory_MYSQL_Ex.php
rename to data/_class_extends/db_extends/dbfactory/SC_DB_DBFactory_MYSQL_Ex.php
diff --git a/data/class_extends/db_extends/dbfactory/SC_DB_DBFactory_PGSQL_Ex.php b/data/_class_extends/db_extends/dbfactory/SC_DB_DBFactory_PGSQL_Ex.php
similarity index 100%
rename from data/class_extends/db_extends/dbfactory/SC_DB_DBFactory_PGSQL_Ex.php
rename to data/_class_extends/db_extends/dbfactory/SC_DB_DBFactory_PGSQL_Ex.php
diff --git a/data/class_extends/graph_extends/SC_Graph_Bar_Ex.php b/data/_class_extends/graph_extends/SC_Graph_Bar_Ex.php
similarity index 100%
rename from data/class_extends/graph_extends/SC_Graph_Bar_Ex.php
rename to data/_class_extends/graph_extends/SC_Graph_Bar_Ex.php
diff --git a/data/class_extends/graph_extends/SC_Graph_Base_Ex.php b/data/_class_extends/graph_extends/SC_Graph_Base_Ex.php
similarity index 100%
rename from data/class_extends/graph_extends/SC_Graph_Base_Ex.php
rename to data/_class_extends/graph_extends/SC_Graph_Base_Ex.php
diff --git a/data/class_extends/graph_extends/SC_Graph_Line_Ex.php b/data/_class_extends/graph_extends/SC_Graph_Line_Ex.php
similarity index 100%
rename from data/class_extends/graph_extends/SC_Graph_Line_Ex.php
rename to data/_class_extends/graph_extends/SC_Graph_Line_Ex.php
diff --git a/data/class_extends/graph_extends/SC_Graph_Pie_Ex.php b/data/_class_extends/graph_extends/SC_Graph_Pie_Ex.php
similarity index 100%
rename from data/class_extends/graph_extends/SC_Graph_Pie_Ex.php
rename to data/_class_extends/graph_extends/SC_Graph_Pie_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_Address_Ex.php b/data/_class_extends/helper_extends/SC_Helper_Address_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_Address_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_Address_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_BestProducts_Ex.php b/data/_class_extends/helper_extends/SC_Helper_BestProducts_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_BestProducts_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_BestProducts_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_Bloc_Ex.php b/data/_class_extends/helper_extends/SC_Helper_Bloc_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_Bloc_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_Bloc_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_CSV_Ex.php b/data/_class_extends/helper_extends/SC_Helper_CSV_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_CSV_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_CSV_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_Category_Ex.php b/data/_class_extends/helper_extends/SC_Helper_Category_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_Category_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_Category_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_Customer_Ex.php b/data/_class_extends/helper_extends/SC_Helper_Customer_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_Customer_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_Customer_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_DB_Ex.php b/data/_class_extends/helper_extends/SC_Helper_DB_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_DB_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_DB_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_Delivery_Ex.php b/data/_class_extends/helper_extends/SC_Helper_Delivery_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_Delivery_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_Delivery_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_FPDI_Ex.php b/data/_class_extends/helper_extends/SC_Helper_FPDI_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_FPDI_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_FPDI_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_FileManager_Ex.php b/data/_class_extends/helper_extends/SC_Helper_FileManager_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_FileManager_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_FileManager_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_HandleError_Ex.php b/data/_class_extends/helper_extends/SC_Helper_HandleError_Ex.php
similarity index 100%
rename from data/class_extends/helper_extends/SC_Helper_HandleError_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_HandleError_Ex.php
diff --git a/data/class_extends/helper_extends/SC_Helper_Holiday_Ex.php b/data/_class_extends/helper_extends/SC_Helper_Holiday_Ex.php
similarity index 96%
rename from data/class_extends/helper_extends/SC_Helper_Holiday_Ex.php
rename to data/_class_extends/helper_extends/SC_Helper_Holiday_Ex.php
index fadf69a79e6..d0306d3849b 100644
--- a/data/class_extends/helper_extends/SC_Helper_Holiday_Ex.php
+++ b/data/_class_extends/helper_extends/SC_Helper_Holiday_Ex.php
@@ -1,38 +1,38 @@
->>>>>> e96c4c175cdfde99ea5b44f68bd09ada46bac4c3
-SC_Helper_HandleError_Ex::load();
+Eccube\Common\Helper\HandleErrorHelper::load();
+//SC_Helper_HandleError_Ex::load();
// アプリケーション初期化処理
-$objInit = new SC_Initial_Ex();
+$objInit = new Eccube\Common\Initial();
$objInit->init();
-
diff --git a/data/class/SC_Batch.php b/data/class/SC_Batch.php
deleted file mode 100644
index 0c6714449da..00000000000
--- a/data/class/SC_Batch.php
+++ /dev/null
@@ -1,42 +0,0 @@
-_smarty->template_dir = realpath($template_dir);
- $this->_smarty->compile_dir = realpath($compile_dir);
- }
-}
diff --git a/data/class/SC_MobileEmoji.php b/data/class/SC_MobileEmoji.php
deleted file mode 100644
index f3fa1c75dd8..00000000000
--- a/data/class/SC_MobileEmoji.php
+++ /dev/null
@@ -1,69 +0,0 @@
-_smarty->template_dir = realpath(MOBILE_TEMPLATE_REALDIR);
- $this->_smarty->compile_dir = realpath(MOBILE_COMPILE_REALDIR);
- $this->assignTemplatePath(DEVICE_TYPE_MOBILE);
- }
-}
diff --git a/data/class/SC_SmartphoneView.php b/data/class/SC_SmartphoneView.php
deleted file mode 100644
index 44c379b225b..00000000000
--- a/data/class/SC_SmartphoneView.php
+++ /dev/null
@@ -1,39 +0,0 @@
-_smarty->template_dir = realpath(SMARTPHONE_TEMPLATE_REALDIR);
- $this->_smarty->compile_dir = realpath(SMARTPHONE_COMPILE_REALDIR);
- $this->assignTemplatePath(DEVICE_TYPE_SMARTPHONE);
- }
-}
diff --git a/data/class/pages/LC_Page_Index.php b/data/class/pages/LC_Page_Index.php
deleted file mode 100644
index c46ec0f33a1..00000000000
--- a/data/class/pages/LC_Page_Index.php
+++ /dev/null
@@ -1,72 +0,0 @@
-action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- //決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
- $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
-
- $this->tpl_title = '';
- $objCustomer = new SC_Customer_Ex();
- $this->isLogin = $objCustomer->isLoginSuccess(true);
- }
-}
diff --git a/data/class/pages/abouts/LC_Page_Abouts.php b/data/class/pages/abouts/LC_Page_Abouts.php
deleted file mode 100644
index 73870d7d620..00000000000
--- a/data/class/pages/abouts/LC_Page_Abouts.php
+++ /dev/null
@@ -1,68 +0,0 @@
-tpl_title = '当サイトについて';
- $masterData = new SC_DB_MasterData_Ex();
- $this->arrPref = $masterData->getMasterData('mtb_pref');
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- parent::process();
- $this->action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- }
-}
diff --git a/data/class/pages/admin/LC_Page_Admin_Logout.php b/data/class/pages/admin/LC_Page_Admin_Logout.php
deleted file mode 100644
index a5e99e50825..00000000000
--- a/data/class/pages/admin/LC_Page_Admin_Logout.php
+++ /dev/null
@@ -1,78 +0,0 @@
-action();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- $this->lfDoLogout();
-
- // ログイン画面に遷移
- SC_Response_Ex::sendRedirectFromUrlPath(ADMIN_DIR . DIR_INDEX_PATH);
- }
-
- /**
- * ログアウト処理
- *
- * @return void
- */
- public function lfDoLogout()
- {
- $objSess = new SC_Session_Ex();
- $objSess->logout();
- }
-}
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_Review.php b/data/class/pages/admin/products/LC_Page_Admin_Products_Review.php
deleted file mode 100644
index 092c7aae044..00000000000
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_Review.php
+++ /dev/null
@@ -1,415 +0,0 @@
-tpl_mainpage = 'products/review.tpl';
- $this->tpl_mainno = 'products';
- $this->tpl_subno = 'review';
- $this->tpl_pager = 'pager.tpl';
- $this->tpl_maintitle = '商品管理';
- $this->tpl_subtitle = 'レビュー管理';
-
- $masterData = new SC_DB_MasterData_Ex();
- $this->arrPageMax = $masterData->getMasterData('mtb_page_max');
- $this->arrRECOMMEND = $masterData->getMasterData('mtb_recommend');
- $this->arrSex = $masterData->getMasterData('mtb_sex');
-
- $objDate = new SC_Date_Ex();
- // 登録・更新検索開始年
- $objDate->setStartYear(RELEASE_YEAR);
- $objDate->setEndYear(DATE('Y'));
- $this->arrStartYear = $objDate->getYear();
- $this->arrStartMonth = $objDate->getMonth();
- $this->arrStartDay = $objDate->getDay();
- // 登録・更新検索終了年
- $objDate->setStartYear(RELEASE_YEAR);
- $objDate->setEndYear(DATE('Y'));
- $this->arrEndYear = $objDate->getYear();
- $this->arrEndMonth = $objDate->getMonth();
- $this->arrEndDay = $objDate->getDay();
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- $this->action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- $objReview = new SC_Helper_Review_Ex();
- // パラメーター管理クラス
- $objFormParam = new SC_FormParam_Ex();
- $this->lfInitParam($objFormParam);
- $objFormParam->setParam($_POST);
- $objFormParam->convParam();
- // URLを小文字に変換
- $objFormParam->toLower('search_reviewer_url');
-
- $this->arrForm = $objFormParam->getHashArray();
- $this->arrHidden = $this->lfSetHidden($this->arrForm);
-
- // 入力パラメーターチェック
- $this->arrErr = $this->lfCheckError($objFormParam);
- if (!SC_Utils_Ex::isBlank($this->arrErr)) {
- return;
- }
-
- switch ($this->getMode()) {
- case 'delete':
- $objReview->delete($this->arrForm['review_id']);
- case 'search':
- case 'csv':
-
- // 検索結果を取得
- $this->arrReview = $this->lfGetReview($objReview);
-
- //CSVダウンロード
- if ($this->getMode() == 'csv') {
- // 検索条件を取得
- list($where, $arrWhereVal) = $this->lfGetWhere($this->arrForm);
- $this->lfDoOutputCsv($where, $arrWhereVal);
-
- SC_Response_Ex::actionExit();
- }
-
- break;
- default:
- break;
- }
-
- }
-
- /**
- * 入力内容のチェックを行う.
- *
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @return void
- */
- public function lfCheckError(&$objFormParam)
- {
- // 入力データを渡す。
- $arrRet = $objFormParam->getHashArray();
- $objErr = new SC_CheckError_Ex($arrRet);
- $objErr->arrErr = $objFormParam->checkError();
-
- switch ($this->getMode()) {
- case 'search':
- $objErr->doFunc(array('開始日', 'search_startyear', 'search_startmonth', 'search_startday'), array('CHECK_DATE'));
- $objErr->doFunc(array('終了日', 'search_endyear', 'search_endmonth', 'search_endday'), array('CHECK_DATE'));
- $objErr->doFunc(array('開始日', '終了日', 'search_startyear', 'search_startmonth', 'search_startday', 'search_endyear', 'search_endmonth', 'search_endday'), array('CHECK_SET_TERM'));
- break;
-
- case 'complete':
- $objErr->doFunc(array('おすすめレベル', 'recommend_level'), array('SELECT_CHECK'));
- $objErr->doFunc(array('タイトル', 'title', STEXT_LEN), array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
- $objErr->doFunc(array('コメント', 'comment', LTEXT_LEN), array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
- break;
- default:
- break;
- }
-
- return $objErr->arrErr;
- }
-
- /**
- * hidden情報の作成
- *
- * @param array $arrForm フォームデータ
- * @return array hidden情報
- */
- public function lfSetHidden($arrForm)
- {
- $arrHidden = array();
- foreach ($arrForm AS $key=>$val) {
- if (preg_match('/^search_/', $key)) {
- switch ($key) {
- case 'search_sex':
- $arrHidden[$key] = SC_Utils_Ex::sfMergeParamCheckBoxes($val);
- if (!is_array($val)) {
- $arrForm[$key] = explode('-', $val);
- }
- break;
- default:
- $arrHidden[$key] = $val;
- break;
- }
- }
- }
-
- return $arrHidden;
- }
-
- /**
- * パラメーター情報の初期化を行う.
- *
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @return void
- */
- public function lfInitParam(&$objFormParam)
- {
- $objFormParam->addParam('投稿者名', 'search_reviewer_name', STEXT_LEN, 'KVas', array('MAX_LENGTH_CHECK'), '', false);
- $objFormParam->addParam('投稿者URL', 'search_reviewer_url', STEXT_LEN, 'KVas', array('MAX_LENGTH_CHECK'), '', false);
- $objFormParam->addParam('商品名', 'search_name', STEXT_LEN, 'KVas', array('MAX_LENGTH_CHECK'), '', false);
- $objFormParam->addParam('商品コード', 'search_product_code', STEXT_LEN, 'KVas', array('MAX_LENGTH_CHECK'), '', false);
- $objFormParam->addParam('性別', 'search_sex', INT_LEN, 'n', array('MAX_LENGTH_CHECK'), '', false);
- $objFormParam->addParam('おすすめレベル', 'search_recommend_level', INT_LEN, 'n', array('MAX_LENGTH_CHECK'), '', false);
- $objFormParam->addParam('投稿年', 'search_startyear', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '', false);
- $objFormParam->addParam('投稿月', 'search_startmonth', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '', false);
- $objFormParam->addParam('投稿日', 'search_startday', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '', false);
- $objFormParam->addParam('投稿年', 'search_endyear', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '', false);
- $objFormParam->addParam('投稿月', 'search_endmonth', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '', false);
- $objFormParam->addParam('投稿日', 'search_endday', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'), '', false);
- $objFormParam->addParam('最大表示件数', 'search_page_max', INT_LEN, 'n', array('MAX_LENGTH_CHECK'), '', false);
- $objFormParam->addParam('ページ番号件数', 'search_pageno', INT_LEN, 'n', array('MAX_LENGTH_CHECK'), '', false);
- $objFormParam->addParam('レビューID', 'review_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK'), '', false);
- }
-
- /**
- * CSV ファイル出力実行
- *
- * @param string $where WHERE文
- * @param array $arrWhereVal WHERE文の判定値
- * @return void
- */
- public function lfDoOutputCsv($where, $arrWhereVal)
- {
- $objCSV = new SC_Helper_CSV_Ex();
- $objCSV->sfDownloadCsv('4', $where, $arrWhereVal, '', true);
- }
-
- /**
- * WHERE文の作成
- *
- * @param array $arrForm フォームデータ
- * @return array WHERE文、判定値
- */
- public function lfGetWhere($arrForm)
- {
- //削除されていない商品を検索
- $where = 'A.del_flg = 0 AND B.del_flg = 0';
- $arrWhereVal = array();
-
- foreach ($arrForm AS $key=>$val) {
- if (empty($val)) continue;
-
- switch ($key) {
- case 'search_reviewer_name':
- $val = preg_replace('/ /', '%', $val);
- $where.= ' AND reviewer_name LIKE ? ';
- $arrWhereVal[] = "%$val%";
- break;
-
- case 'search_reviewer_url':
- $val = preg_replace('/ /', '%', $val);
- $where.= ' AND reviewer_url LIKE ? ';
- $arrWhereVal[] = "%$val%";
- break;
-
- case 'search_name':
- $val = preg_replace('/ /', '%', $val);
- $where.= ' AND name LIKE ? ';
- $arrWhereVal[] = "%$val%";
- break;
-
- case 'search_product_code':
- $val = preg_replace('/ /', '%', $val);
- $where.= ' AND A.product_id IN (SELECT product_id FROM dtb_products_class WHERE product_code LIKE ?)';
- $arrWhereVal[] = "%$val%";
- break;
-
- case 'search_sex':
- $tmp_where = '';
- //$val=配列の中身,$element=各キーの値(1,2)
- if (is_array($val)) {
- foreach ($val as $element) {
- if ($element != '') {
- if ($tmp_where == '') {
- $tmp_where .= ' AND (sex = ?';
- } else {
- $tmp_where .= ' OR sex = ?';
- }
- $arrWhereVal[] = $element;
- }
- }
- if ($tmp_where != '') {
- $tmp_where .= ')';
- $where .= " $tmp_where ";
- }
- }
-
- break;
-
- case 'search_recommend_level':
- $where.= ' AND recommend_level = ? ';
- $arrWhereVal[] = $val;
- break;
-
- case 'search_startyear':
- if (isset($_POST['search_startyear']) && isset($_POST['search_startmonth']) && isset($_POST['search_startday'])) {
- $date = SC_Utils_Ex::sfGetTimestamp($_POST['search_startyear'], $_POST['search_startmonth'], $_POST['search_startday']);
- $where.= ' AND A.create_date >= ? ';
- $arrWhereVal[] = $date;
- }
- break;
-
- case 'search_endyear':
- if (isset($_POST['search_startyear']) && isset($_POST['search_startmonth']) && isset($_POST['search_startday'])) {
- $date = SC_Utils_Ex::sfGetTimestamp($_POST['search_endyear'], $_POST['search_endmonth'], $_POST['search_endday']);
- $end_date = date('Y/m/d', strtotime('1 day', strtotime($date)));
- $where.= " AND A.create_date <= cast('$end_date' as date) ";
- }
- break;
-
- default:
- break;
- }
-
- }
-
- return array($where, $arrWhereVal);
- }
-
- /**
- * レビュー検索結果の取得
- *
- * @param SC_Helper_Review $objReview
- * @return array レビュー一覧
- */
- public function lfGetReview(SC_Helper_Review $objReview)
- {
- $arrForm = $this->arrForm;
-
- $query = $this->makeQuery($arrForm);
- $linemax = $objReview->count($query);
-
- $this->tpl_linemax = $linemax;
- $this->tpl_pageno = isset($arrForm['search_pageno']) ? $arrForm['search_pageno'] : '';
-
- // ページ送りの取得
- $page_max = SC_Utils_Ex::sfGetSearchPageMax($arrForm['search_page_max']);
- $objNavi = new SC_PageNavi_Ex($this->tpl_pageno, $linemax, $page_max,
- 'eccube.moveNaviPage', NAVI_PMAX);
- $this->arrPagenavi = $objNavi->arrPagenavi;
- $startno = $objNavi->start_row;
-
- // 取得範囲の指定(開始行番号、行数のセット)
- $params = array(
- 'query' => $query,
- 'limit' => $page_max,
- 'offset' => $startno
- );
- $arrReview = $objReview->find($params);
-
- return $arrReview;
- }
-
- /**
- * SC_Helper_Reviewインスタンスへ渡す検索条件の配列を作成.
- *
- * @param array $data
- * @return array
- */
- private function makeQuery($data = array()) {
- $query = array();
-
- foreach ($data AS $key => $val) {
- if (empty($val)) continue;
-
- switch ($key) {
- case 'search_reviewer_name':
- $query['reviewer_name'] = $val;
- break;
-
- case 'search_reviewer_url':
- $query['reviewer_url'] = $val;
- break;
-
- case 'search_name':
- $query['product_name'] = $val;
- break;
-
- case 'search_product_code':
- $query['product_code'] = $val;
- break;
-
- case 'search_sex':
- $query['reviewer_sex'] = $val;
- break;
-
- case 'search_recommend_level':
- $query['recommend_level'] = $val;
- break;
-
- case 'search_startyear':
- if (isset($_POST['search_startyear']) && isset($_POST['search_startmonth']) && isset($_POST['search_startday'])) {
- $date = SC_Utils_Ex::sfGetTimestamp($_POST['search_startyear'], $_POST['search_startmonth'], $_POST['search_startday']);
- $query['date_from'] = $date;
- }
- break;
-
- case 'search_endyear':
- if (isset($_POST['search_startyear']) && isset($_POST['search_startmonth']) && isset($_POST['search_startday'])) {
- $date = SC_Utils_Ex::sfGetTimestamp($_POST['search_endyear'], $_POST['search_endmonth'], $_POST['search_endday']);
- $end_date = date('Y/m/d', strtotime('1 day', strtotime($date)));
- $query['date_to'] = $end_date;
- }
- break;
-
- default:
- break;
- }
-
- }
-
- return $query;
- }
-}
diff --git a/data/class/pages/admin/products/LC_Page_Admin_Products_ReviewEdit.php b/data/class/pages/admin/products/LC_Page_Admin_Products_ReviewEdit.php
deleted file mode 100644
index 70e3495cd72..00000000000
--- a/data/class/pages/admin/products/LC_Page_Admin_Products_ReviewEdit.php
+++ /dev/null
@@ -1,129 +0,0 @@
-tpl_mainpage = 'products/review_edit.tpl';
- $this->tpl_mainno = 'products';
- $this->tpl_subno = 'review';
- // 両方選択可能
- $this->tpl_status_change = true;
-
- $masterData = new SC_DB_MasterData_Ex();
- $this->arrRECOMMEND = $masterData->getMasterData('mtb_recommend');
- $this->tpl_maintitle = '商品管理';
- $this->tpl_subtitle = 'レビュー管理';
- $this->arrSex = $masterData->getMasterData('mtb_sex');
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- $this->action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- $objReview = new SC_Helper_Review_Ex();
- // パラメーター情報の初期化
- $objFormParam = new SC_FormParam_Ex();
- $this->lfInitParam($objFormParam);
- $objFormParam->setParam($_POST);
- $objFormParam->convParam();
- // 検索ワードの引き継ぎ
- $this->arrSearchHidden = $objFormParam->getSearchArray();
- $this->arrForm = $objFormParam->getHashArray();
-
- switch ($this->getMode()) {
- // 登録
- case 'complete':
- $this->arrErr = $objFormParam->checkError();
- // エラー無し
- if (SC_Utils_Ex::isBlank($this->arrErr)) {
- // レビュー情報の更新
- $arrValues = $objFormParam->getDbArray();
- $objReview->save($arrValues);
- // レビュー情報のDB取得
- $this->arrForm = $objReview->get($this->arrForm['review_id']);
- $this->tpl_onload = "alert('登録が完了しました。');";
- }
- break;
- default:
- // レビュー情報のDB取得
- $this->arrForm = $objReview->get($this->arrForm['review_id']);
- break;
- }
-
- }
-
- /**
- * パラメーター情報の初期化を行う.
- *
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @return void
- */
- public function lfInitParam(&$objFormParam)
- {
- // 検索条件のパラメーターを初期化
- parent::lfInitParam($objFormParam);
- $objFormParam->addParam('レビューID', 'review_id', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
- $objFormParam->addParam('商品名', 'name', '', '', array(), '', false);
- $objFormParam->addParam('投稿日', 'create_date', '', '', array(), '', false);
-
- // 登録情報
- $objFormParam->addParam('レビュー表示', 'status', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
- $objFormParam->addParam('投稿者名', 'reviewer_name', STEXT_LEN, 'KVa', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
- $objFormParam->addParam('投稿者URL', 'reviewer_url', URL_LEN, 'KVCa', array('SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
- $objFormParam->addParam('性別', 'sex', INT_LEN, 'n', array('MAX_LENGTH_CHECK', 'NUM_CHECK'));
- $objFormParam->addParam('おすすめレベル', 'recommend_level', INT_LEN, 'n', array('SELECT_CHECK'));
- $objFormParam->addParam('タイトル', 'title', STEXT_LEN, 'KVa', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
- $objFormParam->addParam('コメント', 'comment', LTEXT_LEN, 'KVa', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
- }
-}
diff --git a/data/class/pages/api/LC_Page_Api.php b/data/class/pages/api/LC_Page_Api.php
deleted file mode 100644
index c4585532f59..00000000000
--- a/data/class/pages/api/LC_Page_Api.php
+++ /dev/null
@@ -1,70 +0,0 @@
-action();
-// $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- $arrParam = $_REQUEST;
-
- list($response_outer, $arrResponse) = SC_Api_Operation::doApiAction($arrParam);
- SC_Api_Operation_Ex::sendApiResponse('xml', $response_outer, $arrResponse);
- SC_Response_Ex::actionExit();
- }
-}
diff --git a/data/class/pages/api/LC_Page_Api_Json.php b/data/class/pages/api/LC_Page_Api_Json.php
deleted file mode 100644
index a8547f44ef8..00000000000
--- a/data/class/pages/api/LC_Page_Api_Json.php
+++ /dev/null
@@ -1,75 +0,0 @@
-action();
-// $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- $arrParam = $_REQUEST;
-
- list($response_outer, $arrResponse) = SC_Api_Operation::doApiAction($arrParam);
-
- if (isset($arrParam["callback"])) {
- $arrResponse["callback"] = $arrParam["callback"];
- }
-
- SC_Api_Operation_Ex::sendApiResponse('json', $response_outer, $arrResponse);
- SC_Response_Ex::actionExit();
- }
-}
diff --git a/data/class/pages/api/LC_Page_Api_Php.php b/data/class/pages/api/LC_Page_Api_Php.php
deleted file mode 100644
index cd90bdc661e..00000000000
--- a/data/class/pages/api/LC_Page_Api_Php.php
+++ /dev/null
@@ -1,70 +0,0 @@
-action();
-// $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- $arrParam = $_REQUEST;
-
- list($response_outer, $arrResponse) = SC_Api_Operation::doApiAction($arrParam);
- SC_Api_Operation_Ex::sendApiResponse('php', $response_outer, $arrResponse);
- SC_Response_Ex::actionExit();
- }
-}
diff --git a/data/class/pages/api/LC_Page_Api_Xml.php b/data/class/pages/api/LC_Page_Api_Xml.php
deleted file mode 100644
index b459c58e7be..00000000000
--- a/data/class/pages/api/LC_Page_Api_Xml.php
+++ /dev/null
@@ -1,70 +0,0 @@
-action();
-// $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- $arrParam = $_REQUEST;
-
- list($response_outer, $arrResponse) = SC_Api_Operation::doApiAction($arrParam);
- SC_Api_Operation_Ex::sendApiResponse('xml', $response_outer, $arrResponse);
- SC_Response_Ex::actionExit();
- }
-}
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_LoginFooter.php b/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_LoginFooter.php
deleted file mode 100644
index edb6b435f3e..00000000000
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_LoginFooter.php
+++ /dev/null
@@ -1,65 +0,0 @@
-action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- parent::action();
- }
-}
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_LoginHeader.php b/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_LoginHeader.php
deleted file mode 100644
index 9fb1eff5f76..00000000000
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_LoginHeader.php
+++ /dev/null
@@ -1,65 +0,0 @@
-action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- parent::action();
- }
-}
diff --git a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_NaviFooter.php b/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_NaviFooter.php
deleted file mode 100644
index bb888fa33cf..00000000000
--- a/data/class/pages/frontparts/bloc/LC_Page_FrontParts_Bloc_NaviFooter.php
+++ /dev/null
@@ -1,65 +0,0 @@
-action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- parent::action();
- }
-}
diff --git a/data/class/pages/guide/LC_Page_Guide.php b/data/class/pages/guide/LC_Page_Guide.php
deleted file mode 100644
index d6e1b0be377..00000000000
--- a/data/class/pages/guide/LC_Page_Guide.php
+++ /dev/null
@@ -1,65 +0,0 @@
-action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- }
-}
diff --git a/data/class/pages/guide/LC_Page_Guide_About.php b/data/class/pages/guide/LC_Page_Guide_About.php
deleted file mode 100644
index 08756d7a00a..00000000000
--- a/data/class/pages/guide/LC_Page_Guide_About.php
+++ /dev/null
@@ -1,67 +0,0 @@
-arrPref = $masterData->getMasterData('mtb_pref');
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- parent::process();
- $this->action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- }
-}
diff --git a/data/class/pages/guide/LC_Page_Guide_Charge.php b/data/class/pages/guide/LC_Page_Guide_Charge.php
deleted file mode 100644
index 16198573292..00000000000
--- a/data/class/pages/guide/LC_Page_Guide_Charge.php
+++ /dev/null
@@ -1,65 +0,0 @@
-action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- }
-}
diff --git a/data/class/pages/guide/LC_Page_Guide_Privacy.php b/data/class/pages/guide/LC_Page_Guide_Privacy.php
deleted file mode 100644
index 7adf1c88fb8..00000000000
--- a/data/class/pages/guide/LC_Page_Guide_Privacy.php
+++ /dev/null
@@ -1,65 +0,0 @@
-action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- }
-}
diff --git a/data/class/pages/guide/LC_Page_Guide_Usage.php b/data/class/pages/guide/LC_Page_Guide_Usage.php
deleted file mode 100644
index 4527766d77f..00000000000
--- a/data/class/pages/guide/LC_Page_Guide_Usage.php
+++ /dev/null
@@ -1,65 +0,0 @@
-action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- }
-}
diff --git a/data/class/pages/mypage/LC_Page_Mypage_ChangeComplete.php b/data/class/pages/mypage/LC_Page_Mypage_ChangeComplete.php
deleted file mode 100644
index 23f362b55fd..00000000000
--- a/data/class/pages/mypage/LC_Page_Mypage_ChangeComplete.php
+++ /dev/null
@@ -1,65 +0,0 @@
-tpl_subtitle = '会員登録内容変更(完了ページ)';
- $this->tpl_mypageno = 'change';
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- parent::process();
- }
-
- /**
- * Page のAction.
- *
- * @return void
- */
- public function action()
- {
- }
-}
diff --git a/data/class/pages/mypage/LC_Page_Mypage_Login.php b/data/class/pages/mypage/LC_Page_Mypage_Login.php
deleted file mode 100644
index 1a9d908e774..00000000000
--- a/data/class/pages/mypage/LC_Page_Mypage_Login.php
+++ /dev/null
@@ -1,69 +0,0 @@
-httpCacheControl('nocache');
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- parent::process();
- }
-
- /**
- * Page のAction.
- *
- * @return void
- */
- public function action()
- {
- //決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
- $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
-
- SC_Response_Ex::sendRedirect(DIR_INDEX_PATH);
- }
-}
diff --git a/data/class/pages/mypage/LC_Page_Mypage_RefusalComplete.php b/data/class/pages/mypage/LC_Page_Mypage_RefusalComplete.php
deleted file mode 100644
index f7e32d87606..00000000000
--- a/data/class/pages/mypage/LC_Page_Mypage_RefusalComplete.php
+++ /dev/null
@@ -1,75 +0,0 @@
-tpl_title = 'MYページ';
-
- if (SC_Display_Ex::detectDevice() === DEVICE_TYPE_MOBILE) {
- $this->tpl_title .= '/退会手続き(完了ページ)';
- } else {
- $this->tpl_subtitle = '退会手続き(完了ページ)';
- }
- $this->tpl_navi = SC_Helper_PageLayout::getTemplatePath(SC_Display_Ex::detectDevice()) . 'mypage/navi.tpl';
- $this->tpl_mypageno = 'refusal';
- $this->point_disp = false;
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- parent::process();
- $this->action();
- $this->sendResponse();
- }
-
- /**
- * Page のAction.
- *
- * @return void
- */
- public function action()
- {
- }
-}
diff --git a/data/class/pages/order/LC_Page_Order.php b/data/class/pages/order/LC_Page_Order.php
deleted file mode 100644
index 4c7d82d9410..00000000000
--- a/data/class/pages/order/LC_Page_Order.php
+++ /dev/null
@@ -1,70 +0,0 @@
-tpl_title = '特定商取引に関する法律に基づく表記';
- $masterData = new SC_DB_MasterData_Ex();
- $this->arrPref = $masterData->getMasterData('mtb_pref');
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- parent::process();
- $this->action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- $objDb = new SC_Helper_DB_Ex();
- $this->arrOrder = $objDb->sfGetBasisData();
- }
-}
diff --git a/data/class/pages/preview/LC_Page_Preview.php b/data/class/pages/preview/LC_Page_Preview.php
deleted file mode 100644
index 03ac7a81255..00000000000
--- a/data/class/pages/preview/LC_Page_Preview.php
+++ /dev/null
@@ -1,72 +0,0 @@
-sfGetPageLayout($this, true);
-
- // 画面の表示
- $objView->assignobj($this);
- $objView->display(SITE_FRAME);
-
- return;
- }
- SC_Utils_Ex::sfDispSiteError(PAGE_ERROR);
- }
-}
diff --git a/data/class/pages/products/LC_Page_Products_Review.php b/data/class/pages/products/LC_Page_Products_Review.php
deleted file mode 100644
index 45e67b0881d..00000000000
--- a/data/class/pages/products/LC_Page_Products_Review.php
+++ /dev/null
@@ -1,191 +0,0 @@
-arrRECOMMEND = $masterData->getMasterData('mtb_recommend');
- $this->arrSex = $masterData->getMasterData('mtb_sex');
- $this->arrReviewDenyURL = $masterData->getMasterData('mtb_review_deny_url');
- $this->tpl_mainpage = 'products/review.tpl';
- $this->httpCacheControl('nocache');
- }
-
- /**
- * Page のプロセス.
- */
- public function process()
- {
- parent::process();
- $this->action();
- $this->sendResponse();
- }
-
- /**
- * Page のAction.
- *
- * @return void
- */
- public function action()
- {
- $objFormParam = new SC_FormParam_Ex();
- $this->lfInitParam($objFormParam);
- $objFormParam->setParam($_POST);
- $objFormParam->convParam();
-
- switch ($this->getMode()) {
- case 'confirm':
- $this->arrErr = $this->lfCheckError($objFormParam);
-
- //エラーチェック
- if (empty($this->arrErr)) {
- $this->tpl_mainpage = 'products/review_confirm.tpl';
- }
- break;
-
- case 'return':
- break;
-
- case 'complete':
- $this->arrErr = $this->lfCheckError($objFormParam);
- //エラーチェック
- if (empty($this->arrErr)) {
- //登録実行
- $this->lfRegistRecommendData($objFormParam);
-
- //レビュー書き込み完了ページへ
- SC_Response_Ex::sendRedirect('review_complete.php');
- SC_Response_Ex::actionExit();
- }
- break;
-
- default:
- // 最初のproduct_idは、$_GETで渡ってくる。
- $objFormParam->setParam($_GET);
- break;
- }
-
- $this->arrForm = $objFormParam->getHashArray();
-
- //商品名の取得
- $this->arrForm['name'] = $this->lfGetProductName($this->arrForm['product_id']);
- if (empty($this->arrForm['name'])) {
- SC_Utils_Ex::sfDispSiteError(PRODUCT_NOT_FOUND);
- }
-
- $this->setTemplate($this->tpl_mainpage);
- }
-
- /**
- * パラメーター情報の初期化を行う.
- *
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @return void
- */
- public function lfInitParam(&$objFormParam)
- {
- $objFormParam->addParam('レビューID', 'review_id', INT_LEN, 'aKV');
- $objFormParam->addParam('商品ID', 'product_id', INT_LEN, 'n', array('NUM_CHECK','EXIST_CHECK', 'MAX_LENGTH_CHECK'));
- $objFormParam->addParam('投稿者名', 'reviewer_name', STEXT_LEN, 'aKV', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
- $objFormParam->addParam('投稿者URL', 'reviewer_url', MTEXT_LEN, 'a', array('NO_SPTAB', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK', 'URL_CHECK'));
- $objFormParam->addParam('性別', 'sex', INT_LEN, 'n', array('NUM_CHECK', 'MAX_LENGTH_CHECK'));
- $objFormParam->addParam('おすすめレベル', 'recommend_level', INT_LEN, 'n', array('EXIST_CHECK', 'SELECT_CHECK'));
- $objFormParam->addParam('タイトル', 'title', STEXT_LEN, 'aKV', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
- $objFormParam->addParam('コメント', 'comment', LTEXT_LEN, 'aKV', array('EXIST_CHECK', 'SPTAB_CHECK', 'MAX_LENGTH_CHECK'));
- }
-
- /**
- * 入力内容のチェックを行う.
- *
- * @param SC_FormParam $objFormParam SC_FormParam インスタンス
- * @return array エラーメッセージの配列
- */
- public function lfCheckError(&$objFormParam)
- {
- $arrErr = $objFormParam->checkError();
-
- if (REVIEW_ALLOW_URL == false) {
- $objErr = new SC_CheckError_Ex($objFormParam->getHashArray());
- // コメント欄へのURLの入力を禁止
- $objErr->doFunc(array('URL', 'comment', $this->arrReviewDenyURL), array('PROHIBITED_STR_CHECK'));
- $arrErr += $objErr->arrErr;
- }
-
- return $arrErr;
- }
-
- /**
- * 商品名を取得
- *
- * @param integer $product_id 商品ID
- * @return string $product_name 商品名
- */
- public function lfGetProductName($product_id)
- {
- $objQuery =& SC_Query_Ex::getSingletonInstance();
-
- return $objQuery->get('name', 'dtb_products', 'product_id = ? AND ' . SC_Product_Ex::getProductDispConditions(), array($product_id));
- }
-
- //登録実行
- public function lfRegistRecommendData(SC_FormParam &$objFormParam)
- {
- $arrRegist = $objFormParam->getDbArray();
-
- $objCustomer = new SC_Customer_Ex();
- if ($objCustomer->isLoginSuccess(true)) {
- $arrRegist['customer_id'] = $objCustomer->getValue('customer_id');
- }
-
- //-- 登録実行
- $objReview = new SC_Helper_Review_Ex();
- $objReview->save($arrRegist);
- }
-}
diff --git a/data/class/pages/products/LC_Page_Products_ReviewComplete.php b/data/class/pages/products/LC_Page_Products_ReviewComplete.php
deleted file mode 100644
index 7cdac7713bc..00000000000
--- a/data/class/pages/products/LC_Page_Products_ReviewComplete.php
+++ /dev/null
@@ -1,66 +0,0 @@
-action();
- $this->sendResponse();
- }
-
- /**
- * Page のAction.
- *
- * @return void
- */
- public function action()
- {
- $this->setTemplate('products/review_complete.tpl');
- }
-}
diff --git a/data/class/pages/products/LC_Page_Products_Search.php b/data/class/pages/products/LC_Page_Products_Search.php
deleted file mode 100644
index 56b8ed69c5e..00000000000
--- a/data/class/pages/products/LC_Page_Products_Search.php
+++ /dev/null
@@ -1,65 +0,0 @@
-action();
- $this->sendResponse();
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function action()
- {
- }
-}
diff --git a/data/class/pages/regist/LC_Page_Regist_Complete.php b/data/class/pages/regist/LC_Page_Regist_Complete.php
deleted file mode 100644
index 814059528d1..00000000000
--- a/data/class/pages/regist/LC_Page_Regist_Complete.php
+++ /dev/null
@@ -1,66 +0,0 @@
-tpl_title = '会員登録(完了ページ)';
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- parent::process();
- $this->action();
- $this->sendResponse();
- }
-
- /**
- * Page のAction.
- *
- * @return void
- */
- public function action()
- {
- }
-}
diff --git a/data/class/pages/shopping/LC_Page_Shopping_Confirm.php b/data/class/pages/shopping/LC_Page_Shopping_Confirm.php
deleted file mode 100644
index e6d4dfd31a3..00000000000
--- a/data/class/pages/shopping/LC_Page_Shopping_Confirm.php
+++ /dev/null
@@ -1,181 +0,0 @@
-tpl_title = '入力内容のご確認';
- $masterData = new SC_DB_MasterData_Ex();
- $this->arrPref = $masterData->getMasterData('mtb_pref');
- $this->arrCountry = $masterData->getMasterData('mtb_country');
- $this->arrSex = $masterData->getMasterData('mtb_sex');
- $this->arrJob = $masterData->getMasterData('mtb_job');
- $this->arrMAILMAGATYPE = $masterData->getMasterData('mtb_mail_magazine_type');
- $this->arrReminder = $masterData->getMasterData('mtb_reminder');
- $this->arrDeliv = SC_Helper_Delivery_Ex::getIDValueList('service_name');
- $this->httpCacheControl('nocache');
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- parent::process();
- $this->action();
- $this->sendResponse();
- }
-
- /**
- * Page のアクション.
- *
- * @return void
- */
- public function action()
- {
- //決済処理中ステータスのロールバック
- $objPurchase = new SC_Helper_Purchase_Ex();
- $objPurchase->cancelPendingOrder(PENDING_ORDER_CANCEL_FLAG);
-
- $objCartSess = new SC_CartSession_Ex();
- $objSiteSess = new SC_SiteSession_Ex();
- $objCustomer = new SC_Customer_Ex();
-
- $this->is_multiple = $objPurchase->isMultiple();
-
- // 前のページで正しく登録手続きが行われた記録があるか判定
- if (!$objSiteSess->isPrePage()) {
- // エラー時は、正当なページ遷移とは認めない
- $objSiteSess->setNowPage('');
-
- SC_Utils_Ex::sfDispSiteError(PAGE_ERROR, $objSiteSess);
- }
-
- // ユーザユニークIDの取得と購入状態の正当性をチェック
- $this->tpl_uniqid = $objSiteSess->getUniqId();
- $objPurchase->verifyChangeCart($this->tpl_uniqid, $objCartSess);
-
- $this->cartKey = $objCartSess->getKey();
-
- // カート内商品のチェック
- $this->tpl_message = $objCartSess->checkProducts($this->cartKey);
- if (!SC_Utils_Ex::isBlank($this->tpl_message)) {
- SC_Response_Ex::sendRedirect(CART_URL);
- SC_Response_Ex::actionExit();
- }
-
- // カートの商品を取得
- $this->arrShipping = $objPurchase->getShippingTemp($this->is_multiple);
- $this->arrCartItems = $objCartSess->getCartList($this->cartKey);
- // 合計金額
- $this->tpl_total_inctax[$this->cartKey] = $objCartSess->getAllProductsTotal($this->cartKey);
- // 税額
- $this->tpl_total_tax[$this->cartKey] = $objCartSess->getAllProductsTax($this->cartKey);
- // ポイント合計
- $this->tpl_total_point[$this->cartKey] = $objCartSess->getAllProductsPoint($this->cartKey);
-
- // 一時受注テーブルの読込
- $arrOrderTemp = $objPurchase->getOrderTemp($this->tpl_uniqid);
- // カート集計を元に最終計算
- $arrCalcResults = $objCartSess->calculate($this->cartKey, $objCustomer,
- $arrOrderTemp['use_point'],
- $objPurchase->getShippingPref($this->is_multiple),
- $arrOrderTemp['charge'],
- $arrOrderTemp['discount'],
- $arrOrderTemp['deliv_id'],
- $arrOrderTemp['order_pref'], // 税金計算の為に追加 注文者基準
- $arrOrderTemp['order_country_id'] // 税金計算の為に追加 注文者基準
- );
-
- $this->arrForm = array_merge($arrOrderTemp, $arrCalcResults);
-
- // 会員ログインチェック
- if ($objCustomer->isLoginSuccess(true)) {
- $this->tpl_login = '1';
- $this->tpl_user_point = $objCustomer->getValue('point');
- }
-
- // 決済モジュールを使用するかどうか
- $this->use_module = SC_Helper_Payment_Ex::useModule($this->arrForm['payment_id']);
-
- switch ($this->getMode()) {
- // 前のページに戻る
- case 'return':
- // 正常な推移であることを記録しておく
- $objSiteSess->setRegistFlag();
-
- SC_Response_Ex::sendRedirect(SHOPPING_PAYMENT_URLPATH);
- SC_Response_Ex::actionExit();
- break;
- case 'confirm':
- /*
- * 決済モジュールで必要なため, 受注番号を取得
- */
- $this->arrForm['order_id'] = $objPurchase->getNextOrderID();
- $_SESSION['order_id'] = $this->arrForm['order_id'];
-
- // 集計結果を受注一時テーブルに反映
- $objPurchase->saveOrderTemp($this->tpl_uniqid, $this->arrForm,
- $objCustomer);
-
- // 正常に登録されたことを記録しておく
- $objSiteSess->setRegistFlag();
-
- // 決済モジュールを使用する場合
- if ($this->use_module) {
- $objPurchase->completeOrder(ORDER_PENDING);
-
- SC_Response_Ex::sendRedirect(SHOPPING_MODULE_URLPATH);
- // 購入完了ページ
- } else {
- $objPurchase->completeOrder(ORDER_NEW);
- SC_Helper_Purchase_Ex::sendOrderMail($this->arrForm['order_id'], $this);
-
- SC_Response_Ex::sendRedirect(SHOPPING_COMPLETE_URLPATH);
- }
- SC_Response_Ex::actionExit();
- break;
- default:
- break;
- }
-
- }
-}
diff --git a/data/class/pages/unsupported/LC_Page_Unsupported.php b/data/class/pages/unsupported/LC_Page_Unsupported.php
deleted file mode 100644
index ea9ba14c3ab..00000000000
--- a/data/class/pages/unsupported/LC_Page_Unsupported.php
+++ /dev/null
@@ -1,61 +0,0 @@
-tpl_title = '未対応デバイス';
- }
-
- /**
- * Page のプロセス.
- *
- * @return void
- */
- public function process()
- {
- parent::process();
- $this->action();
- $this->sendResponse();
- }
-
- public function action()
- {
- }
-}
diff --git a/data/require_base.php b/data/require_base.php
index 5567e4696c5..0f902b9910a 100644
--- a/data/require_base.php
+++ b/data/require_base.php
@@ -20,7 +20,6 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-
if (!defined('DATA_REALDIR')) {
define('DATA_REALDIR', HTML_REALDIR . HTML2DATA_DIR);
}
@@ -31,18 +30,15 @@
// 定数 SAFE が設定されている場合、DBアクセスを回避する。主に、エラー画面を意図する。
if (!defined('SAFE') || !SAFE) {
// インストール中で無い場合、
- if (!GC_Utils_Ex::isInstallFunction()) {
- // インストールチェック
- SC_Utils_Ex::sfInitInstall();
-
+ if (!Eccube\Common\Util\GcUtils::isInstallFunction()) {
+ Eccube\Common\Util\Utils::sfInitInstall();
// セッション初期化・開始
- $sessionFactory = SC_SessionFactory_Ex::getInstance();
+ $sessionFactory = Eccube\Common\SessionFactory::getInstance();
$sessionFactory->initSession();
-
/*
* 管理画面の場合は認証行う.
* 認証処理忘れ防止のため, LC_Page_Admin::init() 等ではなく, ここでチェックする.
*/
- SC_Helper_Session_Ex::adminAuthorization();
+ Eccube\Common\Helper\SessionHelper::adminAuthorization();
}
}
diff --git a/eccube/.idea/.name b/eccube/.idea/.name
new file mode 100644
index 00000000000..8ab43cc39a6
--- /dev/null
+++ b/eccube/.idea/.name
@@ -0,0 +1 @@
+eccube
\ No newline at end of file
diff --git a/eccube/.idea/eccube.iml b/eccube/.idea/eccube.iml
new file mode 100644
index 00000000000..6b8184f8eff
--- /dev/null
+++ b/eccube/.idea/eccube.iml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/eccube/.idea/encodings.xml b/eccube/.idea/encodings.xml
new file mode 100644
index 00000000000..e206d70d859
--- /dev/null
+++ b/eccube/.idea/encodings.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/eccube/.idea/misc.xml b/eccube/.idea/misc.xml
new file mode 100644
index 00000000000..1162f43828b
--- /dev/null
+++ b/eccube/.idea/misc.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/eccube/.idea/modules.xml b/eccube/.idea/modules.xml
new file mode 100644
index 00000000000..85b09547091
--- /dev/null
+++ b/eccube/.idea/modules.xml
@@ -0,0 +1,9 @@
+
+
+
+
+
+
+
+
+
diff --git a/eccube/.idea/scopes/scope_settings.xml b/eccube/.idea/scopes/scope_settings.xml
new file mode 100644
index 00000000000..922003b8433
--- /dev/null
+++ b/eccube/.idea/scopes/scope_settings.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/eccube/.idea/vcs.xml b/eccube/.idea/vcs.xml
new file mode 100644
index 00000000000..def6a6a1845
--- /dev/null
+++ b/eccube/.idea/vcs.xml
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/eccube/.idea/workspace.xml b/eccube/.idea/workspace.xml
new file mode 100644
index 00000000000..51cb3144d6f
--- /dev/null
+++ b/eccube/.idea/workspace.xml
@@ -0,0 +1,143 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 1420703828244
+
+ 1420703828244
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/html/.htaccess b/html/.htaccess
index 0e45931441c..eae124271d0 100644
--- a/html/.htaccess
+++ b/html/.htaccess
@@ -13,3 +13,13 @@ php_value mbstring.internal_encoding UTF-8
php_value upload_max_filesize 5M
#php_value post_max_size 8M
php_flag register_globals off
+
+RewriteEngine On
+RewriteCond %{REQUEST_URI} !.*install.*
+RewriteCond %{REQUEST_URI} \.php* [OR]
+RewriteCond %{REQUEST_FILENAME} !-f
+RewriteRule . index.php [L]
+
+
+php_flag display_errors on
+php_value error_reporting 6143
\ No newline at end of file
diff --git a/html/admin/home.php b/html/admin/_home.php
similarity index 100%
rename from html/admin/home.php
rename to html/admin/_home.php
diff --git a/html/admin/index.php b/html/admin/_index.php
similarity index 100%
rename from html/admin/index.php
rename to html/admin/_index.php
diff --git a/html/frontparts/bloc/calendar.php b/html/frontparts/bloc/calendar.php
index 6e968336aea..fc5bc22da41 100644
--- a/html/frontparts/bloc/calendar.php
+++ b/html/frontparts/bloc/calendar.php
@@ -22,9 +22,8 @@
*/
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_Calendar_Ex.php';
-$objPage = new LC_Page_FrontParts_Bloc_Calendar_Ex();
+$objPage = new Eccube\Page\Bloc\Calendar();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/bloc/cart.php b/html/frontparts/bloc/cart.php
index d024268a4e9..80305fd7140 100644
--- a/html/frontparts/bloc/cart.php
+++ b/html/frontparts/bloc/cart.php
@@ -22,9 +22,8 @@
*/
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_Cart_Ex.php';
-$objPage = new LC_Page_FrontParts_BLoc_Cart_Ex();
+$objPage = new Eccube\Page\Bloc\Cart();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/bloc/category.php b/html/frontparts/bloc/category.php
index 5b9ab3b1ce0..b08014101ac 100644
--- a/html/frontparts/bloc/category.php
+++ b/html/frontparts/bloc/category.php
@@ -22,9 +22,8 @@
*/
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_Category_Ex.php';
-$objPage = new LC_Page_FrontParts_BLoc_Category_Ex();
+$objPage = new Eccube\Page\Bloc\Category();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/bloc/login.php b/html/frontparts/bloc/login.php
index 5a88fe85abd..c71d0027716 100644
--- a/html/frontparts/bloc/login.php
+++ b/html/frontparts/bloc/login.php
@@ -22,9 +22,8 @@
*/
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_Login_Ex.php';
-$objPage = new LC_Page_FrontParts_BLoc_Login_Ex();
+$objPage = new Eccube\Page\Bloc\Login();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/bloc/login_footer.php b/html/frontparts/bloc/login_footer.php
index a98f8b78890..86b5809509a 100644
--- a/html/frontparts/bloc/login_footer.php
+++ b/html/frontparts/bloc/login_footer.php
@@ -22,9 +22,8 @@
*/
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_LoginFooter_Ex.php';
-$objPage = new LC_Page_FrontParts_BLoc_LoginFooter_Ex();
+$objPage = new Eccube\Page\Bloc\LoginFooter();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/bloc/login_header.php b/html/frontparts/bloc/login_header.php
index 0be7ce639cf..69d7c5fc07c 100644
--- a/html/frontparts/bloc/login_header.php
+++ b/html/frontparts/bloc/login_header.php
@@ -22,9 +22,8 @@
*/
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_LoginHeader_Ex.php';
-$objPage = new LC_Page_FrontParts_BLoc_LoginHeader_Ex();
+$objPage = new Eccube\Page\Bloc\LoginHeader();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/bloc/navi_footer.php b/html/frontparts/bloc/navi_footer.php
index 443cb6fa483..d4b6149ca27 100644
--- a/html/frontparts/bloc/navi_footer.php
+++ b/html/frontparts/bloc/navi_footer.php
@@ -22,9 +22,8 @@
*/
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_NaviFooter_Ex.php';
-$objPage = new LC_Page_FrontParts_BLoc_NaviFooter_Ex();
+$objPage = new Eccube\Page\Bloc\NaviFooter();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/bloc/navi_header.php b/html/frontparts/bloc/navi_header.php
index dfa75884a4d..e2dcdd50d85 100644
--- a/html/frontparts/bloc/navi_header.php
+++ b/html/frontparts/bloc/navi_header.php
@@ -22,9 +22,8 @@
*/
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_NaviHeader_Ex.php';
-$objPage = new LC_Page_FrontParts_BLoc_NaviHeader_Ex();
+$objPage = new Eccube\Page\Bloc\NaviHeader();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/bloc/news.php b/html/frontparts/bloc/news.php
index 1c883472424..ef41d182581 100644
--- a/html/frontparts/bloc/news.php
+++ b/html/frontparts/bloc/news.php
@@ -20,10 +20,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_News_Ex.php';
-$objPage = new LC_Page_FrontParts_BLoc_News_Ex();
+$objPage = new Eccube\Page\Bloc\News();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/bloc/recommend.php b/html/frontparts/bloc/recommend.php
index 16471ee3d36..b59636bfe74 100644
--- a/html/frontparts/bloc/recommend.php
+++ b/html/frontparts/bloc/recommend.php
@@ -22,9 +22,8 @@
*/
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_Recommend_Ex.php';
-$objPage = new LC_Page_FrontParts_BLoc_Recommend_Ex();
+$objPage = new Eccube\Page\Bloc\Recommend();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/bloc/search_products.php b/html/frontparts/bloc/search_products.php
index 4b4a04f0d48..069cdd92c30 100644
--- a/html/frontparts/bloc/search_products.php
+++ b/html/frontparts/bloc/search_products.php
@@ -20,10 +20,10 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
+
require_once realpath(dirname(__FILE__)) . '/../../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/bloc/LC_Page_FrontParts_Bloc_SearchProducts_Ex.php';
-$objPage = new LC_Page_FrontParts_BLoc_SearchProducts_Ex();
+$objPage = new Eccube\Page\Bloc\SearchProducts();
$objPage->blocItems = $params['items'];
$objPage->init();
$objPage->process();
diff --git a/html/frontparts/login_check.php b/html/frontparts/login_check.php
index 83b2c82598a..77f16078a20 100644
--- a/html/frontparts/login_check.php
+++ b/html/frontparts/login_check.php
@@ -22,8 +22,7 @@
*/
require_once '../require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/frontparts/LC_Page_FrontParts_LoginCheck_Ex.php';
-$objPage = new LC_Page_FrontParts_LoginCheck_Ex();
+$objPage = new Eccube\Page\Bloc\LoginCheck();
$objPage->init();
$objPage->process();
diff --git a/html/index.php b/html/index.php
index fec0efa6235..6f97954a0f2 100644
--- a/html/index.php
+++ b/html/index.php
@@ -21,8 +21,5 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
require_once './require.php';
-require_once CLASS_EX_REALDIR . 'page_extends/LC_Page_Index_Ex.php';
-
-$objPage = new LC_Page_Index_Ex();
-$objPage->init();
-$objPage->process();
+$router = new Eccube\Router();
+$router->action();
diff --git a/html/install/index.php b/html/install/index.php
index a464a84b398..53f9ebd4e27 100644
--- a/html/install/index.php
+++ b/html/install/index.php
@@ -1,4 +1,4 @@
- 'SMTP',
'sendmail' => 'sendmail');
-$objDb = new SC_Helper_DB_Ex();
+$objDb = new Eccube\Common\Helper\DbHelper();
// テンプレートコンパイルディレクトリの書込み権限チェック
$temp_dir = $ownDir . 'temp';
if (!is_writable($temp_dir)) {
- SC_Utils_Ex::sfErrorHeader($temp_dir . 'にユーザ書込み権限(777, 707等)を付与して下さい。', true);
+ Eccube\Common\Util\Utils::sfErrorHeader($temp_dir . 'にユーザ書込み権限(777, 707等)を付与して下さい。', true);
exit;
}
-$objView = new SC_InstallView_Ex($ownDir . 'templates', $ownDir . 'temp');
+$objView = new Eccube\Common\View\InstallView($ownDir . 'templates', $ownDir . 'temp');
// パラメーター管理クラス
-$objWebParam = new SC_FormParam();
-$objDBParam = new SC_FormParam();
+$objWebParam = new Eccube\Common\FormParam();
+$objDBParam = new Eccube\Common\FormParam();
// パラメーター情報の初期化
$objWebParam = lfInitWebParam($objWebParam);
$objDBParam = lfInitDBParam($objDBParam);
@@ -353,14 +354,14 @@ function lfDispStep0($objPage)
$mess .= ">> ×:$real_path($filemode) \nユーザ書込み権限(777, 707等)を付与して下さい。\n";
$hasErr = true;
} else {
- GC_Utils_Ex::gfPrintLog('WRITABLE:' . $path, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog('WRITABLE:' . $path, INSTALL_LOG);
}
} else {
if (!is_writable($path)) {
$mess .= ">> ×:$real_path($filemode) \nユーザ書込み権限(666, 606等)を付与して下さい。\n";
$hasErr = true;
} else {
- GC_Utils_Ex::gfPrintLog('WRITABLE:' . $path, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog('WRITABLE:' . $path, INSTALL_LOG);
}
}
} else {
@@ -464,7 +465,7 @@ function lfDispStep0_1($objPage)
$objPage->tpl_mainpage = 'step0_1.tpl';
$objPage->tpl_mode = 'step0_1';
// ファイルコピー
- $objPage->copy_mess = SC_Utils_Ex::sfCopyDir('./save_image/', HTML_REALDIR . 'upload/save_image/', $objPage->copy_mess);
+ $objPage->copy_mess = Eccube\Common\Util\Utils::sfCopyDir('./save_image/', HTML_REALDIR . 'upload/save_image/', $objPage->copy_mess);
return $objPage;
}
@@ -546,7 +547,7 @@ function lfDispStep4($objPage)
$objPage->tpl_shop_name = $objWebParam->getValue('shop_name');
$objPage->tpl_cube_ver = ECCUBE_VERSION;
$objPage->tpl_php_ver = phpversion();
- $dbFactory = SC_DB_DBFactory_Ex::getInstance($arrDsn['phptype']);
+ $dbFactory = Eccube\Common\Db\DbFactory::getInstance($arrDsn['phptype']);
$objPage->tpl_db_ver = $dbFactory->sfGetDBVersion($arrDsn);
$objPage->tpl_db_skip = $_POST['db_skip'];
$objPage->tpl_mainpage = 'step4.tpl';
@@ -578,7 +579,7 @@ function lfDispComplete($objPage)
$sqlval['mypage_tpl'] = 'default1';
$sqlval['update_date'] = 'CURRENT_TIMESTAMP';
$sqlval['country_id'] = DEFAULT_COUNTRY_ID;
- $objQuery = new SC_Query($arrDsn);
+ $objQuery = new Eccube\Common\Query($arrDsn);
$cnt = $objQuery->count('dtb_baseinfo');
if ($cnt > 0) {
$objQuery->update('dtb_baseinfo', $sqlval);
@@ -588,8 +589,8 @@ function lfDispComplete($objPage)
// 管理者登録
$login_id = $objWebParam->getValue('login_id');
- $salt = SC_Utils_Ex::sfGetRandomString(10);
- $login_pass = SC_Utils_Ex::sfGetHashString($objWebParam->getValue('login_pass'), $salt);
+ $salt = Eccube\Common\Util\Utils::sfGetRandomString(10);
+ $login_pass = Eccube\Common\Util\Utils::sfGetHashString($objWebParam->getValue('login_pass'), $salt);
$arrVal = array(
'login_id' => $login_id,
@@ -648,7 +649,7 @@ function lfInitWebParam($objWebParam)
// 店名、管理者メールアドレスを取得する。(再インストール時)
if (defined('DEFAULT_DSN')) {
- $objQuery = new SC_Query();
+ $objQuery = new Eccube\Common\Query();
$tables = $objQuery->listTables();
if (!PEAR::isError($tables) && in_array('dtb_baseinfo', $tables)) {
@@ -660,7 +661,7 @@ function lfInitWebParam($objWebParam)
// 管理機能のディレクトリ名を取得(再インストール時)
if (defined('ADMIN_DIR')) {
- $oldAdminDir = SC_Utils_Ex::sfTrimURL(ADMIN_DIR);
+ $oldAdminDir = Eccube\Common\Util\Utils::sfTrimURL(ADMIN_DIR);
}
if (defined('ADMIN_FORCE_SSL')) {
@@ -765,7 +766,7 @@ function lfCheckWebError($objWebParam)
{
// 入力データを渡す。
$arrRet = $objWebParam->getHashArray();
- $objErr = new SC_CheckError($arrRet);
+ $objErr = new Eccube\Common\CheckError($arrRet);
$objErr->arrErr = $objWebParam->checkError();
// ディレクトリ名のみ取得する
@@ -786,7 +787,7 @@ function lfCheckWebError($objWebParam)
// 管理機能ディレクトリのチェック
$objErr->doFunc(array('管理機能:ディレクトリ', 'admin_dir', ID_MIN_LEN, ID_MAX_LEN), array('SPTAB_CHECK', 'NUM_RANGE_CHECK'));
- $oldAdminDir = SC_Utils_Ex::sfTrimURL(ADMIN_DIR);
+ $oldAdminDir = Eccube\Common\Util\Utils::sfTrimURL(ADMIN_DIR);
$newAdminDir = $objWebParam->getValue('admin_dir');
if ($newAdminDir) {
if ($oldAdminDir !== $newAdminDir AND file_exists(HTML_REALDIR . $newAdminDir) and $newAdminDir != 'admin') {
@@ -805,7 +806,7 @@ function lfCheckDBError($objDBParam)
// 入力データを渡す。
$arrRet = $objDBParam->getHashArray();
- $objErr = new SC_CheckError($arrRet);
+ $objErr = new Eccube\Common\CheckError($arrRet);
$objErr->arrErr = $objDBParam->checkError();
if (count($objErr->arrErr) == 0) {
@@ -815,7 +816,7 @@ function lfCheckDBError($objDBParam)
$objDB = MDB2::connect($arrDsn, $options);
// 接続成功
if (!PEAR::isError($objDB)) {
- $dbFactory = SC_DB_DBFactory_Ex::getInstance($arrDsn['phptype']);
+ $dbFactory = Eccube\Common\Db\DbFactory::getInstance($arrDsn['phptype']);
// データベースバージョン情報の取得
$objPage->tpl_db_version = $dbFactory->sfGetDBVersion($arrDsn);
} else {
@@ -823,7 +824,7 @@ function lfCheckDBError($objDBParam)
// エラー文を取得する
preg_match('/\[(.*)\]/', $objDB->userinfo, $arrKey);
$objErr->arrErr['all'] .= $arrKey[0] . '
';
- GC_Utils_Ex::gfPrintLog($objDB->userinfo, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog($objDB->userinfo, INSTALL_LOG);
}
}
return $objErr->arrErr;
@@ -857,7 +858,7 @@ function lfExecuteSQL($filepath, $arrDsn, $disp_err = true)
$sql_split = split(';', $sql);
foreach ($sql_split as $key => $val) {
- SC_Utils::sfFlush(true);
+ Eccube\Common\Util\Utils::sfFlush(true);
if (trim($val) != '') {
$ret = $objDB->query($val);
if (PEAR::isError($ret) && $disp_err) {
@@ -866,16 +867,16 @@ function lfExecuteSQL($filepath, $arrDsn, $disp_err = true)
preg_match('/\[(.*)\]/', $ret->userinfo, $arrKey);
$arrErr['all'] .= $arrKey[0] . '
';
$arrErr['all'] .= '>> テーブル構成の変更に失敗しました。
';
- GC_Utils_Ex::gfPrintLog($ret->userinfo, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog($ret->userinfo, INSTALL_LOG);
break;
} else {
- GC_Utils_Ex::gfPrintLog('OK:' . $val, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog('OK:' . $val, INSTALL_LOG);
}
}
}
} else {
$arrErr['all'] = '>> ' . $objDB->message;
- GC_Utils_Ex::gfPrintLog($objDB->userinfo, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog($objDB->userinfo, INSTALL_LOG);
}
}
return $arrErr;
@@ -901,21 +902,21 @@ function lfDropSequence($arrSequences, $arrDsn)
if (!PEAR::isError($objDB)) {
$exists = $objManager->listSequences();
foreach ($arrSequences as $seq) {
- SC_Utils::sfFlush(true);
+ Eccube\Common\Util\Utils::sfFlush(true);
$seq_name = $seq[0] . '_' . $seq[1];
if (in_array($seq_name, $exists)) {
$result = $objManager->dropSequence($seq_name);
if (PEAR::isError($result)) {
$arrErr['all'] = '>> ' . $result->message . '
';
- GC_Utils_Ex::gfPrintLog($result->userinfo, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog($result->userinfo, INSTALL_LOG);
} else {
- GC_Utils_Ex::gfPrintLog('OK:' . $seq_name, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog('OK:' . $seq_name, INSTALL_LOG);
}
}
}
} else {
$arrErr['all'] = '>> ' . $objDB->message;
- GC_Utils_Ex::gfPrintLog($objDB->userinfo, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog($objDB->userinfo, INSTALL_LOG);
}
return $arrErr;
}
@@ -940,11 +941,11 @@ function lfCreateSequence($arrSequences, $arrDsn)
if (!PEAR::isError($objDB)) {
$exists = $objManager->listSequences();
foreach ($arrSequences as $seq) {
- SC_Utils::sfFlush(true);
+ Eccube\Common\Util\Utils::sfFlush(true);
$res = $objDB->query('SELECT max(' . $seq[1] . ') FROM ' . $seq[0]);
if (PEAR::isError($res)) {
$arrErr['all'] = '>> ' . $res->userinfo . '
';
- GC_Utils_Ex::gfPrintLog($res->userinfo, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog($res->userinfo, INSTALL_LOG);
return $arrErr;
}
$max = $res->fetchOne();
@@ -953,14 +954,14 @@ function lfCreateSequence($arrSequences, $arrDsn)
$result = $objManager->createSequence($seq_name, $max + 1);
if (PEAR::isError($result)) {
$arrErr['all'] = '>> ' . $result->message . '
';
- GC_Utils_Ex::gfPrintLog($result->userinfo, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog($result->userinfo, INSTALL_LOG);
} else {
- GC_Utils_Ex::gfPrintLog('OK:' . $seq_name, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog('OK:' . $seq_name, INSTALL_LOG);
}
}
} else {
$arrErr['all'] = '>> ' . $objDB->message;
- GC_Utils_Ex::gfPrintLog($objDB->userinfo, INSTALL_LOG);
+ Eccube\Common\Util\GcUtils::gfPrintLog($objDB->userinfo, INSTALL_LOG);
}
return $arrErr;
}
@@ -1019,7 +1020,7 @@ function lfMakeConfigFile()
if ($_POST['db_skip'] && defined('AUTH_MAGIC')) {
$auth_magic = AUTH_MAGIC;
} else {
- $auth_magic = SC_Utils_Ex::sfGetRandomString(40);
+ $auth_magic = Eccube\Common\Util\Utils::sfGetRandomString(40);
define('AUTH_MAGIC', $auth_magic);
}
@@ -1139,7 +1140,7 @@ function renameAdminDir($adminDir)
define('ADMIN_DIR', 'admin/');
}
- $oldAdminDir = SC_Utils_Ex::sfTrimURL(ADMIN_DIR);
+ $oldAdminDir = Eccube\Common\Util\Utils::sfTrimURL(ADMIN_DIR);
if ($adminDir === $oldAdminDir) {
return true;
}
@@ -1152,7 +1153,7 @@ function renameAdminDir($adminDir)
return true;
}
-function getArrayDsn(SC_FormParam $objDBParam)
+function getArrayDsn(Eccube\Common\FormParam $objDBParam)
{
$arrRet = $objDBParam->getHashArray();
diff --git a/html/products/detail.php b/html/products/_detail.php
similarity index 100%
rename from html/products/detail.php
rename to html/products/_detail.php
diff --git a/html/products/list.php b/html/products/_list.php
similarity index 100%
rename from html/products/list.php
rename to html/products/_list.php
diff --git a/html/require.php b/html/require.php
index fecb9d18be5..b7d13230bd6 100644
--- a/html/require.php
+++ b/html/require.php
@@ -37,10 +37,11 @@
// 絵文字変換 (除去) フィルターを組み込む。
ob_start(array('SC_MobileEmoji', 'handler'));
-if (SC_Display_Ex::detectDevice() == DEVICE_TYPE_MOBILE) {
+if (Eccube\Common\Display::detectDevice() == DEVICE_TYPE_MOBILE) {
// resize_image.phpは除外
if (stripos($_SERVER['REQUEST_URI'], ROOT_URLPATH . 'resize_image.php') === FALSE) {
- $objMobile = new SC_Helper_Mobile_Ex();
+ $objMobile = new Eccube\Common\Helper\MobileHelper();
$objMobile->sfMobileInit();
}
}
+
diff --git a/robots.txt b/robots.txt
new file mode 100644
index 00000000000..d9b77923524
--- /dev/null
+++ b/robots.txt
@@ -0,0 +1 @@
+Disallow: /*.csv$
diff --git a/test/TestSuite.php b/test/TestSuite.php
index 6726c0f83bf..88d416ec46d 100644
--- a/test/TestSuite.php
+++ b/test/TestSuite.php
@@ -39,7 +39,7 @@ class TestSuite
{
public static function suite()
{
- $suite = new PHPUnit_Framework_TestSuite('ECCUBE');
+ $suite = new PHPUnit_Common_TestSuite('ECCUBE');
$suite->addTest(Page_AllTests::suite());
$suite->addTest(DB_AllTests::suite());
$suite->addTest(Helper_AllTests::suite());
diff --git a/test/class/SC_DbConn_Test.php b/test/class/SC_DbConn_Test.php
index ad0a2593fae..e38376e5ec3 100644
--- a/test/class/SC_DbConn_Test.php
+++ b/test/class/SC_DbConn_Test.php
@@ -31,7 +31,7 @@
* @author Kentaro Ohkouchi
* @version $Id$
*/
-class SC_DbConn_Test extends PHPUnit_Framework_TestCase
+class SC_DbConn_Test extends PHPUnit_Common_TestCase
{
/** SC_DbConn インスタンス */
diff --git a/test/class/SC_Query_Test.php b/test/class/SC_Query_Test.php
index 20e0ea93ddb..692d66c0633 100644
--- a/test/class/SC_Query_Test.php
+++ b/test/class/SC_Query_Test.php
@@ -32,7 +32,7 @@
* @author Kentaro Ohkouchi
* @version $Id$
*/
-class SC_Query_Test extends PHPUnit_Framework_TestCase
+class SC_Query_Test extends PHPUnit_Common_TestCase
{
/** SC_Query インスタンス */
diff --git a/test/class/db/DB_AllTests.php b/test/class/db/DB_AllTests.php
index 0adf4650764..c4d739b48db 100644
--- a/test/class/db/DB_AllTests.php
+++ b/test/class/db/DB_AllTests.php
@@ -34,12 +34,12 @@
* @author Kentaro Ohkouchi
* @version $Id:LC_Page_Test.php 15116 2007-07-23 11:32:53Z nanasess $
*/
-class DB_AllTests extends PHPUnit_Framework_TestCase
+class DB_AllTests extends PHPUnit_Common_TestCase
{
public static function suite()
{
- $suite = new PHPUnit_Framework_TestSuite('SC_DB');
+ $suite = new PHPUnit_Common_TestSuite('SC_DB');
$suite->addTestSuite('SC_DB_DBFactory_Test');
$suite->addTestSuite('SC_DB_MasterData_Test');
diff --git a/test/class/db/SC_DB_DBFactory_Test.php b/test/class/db/SC_DB_DBFactory_Test.php
index cc8f85345c7..3622f180214 100644
--- a/test/class/db/SC_DB_DBFactory_Test.php
+++ b/test/class/db/SC_DB_DBFactory_Test.php
@@ -32,7 +32,7 @@
* @author LOCKON CO.,LTD.
* @version $Id:SC_DB_DBFactory_Test.php 15532 2007-08-31 14:39:46Z nanasess $
*/
-class SC_DB_DBFactory_Test extends PHPUnit_Framework_TestCase
+class SC_DB_DBFactory_Test extends PHPUnit_Common_TestCase
{
// }}}
diff --git a/test/class/db/SC_DB_MasterData_Test.php b/test/class/db/SC_DB_MasterData_Test.php
index 2e02b1853b4..63db811257d 100644
--- a/test/class/db/SC_DB_MasterData_Test.php
+++ b/test/class/db/SC_DB_MasterData_Test.php
@@ -32,7 +32,7 @@
* @author LOCKON CO.,LTD.
* @version $Id:SC_DB_MasterData_Test.php 15532 2007-08-31 14:39:46Z nanasess $
*/
-class SC_DB_MasterData_Test extends PHPUnit_Framework_TestCase
+class SC_DB_MasterData_Test extends PHPUnit_Common_TestCase
{
// }}}
diff --git a/test/class/helper/Helper_AllTests.php b/test/class/helper/Helper_AllTests.php
index 66b2040aa5e..9a0d7196a32 100644
--- a/test/class/helper/Helper_AllTests.php
+++ b/test/class/helper/Helper_AllTests.php
@@ -35,12 +35,12 @@
* @author Kentaro Ohkouchi
* @version $Id:LC_Page_Test.php 15116 2007-07-23 11:32:53Z nanasess $
*/
-class Helper_AllTests extends PHPUnit_Framework_TestCase
+class Helper_AllTests extends PHPUnit_Common_TestCase
{
public static function suite()
{
- $suite = new PHPUnit_Framework_TestSuite('SC_Helper');
+ $suite = new PHPUnit_Common_TestSuite('SC_Helper');
$suite->addTestSuite('SC_Helper_DB_Test');
$suite->addTestSuite('SC_Helper_Session_Test');
$suite->addTestSuite('SC_Helper_Purchase_Test');
diff --git a/test/class/helper/SC_Helper_Address_Test.php b/test/class/helper/SC_Helper_Address_Test.php
index 4154cc8e796..820149f87cd 100644
--- a/test/class/helper/SC_Helper_Address_Test.php
+++ b/test/class/helper/SC_Helper_Address_Test.php
@@ -10,7 +10,7 @@
*
* @author cyberwill
*/
-class SC_Helper_Address_Test extends PHPUnit_Framework_TestCase
+class SC_Helper_Address_Test extends PHPUnit_Common_TestCase
{
public $objQuery = "";
public $objAddress = "";
diff --git a/test/class/helper/SC_Helper_DB_Test.php b/test/class/helper/SC_Helper_DB_Test.php
index c80d3a6db6e..8dd3bae4b62 100644
--- a/test/class/helper/SC_Helper_DB_Test.php
+++ b/test/class/helper/SC_Helper_DB_Test.php
@@ -32,7 +32,7 @@
* @author LOCKON CO.,LTD.
* @version $Id$
*/
-class SC_Helper_DB_Test extends PHPUnit_Framework_TestCase
+class SC_Helper_DB_Test extends PHPUnit_Common_TestCase
{
/**
diff --git a/test/class/helper/SC_Helper_Purchase_Test.php b/test/class/helper/SC_Helper_Purchase_Test.php
index 6a3c5276548..d75e6fb7967 100644
--- a/test/class/helper/SC_Helper_Purchase_Test.php
+++ b/test/class/helper/SC_Helper_Purchase_Test.php
@@ -32,7 +32,7 @@
* @author LOCKON CO.,LTD.
* @version $Id$
*/
-class SC_Helper_Purchase_Test extends PHPUnit_Framework_TestCase
+class SC_Helper_Purchase_Test extends PHPUnit_Common_TestCase
{
/**
* @var SC_Helper_Purchase
diff --git a/test/class/helper/SC_Helper_Session_Test.php b/test/class/helper/SC_Helper_Session_Test.php
index de2998dc73e..723e2557174 100644
--- a/test/class/helper/SC_Helper_Session_Test.php
+++ b/test/class/helper/SC_Helper_Session_Test.php
@@ -32,7 +32,7 @@
* @author LOCKON CO.,LTD.
* @version $Id$
*/
-class SC_Helper_Session_Test extends PHPUnit_Framework_TestCase
+class SC_Helper_Session_Test extends PHPUnit_Common_TestCase
{
/**
diff --git a/test/class/page/LC_Page_Admin_Products_ProductClass_Test.php b/test/class/page/LC_Page_Admin_Products_ProductClass_Test.php
index be76d5d40ac..58db26e9619 100644
--- a/test/class/page/LC_Page_Admin_Products_ProductClass_Test.php
+++ b/test/class/page/LC_Page_Admin_Products_ProductClass_Test.php
@@ -32,7 +32,7 @@
* @author Kentaro Ohkouchi
* @version $Id$
*/
-class LC_Page_Admin_Products_ProductClass_Test extends PHPUnit_Framework_TestCase
+class LC_Page_Admin_Products_ProductClass_Test extends PHPUnit_Common_TestCase
{
function setUp()
diff --git a/test/class/page/LC_Page_Test.php b/test/class/page/LC_Page_Test.php
index 0af015759c2..eb246d414e4 100644
--- a/test/class/page/LC_Page_Test.php
+++ b/test/class/page/LC_Page_Test.php
@@ -32,7 +32,7 @@
* @author LOCKON CO.,LTD.
* @version $Id:LC_Page_Test.php 15116 2007-07-23 11:32:53Z nanasess $
*/
-class LC_Page_Test extends PHPUnit_Framework_TestCase
+class LC_Page_Test extends PHPUnit_Common_TestCase
{
// }}}
diff --git a/test/class/page/Page_AllTests.php b/test/class/page/Page_AllTests.php
index 0031313209b..d0291501168 100644
--- a/test/class/page/Page_AllTests.php
+++ b/test/class/page/Page_AllTests.php
@@ -32,12 +32,12 @@
* @author Kentaro Ohkouchi
* @version $Id:LC_Page_Test.php 15116 2007-07-23 11:32:53Z nanasess $
*/
-class Page_AllTests extends PHPUnit_Framework_TestCase
+class Page_AllTests extends PHPUnit_Common_TestCase
{
public static function suite()
{
- $suite = new PHPUnit_Framework_TestSuite('Page');
+ $suite = new PHPUnit_Common_TestSuite('Page');
$suite->addTestSuite('LC_Page_Test');
return $suite;
diff --git a/test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php b/test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php
index 20f367f2ed8..129347d75b0 100644
--- a/test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php
+++ b/test/class/page/shopping/LC_Page_Shopping_LoadPaymentModule_Test.php
@@ -32,7 +32,7 @@
* @author Kentaro Ohkouchi
* @version $Id$
*/
-class LC_Page_Shopping_LoadPaymentModule_Test extends PHPUnit_Framework_TestCase
+class LC_Page_Shopping_LoadPaymentModule_Test extends PHPUnit_Common_TestCase
{
function setUp()
diff --git a/test/class/util/SC_Utils_Test.php b/test/class/util/SC_Utils_Test.php
index e29c51efe16..a412e6c88a2 100644
--- a/test/class/util/SC_Utils_Test.php
+++ b/test/class/util/SC_Utils_Test.php
@@ -32,7 +32,7 @@
* @author LOCKON CO.,LTD.
* @version $Id:LC_Page_Test.php 15116 2007-07-23 11:32:53Z nanasess $
*/
-class SC_Utils_Test extends PHPUnit_Framework_TestCase
+class SC_Utils_Test extends PHPUnit_Common_TestCase
{
// }}}
diff --git a/test/class/util/Util_AllTests.php b/test/class/util/Util_AllTests.php
index feb74c36dc3..753d1a05aac 100644
--- a/test/class/util/Util_AllTests.php
+++ b/test/class/util/Util_AllTests.php
@@ -32,12 +32,12 @@
* @author Kentaro Ohkouchi
* @version $Id:LC_Page_Test.php 15116 2007-07-23 11:32:53Z nanasess $
*/
-class Util_AllTests extends PHPUnit_Framework_TestCase
+class Util_AllTests extends PHPUnit_Common_TestCase
{
public static function suite()
{
- $suite = new PHPUnit_Framework_TestSuite('Util');
+ $suite = new PHPUnit_Common_TestSuite('Util');
$suite->addTestSuite('SC_Utils_Test');
return $suite;