Файл: in4at/enter.php
Строк: 270
<?
##################################################################################################
## Script name : In4at ##
## Version : Final ##
## Made by : XPYCT(Сергей Мищенко) ##
## E-mail : bce-ok@bk.ru ##
## ICQ : 447-50-50-62 ##
## Site : http://vkontakte.ru/id31604521 ##
## Внимание! Скрипт распространяется бесплатно! Модификация W4at by XPYCT ##
##################################################################################################
list($msec,$sec)=explode(chr(32),microtime());$HeadTime=$sec+$msec;
define('REQ_2_chat', true);
require('4at_set.php');
require('db_con.php');
require('style.php');
if ($py !== spy_code) require('us_info.php');
function getmicrotime()
{
list($usec, $sec) = explode(" ", microtime());
return ((float)$usec + (float)$sec);
}
if((time()<$row['kik']&&$rm!=9)||(time()<$row['kik']&&$rm==9&&$row['whokik']==$syst)){
echo head;
if ($vv!=0) echo '<div class="d0"><b>Стоп!</b></div>';
else echo "<card id="vypnut" title="Стоп!" ontimer="chat.php?id=$id&ps=$ps&rm=9&ref=$ref"><timer value="300"/><p align="center">";
echo $fsize1;
$tleft = $row['kik'] - time();
$whokik = $row['whokik'];
$whykik = $row['whykik'];
echo $whokik.' выпнул вас из чата. Разбан через '.$tleft.' (сек)<br/>';
echo 'Причина: '.$whykik.'<br/>';
echo $fsize2;
echo foot;
mysql_close($link);
exit;
}
for ($n = 0; $n <= 10; $n++){
$room = 'room'.$n;
$tm = time()-300;
if ($row['level'] < 7){
$r = mysql_query("Select who from $room WHERE id > '".$tm."' and hid != 1 group by who order by id desc;");
} else {
$r = mysql_query("Select who,hid from $room WHERE id > '".$tm."' group by who order by id desc;");
}
$asnum = mysql_affected_rows();
$siz[$n] = $asnum-1;
@$kol = $kol + $asnum-1;
}
for ($n = 11; $n <= 20; $n++){
$room = 'room'.$n;
$tm = time()-300;
if ($row['level'] < 7){
$r = mysql_query("Select who from $room WHERE id > '".$tm."' and hid != 1 group by who order by id desc;");
} else {
$r = mysql_query("Select who,hid from $room WHERE id > '".$tm."' group by who order by id desc;");
}
$asnum = mysql_affected_rows();
$siz[$n] = $asnum-1;
@$kolp = $kolp + $asnum-1;
}
$tm = time()-300;
$r = mysql_query("Select who from maf1 WHERE id > '".$tm."' group by who order by id desc;");
$asnum = mysql_affected_rows();
$maf[1] = $asnum-1;
@$kolal = $kolp + $kol + $maf[1];
$roomselect21 = mysql_query("Select name from rooms where rm=21");
$rooms21 = mysql_fetch_array($roomselect21);
$roomname21=$rooms21['name'];
$r = mysql_query("select count(readd) as num from zapiski WHERE (idtowhom = '".$id."')and(readd = '0')and(ininc = '1');");
$a = mysql_fetch_array($r);
$inb = $a['num'];
/////////////////////////
$q_c = @mysql_query( @"SELECT count(id) FROM users WHERE onl>'".@intval( @time( ) - 300 )."'" );
$c_o = @mysql_fetch_array( @$q_c );
$onl = $c_o['count(id)'];
$data = file( "syst/stats.dat" );
$ex = explode( "|", $data[0] );
$mline = $ex[0] + 0;
if ( $mline < $onl )
{
$fp = fopen( "syst/stats.dat", "wb" );
$mdata = $onl."|".time( );
fputs( $fp, $mdata );
fclose( $fp );
}
///////////////
if ($row['zamen']==1){
function rus_to_en($str){
$str = str_replace('а','a',$str);
$str = str_replace('е','e',$str);
$str = str_replace('ё','e',$str);
$str = str_replace('и','u',$str);
$str = str_replace('к','k',$str);
$str = str_replace('о','o',$str);
$str = str_replace('р','p',$str);
$str = str_replace('с','c',$str);
$str = str_replace('у','y',$str);
$str = str_replace('х','x',$str);
$str = str_replace('А','A',$str);
$str = str_replace('В','B',$str);
$str = str_replace('Е','E',$str);
$str = str_replace('Ё','E',$str);
$str = str_replace('К','K',$str);
$str = str_replace('М','M',$str);
$str = str_replace('Н','H',$str);
$str = str_replace('О','O',$str);
$str = str_replace('Р','P',$str);
$str = str_replace('С','C',$str);
$str = str_replace('Т','T',$str);
$str = str_replace('Х','X',$str);
return $str;
}
ob_start("rus_to_en");}else{ob_start();}
$today = date("H:i");
/*
$today1 = date("H");
$today2 = date("i");
$today_s = 1;
$today1 = $today1 + $today_s;
if ($today1 >= 24) { $today1 = $today1 - 24; }
$today = "$today1:$today2";
*/
echo head;
if ($vv!=0) echo '<div align="center"><div class="d0"><b>Улицa... '.$today.'</b></div>';
else echo '<card id="enter" title="Улицa... '.$today.'"><p align="center">';
echo $fsize1;
$t=date("H");
if($t<=4 || $t>=23){echo "<img src="pict_web.gif" alt=""/><br/>Ночь";}//Ночь
if($t>=5 && $t<=10){echo "<img src="pict_wea__.png" alt=""/><br/>Утро";}//утро
if($t>=11 && $t<=17){echo "<img src="pict_wea.png" alt=""/><br/>День";}//день
if($t>=18 && $t<=22){echo "<img src="pict_wea_.png" alt=""/><br/>Вечер";}//вечер
echo'<br/>';
echo divide;
if ($row['level']>6){
echo '<a href="apanel.php?'.$wp.'">Админка</a><br/>';
echo divide;
}
else if ($row['level']>3){
echo '<a href="mpanel.php?'.$wp.'">Модерка</a><br/>';
echo divide;
}
$pr = mysql_query("select en from setting WHERE klu4=1;");
$enter = mysql_fetch_array($pr);
//$enter['en'] = str_replace("/","<br/>",$enter['en']);
if ($enter["en"]!=''){
if ($vv!=0)echo'<marquee><font color=red>';
echo "".$enter["en"]."";
if ($vv!=0)echo'</font></marquee>';
echo"<br/>---<br/>";}
echo "<a href="faq.php?$wp&mod=pravila">Правила</a><br/>";
$idnews=mysql_fetch_array(mysql_query("SELECT MAX(id) FROM news"));
if ($idnews[0]>0) $news=mysql_fetch_array(mysql_query("SELECT date FROM news where id=$idnews[0]"));
if (isset($news[0])) echo "<a href="news.php?$wp">Hoвocти [".$news[0]."]</a><br/>";
echo'---<br/>';
$q = mysql_query("select id,title from obiav order by id desc;");
while($arr=mysql_fetch_array($q)) {
echo "<a href="view_obiav.php?$wp&mid=".$arr['id']."">".$arr['title']."</a><br/>"; }
$time = getmicrotime();
$tm = time()-300;
mysql_query("Update users set onl='".$time."', room='holl' where id ='".$id."' LIMIT 1;");
if ($row['level'] < 7){
$pr_count = mysql_query("SELECT id FROM users WHERE (onl> '".$tm ."' and room='holl') and (inv != 1)");
} else {
$pr_count = mysql_query("SELECT id FROM users WHERE onl> '".$tm ."' AND room='holl'");
}
$kolpe = mysql_affected_rows();
if ($row['level'] < 7){
$pr_count1 = mysql_query("SELECT id FROM users WHERE (onl> '".$tm ."' and room='f') and (inv != 1)");
} else {
$pr_count1 = mysql_query("SELECT id FROM users WHERE onl> '".$tm ."' AND room='f'");
}
$kolf= mysql_affected_rows();
$kolal=$kolal+$kolpe+$kolf;
$r = mysql_query("select count(readd) as num from zapiski WHERE (idtowhom = '".$id."')and(readd = '0')and(ininc = '1')");
$a = mysql_fetch_array($r);
$inb = $a['num'];
$r2 = mysql_query("select count(klu4) as num from zapiski WHERE (idtowhom = '".$id."')and(ininc = '1')");
$a2 = mysql_fetch_array($r2);
$inball = $a2['num'];
echo divide;
echo '<a href="cabinet.php?'.$wp.'">Личный кaбинeт</a><br/>';
echo "<a href="chatmail.php?$wp">Ваши письма(".$inb."/".$inball.")</a><br/>";
echo "<a href="search.php?$wp">Пoиcк юзеров</a><br/>";
echo '<a href="prwho.php?'.$wp.'">Kтo тут('.$kolpe.')</a><br/>';
echo '<a href="who.php?'.$wp.'">Kтo гдe?('.$kolal.')</a><br/>';
echo divide;
echo "<a href="forum.php?$wp">Форум($kolf)</a><br/>n";
if ($row['ph_e']==1){
echo '<a href="desk.php?'.$wp.'">Доска почета</a><br/>';
$resu = @mysql_query ("Select id,user,votefoto,img from users where img!='' and sex='1' order by votefoto desc limit 1");
$a1 = mysql_fetch_array($resu);
echo '<u>Мистер и Мисс чата:</u><br/>';
$resu = @mysql_query ("Select id,user,votefoto,img from users where img!='' and sex='0' order by votefoto desc limit 1");
$a2 = mysql_fetch_array($resu);
echo "<b>".$a1["user"]."</b> и <b>".$a2["user"]."</b><br/><a href="search.php?nk=".$a1['id']."&$wp&go=view"><img src="scr.php?img=".$a1['img']."&r=50" alt="фото"/></a> <a href="search.php?nk=".$a2['id']."&$wp&go=view"><img src="scr.php?img=".$a2['img']."&r=50" alt="фото"/></a><br/>";
echo divide;}
echo '<u>Сегодня:</u><br/>';
require('prazdn.php');
$curdate=date("d-m-Y");
$curdate2=date("d-m");
$st = mysql_query("select ny from setting WHERE klu4=1;");
$sett = mysql_fetch_array($st);
if ($sett['ny']==1) require("ny.php");
$tm2= date("Y.m.d.");
$vn=mysql_fetch_array(mysql_query ("select count(id) as num from users WHERE visit>'".$tm2."' and room!='' and id > 10 and inv!='1'"));
echo "Посетителей: <a href="statistik.php?$wp&mod=last">".$vn[0]."</a><br/>n";
$newtoday=mysql_fetch_array(mysql_query("SELECT COUNT(id) from users WHERE date = '$curdate'"));
if ($newtoday[0]>0) echo "Новенькиx: <a href="statistik.php?$wp&mod=newtoday">$newtoday[0]</a><br/>";
$d=date("d-m-");
$birth = mysql_fetch_array(mysql_query("Select count(id) from users where birth LIKE '%$d%' and id>10"));
if ($birth[0]>0) echo "Имeнинникoв: <a href="statistik.php?$wp&mod=birthday">".$birth[0]."</a><br/>";
$d=date("d.m.Y");
$svt = mysql_fetch_array(mysql_query("Select count(id) from svadbi where date LIKE '%$d%'"));
if ($svt[0]>0) echo "Свадеб: <a href="zags.php?$wp">".$svt[0]."</a><br/>";
$r = mysql_query("select count(readd) as num from zapiski WHERE (idtowhom = '".$id."')and(readd = '0')and(ininc = '1');");
$a = mysql_fetch_array($r);
$inb = $a['num'];
if ($inb>0)echo 'Hoвыx пиceм: <a href="inbox.php?'.$wp.'">'.$inb.'</a><br/>';
echo divide;
$gallery = mysql_query("select count(id) as num from users where img!=''");
$foto = mysql_fetch_array($gallery);
$kolfoto = $foto['num'];
$photos=mysql_num_rows(mysql_query("select * from photos group by uid;"));
echo '<a href="gallery.php?'.$wp.'">Фoтoгaлepeя('.$kolfoto.'/'.$photos.')</a><br/>';
$cv = mysql_fetch_array(mysql_query("select count(id) as num from votes"));
$votes = $cv['num'];
echo '<a href="votes.php?'.$wp.'">Голосования('.$votes.')</a><br/>';
$bl = mysql_fetch_array(mysql_query("select count(id) as num from blog"));
$blog = $bl['num'];
echo '<a href="blog.php?'.$wp.'">Дневники('.$blog.')</a><br/>';
$svadbi=mysql_fetch_array(mysql_query("select count(id) as num from svadbi"));
echo '<a href="zags.php?'.$wp.'">Свадьбы('.$svadbi[0].')</a><br/>';
$kl = mysql_query ("select count(id) as num from klans WHERE 1;");
$klk = mysql_fetch_array($kl);
$klvs = $klk["num"];
echo "<a href="klans.php?$wp">Кланы($klvs)</a><br/>n";
echo '<a href="shop.php?'.$wp.'">Магазин</a><br/>';
echo '<a href="games/index.php?'.$wp.'">Казино</a><br/>';
echo divide;
$vhod = $row["vhod"];
echo "<a href="maf.php?$wp&rm=1&vhod=$vhod">$roomname21(".$maf[1].")</a><br/>n";
echo '<a href="pos.php?'.$wp.'">Kлyбы('.$kolp.')</a><br/>';
for ($num = 0; $num <= 10; $num++){
$roomselect = mysql_query("Select name from rooms where rm=$num");
$rooms = mysql_fetch_array($roomselect);
$roomname=$rooms['name'];
if ($num==7) {
echo "<a href="secret.php?$wp&rm=$num">$roomname($siz[$num])</a><br/>";
} else if ($num==8) {
echo "<a href="closet.php?$wp&rm=$num">$roomname($siz[$num])</a><br/>";
} else if ($num==9) {
echo "<a href="anlim.php?$wp&rm=$num">$roomname($siz[$num])</a><br/>";
} else if ($num==10) {
echo "<a href="intim.php?$wp&rm=$num">$roomname($siz[$num])</a><br/>";
} else {
echo "<a href="chat.php?$wp&rm=$num&vhod=$vhod">$roomname($siz[$num])</a><br/>";}
}
echo divide;
echo '<a href="faq.php?'.$wp.'">Справка</a><br/>';
echo '<a href="statistik.php?'.$wp.'">Cтaтиcтикa</a><br/>';
/*
echo divide;
echo "<a href="statistik.php?$wp">Cтaтucтuka</a><br/>";
echo "<a href="search.php?$wp">Пouck юзepa</a><br/>";
echo "<a href="searchfr.php?$wp">Пouck дpyзeй</a><br/>";
echo "<a href="searchmod.php?$wp">Пouck мoдepoв</a><br/>";
echo "<a href="sos.php?$wp">Вызов модера</a><br/>";
$f = fopen("syst/kol.dat", "a+");
flock($f,LOCK_EX);
ftruncate($f,0);
fwrite($f, $kolal);
fflush($f);
flock($f,LOCK_UN);
fclose($f);
*/
echo divide;
if ($vv==0) echo "[WML|<a href="cabinet.php?go=style&$wp">HTML</a>]<br/>";
else echo "[<a href="cabinet.php?go=style&$wp">WML</a>|HTML]<br/>";
echo divide;
$content = file("syst/random.txt");
$contentrandom = rand(0, sizeof($content)-1);
$cont = "$content[$contentrandom]";
$advf = file("syst/rand.txt");
$advr = rand(0, sizeof($advf)-1);
$advert = "$advf[$advr]";
echo '© <a href="http://'.site_adr.'">'.site_name.'</a><br/>';
echo '© XPYCT & Templar<br/>';
$setting = mysql_query("Select link1,link2,link3,link1_name,link2_name,link3_name from setting where klu4=1");
$set = mysql_fetch_array($setting);
if($set['link1']) echo '<a href="http://'.$set['link1'].'">'.$set['link1_name'].'</a><br/>';
if($set['link2']) echo '<a href="http://'.$set['link2'].'">'.$set['link2_name'].'</a><br/>';
if($set['link3']) echo '<a href="http://'.$set['link3'].'">'.$set['link3_name'].'</a><br/>';
//echo $cont;
//echo '<a href="http://gigatop.net/in.php?8407"><img src="http://gigatop.net/c.php?8407" alt="GigaTop.Net" /></a><br/>';
//echo '<a href="http://waplog.mobi/from.php?s_id=26021"><img src="http://waplog.mobi/26021.main" alt="waplog.MOBI" /></a><br/>';
//echo '<br/>'.$advert;
echo $fsize2;
if ($vv!=0) echo '</div>';
echo foot;
$alltraf=$row['alltraf'];
$pagesize=round((ob_get_length())/1024,1);
$alltraf=$alltraf+$pagesize;
mysql_query("Update users set alltraf='".$alltraf."', lasttraf='".$pagesize."' where id='".$id."' LIMIT 1;");
mysql_close ($link);
ob_end_flush();
?>