<? 

//
//  cP Account Creator Version 0.4 Beta Build 01
//  Copyright (C) 2004 Brian Freeman
//  All Rights Reserved.
//
//  This script set is distributed as is with absolutely no warranty.
//  Users of this script set agree to use at their own risk.
//  Questions or comments?  Contact webmaster@freemans-web.com
//
//








include("../config.php");



$cp_email="$email@$domain";







//$conn  = mysql_connect($dbhost, $dbusername, $dbpass) or die(mysql_error( ));

//mysql_select_db($dbname,$conn) or die(mysql_error( ));



$get_items="SELECT * FROM email_users WHERE id='$cp_id'";

$get_items_res=mysql_query($get_items)  or die(mysql_error( ));

	while ($items = mysql_fetch_array ($get_items_res)) {
       		$cp_id=$items[id];
		$cp_username=$items[username];
		$cp_email=$items[cp_email];
		$cp_sub_dom=$items[sub_domain];
                $act_sub=$items[act_sub];
		$cp_password = $items[password];
		$cp_first_name = $items[first_name];
		$cp_last_name = $items[last_name];
		$alt_email = $items[email];
		$approved=$items[approved];
		$password=$items[raw_pwd];
		$quota=$items[quota];
                $user_ip=$items[user_ip];
                $user_host=$items[user_hostname];
                $cp_quota=$items[quota];

           }


include ("header.php");
?>
<table border=0>
<tr>
<td>
<table width="200">
<tr>
<td>
&nbsp
</td>
</tr>
</table>
<td>
<table border=8>
<?
$display_block = "<tr><td>  <font size=4>User Name:</td><td><font size=4> $cp_username</td><td><a href=functions.php?del_pop=1&id=$cp_id&email=$cp_username&domain=$domain><img border=0 src=../images/delete.gif alt=\"Delete User Name\"></a></td><tr><td>  <font size=4>Web Site:</td><td><font size=4><a href=http://$cp_sub_dom target=new>$cp_sub_dom</a></td><td></td></tr><tr><td>  <font size=4>IP Address:</td><td><font size=4>  $user_ip</td><td><a href=functions.php?banned=1&b_field=banned_ip&b_entry=$user_ip><img border=0 src=../images/ban.gif alt=\"Ban IP Address\"></a></td><tr><td>  <font size=4>Host Name:</td><td><font size=4> $user_host</td><td><a href=functions.php?banned=1&b_field=banned_host&b_entry=$user_host><img border=0 src=../images/ban.gif alt=\"Ban Host Name\"></a></td></tr>";
echo $display_block;
?>
</font>





<form method="POST" action="functions.php">

<tr>

<td>
<font size="4">
First Name:

</td>

<td><input type="text" name="first_name" value=<? echo $cp_first_name;?>>

</td>
<td></td>
</tr>

<tr>

<td>
<font size="4">
Last Name:

</td>

<td><input type="text" name="last_name" value=<? echo $cp_last_name;?>>

</td>
 <td></td>
</tr>

<tr>

<td>
<font size="4">
Alternate Email:

</td>

<td><input type="text" name="alt_email" value=<? echo $alt_email;?>>

</td>
 <td><a href=functions.php?banned=1&b_field=banned_email&b_entry=<?echo $alt_email;?> ><img border=0 src=../images/ban.gif alt="Ban Email Address"></a></td>
</tr>



<tr>

<td>
<font size="4">
System E-mail:

</td>

<td><? echo $cp_username;?>@<?echo $domain;?>

</td>
<td></td>
</tr>

<tr>

<td>
<font size="4">
Quota:

</td>

<td><? echo $cp_quota;?><td>

</td>
 <td></td>
</tr>



<input type="hidden" name="updt_user" value="1">

<input type="hidden" name="cp_id" value=<? echo $cp_id;?>>

<tr>
<td></td>
<td><input type="submit" value="Update"></td>

</tr>





</form>

<form method="POST" action="functions.php">

</tr>
</td>

<tr>
<td>
</td>
</tr>
<tr>
<td>

<tr>

<td>
<font size="4">
Change Password:

</td>

<td><input type="password" name="password" >

</td>
<td></td>
</tr>

<input type=hidden name=email value=<? echo$cp_username;?>>

<input type=hidden name=quota value=<? echo$cp_quota;?>>

<input type=hidden name=chg_pass value=1>

<tr>
<td></td>
<td><input type="submit" value="Update"></td>

</tr>

</form>

  </table>
</table>
</td>
</tr>
</table>


</body>

</html>
<?
include("footer.php");
?>











