Source for file LC_Page_Admin_Order_Status.php
Documentation is available at LC_Page_Admin_Order_Status.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.
$this->tpl_subnavi =
'order/subnavi.tpl';
$this->tpl_subno =
'status';
$this->tpl_subtitle =
'ステータス管理';
$this->arrORDERSTATUS =
$masterData->getMasterData("mtb_order_status");
$this->arrORDERSTATUS_COLOR =
$masterData->getMasterData("mtb_order_status_color");
$this->arrPayment =
$objDb->sfGetIDValueList("dtb_payment", "payment_id", "payment_method");
if (!isset
($_POST['mode'])) $_POST['mode'] =
"";
if (!isset
($_POST['search_pageno'])) $_POST['search_pageno'] =
1;
if (!isset
($_POST['change_status'])) $_POST['change_status'] =
"";
if (!empty($_POST['change_status'])) {
$this->lfStatusMove($_POST['change_status'], $_POST['move']);
$status = isset
($_POST['status']) ?
$_POST['status'] :
"";
$status = isset
($_POST['status']) ?
$_POST['status'] :
"";
$this->SelectedStatus =
$status;
$objView->assignobj($this);
$objView->display(MAIN_FRAME);
$where =
"del_flg = 0 AND status = ?";
$order =
"order_id DESC";
$linemax =
$objQuery->count($from, $where, $arrval);
$this->tpl_linemax =
$linemax;
$page_max =
ORDER_STATUS_MAX;
$objNavi =
new SC_PageNavi($pageno, $linemax, $page_max, "fnNaviSearchOnlyPage", NAVI_PMAX);
$this->tpl_strnavi =
$objNavi->strnavi; // 表示文字列
$startno =
$objNavi->start_row;
$this->tpl_pageno =
$pageno;
$objQuery->setlimitoffset($page_max, $startno);
$objQuery->setorder($order);
$this->arrStatus =
$objQuery->select($select, $from, $where, $arrval);
$arrORDERSTATUS =
$masterData->getMasterData("mtb_order_status");
$arrUpdate =
array('update_date' =>
'NOW()');
$col =
'customer_id, add_point, use_point, status';
$message =
''; // ステータス変更後にポップアップするメッセージの内容
if ( $status_id ==
'delete' ) {
$arrUpdate['del_flg'] =
$delflg;
elseif ( $status_id ==
ORDER_DELIV ) {
$arrUpdate['status'] =
$status_id;
$arrUpdate['commit_date'] =
'NOW()';
$message =
$arrORDERSTATUS[$status_id] .
'へ移動';
$arrUpdate['status'] =
$status_id;
$message =
$arrORDERSTATUS[$status_id] .
'へ移動';
foreach ( $arrMove as $val ){
if ( $status_id ==
ORDER_DELIV ) {
$arrRet =
$objQuery->select($col, $table, $where, array($val));
$customer_id =
$arrRet[0]['customer_id'];
$add_point =
$arrRet[0]['add_point'];
$status =
$arrRet[0]['status'];
if($customer_id !=
"" &&
$customer_id >=
1) {
$arrRet =
$objQuery->select("point", 'dtb_customer', 'customer_id = ?', array($customer_id));
$arrRet[0]['point']+=
$add_point;
$sqlval['point'] =
$arrRet[0]['point'];
$objQuery->update('dtb_customer', $sqlval, 'customer_id = ?', array($customer_id));
elseif ( $status_id ==
ORDER_CANCEL ) {
$arrRet =
$objQuery->select($col, $table, $where, array($val));
$customer_id =
$arrRet[0]['customer_id'];
$add_point =
$arrRet[0]['add_point'];
$use_point =
$arrRet[0]['use_point'];
$status =
$arrRet[0]['status'];
if($customer_id !=
"" &&
$customer_id >=
1) {
$arrRet =
$objQuery->select("point", 'dtb_customer', 'customer_id = ?', array($customer_id));
$arrRet[0]['point']-=
$add_point;
$arrRet[0]['point']+=
$use_point;
$sqlval['point'] =
$arrRet[0]['point'];
$objQuery->update('dtb_customer', $sqlval, 'customer_id = ?', array($customer_id));
$arrRet =
$objQuery->select("point", 'dtb_customer', 'customer_id = ?', array($customer_id));
$arrRet[0]['point']+=
$use_point;
$sqlval['point'] =
$arrRet[0]['point'];
$objQuery->update('dtb_customer', $sqlval, 'customer_id = ?', array($customer_id));
$arrRet =
$objQuery->select($col, $table, $where, array($val));
$customer_id =
$arrRet[0]['customer_id'];
$add_point =
$arrRet[0]['add_point'];
$use_point =
$arrRet[0]['use_point'];
$status =
$arrRet[0]['status'];
if($customer_id !=
"" &&
$customer_id >=
1) {
$arrRet =
$objQuery->select("point", 'dtb_customer', 'customer_id = ?', array($customer_id));
$arrRet[0]['point']-=
$add_point;
$sqlval['point'] =
$arrRet[0]['point'];
$objQuery->update('dtb_customer', $sqlval, 'customer_id = ?', array($customer_id));
$arrRet =
$objQuery->select("point", 'dtb_customer', 'customer_id = ?', array($customer_id));
$arrRet[0]['point']-=
$use_point;
$sqlval['point'] =
$arrRet[0]['point'];
$objQuery->update('dtb_customer', $sqlval, 'customer_id = ?', array($customer_id));
$arrRet =
$objQuery->select("point", 'dtb_customer', 'customer_id = ?', array($customer_id));
$sqlval['point'] =
$arrRet[0]['point'];
$objQuery->update('dtb_customer', $sqlval, 'customer_id = ?', array($customer_id));
$objQuery->update($table, $arrUpdate, $where, array($val));
$this->tpl_onload =
"window.alert('選択項目を" .
$message .
"しました。');";
Documentation generated on Tue, 28 Apr 2009 18:11:28 +0900 by phpDocumentor 1.4.2