<?php
#######################################################|#
#|                    HabboMCMS - TheRox
#|                    Powered by HoloCMS 
#|            Copyright 2011-2012 ALL RIGHTS RESERVED
#######################################################|#

include('global.php');

session_start();

if(session_is_registered(username)){
$username = $_SESSION['username'];
$password = $_SESSION['password'];

$sql = mysql_query("SELECT * FROM users WHERE username = '".$username."' LIMIT 1") or die(mysql_error());
$row = mysql_fetch_assoc($sql);

	if($row['password'] !== $password){
            session_destroy();
	}
}

?>

<html>
<head>
  <title>Redirecting...</title>
  <meta http-equiv="content-type" content="text/html; charset=utf-8">
  <style type="text/css">body { background-color: #e3e3db; text-align: center; font: 11px Verdana, Arial, Helvetica, sans-serif; } a { color: #fc6204; }</style>
</head>
<body>
<?php if(isset($_GET['welcome'])){ ?>
<script type="text/javascript">window.location.replace('<?php echo $path; ?>/me');</script><noscript><meta http-equiv="Refresh" content="0;URL=<?php echo $path; ?>/me"></noscript>
<?php } else { ?>
<script type="text/javascript">window.location.replace('<?php echo $path; ?>/me');</script><noscript><meta http-equiv="Refresh" content="0;URL=<?php echo $path; ?>/me"></noscript>
<?php } ?>
<p class="btn">If you are not automatically redirected, please <a href="index.php" id="manual_redirect_link">click here</a></p>

</body>
</html>