<link href="wstyle.css" rel="stylesheet" type="text/css" />
<script src="SpryAssets/SpryValidationSelect.js" type="text/javascript"></script>
<link href="SpryAssets/SpryValidationSelect.css" rel="stylesheet" type="text/css" />
<div align="center">
<? if ($_GET['stat'] == '' ) { ?>
<table width="100%" border="0">
  <tr>
    <td class="td1">ID</td>
    <td class="td1">Date</td>
    <td class="td1">Time</td>
    <td class="td1">Plate No.</td>
    <td class="td1">Type</td>
    <td colspan="2" class="td1">Size</td>
    <td class="td1">Remarks</td>
    <td class="td1">Fixing</td>
    <td class="td1">urgency</td>
  </tr>
		<?
            $result = mysql_query('SELECT *  FROM p1_order_info where status = 2 order by Type2 desc , Time_a, oid',$db); 
            while($row = mysql_fetch_array($result)){ 
        
        ?>
  <tr <? if( $row['Type2'] == '1') { ?>class="td4" <? }else{ ?> class="td2" <? } ?>>
    <td><? echo $row['oid']; ?></td>
    <td><div align="center"><? echo $row['Date_a']; ?></div></td>
    <td><div align="center"><? echo $row['Time_a']; ?></div></td>
    <td><div align="center"><? echo $row['Plate']; ?></div></td>
    <td><div align="center"><?	
                        $result1 = mysql_query('select * from p1_plate_type where tyid = '.$row['Type1']); 
                        while($row1 = mysql_fetch_array($result1)){ 
                				echo $row1['plate_type'] ;
								
            
					}
				?></div></td>
    <td><div align="center"><? echo $row['Size1']; ?></div></td>
    <td><div align="center"><? echo $row['Size2']; ?></div></td>
    <td><div align="center"><? echo $row['Remarks']; ?></div></td>
    <td><div align="center"><a href="index.php?page=4&stat=fixing&id=<? echo $row['oid']; ?>&plate=<? echo $row['Plate']; ?>" <? if( $row['Type2'] == '1') { ?>class="td4" <? }else{ ?> class="td2" <? } ?>>Fixing</a></div></td>
    <td> <? if( $row['Type2'] == '1') { ?>Yes<? }else{ ?>No<? } ?></td>
  </tr>
		<?
			}
		
		?>
</table>

<? } if ($_GET['stat'] == 'fixing' ) { ?>
	<form id="form1" name="form1" method="post" action="index.php?page=4&stat=change&id=<? echo $_GET['id']; ?>">
    
      <table width="60%" border="0">
      <tr>
            <td width="30%" class="td1">Plate No.</td>
        <td class="td2">&nbsp;<? echo $_GET['plate'];?></td>
          </tr>
          <tr>
            <td class="td1">Technitian Name</td>
            <td class="td2"><span id="spryselect1">
              <label>
              <select name="tid" class="select_box" id="tid">
              	<option value=""> ---> </option>
					<?
                        $result = mysql_query('SELECT * FROM p1_technitian where stop_technitian = 0',$db); 
                        while($row = mysql_fetch_array($result)){ 
                    
                    ?>
              	<option value="<? echo $row['tid']; ?>"><? echo $row['technitian']; ?></option>
                	<?
						}
					?>
              </select>
              </label>
            <span class="selectRequiredMsg">Please select an technitian.</span></span></td>
          </tr>
      </table>
    
        <p>
          <input name="button" type="submit" class="Submit" id="button" value="    Save   " />
      </p>
	</form>
	<p>&nbsp;</p>


<? } ?>


</div>
<script type="text/javascript">
<!--
var spryselect1 = new Spry.Widget.ValidationSelect("spryselect1");
//-->
</script>
