<?php include("../../include/dbconnect.php");?>
<title>Sales 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 face="Arial, Helvetica, sans-serif" class="Wf"><b>Select 
      Period to Print</b></font></td>
  </tr>
  <tr valign="top">
    <td colspan=2> <font face="Arial, Helvetica, sans-serif" class="Wf">&nbsp;</font> 
    </td>
  </tr>
</table>
<table border=0 cellpadding=3 cellspacing=4 width="590">
  <SCRIPT LANGUAGE="JavaScript" src="../../include/CalendarPopup.js"></SCRIPT>
  <SCRIPT LANGUAGE="JavaScript">
var cal = new CalendarPopup();
</SCRIPT><form method="POST" name="regform" action="collection_print.php" target="_blank">
  <tr > 
    <td width="139" height="31" align="right" ><font face="Verdana, Arial, Helvetica, sans-serif" size="1"><b><font color="#003366" face="Arial, Helvetica, sans-serif">Company 
      &nbsp;</font></b></font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <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>
      </font>
  </td></tr>
  <tr>

  <tr>
    <td ><strong><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Starting Date</font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <?
		$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> 
      </font></td>
  <tr>
    <td ><strong><font color="#003366" size="1" face="Verdana, Arial, Helvetica, sans-serif"><b>Ending Date</font></td>
    <td> <font face="Arial, Helvetica, sans-serif"> 
      <?
		
		$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> 
      </font></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>
