<?php include("../../include/dbconnect.php");

?>

<title>Order Book  for a Period</title>
<body background="blater01.gif" topmargin=0>
<center>
<table cellpadding=0 cellspacing=4 width=590>
<tr>
<td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font class="Wf"><b>Print Order Book for the period</b></font></td>
</tr><tr valign="top"><td colspan=2>
<font class="Wf">&nbsp;</font>
</td>
</tr>
</table>

<form method="POST"  action="order_book_new.php">
<table border=0 cellpadding=3 cellspacing=4 width="590">
<tr> 
<td width="139" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Customer / Client
  &nbsp;</b></font></td><td>



<select name=bcode1[] size =10 multiple>
<?php
$query = "select bcode,name,unit from buy where buyertype != 'LABOUR' order by name";
$query = stripslashes($query);
$result= mysql_query($query) or     die (mysql_error() );
     while($row=mysql_fetch_row($result) )
       {
	   
	   if($row[3]== 'LABOUR')
	   {
		   	$type='------>>'.$row[3];
		}
		elseif($row[3]!= 'LABOUR')
		{
			$type ='';
		}
		
        echo "<option value=$row[0]>";
	echo $row[1].'&nbsp;&nbsp;'.$row[2].$type;
	echo "\n";
	}
?>
</select>
</td></tr>
<?
$today = date(d).'-'.date(m).'-'.date(Y);
?>

<tr>
<td width="139" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Starting Date
  &nbsp;</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   class="Wf" name="startdt" size=12 value=<?php echo($today); ?>></td></tr>

<tr>
<td width="139" height="31" align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Ending Date
  &nbsp;</b></font></td><td>
<input type="text"    onKeyPress="return event.keyCode!=13"   class="Wf" name="enddt" size=12 value=<?php echo($today); ?>></td></tr>

</td></tr>


    <tr> 
    <td align="right" ><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>List by</b></font></td></tr>
    <tr><td>&nbsp;</td><td align="left"> <input type="radio"    onKeyPress="return event.keyCode!=13"   name="order_type" value = "schedule_date"> <font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Schedule Date</b></font></td></tr>
 <tr><td>&nbsp;</td><td align="left"> <input type="radio"    onKeyPress="return event.keyCode!=13"   name="order_type" value = "order_date"> <font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Order Date</b></font></td></tr>
 <tr><td>&nbsp;</td><td align="left"><input type="radio"    onKeyPress="return event.keyCode!=13"   name="order_type" value = "inv_date"> <font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Invoice Date</b></font></td></tr>
 <tr><td>&nbsp;</td><td align="left"><input type="radio"    onKeyPress="return event.keyCode!=13"   name="order_type" value = "due_date"> <font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Due Date</td></tr>
  </tr> 

</table>
<table cellpading=0 cellspacing=10 width= 50>
<tr>
<td>
 <blockquote>  <input type =submit name=submit value = "Submit"></blockquote>
</table>

<center><font color="#000080"><font size="+1"><a href="../../index.html">Exit </a></font></center>

</body>
</form>
