<?php

include "../inc/sqlinf.php";
include "../inc/apple.inc";
$auth = $_POST['auth'];
$unn = $_POST['un'];
$pww = $_POST['pw'];



?>

<html>
<head>
<title>Auto-Host User Control Panel</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">
<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> User 
			Control Panel</b></font></td>
                </tr>
                <tr> 
                  
                  
                  
		  <td bgcolor="#F9F9F9" width="20%" valign="top"> 
			<?php include 'auth.php'; ?>
			<br>
		  </td>
                  
                  
                  
                  
		  <td bgcolor="#FFFFFF" width="80%"> 
			<div align="center"> 
			  <?php if ($y == 'yes') {}
                        elseif (empty($auth)) {echo 'Please Log In'; die(); }
                        elseif (empty($y)) {echo 'Please Log In'; die(); }
                        elseif ($y = 'no') {echo 'Incorrect Login'; die(); }
                        ?>
			  <?php $SQL = "SELECT * from CLIENTS WHERE USERNAME = '$unn' AND CPW ='$pww'";
$result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) {
include '../admin/query.php';} ?>
			  <br>
			</div>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
			  <tr> 
				<td width="50%"> 
				  <table border="0" cellspacing="0" cellpadding="0" align="center" width="95%">
					<tr> 
					  <td width="17" bgcolor="#F9F9F9" background="../img/tl.jpg"></td>
					  <td height="17" bgcolor="#F9F9F9" background="../img/shgt.jpg"></td>
					  <td width="7" bgcolor="#F9F9F9" background="../img/tr.jpg"></td>
					</tr>
					<tr> 
					  <td width="7" bgcolor="#F9F9F9" background="../img/svgl.jpg"></td>
					  <td bgcolor="#FFFFFF"> 
						<table border="5" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF" width="100%">
						  <tr> 
							<td valign="top" bgcolor="#FFFFFF"> 
							  <table border="5" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC" bordercolor="#FFFFFF" align="center" background="img/g.jpg" width="100%">
								<tr bgcolor="#F9F9F9" valign="middle"> 
								  <td bgcolor="#F9F9F9">Signup Date</td>
								  <td bgcolor="#F9F9F9"><font color="#000000"> 
									<?php echo $signupdate;?>
									</font></td>
								</tr>
								<tr bgcolor="#F9F9F9" valign="middle"> 
								  <td bgcolor="#F9F9F9">Last Payment</td>
								  <td bgcolor="#F9F9F9"> 
									<?php echo $lastpayment;?>
								  </td>
								</tr>
								<tr bgcolor="#F9F9F9" valign="middle"> 
								  <td bgcolor="#F9F9F9">Next Payment<font color="#F9F9F9">-</font></td>
								  <td bgcolor="#F9F9F9"> 
									<?php echo $nextpayment;?>
								  </td>
								</tr>
								<tr bgcolor="#F9F9F9" valign="middle"> 
								  <td bgcolor="#F9F9F9">Status</td>
								  <td bgcolor="#F9F9F9"> 
									<?php echo $status;?>
								  </td>
								</tr>
								<tr bgcolor="#F9F9F9" valign="middle"> 
								  <td bgcolor="#F9F9F9">Domain</td>
								  <td bgcolor="#F9F9F9"> 
									<?php echo $dn;?>
								  </td>
								</tr>
								<tr bgcolor="#F9F9F9" valign="middle"> 
								  <td bgcolor="#F9F9F9">Package</td>
								  <td bgcolor="#F9F9F9"> 
									<?php echo $paackage;?>
								  </td>
								</tr>
							  </table>
							</td>
						  </tr>
						</table>
					  </td>
					  <td width="17" bgcolor="#F9F9F9" background="../img/svgr.jpg"></td>
					</tr>
					<tr> 
					  <td width="7" bgcolor="#F9F9F9" background="../img/bl.jpg"></td>
					  <td height="17" bgcolor="#F9F9F9" background="../img/shg.jpg"></td>
					  <td width="7" bgcolor="#F9F9F9" background="../img/br.jpg"></td>
					</tr>
				  </table>
				</td>
				<td width="50%" valign="top"> 
				  <?php $SQL = "SELECT * from SETTINGS";
$result = mysql_query( $SQL );
while( $row = mysql_fetch_array( $result ) ) {
$receiver_email = $row["RECEIVER_EMAIL"];
} ?>
				  <form name="form1" method="post" action="https://www.paypal.com/cgi-bin/webscr?cmd=_subscr-find&alias=<?php echo $receiver_email; ?>">
					<table border="0" cellspacing="0" cellpadding="0" align="center">
					  <tr> 
						<td width="17" bgcolor="#F9F9F9" background="../img/tl.jpg"></td>
						<td height="17" bgcolor="#F9F9F9" background="../img/shgt.jpg"></td>
						<td width="7" bgcolor="#F9F9F9" background="../img/tr.jpg"></td>
					  </tr>
					  <tr> 
						<td width="7" bgcolor="#F9F9F9" background="../img/svgl.jpg"></td>
						<td bgcolor="#FFFFFF"> 
						  <table border="5" cellspacing="0" cellpadding="0" bordercolor="#FFFFFF" width="100%">
							<tr> 
							  <td valign="top" bgcolor="#FFFFFF"> 
								<table border="5" cellspacing="0" cellpadding="0" bgcolor="#CCCCCC" bordercolor="#FFFFFF" align="center" background="img/g.jpg" width="100%">
								  <tr bgcolor="#F9F9F9" valign="middle"> 
									<td width="50%"> 
									  <div align="center"><font color="#000000"> 
										<input type="submit" name="Cancel Membership" value="Cancel Membership">
										</font></div>
									</td>
								  </tr>
								</table>
							  </td>
							</tr>
						  </table>
						</td>
						<td width="17" bgcolor="#F9F9F9" background="../img/svgr.jpg"></td>
					  </tr>
					  <tr> 
						<td width="7" bgcolor="#F9F9F9" background="../img/bl.jpg"></td>
						<td height="17" bgcolor="#F9F9F9" background="../img/shg.jpg"></td>
						<td width="7" bgcolor="#F9F9F9" background="../img/br.jpg"></td>
					  </tr>
					</table>
				  </form>
				</td>
			  </tr>
			</table>
		  </td>
                </tr>
          </table>
        
	</td>
  </tr>
</table>
<div align="right"><font color="#CCCCCC"><br>
  Powered by Auto-Host</font></font> 
  <font color="#000000"> </font></div>
</body>
</html>



