View file key.php

File size: 1.46Kb
<?php
error_reporting(0);
$urls='key.php';
include("config.php");
include("./includes/".$ver."/banned");

$bots = file("bots/bots.dat");

$nocache = rand(10000, 99999);

list($msec, $sec) = explode(chr(32), microtime()); 
$headtime = $sec + $msec;

header ("Content-type: text/html; charset=utf-8");
header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
header("Cache-Control: no-cache, must-relative");
include("./template/head.php");
//AUTH
$q = mysql_query("SELECT `id` FROM `chat_users` WHERE `id` = '".$id."' AND `password` = '".$password."';");
if(mysql_num_rows($q) == 0)
{
include("./reginc.php");
include("./template/foot.php");
exit();
}
//END AUTH

//ONLINE
$online = time() + 60;
$update = mysql_query("UPDATE `chat_users` SET `time` = '".$online."', `place` = 0, `ip` = '".getenv('REMOTE_ADDR')."', `ua` = '".htmlspecialchars(getenv('HTTP_USER_AGENT'))."' WHERE `id` = '".$id."';");
//END ONLINE

echo "<form action=\"intim.php?ver=html&amp;nocache=$nocache\" method=\"post\">\n";
echo "Введите ключ*:<br/>\n";
echo "<input type=\"text\" name=\"key\" maxlength=\"10\" /><br/>\n";
echo "<input type=\"submit\" value=\"Вход\" /></form></div>\n";
echo "* Ключ может содержать только латинские буквы, а также цифры. Длина ключа не должа быть более 10 символов.<br/>\n";
echo "<a href=\"menu.php?nocache=$nocache\">Меню чата</a><br/>\n";

include("./template/foot.php");
break;
?>