Файл: enter.php
Строк: 256
<?php
ini_set('display_errors', 'off');
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");
print '<?xml version="1.0" encoding="UTF-8"?>';
print "<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8">";
print "<title>Прихожая</title><link rel="StyleSheet" type="text/css" href="style/0".$s.".css"></head><body><div align="center">";
include "./ini.php";
mysql_query ("select * from bannedib WHERE ci='$ci' AND (ip = '".htmlspecialchars(getenv(REMOTE_ADDR))."')and(browser = '".htmlspecialchars(getenv(HTTP_USER_AGENT))."')");
if(mysql_affected_rows()!=0){include "b.php";}
if(!empty($login))
$q = @mysql_query("select `id` from `".$px.$utable."` where `login`='".$login."' and ci= '".$ci."';");
$real_stri = "aHR0cDovL3Ryb2ZpbW92LmNvbS5ydS93YXAv";
$news_cop = base64_decode($real_stri);
if(empty($id)) {
$data = @mysql_fetch_array($q);
$id = htmlspecialchars($data['id'], ENT_QUOTES);
}
$login = autorize();
if($login) {
if(!$login['ip']) { @mysql_query("update `".$px.$utable."` set `ip`='".htmlspecialchars(getenv(REMOTE_ADDR))."' where `id`='".$id."' and ci= '".$ci."';"); }
if(!$login['soft']) { @mysql_query("update `".$px.$utable."` set `soft`='".htmlspecialchars(getenv(HTTP_USER_AGENT))."' where `id`='".$id."' and ci= '".$ci."';"); }
if($login['fsize'] == "small") { $fsize1 = ""; $fsize2 = ""; }
elseif($login['fsize'] == "big") { $fsize1 = "<big>"; $fsize2 = "</big>"; }
else { $fsize1 = ""; $fsize2 = ""; }
print $fsize1;
ustatus();
@mysql_query("update `".$px.$utable."` set `ltime`='".time()."', `room`='$room' where `id`='".$id."' and `ci`= '".$ci."';");
$q_letters_in = @mysql_query("select count(*) from `".$px.$ltable."` where `to_user`='".$login['login']."' and `new`=1 and `ci`= '".$ci."';");
$num_in=@mysql_fetch_array($q_letters_in);
$q_letters_in_all = @mysql_query("select count(*) from `".$px.$ltable."` where `to_user`='".$login['login']."' and `ci`= '".$ci."'");
$num_in_all=@mysql_fetch_array($q_letters_in_all);
print "<div style="text-align: center"><div class="contur_rek"><div class="header_rek">";
print "Прихожая</div></div>";
print "<div style="text-align: left"><div class="contur"><div class="header">";
if($login['admin']) print "<a href="./newserv.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['newserv']."</a>[<small>Видит только администрация</small>]<br/>";
if($login['admin']) print "<a href="./admin.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['admining']."</a></br>";
if($login['moder']) print "<a href="./moder.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['modering']."</a>";
print "</div></div></div>";
$q_num_news = @mysql_query("select count(*) from `chat_news` where 1 and ci= '".$ci."'");
$num_news=@mysql_fetch_array($q_num_news);
///////////////////////////////////////////////////////
$q_num_meets = @mysql_query("select count(*) from `".$px.$meettable."` where 1 and `ci`= '".$ci."'");
$num_meets=@mysql_fetch_array($q_num_meets);
print "<div style="text-align: left"><div class="contur"><div class="header">
<a href="./news.php?s=$s&ci=$ci&id=$id&pass=$pass"><b>→ Новости(".$num_news['count(*)'].")</b></a></b><br/>
<a href="./letters/index.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['letters']."(".$num_in['count(*)']."/".$num_in_all['count(*)'].")</a><br/>
<a href="./meets.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['meets']."(".$num_meets['count(*)'].")</a><br/>
<a href="./search.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['search']."</a><br/>
<a href="./online.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['who_online']."</a></div></div></div>";
$q = @mysql_query("select `var`,`val1` from `".$px.$stable."` where `mod`='room' and `ci`='".$ci."' order by val3;");
print "<div style="text-align: left"><div class="contur"><div class="header"><div class="xakep"><a href="kosti.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['game']."
</a><br/></div></div></div><div style="text-align: left"><div class="contur"><div class="header">";
while($droom = @mysql_fetch_array($q)) {
$q_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE `ltime`>'".intval(time()-$offline)."' AND `room`='".$droom['var']."' and `ci`= '".$ci."';");
$dcount = @mysql_fetch_array($q_count);
print "<a href="room.php?s=$s&ci=$ci&id=$id&pass=$pass&room=".$droom['var']."">→ ".$droom['val1']."(".$dcount['count(*)'].")</a><br/>";
}
$q_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE `ltime`>'".intval(time()-$offline)."' and ci='".$ci."' AND `room`='intim';");
$dcount = @mysql_fetch_array($q_count);
print "<a href="intim.php?s=$s&ci=".$ci."&id=".$id."&pass=".$pass.""><b>→ Интим</b>(".$dcount['count(*)'].")</a><br/>";
$u_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE `ltime`>'".intval(time()-$offline)."' and ci='".$ci."' AND `room`='unlim';");
$ucount = @mysql_fetch_array($u_count);
print "<a href="unl.php?s=$s&ci=$ci&id=$id&pass=$pass">→ Сортир(".$ucount['count(*)'].")</a></div></div></div>";
print "<div style="text-align: left"><div class="contur"><div class="header">
<a href="./statistic.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['stats']."</a><br/>
<a href="./help.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['help']."</a><br/>";
if($login['admin'])print "<a href="./helpa.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['help']."</a></a><small>[админам]</small><br/>";
print "<a href="./ignor.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['ignor']."</a><br/>
<a href="./setup.php?s=$s&ci=$ci&id=$id&id=$id&pass=$pass">→ ".$lang['settings']."</a><br/>
<a href="./profile.php?s=$s&ci=$ci&id=$id&pass=$pass">→ ".$lang['profile'] ."</a></div></div></div>";
$sc=mysql_query("select * from cusers where `ci`='".$ci."';");
$ch = @mysql_fetch_array($sc);
$topic=htmlspecialchars($ch['topic'], ENT_QUOTES);
$name=htmlspecialchars($ch['name'], ENT_QUOTES);
$link=htmlspecialchars($ch['link'], ENT_QUOTES);
print "<center><form method="GET" action="enter.php"><input type="hidden" /><p><label>Скин:<select class="do_button" name="s">
<option value="5">1</option>
<option value="2">2</option>
<option value="3">3</option>
<option value="4">4</option>
<option value="1">5</option>
<option value="6">6</option>
<option value="7">7</option>
</select>
</label>
<input type="hidden" name="ci" value="$ci"/>
<input type="hidden" name="id" value="$id"/>
<input type="hidden" name="pass" value="$pass"/>
<br/><input type="submit" class="button" value="Сменить"/></p></form>";
print "<a href="wml/enter.php?ci=$ci&id=$id&pass=$pass">wml</a>|html</br>";
print "<center><a href="".$ch['link']."">Главная</a><br/><br/>";
$pr_count = @mysql_query("SELECT count(*) FROM `".$px.$utable."` WHERE ltime>'".intval(time()-$offline)."' AND room='$room' and `ci`='".$ci."';");
$pdc = @mysql_fetch_array($pr_count);
print "<center><span style="color:#7FFFD4; text-decoration: underline"><tt>".$lang['people_in_holl'].": ".$pdc['count(*)']."</tt></span>";
print "<div class="contur_rek"><div class="header_rek"><a href="".$glav."">".$nameglav."</a></div></div>";
print $fsize2;
} else { print "<small>Ошибка авторизации!</div><br/> ";
header ("Location: index.php?ci=".$ci."");
print "<div class="contur_rek"><div class="header_rek"><a href="".$glav."">".$nameglav."</a></div></div>";
}
print "</div></body></html>";
@mysql_close();
?>