Esempio n. 1
0
<?php

//load model
require_once 'backend/models/orders.php';
if (isset($_GET['oid'])) {
    $oid = intval($_GET['oid']);
} else {
    $oid = 0;
}
$order = get_a_record('orders', $oid);
if (!$order) {
    show_404();
}
//data
$title = 'Chi tiết đơn hàng';
$user = $_SESSION['user'];
$order_detail = order_detail($oid);
//load view
require 'backend/views/order/view.php';
Esempio n. 2
0
     die('wrong orders!');
 }
 if (empty($_REQUEST['sdate'])) {
     die('wrong best_time!');
 }
 $order_count = $goods_count = 0;
 $html = '';
 $bdate = trim($_REQUEST['sdate']);
 $order_sn_list = explode(',', $_REQUEST['order_id']);
 $n = in_array('all', $order_sn_list) ? count($order_sn_list) - 2 : count($order_sn_list) - 1;
 foreach ($order_sn_list as $key => $order_id) {
     if ($order_id != 'all') {
         $admin_id = $_SESSION['admin_id'];
         $group = $_SESSION['city_group'];
         $psn = get_print_sn($order_id, $bdate, $admin_id, $group, 2);
         @($order = order_detail($order_id));
         //print_r($order);
         @($pay = pay_info($order_id));
         //print_r($pay);
         @($goods = print_goods($order_id));
         //print_r($goods);
         $sql = "select a.turn,b.route_name from order_dispatch as a,ship_route as b where a.route_id=b.route_id and a.order_id=" . $order_id;
         $pack = $db_read->getRow($sql);
         //print_r($pack);
         //获取冰包号
         $sql = "select ice_bag_num from order_ice_bag where order_id = {$order_id} limit 1";
         $ice_bag_arr = $db_read->getAll($sql);
         //print_r($ice_bag_arr);
         $ice_bage_str = '';
         foreach ($ice_bag_arr as $v) {
             if ($v['ice_bag_num'] < 10) {