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

?>

 
<head>
<meta http-equiv=Content-Type content="text/html; charset=windows-1252">
<title>wilson Invoice</title>

</head>
<body bgcolor="#FFFFFF" class="Normall" lang=EN-US>
<?

$fname = 'print.txt';
$delfile = "/tmp/print.txt";
if(file_exists($delfile))
 {
  unlink($delfile);
 }
//if(!($myfile=fopen("d:/temp/print.txt","w")))
if(!($myfile=fopen("/tmp/print.txt","w")))
{
  print("file couldnot be opened");
}
for($incount=0;$incount <count($invnos);$incount++)
{

		$sno=1;
		$invresult = mysql_query("select  distinct bcode,prodcode,prepare_time,compcode from labourinv where account_year='$account_year1' and invno = '$invnos[$incount]'  ") or die(mysql_error());			
		$row=mysql_fetch_row($invresult);
		
		$invno = $invnos[$incount];
		$bcode = $row[0];
		$prodcode = $row[1]; 
		$date = substr($tdate,8,2).'-'.substr($tdate,5,2).'-'.substr($tdate,0,4);
		$prepare_time= $date.'/'.$row[2];
		$compcode = $row[3];
		
		$temp_order='';
		$orderno='';
		$schedule_no='';
		$poresult = mysql_query("select  po_no,po_date,schedule_no,schedule_date from labourinv where account_year='$account_year1' and invno = '$invnos[$incount]'  and drawing_no != 'TOTAL' order by po_no ") or die(mysql_error());
		while($porow =mysql_fetch_row($poresult))
		{
					$po_date = substr($porow[1],8,2).'-'.substr($porow[1],5,2).'-'.substr($porow[1],0,4);
					$schedule_date = substr($porow[3],8,2).'-'.substr($porow[3],5,2).'-'.substr($porow[3],0,4);
					if($temp_order != $porow[0])
					{
				
						$orderno = $porow[0].'/'.$po_date.',';
						$temp_order = $porow[0];					}
   					     $schedule_no = $schedule_no.$porow[2].'/'.$schedule_date.',';
		}

	$result = mysql_query("select  name,address1,address2,city,state,pin,cst,tin,telno,fax from company where compcode ='$compcode' ") or die(mysql_error());
	$row=mysql_fetch_row($result);
	$name=$row[0];
	$address = $row[1].',&nbsp;'.$row[2].',&nbsp;'.$row[3].'-&nbsp;'.$row[5].',&nbsp;'.$row[4];
	$tin=$row[7];
	//$cst=$row[6];
	$city=$row[3];	
    $tel_no = $row[8];
	$fax=$row[9];
	$vendercode=$row[10];
				


		
		$result= mysql_query("select name,address1,address2,city,state,pin,cst,gstin,taxtype,eccno,unit ,vendercode from buy where bcode ='$bcode' ") or die(mysql_error());
		$row = mysql_fetch_row($result);
		$bname = $row[0].'  '.$row[10];
		$baddress1=$row[1];
		$baddress2=$row[2];
		if(!empty($row[4]))
		{
			$bcity = $row[3].','.$row[4];
		}
		else
		{
			$bcity= $row[3];
		}
		//$bcst=$row[6];
		$btin=$row[7];
		$btaxtype2=$row[8];
		$eccno= $row[9];
		$vendercode=$row[11];
	?>			
    
    
<table>
<tr><td width="893" height="634">

   <table width="894" border=0 cellpadding=0 cellspacing=0 class=MsoTableGrid>
  <tr><td width="128" rowspan="4"><img src="../../images/logo.jpg" width="103" height="99" align="right"></td>
     
    <td width="655" align="center"><div align="center"><font size="+3" face="Arial, Helvetica, sans-serif"><? echo($name);?></font></div></td>
    <td width="111" align="center">&nbsp;</td>
    </tr>

	    <tr>
	      <td width="655" align="center"><div align="center"><font  face="Arial, Helvetica, sans-serif"><? echo($address);?></font></div></td>
	      <td width="111" height="21" align="center">&nbsp;</td>
        </tr>
		    <tr>
		      <td width="655" align="center"><div align="center"><font  face="Arial, Helvetica, sans-serif">Phone : &nbsp;<? echo($tel_no);?></td>
		      <td width="111" height="21" align="center">&nbsp;</td>
	        </tr>

		    <tr>
		      <td width="655" align="center"><div align="center"><font  face="Arial, Helvetica, sans-serif"><b>GSTIN : &nbsp;<? echo($tin);?>&nbsp;&nbsp;STATE CODE : 33</b></font></div></td>
		      <td width="111" height="21" align="center">&nbsp;</td>
	        </tr>
</table>
   <table width="895" border=0 cellpadding=0 cellspacing=0 class=MsoTableGrid>



  <tr>
    <td  align="center"><font  face="Arial, Helvetica, sans-serif">
      <h2>LABOUR INVOICE </h2>
    </font></td>
    <td align="center">&nbsp;</td>
    </tr>
  </table>
  
  	<?	
		$result = mysql_query("select  name,address1,address2,city,state,pin,gstin,std,telno,eccno,state_code,vendercode from buy where bcode ='$bcode' ") or die(mysql_error());
		$row=mysql_fetch_row($result);
		$bname=$row[0];
			$bcity=$row[3];
		$baddress = $row[1].',&nbsp;'.$row[2].',&nbsp;'.$row[3].',&nbsp;'.$row[4].',&nbsp;'.$row[5];
		if($vendercode !='')
		{
			$baddress = $baddress;
		}
		$btin='GSTIN:&nbsp;'.$row[6].'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>STATE CODE:&nbsp;'.$row[10];
		$vendercode = 'Vendercode:'.$row[11];

		
?>
<table width="896"  border="1" rules="cols">
    <tr>       <td  valign=top class="Normall" ><font  face="Arial, Helvetica, sans-serif">
	  Name &amp; Address of  Buyer&nbsp;<br/><b>M/s.&nbsp; <? echo($bname);?></b></font></td>
      <td width="225" rowspan="2"   align="right" valign=top class="Normall"><div align="left"><strong><font  face="Arial, Helvetica, sans-serif"> Order No:
        <?=$orderno?>
      </font></strong></div></td>
      <td width="246"   align="left" valign=top class="Normall"><div align="right"><font  face="Arial, Helvetica, sans-serif"> <b>Invoice
        No. &nbsp; <? echo($invnos[$incount].'/'.$account_year);?></b></font></div></td></tr>
		  <tr>
		        <td width="403"  valign=top class="Normall" ><font  face="Arial, Helvetica, sans-serif">&nbsp;<? echo($baddress);?></font></td>
            <td width=246  align="right" class="Normall"><div align="right"><font  face="Arial, Helvetica, sans-serif"> <b> Date : &nbsp;<? echo($date);?></b></font></div></td>
    </tr>
	     <tr> 
      <td width=403 valign=top class="Normall"><font  face="Arial, Helvetica, sans-serif"><? echo($vendercode);?></font></td>
      <td width="225" rowspan="2" align="right"><div align="left"><strong><font  face="Arial, Helvetica, sans-serif">Challan No:&nbsp;
        <?=$schedule_no.'/'.$schedule_date?>
      </font></strong></div></td>
      <td align="right"><strong><font  face="Arial, Helvetica, sans-serif">Prepare Date and Time:<?=$prepare_time?></font></td></tr>
	  <tr><td width=403 valign=top class="Normall"><font  face="Arial, Helvetica, sans-serif"><b><? echo($btin);?></b></font></td>
	    <td width=246 valign=top class="Normall" align="right"><strong><font  face="Arial, Helvetica, sans-serif">Reverse Charges : Nil</font></strong></td>
	</table>
    <?
	/*
		$totline=0;
		
		fputs($myfile,chr(27).'C$'."\n");
		while($linecnt < 5)
		{
			fputs($myfile,"\n");
			$linecnt++;
		}
		
		fputs($myfile,chr(27).'M');		
		strcontrol($myfile,'',8);
		strcontrol($myfile,$bname,58);
		fputs($myfile,"\n");
		
		strcontrol($myfile,'',8);		
		strcontrol($myfile,$baddress1,57);		
		strcontrol($myfile,'',6);
		fputs($myfile,chr(14));
		strcontrol($myfile,$invnos[$incount],10);
		fputs($myfile,chr(18));
	  	fputs($myfile,"\n");
		
		strcontrol($myfile,'',8);		
		strcontrol($myfile,$baddress2,57);		
		fputs($myfile,"\n");
		
		strcontrol($myfile,'',8);		
		strcontrol($myfile,$bcity,59);		
	//	strcontrol($myfile,'',8);		
		strcontrol($myfile,$date,12);	
		fputs($myfile,"\n\n\n");			
		strcontrol($myfile,'',66);
		strcontrol($myfile,$orderno,30);		
	
		fputs($myfile,"\n\n\n");						
		
if(!empty($btin))
		{
		strcontrol($myfile,'',12);
		strcontrol($myfile,'TIN No: ',10);				
		strcontrol($myfile,$btin,50);
		}		
		fputs($myfile,"\n");

		if(!empty($vendercode))
		{
		strcontrol($myfile,'',8);
		strcontrol($myfile,'VENDOR CODE: ',12);				
		strcontrol($myfile,$vendercode,50);
		}	
		fputs($myfile,"\n");	
		if(!empty($bcst))
		{
		strcontrol($myfile,'',12);
		strcontrol($myfile,'CST',12);				
		strcontrol($myfile,$bcst,50);
		}		

		fputs($myfile,"\n\n\n");


		
		if(!empty($eccno))
		{
		strcontrol($myfile,'',12);
		strcontrol($myfile,'ECC No ',12);				
		strcontrol($myfile,$eccno,50);
		}		
		fputs($myfile,"\n");

		


			fputs($myfile,"\n");

*/

				
?>	
 <table width="896" border=1 cellpadding=0 cellspacing=0  rules = "cols" class=MsoTableGrid>
    <tr> 
      <td width=42 valign=top class="Normall" align="center"><font  face="Arial, Helvetica, sans-serif" > <span class=SpellE>Sl.No.</font></td>
      <td width=121 valign=top class="Normall" align="center"><font  face="Arial, Helvetica, sans-serif">HSN /ACS</font></td>	      <td width=199 valign=top class="Normall"  align="center"><div align="left"><font  face="Arial, Helvetica, sans-serif"> Drawing No/ Material Code</font></div></td>  
      <td width=198 valign=top class="Normall" align="center"><font  face="Arial, Helvetica, sans-serif"> Description of Goods</font></td>

      <td width=94 valign=top class="Normall"  align="center"><div align="right"><font  face="Arial, Helvetica, sans-serif"> Quantity(Nos)</font></div></td>
      <td width=85 valign=top class="Normall"  align="center"><div align="center"><font  face="Arial, Helvetica, sans-serif"> Rate </font></div></td>

      <td width=141 valign=top class="Normall"  align="center"><div align="right"><font  face="Arial, Helvetica, sans-serif"> Value</font></div></td>
 			

    </tr>

	<tr>
	<td><hr/></td>
	<td><hr/></td>
	<td><hr/></td>
	<td><hr/></td>
	<td><hr/></td>

	<td><hr/></td>
		<td><hr/></td>

	</tr>
		
<?
		
		$x=1;		
		$presult = mysql_query("select  bcode,prodcode from labourinv where account_year='$account_year1' and invno = '$invnos[$incount]'  and drawing_no!='TOTAL' ") or die(mysql_error());
		$prow= mysql_fetch_row($presult);
		$bcode = $prow[0];
		$prodcode =$prow[1];
		
	
					

		/*
		strcontrol($myfile,'',25);
		//strcontrol($myfile,$tariff,70);
		fputs($myfile,"\n\n\n");

		$linecnt= $linecnt+18;				
				*/	
		$result = mysql_query("select distinct drawing_no,bcode,prodcode from labourinv where account_year='$account_year1' and invno = '$invnos[$incount]'  and drawing_no != 'TOTAL' ") or die(mysql_error());
		while($row =mysql_fetch_row($result))
		{

			$invresult = mysql_query("select  sum(quantity),avg(rate),sum(value) from labourinv where account_year='$account_year1' and invno = '$invnos[$incount]'  and drawing_no='$row[0]' ") or die(mysql_error());
			$invrow= mysql_fetch_row($invresult);
			$qty = $invrow[0];
			$rate = round($invrow[1],2);
			$value = $invrow[2];


			$tresult = mysql_query("select prodname,tariff from product where product.bcode like  '$row[1]%' and product.prodcode like '$row[2]%'   ") or die(mysql_error());		
			$trow= mysql_fetch_row($tresult);
			$prodname = $trow[0];			
			$hsncode = $trow[1];

?>

	   <tr height="30"> 
      <td width=42 valign=top class="Normall" align="center"><font  face="Arial, Helvetica, sans-serif"><? echo($x);?>  </font></td>

      <td width=121 valign=top class="Normall" align="center"><font  face="Arial, Helvetica, sans-serif"><? echo($hsncode);?>   </font></td>
	        <td width=199 valign=top class="Normall" align="center"><font  face="Arial, Helvetica, sans-serif" ><? echo($row[0]);?>   </font></td>     

      <td width=198 valign=top align="left" class="Normall"><font  face="Arial, Helvetica, sans-serif"><? echo($prodname);?>  </font></td>
 
	  
      <td width=94 valign=top align="right" class="Normall"><font  face="Arial, Helvetica, sans-serif"><? echo($qty);?>  </font></td>
      <td width=85 valign=top align="right" class="Normall"><div align="center"><font  face="Arial, Helvetica, sans-serif"><? echo($rate);?>  </font></div></td>	  
      <td width=141 valign=top align="right" class="Normall"><font  face="Arial, Helvetica, sans-serif"><? echo(number_format($value,2,'.',''));?>  </font></td>
  				  	  
      </tr>
  	  <?
	  $x++;
			/*
			strcontrol($myfile,'',5);		
			strcontrol($myfile,$sno,6);
			strcontrol($myfile,$row[0],17);
			strcontrol($myfile,substr($prodname,0,30),30);
			numcontrol($myfile, number_format($qty,0),8);
			numcontrol($myfile,number_format($rate,2),11);
			numcontrol($myfile,$value,19);
			fputs($myfile,"\n");
			$linecnt++;
			$sno++;
			*/
			
for($ind=$x;$ind<15;$ind++)
{

	?>
	   <tr height="30"> 
      <td width=42 valign=top class="Normall" align="center"><font  face="Arial, Helvetica, sans-serif">&nbsp; </font></td>
      <td width=121 valign=top class="Normall"><font  face="Arial, Helvetica, sans-serif">&nbsp;  </font></td>
      <td width=199 valign=top class="Normall" align="center"><font  face="Arial, Helvetica, sans-serif" >&nbsp;  </font></td>

      <td width=198 valign=top align="right" class="Normall"><font  face="Arial, Helvetica, sans-serif">&nbsp; </font></td>
      <td width=94 valign=top align="right" class="Normall"><font  face="Arial, Helvetica, sans-serif">&nbsp;  </font></td>
      <td width=85 valign=top align="right" class="Normall"><font  face="Arial, Helvetica, sans-serif">&nbsp;  </font></td>
      <td width=141 valign=top class="Normall"><div align="center"><font  face="Arial, Helvetica, sans-serif">  </font></div></td>
     
      </tr>	
	<?
	
	}
				
		}
		
?>
	<tr>
	<td><hr/></td>
	<td><hr/></td>

	<td><hr align="center"/></td>
	<td><hr/></td>
		<td><hr/></td>
	<td><hr/></td>
<td><hr/></td>
	</tr>

<?		
		$result = mysql_query("select distinct packing_percent,packing_amt,taxcode, sgst_amt, cgst_amt, igst_amt, vat_percent, vat_amount,freight,total,round_off,gtotal ,value from labourinv where account_year='$account_year1' and invno = '$invnos[$incount]'  and drawing_no = 'TOTAL' ") or die(mysql_error());
		$row = mysql_fetch_row($result);
		$packing_percent = $row[0];
		$packing_amt=$row[1];
		$taxcode = $row[2];
		$sgst_amt=$row[3];
		$cgst_amt=$row[4];
		$igst_amt=$row[5];
		$vat_percent=$row[6];
		if($sgst_amt >0)
		{
					$tax_rate = $row[6]/2;
		}
		if($igst_amt >0)
		{
					$tax_rate = $row[6];
		}		
		$vat_amt=$row[7];
		$freight=$row[8];
		$total =$row[9];
		$round_off=$row[10];
		$gtotal = $row[11];
		$value=$row[12];
		$duty_posted=$row[13];
		
		$firsttotal = $value+$packing_amt;
		$secondtotal = $firsttotal + $bed_amt+$cess_amt;
		$thirdtotal = $secondtotal + $vat_amt;

?>

		
		   <tr> 

      <td valign=top class="Normall" align="center" ><font  face="Arial, Helvetica, sans-serif"> Total</font></td>
<td>&nbsp;</td>

      <td width=199 valign=top align="right" class="Normall"><div align="center"><font  face="Arial, Helvetica, sans-serif"></font></div></td>	  
      <td width=198 valign=top align="right" class="Normall">&nbsp;</td>
      <td width=94 valign=top align="right" class="Normall"><font  face="Arial, Helvetica, sans-serif">  </font></td>	  
	        <td width=85 valign=top align="right" class="Normall"><font  face="Arial, Helvetica, sans-serif"> </font></td>
      <td width=141 valign=top align="right" class="Normall"><font  face="Arial, Helvetica, sans-serif"><? echo(number_format($value,2));?>  </font></td>	  				  	  
      </tr>
	

	</table>
    		<table width="896" border="1" >
	<tr>

	<td valign=top  class="Normall" colspan="3" align="right"><font  face="Arial, Helvetica, sans-serif"> GST @ &nbsp;<?=$vat_percent?>%&nbsp;</font></td>
	<td width="136"  align="right"><div align="right"><font  face="Arial, Helvetica, sans-serif"><? echo($vat_amt);?></font></div></td>
	</tr>


 <?           	
    
	if($sgst_amt>0)
	{
	?>
	<tr class="border_bottom">

	<td width="32">&nbsp;</td><td width="430"  align="left" valign=top  class="Normall" ><div align="right"><font  face="Arial, Helvetica, sans-serif"> SGST &nbsp;@&nbsp;<?=$tax_rate?>&nbsp;% &nbsp;&nbsp;=><? echo($sgst_amt);?></font>
	  </div>
	  </div></td>


	<td valign=top  class="Normall"  align="left" ><div align="right"><font  face="Arial, Helvetica, sans-serif"> CGST &nbsp;@&nbsp;<?=$tax_rate?>&nbsp;% &nbsp;=><? echo($cgst_amt);?></font>
	  </div>
	  </div></td><td>&nbsp;</td>
	</tr>
    <?	
		}
	if($igst_amt>0)
	{
	?>
	<tr class="border_bottom">
<td>&nbsp;</td>
	<td valign=top  class="Normall"  align="right"><div align="right"><font  face="Arial, Helvetica, sans-serif"> IGST &nbsp;@&nbsp;<?=$tax_rate?>&nbsp;% =><? echo($igst_amt);?></font></div></td><td>&nbsp;</td>
	</tr>
    <?	
		}		
			
    
    
	if($freight >0)
	{
	?>
	<tr>

	<td valign=top  class="Normall" colspan="3" align="right"><font  face="Arial, Helvetica, sans-serif"> Freight </font></td>
	<td width="136"  align="right"><div align="right"><font  face="Arial, Helvetica, sans-serif"><? echo($freight);?></font></div></td>
	</tr>
	<?
	}	
	if($packing_amt >0)
	{
	?>
	<tr>

	<td valign=top  class="Normall" colspan="3" align="right"><font  face="Arial, Helvetica, sans-serif"> Packing and Forwarding Charges</font></td>
	<td width="136"  align="right"><div align="right"><font  face="Arial, Helvetica, sans-serif"><? echo($packing_amt);?></font></div></td>
	</tr>
	<?
	}
	if($round_off!=0)
	{
	?>
	<tr>

	<td valign=top  class="Normall" colspan="3" align="right"><font  face="Arial, Helvetica, sans-serif"> Round Off</font></td>
	<td width="136"  align="right"><div align="right"><font  face="Arial, Helvetica, sans-serif"><? echo(number_format($round_off,2));?></font></div></td>
	</tr>
	<?
	}
	
	?>
	


	
	
	<tr>
	<td height="59" colspan="2" valign=top  class="Normall"><font  face="Arial, Helvetica, sans-serif">E&amp;OE</font></td>
	  

	<td width=270   class="Normall"><font  face="Arial, Helvetica, sans-serif"><b>Grand TotalRs.</b></font></td>
	<td width="136"  align="right"><div align="right"><font  face="Arial, Helvetica, sans-serif"><b><? echo(number_format($gtotal,2,'.',''));?></b></font></div></td>
	</tr>
	<tr><td height="74" colspan="100%"><font  face="Arial, Helvetica, sans-serif"><b>&nbsp;&nbsp;Rupees &nbsp;<? echo(connum($gtotal));?>&nbsp;only.</b></td>
	</tr>
	<tr>
	<td  align="left" colspan="2"><div align="justify"><font  face="Arial, Helvetica, sans-serif">Declaration:Certified that all the particulars shown in the above Tax Invoice are true and correct in all respects. </font></div></td>
	<td  align="center" colspan="2"><p><font  face="Arial, Helvetica, sans-serif"><b>For &nbsp;<?=$name?></b></font>
	</p>
	  <p>&nbsp;</p>
	  <p><strong><font  face="Arial, Helvetica, sans-serif">Authorised Signatory</font> </strong></p></td>
	</tr>
	<?
		if($saletype == 'CFORM')
		{
			$nar = 'CST &nbsp;'.round($vat_percent,0).'%&nbsp; against C FORM'; 
		}
		else
		{
			$nar = '';
		}
	?>
	
	</table>
    <?		
		
	
	    	fputs($myfile,"\n\n\n\n\n\n\n");
		    strcontrol($myfile," ",25);
		    strcontrol($myfile,"(MATERIAL RECEIVED VIDE PARTY'S ",35);
		    fputs($myfile,"\n");


			
	       	strcontrol($myfile," ",27);
		    $sch = 'Challan No :'.$schedule_no.')';
	    	strcontrol($myfile,$sch,12);

	       	fputs($myfile,"\n");		
			$linecnt= $linecnt+9;			
		
		
			fputs($myfile,"\n\n");
			
		if($round_off !=0)
		{
			strcontrol($myfile,'',10);			
			strcontrol($myfile,"ADD /LESS : ROUNDED OFF A/C",58);
			numcontrol($myfile,$round_off,24);
			fputs($myfile,"\n");		
		}
		else
		{
			fputs($myfile,"\n");
		}	
		strcontrol($myfile,"",80);
		strcontrol($myfile,'----------',9);
		fputs($myfile,"\n");	

		$linecnt=$linecnt+13;
			

		while($linecnt < 57)
		
		{
			fputs($myfile,"\n");
			$linecnt++;
		}
			
				$chrnum = connum($gtotal).' only';
		       strcontrol($myfile,'',7);
			    strcontrol($myfile,$chrnum,70);

				numcontrol($myfile,number_format($gtotal,2),15);
				fputs($myfile,"\n");

				fputs($myfile,"\n");

				fputs($myfile,"\n");
				

				fputs($myfile," \n");

				fputs($myfile,chr(12));
}
				


				

					for($ln=1;$ln<=7;$ln++)
					{
						fputs($myfile,"\n");
					}
					$linecnt=1;

/*   <a href = "/wilson/dload.php?dfile=<?echo($fname);?>">Download Text file</a>
<br><br><font size=+1><center><a href= "linput.php">Make another Bill</a></center></font>
<br><br><font size=+1><center><a href= "../../index.html">Return to Index</a></center></font>
*/
?>
                                                                             
</body>
</html>
<?

function line($myfile,$maxlen)
{
for($sk=1;$sk <$maxlen;$sk++)
{ fputs($myfile,"_"); };
fputs($myfile,"\n");

}


function strcontrol($myfile,$stname,$maxlen)
{
$plen = strlen($stname);
$tlen = $maxlen-$plen;
fputs($myfile,$stname);
for($sk=1;$sk<$tlen;$sk++)
{ fputs($myfile," "); };
}


function numcontrol($myfile,$stname,$maxlen)
{
$plen = strlen($stname);
$tlen = $maxlen-$plen;
for($sk=1;$sk <$tlen;$sk++)
{ fputs($myfile," "); };
fputs($myfile,$stname);
//fputs($myfile,"\n");
}

function heading($myfile,$invno,$date)
{





	fputs($myfile,"-------------------------------------------------------------------------\n");
	fputs($myfile," Sl.No           Particulars                Qty       Rate   Amount  \n");
	fputs($myfile,"---------------------------------------------------------------------\n");


}

?>
