PK

ADDRLIN : /home/anibklip/vpgldh.com/2022-23/webmanager/
FLL :
Current File : /home/anibklip/vpgldh.com/2022-23/webmanager/searched_agent.php

<?php
	include "templatic/head.php"; 
	include "templatic/header.php";
?>




<table width="100%">
<?php
$clnt=$_POST['ajtname'];
$cl=explode(',',$clnt);
//print $cl['0'];


echo "<tr>  <td>Certificate No.</td> <td>EXPO Invoice No.</td> <td>Commodity</td>  <td>Date of Issue</td> <td>Certificate Type</td> <td>Invoice No.</td> <td>Invoice Amount</td>";


$sql="SELECT * From certificates WHERE ajtid='$cl[0]' || ajtid='$clnt' order by certificateno DESC";
$result=mysql_query($sql) or die('error in Certificates');
if
(mysql_num_rows($result) == 0) {
    echo "<tr><td colspan=9 align=center colour=black><br>No Result found in Invoices for the mentioned number, try again with some other number.<br><br></td></tr>";
}
while($row=mysql_fetch_array($result))
{

if($row['certypo']=='a')
{
	$ctype="ALP";
}
if($row['certypo']=='b')
{
	$ctype="AFAS";
}
if($row['certypo']=='c')
{
	$ctype="NSPM";
}
echo"<tr><td><b>{$row['certificateno']}</b></td> <td>{$row['distmarks']}</td> <td>{$row['desgood']}</td> <td>{$row['issuedate']}</td> <td>$ctype</td>";

$invid ="--";
$round ="--";
$sql1="SELECT * FROM invoices WHERE certid='$row[certificateno]'";
$result1=mysql_query($sql1) or die('error in invoiceno');

while($row1=mysql_fetch_array($result1))
{
	$round=round($row1['grandtotal']);
		
	$invid= $row1['invid'];
		
	
}
echo" <td>$invid</td> <td>$round</td>";

print $row1;
if($row1==" ")
{
	echo "<td>0</td>";
}


echo "</tr>";


}


?>
</table>




<?php
include"templatic/footer.php";
?>


PK 99