
PK 
<?php
//$sql="SELECT * FROM certificate WHERE certificateno='$_GET[id]' AND certypo='e'";
$sql="SELECT * FROM cert_aqis WHERE certificateno='$_GET[id]'";
$result=mysql_query($sql) or die('error in fetch');
if($row=mysql_fetch_array($result, MYSQL_ASSOC)) {
$dtype="{$row['licetype']}";
$clnt="{$row['clnid']}";
$deep="{$row['nameaddress']}";
$deep2="{$row['declarednameaddress']}";
// echo "<pre>";print_r($row);echo "</pre>";
}
?>
<head>
<style>
.checkbox-group, .radio-group {
padding: 5px;
}
.checkbox-group label, .radio-group label {
display: block;
margin: 5px 0;
cursor: pointer;
}
.checkbox-group input[type="text"], .radio-group input[type="text"] {
width: 90%;
padding: 5px;
margin-left: 20px;
}
.checkbox-group input[type="checkbox"], .radio-group input[type="radio"] {
margin-right: 8px;
vertical-align: middle;
}
</style>
<script language="JavaScript" type="text/javascript">
<!--
function checkform(form) {
// ** START **
if (form.certificateno.value == "") {
alert("Please enter Certificate no.");
form.certificateno.focus();
return false;
}
// ** END **
// ** START **
if (form.desgood.value == "") {
alert("Please enter Target of fumigation:");
form.desgood.focus();
return false;
}
// ** END **
// ** START **
if (form.quantitydeclared.value == "") {
alert("Please enter Commodity:");
form.quantitydeclared.focus();
return false;
}
// ** END **
// ** START **
if (form.distmarks.value == "") {
alert("Please enter Distinguishing marks:");
form.distmarks.focus();
return false;
}
// ** END **
// ** START **
if (form.desgood.value == "") {
alert("Please enter Target of fumigation:");
form.desgood.focus();
return false;
}
// ** END **
// ** START **
if (form.conslinkno.value == "") {
alert("Please enter Consignment Link/Container No.");
form.conslinkno.focus();
return false;
}
// ** END **
// ** START **
if (form.portcountry.value == "") {
alert("Please enter Port & country of loading:");
form.portcountry.focus();
return false;
}
// ** END **
// ** START **
if (form.nameship.value == "") {
alert("Please enter Consignment link:");
form.nameship.focus();
return false;
}
// ** END **
// ** START **
if (form.countrydes.value == "") {
alert("Please enter Country of destination :");
form.countrydes.focus();
return false;
}
// ** END **
// ** START **
if (form.declentry.value == "") {
alert("Please enter Commodity:");
form.declentry.focus();
return false;
}
// ** END **
// ** START **
if (form.datefumigantion.value == "") {
alert("Please enter date:");
form.datefumigantion.focus();
return false;
}
// ** END **
// ** START **
if (form.placefumigantion.value == "") {
alert("Please enter place here:");
form.placefumigantion.focus();
return false;
}
// ** END **
// ** START **
if (form.airtemp.value == "") {
alert("Please enter air temp:");
form.airtemp.focus();
return false;
}
// ** END **
// ** START **
if (form.amount.value == "") {
alert("Please enter amount:");
form.amount.focus();
return false;
}
// ** END **
return true;
}
//
-->
</script>
</head>
<table align="center" width="100%" border="3" cellpadding="0" cellspacing="0">
<form action="update/update_aus_new.php" method="post" onsubmit="return checkform(this);">
<input type="hidden" name="id" value="<?php echo"$_GET[id]";?>">
<input type="hidden" name="formno" value="f">
<input type="hidden" name="clnid" value="<?php echo"$clnt";?>">
<input type="hidden" name="dtype" value="<?php echo"$dtype";?>">
<?php
$dat = date('d-m-Y');
?>
<tr>
<td align="center" colspan="6"> <center> <h2>PEST CONTROL & FUMIGATION COMPANY</h2> </center> </td>
</tr>
<td align="left" colspan="6"><strong>AEI No.:</strong>: IN0104/MB</td>
</tr>
<tr>
<td colspan="2">Treatment Certificate Number:</td>
<td><em><?php echo"{$row['certificateno']}";?></em></td>
<td align="right" colspan="2">Date of Issue:</td>
<td ><input type="text" name="issuedate" value="<?php echo $row['issuedate']; ?>"></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> <font color="#339933">Party Details:</font> </strong>
</td>
<tr>
<td colspan="2" align="center" width="48%">Client Name:</td>
<td colspan="4">
<?php
if($dtype=='import'){
?>
<select name='clnid' required>
<option value=''>Select one</option>
<?php
$ar=explode(",",$row['declarednameaddress']);
$declarednameaddress=$ar[0];
$quer="SELECT DISTINCT * FROM clients WHERE status='active' order by subname";
$quer=mysql_query($quer);
////////// end of query for second subcategory drop down list box ///////////////////////////
while($noticia = mysql_fetch_array($quer, MYSQL_ASSOC)) {
?>
<option value='<?php echo $noticia['subid'];?>' <?php echo ($noticia['subid']==$declarednameaddress?"selected":"");?>><?php echo $noticia['subname']." –> ".substr($noticia['subaddress'],0,20);?></option>
<?php
}
?>
</select>
<?php
}else{
?>
<select name='clnid' required>
<option value=''>Select one</option>
<?php
$quer=mysql_query("SELECT DISTINCT * FROM head WHERE status='active' order by headname");
////////// end of query for second subcategory drop down list box ///////////////////////////
while($noticia = mysql_fetch_array($quer, MYSQL_ASSOC)) {
?>
<option value='<?php echo $noticia['headid'];?>' <?php echo ($noticia['headid']==$clnt?"selected":"");?>><?php echo $noticia['headname']." –> ".substr($noticia['headaddress'],0,20);?></option>
<?php
}
?>
</select>
<?php
}
?>
</td>
</tr>
<tr>
<td colspan="2" align="center" width="48%">Consignee Name:</td>
<td colspan="4">
<?php
if($dtype=='export'){
?>
<select name='declarednameaddress'>
<option value=''>Select one</option>
<?php
$ar=explode(",",$row['declarednameaddress']);
$declarednameaddress=$ar[0];
$quer="SELECT DISTINCT * FROM clients WHERE status='active' order by subname";
$quer=mysql_query($quer);
////////// end of query for second subcategory drop down list box ///////////////////////////
while($noticia = mysql_fetch_array($quer, MYSQL_ASSOC)) {
?>
<option value='<?php echo $noticia['subid'];?>' <?php echo ($noticia['subid']==$declarednameaddress?"selected":"");?>><?php echo $noticia['subname']." –> ".substr($noticia['subaddress'],0,20);?></option>
<?php
}
?>
</select>
<?php
}else{
?>
<select name='declarednameaddress' required>
<option value=''>Select one</option>
<?php
$quer=mysql_query("SELECT DISTINCT * FROM head WHERE status='active' order by headname");
////////// end of query for second subcategory drop down list box ///////////////////////////
while($noticia = mysql_fetch_array($quer, MYSQL_ASSOC)) {
?>
<option value='<?php echo $noticia['headid'];?>' <?php echo ($noticia['headid']==$clnt?"selected":"");?>><?php echo $noticia['headname']." –> ".substr($noticia['headaddress'],0,20);?></option>
<?php
}
?>
</select>
<?php
}
?>
</td>
</tr>
<td align="left" colspan="6">
<HR><strong> <font color="#339933">DETAILS OF GOODS:</font> </strong>
</td>
</tr>
<tr>
<td align="left" colspan="2">Commodity:</td>
<td><input type="text" name="commodity" value="<?php echo $row['commodity']?>" required></td>
<td align="right" colspan="2">Country of origin:</td>
<td><input type="text" name="portcountry" value="<?php echo $row['portcountry']?>" required></td>
</tr>
<tr>
<td align="right" colspan="2">Quantity Declared:</td>
<td><input type="text" name="quantitydeclared" value="<?php echo $row['quantitydeclared']?>" required></td>
<td align="right" colspan="2">Seal number(s) (if applicable):</td>
<td><input type="text" name="seal_no" value="<?php echo $row['seal_no']?>"></td>
</tr>
<tr>
<td align="left" colspan="2">Port of loading:</td>
<td><input type="text" name="declentry" value="<?php echo $row['declentry']?>"></td>
<td align="right" colspan="2">Country of destination :</td>
<td><input type="text" name="countrydes" value="<?php echo $row['countrydes']?>"></td>
</tr>
<tr>
<td colspan="2">Target of fumigation:</td>
<td >
<div class="checkbox-group">
<label><input type="checkbox" name="desgood[]" value="Commodity" <?php echo(strpos($row['desgood'],"Commodity")!==false?"checked":"")?>> Commodity</label>
<label><input type="checkbox" name="desgood[]" value="Packing" <?php echo(strpos($row['desgood'],"Packing")!==false?"checked":"")?>> Packing</label>
<label><input type="checkbox" name="desgood[]" value="Empty Container" <?php echo(strpos($row['desgood'],"Empty Container")!==false?"checked":"")?>> Container</label>
<label><input type="checkbox" name="desgood[]" value="Others" id="desgood_others" <?php echo(strpos($row['desgood'],"Others")!==false?"checked":"")?>> Others</label>
<div id="desgood_others_div" style="display:<?php echo(strpos($row['desgood'],"Others")!==false?"block":"none")?>">
<input type="text" name="desgood_others" id="desgood_others_text" value="<?php echo $row['desgood_others']?>" style="margin-top:5px; width:90%;">
</div>
</div>
</td>
<td colspan="2">Enclosure Type:</td>
<td >
<div class="radio-group">
<label><input type="radio" name="enclosure_type" value="Sheeted Enclosure" <?php echo($row['enclosure_type']=="Sheeted Enclosure"?"checked":"")?>> Sheeted Enclosure</label>
<label><input type="radio" name="enclosure_type" value="Fumigation Chamber" <?php echo($row['enclosure_type']=="Fumigation Chamber"?"checked":"")?>> Fumigation Chamber</label>
<label><input type="radio" name="enclosure_type" value="Unsheeted Container" <?php echo($row['enclosure_type']=="Unsheeted Container"?"checked":"")?>> Unsheeted Container</label>
<label><input type="radio" name="enclosure_type" value="Others" id="enclosure_type_others" <?php echo($row['enclosure_type']=="Others"?"checked":"")?>> Others</label>
<div id="enclosure_type_others_div" style="display:<?php echo($row['enclosure_type']=="Others"?"block":"none")?>">
<input type="text" name="enclosure_type_others" id="enclosure_type_others_text" value="<?php echo $row['enclosure_type_others']?>" style="margin-top:5px; width:90%;">
</div>
</div>
</td>
</tr>
<tr>
<td align="right" colspan="2">Consignment link::</td>
<td><input type="text" name="consignment_link" value="<?php echo $row['consignment_link']?>"></td>
<td align="right" colspan="2">Container No:</td>
<td><textarea name="nameship" rows="3" cols="25"><?php echo $row['nameship']?></textarea></td>
</tr>
<tr>
<td colspan="6"> <strong><font color="#339933">Treatment Schedule (Prescribed/specified treatment schedule):</font></strong></td>
</tr>
<tr>
<td width="33%" colspan="2">DAFF dose rate (g/m3):
<br>
<select name="namefumigant">
<option <?php echo ($row['namefumigant']==""?"selected":"3 LBS Per 1000 Cubic Ft.")?>>3 LBS Per 1000 Cubic Ft.</option>
<option <?php echo ($row['namefumigant']==""?"selected":"3.5 LBS Per 1000 Ft.")?>>3.5 LBS Per 1000 Cubic Ft.</option>
<option <?php echo ($row['namefumigant']==""?"selected":"4 LBS Per 1000 Cubic Ft.")?>>4 LBS Per 1000 Cubic Ft.</option>
<option <?php echo ($row['namefumigant']==""?"selected":"9 Gms Per Ton")?>>9 Gms Per Ton</option>
<option <?php echo ($row['namefumigant']==""?"selected":"12 Gms Per Ton")?>>12 Gms Per Ton</option>
<option <?php echo ($row['namefumigant']==""?"selected":"6 Gms Per Cubic Meter")?>>6 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"16 Gms Per Cubic Meter")?>>16 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"24 Gms Per Cubic Meter")?>>24 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"32 Gms Per Cubic Meter")?>>32 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"40 Gms Per Cubic Meter")?>>40 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"48 Gms Per Cubic Meter")?>>48 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"56 Gms Per Cubic Meter")?>>56 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"64 Gms Per Cubic Meter")?>>64 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"80 Gms Per Cubic Meter")?>>80 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"88 Gms Per Cubic Meter")?>>88 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"96 Gms Per Cubic Meter")?>>96 Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"100Gms Per Cubic Meter")?>>100Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"108Gms Per Cubic Meter")?>>108Gms Per Cubic Meter</option>
<option <?php echo ($row['namefumigant']==""?"selected":"116Gms Per Cubic Meter")?>>116Gms Per Cubic Meter</option>
</select>
</td>
<td width="33%" colspan="2">
Exposure period (hrs):
<br>
<select name="durationfumigantion" required>
<option value="">Select</option>
<option <?php echo ($row['durationfumigantion']=="12 Hour"?"selected":"12 Hour")?>>12 Hour</option>
<option <?php echo ($row['durationfumigantion']=="24 Hour"?"selected":"24 Hour")?>>24 Hour</option>
<option <?php echo ($row['durationfumigantion']=="48 Hour"?"selected":"48 Hour")?>>48 Hour</option>
<option <?php echo ($row['durationfumigantion']=="72 Hour"?"selected":"72 Hour")?>>72 Hour</option>
<option <?php echo ($row['durationfumigantion']=="7 days"?"selected":"7 days")?>>7 days</option>
</select>
</td>
<td width="33%" colspan="2">
Forecast minimum temp (C): <br>
<input type="text" name="airtemp" value="<?php echo $row['airtemp']?>">
</td>
</tr>
<tr>
<td colspan="6"> <strong><font color="#339933">DETAILS OF TREATMENT:</font></strong></td>
</tr>
<tr>
<td width="33%" colspan="2">
Dosage rate of Fumigation:
<br>
<select name="dosagefumigant_trmnt">
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"3 LBS Per 1000 Cubic Ft.")?>>3 LBS Per 1000 Cubic Ft.</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"3.5 LBS Per 1000 Ft.")?>>3.5 LBS Per 1000 Cubic Ft.</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"4 LBS Per 1000 Cubic Ft.")?>>4 LBS Per 1000 Cubic Ft.</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"9 Gms Per Ton")?>>9 Gms Per Ton</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"12 Gms Per Ton")?>>12 Gms Per Ton</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"6 Gms Per Cubic Meter")?>>6 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"16 Gms Per Cubic Meter")?>>16 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"24 Gms Per Cubic Meter")?>>24 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"32 Gms Per Cubic Meter")?>>32 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"40 Gms Per Cubic Meter")?>>40 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"48 Gms Per Cubic Meter")?>>48 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"56 Gms Per Cubic Meter")?>>56 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"64 Gms Per Cubic Meter")?>>64 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"80 Gms Per Cubic Meter")?>>80 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"88 Gms Per Cubic Meter")?>>88 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"96 Gms Per Cubic Meter")?>>96 Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"100Gms Per Cubic Meter")?>>100Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"108Gms Per Cubic Meter")?>>108Gms Per Cubic Meter</option>
<option <?php echo ($row['dosagefumigant_trmnt']==""?"selected":"116Gms Per Cubic Meter")?>>116Gms Per Cubic Meter</option>
</select>
</td>
<td width="33%" colspan="2">
Exposure period (hrs):
<br>
<select name="durationfumigantion_trmnt" required>
<option value="">Select</option>
<option <?php echo ($row['durationfumigantion_trmnt']=="12 Hour"?"selected":"12 Hour")?>>12 Hour</option>
<option <?php echo ($row['durationfumigantion_trmnt']=="24 Hour"?"selected":"24 Hour")?>>24 Hour</option>
<option <?php echo ($row['durationfumigantion_trmnt']=="48 Hour"?"selected":"48 Hour")?>>48 Hour</option>
<option <?php echo ($row['durationfumigantion_trmnt']=="72 Hour"?"selected":"72 Hour")?>>72 Hour</option>
<option <?php echo ($row['durationfumigantion_trmnt']=="7 days"?"selected":"7 days")?>>7 days</option>
</select>
</td>
<td width="33%" colspan="2">
Forecast minimum temp (C): <br>
<input type="text" name="airtemp_trmnt" value="<?php echo $row['airtemp_trmnt']?>">
</td>
</tr>
<tr>
<td width="33%" colspan="2">
Street Address: <br>
<input type="text" name="streetaddress_trmnt" value="<?php echo $row['streetaddress_trmnt']?>">
</td>
<td width="33%" colspan="2">
Suburb/Town/City: <br>
<input type="text" name="city_trmnt" value="<?php echo $row['city_trmnt']?>">
</td>
<td width="33%" colspan="2">
Country: <br>
<input type="text" name="country_trmnt" value="<?php echo $row['country_trmnt']?>">
</td>
</tr>
<tr>
<td width="33%" colspan="2">
Postcode: <br>
<input type="text" name="postcode_trmnt" value="<?php echo $row['postcode_trmnt']?>">
</td>
<td width="33%" colspan="2">
Date Fumigation commenced:
<input class="datepicker" type="text" name="datefumigantion_start" value="<?php echo $row['datefumigantion_start']?>">
</td>
<td width="33%" colspan="2">
Time Fumigation commenced:
<input type="time" name="timefumigantion_start" value="<?php echo $row['timefumigantion_start']?>">
</td>
</tr>
<tr>
<td width="33%" colspan="2">
Date Fumigation Completed:
<input class="datepicker" type="text" name="datefumigantion_end" value="<?php echo $row['datefumigantion_end']?>">
</td>
<td width="33%" colspan="2">
Time Fumigation Completed:
<input type="time" name="timefumigantion_end" value="<?php echo $row['timefumigantion_end']?>">
</td>
<td width="33%" colspan="2">
Final TLV reading (ppm): <br>
<input type="text" name="perforated" value="<?php echo $row['perforated']?>">
</td>
</tr>
<tr>
<td colspan="6">
<hr size="1" />
<input type="checkbox" name="addition" <?php echo($row['decla']?"checked":"");?>>
<strong> <font color="#339933">ADDITION DECLERATION:</font> </strong>
</td>
</tr>
<tr>
<td colspan="6">
<textarea name="deck" cols="100" style="width:100%;"><?php echo $row['decla'];?></textarea><br />
I declare that these details are true and correct and the fumigation has been carried out in accordance with the Australian Methyl Bromide Standards
</td>
</tr>
<tr>
<td colspan="6" align="center"><br>
<center><input type="submit" value="» UPDATE »" class="amo-submit"></center>
</td>
</tr>
</form>
</table>
<script>
// Handle Others checkbox for target of fumigation
document.getElementById('desgood_others').addEventListener('change', function() {
document.getElementById('desgood_others_div').style.display = this.checked ? 'block' : 'none';
});
// Handle all radio buttons for enclosure type
let enclosureRadios = document.querySelectorAll('input[name="enclosure_type"]');
enclosureRadios.forEach(radio => {
radio.addEventListener('change', function() {
document.getElementById('enclosure_type_others_div').style.display =
this.value === 'Others' ? 'block' : 'none';
});
});
$(".datepicker").datepicker({
dateFormat: 'yy-mm-dd'
});
</script>


PK 99