PK

ADDRLIN : /home/anibklip/pcfcindia.com/19-20/print/
FLL :
Current File : /home/anibklip/pcfcindia.com/19-20/print/alp_old.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 {
			font-style: normal;
			color: #000000;
			letter-spacing: 0;
			display: block;
			padding-top: 1px;
			font-size: 70%;
		}
		
		.hr {
			border: solid;
			border-width: thin;
			border-color: #000000;
		}
	</style>
</head>

<br><br><br>

<body onLoad="window.print(); window.close();">
	<table align="center" width="100%" class="printo">
		<tr>
			<td colspan="6">
				<center><strong>FUMIGATION CERTIFICATE</strong></center>
			</td>
		</tr>
		<tr>
			<tr>
				<td align="left" colspan="4"><strong>Dte PPQS Regd. No.: 136/ALP</strong></td>
				<td colspan="2" align="right"><strong>&nbsp;</strong>&nbsp;&nbsp;&nbsp;</td>
			</tr>
			<tr>
				<td width="50%" colspan="4"><b>Treatment Certificate Number:<?
					//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);
					?>
					<?php
					if ($printype == 'reco') {
					echo '/PQ/';
					echo $rowu1['reco'];
					} else {
					echo "$id";
					}
					?>
					/<?= $rowu['year'] ?></b>
				</td>
				<td width="50%" align="right" colspan="2">
					<b>Date of Issue:<?php
					echo "$rowu1[issuedate]"; ?></b>&nbsp;&nbsp;&nbsp;
				</td>
			</tr>
			<td colspan="6">This is to certify that the following regulated articles have been fumigated according to the appropriate procedures to confirm to the current Phytosanitary requirements of the importing country.</td>
		</tr>
		<td align="left" colspan="6"><strong>DETAILS OF GOODS</strong></td>
		</tr>
		<tr>
			<td colspan="4" width="20%">Description of goods:&nbsp;&nbsp;
				<?php
echo "$rowu1[desgood]";
?>
			</td>
			<td colspan="4" width="20%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Quantity declared:&nbsp;&nbsp;
				<?php
echo "$rowu1[quantitydeclared]";
?>
			</td>
		</tr>
		<tr>
			<td align="left" colspan="4" width="20%">Distinguishing marks:&nbsp;&nbsp;
				<?php
echo "$rowu1[distmarks]";
?>
			</td>
			<td colspan="1" width="20%" valign="top">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Consignment Link/
				<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Container No.</td>
			<td colspan="3" width="100%" valign="top" style="font-size: 90%;">
				<?php
echo "$rowu1[conslinkno]";
?>
			</td>
		</tr>
		<tr>
			<td align="left" colspan="4" width="20%">Port & country of loading:&nbsp;&nbsp;
				<?php
echo "$rowu1[portcountry]";
?>
			</td>
			<td colspan="4" width="20%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Name of the Vessel/Ship:&nbsp;&nbsp;
				<?php
echo "$rowu1[nameship]";
?>
			</td>
		</tr>
		<tr>
			<td align="left" colspan="4" width="20%">Country of Destination:&nbsp;&nbsp;
				<?php
echo "$rowu1[countrydes]";
?>
			</td>
			<td width="20%" colspan="4">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Declared point of Entry:&nbsp;&nbsp;
				<?php
echo "$rowu1[declentry]";
?>
			</td>
		</tr>
		<?php

$sqlg = "SELECT * FROM cert_alp WHERE certificateno='$id'";
$resultg = mysql_query($sqlg) or die('error in fetch');
$rowg = mysql_fetch_array($resultg);
if ($rowu1[licetype] == 'import') {

$exporter = $rowu1['nameaddress'];
if ($exporter != "") {
	echo "<tr>
<td align=left colspan=3>Name and address of consignor/exporter:</td>
<td colspan=3>";
?>
			<?php
	$exporter = $rowu1['nameaddress'];
	//print "<h1>EXPORTER: $exporter</h1>";
	if ($certype == "main") {
		$sql = "SELECT subname,subaddress FROM clients WHERE subid='$rowu1[nameaddress]' ";
	} else {
		$sql = "SELECT subname,subaddress FROM clients WHERE subid='$exporter'";
	}
	$result = mysql_query($sql) or die('error in fetch');
	while ($row = mysql_fetch_array($result)) {
		echo "{$row['subname']}<br>{$row['subaddress']}";
	}
	echo "
</td>
</tr>";
}

$importer = $rowu1['declarednameaddress'];
if ($importer != "") {
	echo "<tr>
<td colspan=3>Name & address of consignee:</td>
<td colspan=3>";
	$importer = $rowu1['declarednameaddress'];
	//print "<h1>IMPORTER: $importer</h1>";
	if ($certype == "main") {
		$sql = "SELECT headname,headaddress FROM head WHERE headid='$rowu1[declarednameaddress]'";
	} else {
		$sql = "SELECT headname,headaddress FROM head WHERE headid='$importer'";
	}
	$result = mysql_query($sql) or die('error in fetch');
	while ($row = mysql_fetch_array($result)) {
		echo "{$row['headname']}<br>{$row['headaddress']}";
	}
	echo "</td>
</tr>";
}
} else {
$exporter = $rowu1['nameaddress'];
if ($exporter != "") {
	echo "<tr>
<td colspan=3>Name and address of consignor/exporter:</td>
<td colspan=3>";
	$exporter = $rowu1['nameaddress'];
	//print "<h1>EXPORTER: $exporter</h1>";
	if ($certype == "main") {
		$sql = "SELECT headname,headaddress FROM head WHERE headid='$rowu1[clnid]'";
	} else {
		$sql = "SELECT headname,headaddress FROM head WHERE headid='$exporter'";
	}
	$result = mysql_query($sql) or die('error in fetch');
	while ($row = mysql_fetch_array($result)) {
		echo "{$row['headname']}<br>{$row['headaddress']}";
	}
	echo "</td>
</tr>";
}

$importer = $rowu1['declarednameaddress'];
if ($importer != "") {
	echo "<tr>
<td align=left colspan=3>Name & address of consignee:</td>
<td colspan=3>";
?>
				<?php
	$importer = $rowu1['declarednameaddress'];
	//print "<h1>IMPORTER: $importer</h1>";
	if ($certype == "main") {
		$sql = "SELECT subname,subaddress FROM clients WHERE subid='$rowu1[declarednameaddress]'";
	} else {
		$sql = "SELECT subname,subaddress FROM clients WHERE subid='$importer'";
	}
	$result = mysql_query($sql) or die('error in fetch for database');
	while ($row = mysql_fetch_array($result)) {
		echo "{$row['subname']}<br>{$row['subaddress']}";
	}
	echo "
</td>
</tr>";
}

}
?>

	</table>
	<table align="center" width="100%" border="0" class="printo">
		<tr>
			<td colspan="6">
				<strong>DETAILS OF TREATMENT</strong></td>
		</tr>
		<tr>
			<td colspan="3">Name of fumigant:
				<?php
echo "$rowu1[namefumigant]";
?>
			</td>
			<td>Date of fumigation:
				<?php
echo "$rowu1[datefumigantion]";
?>
			</td>
			<td colspan="2">Place of fumigation:
				<?php
echo "$rowu1[placefumigantion]";
?>
			</td>

		</tr>
		<tr>
			<td colspan="3">Dosage rate of fumigant:
				<?php
echo "$rowu1[dosagefumigant]";
?>
			</td>

			<td>Duration of fumigation:
				<?php
echo "$rowu1[durationfumigantion]";
?>
			</td>

			<td colspan="2">Minimum Air temperature:
				<?php
echo "$rowu1[airtemp]";
?>
			</td>

		</tr>
		<tr>
			<td colspan="4">Fumigation has been performed in a container/under gas tight enclosure/sheet:</td>
			<td align="center" colspan="2">
				<?php
if ($rowu1[contype] == 'No') {
echo "<del> Yes </del>   &nbsp;<b>$rowu1[contype]</b>&nbsp;  <del> N/A </del>";
} elseif ($rowu1[contype] == 'Yes') {
echo "<b>$rowu1[contype]</b>  &nbsp;<del> No </del>&nbsp; <del> N/A </del>";
} else {
echo "<del> Yes </del> &nbsp;<del>  No </del>&nbsp; <b>$rowu1[contype]</b>";
}
?>
			</td>
		</tr>
		<tr>
			<td colspan="4">Container pressure test conducted:</td>
			<td align="center" colspan="2">
				<?php
if ($rowu1[presstest] == 'No') {
echo "<del> Yes </del>   &nbsp;<b>$rowu1[presstest]</b>&nbsp;  <del> N/A </del>";
} elseif ($rowu1[presstest] == 'Yes') {
echo "<b>$rowu1[presstest]</b>  &nbsp;<del> No </del>&nbsp; <del> N/A </del>";
} else {
echo "<del> Yes </del> &nbsp;<del>  No </del>&nbsp; <b>$rowu1[presstest]</b>";
}
?>
			</td>
		</tr>
		<tr>
			<td colspan="4">Container has 200mm free air space at top of container:</td>
			<td align="center" colspan="2">
				<?php
if ($rowu1[airspace] == 'No') {
echo "<del> Yes </del>   &nbsp;<b>$rowu1[airspace]</b>&nbsp;  <del> N/A </del>";
} elseif ($rowu1[airspace] == 'Yes') {
echo "<b>$rowu1[airspace]</b>  &nbsp;<del> No </del>&nbsp; <del> N/A </del>";
} else {
echo "<del> Yes </del> &nbsp;<del>  No </del>&nbsp; <b>$rowu1[airspace]</b>";
}
?>
			</td>
		</tr>
		<tr>
			<td colspan="4">In transit Fumigation-needs Ventilation at the port of discharge:</td>
			<td align="center" colspan="2">
				<?php
if ($rowu1[discharge] == 'No') {
echo "<del> Yes </del>   &nbsp;<b>$rowu1[discharge]</b>&nbsp;  <del> N/A </del>";
} elseif ($rowu1[discharge] == 'Yes') {
echo "<b>$rowu1[discharge]</b>  &nbsp;<del> No </del>&nbsp; <del> N/A </del>";
} else {
echo "<del> Yes </del> &nbsp;<del>  No </del>&nbsp; <b>$rowu1[discharge]</b>";
}
?>
			</td>
		</tr>
		<tr>
			<td colspan="4">Container/Enclosure has been Ventilated to below 0.3ppm v/v Phosphine:</td>
			<td align="center" colspan="2">
				<?php
if ($rowu1[enclosure] == 'No') {
echo "<del> Yes </del>   &nbsp;<b>$rowu1[enclosure]</b>&nbsp;  <del> N/A </del>";
} elseif ($rowu1[enclosure] == 'Yes') {
echo "<b>$rowu1[enclosure]</b>  &nbsp;<del> No </del>&nbsp; <del> N/A </del>";
} else {
echo "<del> Yes </del> &nbsp;<del>  No </del>&nbsp; <b>$rowu1[enclosure]</b>";
}
?>
			</td>
		</tr>
		<tr>
			<td colspan="6">
				<hr class="hr">
				<strong>WRAPPING AND TIMBER</strong></td>
		</tr>
		<tr>
			<td colspan="4">Has the commodity been fumigated prior to lacquering,varnishing,painting or wrapping:</td>
			<td align="center" colspan="2">
				<?php
if ($rowu1[commodity] == 'No') {
echo "<del> Yes </del>   &nbsp;<b>$rowu1[commodity]</b>&nbsp;  <del> N/A </del>";
} elseif ($rowu1[commodity] == 'Yes') {
echo "<b>$rowu1[commodity]</b>  &nbsp;<del> No </del>&nbsp; <del> N/A </del>";
} else {
echo "<del> Yes </del> &nbsp;<del>  No </del>&nbsp; <b>$rowu1[commodity]</b>";
}
?>
			</td>
		</tr>
		<tr>
			<td colspan="4">Has plastic wrapping been used in the consignment:</td>
			<td align="center" colspan="2">
				<?php
if ($rowu1[consignment] == 'No') {
echo "<del> Yes </del>   &nbsp;<b>$rowu1[consignment]</b>&nbsp;  <del> N/A </del>";
} elseif ($rowu1[consignment] == 'Yes') {
echo "<b>$rowu1[consignment]</b>  &nbsp;<del> No </del>&nbsp; <del> N/A </del>";
} else {
echo "<del> Yes </del> &nbsp;<del>  No </del>&nbsp; <b>$rowu1[consignment]</b>";
}
?>
			</td>
		</tr>
		<tr>
			<td colspan="4">If yes,has the consignment has been fumigated prior to wrapping?</td>
			<td align="center" colspan="2">
				<?php
if ($rowu1[wrapping] == 'No') {
echo "<del> Yes </del>   &nbsp;<b>$rowu1[wrapping]</b>&nbsp;  <del> N/A </del>";
} elseif ($rowu1[wrapping] == 'Yes') {
echo "<b>$rowu1[wrapping]</b>  &nbsp;<del> No </del>&nbsp; <del> N/A </del>";
} else {
echo "<del> Yes </del> &nbsp;<del>  No </del>&nbsp; <b>$rowu1[wrapping]</b>";
}
?>
			</td>
		</tr>
		<tr>
			<td colspan="4">Or has the plastic wrapping been slashed,opened or perforated in accordance with the wrapping and perforation standard?</td>
			<td align="center" colspan="2">
				<?php
if ($rowu1[perforated] == 'No') {
echo "<del> Yes </del>   &nbsp;<b>$rowu1[perforated]</b>&nbsp;  <del> N/A </del>";
} elseif ($rowu1[perforated] == 'Yes') {
echo "<b>$rowu1[perforated]</b>  &nbsp;<del> No </del>&nbsp; <del> N/A </del>";
} else {
echo "<del> Yes </del> &nbsp;<del>  No </del>&nbsp; <b>$rowu1[perforated]</b>";
}
?>
			</td>
		</tr>
		<tr>
			<td colspan="4">Is the timber in this consignment less than 200mm thick in one dimension and correctly spaced every 200mm in height?</td>
			<td align="center" colspan="2">
				<?php
if ($rowu1[height] == 'No') {
echo "<del> Yes </del>   &nbsp;<b>$rowu1[height]</b>&nbsp;  <del> N/A </del>";
} elseif ($rowu1[height] == 'Yes') {
echo "<b>$rowu1[height]</b>  &nbsp;<del> No </del>&nbsp; <del> N/A </del>";
} else {
echo "<del> Yes </del> &nbsp;<del>  No </del>&nbsp; <b>$rowu1[height]</b>";
}
?>
			</td>
		</tr>
		<hr class="hr">
		<tr>
			<td colspan=6>
				<hr class=hr>
				<strong>ADDITIONAL DECLARATION:</strong>
				<br>
			</td>
		</tr>
		<tr>
			<td colspan=6>
				<?
//    if($rowu1[addition]=="on")
//    {
echo $rowu1[decla];
//    }

?>
					<br>I declare that these details are true and correct and the fumigation has been carried out in accordance with the NSPM -12 / ISPM-15
					<br>
					<?php
$rowu1[deck];
?>
			</td>
		</tr>
		</tr>

		<tr>
			<td>Place and Date:&nbsp;
				<?
//echo $_SESSION['city'];
if ($_SESSION['city'] == "ludhiana") {
echo "AMRITSAR";
} else if ($_SESSION['city'] == "amritser") {
echo "AMRITSAR";
}
;
?> &nbsp;&nbsp;
					<?php
echo "$rowu1[issuedate]";
?>
			</td>
		</tr>
		<tr>
			<td colspan="6">
				<br>
				<br>Signature
				<br> Name of Accredited Fumigation Operator:
				<?php
echo $rowu[name];
?>
					<br> DPPQS Accreditation No.:<strong><?php
echo $rowu[alpcode];
?></strong>
					<br>
			</td>
		</tr>
		<tr>
			<td colspan="6" align="center">
				P.S. : No liability attaches to the certifying company or it proprietors or representatives with respect to this certificate.
				<br> Recognised by: GOVERNMENT OF INDIA</td>
		</tr>
	</table>
</body>


PK 99