<table width="100%" border="1" align="center">
				  <tr>
					<td width="91" align="center" bgcolor="#EB9C00">台号</td>
					<td width="142" align="center" bgcolor="#EB9C00">状态</td>
				  </tr>
				  
				<?php
					  
					$sql = "SELECT    Customers.CompanyName,    Orders.Status,   Customers.Phone,    Orders.CustomerID,    Orders.OrderID,    Orders.Body  FROM ";
					$sql .= "    Orders INNER JOIN  Customers ON Orders.CustomerID = Customers.CustomerID";
					$sql .= "  WHERE   (Orders.Status = '结账中') OR (Orders.Status = '服务中') OR (Orders.Status IS NULL)";
				
$values = $orders->query($sql);
if (is_iterable($values)){
  foreach ($values as $p){ 
$p['CompanyName']=loadFromMssql($p['CompanyName']);
$p['Status']=loadFromMssql($p['Status']);
$p['Phone']=loadFromMssql($p['Phone']);

						  echo '<tr><td  align="center"  bgcolor="#EACA00">'.$p['CompanyName'].'</td> <td  align="center"  bgcolor="#EACA00">';
						  
						echo '<form id="form1" method="post" action="">';
						echo '  <input type="submit" name="button" id="button" value="'.$p['Status'].'" style= "width:100px;" />';
						echo '  <input type="hidden" name="OrderID" id="OrderID" value="'.$p['OrderID'].'"/>';
						echo '  <input type="hidden" name="CompanyName" id="CompanyName" value="'.$p['CompanyName'].'"/>';
						echo '  <input type="hidden" name="Body" id="Body" value="'.$p['Body'].'"/>';
						echo '  <input type="hidden" name="Status" id="Status" value="'.$p['Status'].'"/>';
						echo '</form>';
				 
						  
						  echo '</td></tr>';
					  }
}
 				?>
				  
				</table>