Размер файла: 5.82Kb
<?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");
list($msec, $sec) = explode(chr(32), microtime());
$headtime = $sec + $msec;
$nocache = rand(1000, 9999);
switch($ver)
{
case 'wml':
///////////////////////////////////////////////////////
//WML VERSION
///////////////////////////////////////////////////////
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");
//AUTH
$id = intval($_SESSION['id']);
$password = mysql_escape_string($_SESSION['password']);
$q = mysql_query("SELECT nickname FROM `chat_users` WHERE `id` = '".$id."' AND `password` = '".md5($password)."';");
if(mysql_num_rows($q) == 0)
{
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?ver=wml\"><timer value=\"15\"/><p align=\"left\">\n";
echo "<small>Ошибка авторизации!<br/>\n";
list($msec, $sec) = explode(chr(32), microtime());
echo "<br/>[".round(($sec+$msec)-$headtime,5)."] sec<br/>\n";
echo "</small>";
require_once "includes/functions/gzip_foot.php";
echo "</p></card></wml>";
ob_end_flush();
exit();
}
//END AUTH
$nik = mysql_result($q, 0);
//LETTERS
$query = mysql_query("SELECT COUNT(*) FROM `chat_letters` WHERE `id` = '".$id."' AND `to` = '".$id."' AND `read` = 0;");
$newto = mysql_result($query, 0);
$query = mysql_query("SELECT COUNT(*) FROM `chat_letters` WHERE `id` = '".$id."' AND `to` = '".$id."';");
$to = mysql_result($query, 0);
//END LETTERS
//MEETS
$query = mysql_query("SELECT COUNT(*) FROM `chat_meets`;");
$meets = mysql_result($query, 0);
//END MEETS
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\">\n<wml>\n";
echo "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>\n";
echo "<card id=\"index\" title=\"Cabinet\"><p align=\"left\">\n";
echo "<!-- Developed by ILI -->\n";
print"$nik, добро пожаловать в Ваш персональный кабинет!<br/>";
echo "<a href=\"letters.php?".SID."&ver=wml\">Письма ($newto/$to)</a><br/>\n";
echo "<a href=\"meets.php?".SID."&ver=wml\">Встречи ($meets)</a><br/>\n";
echo "<a href=\"buttons.php?".SID."&ver=wml&nocache=$nocache\">Софт Кнопки</a><br/>\n";
echo "<a href=\"mood.php?".SID."&ver=wml&nocache=$nocache\">Настроение</a><br/>\n";
echo "<a href=\"ignor.php?".SID."&ver=wml&nocache=$nocache\">Игнор-лист</a><br/>\n";
echo "<a href=\"profile.php?".SID."&ver=wml&nocache=$nocache\">Профиль</a><br/>\n";
echo "<a href=\"faq.php?".SID."&ver=wml&nocache=$nocache\">FAQ и Статистика</a><br/>\n";
echo "<a href=\"settings.php?".SID."&ver=wml&nocache=$nocache\">Настройки</a><br/>\n";
echo "<br />\n";
echo "<a href=\"menu.php?".SID."&ver=wml&nocache=$nocache\">Меню чата</a><br/>\n";
list($msec, $sec) = explode(chr(32), microtime());
echo "<small>[".round(($sec + $msec) - $headtime, 5)."]</small><br/>\n";
require_once "includes/functions/gzip_foot.php";
echo "</p></card></wml>";
ob_end_flush();
break;
case 'html':
///////////////////////////////////////////////////////
//HTML VERSION
///////////////////////////////////////////////////////
$my_title = "My";
if(!isset($_COOKIE['theme'])) $_COOKIE['theme'] = 1;
include_once "themes/".intval($_COOKIE['theme'])."/index.php";
//AUTH
$id = intval($_SESSION['id']);
$password = mysql_escape_string($_SESSION['password']);
$q = mysql_query("SELECT nickname FROM `chat_users` WHERE `id` = '".$id."' AND `password` = '".md5($password)."';");
if(mysql_num_rows($q) == 0)
{
echo "Ошибка авторизации!<br/>\n";
include_once "themes/".intval($_COOKIE['theme'])."/foot.php";
exit();
}
//END AUTH
$nik = mysql_result($q, 0);
//LETTERS
$query = mysql_query("SELECT COUNT(*) FROM `chat_letters` WHERE `id` = '".$id."' AND `to` = '".$id."' AND `read` = 0;");
$newto = mysql_result($query, 0);
$query = mysql_query("SELECT COUNT(*) FROM `chat_letters` WHERE `id` = '".$id."' AND `to` = '".$id."';");
$to = mysql_result($query, 0);
//END LETTERS
//MEETS
$query = mysql_query("SELECT COUNT(*) FROM `chat_meets`;");
$meets = mysql_result($query, 0);
//END MEETS
print"$nik, добро пожаловать в Ваш персональный кабинет!<br/>";
echo "<a href=\"letters.php?".SID."&ver=html\">Письма ($newto/$to)</a><br/>\n";
echo "<a href=\"meets.php?".SID."&ver=html\">Встречи ($meets)</a><br/>\n";
echo "<a href=\"mood.php?".SID."&ver=html&nocache=$nocache\">Настроение</a><br/>\n";
echo "<a href=\"ignor.php?".SID."&ver=html&nocache=$nocache\">Игнор-лист</a><br/>\n";
echo "<a href=\"profile.php?".SID."&ver=html&nocache=$nocache\">Профиль</a><br/>\n";
echo "<a href=\"faq.php?".SID."&ver=html&nocache=$nocache\">FAQ и Статистика</a><br/>\n";
echo "<a href=\"settings.php?".SID."&ver=html&nocache=$nocache\">Настройки</a><br/>\n";
echo "<a href=\"fontcolor.php?".SID."&ver=html&nocache=$nocache\">Цвет текста</a><br/>\n";
echo "<a href=\"themes.php?".SID."&ver=html\">Темы</a><br/>\n";
echo "<br />\n";
echo "<a href=\"menu.php?".SID."&ver=html&nocache=$nocache\">Меню чата</a><br/>\n";
include_once "themes/".intval($_COOKIE['theme'])."/foot.php";
break;
}
?>