<?php

require_once(dirname(dirname(__FILE__)) . '/app.php');
need_login();

if(!$_GET){
    Session::Set('error',"没有选择订单！");
    Utility::Redirect(WEB_ROOT."/order/index.php");
}
$order_number = $_GET['order_number'];


$condition['order_number'] = $order_number;
$count = Table::Count('order_item', $condition);
list($pagesize, $offset, $pagestring) = pagestring($count, 50);
$order_item = DB::LimitQuery('order_item', array(
	'condition' => $condition,
	'order' => 'ORDER BY id ASC',
	'size' => $pagesize,
	'offset' => $offset,
));
$order_info = Table::Fetch('order_info',$order_number,'order_number');
$state = $INI['sys']['order'];
if(count($order_item)==0){
    Session::Set('error','没有任何订单信息！');
}

include template('order_item');
?>
