<?php

include "../inc/sqlinf.php";
include "apple.inc";
include '../inc/auth.php';

$sql = "SELECT count(*) FROM CLIENTS";
$res = mysql_query($sql);
$row = mysql_fetch_row($res);
?>

<html>
<head>
<title>Paypal Information</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000000" alink="#000000">
<table width="100%" border="5" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF">
  <tr> 
        
        <td> 
          <table width="100%" border="0" cellspacing="1" cellpadding="2" bgcolor="#FFFFFF" bordercolor="#FFFFFF">
                <tr bgcolor="#000066"> 
                  <td width="100%" colspan="2"> <font color="#FFFFFF">&raquo;<b> Clients</b></font></td>
                </tr>
                <tr> 
                  <td bgcolor="#EEEEEE" width="10%"> <br>
                  </td>
                  <td bgcolor="#F9F9F9" width="90%"> <br>
                        <table cellspacing="1" cellpadding="2" border="2" bordercolor="#F9F9F9" bgcolor="#CCCCCC" align="center" width="100%">
                          <tr bgcolor="#FCFCFC"> 
                                <td width="50%">Total Clients</td>
                                <td width="50%" bgcolor="#F9F9F9"> 
                                  <div align="center"> 
                                        <?php echo $row[0]; ?>
                                  </div>
                                </td>
                          </tr>
                        </table>
                        <br>
                        <table width="100%" cellspacing="0" cellpadding="0">
                          <tr> 
                                <td height="5" bgcolor="#FFFFFF"></td>
                          </tr>
                        </table>
                        <br>
                        <table border="2" cellspacing="0" cellpadding="2" bgcolor="#CCCCCC" bordercolor="#F9F9F9">
                          <tr valign="middle" bgcolor="#F9F9F9"> 
                                <td bgcolor="#FFFFFF"> <font color="#666666">Clicking &quot;D&quot; 
                                  will delete a customer, his/her access to the client area, but 
                                  not his/her hosting plan</font></td>
                          </tr>
                        </table>
                        <br>
                        <?PHP
$SQL = "SELECT * from CLIENTS ORDER BY SIGNUPDATE ASC";
$result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) {
include 'query.php';
?>
                        <table cellspacing="1" cellpadding="2" border="2" bordercolor="#F9F9F9" bgcolor="#CCCCCC" width="100%">
                          <tr bgcolor="#F9F9F9"> 
                                <td width="15%" bgcolor="#FFFFFF"> 
                                  <?php echo $signupdate;?>
                                </td>
                                <td width="25%">
                                  <?php echo $payer_email;?>
                                </td>
                                <td width="25%" bgcolor="#FFFFFF"> 
                                  <?php echo $dn;?>
                                </td>
                                <td width="20%" bgcolor="#F9F9F9"> 
                                  <div align="center"> 
                                        <?php echo $paackage;?>
                                  </div>
                                </td>
                                <td width="5%" bgcolor="#F9F9F9"> 
                                  <div align="center"><a href="app/delete.php?id=<?php echo $id; ?>&type=CLIENTS&return=userlist">D</a></div>
                                </td>
                                <td width="10%" bgcolor="#F9F9F9"> 
                                  <div align="center"><a href="userdetails.php?id=<?php echo $id; ?>" target="main">Details</a></div>
                                </td>
                          </tr>
                        </table>
                        <?php } ?>
                  </td>
                </tr>
          </table>
        </td>
  </tr>
</table>
</body>
</html>


