PDA

View Full Version : Is anything wrong with this code?



Mickword
10-08-2009, 08:11 PM
Hey guys found this user system, edited a bit is there anything wrong. its a bit long and have like 20 pages in one so yeah lol.
<?
ob_start();
//=========================== CONFIGURATION ===========================
$sitetitle = "PixeledHabboFM :: User System"; //Website Title
$siteurl = "http://www.phfm.co.cc/"; //Website URL
$cookieid = "yoursiteid"; //Default "yoursiteid"

$cloc = "localhost"; //Database Location - Default "localhost"
$cuser = "phfmcocc_michael"; //Database Username
$cpass= "michael11"; //Database Password
$cdb = "phfmcocc_login"; //Database Name
//======================= END OF CONFIGURATION ========================

//=========================== DB CONNECTION ===========================
$conn = mysql_connect("$cloc","$cuser","$cpass");
if (!$conn) die ("<center><font size='4' face='Tahoma'><b>Could not connect MySQL. Check your configuration settings by opening login.php</b></center></font>");
mysql_select_db($cdb,$conn) or die ("Could not open database");
$logged = MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[$cookieid]'");
$logged = mysql_fetch_array($logged);
//======================= END OF DB CONNECTION ========================
echo "<title>$sitetitle</title><body bgcolor='$logged[userbg]' topmargin='2' leftmargin='2' rightmargin='2' bottommargin='2' marginwidth='0' marginheight='0' link='#000000' vlink='#000000' alink='#000000'>";
if($logged[username]){
$ip = $_SERVER['REMOTE_ADDR'];
$update = mysql_query("UPDATE `users` SET `ip` = '$ip' WHERE `username` = '$username'");
}
if(isset($_GET['error'])){
$error = $_GET['error'];
if($error == 1){
$errorcode = "Unable to find this user. Make sure you are registered and entering the correct username.";
}else if($error == 2){
$errorcode = "The Password does not match.";
}else if($error == 3){
$errorcode = "You have been banned and are unable to login.";
}else if($error == 4){
$errorcode = "You are not logged in.";
}else if($error == 5){
$errorcode = "You are already logged in.";
}else if($error == 6){
$errorcode = "You have left a field blank.";
}else if($error == 7){
$user = $_GET['user'];
$errorcode = "The username used is already registered.<br>To retrieve the password go back to the login page and click reset password.";
}else if($error == 8){
$email = $_GET['email'];
$errorcode = "The email address used is already registered with another account.";
}else if($error == 9){
$errorcode = "This account is currently in the process of being reset.<br>Check your emails to complete resetting your password before logging in.";
}else if($error == 10){
$errorcode = "The activation code is incorrect.";
}else if($error == 11){
$errorcode = "The username/email provided does not exist.";
}else if($error == 12){
$errorcode = "The answer you provided is incorrect.";
}else if($error == 13){
$errorcode = "You can not have your old password the same as your new password.";
}else if($error == 14){
$errorcode = "The user does not exist.";
}else if($error == 15){
$errorcode = "You can not send a private message to yourself.";
}else if($error == 16){
$errorcode = "You are not a recipient of this message.";
}else if($error == 17){
$errorcode = "This message has been deleted.";
}else if($error == 18){
$errorcode = "You are not an administrator.<br>What do you think your doing here ?";
}else{
$errorcode = "Unknown Error Code";
}
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Error</font></b></td>
</tr>
<tr>
<td>
<p align='center'><font size='2' face='Tahoma'>$errorcode</font></td>
</tr>
</table></div>";
}else if(isset($_GET['admin'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else if($logged[level] != Administrator){
header('Location: login.php?error=18');
exit();
}else{
if(isset($_GET['manageusers'])){
$manageusers = $_GET['manageusers'];
if($manageusers == NULL){
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Member List</font></b></td>
</tr>
<tr>
<td width='100%'>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td width='25%' align='center'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
Username</font></td>
<td width='18%' align='center'>
<font face='Verdana' style='font-size: 9pt'>
<b>Level</b></font></td>
<td width='25%' align='center'>
<font face='Verdana' style='font-size: 9pt'>
<b>Email Address:</b></font></td>
<td width='15%' align='center'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
PM This User</font></td>
</tr>";
$result = mysql_query("SELECT * FROM users ORDER BY `id` ASC");
while($r=mysql_fetch_array($result)){
$id = $r['id'];
$username = $r['username'];
$level = $r['level'];
$email = $r['email'];
echo "<tr>
<td width='25%' height='14'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?admin&manageusers=$id'><center>$username</center></a></font></td>
<td width='18%' height='14'>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>$level</font></td>
<td width='25%' height='14'>
<p align='center'><font face='Verdana'>
<span style='font-size: 9pt'>$email</span></font></td>
<td width='15%' height='14'>
<p align='center'>
<a href='login.php?privatemsg&compose&to=$username'>
<font face='Verdana' style='font-size: 9pt'>
PM</font></td>
</tr>";
}
echo"</table>
</td>
</tr>
</table></div>";
}else{
if($_POST[submit]){
$manageusers = $_GET['manageusers'];
$email = strip_tags($_POST['email']);
$msnaddress = strip_tags($_POST['msnaddress']);
$yahooaddress = strip_tags($_POST['yahooaddress']);
$googletalk = strip_tags($_POST['googletalk']);
$habbo = strip_tags($_POST['habbo']);
$hotel = $_POST['hotel'];
if($email == NULL|$habbo == NULL|$hotel == NULL){
header('Location: login.php?error=6');
exit();
}
if($msnaddress == NULL){
$msnaddress = 'Not Specified';
}
if($yahooaddress == NULL){
$yahooaddress='Not Specified';
}
if($googletalk == NULL){
$googletalk='Not Specified';
}
$update = mysql_query("UPDATE `users` SET `email` = '$email', `habbo` = '$habbo', `hotel` = '$hotel', `msn` = '$msnaddress', `yahoo` = '$yahooaddress', `google` = '$googletalk' WHERE `id` = '$manageusers'");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Administration Manage Users</font></b></td>
</tr>
<tr>
<td width='100%'>
<p align='center'><font face='Verdana' style='font-size: 9pt'>
You have successfully updated the profile.<br><a href='login.php'>Return</a></font></td>
</tr>
</table></div>";
}else{
$userinfo = MYSQL_QUERY("SELECT * from users WHERE id='$manageusers'");
$userinfo = mysql_fetch_array($userinfo);
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td colspan='2'><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Administration Manage Users</font></b></td>
</tr>
<form method='POST'>
<tr>
<td width='40%' align='right'><b><font face='Tahoma' size='2'>Username:</font></b></td>
<td width='72%'>
<input type='text' readonly value='$userinfo[username]' name='username' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><b><font face='Tahoma' size='2'>Email
Address:</font></b></td>
<td width='72%'>
<input type='text' name='email' value='$userinfo[email]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'>
<span style='font-size: 8pt; font-weight:700'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'>
<b>
<font face='Tahoma' size='2'>MSN Address:</font></b></td>
<td width='72%'>
<input type='text' name='msnaddress' value='$userinfo[msn]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<b>
<font face='Tahoma' size='2'>Yahoo Address:</font></b></td>
<td width='72%'>
<input type='text' name='yahooaddress' value='$userinfo[yahoo]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<b>
<font face='Tahoma' size='2'>Google Talk:</font></b></td>
<td width='72%'>
<input type='text' name='googletalk' value='$userinfo[google]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'>
<span style='font-size: 8pt; font-weight:700'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'><b><font face='Tahoma' size='2'>Habbo
Name:</font></b></td>
<td width='72%'>
<input type='text' name='habbo' value='$userinfo[habbo]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<b>
<font face='Tahoma' size='2'>Habbo Hotel Used:</font></b></td>
<td width='72%'>";
$result = mysql_query("SELECT * FROM users WHERE `id` = '$manageusers'");
while($r=mysql_fetch_array($result)){
$hotel = $r['hotel'];
echo"<select size='1' name='hotel' style='font-family: Tahoma; font-size: 9pt; color: #000000; border: 1px solid #000000; padding: 0'>";
if($hotel==".co.uk"){ echo "<option selected value='.co.uk'>United Kingdom</option>";}else{echo "<option value='.co.uk'>United Kingdom</option>";}
if($hotel==".com"){ echo "<option selected value='.com'>USA</option>";}else{echo "<option value='.com'>USA</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Argentina</option>";}else{echo "<option value='.es'>Argentina</option>";}
if($hotel==".com.au"){ echo "<option selected value='.com.au'>Australia</option>";}else{echo "<option value='.com.au'>Australia</option>";}
if($hotel==".at"){ echo "<option selected value='.at'>Austria</option>";}else{echo "<option value='.at'>Austria</option>";}
if($hotel==".be"){ echo "<option selected value='.be'>Belgium</option>";}else{echo "<option value='.be'>Belgium</option>";}
if($hotel==".com.br"){ echo "<option selected value='.com.br'>Brazil</option>";}else{echo "<option value='.com.br'>Brazil</option>";}
if($hotel==".ca"){ echo "<option selected value='.ca'>Canada</option>";}else{echo "<option value='.ca'>Canada</option>";}
if($hotel==".cl"){ echo "<option selected value='.cl'>Chile</option>";}else{echo "<option value='.cl'>Chile</option>";}
if($hotel==".com.co"){ echo "<option selected value='.com.co'>Colombia</option>";}else{echo "<option value='.com.co'>Colombia</option>";}
if($hotel==".dk"){ echo "<option selected value='.dk'>Denmark</option>";}else{echo "<option value='.dk'>Denmark</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Ecuador</option>";}else{echo "<option value='.es'>Ecuador</option>";}
if($hotel==".fi"){ echo "<option selected value='.fi'>Finland</option>";}else{echo "<option value='.fi'>Finland</option>";}
if($hotel==".fr"){ echo "<option selected value='.fr'>France</option>";}else{echo "<option value='.fr'>France</option>";}
if($hotel==".de"){ echo "<option selected value='.de'>Germany</option>";}else{echo "<option value='.de'>Germany</option>";}
if($hotel==".ie"){ echo "<option selected value='.ie'>Ireland</option>";}else{echo "<option value='.ie'>Ireland</option>";}
if($hotel==".it"){ echo "<option selected value='.it'>Italy</option>";}else{echo "<option value='.it'>Italy</option>";}
if($hotel==".jp"){ echo "<option selected value='.jp'>Japan</option>";}else{echo "<option value='.jp'>Japan</option>";}
if($hotel==".com.my"){ echo "<option selected value='.com.my'>Malaysia</option>";}else{echo "<option value='.com.my'>Malaysia</option>";}
if($hotel==".com.mx"){ echo "<option selected value='.com.mx'>Mexico</option>";}else{echo "<option value='.com.mx'>Mexico</option>";}
if($hotel==".fr"){ echo "<option selected value='.fr'>Morocco</option>";}else{echo "<option value='.fr'>Morocco</option>";}
if($hotel==".nl"){ echo "<option selected value='.nl'>Netherlands</option>";}else{echo "<option value='.nl'>Netherlands</option>";}
if($hotel==".co.nz"){ echo "<option selected value='.co.nz'>New Zealand</option>";}else{echo "<option value='.co.nz'>New Zealand</option>";}
if($hotel==".no"){ echo "<option selected value='.no'>Norway</option>";}else{echo "<option value='.no'>Norway</option>";}
if($hotel==".com.pe"){ echo "<option selected value='.com.pe'>Peru</option>";}else{echo "<option value='.com.pe'>Peru</option>";}
if($hotel==".pt"){ echo "<option selected value='.pt'>Portugal</option>";}else{echo "<option value='.pt'>Portugal</option>";}
if($hotel==".ru"){ echo "<option selected value='.ru'>Russia</option>";}else{echo "<option value='.ru'>Russia</option>";}
if($hotel==".sg"){ echo "<option selected value='.sg'>Singapore</option>";}else{echo "<option value='.sg'>Singapore</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Spain</option>";}else{echo "<option value='.es'>Spain</option>";}
if($hotel==".se"){ echo "<option selected value='.se'>Sweden</option>";}else{echo "<option value='.se'>Sweden</option>";}
if($hotel==".ch"){ echo "<option selected value='.ch'>Switzerland</option>";}else{echo "<option value='.ch'>Switzerland</option>";}
if($hotel==".com.ve"){ echo "<option selected value='.com.ve'>Venezuela</option>";}else{echo "<option value='.com.ve'>Venezuela</option>";}
}
echo "</select></td>
</tr>
<tr>
<td colspan='2'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
IP Address:</font></td>
<td width='72%'>
<font face='Verdana' style='font-size: 9pt'>$userinfo[ip]</font></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>Registered Date:</font></td>
<td width='72%'><font face='Verdana' style='font-size: 9pt'>
$userinfo[regdate]</font></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>Secret Question:</font></td>
<td width='72%'><font face='Verdana' style='font-size: 9pt'>
$userinfo[question]</font></td>
</tr>
<tr>
<td width='40%' align='right'>
&nbsp;</td>
<td width='72%'>&nbsp;</td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>Email In Public:</font></td>
<td width='72%'><font face='Verdana' style='font-size: 9pt'>";
if($userinfo[publicemail] == 1){
echo "Yes";
}else{
echo "No";
}
echo "</td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>Email On New PM:</font></td>
<td width='72%'><font face='Verdana' style='font-size: 9pt'>";
if($userinfo[pmemail] == 1){
echo "Yes";
}else{
echo "No";
}
echo "</td>
</tr>
<tr>
<td width='40%' align='right'>
&nbsp;</td>
<td width='72%'>&nbsp;</td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>Background Color:</font></td>
<td width='72%'><font face='Verdana' style='font-size: 9pt'>
$userinfo[userbg]</font></td>
</tr>
<tr>
<td colspan='2'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Submit' name='submit' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table></div>";
}
}
}else{
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Admin Control Panel</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
<a href='login.php?admin&manageusers' style='text-decoration: none'>
Manage Users</a></font></td>
</tr>
<tr>
<td>
<font face='Verdana' style='font-size: 9pt'>- From here you can manage all aspects of members.</font></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
More Coming Soon</font></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table></div>";
}
}
}else if(isset($_GET['privatemsg'])){
if(!$logged[username]){
header('Location: login.php?error=18');
exit();
}else{
if(isset($_GET['sent'])){
echo "<div align='center'><table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg' style='text-decoration: none'>Inbox</a> |
<a style='text-decoration: none' href='login.php?privatemsg&sent'>Sent Messages</a> |
<a href='login.php?privatemsg&compose' style='text-decoration: none'>Compose Message</a></font></td>
</tr>
<tr>
<td>
<p align='center'>
<b><font face='Verdana' style='font-size: 9pt'>Sent
Messages</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td align='left' width='95'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>From</font></td>
<td align='left'><font face='Verdana' style='font-size: 9pt; font-weight: 700'>Subject</font></td>
<td align='left' width='131'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
Date - Time</font></td>
</tr>";
$result = mysql_query("SELECT * FROM privatemsg WHERE `from`='$logged[username]' AND `fromdelete` = '0' ORDER BY `id` DESC");
while($r=mysql_fetch_array($result)){
$id = $r['id'];
$from = $r['from'];
$subject = $r['subject'];
$date = $r['date'];
$time = $r['time'];
echo "<tr>
<td width='95'>
<font face='Verdana' style='font-size: 9pt'>
$from</font></td>
<td><font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg&read=$id'>$subject</a></font></td>
<td width='131'>
<font face='Verdana' style='font-size: 9pt'>
$date - $time</font></td>
</tr>";
}
echo "</table>
</td>
</tr>
</table>
</td>
</tr>
</table></div>";
}else if(isset($_GET['delete'])){
$delete = $_GET['delete'];
$deleter = MYSQL_QUERY("SELECT * from privatemsg WHERE id='$delete'");
$dr = mysql_fetch_array($deleter);
$checkmsg = mysql_num_rows($deleter);
if($checkmsg == 0){
header('Location: login.php?error=17');
exit();
}
if($dr[to] == $logged[username]){
if($dr[todelete] == 1){
header('Location: login.php?error=17');
exit();
}
$update = mysql_query("UPDATE `privatemsg` SET `todelete` = '1' WHERE `id` = '$delete'");
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td><p align='center'><font size='2' face='Tahoma'>Successfully Deleted The Private Message.
<center><a href='login.php'>Click Here</a> To Return.</font></center></font></td>
</tr>
</table></div>";
}else if($dr[from] == $logged[username]){
if($dr[fromdelete] == 1){
header('Location: login.php?error=17');
exit();
}
$update = mysql_query("UPDATE `privatemsg` SET `fromdelete` = '1' WHERE `id` = '$delete'");
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td><p align='center'><font size='2' face='Tahoma'>Successfully Deleted The Private Message.<br>
<center><a href='login.php'>Click Here</a> To Return.</font></center></td>
</tr>
</table></div>";
}else{
header('Location: login.php?error=16');
exit();
}
}else if(isset($_GET['read'])){
$pmid = $_GET['read'];
$result = mysql_query("SELECT * FROM privatemsg WHERE `id` = '$pmid'");
while($r=mysql_fetch_array($result)){
$id=$r["id"];
$to=$r["to"];
$from=$r["from"];
$subject=$r["subject"];
$message=$r["message"];
$date=$r["date"];
$todelete=$r["todelete"];
$fromdelete=$r["fromdelete"];
$time=$r["time"];
}
if($from == $logged[username]|$to == $logged[username]){
if($to == $logged[username]){
if($todelete == 1){
header('Location: login.php?error=17');
exit();
}
}
if($from == $logged[username]){
if($fromdelete == 1){
header('Location: login.php?error=17');
exit();
}
}
if($logged[username] == $to){
$update = mysql_query("UPDATE `privatemsg` SET `read` = '1' WHERE `id` = '$pmid'");
}
echo "<div align='center'><table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg' style='text-decoration: none'>Inbox</a> |
<a style='text-decoration: none' href='login.php?privatemsg&sent'>Sent Messages</a> |
<a href='login.php?privatemsg&compose' style='text-decoration: none'>Compose Message</a></font></td>
</tr>
<tr>
<td>
<p align='center'><b>
<font face='Verdana' style='font-size: 9pt'>Reading
Message From $from</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td width='20%' valign='top'>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'>
<b>From:</b></font></td>
<td valign='top' width='79%'>
<font face='Verdana' style='font-size: 9pt'>
$from</font></td>
</tr>
<tr>
<td width='20%' valign='top'>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'>
<b>Date - Time:</b></font></td>
<td valign='top' width='79%'>
<font face='Verdana' style='font-size: 9pt'>
$date - $time</font></td>
</tr>
<tr>
<td width='99%' valign='top' colspan='2'>
<font face='Verdana'>
<span style='font-size: 9pt'>&nbsp;</span></font></td>
</tr>
<tr>
<td width='20%' valign='top'>
<p align='right'><b>
<font face='Verdana' style='font-size: 9pt'>
Subject:</font></b></td>
<td valign='top' width='79%'>
<font face='Verdana' style='font-size: 9pt'>
$subject</font></td>
</tr>
<tr>
<td width='20%' valign='top'>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'>
<b>Message:</b></font></td>
<td valign='top' width='79%'>
<font face='Verdana' style='font-size: 9pt'>
$message</font></td>
</tr>
<tr>
<td width='99%' valign='top' colspan='2'>
<font face='Verdana' style='font-size: 9pt'>&nbsp;</font></td>
</tr>
<tr>
<td width='99%' valign='top' colspan='2'>
<p align='center'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
<a href='login.php?privatemsg&compose&to=$from' style='text-decoration: none'>
Reply</a> |
<a href='login.php?privatemsg&delete=$id' style='text-decoration: none'>
Delete</a></font></td>
</tr>
</table>
</td>
</tr>
</table></div>";
}else{
header('Location: login.php?error=16');
exit();
}
}else if(isset($_GET['compose'])){
if($_POST[send]){
$to = strip_tags($_POST['to']);
$subject = strip_tags($_POST['subject']);
$message = strip_tags($_POST['message']);
$date = date("d/m/y");
$time = date("H:i");
if($subject == NULL|$message == NULL){
header('Location: login.php?error=6');
exit();
}
if($to == $logged[username]){
header('Location: login.php?error=15');
exit();
}
$sendprivatemsg = mysql_query("INSERT INTO `privatemsg` (`id` ,`to` ,`from` ,`subject` ,`message` ,`date` ,`time` ,`todelete` ,`fromdelete`, `read`)VALUES ('', '$to', '$logged[username]', '$subject', '$message', '$date', '$time', '0', '0', '0');");
$result = MYSQL_QUERY("SELECT * from users WHERE username='$to'");
$r = mysql_fetch_array($result);
if($r['pmemail'] == 1){
$message="On $date//$time you recieved a private message from $logged[username] about $subject To view the full message please visit $sitetitle($siteurl) and login to read your pm.";
$headers = "From: no-reply@$siteurl" . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($toemail, "$sitetitle New Private Message",$message, $headers);
}
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><p align='center'><font face='Tahoma' size='2'><b>You Successfully sent a Private Message to $to!</b><br>
<center><a href='login.php'>Click Here</a> To Return.</font></center></td>
</tr>
</table></div>";
}else{
echo "<div align='center'><table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg' style='text-decoration: none'>Inbox</a> |
<a style='text-decoration: none' href='login.php?privatemsg&sent'>Sent Messages</a> |
<a href='login.php?privatemsg&compose' style='text-decoration: none'>Compose Message</a></font></td>
</tr>
<tr>
<td>
<p align='center'><b>
<font face='Verdana' style='font-size: 9pt'>Compose
Message</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<form method='POST'>
<tr>
<td width='171' align='right' valign='top'>
<font face='Verdana' style='font-size: 9pt'>
To:</font></td>
<td>
<select size='1' name='to' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'>";
$to = $_GET['to'];
if($to == NULL){
$result = mysql_query("SELECT * FROM users WHERE `level` !='Banned'");
while($r=mysql_fetch_array($result)){
$username = $r['username'];
echo "<option>$username</option>";
}
}else{
echo "<option>$to</option>";
}
echo "</select></td>
</tr>
<tr>
<td width='171' align='right' valign='top'>
<font face='Verdana' style='font-size: 9pt'>
Subject:</font></td>
<td>
<input type='text' name='subject' size='30' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='171' align='right' valign='top'>
<font face='Verdana' style='font-size: 9pt'>
Message:</font></td>
<td>
<textarea rows='8' name='message' cols='40' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></textarea></td>
</tr>
<tr>
<td width='171' align='right'>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td width='171' align='right'>
<font face='Verdana' style='font-size: 9pt'>
Send:</font></td>
<td>
<input type='submit' value='Submit' name='send' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table>
</td>
</tr>
</table></div>";
}
}else{
echo "<div align='center'><table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg' style='text-decoration: none'>Inbox</a> |
<a style='text-decoration: none' href='login.php?privatemsg&sent'>Sent Messages</a> |
<a href='login.php?privatemsg&compose' style='text-decoration: none'>Compose Message</a></font></td>
</tr>
<tr>
<td>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'><b>Inbox</b></font></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td align='left' width='95'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>From</font></td>
<td align='left'><font face='Verdana' style='font-size: 9pt; font-weight: 700'>Subject</font></td>
<td align='left' width='131'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
Date - Time</font></td>
</tr>";
$result = mysql_query("SELECT * FROM privatemsg WHERE `to`='$logged[username]' AND `todelete` = '0' ORDER BY `id` DESC");
while($r=mysql_fetch_array($result)){
$id = $r['id'];
$from = $r['from'];
$subject = $r['subject'];
$date = $r['date'];
$time = $r['time'];
$read = $r['read'];
if($read == 0){
echo "<tr>
<td width='95' bgcolor='#E6E6E6'>
<font face='Verdana' style='font-size: 9pt'>
$from</font></td>
<td bgcolor='#E6E6E6'><font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg&read=$id'>$subject</a></font></td>
<td width='131' bgcolor='#E6E6E6'>
<font face='Verdana' style='font-size: 9pt'>
$date - $time</font></td>
</tr>";
}else{
echo "<tr>
<td width='95'>
<font face='Verdana' style='font-size: 9pt'>
$from</font></td>
<td><font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg&read=$id'>$subject</a></font></td>
<td width='131'>
<font face='Verdana' style='font-size: 9pt'>
$date - $time</font></td>
</tr>";
}
}
echo "</table>
</td>
</tr>
</table>
</td>
</tr>
</table></div>";
}
}
}else if(isset($_GET['members'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
if(isset($_GET['profile'])){
$userid = $_GET['profile'];
$userinfo = MYSQL_QUERY("SELECT * from users WHERE id='$userid'");
$userinfo = mysql_fetch_array($userinfo);
if($userinfo[id]){
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Member List</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td width='154' valign='top'>
<p align='center'>";
if($userinfo[habbo] == NULL){
echo "Habbo Left Blank<br>Update This In Your Profile.";
}else{
echo "<img border='0' src='http://www.habbo$userinfo[hotel]/habbo-imaging/avatarimage?user=$userinfo[habbo]&action=wav&direction=&head_direction=&gesture=sml&size='>";
}
echo "</td>
<td valign='top'>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>";
if($userinfo[publicemail] == 1){
echo "<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>Email Address:</b> $userinfo[email]</font></td>
</tr>";
}
echo "
<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>MSN Address:</b> $userinfo[msn]</font></td>
</tr>
<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>Yahoo Address:</b> $userinfo[yahoo]</font></td>
</tr>
<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>Google Talk:</b> $userinfo[google]</font></td>
</tr>
<tr>
<td><font face='Verdana' style='font-size: 9pt'>&nbsp;</font></td>
</tr>
<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>Habbo Name:</b> <a target='_blank' href='http://www.habbo$userinfo[hotel]/home/$userinfo[habbo]'>$userinfo[habbo]</a></td>
</tr>
<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>Hotel Used:</b> <a target='_blank' href='http://www.habbo$userinfo[hotel]'>habbo$userinfo[hotel]</a></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>";
if($logged[level] == Administrator){
echo "<tr>
<td><font face='Verdana' style='font-size: 9pt'><center><b>Admin Only</b></center><b>IP Address:</b> $userinfo[ip]<br><b>Email Address:</b> $userinfo[email]<br><b><a href='login.php?admin&readpm=$userinfo[id]'>Read PMs</a></b></td>
</tr>";
}
echo "</table>
</td>
</tr>
</table>
</td>
</tr>
</table></div>";
}else{
header('Location: login.php?error=14');
}
}else{
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Member List</font></b></td>
</tr>
<tr>
<td width='100%'>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td width='50%' align='center'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
Username</font></td>
<td width='50%' align='center'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
PM This User</font></td>
</tr>";
$result = mysql_query("SELECT * FROM users ORDER BY `id` ASC");
while($r=mysql_fetch_array($result)){
$id = $r['id'];
$username = $r['username'];
echo "<tr>
<td width='50%'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?members&profile=$id'><center>$username</center></a></font></td>
<td width='50%'>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg&compose&to=$username'>PM</font></td>
</tr>";
}
echo"</table>
</td>
</tr>
</table></div>";
}
}
}else if(isset($_GET['settings'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
if($_POST[updatesettings]){
$emailinpublic = strip_tags($_POST['emailinpublic']);
$newpm = strip_tags($_POST['newpm']);
$bgcolor = strip_tags($_POST['bgcolor']);
$update = mysql_query("UPDATE `users` SET `publicemail` = '$emailinpublic',`pmemail` = '$newpm',`userbg` = '$bgcolor' WHERE `username` = '$logged[username]'");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Settings</font></b></td>
</tr>
<tr>
<td width='100%'>
<p align='center'><font face='Verdana' style='font-size: 9pt'>
You have successfully updated your settings.<br><a href='login.php'>Return</a></font></td>
</tr>
</table></div>";
}else{
echo "<div align='center'>
<table width='50%' border='0' style='border: 3px double #000000; padding: 0' bgcolor='#FFFFFF'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Settings</font></b></td>
</tr>
<tr>
<td width='100%'>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<form method='POST'>
<tr>
<td width='50%'>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'><b>Show Email In Public:</b></font></td>
<td>";
$result = mysql_query("SELECT * FROM users WHERE `username` = '$logged[username]'");
while($r=mysql_fetch_array($result)){
$publicemail = $r['publicemail'];
echo"<select size='1' name='emailinpublic' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'>";
if($publicemail =="1"){ echo "<option selected value='1'>Yes</option>";}else{echo "<option value='1'>Yes</option>";}
if($publicemail =="0"){ echo "<option selected value='0'>No</option>";}else{echo "<option value='0'>No</option>";}
}
echo"</select></td>
</tr>
<tr>
<td>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'><b>Email On New PM:</b></font></td>
<td>";
$result = mysql_query("SELECT * FROM users WHERE `username` = '$logged[username]'");
while($r=mysql_fetch_array($result)){
$pmemail = $r['pmemail'];
echo"<select size='1' name='newpm' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'>";
if($pmemail =="1"){ echo "<option selected value='1'>Yes</option>";}else{echo "<option value='1'>Yes</option>";}
if($pmemail =="0"){ echo "<option selected value='0'>No</option>";}else{echo "<option value='0'>No</option>";}
}
echo"</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'>
<b>Background Color:</b></font></td>
<td>";
$result = mysql_query("SELECT * FROM users WHERE `username` = '$logged[username]'");
while($r=mysql_fetch_array($result)){
$userbg = $r['userbg'];
echo"<select size='1' name='bgcolor' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'>";
if($userbg=="White"){ echo "<option selected>White</option>";}else{echo "<option>White</option>";}
if($userbg=="Black"){ echo "<option selected>Black</option>";}else{echo "<option>Black</option>";}
if($userbg=="Blue"){ echo "<option selected>Blue</option>";}else{echo "<option>Blue</option>";}
if($userbg=="Brown"){ echo "<option selected>Brown</option>";}else{echo "<option>Brown</option>";}
if($userbg=="Red"){ echo "<option selected>Red</option>";}else{echo "<option>Red</option>";}
if($userbg=="Grey"){ echo "<option selected>Grey</option>";}else{echo "<option>Grey</option>";}
if($userbg=="Orange"){ echo "<option selected>Orange</option>";}else{echo "<option>Orange</option>";}
if($userbg=="Purple"){ echo "<option selected>Purple</option>";}else{echo "<option>Purple</option>";}
if($userbg=="Pink"){ echo "<option selected>Pink</option>";}else{echo "<option>Pink</option>";}
if($userbg=="Yellow"){ echo "<option selected>Yellow</option>";}else{echo "<option>Yellow</option>";}
if($userbg=="Green"){ echo "<option selected>Green</option>";}else{echo "<option>Green</option>";}
}
echo"</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Submit' name='updatesettings' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table>
</td>
</tr>
</table></div>";
}
}
}else if(isset($_GET['changepass'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
if($_POST[submit]){
$currentpw1 = strip_tags($_POST['currentpw']);
$newpw1 = strip_tags($_POST['newpw']);
$cnewpw1 = strip_tags($_POST['cnewpw']);
if($currentpw1 == NULL|$newpw1 == NULL|$cnewpw1 == NULL){
header('Location: login.php?error=2');
exit();
}
$currentpw = md5($currentpw1);
$newpw = md5($newpw1);
$cnewpw = md5($cnewpw1);
if($currentpw != $logged[password]){
header('Location: login.php?error=2');
exit();
}else{
if($newpw == $cnewpw){
if($currentpw == $newpw){
header('Location: login.php?error=13');
exit();
}else{
$update = mysql_query("UPDATE `users` SET `password` = '$newpw' WHERE `username` = '$logged[username]'");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Change Password</font></b></td>
</tr>
<tr>
<td width='100%'>
<p align='center'><font face='Verdana' style='font-size: 9pt'>
You have successfully updated your password.<br><a href='login.php'>Return</a></font></td>
</tr>
</table></div>";
}
}else{
header('Location: login.php?error=2');
exit();
}
}
}else{
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td colspan='2'><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Change Password</font></b></td>
</tr>
<form method='POST'>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Current Password:</font></td>
<td width='72%'>
<input type='password' name='currentpw' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>New Password:</font></td>
<td width='72%'>
<input type='password' name='newpw' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Confirm New Password:</font></td>
<td width='72%'>
<input type='password' name='cnewpw' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Submit' name='submit' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table></div>";
}
}
}else if(isset($_GET['editprofile'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
if($_POST[submit]){
$email = strip_tags($_POST['email']);
$msnaddress = strip_tags($_POST['msnaddress']);
$yahooaddress = strip_tags($_POST['yahooaddress']);
$googletalk = strip_tags($_POST['googletalk']);
$habbo = strip_tags($_POST['habbo']);
$hotel = $_POST['hotel'];
if($email == NULL|$habbo == NULL|$hotel == NULL){
header('Location: login.php?error=6');
exit();
}
if($msnaddress == NULL){
$msnaddress='Not Specified';
}
if($yahooaddress == NULL){
$yahooaddress='Not Specified';
}
if($googletalk == NULL){
$googletalk='Not Specified';
}
$update = mysql_query("UPDATE `users` SET `email` = '$email', `habbo` = '$habbo', `hotel` = '$hotel', `msn` = '$msnaddress', `yahoo` = '$yahooaddress', `google` = '$googletalk' WHERE `username` = '$logged[username]'");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Edit Profile</font></b></td>
</tr>
<tr>
<td width='100%'>
<p align='center'><font face='Verdana' style='font-size: 9pt'>
You have successfully updated your profile.<br><a href='login.php'>Return</a></font></td>
</tr>
</table></div>";
}else{
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td colspan='2'><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Edit Profile</font></b></td>
</tr>
<form method='POST'>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Username:</font></td>
<td width='72%'>
<input type='text' readonly value='$logged[username]' name='username' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Email
Address:</font></td>
<td width='72%'>
<input type='text' name='email' value='$logged[email]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>MSN Address:</font></td>
<td width='72%'>
<input type='text' name='msnaddress' value='$logged[msn]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Yahoo Address:</font></td>
<td width='72%'>
<input type='text' name='yahooaddress' value='$logged[yahoo]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Google Talk:</font></td>
<td width='72%'>
<input type='text' name='googletalk' value='$logged[google]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Habbo
Name:</font></td>
<td width='72%'>
<input type='text' name='habbo' value='$logged[habbo]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Habbo Hotel Used:</font></td>
<td width='72%'>";
$result = mysql_query("SELECT * FROM users WHERE `username` = '$logged[username]'");
while($r=mysql_fetch_array($result))
{
$hotel = $r['hotel'];
echo"<select size='1' name='hotel' style='font-family: Tahoma; font-size: 9pt; color: #000000; border: 1px solid #000000; padding: 0'>";
if($hotel==".co.uk"){ echo "<option selected value='.co.uk'>United Kingdom</option>";}else{echo "<option value='.co.uk'>United Kingdom</option>";}
if($hotel==".com"){ echo "<option selected value='.com'>USA</option>";}else{echo "<option value='.com'>USA</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Argentina</option>";}else{echo "<option value='.es'>Argentina</option>";}
if($hotel==".com.au"){ echo "<option selected value='.com.au'>Australia</option>";}else{echo "<option value='.com.au'>Australia</option>";}
if($hotel==".at"){ echo "<option selected value='.at'>Austria</option>";}else{echo "<option value='.at'>Austria</option>";}
if($hotel==".be"){ echo "<option selected value='.be'>Belgium</option>";}else{echo "<option value='.be'>Belgium</option>";}
if($hotel==".com.br"){ echo "<option selected value='.com.br'>Brazil</option>";}else{echo "<option value='.com.br'>Brazil</option>";}
if($hotel==".ca"){ echo "<option selected value='.ca'>Canada</option>";}else{echo "<option value='.ca'>Canada</option>";}
if($hotel==".cl"){ echo "<option selected value='.cl'>Chile</option>";}else{echo "<option value='.cl'>Chile</option>";}
if($hotel==".com.co"){ echo "<option selected value='.com.co'>Colombia</option>";}else{echo "<option value='.com.co'>Colombia</option>";}
if($hotel==".dk"){ echo "<option selected value='.dk'>Denmark</option>";}else{echo "<option value='.dk'>Denmark</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Ecuador</option>";}else{echo "<option value='.es'>Ecuador</option>";}
if($hotel==".fi"){ echo "<option selected value='.fi'>Finland</option>";}else{echo "<option value='.fi'>Finland</option>";}
if($hotel==".fr"){ echo "<option selected value='.fr'>France</option>";}else{echo "<option value='.fr'>France</option>";}
if($hotel==".de"){ echo "<option selected value='.de'>Germany</option>";}else{echo "<option value='.de'>Germany</option>";}
if($hotel==".ie"){ echo "<option selected value='.ie'>Ireland</option>";}else{echo "<option value='.ie'>Ireland</option>";}
if($hotel==".it"){ echo "<option selected value='.it'>Italy</option>";}else{echo "<option value='.it'>Italy</option>";}
if($hotel==".jp"){ echo "<option selected value='.jp'>Japan</option>";}else{echo "<option value='.jp'>Japan</option>";}
if($hotel==".com.my"){ echo "<option selected value='.com.my'>Malaysia</option>";}else{echo "<option value='.com.my'>Malaysia</option>";}
if($hotel==".com.mx"){ echo "<option selected value='.com.mx'>Mexico</option>";}else{echo "<option value='.com.mx'>Mexico</option>";}
if($hotel==".fr"){ echo "<option selected value='.fr'>Morocco</option>";}else{echo "<option value='.fr'>Morocco</option>";}
if($hotel==".nl"){ echo "<option selected value='.nl'>Netherlands</option>";}else{echo "<option value='.nl'>Netherlands</option>";}
if($hotel==".co.nz"){ echo "<option selected value='.co.nz'>New Zealand</option>";}else{echo "<option value='.co.nz'>New Zealand</option>";}
if($hotel==".no"){ echo "<option selected value='.no'>Norway</option>";}else{echo "<option value='.no'>Norway</option>";}
if($hotel==".com.pe"){ echo "<option selected value='.com.pe'>Peru</option>";}else{echo "<option value='.com.pe'>Peru</option>";}
if($hotel==".pt"){ echo "<option selected value='.pt'>Portugal</option>";}else{echo "<option value='.pt'>Portugal</option>";}
if($hotel==".ru"){ echo "<option selected value='.ru'>Russia</option>";}else{echo "<option value='.ru'>Russia</option>";}
if($hotel==".sg"){ echo "<option selected value='.sg'>Singapore</option>";}else{echo "<option value='.sg'>Singapore</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Spain</option>";}else{echo "<option value='.es'>Spain</option>";}
if($hotel==".se"){ echo "<option selected value='.se'>Sweden</option>";}else{echo "<option value='.se'>Sweden</option>";}
if($hotel==".ch"){ echo "<option selected value='.ch'>Switzerland</option>";}else{echo "<option value='.ch'>Switzerland</option>";}
if($hotel==".com.ve"){ echo "<option selected value='.com.ve'>Venezuela</option>";}else{echo "<option value='.com.ve'>Venezuela</option>";}
}
echo "</select></td>
</tr>
<tr>
<td colspan='2'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Submit' name='submit' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table></div>";
}
}
}else if(isset($_GET['forgot'])){
if($logged[username]){
header('Location: login.php?error=5');
exit();
}else{
if(isset($_GET['question'])){
$userid = $_GET['question'];
if($_POST[submitquestion]){
$answer = md5($_POST[answer]);
$userinfo = mysql_query("SELECT * FROM `users` WHERE `id` = '$userid'") or die(mysql_error());
$useri = mysql_fetch_array($userinfo);
if($answer == $useri[answer]){
function generatePassword($length) {
$password='';
for ($i=0;$i<=$length;$i++) {
$chr='';
switch (mt_rand(1,3)) {
case 1:
$chr=chr(mt_rand(48,57));
break;
case 2:
$chr=chr(mt_rand(65,90));
break;
case 3:
$chr=chr(mt_rand(97,122));
}
$password.=$chr;
}
return $password;
}
$randpass = generatePassword('7');
$randpass1 = md5($randpass);
$updateprofile = mysql_query("UPDATE `users` SET `password` = '$randpass1' WHERE `id` = '$userid'");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Password Reset</font></b></td>
</tr>
<tr>
<td width='100%'>
<p align='center'><font face='Verdana' style='font-size: 9pt'>
You password has been reset to <b>$randpass<br>
</b>We recommend you change this on logging into your account.<br><a href='login.php'>Login Now</a></font></td>
</tr>
</table></div>";
}else{
header('Location: login.php?error=12');
exit();
}
}else{
$userinfo = mysql_query("SELECT * FROM `users` WHERE `id` = '$userid'") or die(mysql_error());
$useri = mysql_fetch_array($userinfo);
echo "<div align='center'>
<table width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Password Reset</font></b></td>
</tr>
<tr>
<td width='100%'>
<table border='0' bgcolor='#FFFFFF' width='100%' cellspacing='1'>
<form method='POST'>
<tr>
<td colspan='2'>
<p align='center'><font face='Verdana' size='2'><b>$useri[question]</b></font></td>
</tr>
<tr>
<td width='50%'>
<p align='right'><font face='Verdana' size='2'>Secret
Answer:</font></td>
<td>
<input name='answer' size='20' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Submit' name='submitquestion' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
<form method='POST'>
</form>
</table>
</td>
</tr>
</table></div>";
}
}else{
if($_POST[resetemail]){
$email = $_POST[email];
$userinfo = mysql_query("SELECT * FROM `users` WHERE `email` = '$email'") or die(mysql_error());
$useri = mysql_fetch_array($userinfo);
$checkuser = mysql_num_rows($userinfo);
if($email = NULL){
header('Location: login.php?error=6');
exit();
}
if($checkuser==0){
header('Location: login.php?error=11');
exit();
}
$uid = $useri[id];
echo "<meta http-equiv='Refresh' content='1;url=login.php?forgot&question=$uid'/>";
}
if($_POST[resetusername]){
$username = $_POST[username];
$userinfo = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'") or die(mysql_error());
$useri = mysql_fetch_array($userinfo);
$checkuser = mysql_num_rows($userinfo);
if($username == NULL){
header('Location: login.php?error=6');
exit();
}
if($checkuser==0){
header('Location: login.php?error=11');
exit();
}
$uid = $useri[id];
echo "<meta http-equiv='Refresh' content='1;url=login.php?forgot&question=$uid'/>";
}
echo"<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Password Reset</font></b></td>
</tr>
<tr>
<td width='100%'>
<table border='0' width='100%' cellspacing='1'>
<form method='POST'>
<tr>
<td width='50%'>
<p align='right'><font face='Verdana' size='2'>Username:</font></td>
<td>
<input name='username' size='16' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Reset Password By Username' name='resetusername' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
<tr>
<td width='50%'>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<form method='POST'>
<tr>
<td width='50%'>
<p align='right'><font face='Verdana' size='2'>Email
Address:</font></td>
<td>
<input name='email' size='16' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Reset Password By Email' name='resetemail' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table>
</td>
</tr>
</table></div>";
}
}
}else if(isset($_GET['usercp'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - User CP</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td align='center' width='50%'>
<font face='Verdana' style='font-size: 9pt; font-weight:700'>
<a href='login.php?editprofile' style='text-decoration: none'>Edit Profile</a></font></td>
<td align='left'><font face='Verdana' style='font-size: 9pt'><b>Habbo Name:</b> $logged[habbo]
<a href='http://www.habbo$logged[hotel]/home/$logged[habbo]' target='_blank' style='text-decoration:none'>(Habbo Home)</a></font></td>
</tr>
<tr>
<td align='center' width='50%'>
<font face='Verdana' style='font-size: 9pt; font-weight:700'>
<a href='login.php?changepass' style='text-decoration: none'>Change Password</a></font></td>
<td align='left'><font face='Verdana' style='font-size: 9pt'><b>Hotel:</b> Habbo$logged[hotel]
<a href='http://www.habbo$logged[hotel]' target='_blank' style='text-decoration:none'>(Visit)</a></font></td>
</tr>
<tr>
<td align='center' width='50%'>
<font face='Verdana' style='font-size: 9pt; font-weight:700'>
<a href='login.php?privatemsg' style='text-decoration: none'>
Private Messages</a></font></td>
<td align='left'><font face='Verdana' style='font-size: 9pt'><b>Email Address:</b> $logged[email]</font></td>
</tr>
<tr>
<td align='center' colspan='2'>
<font face='Verdana' style='font-size: 9pt'>&nbsp;</font></td>
</tr>
<tr>
<td align='center' colspan='2'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
<a href='login.php?settings' style='text-decoration: none'>
Settings</a></font></td>
</tr>
</table>
</td>
</tr>
</table></div>";
}
}else if(isset($_GET['logout'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
setcookie("$cookieid", 2132421, time() + (60 * 60 * 24 * 5), "/", "");
echo "<meta http-equiv='Refresh' content='1;url=login.php'/>
<div align='center'><table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Logout</font></b></td>
</tr>
<tr>
<td>
<p align='center'><font size='2' face='Tahoma'>Successfully Logged Out!</font></td>
</tr>
</table></div>";
}
}else if(isset($_GET['register'])){
if($logged[username]){
header('Location: login.php?error=5');
exit();
}else{
if($_POST[register]){
$username = strip_tags($_POST['username']);
$password = strip_tags($_POST['password']);
$cpassword = strip_tags($_POST['cpassword']);
$email = strip_tags($_POST['email']);
$question = strip_tags($_POST['question']);
$answer = strip_tags($_POST['answer']);
$answer = md5($answer);
$habbo = strip_tags($_POST['habbo']);
$hotel = strip_tags($_POST['hotel']);
$ip = $_SERVER['REMOTE_ADDR'];
$regdate = date("d/m/y");
$password = md5($password);
$cpassword = md5($cpassword);
if($password != $cpassword){
header('Location: login.php?error=2');
exit();
}
if($username == NULL|$password == NULL|$cpassword == NULL|$email == NULL|$question == NULL|$answer == NULL|$hotel== NULL){
header('Location: login.php?error=6');
exit();
}
$checkname = mysql_query("SELECT username FROM users WHERE username='$username'");
$checkname= mysql_num_rows($checkname);
$checkemail = mysql_query("SELECT email FROM users WHERE email='$email'");
$checkemail = mysql_num_rows($checkemail);
if($checkname>0){
header('Location: login.php?error=7');
exit();
}else if($checkemail>0){
header('Location: login.php?error=8');
exit();
}else{
$registeruser = mysql_query("INSERT INTO `users` (username, password, email, question, answer, habbo, hotel, ip, regdate) VALUES('$username','$password','$email', '$question', '$answer', '$habbo', '$hotel', '$ip', '$regdate')");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><p align='center'><font face='Tahoma' size='2'><b>$username, You Successfully Registered!</b><br>
<center><a href='login.php'>Click Here</a> To Login.</font></center></td>
</tr>
</table></div>";
}
}else{
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td colspan='2'><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Register</font></b></td>
</tr>
<form method='POST'>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Username:</font></td>
<td width='72%'>
<input type='text' name='username' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Password:</font></td>
<td width='72%'>
<input type='password' name='password' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Confirm
Password:</font></td>
<td width='72%'>
<input type='password' name='cpassword' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Email
Address:</font></td>
<td width='72%'>
<input type='text' name='email' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>
Secret Question:</font></td>
<td width='72%'>
<input type='text' name='question' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>
Secret Answer:</font></td>
<td width='72%'>
<input type='text' name='answer' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Habbo
Name:</font></td>
<td width='72%'>
<input type='text' name='habbo' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Habbo Hotel Used:</font></td>
<td width='72%'>
<select size='1' name='hotel' style='font-family: Tahoma; font-size: 9pt; color: #000000; border: 1px solid #000000; padding: 0'>
<option value='.co.uk'>United Kingdom</option>
<option value='.com'>USA</option>
<option value='.es'>Argentina</option>
<option value='.com.au'>Australia</option>
<option value='.at'>Austria</option>
<option value='.be'>Belgium</option>
<option value='.com.br'>Brazil</option>
<option value='.ca'>Canada</option>
<option value='.cl'>Chile</option>
<option value='.com.co'>Colombia</option>
<option value='.dk'>Denmark</option>
<option value='.es'>Ecuador</option>
<option value='.fi'>Finland</option>
<option value='.fr'>France</option>
<option value='.de'>Germany</option>
<option value='.ie'>Ireland</option>
<option value='.it'>Italy</option>
<option value='.jp'>Japan</option>
<option value='.com.my'>Malaysia</option>
<option value='.com.mx'>Mexico</option>
<option value='.fr'>Morocco</option>
<option value='.nl'>Netherlands</option>
<option value='.co.nz'>New Zealand</option>
<option value='.no'>Norway</option>
<option value='.com.pe'>Peru</option>

<option value='.pt'>Portugal</option>
<option value='.ru'>Russia</option>
<option value='.sg'>Singapore</option>
<option value='.es'>Spain</option>
<option value='.se'>Sweden</option>
<option value='.ch'>Switzerland</option>
<option value='.com.ve'>Venezuela</option>
</select></td>
</tr>
<tr>
<td colspan='2'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Register' name='register' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table></div>";
}
}
}else{
if (!$logged[username]){
if($_POST[login]){
$username = strip_tags($_POST['username']);
$password = strip_tags($_POST['password']);
if($username == NULL|$password == NULL){
header('Location: login.php?error=6');
exit();
}
$password = md5($password);
$userinfo = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'") or die(mysql_error());
$useri = mysql_fetch_array($userinfo);
$usericount = mysql_num_rows($userinfo);
if($usericount == 0){
header('Location: login.php?error=1');
exit();
}else{
if($useri[password] != $password) {
header('Location: login.php?error=2');
exit();
}
if($useri[level] == Banned){
header('Location: login.php?error=3');
exit();
}
setcookie("$cookieid", $useri[id], time() + (60 * 60 * 24 * 5), "/", "");
echo "<meta http-equiv='Refresh' content='1'/><div align='center'>
<table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td><p align='center'><font face='Tahoma' size='2'><b>Successfully logged in!</b><br>
You are now being redirected.</font></td>
</tr>
</table></div>";
}
}else{
echo"<div align='center'>
<table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<form method='POST'>
<tr>
<td align='right' width='50%'>
<font face='Verdana, Arial, Helvetica, sans-serif' size='2'>Username:</font></td>
<td width='74%'>
<input name='username' size='16' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td align='right' width='50%'>
<font face='Verdana, Arial, Helvetica, sans-serif' size='2'>Password:</font></td>
<td width='74%'>
<input type='password' name='password' size='16' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Login' name='login' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
<tr>
<td colspan='2'>
<p align='center'>
<font face='Verdana' style='font-size: 8pt'><b>Not Registered? Its Free And Quick</b><span style=''> </span>
<a href='login.php?register'>
<span style='text-decoration: none'>Register Now</span></a><br>
<b>Forgot Your Password ? </b><a href='login.php?forgot'>
<span style='text-decoration: none'>Reset It Now</span></a></font></td>
</tr>
</table></div>";
}
}else{
echo"<div align='center'>
<table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td colspan='2'><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Main Control Panel</font></b></td>
</tr>
<tr>
<td width='31%'><center>";
if($logged[habbo] == NULL){
echo "<font face='Verdana' style='font-size: 8pt'>Habbo Left Blank<br>Update This In Your Profile.</font>";
}else{
echo "<a target='_blank' href='http://www.habbo$logged[hotel]/home/$logged[habbo]'><img border='0' src='http://www.habbo$logged[hotel]/habbo-imaging/avatarimage?user=$logged[habbo]&action=wav&direction=&head_direction=&gesture=sml&size='></a>";
}
echo"</center></td>
<td width='69%' class='style1'>
<font face='Verdana' style='font-size: 9pt'><b><span class='style1'>
<a href='login.php?usercp' style='text-decoration: none'>UserCP</a><br />
<a href='login.php?privatemsg' style='text-decoration: none'>Private Message</a><br />
<a href='login.php?settings' style='text-decoration: none'>Settings</a><br>
<a href='login.php?members' style='text-decoration: none'>Members</a>";
if ($logged[level] == 'Administrator') {
echo "<br><a href='login.php?admin' style='text-decoration: none'>Staff Area</a>";
}
echo"<br><br /><a href='login.php?logout' style='text-decoration: none'>Log Out</a></span></b></font></td>
</tr>
</table></div>";
}
}
?>

Don't know if you will be a ble to read it or not?

Moved by N!ck (Forum Moderator) from Technology Discussion: Please post in the correct forum next time, thanks :).

Recursion
10-08-2009, 08:16 PM
There's no SQL and it's all one file? O.o

Mickword
10-08-2009, 08:29 PM
there is a msql, i put it in
im sure and yeah, i download that and its easyer lol

BoyBetterKnow
10-08-2009, 08:46 PM
Hey guys found this user system, edited a bit is there anything wrong. its a bit long and have like 20 pages in one so yeah lol.
<?
ob_start();
//=========================== CONFIGURATION ===========================
$sitetitle = "PixeledHabboFM :: User System"; //Website Title
$siteurl = "http://www.phfm.co.cc/"; //Website URL
$cookieid = "yoursiteid"; //Default "yoursiteid"

$cloc = "localhost"; //Database Location - Default "localhost"
$cuser = "phfmcocc_michael"; //Database Username
$cpass= "michael11"; //Database Password
$cdb = "phfmcocc_login"; //Database Name
//======================= END OF CONFIGURATION ========================

//=========================== DB CONNECTION ===========================
$conn = mysql_connect("$cloc","$cuser","$cpass");
if (!$conn) die ("<center><font size='4' face='Tahoma'><b>Could not connect MySQL. Check your configuration settings by opening login.php</b></center></font>");
mysql_select_db($cdb,$conn) or die ("Could not open database");
$logged = MYSQL_QUERY("SELECT * from users WHERE id='$_COOKIE[$cookieid]'");
$logged = mysql_fetch_array($logged);
//======================= END OF DB CONNECTION ========================
echo "<title>$sitetitle</title><body bgcolor='$logged[userbg]' topmargin='2' leftmargin='2' rightmargin='2' bottommargin='2' marginwidth='0' marginheight='0' link='#000000' vlink='#000000' alink='#000000'>";
if($logged[username]){
$ip = $_SERVER['REMOTE_ADDR'];
$update = mysql_query("UPDATE `users` SET `ip` = '$ip' WHERE `username` = '$username'");
}
if(isset($_GET['error'])){
$error = $_GET['error'];
if($error == 1){
$errorcode = "Unable to find this user. Make sure you are registered and entering the correct username.";
}else if($error == 2){
$errorcode = "The Password does not match.";
}else if($error == 3){
$errorcode = "You have been banned and are unable to login.";
}else if($error == 4){
$errorcode = "You are not logged in.";
}else if($error == 5){
$errorcode = "You are already logged in.";
}else if($error == 6){
$errorcode = "You have left a field blank.";
}else if($error == 7){
$user = $_GET['user'];
$errorcode = "The username used is already registered.<br>To retrieve the password go back to the login page and click reset password.";
}else if($error == 8){
$email = $_GET['email'];
$errorcode = "The email address used is already registered with another account.";
}else if($error == 9){
$errorcode = "This account is currently in the process of being reset.<br>Check your emails to complete resetting your password before logging in.";
}else if($error == 10){
$errorcode = "The activation code is incorrect.";
}else if($error == 11){
$errorcode = "The username/email provided does not exist.";
}else if($error == 12){
$errorcode = "The answer you provided is incorrect.";
}else if($error == 13){
$errorcode = "You can not have your old password the same as your new password.";
}else if($error == 14){
$errorcode = "The user does not exist.";
}else if($error == 15){
$errorcode = "You can not send a private message to yourself.";
}else if($error == 16){
$errorcode = "You are not a recipient of this message.";
}else if($error == 17){
$errorcode = "This message has been deleted.";
}else if($error == 18){
$errorcode = "You are not an administrator.<br>What do you think your doing here ?";
}else{
$errorcode = "Unknown Error Code";
}
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Error</font></b></td>
</tr>
<tr>
<td>
<p align='center'><font size='2' face='Tahoma'>$errorcode</font></td>
</tr>
</table></div>";
}else if(isset($_GET['admin'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else if($logged[level] != Administrator){
header('Location: login.php?error=18');
exit();
}else{
if(isset($_GET['manageusers'])){
$manageusers = $_GET['manageusers'];
if($manageusers == NULL){
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Member List</font></b></td>
</tr>
<tr>
<td width='100%'>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td width='25%' align='center'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
Username</font></td>
<td width='18%' align='center'>
<font face='Verdana' style='font-size: 9pt'>
<b>Level</b></font></td>
<td width='25%' align='center'>
<font face='Verdana' style='font-size: 9pt'>
<b>Email Address:</b></font></td>
<td width='15%' align='center'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
PM This User</font></td>
</tr>";
$result = mysql_query("SELECT * FROM users ORDER BY `id` ASC");
while($r=mysql_fetch_array($result)){
$id = $r['id'];
$username = $r['username'];
$level = $r['level'];
$email = $r['email'];
echo "<tr>
<td width='25%' height='14'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?admin&manageusers=$id'><center>$username</center></a></font></td>
<td width='18%' height='14'>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>$level</font></td>
<td width='25%' height='14'>
<p align='center'><font face='Verdana'>
<span style='font-size: 9pt'>$email</span></font></td>
<td width='15%' height='14'>
<p align='center'>
<a href='login.php?privatemsg&compose&to=$username'>
<font face='Verdana' style='font-size: 9pt'>
PM</font></td>
</tr>";
}
echo"</table>
</td>
</tr>
</table></div>";
}else{
if($_POST[submit]){
$manageusers = $_GET['manageusers'];
$email = strip_tags($_POST['email']);
$msnaddress = strip_tags($_POST['msnaddress']);
$yahooaddress = strip_tags($_POST['yahooaddress']);
$googletalk = strip_tags($_POST['googletalk']);
$habbo = strip_tags($_POST['habbo']);
$hotel = $_POST['hotel'];
if($email == NULL|$habbo == NULL|$hotel == NULL){
header('Location: login.php?error=6');
exit();
}
if($msnaddress == NULL){
$msnaddress = 'Not Specified';
}
if($yahooaddress == NULL){
$yahooaddress='Not Specified';
}
if($googletalk == NULL){
$googletalk='Not Specified';
}
$update = mysql_query("UPDATE `users` SET `email` = '$email', `habbo` = '$habbo', `hotel` = '$hotel', `msn` = '$msnaddress', `yahoo` = '$yahooaddress', `google` = '$googletalk' WHERE `id` = '$manageusers'");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Administration Manage Users</font></b></td>
</tr>
<tr>
<td width='100%'>
<p align='center'><font face='Verdana' style='font-size: 9pt'>
You have successfully updated the profile.<br><a href='login.php'>Return</a></font></td>
</tr>
</table></div>";
}else{
$userinfo = MYSQL_QUERY("SELECT * from users WHERE id='$manageusers'");
$userinfo = mysql_fetch_array($userinfo);
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td colspan='2'><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Administration Manage Users</font></b></td>
</tr>
<form method='POST'>
<tr>
<td width='40%' align='right'><b><font face='Tahoma' size='2'>Username:</font></b></td>
<td width='72%'>
<input type='text' readonly value='$userinfo[username]' name='username' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><b><font face='Tahoma' size='2'>Email
Address:</font></b></td>
<td width='72%'>
<input type='text' name='email' value='$userinfo[email]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'>
<span style='font-size: 8pt; font-weight:700'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'>
<b>
<font face='Tahoma' size='2'>MSN Address:</font></b></td>
<td width='72%'>
<input type='text' name='msnaddress' value='$userinfo[msn]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<b>
<font face='Tahoma' size='2'>Yahoo Address:</font></b></td>
<td width='72%'>
<input type='text' name='yahooaddress' value='$userinfo[yahoo]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<b>
<font face='Tahoma' size='2'>Google Talk:</font></b></td>
<td width='72%'>
<input type='text' name='googletalk' value='$userinfo[google]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'>
<span style='font-size: 8pt; font-weight:700'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'><b><font face='Tahoma' size='2'>Habbo
Name:</font></b></td>
<td width='72%'>
<input type='text' name='habbo' value='$userinfo[habbo]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<b>
<font face='Tahoma' size='2'>Habbo Hotel Used:</font></b></td>
<td width='72%'>";
$result = mysql_query("SELECT * FROM users WHERE `id` = '$manageusers'");
while($r=mysql_fetch_array($result)){
$hotel = $r['hotel'];
echo"<select size='1' name='hotel' style='font-family: Tahoma; font-size: 9pt; color: #000000; border: 1px solid #000000; padding: 0'>";
if($hotel==".co.uk"){ echo "<option selected value='.co.uk'>United Kingdom</option>";}else{echo "<option value='.co.uk'>United Kingdom</option>";}
if($hotel==".com"){ echo "<option selected value='.com'>USA</option>";}else{echo "<option value='.com'>USA</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Argentina</option>";}else{echo "<option value='.es'>Argentina</option>";}
if($hotel==".com.au"){ echo "<option selected value='.com.au'>Australia</option>";}else{echo "<option value='.com.au'>Australia</option>";}
if($hotel==".at"){ echo "<option selected value='.at'>Austria</option>";}else{echo "<option value='.at'>Austria</option>";}
if($hotel==".be"){ echo "<option selected value='.be'>Belgium</option>";}else{echo "<option value='.be'>Belgium</option>";}
if($hotel==".com.br"){ echo "<option selected value='.com.br'>Brazil</option>";}else{echo "<option value='.com.br'>Brazil</option>";}
if($hotel==".ca"){ echo "<option selected value='.ca'>Canada</option>";}else{echo "<option value='.ca'>Canada</option>";}
if($hotel==".cl"){ echo "<option selected value='.cl'>Chile</option>";}else{echo "<option value='.cl'>Chile</option>";}
if($hotel==".com.co"){ echo "<option selected value='.com.co'>Colombia</option>";}else{echo "<option value='.com.co'>Colombia</option>";}
if($hotel==".dk"){ echo "<option selected value='.dk'>Denmark</option>";}else{echo "<option value='.dk'>Denmark</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Ecuador</option>";}else{echo "<option value='.es'>Ecuador</option>";}
if($hotel==".fi"){ echo "<option selected value='.fi'>Finland</option>";}else{echo "<option value='.fi'>Finland</option>";}
if($hotel==".fr"){ echo "<option selected value='.fr'>France</option>";}else{echo "<option value='.fr'>France</option>";}
if($hotel==".de"){ echo "<option selected value='.de'>Germany</option>";}else{echo "<option value='.de'>Germany</option>";}
if($hotel==".ie"){ echo "<option selected value='.ie'>Ireland</option>";}else{echo "<option value='.ie'>Ireland</option>";}
if($hotel==".it"){ echo "<option selected value='.it'>Italy</option>";}else{echo "<option value='.it'>Italy</option>";}
if($hotel==".jp"){ echo "<option selected value='.jp'>Japan</option>";}else{echo "<option value='.jp'>Japan</option>";}
if($hotel==".com.my"){ echo "<option selected value='.com.my'>Malaysia</option>";}else{echo "<option value='.com.my'>Malaysia</option>";}
if($hotel==".com.mx"){ echo "<option selected value='.com.mx'>Mexico</option>";}else{echo "<option value='.com.mx'>Mexico</option>";}
if($hotel==".fr"){ echo "<option selected value='.fr'>Morocco</option>";}else{echo "<option value='.fr'>Morocco</option>";}
if($hotel==".nl"){ echo "<option selected value='.nl'>Netherlands</option>";}else{echo "<option value='.nl'>Netherlands</option>";}
if($hotel==".co.nz"){ echo "<option selected value='.co.nz'>New Zealand</option>";}else{echo "<option value='.co.nz'>New Zealand</option>";}
if($hotel==".no"){ echo "<option selected value='.no'>Norway</option>";}else{echo "<option value='.no'>Norway</option>";}
if($hotel==".com.pe"){ echo "<option selected value='.com.pe'>Peru</option>";}else{echo "<option value='.com.pe'>Peru</option>";}
if($hotel==".pt"){ echo "<option selected value='.pt'>Portugal</option>";}else{echo "<option value='.pt'>Portugal</option>";}
if($hotel==".ru"){ echo "<option selected value='.ru'>Russia</option>";}else{echo "<option value='.ru'>Russia</option>";}
if($hotel==".sg"){ echo "<option selected value='.sg'>Singapore</option>";}else{echo "<option value='.sg'>Singapore</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Spain</option>";}else{echo "<option value='.es'>Spain</option>";}
if($hotel==".se"){ echo "<option selected value='.se'>Sweden</option>";}else{echo "<option value='.se'>Sweden</option>";}
if($hotel==".ch"){ echo "<option selected value='.ch'>Switzerland</option>";}else{echo "<option value='.ch'>Switzerland</option>";}
if($hotel==".com.ve"){ echo "<option selected value='.com.ve'>Venezuela</option>";}else{echo "<option value='.com.ve'>Venezuela</option>";}
}
echo "</select></td>
</tr>
<tr>
<td colspan='2'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
IP Address:</font></td>
<td width='72%'>
<font face='Verdana' style='font-size: 9pt'>$userinfo[ip]</font></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>Registered Date:</font></td>
<td width='72%'><font face='Verdana' style='font-size: 9pt'>
$userinfo[regdate]</font></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>Secret Question:</font></td>
<td width='72%'><font face='Verdana' style='font-size: 9pt'>
$userinfo[question]</font></td>
</tr>
<tr>
<td width='40%' align='right'>
&nbsp;</td>
<td width='72%'>&nbsp;</td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>Email In Public:</font></td>
<td width='72%'><font face='Verdana' style='font-size: 9pt'>";
if($userinfo[publicemail] == 1){
echo "Yes";
}else{
echo "No";
}
echo "</td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>Email On New PM:</font></td>
<td width='72%'><font face='Verdana' style='font-size: 9pt'>";
if($userinfo[pmemail] == 1){
echo "Yes";
}else{
echo "No";
}
echo "</td>
</tr>
<tr>
<td width='40%' align='right'>
&nbsp;</td>
<td width='72%'>&nbsp;</td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>Background Color:</font></td>
<td width='72%'><font face='Verdana' style='font-size: 9pt'>
$userinfo[userbg]</font></td>
</tr>
<tr>
<td colspan='2'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Submit' name='submit' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table></div>";
}
}
}else{
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Admin Control Panel</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
<a href='login.php?admin&manageusers' style='text-decoration: none'>
Manage Users</a></font></td>
</tr>
<tr>
<td>
<font face='Verdana' style='font-size: 9pt'>- From here you can manage all aspects of members.</font></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
More Coming Soon</font></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
</table>
</td>
</tr>
</table></div>";
}
}
}else if(isset($_GET['privatemsg'])){
if(!$logged[username]){
header('Location: login.php?error=18');
exit();
}else{
if(isset($_GET['sent'])){
echo "<div align='center'><table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg' style='text-decoration: none'>Inbox</a> |
<a style='text-decoration: none' href='login.php?privatemsg&sent'>Sent Messages</a> |
<a href='login.php?privatemsg&compose' style='text-decoration: none'>Compose Message</a></font></td>
</tr>
<tr>
<td>
<p align='center'>
<b><font face='Verdana' style='font-size: 9pt'>Sent
Messages</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td align='left' width='95'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>From</font></td>
<td align='left'><font face='Verdana' style='font-size: 9pt; font-weight: 700'>Subject</font></td>
<td align='left' width='131'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
Date - Time</font></td>
</tr>";
$result = mysql_query("SELECT * FROM privatemsg WHERE `from`='$logged[username]' AND `fromdelete` = '0' ORDER BY `id` DESC");
while($r=mysql_fetch_array($result)){
$id = $r['id'];
$from = $r['from'];
$subject = $r['subject'];
$date = $r['date'];
$time = $r['time'];
echo "<tr>
<td width='95'>
<font face='Verdana' style='font-size: 9pt'>
$from</font></td>
<td><font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg&read=$id'>$subject</a></font></td>
<td width='131'>
<font face='Verdana' style='font-size: 9pt'>
$date - $time</font></td>
</tr>";
}
echo "</table>
</td>
</tr>
</table>
</td>
</tr>
</table></div>";
}else if(isset($_GET['delete'])){
$delete = $_GET['delete'];
$deleter = MYSQL_QUERY("SELECT * from privatemsg WHERE id='$delete'");
$dr = mysql_fetch_array($deleter);
$checkmsg = mysql_num_rows($deleter);
if($checkmsg == 0){
header('Location: login.php?error=17');
exit();
}
if($dr[to] == $logged[username]){
if($dr[todelete] == 1){
header('Location: login.php?error=17');
exit();
}
$update = mysql_query("UPDATE `privatemsg` SET `todelete` = '1' WHERE `id` = '$delete'");
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td><p align='center'><font size='2' face='Tahoma'>Successfully Deleted The Private Message.
<center><a href='login.php'>Click Here</a> To Return.</font></center></font></td>
</tr>
</table></div>";
}else if($dr[from] == $logged[username]){
if($dr[fromdelete] == 1){
header('Location: login.php?error=17');
exit();
}
$update = mysql_query("UPDATE `privatemsg` SET `fromdelete` = '1' WHERE `id` = '$delete'");
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td><p align='center'><font size='2' face='Tahoma'>Successfully Deleted The Private Message.<br>
<center><a href='login.php'>Click Here</a> To Return.</font></center></td>
</tr>
</table></div>";
}else{
header('Location: login.php?error=16');
exit();
}
}else if(isset($_GET['read'])){
$pmid = $_GET['read'];
$result = mysql_query("SELECT * FROM privatemsg WHERE `id` = '$pmid'");
while($r=mysql_fetch_array($result)){
$id=$r["id"];
$to=$r["to"];
$from=$r["from"];
$subject=$r["subject"];
$message=$r["message"];
$date=$r["date"];
$todelete=$r["todelete"];
$fromdelete=$r["fromdelete"];
$time=$r["time"];
}
if($from == $logged[username]|$to == $logged[username]){
if($to == $logged[username]){
if($todelete == 1){
header('Location: login.php?error=17');
exit();
}
}
if($from == $logged[username]){
if($fromdelete == 1){
header('Location: login.php?error=17');
exit();
}
}
if($logged[username] == $to){
$update = mysql_query("UPDATE `privatemsg` SET `read` = '1' WHERE `id` = '$pmid'");
}
echo "<div align='center'><table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg' style='text-decoration: none'>Inbox</a> |
<a style='text-decoration: none' href='login.php?privatemsg&sent'>Sent Messages</a> |
<a href='login.php?privatemsg&compose' style='text-decoration: none'>Compose Message</a></font></td>
</tr>
<tr>
<td>
<p align='center'><b>
<font face='Verdana' style='font-size: 9pt'>Reading
Message From $from</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td width='20%' valign='top'>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'>
<b>From:</b></font></td>
<td valign='top' width='79%'>
<font face='Verdana' style='font-size: 9pt'>
$from</font></td>
</tr>
<tr>
<td width='20%' valign='top'>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'>
<b>Date - Time:</b></font></td>
<td valign='top' width='79%'>
<font face='Verdana' style='font-size: 9pt'>
$date - $time</font></td>
</tr>
<tr>
<td width='99%' valign='top' colspan='2'>
<font face='Verdana'>
<span style='font-size: 9pt'>&nbsp;</span></font></td>
</tr>
<tr>
<td width='20%' valign='top'>
<p align='right'><b>
<font face='Verdana' style='font-size: 9pt'>
Subject:</font></b></td>
<td valign='top' width='79%'>
<font face='Verdana' style='font-size: 9pt'>
$subject</font></td>
</tr>
<tr>
<td width='20%' valign='top'>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'>
<b>Message:</b></font></td>
<td valign='top' width='79%'>
<font face='Verdana' style='font-size: 9pt'>
$message</font></td>
</tr>
<tr>
<td width='99%' valign='top' colspan='2'>
<font face='Verdana' style='font-size: 9pt'>&nbsp;</font></td>
</tr>
<tr>
<td width='99%' valign='top' colspan='2'>
<p align='center'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
<a href='login.php?privatemsg&compose&to=$from' style='text-decoration: none'>
Reply</a> |
<a href='login.php?privatemsg&delete=$id' style='text-decoration: none'>
Delete</a></font></td>
</tr>
</table>
</td>
</tr>
</table></div>";
}else{
header('Location: login.php?error=16');
exit();
}
}else if(isset($_GET['compose'])){
if($_POST[send]){
$to = strip_tags($_POST['to']);
$subject = strip_tags($_POST['subject']);
$message = strip_tags($_POST['message']);
$date = date("d/m/y");
$time = date("H:i");
if($subject == NULL|$message == NULL){
header('Location: login.php?error=6');
exit();
}
if($to == $logged[username]){
header('Location: login.php?error=15');
exit();
}
$sendprivatemsg = mysql_query("INSERT INTO `privatemsg` (`id` ,`to` ,`from` ,`subject` ,`message` ,`date` ,`time` ,`todelete` ,`fromdelete`, `read`)VALUES ('', '$to', '$logged[username]', '$subject', '$message', '$date', '$time', '0', '0', '0');");
$result = MYSQL_QUERY("SELECT * from users WHERE username='$to'");
$r = mysql_fetch_array($result);
if($r['pmemail'] == 1){
$message="On $date//$time you recieved a private message from $logged[username] about $subject To view the full message please visit $sitetitle($siteurl) and login to read your pm.";
$headers = "From: no-reply@$siteurl" . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($toemail, "$sitetitle New Private Message",$message, $headers);
}
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><p align='center'><font face='Tahoma' size='2'><b>You Successfully sent a Private Message to $to!</b><br>
<center><a href='login.php'>Click Here</a> To Return.</font></center></td>
</tr>
</table></div>";
}else{
echo "<div align='center'><table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg' style='text-decoration: none'>Inbox</a> |
<a style='text-decoration: none' href='login.php?privatemsg&sent'>Sent Messages</a> |
<a href='login.php?privatemsg&compose' style='text-decoration: none'>Compose Message</a></font></td>
</tr>
<tr>
<td>
<p align='center'><b>
<font face='Verdana' style='font-size: 9pt'>Compose
Message</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<form method='POST'>
<tr>
<td width='171' align='right' valign='top'>
<font face='Verdana' style='font-size: 9pt'>
To:</font></td>
<td>
<select size='1' name='to' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'>";
$to = $_GET['to'];
if($to == NULL){
$result = mysql_query("SELECT * FROM users WHERE `level` !='Banned'");
while($r=mysql_fetch_array($result)){
$username = $r['username'];
echo "<option>$username</option>";
}
}else{
echo "<option>$to</option>";
}
echo "</select></td>
</tr>
<tr>
<td width='171' align='right' valign='top'>
<font face='Verdana' style='font-size: 9pt'>
Subject:</font></td>
<td>
<input type='text' name='subject' size='30' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='171' align='right' valign='top'>
<font face='Verdana' style='font-size: 9pt'>
Message:</font></td>
<td>
<textarea rows='8' name='message' cols='40' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></textarea></td>
</tr>
<tr>
<td width='171' align='right'>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td width='171' align='right'>
<font face='Verdana' style='font-size: 9pt'>
Send:</font></td>
<td>
<input type='submit' value='Submit' name='send' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table>
</td>
</tr>
</table></div>";
}
}else{
echo "<div align='center'><table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Private Messages</font></b></td>
</tr>
<tr>
<td>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg' style='text-decoration: none'>Inbox</a> |
<a style='text-decoration: none' href='login.php?privatemsg&sent'>Sent Messages</a> |
<a href='login.php?privatemsg&compose' style='text-decoration: none'>Compose Message</a></font></td>
</tr>
<tr>
<td>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'><b>Inbox</b></font></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='0' cellpadding='0'>
<tr>
<td align='left' width='95'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>From</font></td>
<td align='left'><font face='Verdana' style='font-size: 9pt; font-weight: 700'>Subject</font></td>
<td align='left' width='131'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
Date - Time</font></td>
</tr>";
$result = mysql_query("SELECT * FROM privatemsg WHERE `to`='$logged[username]' AND `todelete` = '0' ORDER BY `id` DESC");
while($r=mysql_fetch_array($result)){
$id = $r['id'];
$from = $r['from'];
$subject = $r['subject'];
$date = $r['date'];
$time = $r['time'];
$read = $r['read'];
if($read == 0){
echo "<tr>
<td width='95' bgcolor='#E6E6E6'>
<font face='Verdana' style='font-size: 9pt'>
$from</font></td>
<td bgcolor='#E6E6E6'><font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg&read=$id'>$subject</a></font></td>
<td width='131' bgcolor='#E6E6E6'>
<font face='Verdana' style='font-size: 9pt'>
$date - $time</font></td>
</tr>";
}else{
echo "<tr>
<td width='95'>
<font face='Verdana' style='font-size: 9pt'>
$from</font></td>
<td><font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg&read=$id'>$subject</a></font></td>
<td width='131'>
<font face='Verdana' style='font-size: 9pt'>
$date - $time</font></td>
</tr>";
}
}
echo "</table>
</td>
</tr>
</table>
</td>
</tr>
</table></div>";
}
}
}else if(isset($_GET['members'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
if(isset($_GET['profile'])){
$userid = $_GET['profile'];
$userinfo = MYSQL_QUERY("SELECT * from users WHERE id='$userid'");
$userinfo = mysql_fetch_array($userinfo);
if($userinfo[id]){
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Member List</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td width='154' valign='top'>
<p align='center'>";
if($userinfo[habbo] == NULL){
echo "Habbo Left Blank<br>Update This In Your Profile.";
}else{
echo "<img border='0' src='http://www.habbo$userinfo[hotel]/habbo-imaging/avatarimage?user=$userinfo[habbo]&action=wav&direction=&head_direction=&gesture=sml&size='>";
}
echo "</td>
<td valign='top'>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>";
if($userinfo[publicemail] == 1){
echo "<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>Email Address:</b> $userinfo[email]</font></td>
</tr>";
}
echo "
<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>MSN Address:</b> $userinfo[msn]</font></td>
</tr>
<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>Yahoo Address:</b> $userinfo[yahoo]</font></td>
</tr>
<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>Google Talk:</b> $userinfo[google]</font></td>
</tr>
<tr>
<td><font face='Verdana' style='font-size: 9pt'>&nbsp;</font></td>
</tr>
<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>Habbo Name:</b> <a target='_blank' href='http://www.habbo$userinfo[hotel]/home/$userinfo[habbo]'>$userinfo[habbo]</a></td>
</tr>
<tr>
<td><font face='Verdana' style='font-size: 9pt'><b>Hotel Used:</b> <a target='_blank' href='http://www.habbo$userinfo[hotel]'>habbo$userinfo[hotel]</a></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>";
if($logged[level] == Administrator){
echo "<tr>
<td><font face='Verdana' style='font-size: 9pt'><center><b>Admin Only</b></center><b>IP Address:</b> $userinfo[ip]<br><b>Email Address:</b> $userinfo[email]<br><b><a href='login.php?admin&readpm=$userinfo[id]'>Read PMs</a></b></td>
</tr>";
}
echo "</table>
</td>
</tr>
</table>
</td>
</tr>
</table></div>";
}else{
header('Location: login.php?error=14');
}
}else{
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Member List</font></b></td>
</tr>
<tr>
<td width='100%'>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td width='50%' align='center'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
Username</font></td>
<td width='50%' align='center'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
PM This User</font></td>
</tr>";
$result = mysql_query("SELECT * FROM users ORDER BY `id` ASC");
while($r=mysql_fetch_array($result)){
$id = $r['id'];
$username = $r['username'];
echo "<tr>
<td width='50%'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?members&profile=$id'><center>$username</center></a></font></td>
<td width='50%'>
<p align='center'>
<font face='Verdana' style='font-size: 9pt'>
<a href='login.php?privatemsg&compose&to=$username'>PM</font></td>
</tr>";
}
echo"</table>
</td>
</tr>
</table></div>";
}
}
}else if(isset($_GET['settings'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
if($_POST[updatesettings]){
$emailinpublic = strip_tags($_POST['emailinpublic']);
$newpm = strip_tags($_POST['newpm']);
$bgcolor = strip_tags($_POST['bgcolor']);
$update = mysql_query("UPDATE `users` SET `publicemail` = '$emailinpublic',`pmemail` = '$newpm',`userbg` = '$bgcolor' WHERE `username` = '$logged[username]'");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Settings</font></b></td>
</tr>
<tr>
<td width='100%'>
<p align='center'><font face='Verdana' style='font-size: 9pt'>
You have successfully updated your settings.<br><a href='login.php'>Return</a></font></td>
</tr>
</table></div>";
}else{
echo "<div align='center'>
<table width='50%' border='0' style='border: 3px double #000000; padding: 0' bgcolor='#FFFFFF'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Settings</font></b></td>
</tr>
<tr>
<td width='100%'>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<form method='POST'>
<tr>
<td width='50%'>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'><b>Show Email In Public:</b></font></td>
<td>";
$result = mysql_query("SELECT * FROM users WHERE `username` = '$logged[username]'");
while($r=mysql_fetch_array($result)){
$publicemail = $r['publicemail'];
echo"<select size='1' name='emailinpublic' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'>";
if($publicemail =="1"){ echo "<option selected value='1'>Yes</option>";}else{echo "<option value='1'>Yes</option>";}
if($publicemail =="0"){ echo "<option selected value='0'>No</option>";}else{echo "<option value='0'>No</option>";}
}
echo"</select></td>
</tr>
<tr>
<td>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'><b>Email On New PM:</b></font></td>
<td>";
$result = mysql_query("SELECT * FROM users WHERE `username` = '$logged[username]'");
while($r=mysql_fetch_array($result)){
$pmemail = $r['pmemail'];
echo"<select size='1' name='newpm' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'>";
if($pmemail =="1"){ echo "<option selected value='1'>Yes</option>";}else{echo "<option value='1'>Yes</option>";}
if($pmemail =="0"){ echo "<option selected value='0'>No</option>";}else{echo "<option value='0'>No</option>";}
}
echo"</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>
<p align='right'>
<font face='Verdana' style='font-size: 9pt'>
<b>Background Color:</b></font></td>
<td>";
$result = mysql_query("SELECT * FROM users WHERE `username` = '$logged[username]'");
while($r=mysql_fetch_array($result)){
$userbg = $r['userbg'];
echo"<select size='1' name='bgcolor' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'>";
if($userbg=="White"){ echo "<option selected>White</option>";}else{echo "<option>White</option>";}
if($userbg=="Black"){ echo "<option selected>Black</option>";}else{echo "<option>Black</option>";}
if($userbg=="Blue"){ echo "<option selected>Blue</option>";}else{echo "<option>Blue</option>";}
if($userbg=="Brown"){ echo "<option selected>Brown</option>";}else{echo "<option>Brown</option>";}
if($userbg=="Red"){ echo "<option selected>Red</option>";}else{echo "<option>Red</option>";}
if($userbg=="Grey"){ echo "<option selected>Grey</option>";}else{echo "<option>Grey</option>";}
if($userbg=="Orange"){ echo "<option selected>Orange</option>";}else{echo "<option>Orange</option>";}
if($userbg=="Purple"){ echo "<option selected>Purple</option>";}else{echo "<option>Purple</option>";}
if($userbg=="Pink"){ echo "<option selected>Pink</option>";}else{echo "<option>Pink</option>";}
if($userbg=="Yellow"){ echo "<option selected>Yellow</option>";}else{echo "<option>Yellow</option>";}
if($userbg=="Green"){ echo "<option selected>Green</option>";}else{echo "<option>Green</option>";}
}
echo"</select></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Submit' name='updatesettings' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table>
</td>
</tr>
</table></div>";
}
}
}else if(isset($_GET['changepass'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
if($_POST[submit]){
$currentpw1 = strip_tags($_POST['currentpw']);
$newpw1 = strip_tags($_POST['newpw']);
$cnewpw1 = strip_tags($_POST['cnewpw']);
if($currentpw1 == NULL|$newpw1 == NULL|$cnewpw1 == NULL){
header('Location: login.php?error=2');
exit();
}
$currentpw = md5($currentpw1);
$newpw = md5($newpw1);
$cnewpw = md5($cnewpw1);
if($currentpw != $logged[password]){
header('Location: login.php?error=2');
exit();
}else{
if($newpw == $cnewpw){
if($currentpw == $newpw){
header('Location: login.php?error=13');
exit();
}else{
$update = mysql_query("UPDATE `users` SET `password` = '$newpw' WHERE `username` = '$logged[username]'");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Change Password</font></b></td>
</tr>
<tr>
<td width='100%'>
<p align='center'><font face='Verdana' style='font-size: 9pt'>
You have successfully updated your password.<br><a href='login.php'>Return</a></font></td>
</tr>
</table></div>";
}
}else{
header('Location: login.php?error=2');
exit();
}
}
}else{
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td colspan='2'><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Change Password</font></b></td>
</tr>
<form method='POST'>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Current Password:</font></td>
<td width='72%'>
<input type='password' name='currentpw' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>New Password:</font></td>
<td width='72%'>
<input type='password' name='newpw' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Confirm New Password:</font></td>
<td width='72%'>
<input type='password' name='cnewpw' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Submit' name='submit' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table></div>";
}
}
}else if(isset($_GET['editprofile'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
if($_POST[submit]){
$email = strip_tags($_POST['email']);
$msnaddress = strip_tags($_POST['msnaddress']);
$yahooaddress = strip_tags($_POST['yahooaddress']);
$googletalk = strip_tags($_POST['googletalk']);
$habbo = strip_tags($_POST['habbo']);
$hotel = $_POST['hotel'];
if($email == NULL|$habbo == NULL|$hotel == NULL){
header('Location: login.php?error=6');
exit();
}
if($msnaddress == NULL){
$msnaddress='Not Specified';
}
if($yahooaddress == NULL){
$yahooaddress='Not Specified';
}
if($googletalk == NULL){
$googletalk='Not Specified';
}
$update = mysql_query("UPDATE `users` SET `email` = '$email', `habbo` = '$habbo', `hotel` = '$hotel', `msn` = '$msnaddress', `yahoo` = '$yahooaddress', `google` = '$googletalk' WHERE `username` = '$logged[username]'");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Edit Profile</font></b></td>
</tr>
<tr>
<td width='100%'>
<p align='center'><font face='Verdana' style='font-size: 9pt'>
You have successfully updated your profile.<br><a href='login.php'>Return</a></font></td>
</tr>
</table></div>";
}else{
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td colspan='2'><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Edit Profile</font></b></td>
</tr>
<form method='POST'>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Username:</font></td>
<td width='72%'>
<input type='text' readonly value='$logged[username]' name='username' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Email
Address:</font></td>
<td width='72%'>
<input type='text' name='email' value='$logged[email]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>MSN Address:</font></td>
<td width='72%'>
<input type='text' name='msnaddress' value='$logged[msn]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Yahoo Address:</font></td>
<td width='72%'>
<input type='text' name='yahooaddress' value='$logged[yahoo]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Google Talk:</font></td>
<td width='72%'>
<input type='text' name='googletalk' value='$logged[google]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Habbo
Name:</font></td>
<td width='72%'>
<input type='text' name='habbo' value='$logged[habbo]' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Habbo Hotel Used:</font></td>
<td width='72%'>";
$result = mysql_query("SELECT * FROM users WHERE `username` = '$logged[username]'");
while($r=mysql_fetch_array($result))
{
$hotel = $r['hotel'];
echo"<select size='1' name='hotel' style='font-family: Tahoma; font-size: 9pt; color: #000000; border: 1px solid #000000; padding: 0'>";
if($hotel==".co.uk"){ echo "<option selected value='.co.uk'>United Kingdom</option>";}else{echo "<option value='.co.uk'>United Kingdom</option>";}
if($hotel==".com"){ echo "<option selected value='.com'>USA</option>";}else{echo "<option value='.com'>USA</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Argentina</option>";}else{echo "<option value='.es'>Argentina</option>";}
if($hotel==".com.au"){ echo "<option selected value='.com.au'>Australia</option>";}else{echo "<option value='.com.au'>Australia</option>";}
if($hotel==".at"){ echo "<option selected value='.at'>Austria</option>";}else{echo "<option value='.at'>Austria</option>";}
if($hotel==".be"){ echo "<option selected value='.be'>Belgium</option>";}else{echo "<option value='.be'>Belgium</option>";}
if($hotel==".com.br"){ echo "<option selected value='.com.br'>Brazil</option>";}else{echo "<option value='.com.br'>Brazil</option>";}
if($hotel==".ca"){ echo "<option selected value='.ca'>Canada</option>";}else{echo "<option value='.ca'>Canada</option>";}
if($hotel==".cl"){ echo "<option selected value='.cl'>Chile</option>";}else{echo "<option value='.cl'>Chile</option>";}
if($hotel==".com.co"){ echo "<option selected value='.com.co'>Colombia</option>";}else{echo "<option value='.com.co'>Colombia</option>";}
if($hotel==".dk"){ echo "<option selected value='.dk'>Denmark</option>";}else{echo "<option value='.dk'>Denmark</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Ecuador</option>";}else{echo "<option value='.es'>Ecuador</option>";}
if($hotel==".fi"){ echo "<option selected value='.fi'>Finland</option>";}else{echo "<option value='.fi'>Finland</option>";}
if($hotel==".fr"){ echo "<option selected value='.fr'>France</option>";}else{echo "<option value='.fr'>France</option>";}
if($hotel==".de"){ echo "<option selected value='.de'>Germany</option>";}else{echo "<option value='.de'>Germany</option>";}
if($hotel==".ie"){ echo "<option selected value='.ie'>Ireland</option>";}else{echo "<option value='.ie'>Ireland</option>";}
if($hotel==".it"){ echo "<option selected value='.it'>Italy</option>";}else{echo "<option value='.it'>Italy</option>";}
if($hotel==".jp"){ echo "<option selected value='.jp'>Japan</option>";}else{echo "<option value='.jp'>Japan</option>";}
if($hotel==".com.my"){ echo "<option selected value='.com.my'>Malaysia</option>";}else{echo "<option value='.com.my'>Malaysia</option>";}
if($hotel==".com.mx"){ echo "<option selected value='.com.mx'>Mexico</option>";}else{echo "<option value='.com.mx'>Mexico</option>";}
if($hotel==".fr"){ echo "<option selected value='.fr'>Morocco</option>";}else{echo "<option value='.fr'>Morocco</option>";}
if($hotel==".nl"){ echo "<option selected value='.nl'>Netherlands</option>";}else{echo "<option value='.nl'>Netherlands</option>";}
if($hotel==".co.nz"){ echo "<option selected value='.co.nz'>New Zealand</option>";}else{echo "<option value='.co.nz'>New Zealand</option>";}
if($hotel==".no"){ echo "<option selected value='.no'>Norway</option>";}else{echo "<option value='.no'>Norway</option>";}
if($hotel==".com.pe"){ echo "<option selected value='.com.pe'>Peru</option>";}else{echo "<option value='.com.pe'>Peru</option>";}
if($hotel==".pt"){ echo "<option selected value='.pt'>Portugal</option>";}else{echo "<option value='.pt'>Portugal</option>";}
if($hotel==".ru"){ echo "<option selected value='.ru'>Russia</option>";}else{echo "<option value='.ru'>Russia</option>";}
if($hotel==".sg"){ echo "<option selected value='.sg'>Singapore</option>";}else{echo "<option value='.sg'>Singapore</option>";}
if($hotel==".es"){ echo "<option selected value='.es'>Spain</option>";}else{echo "<option value='.es'>Spain</option>";}
if($hotel==".se"){ echo "<option selected value='.se'>Sweden</option>";}else{echo "<option value='.se'>Sweden</option>";}
if($hotel==".ch"){ echo "<option selected value='.ch'>Switzerland</option>";}else{echo "<option value='.ch'>Switzerland</option>";}
if($hotel==".com.ve"){ echo "<option selected value='.com.ve'>Venezuela</option>";}else{echo "<option value='.com.ve'>Venezuela</option>";}
}
echo "</select></td>
</tr>
<tr>
<td colspan='2'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Submit' name='submit' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table></div>";
}
}
}else if(isset($_GET['forgot'])){
if($logged[username]){
header('Location: login.php?error=5');
exit();
}else{
if(isset($_GET['question'])){
$userid = $_GET['question'];
if($_POST[submitquestion]){
$answer = md5($_POST[answer]);
$userinfo = mysql_query("SELECT * FROM `users` WHERE `id` = '$userid'") or die(mysql_error());
$useri = mysql_fetch_array($userinfo);
if($answer == $useri[answer]){
function generatePassword($length) {
$password='';
for ($i=0;$i<=$length;$i++) {
$chr='';
switch (mt_rand(1,3)) {
case 1:
$chr=chr(mt_rand(48,57));
break;
case 2:
$chr=chr(mt_rand(65,90));
break;
case 3:
$chr=chr(mt_rand(97,122));
}
$password.=$chr;
}
return $password;
}
$randpass = generatePassword('7');
$randpass1 = md5($randpass);
$updateprofile = mysql_query("UPDATE `users` SET `password` = '$randpass1' WHERE `id` = '$userid'");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Password Reset</font></b></td>
</tr>
<tr>
<td width='100%'>
<p align='center'><font face='Verdana' style='font-size: 9pt'>
You password has been reset to <b>$randpass<br>
</b>We recommend you change this on logging into your account.<br><a href='login.php'>Login Now</a></font></td>
</tr>
</table></div>";
}else{
header('Location: login.php?error=12');
exit();
}
}else{
$userinfo = mysql_query("SELECT * FROM `users` WHERE `id` = '$userid'") or die(mysql_error());
$useri = mysql_fetch_array($userinfo);
echo "<div align='center'>
<table width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Password Reset</font></b></td>
</tr>
<tr>
<td width='100%'>
<table border='0' bgcolor='#FFFFFF' width='100%' cellspacing='1'>
<form method='POST'>
<tr>
<td colspan='2'>
<p align='center'><font face='Verdana' size='2'><b>$useri[question]</b></font></td>
</tr>
<tr>
<td width='50%'>
<p align='right'><font face='Verdana' size='2'>Secret
Answer:</font></td>
<td>
<input name='answer' size='20' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Submit' name='submitquestion' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
<form method='POST'>
</form>
</table>
</td>
</tr>
</table></div>";
}
}else{
if($_POST[resetemail]){
$email = $_POST[email];
$userinfo = mysql_query("SELECT * FROM `users` WHERE `email` = '$email'") or die(mysql_error());
$useri = mysql_fetch_array($userinfo);
$checkuser = mysql_num_rows($userinfo);
if($email = NULL){
header('Location: login.php?error=6');
exit();
}
if($checkuser==0){
header('Location: login.php?error=11');
exit();
}
$uid = $useri[id];
echo "<meta http-equiv='Refresh' content='1;url=login.php?forgot&question=$uid'/>";
}
if($_POST[resetusername]){
$username = $_POST[username];
$userinfo = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'") or die(mysql_error());
$useri = mysql_fetch_array($userinfo);
$checkuser = mysql_num_rows($userinfo);
if($username == NULL){
header('Location: login.php?error=6');
exit();
}
if($checkuser==0){
header('Location: login.php?error=11');
exit();
}
$uid = $useri[id];
echo "<meta http-equiv='Refresh' content='1;url=login.php?forgot&question=$uid'/>";
}
echo"<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Password Reset</font></b></td>
</tr>
<tr>
<td width='100%'>
<table border='0' width='100%' cellspacing='1'>
<form method='POST'>
<tr>
<td width='50%'>
<p align='right'><font face='Verdana' size='2'>Username:</font></td>
<td>
<input name='username' size='16' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Reset Password By Username' name='resetusername' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
<tr>
<td width='50%'>&nbsp;</td>
<td>&nbsp;</td>
</tr>
<form method='POST'>
<tr>
<td width='50%'>
<p align='right'><font face='Verdana' size='2'>Email
Address:</font></td>
<td>
<input name='email' size='16' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Reset Password By Email' name='resetemail' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table>
</td>
</tr>
</table></div>";
}
}
}else if(isset($_GET['usercp'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - User CP</font></b></td>
</tr>
<tr>
<td>
<table border='0' width='100%' cellspacing='1' cellpadding='0'>
<tr>
<td align='center' width='50%'>
<font face='Verdana' style='font-size: 9pt; font-weight:700'>
<a href='login.php?editprofile' style='text-decoration: none'>Edit Profile</a></font></td>
<td align='left'><font face='Verdana' style='font-size: 9pt'><b>Habbo Name:</b> $logged[habbo]
<a href='http://www.habbo$logged[hotel]/home/$logged[habbo]' target='_blank' style='text-decoration:none'>(Habbo Home)</a></font></td>
</tr>
<tr>
<td align='center' width='50%'>
<font face='Verdana' style='font-size: 9pt; font-weight:700'>
<a href='login.php?changepass' style='text-decoration: none'>Change Password</a></font></td>
<td align='left'><font face='Verdana' style='font-size: 9pt'><b>Hotel:</b> Habbo$logged[hotel]
<a href='http://www.habbo$logged[hotel]' target='_blank' style='text-decoration:none'>(Visit)</a></font></td>
</tr>
<tr>
<td align='center' width='50%'>
<font face='Verdana' style='font-size: 9pt; font-weight:700'>
<a href='login.php?privatemsg' style='text-decoration: none'>
Private Messages</a></font></td>
<td align='left'><font face='Verdana' style='font-size: 9pt'><b>Email Address:</b> $logged[email]</font></td>
</tr>
<tr>
<td align='center' colspan='2'>
<font face='Verdana' style='font-size: 9pt'>&nbsp;</font></td>
</tr>
<tr>
<td align='center' colspan='2'>
<font face='Verdana' style='font-size: 9pt; font-weight: 700'>
<a href='login.php?settings' style='text-decoration: none'>
Settings</a></font></td>
</tr>
</table>
</td>
</tr>
</table></div>";
}
}else if(isset($_GET['logout'])){
if(!$logged[username]){
header('Location: login.php?error=4');
exit();
}else{
setcookie("$cookieid", 2132421, time() + (60 * 60 * 24 * 5), "/", "");
echo "<meta http-equiv='Refresh' content='1;url=login.php'/>
<div align='center'><table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> - Logout</font></b></td>
</tr>
<tr>
<td>
<p align='center'><font size='2' face='Tahoma'>Successfully Logged Out!</font></td>
</tr>
</table></div>";
}
}else if(isset($_GET['register'])){
if($logged[username]){
header('Location: login.php?error=5');
exit();
}else{
if($_POST[register]){
$username = strip_tags($_POST['username']);
$password = strip_tags($_POST['password']);
$cpassword = strip_tags($_POST['cpassword']);
$email = strip_tags($_POST['email']);
$question = strip_tags($_POST['question']);
$answer = strip_tags($_POST['answer']);
$answer = md5($answer);
$habbo = strip_tags($_POST['habbo']);
$hotel = strip_tags($_POST['hotel']);
$ip = $_SERVER['REMOTE_ADDR'];
$regdate = date("d/m/y");
$password = md5($password);
$cpassword = md5($cpassword);
if($password != $cpassword){
header('Location: login.php?error=2');
exit();
}
if($username == NULL|$password == NULL|$cpassword == NULL|$email == NULL|$question == NULL|$answer == NULL|$hotel== NULL){
header('Location: login.php?error=6');
exit();
}
$checkname = mysql_query("SELECT username FROM users WHERE username='$username'");
$checkname= mysql_num_rows($checkname);
$checkemail = mysql_query("SELECT email FROM users WHERE email='$email'");
$checkemail = mysql_num_rows($checkemail);
if($checkname>0){
header('Location: login.php?error=7');
exit();
}else if($checkemail>0){
header('Location: login.php?error=8');
exit();
}else{
$registeruser = mysql_query("INSERT INTO `users` (username, password, email, question, answer, habbo, hotel, ip, regdate) VALUES('$username','$password','$email', '$question', '$answer', '$habbo', '$hotel', '$ip', '$regdate')");
echo "<div align='center'>
<table width='50%' bgcolor='#FFFFFF' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td><p align='center'><font face='Tahoma' size='2'><b>$username, You Successfully Registered!</b><br>
<center><a href='login.php'>Click Here</a> To Login.</font></center></td>
</tr>
</table></div>";
}
}else{
echo "<div align='center'><table bgcolor='#FFFFFF' width='50%' border='0' style='border: 3px double #000000; padding: 0'>
<tr>
<td colspan='2'><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Register</font></b></td>
</tr>
<form method='POST'>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Username:</font></td>
<td width='72%'>
<input type='text' name='username' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Password:</font></td>
<td width='72%'>
<input type='password' name='password' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Confirm
Password:</font></td>
<td width='72%'>
<input type='password' name='cpassword' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Email
Address:</font></td>
<td width='72%'>
<input type='text' name='email' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>
Secret Question:</font></td>
<td width='72%'>
<input type='text' name='question' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>
Secret Answer:</font></td>
<td width='72%'>
<input type='text' name='answer' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2' align='right' width='40%'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td width='40%' align='right'><font face='Tahoma' size='2'>Habbo
Name:</font></td>
<td width='72%'>
<input type='text' name='habbo' size='38' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td width='40%' align='right'>
<font face='Tahoma' size='2'>Habbo Hotel Used:</font></td>
<td width='72%'>
<select size='1' name='hotel' style='font-family: Tahoma; font-size: 9pt; color: #000000; border: 1px solid #000000; padding: 0'>
<option value='.co.uk'>United Kingdom</option>
<option value='.com'>USA</option>
<option value='.es'>Argentina</option>
<option value='.com.au'>Australia</option>
<option value='.at'>Austria</option>
<option value='.be'>Belgium</option>
<option value='.com.br'>Brazil</option>
<option value='.ca'>Canada</option>
<option value='.cl'>Chile</option>
<option value='.com.co'>Colombia</option>
<option value='.dk'>Denmark</option>
<option value='.es'>Ecuador</option>
<option value='.fi'>Finland</option>
<option value='.fr'>France</option>
<option value='.de'>Germany</option>
<option value='.ie'>Ireland</option>
<option value='.it'>Italy</option>
<option value='.jp'>Japan</option>
<option value='.com.my'>Malaysia</option>
<option value='.com.mx'>Mexico</option>
<option value='.fr'>Morocco</option>
<option value='.nl'>Netherlands</option>
<option value='.co.nz'>New Zealand</option>
<option value='.no'>Norway</option>
<option value='.com.pe'>Peru</option>

<option value='.pt'>Portugal</option>
<option value='.ru'>Russia</option>
<option value='.sg'>Singapore</option>
<option value='.es'>Spain</option>
<option value='.se'>Sweden</option>
<option value='.ch'>Switzerland</option>
<option value='.com.ve'>Venezuela</option>
</select></td>
</tr>
<tr>
<td colspan='2'><span style='font-size: 8pt'>&nbsp;</span></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Register' name='register' style='font-family: Tahoma; font-size: 9pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
</table></div>";
}
}
}else{
if (!$logged[username]){
if($_POST[login]){
$username = strip_tags($_POST['username']);
$password = strip_tags($_POST['password']);
if($username == NULL|$password == NULL){
header('Location: login.php?error=6');
exit();
}
$password = md5($password);
$userinfo = mysql_query("SELECT * FROM `users` WHERE `username` = '$username'") or die(mysql_error());
$useri = mysql_fetch_array($userinfo);
$usericount = mysql_num_rows($userinfo);
if($usericount == 0){
header('Location: login.php?error=1');
exit();
}else{
if($useri[password] != $password) {
header('Location: login.php?error=2');
exit();
}
if($useri[level] == Banned){
header('Location: login.php?error=3');
exit();
}
setcookie("$cookieid", $useri[id], time() + (60 * 60 * 24 * 5), "/", "");
echo "<meta http-equiv='Refresh' content='1'/><div align='center'>
<table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td><p align='center'><font face='Tahoma' size='2'><b>Successfully logged in!</b><br>
You are now being redirected.</font></td>
</tr>
</table></div>";
}
}else{
echo"<div align='center'>
<table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<form method='POST'>
<tr>
<td align='right' width='50%'>
<font face='Verdana, Arial, Helvetica, sans-serif' size='2'>Username:</font></td>
<td width='74%'>
<input name='username' size='16' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td align='right' width='50%'>
<font face='Verdana, Arial, Helvetica, sans-serif' size='2'>Password:</font></td>
<td width='74%'>
<input type='password' name='password' size='16' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
<tr>
<td colspan='2'>
<p align='center'>
<input type='submit' value='Login' name='login' style='font-family: Verdana; font-size: 8pt; border: 1px solid #000000; padding: 0'></td>
</tr>
</form>
<tr>
<td colspan='2'>
<p align='center'>
<font face='Verdana' style='font-size: 8pt'><b>Not Registered? Its Free And Quick</b><span style=''> </span>
<a href='login.php?register'>
<span style='text-decoration: none'>Register Now</span></a><br>
<b>Forgot Your Password ? </b><a href='login.php?forgot'>
<span style='text-decoration: none'>Reset It Now</span></a></font></td>
</tr>
</table></div>";
}
}else{
echo"<div align='center'>
<table width='50%' border='0' bgcolor='#FFFFFF' style='border: 3px double #000000; padding: 0'>
<tr>
<td colspan='2'><b><font face='Tahoma' size='2'><a href='login.php' style='text-decoration: none'>$sitetitle Usersystem</a> -
Main Control Panel</font></b></td>
</tr>
<tr>
<td width='31%'><center>";
if($logged[habbo] == NULL){
echo "<font face='Verdana' style='font-size: 8pt'>Habbo Left Blank<br>Update This In Your Profile.</font>";
}else{
echo "<a target='_blank' href='http://www.habbo$logged[hotel]/home/$logged[habbo]'><img border='0' src='http://www.habbo$logged[hotel]/habbo-imaging/avatarimage?user=$logged[habbo]&action=wav&direction=&head_direction=&gesture=sml&size='></a>";
}
echo"</center></td>
<td width='69%' class='style1'>
<font face='Verdana' style='font-size: 9pt'><b><span class='style1'>
<a href='login.php?usercp' style='text-decoration: none'>UserCP</a><br />
<a href='login.php?privatemsg' style='text-decoration: none'>Private Message</a><br />
<a href='login.php?settings' style='text-decoration: none'>Settings</a><br>
<a href='login.php?members' style='text-decoration: none'>Members</a>";
if ($logged[level] == 'Administrator') {
echo "<br><a href='login.php?admin' style='text-decoration: none'>Staff Area</a>";
}
echo"<br><br /><a href='login.php?logout' style='text-decoration: none'>Log Out</a></span></b></font></td>
</tr>
</table></div>";
}
}
?>

Don't know if you will be a ble to read it or not?

Moved by N!ck (Forum Moderator) from Technology Discussion: Please post in the correct forum next time, thanks :).

Omg use OOP / Includes / functions. WHATEVER. Christ.

Mickword
10-08-2009, 08:53 PM
I didn't make it lol.

Colin-Roberts
10-08-2009, 08:55 PM
in future remove you mysql details.

Mickword
10-08-2009, 08:56 PM
yeah that would be a good idea. Its been deleted now :P

Fehm
11-08-2009, 03:05 PM
I think you just looking for attention... Like normal.

Mickword
11-08-2009, 03:34 PM
See as normal you keep putting me down!

Jahova
11-08-2009, 04:48 PM
At your question.. The coding of that PHP is terrible. It's messy and it could be coded in a better fashion using different methods that could proove to make it much faster.

Want to hide these adverts? Register an account for free!