代码拉取完成,页面将自动刷新
<?php
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
if($_POST){
$order_sn = !empty($_POST['order_sn']) ? trim($_POST['order_sn']) : '';
if(empty($order_sn)){
$data['status'] = 0;
$data['info'] = '订单号不能为空';
}else{
$sql = "SELECT order_id FROM " . $GLOBALS['ecs']->table('order_info') . " WHERE order_sn = '{$order_sn}' ";
$order_id = $GLOBALS['db']->getOne($sql);
if(empty($order_id)){
$data['status'] = 0;
$data['info'] = '订单号不存在';
}else{
include_once(ROOT_PATH . 'includes/lib_order.php');
$order = order_info($order_id);
if($order['order_status'] == '1' && $order['shipping_status'] == '0' && $order['pay_status'] == '2'){
$new_status['order_status'] = 5;
$new_status['shipping_status'] = 2;
$new_status['pay_status'] = 2;
update_order($order_id, $new_status);
$data['status'] = 1;
$data['info'] = '订单自提成功,自提日期:'.date("Y-m-d H:i:s");
}else{
$data['status'] = 0;
$data['info'] = '该订单非自提订单,或者已经自提';
}
}
}
$smarty->assign('order_sn', $order_sn);
$smarty->assign('data', $data);
}
$smarty->display('order_manage.dwt');
?>
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。