File size: 1.31Kb
<?php
//POWERED by ILI
// ICQ : 197042
//site: ili.wab.ru
// ilichat v4.0
error_reporting(0);
require_once"./includes/functions/gzip.php";
include('start.php');
include("config.php");
include("./includes/".$ver."/banned");
if(isset($_POST['id'])){
//POST
$id = intval($_POST['id']);
$password = mysql_escape_string($_POST['password']);
}
else{
//GET
$id = intval($_GET['id']);
$password = mysql_escape_string($_GET['password']);
}
//AUTH
$q = mysql_query("SELECT * FROM `chat_users` WHERE `id` = '".$id."' AND `password` = '".md5($password)."' LIMIT 1;");
if(mysql_num_rows($q) == 0)
{
header("Content-type: text/vnd.wap.wml; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-revalidate");
echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.3//EN\" \"http://www.wapforum.org/DTD/wml13.dtd\"><wml>\n";
echo "<card title=\"ERROR\" ontimer=\"index.php\"><timer value=\"15\"/><p align=\"left\">\n";
echo "<small>Ошибка авторизации!<br/>\n";
echo "</small>";
require_once "includes/functions/gzip_foot.php";
echo "</p></card></wml>";
ob_end_flush();
session_destroy();
exit();
}
$_SESSION['password'] = $password;
$_SESSION['id'] = $id;
header("Location:menu.php?".SID."&ver=$ver");
//END AUTH
?>