PK

ADDRLIN : /home/anibklip/pcfcindia.com/bkp2019/print/
FLL :
Current File : /home/anibklip/pcfcindia.com/bkp2019/print/alp.php

<?php
session_start();
include('../connexion.php');
$id = $_GET['id'];

$printype = $_GET['printype'];

if (is_numeric($id)) {
	$sqlu1 = "SELECT * FROM  cert_alp WHERE certificateno='$_GET[id]'";
	$id    = "/$id";
} else {
	$pid   = $_GET['pid'];
	$sqlu1 = "SELECT * FROM  certificate_sub WHERE sub_certificateno='$_GET[id]' AND certificateno = '$pid'";
	$id    = explode('/', $id);
	$id    = $id[1];

	$find    = array(
		'ALP',
		'AQIS',
		'PPQ',
		'AUS'
	);
	$replace = array(
		'AP/',
		'AS/',
		'PQ/',
		'AU/'
	);
	$ppid    = str_replace($find, $replace, $pid);

	$id = "/$ppid/$id";
}
$resultu1 = mysql_query($sqlu1) or die('error in fetch 1');
$rowu1 = mysql_fetch_array($resultu1);
?>
<head>
	<style type="text/css">
		.printo {	
			/*border-bottom:solid;
			border:solid;*/
			font-size:90%;
		}
		.raj{
			font-size:90%;
		}
		
		.raja {
			font-size: 90%;
			border-collapse: collapse;
			border: 1px solid #000;
		}
		.raja td{
			border: 1px solid #000;
			padding:2px;
		}
	</style>
</head>
<?php
$sqlu="SELECT * FROM signature where user_id='$_SESSION[user_id]' ";
$resultu=mysql_query($sqlu) or die('error in fetch - '.mysql_error());
$rowu=mysql_fetch_array($resultu);
?>
<body onLoad="window.print(); window.close();">
	<br />
	<table align="center" width="100%" class="raj">
		<tr>
			<td valign="top" colspan="2">
				<center>
					<h4> FUMIGATION CERTIFICATE </h4>
				</center>
			</td>
		</tr>
		<tr>
			<td colspan="2" align="center">&nbsp;</td>
		</tr>
		<tr>
			<td valign="top"><strong>Dte PPQ & S Regd.No.136/ALP &nbsp;&nbsp; <!-- Date: <?php echo date("d-m-Y", strtotime($rowu[dt1]));?> --></strong></td>
			<td valign="top"><strong></strong></td>
		</tr>
		<tr>
			<td valign="top">
				<strong>
					Treatment Certificate No.
					<?php
					//echo $_SESSION['city'];
					if ($_SESSION['city'] == "ludhiana") {
						echo "ASR";
					} else if ($_SESSION['city'] == "amritser") {
						echo "ASR";
					}
					$sqlu = "SELECT * FROM signature WHERE user_id='$_SESSION[user_id]'";
					$resultu = mysql_query($sqlu) or die('error in fetch');
					$rowu = mysql_fetch_array($resultu);
					if ($printype == 'reco') {
						echo '/PQ/';
						echo $rowu1['reco'];
					} else {
						echo "$id";
					}
					echo "/$rowu[year]";
					?>
				</strong>
			</td>
			<td><strong>Date: <?php echo date("d-m-Y", strtotime($rowu1[issuedate]));?></strong></td>
		</tr>
		<tr>
			<td colspan="2" align="center">&nbsp;</td>
		</tr>
		<tr>
			<td colspan="2">This is to certify that the goods described below were treated in accordance with the fumigation treatment requirements of importing country (<?php echo $rowu1[country]?>) and declared that the consignment has been verified free of impervious surfaces/layers such as plastic wrapping or laminated plastic films, lacqured or painted surfaces, aluminium foil, tarred or waxed paper etc. that may adversely effect the penetration of the fumigant, prior to fumigation. <br>The certificate is valid for consignments shipped within 21 days from the date of completion of fumigation.</td>
		</tr>
		<tr>
			<td colspan="2" align="center">&nbsp;</td>
		</tr>
		
		<tr>
			<td colspan="2" align="center">
				<strong>DETAILS OF TREATMENT:</strong>
			</td>
		</tr>
	</table>
	
	<table width="100%" bordercolor="#000000" class="raja">
		<tr>
			<td width="28%" class="printo">Name of fumigant<br></td>
			<td width="22%" class="printo"><?php echo"$rowu1[namefumigant]";?>
			</td>
			<td width="32%" class="printo">Dosage of fumigation:<br></td>
			<td width="18%" class="printo"><?php echo"$rowu1[dosagefumigant]";?>
			</td>
		</tr>
		<tr>
			<td class="printo">Date of Fumigation <?php echo ($rowu1[fumi_completed]?"completed":"");?><br></td>
			<td class="printo"><?php echo date("d-m-Y", strtotime($rowu1[datefumigantion]));?></td>
			<td class="printo">Place of Fumigation<br></td>
			<td class="printo"><?php echo"$rowu1[placefumigantion]";?></td>
		</tr>
		<tr>
			<td class="printo">Duration of fumigation (hours/days):<br></td>
			<td class="printo"><?php echo"$rowu1[durationfumigantion]";?></td>
			<td valign="top" class="printo">Average ambient humidity during fumigation (RH)</td>
			<td class="printo"><?php echo "$rowu1[airtemp]";?></td>
		</tr>
		<tr>
			<td valign="top" class="printo">Fumigation performed under gastight sheets</td>
			<td class="printo"><?php echo"$rowu1[presstest]";?></td>
			<td valign="top" class="printo">Average ambient temperature during fumigation (Deg. C.)</td>
			<td class="printo"><?php echo"$rowu1[gas_tight_value]";?></td>
			<!-- <td valign="top" class="printo">If containers are not fumigated under gas-tight sheets,pressure decay value (from 200-100 Pascal's in second)</td>
			<td class="printo"><?php echo"$rowu1[gas_tight_value]";?></td> -->
		</tr>
	</table>
	
	<br>
	<table width="100%" align="center" bordercolor="#000000" class="raja">
		<tr>
			<td colspan="2" align="center"><strong>Descripition of Goods</strong></td>
		</tr>
		<tr>
			<td valign="top" class="printo">Container Number(or Numerical Link)./ Seal Number</td>
			<td class="printo"><?php echo"$rowu1[conslinkno]";?> </td>
		</tr>
		<!-- <tr>
			<td valign="top" class="printo">Port of Discharge:</td>
			<td class="printo"><?php echo"$rowu1[portcountry]";?></td>
		</tr> -->
		<!-- <tr>
			<td valign="top" class="printo">Vessal Name</td>
			<td class="printo"><?php echo"$rowu1[conslinkno]";?></td>
		</tr> -->
		<tr>
			<td valign="top" class="printo">Name & Address of Exporter</td>
			<td class="printo">
				<?php
				$sql="SELECT * FROM head WHERE headid='$rowu1[nameaddress]'";
				$result=mysql_query($sql) or die('error in fetch'.mysql_error());
				while($row=mysql_fetch_array($result)){
					echo"{$row['headname']}<br>{$row['headaddress']}";
				}
				?>
			</td>
		</tr>

		<tr>
			<td valign="top" class="printo">Name & Address of Importer</td>
			<td class="printo">
				<?php
				$sql="SELECT * FROM clients WHERE subid='$rowu1[declarednameaddress]'";
				$result=mysql_query($sql) or die('error in fetch'.mysql_error());
				while($row=mysql_fetch_array($result)){
					echo"{$row['subname']}<br>{$row['subaddress']}";
				}
				?>
			</td>
		</tr>
		<tr>
			<td valign="top" class="printo">Type and Description of Cargo</td>
			<td class="printo"><?php echo"$rowu1[contype]";?></td>
		</tr>
		<tr>
			<td valign="top" class="printo">Quantity Declared</td>
			<td class="printo"><?php echo"$rowu1[quantitydeclared]";?></td>
		</tr>
		<tr>
			<td valign="top" class="printo">Description of Packaging material</td>
			<td class="printo"><?php echo"$rowu1[desgood]";?></td>
		</tr>
		<tr>
			<td valign="top" class="printo">Shipping marks or brand</td>
			<td class="printo"><?php echo"$rowu1[brand]";?></td>
		</tr>
		<tr>
			<td valign="top" class="printo">Distinguishing Mark: </td>
			<td class="printo"><?php echo"$rowu1[distmarks]";?></td>
		</tr>
		<tr>
			<td valign="top" class="printo" colspan="2" style="line-height:170%;">
				Additional Declaration: <?php echo"$rowu1[decla]";?> <br>
				<?php
				if($rowu1[shiper_containerno_shw]){
					?>
					As per shipper Cargo is Loaded in Container No: <?php echo"$rowu1[shiper_containerno]";?><br>
					<?php
				}
				if($rowu1[consignment_details_shw]){
					?>
					Consignment details as declared by the Exporter: <?php echo"$rowu1[consignment_details]";?>
					<?php
				}
				?>
			</td>
		</tr>

		<!-- <tr>
			<td valign="top" class="printo">Distinguishing Mark</td>
			<td class="printo"><?php echo"$rowu1[distmarks]";?></td>
		</tr>
		<tr>
			<td valign="top" class="printo">As per shipper Cargo is Loaded in Container No</td>
			<td class="printo"><?php echo"$rowu1[shiper_containerno]";?></td>
		</tr>
		<tr>
			<td valign="top" class="printo">Consignment details as declared by the Exporter</td>
			<td class="printo"><?php echo"$rowu1[consignment_details]";?></td>
		</tr> -->

		<tr>
			<td valign="top" colspan="2" class="printo">I declare that these details are true and correct the fumigation has been carried out in accordance with the NSPM-22</td>
		</tr>

		<tr>
			<td class="printo">Name & Signature of Accredited fumigation Operator with <br><br>Seal & date / Accredition Number</td>
			<td class="printo">
				<p>For PEST CONTROL FUMIGATION COMPANY</p>
				<p>&nbsp;</p><br>
				<p>
					<?php echo $rowu[name];?> <?php echo $rowu[alpcode];?> <br>
					<!-- Dated: <?php echo date("d-m-Y", strtotime($rowu[dt1]));?> -->
				</p>
			</td>
		</tr>
	</table>
	<br><br>
	<table align="center" width="100%" class="raj">
		<tr>
			<td valign="top"  colspan="8" align="left">P.S.: No Liability attached to the certifying company or its representatives with respect to this certificate, Consignment details as declared by shipper or his shipping agent  </td>
		</tr>
		<tr>
			<td colspan="8" align="center">Recognisede by: Government of India</td>
		</tr>
	</table>
</body>


PK 99