<?php include("../../include/dbconnect.php");?>
<title>Stock Register Printing</title>
<body bgcolor="#ffffff"  topmargin=0>
<center>
<table cellpadding=0 cellspacing=4 width=590>
<tr>
<td style="padding:3px;" colspan=2 bgcolor="#93BEE2"><font class="Wf"><b>Select Period to Print</b></font></td>
</tr><tr valign="top"><td colspan=2>
<font class="Wf">&nbsp;</font>
</td>
</tr>
</table>
<SCRIPT LANGUAGE="JavaScript" src="../../include/CalendarPopup.js"></SCRIPT>
<SCRIPT LANGUAGE="JavaScript">
var cal = new CalendarPopup();
</SCRIPT>
<table border=0 cellpadding=3 cellspacing=4 width="590">
<form method="POST" name="regform" action="stockreport.php" target="_blank">
    <tr > 
        <td width="139" height="31" align="right" ><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#003366">Company
          &nbsp;</font></b></font></td><td>

<select name=compcode>
<?php $query=" select compcode,name from company  order by name";
      $query=stripslashes($query);
      $result=mysqli_query($conn,$query) or
      die( mysqli_error() );
      while ( $row= mysqli_fetch_row($result))
      {
          echo "<option value='$row[0]'>";
          echo ($row[1]);
	  echo "\n";	  
      }
?>
</select>  
</td></tr>

      <tr > 
        <td align="right" width="122" bgcolor="#FFFFFF"><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#003366">Select 
          Product &nbsp;</font></b></font></td>
        <td colspan=2 bgcolor="#FFFFFF"> 
		<select name=prodcode[] multiple size="10">
            <?php
      $query="select distinct prodcode,prodname from product  order by prodname ";
      $query=stripslashes($query);
      
      $result=mysqli_query($conn,$query) or die( mysqli_error() );
      while ( $row= mysqli_fetch_row($result))
      {         
      echo "<option value=$row[0]>";
	  echo("$row[1]");
	  echo ("\n");
      }
      
?>
          </select></td> </tr>



<tr><td ><font class="sbd">Starting Date</font></td><td>
		<?
		$stdt = $mystartdt;
		//$stdt=strftime ("%d/%m/%Y", mktime(0,0,0,date("m"),date("d"),date("Y"))); ?>
		<input name="stdt" type="text" onKeyPress="return event.keyCode!=13" class="text_box_button" value="<?=$stdt?>" size="10"   > 
		<a href="#" onClick="cal.select(document.regform.stdt,'anchor1','dd/MM/yyyy'); return false;"name="anchor1" id="anchor1"><img  src="../../images/cal.gif" border="0"></a> 
		</td>
<tr><td ><font class="sbd">Ending Date</font></td><td>
		<?
		
		$edt=strftime ("%d/%m/%Y", mktime(0,0,0,date("m"),date("d"),date("Y"))); ?>
		<input name="edt" type="text" onKeyPress="return event.keyCode!=13" class="text_box_button" value="<?=$edt?>" size="10"   > 
		<a href="#" onClick="cal.select(document.regform.edt,'anchor1','dd/MM/yyyy'); return false;"name="anchor1" id="anchor1"><img  src="../../images/cal.gif" border="0"></a> 
		</td>
</td></tr>



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

</table>
<br><br><font size=1><center><a href= "../../index.html">Return to index page</center></font>
                                                                             
</body>
</form>
