View file game.php

File size: 919B
<?php
session_name('SID');
session_start();
include_once('/data/inc.cfg');
if(empty($_SESSION['login']))
{
	echo '<script>location = "index.php?error=wrongpass";</script>';
	exit;
}
$sql = mysql_query("
	SELECT *
	FROM user
	WHERE login='".$_SESSION['login']."'");
$data = mysql_fetch_assoc($sql);
if(!$sql) die('Error: '.mysql_error().'');
if($data['phash'] !== $_SESSION['password'])
{
	echo '<script>location = "index.php?error=wrongpass";</script>';
	exit;
}

?>
<div class="top"><b><?=LNG_INDEX_TITLE?></b>
<?php
?></div>
<div class="block"><center>
<?php
switch($_GET['act'])
{
default:
include_once('data/nav.mod');
break;
case 'user':
include_once('data/user.mod');
break;
case 'ui':
include_once('data/ui.mod');
break;
case 'conf':
include_once('data/conf.mod');
break;
}
include_once('data/gmenu.mod');
?>
</center>
</div>
<div class="bottom">&copy; <?=CFG_COPY?> <?=CFG_DATE?></div>
</center>
</body>
</html>