View file template/log.php

File size: 395B
<?
if(!empty($_SESSION['id']) and !empty($_SESSION['pass']))
{
	$result_log = mysql_query("select * from user where id='$_SESSION[id]' and pass='$_SESSION[pass]'");
	$tot_result_log = mysql_num_rows($result_log);
	if($tot_result_log == 1)
	{
		$id = $_SESSION['id'];
		$pass = $_SESSION['pass'];
	}
	else
	{
		session_destroy();
	}
}

if($id == $admin)
{$admin = true;}
else
{$admin = false;}
?>