<?php
/*===================================================+ 
|| # HoloCMS - Website and Content Management System
|+===================================================+ 
|| # Copyright © 2012 DnT [Tutti i diritti riservati]
|| # http://dnt.webnet32.com/
|+===================================================+ 
|| # DnT HoloCMS v2.1 - Created By Donatello (DnT)
|| # http://code.google.com/p/dnt-project/downloads/list
|+===================================================*/ 

include('core.php');

session_start();

if(session_is_registered(username)){
$username = FilterText($_SESSION['username']);
$password = FilterText($_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();
	} else {
		$_SESSION['mail'] = $row['mail'];
	}
}

?>

<html>
<head>
  <title>Reindizionamento...</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(FilterText(($_GET['welcome']))){ ?>
<script type="text/javascript">window.location.replace('welcome');</script><noscript><meta http-equiv="Refresh" content="0;URL=welcome"></noscript>
<?php } else { ?>
<script type="text/javascript">window.location.replace('welcome');</script><noscript><meta http-equiv="Refresh" content="0;URL=welcome"></noscript>
<?php } ?>
<p class="btn">Se non reindirizza automaticamente<a href="me" id="manual_redirect_link">Clicca QUI</a></p>

</body>
</html>