
PK 
<?php
include("connexion.php");
include("head.php");
?>
<?php
//$certno=getColumn("certificate", "certificateno", $_GET[certificate_id], "certno");
$certno=$_GET['certificate_id'];
$find = array('ALP','AQIS','PPQ','AUS');
$replace = array('','','','');
$certno = str_replace($find, $replace, $certno);
$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= $certno."/A";
}
else if($count==1)
{
$sub_c= $certno."/B";
}
else if($count==2)
{
$sub_c= $certno."/C";
}
else if($count==3)
{
$sub_c= $certno."/D";
}
else if($count==4)
{
$sub_c= $certno."/E";
}
else if($count==5)
{
$sub_c= $certno."/F";
}
else if($count==6)
{
$sub_c= $certno."/G";
}
else if($count==7)
{
$sub_c= $certno."/H";
}
else if($count==8)
{
$sub_c= $certno."/I";
}
else if($count==9)
{
$sub_c= $certno."/J";
}
else
{
$sub_c= $certno."/K";
}
// Invoice
?>
<?php
// Certificate
$din=date('D, d M Y + H:i:s a');
$sql="INSERT INTO certificate_sub(issuedate,declarednameaddress,nameship,desgood,quantitydeclared,conslinkno,distmarks,countrydes,namefumigant,datefumigantion,dosagefumigant,durationfumigantion,airtemp,cstatus,ctime,decla,clnid,ajtid,licetype,certypo,certificateno,sub_certificateno,consignment_link,container20feet,container40feet,container40HC,containerLCL)
VALUES('$_GET[dat]','$_GET[clntid]','$_GET[invoice]','$_GET[desc]','$_GET[pack]','$_GET[vessel]','$_GET[convey]','$_GET[destinat]','$_GET[chem]','$_GET[Dfumigation]','$_GET[dosage]','$_GET[durat]','$_GET[temp]','0','$din','$_GET[remark]','$_GET[clntid]','$_GET[ajtname]','$_GET[dtype]','a','$_GET[certificate_id]','$sub_c','$_GET[consignment_link]','$_GET[container20feet]','$_GET[container40feet]','$_GET[container40HC]','$_GET[containerLCL]')";
$result=mysql_query($sql) or die('error in certificate ');
?>
<table width=100% align=center>
<tr><td colspan=3>New Entry Sucessfully Entered </td></tr>
<tr><td>
<form action="printcert_sub.php" method="get" target="_blank">
<input type="hidden" name="clntid" value="<?php echo"$_GET[clntid]";?>">
<input type="hidden" name="dtype" value="<?php echo"$_GET[dtype]";?>">
<input type="hidden" name="certno" value="0<?php echo"$sub_c";?>">
<input type="hidden" name="dat" value="<?php echo"$_GET[dat]";?>">
<input type="hidden" name="invoice" value="<?php echo"$_GET[invoice]";?>">
<input type="hidden" name="desc" value="<?php echo"$_GET[desc]";?>">
<input type="hidden" name="pack" value="<?php echo"$_GET[pack]";?>">
<input type="hidden" name="vessel" value="<?php echo"$_GET[vessel]";?>">
<input type="hidden" name="convey" value="<?php echo"$_GET[convey]";?>">
<input type="hidden" name="destinat" value="<?php echo"$_GET[destinat]";?>">
<input type="hidden" name="chem" value="<?php echo"$_GET[chem]";?>">
<input type="hidden" name="dosage" value="<?php echo"$_GET[dosage]";?>">
<input type="hidden" name="temp" value="<?php echo"$_GET[temp]";?>">
<input type="hidden" name="durat" value="<?php echo"$_GET[durat]";?>">
<input type="hidden" name="Dfumigation" value="<?php echo"$_GET[Dfumigation]";?>">
<input type="hidden" name="remark" value="<?php echo"$_GET[remark]";?>">
<input type="hidden" name="ajtname" value="<?php echo"$_GET[ajtname]";?>">
<input type="hidden" name="cmntz" value="<?php echo"$_GET[cmntz]";?>">
<input type="hidden" name="stax" value="<?php echo"$_GET[stax]";?>">
<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