
PK 
<?php
session_start();
require_once 'common/common.php';
require_once 'common/secure.php';
include"connexion.php";
require_once "head.php";
?>
<head>
<title>ANIBS BUSSINESS SOLUTIONS</title>
<body>
<?
@$cat=$_SESSION[cat]=$_GET['cat']; // Use this line or below line if register_global is off
//@$cat=$HTTP_GET_VARS['cat']; // Use this line or above line if register_global is off
///////// Getting the data from Mysql table for first list box//////////
$quer2=mysql_query("SELECT DISTINCT * FROM head WHERE parhead='0'");
///////////// End of query for first list box////////////
/////// for second drop down list we will check if category is selected else we will display all the subcategory/////
if(isset($cat) and strlen($cat) > 0)
{
$quer=mysql_query("SELECT DISTINCT * FROM head WHERE parhead='$cat' order by headname");
}
else
{
$quer=mysql_query("SELECT DISTINCT * FROM head order by headname");
}
////////// end of query for second subcategory drop down list box ///////////////////////////
?>
<div id="content">
<div class="error-notice">
Select the Followings:
<?php
if(isset($_GET['err']) || $_GET['err']=="noform")
{
print "<br/><b style='color:red;'>Please Select a correct FORM Type.</b>";
}
?>
<table width="100%" border="1" cellspacing="0" cellpadding="0">
<form action="sub_form.php" method="get">
<tr>
<td align="center" width="48%">Client Name:
<?php
/////// for second drop down list we will check if category is selected else we will display all the subcategory/////
if(isset($cat) and strlen($cat) > 0){
$quer=mysql_query("SELECT DISTINCT * FROM head WHERE status='active' order by headname");
}else{
$quer=mysql_query("SELECT DISTINCT * FROM head WHERE status='active' order by headname");
}
////////// end of query for second subcategory drop down list box ///////////////////////////
?>
<input name='clntid' id="importerslist" size="80" type="text" />
<?php
/*echo "<select name='clntid'><option value=''>Select one</option>";
while($noticia = mysql_fetch_array($quer)) {
echo "<option value='$noticia[headid]'>".$noticia[headname]." –> ".substr($noticia['headaddress'],0,20)."</option>";
}
echo "</select>";
*/?>
</td></tr>
<tr>
<td width="52%">Cert. Type: <select name="dtype"><option value="import">Importer</option><option selected value="export">Exporter</option></select></td>
</tr>
<tr>
<?php
/*
if(isset($_GET['formno']) && $_GET['formno']!="0")
{
$formno = $_GET['formno'];
if($formno=='a'){$aselected = "selected"; $ctable = "cert_alp";}
if($formno=='b'){$bselected = "selected"; $ctable = "cert_aqis";}
if($formno=='c'){$cselected = "selected"; $ctable = "cert_ppq";}
if($formno=='d'){$dselected = "selected"; $ctable = "cert_aqis";}
}
*/
?>
<td width="52%">Form Type: <select name="formno">
<!-- <option value="a" <?php //print $aselected; ?>>ALP</option>
<option value="b" <?php //print $bselected; ?>>AQIS</option>-->
<option value="c" <?php //print $cselected; ?>>NSPM</option>
<option value="d" <?php //print $dselected; ?>>AUS</option>
</select></td>
</tr>
<tr>
<td width="50%">Sub Certificate ID:
<select name="sub_cert_id">
<?php
/*$sql="SELECT max(certificateno) as certificateno FROM certificate ";
$result=mysql_query($sql) or die('error in fetch');
$row=mysql_fetch_array($result);*/
$option[] = "";
$sql_sub = "SELECT certificateno FROM cert_alp WHERE sub_c='yes' ORDER BY certificateno DESC LIMIT 20";
$result_sub=mysql_query($sql_sub);
while($row_sub=mysql_fetch_array($result_sub)){
//echo "<option value='".$row_sub['certificateno']."'>ALP- ".$row_sub['certificateno']."</option>";
$certypo = $row_sub['certypo'];
$option['a'][] = $row_sub['certificateno'];
}
$sql_sub = "SELECT certificateno FROM cert_aqis WHERE sub_c='yes' AND certypo='b' ORDER BY certificateno DESC LIMIT 20";
$result_sub=mysql_query($sql_sub);
while($row_sub=mysql_fetch_array($result_sub)){
//echo "<option value='".$row_sub['certificateno']."'>ALP- ".$row_sub['certificateno']."</option>";
$certypo = $row_sub['certypo'];
$option['b'][] = $row_sub['certificateno'];
}
$sql_sub = "SELECT certificateno FROM cert_ppq WHERE sub_c='yes' ORDER BY certificateno DESC LIMIT 20";
$result_sub=mysql_query($sql_sub);
while($row_sub=mysql_fetch_array($result_sub)){
//echo "<option value='".$row_sub['certificateno']."'>ALP- ".$row_sub['certificateno']."</option>";
$certypo = $row_sub['certypo'];
$option['c'][] = $row_sub['certificateno'];
}
$sql_sub = "SELECT certificateno FROM cert_aqis WHERE sub_c='yes' AND certypo='d' ORDER BY certificateno DESC LIMIT 20";
$result_sub=mysql_query($sql_sub);
while($row_sub=mysql_fetch_array($result_sub)){
//echo "<option value='".$row_sub['certificateno']."'>ALP- ".$row_sub['certificateno']."</option>";
$certypo = $row_sub['certypo'];
$option['d'][] = $row_sub['certificateno'];
}
foreach($option['a'] as $opta){
print "<option value=ALP$opta>ALP # $opta</option>";
}
foreach($option['b'] as $optb){
print "<option value=AQIS$optb>AQIS # $optb</option>";
}
foreach($option['c'] as $optc){
print "<option value=NSPM$optc>NSPM # $optc</option>";
}
foreach($option['d'] as $optd){
print "<option value=AUS$optd>AUS # $optd</option>";
}
?>
</select></td>
</tr>
<tr>
<td colspan="2" align="center"><center>
<?php echo "<input type=submit value='» Start Certification »'; class=amo-submit>";
?>
</center></td>
</tr>
</form>
</table>
<p align="center"> Choose the above data carefully and correctly.</p>
</div>
</div>
<hr class="hide" />
<?php
include"foot.php";
?>


PK 99