PK

ADDRLIN : /home/anibklip/ulpc.in/2021-22/
FLL :
Current File : //home/anibklip/ulpc.in/2021-22/clients.php

<?php
session_start();
require_once 'common/common.php';
require_once 'common/secure.php';

include("connexion.php");
include "head.php";
?>
<h2 id="icon_pick">Manage Clients</h2>
<table width="100%">
	<tr>
		<td class="white" colspan="3"> &nbsp;&nbsp;Below are the existing clients with their details.</td>
	</tr>
	<tr>
		<td><a href="addaclnt.php">+ Add a new Client</a> <br></td>
		<td><a href="subclnt.php">+ Sub Client Details</a> <br></td>
		<td><a href="addajent.php">+ Add Agents</a> <br></td>
	</tr>
</table>

<font color="#006699"><b>Clients List for Monthly Billing:</b></font>
<table cellspacing="3" align="center" width="100%" border="4" cellpadding="2">
	<tr>
		<td><strong>NAME</strong></td>
		<td><strong>ADDRESS</strong></td>
		<td><strong>Description</strong></td>
		<td><strong>Contact Person</strong></td>
		<td><strong>PHONE</strong></td>
		<td><strong>EDIT</strong></td>
	</tr>
	<?php
	$sql="SELECT * FROM head WHERE headid>2 AND parhead='1'";
	$result=mysql_query($sql) or die('error');
	if (mysql_num_rows($result) == 0){
		echo "<tr>
			<td colspan=6 align=center><font color=red><strong><br>No Client/records Found</strong>, please add an account first.</font><br><br></td>
		</tr>";
	}

	while($row=mysql_fetch_array($result)){
		echo"<tr>
		  <td>{$row['headname']}</td>       
		  <td>{$row['headaddress']}</td>     
		  <td>{$row['headdecp']}</td> 
		  <td>{$row['headperson']}</td>    
		  <td>{$row['headphone']}</td>       
		  <td><a href=accedit.php?id={$row['headid']}>EDIT</a></td>
		</tr>";
	}
	?>
</table>
<br><br>
<font color="#006699"><b>Clients List for Non-Monthly Billing:</b></font>
<table cellspacing="3" align="center" width="100%" border="4" cellpadding="2">
	<tr>
		<td><strong>NAME</strong></td>
		<td><strong>ADDRESS</strong></td>
		<td><strong>Description</strong></td>
		<td><strong>Contact Person</strong></td>
		<td><strong>PHONE</strong></td>
		<td><strong>EDIT</strong></td>
	</tr>
	<?php
	$sql="SELECT * FROM head WHERE headid>2 AND parhead='2'";
	$result=mysql_query($sql) or die('error');
	if (mysql_num_rows($result) == 0){
		echo "<tr><td colspan=6 align=center><font color=red><strong><br>No Client/records Found</strong>, please add an account first.</font><br><br></td></tr>";
	}
	while($row=mysql_fetch_array($result)){
		echo"<tr>
		  <td>{$row['headname']}</td>       
		  <td>{$row['headaddress']}</td>     
		  <td>{$row['headdecp']}</td>  
		  <td>{$row['headperson']}</td>    
		  <td>{$row['headphone']}</td>       
		  <td><a href=accedit.php?id={$row['headid']}>EDIT</a></td>
		</tr>";
	}
	?>
</table>

<br><br>
<font color="#006699"><b>Agent List:</b></font>
<table cellspacing="3" align="center" width="100%" border="4" cellpadding="2">
	<tr>
		<td><strong>NAME</strong></td>
		<td><strong>ADDRESS</strong></td>
		<td><strong>Description</strong></td>
		<td><strong>PHONE</strong></td>
		<td><strong>EDIT</strong></td>
	</tr>
	<?php
	$sql="SELECT * FROM ajent";
	$result=mysql_query($sql) or die('error');
	if (mysql_num_rows($result) == 0){
		echo "<tr><td colspan=6 align=center><font color=red><strong><br>No Client/records Found</strong>, please add an account first.</font><br><br></td></tr>";
	}
	while($row=mysql_fetch_array($result)){
		echo"<tr>
		  <td>{$row['ajcomp']}</td>
		  <td>{$row['ajaddress']}</td>     
		  <td>{$row['ajdec']}</td>    
		  <td>{$row['ajphone']}</td>       
		  <td><a href=ajentedit.php?id={$row['ajid']}>EDIT</a></td>
		</tr>";
	}
	?>
</table>
<?php
include "foot.php";
?>


PK 99