Ситуация такова: хозяин сайта узнал о моём существовании через общих знакомых которым я делал сайты на на движках ВП и Джумла. С кодом я работал в институте лет 15 тому.
Думаю у практикующих людей всё будит быстрее и красивее. Вот код страницы:
<?
ini_set('session.use_cookies', 1);
ini_set('session.use_trans_sid', 1);
ini_set('session.use_only_cookies', 0);
ini_set('zlib.output_compression', 1);
if(!ini_get('zlib.output_compression')) ob_start("ob_gzhandler");
else ob_start();
include "_server_settings.php";
session_start();
?>
<?
function AntiDoubleInsert()
{
if (stristr ($_SERVER["REQUEST_URI"], session_name())!=''){
header("Location: http://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]);
} else
header("Location: http://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]."?".session_name()."=".session_id());
sleep(1);
}
function loged_mysqli_query($q)
{
global $mysqli;
$res = mysqli_query($mysqli, $q);
return $res;
}
function filtFunc($str)
{
if($_SESSION['authorized']!='OK')
return false;
if($_SESSION['suspended']>time())
return false;
if(!isset($_SESSION['tNum']))
$_SESSION['tNum']=0;
if($_SESSION['fNum']>=500)
$_SESSION['fNum']=0;
$tNum = $_SESSION['tNum'];
$tArr = $_SESSION['tArr'];
$tNum++;
$tArr[$tNum]=time();
$thhree=0;
$thirty=0;
for($i=0;$i<50;$i++)
{
if($tArr[$i]>time()-3)$three++;
if($tArr[$i]>time()-60)$thirty++;
}
if($thirty>=30)
{
$_SESSION['suspended']=time()+3800;
@loged_mysqli_query("UPDATE users SET suspended={$_SESSION['suspended']} WHERE id={$_SESSION['id']}");
return false;
}
if($three>=5)
{
$_SESSION['suspended']=time()+300;
@loged_mysqli_query("UPDATE users SET suspended={$_SESSION['suspended']} WHERE id={$_SESSION['id']}");
return false;
}
$_SESSION['tNum'] = $tNum;
$_SESSION['tArr'] = $tArr;
$str = md5($str);
if(!isset($_SESSION['fNum']))
$_SESSION['fNum']=0;
if($_SESSION['fNum']>=15)
$_SESSION['fNum']=0;
$n = $_SESSION['fNum'];
$fArr = $_SESSION['fArr'];
$_SESSION['fNum']++;
for($i=0;$i<500;$i++)
{
if($fArr[$i]==$str) return false;
}
$fArr[$n]=$str;
$_SESSION['fArr'] = $fArr;
return true;
}
function hrefActivate($text) {
$text = preg_replace_callback(
'{
(?:
# ВНИМАНИЕ: \w+ вместо (?:http|ftp) СИЛЬНО ТОРОМОЗИТ!!!
((?:http|ftp|https)://) # протокол с двумя слэшами
| www\. # или просто начинается на www
)
(?> [a-z0-9_-]+ (?>\.[a-z0-9_-]+)* ) # имя хоста
(?: : \d+)? # порт
(?: & | [^[\]&\s\x00»«"<>])* # URI (но БЕЗ кавычек)
(?: # последний символ должен быть...
(?<! [[:punct:]] ) # НЕ пунктуацией
| (?<= & | [-/&+*] ) # но допустимо окончание на -/&+*
)
(?= [^<>]* (?! </a) (?: < | $)) # НЕ внутри тэга
}xis',
"hrefCallback",
$text
);
return $text;
}
function hrefCallback($p) {
$name = $p[0];
$href = (!empty($p[1])? $name : "http://$name");
if (preg_match("{^http://{$_SERVER['SERVER_NAME']}(?::\d+)?(/.+)$}si", $href, $p)) {
if (function_exists($getter='getPageTitleByUri'))
$name = $getter($p[1]);
}
$href = str_replace('"', '&', $href);
if ($name === null) $name = $href;
if(preg_match("/\.jpg/i", $href)==0 && preg_match("/\.gif/i", $href)==0 && preg_match("/\.png/i", $href)==0 && preg_match("/\.jpeg/i", $href)==0)
$html = "<a href=\"$href\" target=\"_blank\">ссылка</a>";
else
$html = " <img src=\"$href \"
onload=\"ResizeBigImage(this, 640);\"
class=cont-img-a/> ";
return $html;
}
function videoCallback($p) {
$code = $p[2];
$html = "<center><object width='480' height='385'><param name='movie' value='http://www.youtube.com/v/{$code}&hl=ru_RU&fs=1?rel=0'></param><param name='allowFullScreen' value='true'></param><param name='allowscriptaccess' value='always'></param><embed src='http://www.youtube.com/v/{$code}&hl=ru_RU&fs=1?rel=0' type='application/x-shockwave-flash' allowscriptaccess='always' allowfullscreen='true' width='480' height='385'></embed></object></center>";
return $html;
}
function videoActivate($text) {
$text = preg_replace_callback(
'/({{{)\s*(\w+[\w-_+&.,#;=]*)\s*(}}})/i',
"videoCallback",
$text
);
return $text;
}
function parseBBCode ($str)
{
$txt = $str;
$txt = str_replace('[p]',' ',$txt);
$txt = str_replace('^',' ',$txt);
$txt = str_replace(chr(10),'<br>',$txt);
$txt = str_replace('','<b>',$txt);
$txt = str_replace('','</b>',$txt);
$txt = str_replace('','<i>',$txt);
$txt = str_replace('','</i>',$txt);
$txt = str_replace('','<u>',$txt);
$txt = str_replace('','</u>',$txt);
$txt = str_replace('','<s>',$txt);
$txt = str_replace('','</s>',$txt);
$txt = str_replace('[sub]','<sub>',$txt);
$txt = str_replace('[/sub]','</sub>',$txt);
$txt = str_replace('[sup]','<sup>',$txt);
$txt = str_replace('[/sup]','</sup>',$txt);
$txt = str_replace('[left]','<div align=left>',$txt);
$txt = str_replace('[/left]','</div>',$txt);
$txt = str_replace('[right]','<div align=right>',$txt);
$txt = str_replace('[/right]','</div>',$txt);
$txt = str_replace('[center]','<div align=center>',$txt);
$txt = str_replace('[/center]','</div>',$txt);
$txt = str_replace('[justify]','<div align=justify>',$txt);
$txt = str_replace('[/justify]','</div>',$txt);
$txt = str_replace('[img]','',$txt);
$txt = str_replace('[/img]','',$txt);
$txt = str_replace('[url]','',$txt);
$txt = str_replace('[/url]','',$txt);
$txt = str_replace('[youtube]','{{{',$txt);
$txt = str_replace('[/youtube]','}}}',$txt);
$txt=htmlentities($txt);
$txt = hrefActivate($txt);
$txt=html_entity_decode($txt);
$txt = videoActivate($txt);
return $txt;
}
function DoubleTag ($one,$teg,$too,$path){
$on = preg_quote ($one,"~");
$to = preg_quote ($too,"~");
$saerch1 = preg_quote ($one,"~") . $teg . preg_quote ($too,"~");
$saerch2 = preg_quote ($one,"~") . "/" . $teg . preg_quote ($too,"~");
$path = preg_replace ("~[ ]+~"," ",$path);
$path = trim ($path);
$path = preg_replace ("~(".$saerch1."[ ]?".$saerch1.")+~", $one.$teg.$too, $path);
$path = preg_replace ("~(".$saerch2."[ ]?".$saerch2.")+~", $one."/".$teg.$too, $path);
$path = preg_replace ("~ˆ([ ]*".$saerch2.")*~","",$path);
$path = preg_replace ("~(".$saerch1."[ ]*)*$~","",$path);
$_search = "~".$saerch1."(.+)".$saerch2."~U";
$search = array ();
if ( preg_match_all ($_search, $path, $array, PREG_PATTERN_ORDER)){
while ( list (, $val) = each ($array[0])){
$content = "~" . preg_quote ($val,"~") . "~U";
if ( @array_search ($content,$search) or $content==$search[0]){ continue; }
$search[] = $content;
$pp = preg_replace ("~".$on."[/]?".$teg.$to."~","",$val);
if ( !preg_match ("~[a-zA-Z0-9а-яА-Я_]~",$pp)){ $pp = " "; }
else { $pp = $one.$teg.$too.$pp.$one."/".$teg.$too; }
$replace[] = $pp;
}
$search[] = "~0~e";
$replace[] = "0";
$path = preg_replace ($search, $replace, $path);
$path = preg_replace ("~[ ]+~"," ",$path);
$path = preg_replace ("~".$on."([/]?)".$teg.$to."[ ]?".$on."\\1".$teg.$to."~s", $one."\\1".$teg.$too, $path);
}
if ( !preg_match ($_search, $path)){ $path = preg_replace ("~".$on."[/]?".$teg.$to."~", '', $path); }
return $path;
}
function normalizeBBtags ($bb_text)
{
$text=$bb_text;
$text = str_replace(chr(10),'[br]',$text);
$bbcode = array('[b]','[i]','[u]','[s]','[sub]','[sup]','[left]','[center]','[right]','[justify]','[img]','[url]','[youtube]');
foreach ($bbcode as $tag) {
$tag = preg_replace('/\[(.+)\]/isU', '$1', $tag);
$text = DoubleTag ('[',$tag,']',$text);
}
$text = str_replace('[br]',chr(10),$text);
return $text;
}
function makePages($act,$cnt,$link,$clr='#DDDDDD')
{
$cnt = ceil($cnt);
if($cnt<=1) return '';
$onpage=12;
$sStart = $act - $onpage/2+1;
if($sStart<1)$sStart=1;
if($sStart+$onpage>$cnt+1)$sStart=$cnt-$onpage+1;
$sFinish = $sStart + $onpage;
if($sStart<1) $sStart=1;
if($sFinish>$cnt)$sFinish=$cnt;
$pages="
<style>
.p_n
{
color:$clr;
}
.p_n_a
{
color:$clr;
text-decoration:none;
font-weight:bold;
}
</style>
<center><p class=cont>
";
for($i=$sStart;$i<=$sFinish;$i++)
{
if($i-1==$act)$pbr = '_a';
else $pbr='';
$pages.=" <a id=a_".(i-1)." class=p_n{$pbr} href=?{$link}&page=".($i-1).">[$i]</a> ";
}
$pages.="</p></center>";
$pages = "
<table cellspacing=0 cellpadding=0 border=0 class=cont-div-t>
<tr>
<td>
<div class=scroll_vleft>
<a class='cont-a' href=?{$link}&page=0> << </a>
</div>
</td>
<td>
<div class=scroll_left>
<a class='cont-a' href=?{$link}&page=".($sStart-$onPage-2)."> < </a>
</div>
</td>
<td align=center>
<div class='cont-div'>
<nobr>$pages</nobr>
</div>
</td>
<td>
<div class=scroll_right>
<a class='cont-a' href=?{$link}&page=".($sFinish+$onPage-1)."> > </a>
</div>
</td>
<td>
<div class=scroll_vright>
<a class='cont-a' href=?{$link}&page=".($cnt-1)."> >> </a>
</div>
</td>
</tr>
</table>
";
return $pages;
}
include 'hidden_adm_page/db.php';
$usr = @mysqli_fetch_array(@loged_mysqli_query("SELECT * FROM USERS WHERE id={$_SESSION['id']}"));
if ($usr['id']=='') $usr['id']=0;
$_SESSION['trezv']=$usr['trezv'];
if (!isset($_SESSION['HTTP_USER_AGENT']))
{
$_SESSION['HTTP_USER_AGENT'] = md5($_SERVER['HTTP_USER_AGENT']);
}
if (!isset($_SESSION['id']))
{
$_SESSION['id']=0;
$_SESSION['nick']='Представься';
} else if ($_SESSION['id']!=0)
{
$_SESSION['nick']=$usr['nick'];
}
if($_REQUEST['todo']=='add_trezv_message')
{
if(isset($_SESSION['captcha_keystring']) && $_SESSION['captcha_keystring'] === $_POST['captcha_keystring'])
$_SESSION['good_capture']='OK';
if ($_SESSION['good_capture']=='OK' || $_SESSION['authorized']=='OK') {
if($_SESSION['authorized']!='OK' && ($_REQUEST['i_name']!='' || $_REQUEST['i_name']!='Представься'))
$_SESSION['nick'] = $_REQUEST['i_name'];
$nick=$_SESSION['nick'];
if ($_SESSION['authorized']!='OK' && ($_REQUEST['i_name']=='Представься' || $_REQUEST['i_name']==''))
$nick="кой-то хуй из тырнета";
$body = htmlspecialchars($_REQUEST['i_body']);
$body = normalizeBBtags($body);
if(strlen($body)>0)
{
if (!isset($_SERVER['HTTP_VIA'])) $via='';
else {
$via=$_SERVER['HTTP_VIA'];
}
if (!isset($_SERVER['HTTP_X_FORWARDED_FOR'])) $fwd='';
else {
$fwd=$_SERVER['HTTP_X_FORWARDED_FOR'];
}
if (!isset($_SESSION['USER_HASH'])) $u_hash='';
else {
$u_hash=$_SESSION['USER_HASH'];
}
if($_SESSION['authorized']=='OK' || $_SESSION['good_capture']=='OK') {
if (!isset($_SESSION['id'])) $user_id=0;
else $user_id = $_SESSION['id'];
loged_mysqli_query("INSERT INTO TREZV_MESSAGES (`id`, `body`, `user_id`, `dt`, `ip`, `u_agent`, `temp_nick`, `HTTP_VIA`,`HTTP_X_FORWARDED_FOR`,`u_hash` ) VALUES (NULL, '$body', '$user_id', CURRENT_TIMESTAMP, '{$_SERVER['REMOTE_ADDR']}', '{$_SESSION['HTTP_USER_AGENT']}', '{$nick}', '{$via}', '{$fwd}', '{$u_hash}');");
unset($_SESSION['good_capture']);
unset($_SESSION['captcha_keystring']);
}
$mob = strpos ($_SERVER['REQUEST_URI'], 'php');
$mob_str = '';
if ($mob !== false) {
$mob_str = substr($_SERVER['REQUEST_URI'], 1, $mob + 2);
}
$ret_uri=$_SERVER['HTTP_HOST']."/".$mob_str."?todo=trezv_messages&page=0"."&".session_name()."=".session_id();
sleep(1);
header("Location: http://".$ret_uri);
}
}
}
if($_REQUEST['todo']=='del_trezv_message')
{
if($_SESSION['rank']>0)
@loged_mysqli_query("DELETE FROM TREZV_MESSAGES WHERE id = {$_REQUEST['cid']}");
}
function ForumTrd()
{
@loged_mysqli_query("DELETE FROM TREZV_MESSAGES WHERE dt<DATE_SUB(CURRENT_TIMESTAMP,INTERVAL 1 month)");
$cnt = @mysqli_fetch_array(@loged_mysqli_query("SELECT count(id) as cnt FROM TREZV_MESSAGES"));
$cnt = ceil(($cnt['cnt'])/25);
$page = $_REQUEST['page']*25;
$pages = makePages($_REQUEST['page'],$cnt,'todo=trezv_messages','#000');
$messages = @loged_mysqli_query("SELECT * FROM TREZV_MESSAGES ORDER BY id DESC LIMIT $page,25");
$html.="
<div class=pages> $pages </div>
";
$html.="
<div class=govori>
Говори:
</div>
<form style='padding:0; margin:0;' id=thread_form method=post>
<input type=hidden name=todo value='add_trezv_message'>";
if ($_SESSION['authorized']!='OK' && $_SESSION['good_capture']!='OK')
{
$html.="<img style='margin-top:11px;' src= kcaptcha/?". session_name()."=".session_id()."><br>
<input onFocus = 'editEnter(this);' onChange='editChange(this);' onBlur='editLeave(this);' type=text style='width:200px;border:0px;margin-top:11px; height:20px;' id=captcha_keystring name=captcha_keystring value='Не зареген? Пиши што видишь'><br><br>";
}
if ($_SESSION['authorized']!='OK')
$html.="<input onFocus = 'editEnter(this);' onChange='editChange(this);' onBlur='editLeave(this);' type=text name = i_name value='{$_SESSION['nick']}' style='border:0;width:784px;';>
<br>";
$html.="<br>
<div class='BB_button'>
<script type='text/javascript'>
showIcons ();
</script>
</div>
<span id='helpbox' style='width:450px; font-size:10px;'>
Быстрое форматирование текста
</span>
<textarea cols=82 rows=6 name=i_body id=bb_text style='width:778px;border:0px;margin-top:12px;'
onselect='storeCaret(this);' onclick='storeCaret(this);'
onkeyup='storeCaret(this);'></textarea>
<span class=gotovo>
<a href=# class=gotovo; onClick='document.getElementById(\"thread_form\").submit();'>
Готово!
</a>
</span>
</form><br><br>";
while($msg = @mysqli_fetch_array($messages))
{
$msg['body'] = normalizeBBtags($msg['body']);
$msg['body'] = parseBBCode($msg['body']);
if ($msg['temp_nick']=='') $msg['temp_nick']='Представься, кой-то хуй из тырнета';
$html.="
<div style=' font-size:12px; border:1px solid #848484; border-bottom:none; color:#eeeeee; padding-left:8px; margin:0px;width:778px;'>
<table width=100% cellspacing=0 cellpadding=0 border=0>
<tr>
<td style='font-size:12px; text-align:left;color:#848484;'>";
if ($msg['user_id']!=0)
$html.="№{$msg['id']} <a style='text-decoration:none; color:#DDD;' href=http://{$_SERVER['HTTP_HOST']}/?todo=show_user&id={$msg['user_id']} target='_blank'><b>{$msg['temp_nick']}</b></a>";
else {
if($_SESSION['rank']>0) {
$list="";
if (strlen($msg['u_hash'])==0) $msg['u_hash'] = "";
if (strlen($msg['u_agent'])==0) $msg['u_agent'] = "";
$temp_nicks=@loged_mysqli_query("SELECT temp_nick FROM TREZV_MESSAGES WHERE u_hash='{$msg['u_hash']}' and u_agent='{$msg['u_agent']}' GROUP BY temp_nick ORDER BY id DESC");
while($temp_nick = @mysqli_fetch_array($temp_nicks))
{
if ($list=='') $list.= "Ники: ".$temp_nick['temp_nick'];
else $list.= ",".$temp_nick['temp_nick'];
}
$html.="
№{$msg['id']} <a style='text-decoration:none; color:#848484;' href=#' title='{$list}'><b>{$msg['temp_nick']}</b></a></p>";
} else
$html.="№{$msg['id']} {$msg['temp_nick']}";
}
$html.="</td>
<td style='font-size:12px; text-align:right;color:#848484;padding-right:12px;'>
{$msg['dt']}
</td>";
if($_SESSION['rank']>0)
{
$html.="
<td style='width:150px; font-size:12px; text-align:right;color:#848484;padding-right:12px;'>
<a style='font-size:12px; text-align:right;color:#848484;text-decoration:none;' href='http://www.seogadget.ru/location?addr={$msg['ip']}' target=_blank title='Узнать месторасположение по IP'>";
if ($msg['HTTP_VIA']!='' || $msg['HTTP_X_FORWARDED_FOR']!='')
$html.="Proxy:{$msg['ip']}";
else
$html.="{$msg['ip']}";
$html.="</a>
</td>
<td style='width:15px; font-size:12px; text-align:right;color:#848484;padding-right:12px;'>
<a style='font-size:12px; text-align:right;color:#848484;text-decoration:none;' href=?todo=del_trezv_message&cid={$msg['id']}>
X
</a>
</td>";
}
$html.="</tr>
</table>
</div>";
$html.="<div style='font-size:12px;border:1px solid #848484; border-bottom:none; font-weight:normal; color:#a0a0a0; padding-left:8px; margin:0px; padding-top:12px; padding-bottom:12px;width:778px;'>
{$msg['body']}
</div>";
}
$html.="
<div style='border:1px solid #848484; color:#a0a0a0; padding-left:8px; margin:0px; width:778px;'>
</div>
";
$html.="
<div class=govori>
Говори:
</div>
<form style='padding:0; margin:0;' id=thread_form method=post>
<input type=hidden name=todo value='add_trezv_message'>";
if ($_SESSION['authorized']!='OK')
{
$html.="<img style='margin-top:11px;' src=kcaptcha/?". session_name()."=".session_id()."><br>
<input onFocus = 'editEnter(this);' onChange='editChange(this);' onBlur='editLeave(this);' type=text style='width:163px;border:0px;margin-top:11px; height:20px;' id=captcha_keystring name=captcha_keystring value='Пиши што видишь'><br><br>";
}
if ($_SESSION['authorized']!='OK')
$html.="<input onFocus = 'editEnter(this);' onChange='editChange(this);' onBlur='editLeave(this);' type=text name = i_name value='{$_SESSION['nick']}' style='border:0;width:784px;';>
<br>";
$html.="<br>
<div class='BB_button'>
<script type='text/javascript'>
showIcons ();
</script>
</div>
<span id='helpbox' style='width:450px; font-size:10px;'>
Быстрое форматирование текста
</span>
<textarea cols=82 rows=6 name=i_body id=bb_text style='width:778px;border:0px;margin-top:12px;'
onselect='storeCaret(this);' onclick='storeCaret(this);'
onkeyup='storeCaret(this);'></textarea>
<span class=gotovo>
<a href=# class=gotovo; onClick='document.getElementById(\"thread_form\").submit();'>
Готово!
</a>
</span>
</form>";
$html.="
<div style='border-bottom:1px solid #848484; width:788px;'>
<div class=pages> $pages </div>
";
return $html;
}
?>
<!DOCTYPE html>
<html>
<head>
<meta charset='utf-8' />
<title>ГРАДУСС — ВЫШЕ! -> Вытрезвитель (вход свободный)</title>
<link rel="stylesheet" href="/style.css" type="text/css" />
<link rel="shortcut icon" href="http://graduss.com/favicon.ico" />
<link rel="stylesheet" href="styles1.css" type="text/css" />
<script type="text/javascript" src="js.js"></script>
<script type="text/javascript" src="addons.js"></script>
<link rel="stylesheet" href="./js/jseditor/bbstyle.css" type="text/css" />
<script type="text/javascript" src="./js/jseditor/blockeditor.js"></script>
<script type="text/javascript" src="./js/ajax/ajax.js"></script>
<style type="text/css">
body
{
background:black;
padding:0 0 10px 0;
margin:0;
font-family:tahoma;
}
{
background:url('/img/trezv_1.jpg');
background-repeat:no-repeat;
margin:0 auto;
margin-bottom:10px;
width:1110px;
position:relative;
}
{
width:778px;
top:640px;
position:relative;
color:white;
margin:0 auto;
mergin-bottom:10px;
min-height:800px;
}
{
position:absolute;
width:384px;
height:203px;
left:313px;
top:49px;
}
{
display:block;
width:384px;
height:203px;
}
</style>
<?
if($_SESSION['trezv']==1)
echo
<<<ENDL
<script type="text/javascript" src="http://graduss.com/sound/script/soundmanager2-nodebug-jsmin.js"></script>
<script type="text/javascript">
function fuck()
{
mySound.play();
setTimeout("document.getElementById('fuckd').style.display='block'",700);
setTimeout("document.getElementById('fuckd').style.display='none'",1700);
setTimeout('fuck()',30000);
}
soundManager.url = '/sound/swf/';
soundManager.onload = function() {
mySound = soundManager.createSound({
id: 'aSound',
url: '/fuck/fuck.mp3'
});
setTimeout('fuck()',7000);
}
</script>
ENDL;
?>
</head>
<body>
<div id='fuckd' style='position:fixed; width:100%; height:100%; display:none;z-index:100'>
<div style='margin:auto auto;z-index:1000; width:436px; height:479px;'>
<img src='/fuck/fuck.jpg'></img>
</div>
</div>
<div id='main'>
<div id='logo'>
<a href='http://www.graduss.com/?main'></a>
</div>
<script type="text/javascript">
var u_prop = GetNavigatorProp();
var u_screen = GetNavigatorScreen();
var u_plugins = GetNavigatorPlugins();
if (! u_plugins) u_plugins='IE';
var u_tz = GetNavigatorTimezone();
getUserData('/ajax.php/?u_screen='+u_screen+'&u_prop='+u_prop+'&u_plugins='+u_plugins+'&u_tz='+u_tz, 'u_data');
</script>
<div id='cont'>
<? echo ForumTrd();?>
<br><br>
<center>
<table border='0' cellpadding='0' cellspacing='0' width='900' style='padding-top:23px;'>
<tr>
<td width=530 style='padding-top:2px;'>
<table border=0 width=100% cellpadding=3 cellspacing=0 valign=middle align=center>
<tr>
<td bgcolor=
<p style='text-align:left;color:#000000;padding:0;margin:0;font-family:tahoma;font-size:11px;font-weight:bold;margin-left:8px;'>
Вытрезвляются:
<?
$html='';
$users = @loged_mysqli_query("SELECT * FROM USERS WHERE trezv=1");
$comma='';
$usr='';
while($user=@mysqli_fetch_array($users))
{
$usr.=$comma."<a style='color:#000000;' href=http://{$_SERVER['HTTP_HOST']}/?todo=show_user&id={$user['id']}>".$user['nick'].'</a>';
$comma=' ,';
}
$records = @mysqli_fetch_array(@loged_mysqli_query("SELECT * FROM RECORDS WHERE ID=1"));
if($cnt['cnt']+$cnt2['cnt'] > $records['all']) @loged_mysqli_query("UPDATE RECORDS SET `all`=".($cnt['cnt']+$cnt2['cnt'])." WHERE id = 1");
if($cnt['cnt'] > $records['guests']) @loged_mysqli_query("UPDATE RECORDS SET guests=".$cnt['cnt']." WHERE id = 1");
if($cnt2['cnt'] > $records['users']) @loged_mysqli_query("UPDATE RECORDS SET users=".$cnt2['cnt']." WHERE id = 1");
echo $html;
?>
<br>
</p>
<p style='text-align:left;color:#000000;padding:0;margin:0;font-family:tahoma;font-size:11px;margin-left:8px;margin-bottom:2px;'>
<? echo $usr;?>
</p>
</td>
</tr>
</table>
</td>
<td width=210>
<!-- HotLog -->
<script type="text/javascript" language="javascript">
hotlog_js="1.0"; hotlog_r=""+Math.random()+"&s=2007124&im=134&r="+
escape(document.referrer)+"&pg="+escape(window.location.href);
document.cookie="hotlog=1; path=/"; hotlog_r+="&c="+(document.cookie?"Y":"N");
</script>
<script type="text/javascript" language="javascript1.1">
hotlog_js="1.1"; hotlog_r+="&j="+(navigator.javaEnabled()?"Y":"N");
</script>
<script type="text/javascript" language="javascript1.2">
hotlog_js="1.2"; hotlog_r+="&wh="+screen.width+"x"+screen.height+"&px="+
(((navigator.appName.substring(0,3)=="Mic"))?screen.colorDepth:screen.pixelDepth);
</script>
<script type="text/javascript" language="javascript1.3">
hotlog_js="1.3";
</script>
<script type="text/javascript" language="javascript">
hotlog_r+="&js="+hotlog_js;
document.write('<a href="http://click.hotlog.ru/?2007124" target="_top"><img '+
'src="http://hit32.hotlog.ru/cgi-bin/hotlog/count?'+
hotlog_r+'" border="0" width="88" height="31" alt="HotLog"><\/a>');
</script>
<noscript>
<a href="http://click.hotlog.ru/?2007124" target="_top"><img
src="http://hit32.hotlog.ru/cgi-bin/hotlog/count?s=2007124&im=134" border="0"
width="88" height="31" alt="HotLog"></img></a>
</noscript>
<!-- /HotLog -->
<!-- ---------------------------------------------- -->
<!--Rating@Mail.ru counter-->
<script language="javascript"><!--
d=document;var a='';a+=';r='+escape(d.referrer);js=10;
<script language="javascript1.1"><!--
a+=';j='+navigator.javaEnabled();js=11;
<script language="javascript1.2"><!--
s=screen;a+=';s='+s.width+'*'+s.height;
a+=';d='+(s.colorDepth?s.colorDepth:s.pixelDepth);js=12;
<script language="javascript1.3"><!--
js=13;
d.write('<a href="http://top.mail.ru/jump?from=1708069" target="_top">'+
'<img src="http://d0.c1.ba.a1.top.mail.ru/counter?id=1708069;t=55;js='+js+
a+';rand='+Math.random()+'" alt="Рейтинг@Mail.ru" border="0" '+
'height="31" width="88"><\/a>');if(11<js)d.write('<'+'!-- ');
<noscript><a target="_top" href="http://top.mail.ru/jump?from=1708069">
<img src="http://d0.c1.ba.a1.top.mail.ru/counter?js=na;id=1708069;t=55"
height="31" width="88" border="0" alt="Рейтинг@Mail.ru"></a></noscript>
<script language="javascript" type="text/javascript"><!--
if(11<js)d.write('--'+'>');
<!--
<!-- ---------------------------------------------- -->
</td>
</tr>
</table>
<div class=Copyright>
<p class=Copyright>
Copyright © 2009-<? echo date('Y'); ?>, graduss.com ° <span class=Copyright><a class=Copyright href=mailto:graduss@graduss.com>Написать нам письмо</a></span> ° Дизайн от — <span class=Copyright>korova007</span> ° Техподдержка — <span class=Copyright><a href=mailto:syshell@mail.ru class=Copyright>Лесгустой</a></span> ° Site <a href=mailto:sgoldenshluger@mail.ru class=Copyright>by Stan</a></p>
</div>
</center>
<br>
</div>
</div>
</body>
</html>
<?
ob_end_flush();
?>