Source for file LC_Page_Admin_System_Parameter.php
Documentation is available at LC_Page_Admin_System_Parameter.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2011 LOCKON CO.,LTD. All Rights Reserved.
* http://www.lockon.co.jp/
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* 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 CLASS_EX_REALDIR . 'page_extends/admin/LC_Page_Admin_Ex.php';
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Admin_System_Parameter.php 20970 2011-06-10 10:27:24Z Seasoft $
$this->tpl_mainpage = 'system/parameter.tpl';
$this->tpl_subno = 'parameter';
$this->tpl_mainno = 'system';
$this->tpl_maintitle = 'システム設定';
$this->tpl_subtitle = 'パラメーター設定';
$masterData = new SC_DB_MasterData_Ex();
$this->arrKeys = $this->getParamKeys($masterData);
switch ($this->getMode()) {
$this->arrErr = $this->errorCheck($this->arrKeys, $this->arrForm);
if (empty($this->arrErr)) {
$this->update($this->arrKeys, $this->arrForm);
$this->tpl_onload = "window.alert('パラメーターの設定が完了しました。');";
$this->arrValues = SC_Utils_Ex::getHash2Array($this->arrForm,
$this->tpl_onload = "window.alert('エラーが発生しました。入力内容をご確認下さい。');";
if (empty($this->arrErr)) {
$this->arrValues = SC_Utils_Ex::getHash2Array(
$masterData->getDBMasterData("mtb_constants"));
$masterData->getDBMasterData("mtb_constants",
array('id', 'remarks', 'rank')));
* 画面の設定値で mtb_constants テーブルの値とキャッシュを更新する.
function update(&$arrKeys, &$arrForm) {
$masterData = new SC_DB_MasterData_Ex();
foreach ($arrKeys as $key) {
$data[$key] = $arrForm[$key];
$masterData->updateMasterData('mtb_constants', array(), $data);
$masterData->createCache('mtb_constants', array(), true, array('id', 'remarks'));
* @param array $arrForm $_POST 値
function errorCheck(&$arrKeys, &$arrForm) {
$objErr = new SC_CheckError_Ex($arrForm);
for ($i = 0; $i < count($arrKeys); $i++ ) {
$objErr->doFunc(array($arrKeys[$i],
array("EXIST_CHECK_REVERSE", "EVAL_CHECK"));
* @return array パラメーターのキーの配列
function getParamKeys(&$masterData) {
foreach ($masterData->getDBMasterData("mtb_constants") as $key => $val) {
Documentation generated on Fri, 24 Feb 2012 14:01:50 +0900 by Seasoft
|