<?
//$id = intval($_GET['id']);
//$password = $_GET['password'];
session_start();
$id = $_SESSION['id'];
$password = $_SESSION['password'];
if(isset($_POST['action']))
{
if($_POST['translit'] == "yes")
{
$lat = array("''", "'", "\"\"", "\"", "CH", "ch", "SC", "sc", "YE", "ye", "YU", "yu", "YA", "ya", "YO", "yo", "A", "a", "B", "b", "C", "c", "D", "d", "E", "e", "F", "f", "G", "g", "H", "h", "I", "i", "J", "j", "K", "k", "L", "l", "M", "m", "N", "n", "O", "o", "P", "p", "R", "r", "S", "s", "T", "t", "U", "u", "V", "v", "H", "h", "Z", "z", "W", "w", "X", "x", "Y", "y");
$rus = array("Ь", "ь", "Ъ", "ъ", "Ч", "ч", "Щ", "щ", "Э", "э", "Ю", "ю", "Я", "я", "Ё", "ё", "А", "а", "Б", "б", "Ц", "ц", "Д", "д", "Е", "е", "Ф", "ф", "Г", "г", "Х", "х", "И", "и", "Ж", "ж", "К", "к", "Л", "л", "М", "м", "Н", "н", "О", "о", "П", "п", "Р", "р", "С", "с", "Т", "т", "У", "у", "В", "в", "Х", "х", "З", "з", "Ш", "ш", "Ы", "ы", "Й", "й");
$_POST['nickname'] = str_replace($lat, $rus, $_POST['nickname']);
}
$nickname = mysql_escape_string($_POST['nickname']);
$password = mysql_escape_string($_POST['password']);
$q = mysql_query("SELECT * FROM `chat_users` WHERE `nickname` = '".$nickname."' AND `password` = '".$password."';");
}
else
{
//$id = intval($_GET['id']);
//$password = mysql_escape_string($_GET['password']);
$q = mysql_query("SELECT * FROM `chat_users` WHERE `id` = '".$id."' AND `password` = '".$password."';");
}
$user = mysql_fetch_array($q);
$id = $user['id'];
$nickname = $user['nickname'];
$level = $user['level'];
$status = $user['status'];
$time = $user['time'];
$fsize = $user['fsize'];
$ip = $user['ip'];
$ua = $user['ua'];
$security = $user['security'];
print '<?xml version="1.0" encoding="utf-8"?><!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"><head><link rel="SHORTCUT ICON" href="/favicon.ico"/>
<title>Pontoff.net '.$ttl.'</title>
<style type="text/css">
body {font-family: arial; font-size: 12px; color: #000000; background-color: #ffffff}
a {color:#2C75B1}
a:visited{color:#2C75B1}
a.white {color:#ffffff}
a.white:visited{color:#ffffff}
a.red {color:#ff0000}
a.red:visited{color:#ff0000}
div {padding: 1px}
div.header { color:white; padding: 0px; background-color: #00B09C; height: 34px; border-bottom: 1px solid #B1CADE}
div.upban { padding: 3px; background-color: #EFF3F6; border-bottom: 1px dotted #AFCDDC}
div.adv { padding: 0px 4px 1px 4px; background-color: #ffffff; border-bottom: 1px dotted #AFCDDC; }
div.body { padding: 3px; background-color: #ffffff; border-bottom: 1px dotted #AFCDDC}
div.downban { padding: 3px; background-color: #EFF3F6; border: dotted 1px #AFCDDC}
div.scroller { padding: 3px; background-color: #EFF3F6; border: dotted 1px #AFCDDC}
div.copyright { padding: 3px; background-color: #73A2C6; border-bottom: 1px dotted #AFCDDC}
div.grey { padding: 1px; background-color: #eeeeee;}
</style>
</head>
<body>
<div class="header" style=""><a href="/"><img src="template/logo_chat.gif" width="120" height="34" border="" alt="" /></a> </div>
<div class="upban"><img src="template/o.gif" alt="" /> Pontoff.net '.$ttl.'</div>
<div class="body">';
?>