<?
session_start();
?>

<!DOCTYPE html PUBLIC "-//WAPFORUM//DTD XHTML Mobile 1.0//EN" "http://www.wapforum.org/DTD/xhtml-mobile10.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="ru">

<head><meta http-equiv='content-type' content='application/xhtml+xml; charset=windows-1251'/>
<link rel="shortcut icon" href="img/bad.png" type="image/x-icon" />
<title>Ошибка!</title>
<link rel="stylesheet" href="styleN.css" type="text/css" />

<SCRIPT>
   function setCookie(name, value) {
      document.cookie=name+"="+escape(value)+"; path=/";
   }
</SCRIPT>
<div class='main'  style="padding-bottom:10px">
<div class='top'>


<?php
$NICK = $_POST['NICK'];
$pass = $_POST['pass'];	
include("db.php");
$db->openDB();
$all = mysql_query("select * from users WHERE NICK=\"$NICK\" AND pass=\"$pass\"");

if(isset($_POST['NICK']) AND isset($_POST['pass']))
{


if(@mysql_num_rows($all) >0)
{	
$_SESSION['s'] = $NICK;
$_SESSION['p'] = $pass;

$t=time();
 print('<SCRIPT>location.href="game.php";</SCRIPT>');
}
}
if(@mysql_num_rows($all) <1)
{
echo"
<center><strong><font color=\"white\">Ошибка!</font></strong></center>
</div><b>
<div style=\"padding:5px;text-align:center\">
<font color=\"red\"><img src=\"img/bad.png\" class=\"sub\" width=\"16\" height=\"16\"> Неправильный логин или пароль</font></div></b>";
}
echo"</div>";
include("footer.php");
	die;
  ?>
