<?php include_once 'init.php';?>
<script type="text/javascript">
function LoadOrders(){
	$("#myDivpOrders").html('<p class="navLink"><br>　　读取数据中,请稍等......<br><br>( loaddetails)</p>');
	var url = "order-details.php?_dc="+new Date().getTime()+"&oid=" + document.getElementById('select-native-2').value
	$("#myDivpOrders").load(url).trigger('create');
}
function init(){
	$("#myDivpOrders").text('');
}</script>
订单信息<?php if (!isset($LastOrderID)) echo '<form id="form1" name="form1" method="post" action="">
 <input type="submit" name="neworder" id="neworder" value="新订单" style="height:50px;width:80px;" />
  <input name="newOrder" type="hidden" id="newOrder" value="1" />
 <input name="CustomerID" type="hidden" id="CustomerID" value="'.$GUID.'" />
  <input name="MyComputerName" type="hidden" id="MyComputerName" value="'.$CompanyName.'" /><input type="hidden" name="showMenu" value="orders"/>
</form>'; ?>  
<div class="ui-field-contain">
    <select name="select-native-2" id="select-native-2" data-mini="true" onchange="LoadOrders()">
<?php 
 	$SQlStr="select  [OrderID],RequiredDate, SubTotal,[Status] from [Orders] where CustomerID  ='".$GUID."'  order by OrderID desc";
 	//$SQlStr="select  [OrderID],RequiredDate, [Status] from [Orders]  order by OrderID desc";
	//echo $SQlStr;
		 
			 $values = $orders->query($SQlStr);
if (is_iterable($values)){
  foreach ($values  as $pOrders)
			{  $Line1++; 
        $pOrders['Status'] = loadFromMssql($pOrders['Status']);
 ?>

             <option value="<?php echo $pOrders['OrderID'];?>" ><?php echo $pOrders['RequiredDate']. "  ".$pOrders['Status']. "  ".$pOrders['SubTotal']  ;?></option>
                       	
						<?php }
		} 
?>
    </select>
</div> 
<span  id="myDivpOrders"></span> 

