PK

ADDRLIN : /home/anibklip/pcfcindia.com/dump/
FLL :
Current File : /home/anibklip/pcfcindia.com/dump/forminsert_sub.php

<?php
include("connexion.php");
include("head.php");

?>
<?php 
$sqlo="SELECT count(*) FROM certificate_sub where certificateno='".$_GET[certificate_id]."' ";
$resulto=mysql_fetch_array(mysql_query($sqlo));
$count=$resulto[0];
if($count==0)
{
	$sub_c= $_GET[certificate_id]."/A";
}
else if($count==1)
{
	$sub_c= $_GET[certificate_id]."/B";
}
else if($count==2)
{
	$sub_c= $_GET[certificate_id]."/C";
}

else if($count==3)
{
	$sub_c= $_GET[certificate_id]."/D";
}

else if($count==4)
{
	$sub_c= $_GET[certificate_id]."/E";
}

else if($count==5)
{
	$sub_c= $_GET[certificate_id]."/F";
}

else if($count==6)
{
	$sub_c= $_GET[certificate_id]."/G";
}

else if($count==7)
{
	$sub_c= $_GET[certificate_id]."/H";
}

else if($count==8)
{
	$sub_c= $_GET[certificate_id]."/I";
}

else if($count==9)
{
	$sub_c= $_GET[certificate_id]."/J";
}
else 
{
	$sub_c= $_GET[certificate_id]."/K";
}



// Invoice
?>
<?php

if($_GET[addition]=='on')
{
$deckl="This is to certify that the goods described above were packed in impervious packaging which was not possible to remove.
Hence the fumigation was carried out is only for the outer packaging and not for the goods therein.<br>".$_GET[deck];

}
else
{
$deckl="";

}

// Certificate
$din=date('D, d M Y + H:i:s a');
$sql="INSERT INTO certificate_sub(issuedate,desgood,quantitydeclared,distmarks,conslinkno,portcountry,nameship,countrydes,declentry,nameaddress,declarednameaddress,namefumigant,datefumigantion,placefumigantion,dosagefumigant,durationfumigantion,airtemp,contype,presstest,airspace,discharge,enclosure,commodity,consignment,wrapping,perforated,height,cstatus,ctime,decla,clnid,ajtid,licetype,certypo,certificateno,sub_certificateno)
VALUES('$_GET[issuedate]','$_GET[desgood]','$_GET[quantitydeclared]','$_GET[distmarks]','$_GET[conslinkno]','$_GET[portcountry]','$_GET[nameship]','$_GET[countrydes]','$_GET[declentry]','$_GET[nameaddress]','$_GET[declarednameaddress]','$_GET[namefumigant]','$_GET[datefumigantion]','$_GET[placefumigantion]','$_GET[dosagefumigant]','$_GET[durationfumigantion]','$_GET[airtemp]','$_GET[contype]','$_GET[presstest]','$_GET[airspace]','$_GET[discharge]','$_GET[enclosure]','$_GET[commodity]','$_GET[consignment]','$_GET[wrapping]','$_GET[perforated]','$_GET[height]','0','$din','$deckl','$_GET[clntid]','$_GET[ajtname]','$_GET[dtype]','$_GET[formno]','$_GET[certificate_id]','$sub_c')";
$result=mysql_query($sql) or die('errin certificate ');
?>

<table align="center" width="100%" border="0">
<tr><td>
<form action="printcerts.php" method="get" target="_blank">
<input type="hidden" name="formno" value="<?php echo"$_GET[formno]";?>">
<input type="hidden" name="dtype" value="<?php echo"$_GET[dtype]";?>">
<input type="hidden" name="clntid" value="<?php echo"$_GET[clntid]";?>">
<input type="hidden" name="certificateno" value="<?php echo"$sub_c";?>">
<input type="hidden" name="issuedate" value="<?php echo"$_GET[issuedate]";?>">
<input type="hidden" name="desgood" value="<?php echo"$_GET[desgood]";?>">
<input type="hidden" name="quantitydeclared" value="<?php echo"$_GET[quantitydeclared]";?>">
<input type="hidden" name="distmarks" value="<?php echo"$_GET[distmarks]";?>">
<input type="hidden" name="conslinkno" value="<?php echo"$_GET[conslinkno]";?>">
<input type="hidden" name="portcountry" value="<?php echo"$_GET[portcountry]";?>">
<input type="hidden" name="countrydes" value="<?php echo"$_GET[countrydes]";?>">
<input type="hidden" name="declentry" value="<?php echo"$_GET[declentry]";?>">
<input type="hidden" name="nameaddress" value="<?php echo"$_GET[nameaddress]";?>">
<input type="hidden" name="declarednameaddress" value="<?php echo"$_GET[declarednameaddress]";?>">
<input type="hidden" name="namefumigant" value="<?php echo"$_GET[namefumigant]";?>">
<input type="hidden" name="datefumigantion" value="<?php echo"$_GET[datefumigantion]";?>">
<input type="hidden" name="placefumigantion" value="<?php echo"$_GET[placefumigantion]";?>">
<input type="hidden" name="dosagefumigant" value="<?php echo"$_GET[dosagefumigant]";?>">
<input type="hidden" name="durationfumigantion" value="<?php echo"$_GET[durationfumigantion]";?>">
<input type="hidden" name="airtemp" value="<?php echo"$_GET[airtemp]";?>">
<input type="hidden" name="contype" value="<?php echo"$_GET[contype]";?>">
<input type="hidden" name="airspace" value="<?php echo"$_GET[airspace]";?>">
<input type="hidden" name="presstest" value="<?php echo"$_GET[presstest]";?>">
<input type="hidden" name="discharge" value="<?php echo"$_GET[discharge]";?>">
<input type="hidden" name="enclosure" value="<?php echo"$_GET[enclosure]";?>">
<input type="hidden" name="commodity" value="<?php echo"$_GET[commodity]";?>">
<input type="hidden" name="consignment" value="<?php echo"$_GET[consignment]";?>">
<input type="hidden" name="wrapping" value="<?php echo"$_GET[wrapping]";?>">
<input type="hidden" name="perforated" value="<?php echo"$_GET[perforated]";?>">
<input type="hidden" name="height" value="<?php echo"$_GET[height]";?>">
<input type="hidden" name="cmntz" value="<?php echo"$_GET[cmntz]";?>">
<input type="hidden" name="deck" value="<?php echo"$_GET[deck]";?>">
<input type="hidden" name="ajtname" value="<?php echo"$_GET[ajtname]";?>">
<input type="hidden" name="addition" value="<?php echo"$_GET[addition]";?>">
<input type="hidden" name="nameship" value="<?php echo"$_GET[nameship]";?>">
<input type="submit" value="Print Certificate"></form>
</td><td align=center><a href=certificate.php>Click here to Get Back Home</a></td>
<td align=right></td></tr></table>

<?php
include"foot.php";
?>
<br><br><br>


PK 99