PK

ADDRLIN : /home/anibklip/pcfcindia.com/2025-26/update/
FLL :
Current File : //home/anibklip/pcfcindia.com/2025-26/update/update_aus_new.php

<?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');*/


if($_POST['desgood']){
	$desgood = implode(",", $_POST['desgood']);
}else{
	$desgood = "";
}

$fields=" cert_aqis set 
	nameaddress					= '".$_POST['clnid']."',
	declarednameaddress			= '".$_POST['declarednameaddress']."',
	clnid 						= '$_POST[clnid]',

	issuedate 					= '$_POST[issuedate]',
	desgood 					= '$desgood',
	desgood_others		    	= '".$_POST['desgood_others']."',
	quantitydeclared 			= '$_POST[quantitydeclared]',
	portcountry 				= '$_POST[portcountry]',
	nameship 					= '$_POST[nameship]',
	countrydes 					= '$_POST[countrydes]',
	declentry 					= '$_POST[declentry]',
	namefumigant 				= '$_POST[namefumigant]',
	durationfumigantion 		= '$_POST[durationfumigantion]',
	airtemp 					= '$_POST[airtemp]',
	commodity 					= '$_POST[commodity]',
	perforated 					= '$_POST[perforated]',
	decla 						= '$_POST[deck]',
	
	licetype 					= '$_POST[dtype]',
	certypo 					= '$_POST[formno]',
	cancel_reason 				= '0',
	consignment_link 			= '$_POST[consignment_link]',
		
	enclosure_type				= '".$_POST['enclosure_type']."',
	enclosure_type_others	    = '".$_POST['enclosure_type_others']."',
	dosagefumigant_trmnt		= '".$_POST['dosagefumigant_trmnt']."',
	durationfumigantion_trmnt	= '".$_POST['durationfumigantion_trmnt']."',
	airtemp_trmnt				= '".$_POST['airtemp_trmnt']."',
	streetaddress_trmnt			= '".$_POST['streetaddress_trmnt']."',
	city_trmnt					= '".$_POST['city_trmnt']."',
	country_trmnt				= '".$_POST['country_trmnt']."',
	postcode_trmnt				= '".$_POST['postcode_trmnt']."',
	datefumigantion_start		= '".$_POST['datefumigantion_start']."',
	timefumigantion_start		= '".$_POST['timefumigantion_start']."',
	datefumigantion_end			= '".$_POST['datefumigantion_end']."',
	timefumigantion_end			= '".$_POST['timefumigantion_end']."',
	seal_no			            = '".$_POST['seal_no']."'
";

// Certificate
$din = $_REQUEST['issuedate']; //date('d-m-Y');
$sqlb = "UPDATE $fields WHERE certificateno='$_POST[id]' ";

// echo "<pre>";print_r($sqlb);echo "</pre>";//die;
$resultb = mysql_query($sqlb) or die(mysql_error().' - Errorerror in update certificate ');

echo "<center>Updated sucessfully<br><br><a href=../search.php>click here To Search again</a></center>";
//$certno=getColumn("cert_aqis", "certificateno", $_GET[id], "certno");
$certno = $_GET['id'];
$mailcerno = "AUSNEW$certno";
?>
<table align="center" width="100%" border="0">
	<tr>
		<td>
			<form action="../print/aus_new.php" method="get" target="_blank">
				<input type="hidden" name="formno" value="<?php echo "$_GET[formno]"; ?>">
				<input type="hidden" name="id" 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