
PK 
<?php
session_start();
require_once '../common/common.php';
require_once '../common/secure.php';
include("../connexion.php");
include("../head.php");
if($_SESSION[city]=='ludhiana'){
//$codemode="pcfcindi_pcfcindi_ldh2011";
$codemode="pcfcindi_ldh2011";
}else{
//$codemode="pcfcindi_pcfcindi_asr2011";
$codemode="pcfcindi_asr2011";
}
/* $sql="INSERT INTO `$codemode`.`cancellations`
SELECT * FROM `$codemode`.`certificate` WHERE certificateno='$_GET[id]'";
$result=mysql_query($sql) or die('Allready Updated');*/
// Certificate
$din=$_REQUEST[issuedate];//date('d-m-Y');
//nameaddress= '$_POST[nameaddress]', declarednameaddress='$_POST[declarednameaddress]',
$fields="cert_nspm set
issuedate= '$_POST[issuedate]',
sub_c= '$_POST[sub_c]',
namefumigant= '$_POST[namefumigant]',
dosagefumigant= '$_POST[dosagefumigant]',
datefumigantion= '$_POST[datefumigantion]',
fumi_completed= '$_POST[fumi_completed]',
durationfumigantion= '$_POST[durationfumigantion]',
airtemp= '$_POST[airtemp]',
declentry= '$_POST[declentry]',
contype= '$_POST[desc]',
airspace= '$_POST[airspace]',
conslinkno= '$_POST[conslinkno]',
portcountry= '$_POST[port]',
nameship= '$_POST[vessal]',
consignment= '$_POST[contype]',
quantitydeclared= '$_POST[quantitydeclared]',
desgood= '$_POST[packing]',
brand= '$_POST[brand]',
distmarks= '$_POST[distmarks]',
clnid= '$_POST[clntid]',
licetype= '$_POST[dtype]',
certypo= '$_POST[formno]',
ajtid= '$_POST[ajtname]',
ctime= '$din',
placefumigantion= '$_POST[placefumigantion]',
presstest= '$_POST[gsheet]',
gas_tight_value= '$_POST[gas_tight_value]',
decla= '$_POST[decla]',
country= '$_POST[country]',
shiper_containerno= '$_POST[shiper_containerno]',
shiper_containerno_shw= '$_POST[shiper_containerno_shw]',
consignment_details_shw= '$_POST[consignment_details_shw]',
consignment_details='$_POST[consignment_details]'
";
$sql="update $fields where certificateno='$_POST[id]' ";
//echo "<pre>";print_r($sql);echo "</pre>";
echo "<center>Updated sucessfully<br><br><a href=../search.php>click here To Search again</a></center>";
$result=mysql_query($sql) or die(mysql_error().'<br><br>Error in creating Certificate');
//$certno=getColumn("cert_aqis", "certificateno", $_GET[id], "certno");
$certno=$_POST[id];
$mailcerno = "NSPM$certno";
?>
<table align="center" width="100%" border="0">
<tr>
<td>
<form action="../print/nspm.php" method="get" target="_blank">
<input type="hidden" name="id" value="<?php echo"$certno";?>">
<input type="hidden" name="certificateno" value="<?php echo"$certno";?>">
<input type="submit" value="Print Certificate">
</form>
</td>
</tr>
</table>
<?php
include("../common/update_notmail.php");
include("../foot.php");
?>


PK 99