Просмотр файла index1.php

Размер файла: 2.67Kb
<?php
list($msec, $sec) = explode(chr(32), microtime());
$headtime = $sec + $msec;

error_reporting(0);

include("config.php");
include("./includes/constants/index");
include("./includes/".$ver."/banned");

$nocache = rand(1000, 9999);

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");

echo "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n";
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo "<html><head>\n";
echo "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n";
echo "<link rel=\"shortcut icon\" href=\"$favicon\" /><title>".TITLE."</title>\n";
echo "<style type=\"text/css\">\n";
echo "body { font-weight: normal; font-size: normal; font-family: ".$font."; color: $color; background-color: $background }\n";
echo "a:link, a:active, a:visited { text-decoration: underline; color : ".$links." }\n";
echo "div { margin: 1px 0px 1px 0px; padding: 4px 4px 4px 4px }\n";
echo "div.form { background-color: $form_color }\n";
echo "</style></head>\n";
echo "<body><div style=\"text-align: center\">\n";

$chat = file("chat.dat");
$logo = trim($chat[0]);
$message = trim($chat[1]);

$q = mysql_query("SELECT COUNT(`id`) FROM `chat_users` WHERE `time` >= ".time().";");
$online = mysql_result($q, 0);

$q = mysql_query("SELECT COUNT(`id`) FROM `chat_users`;");
$users = mysql_result($q, 0);

if(!empty($logo)) echo "<img src=\"http://$logo\" alt=\"\" /><br/>\n";
if(!empty($message)) echo "$message<br/>\n";
echo "<div class=\"form\">\n";
echo "<form action=\"menu.php?ver=html&amp;nocache=$nocache\" method=\"post\">\n";
echo "Ник:<br/>\n";
echo "<input type=\"text\" name=\"nickname\" maxlength=\"15\" /><br/>\n";
echo "Транслитировать:\n";
echo "<input type=\"checkbox\" name=\"translit\" value=\"yes\" /><br/>\n";
echo "Пароль:<br/>\n";
echo "<input type=\"text\" name=\"password\" maxlength=\"20\" /><br/>\n";
echo "<input type=\"hidden\" name=\"action\" value=\"auth\" />\n";
echo "<input type=\"submit\" value=\"Вход\" /></form></div>\n";
echo ONLINE.": <a href=\"inchat.php?ver=html\">$online</a><br/>\n";
echo REG_USERS.": ".$users."<br/>\n";
echo "<a href=\"rules.php?ver=html\">Правила чата</a><br/>\n";
echo "<a href=\"rules.php?ver=html&amp;action=registration\">Регистрация</a><br/>\n";
echo "<a href=\"go.php?ver=html\">".MAIN."</a><br/>\n";
echo "<br />\n";
list($msec, $sec) = explode(chr(32), microtime());
echo "<span style=\"font-size: small\">[".round(($sec + $msec) - $headtime, 5)."]</span><br/>\n";
echo "</div></body></html>";
break;
?>