Source for file LC_Page_Admin_Basis_Payment_Input.php
Documentation is available at LC_Page_Admin_Basis_Payment_Input.php
* This file is part of EC-CUBE
* Copyright(c) 2000-2007 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_PATH .
"pages/LC_Page.php");
* @author LOCKON CO.,LTD.
* @version $Id: LC_Page_Admin_Basis_Payment_Input.php 17911 2009-03-19 03:38:33Z Seasoft $
/** SC_UploadFile インスタンス */
$this->tpl_subtitle =
'支払方法設定';
$this->charge_flg =
$_POST["charge_flg"];
if(count($this->arrErr) ==
0) {
$this->tpl_onload=
"fnUpdateParent('".
URL_PAYMENT_TOP.
"'); window.close();";
$this->arrErr =
$this->objUpFile->checkEXISTS($_POST['image_key']);
$this->arrErr[$_POST['image_key']] =
$this->objUpFile->makeTempFile($_POST['image_key']);
$this->objUpFile->deleteFile($_POST['image_key']);
if($_POST['mode'] ==
"") {
$arrRet =
$this->lfGetData($_GET['payment_id']);
$this->charge_flg =
$arrRet["charge_flg"];
$this->tpl_payment_id =
$_GET['payment_id'];
$this->tpl_payment_id =
$_POST['payment_id'];
$this->arrDelivList =
$objDb->sfGetIDValueList("dtb_deliv", "deliv_id", "service_name");
$this->arrFile =
$this->objUpFile->getFormFileList(IMAGE_TEMP_URL, IMAGE_SAVE_URL);
$this->arrHidden =
array_merge((array)
$this->arrHidden, (array)
$this->objUpFile->getHiddenFileList());
$objView->assignobj($this);
$this->objUpFile->addFile("ロゴ画像", 'payment_image', array('gif'), IMAGE_SIZE, false, CLASS_IMAGE_WIDTH, CLASS_IMAGE_HEIGHT);
$this->objFormParam->addParam("支払方法", "payment_method", STEXT_LEN, "KVa", array("EXIST_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("手数料", "charge", PRICE_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("利用条件(~円以上)", "rule", PRICE_LEN, "n", array("NUM_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("利用条件(~円以下)", "upper_rule", PRICE_LEN, "n", array("NUM_CHECK", "MAX_LENGTH_CHECK"));
$this->objFormParam->addParam("配送サービス", "deliv_id", INT_LEN, "n", array("EXIST_CHECK", "NUM_CHECK", "MAX_LENGTH_CHECK"));
$where =
"payment_id = ?";
$arrRet =
$objQuery->select("*", "dtb_payment", $where, array($payment_id));
$arrRet =
$this->objUpFile->getDBFileList(); // ファイル名の取得
$sqlval['update_date'] =
'Now()';
if($sqlval['fix'] !=
'1') {
$sqlval['fix'] =
2; // 自由設定
$sqlval['creator_id'] =
$_SESSION['member_id'];
$sqlval['rank'] =
$objQuery->max("dtb_payment", "rank") +
1;
$sqlval['create_date'] =
'Now()';
$objQuery->insert("dtb_payment", $sqlval);
$where =
"payment_id = ?";
$objQuery->update("dtb_payment", $sqlval, $where, array($payment_id));
$arrPaymentData =
$this->lfGetData($_POST['payment_id']);
// 手数料を設定できない場合には、手数料を0にする
if($arrPaymentData["charge_flg"] ==
2) $this->objFormParam->setValue("charge", "0");
if($arrRet["rule"] <
$arrPaymentData["rule_min"] and $arrPaymentData["rule_min"] !=
""){
$objErr->arrErr["rule"] =
"利用条件(下限)は" .
$arrPaymentData["rule_min"] .
"円以上にしてください。<br>";
if($arrRet["upper_rule"] >
$arrPaymentData["upper_rule_max"] and $arrPaymentData["upper_rule_max"] !=
""){
$objErr->arrErr["upper_rule"] =
"利用条件(上限)は" .
$arrPaymentData["upper_rule_max"] .
"円以下にしてください。<br>";
$objErr->doFunc(array("利用条件(~円以上)", "利用条件(~円以下)", "rule", "upper_rule"), array("GREATER_CHECK"));
Documentation generated on Tue, 28 Apr 2009 18:10:46 +0900 by phpDocumentor 1.4.2