Файл: world-faces.ru/world-faces.ru/main.php
Строк: 498
<?
include_once 'i.php';
pdo();
only_reg();
$id = (isset($_GET['id'])) ? $_GET['id'] : NULL;
$u = (isset($_GET['u'])) ? $_GET['u'] : NULL;
if (!isset($us) && !isset($id)){header("Location: /index.php?".SID);exit;}
if (isset($us))$al['id']=$us['id'];
if (isset($id))$al['id']=intval($id);
else
if (isset($u)){
$arr['nick']=$u;
$nick=mysql_real_escape_string($arr['nick']);
$res=DB::$dbs->query("SELECT `id` FROM `user` WHERE `nick`= ?",array($nick));
if(count($res)>0)
{
$row=$res -> Fetch();
$al['id']=$row['id'];
}else{
$al['id'] = 0;
}
}else{
if (isset($u))$arr['nick']=$u;
$nick=chck($arr['nick']);
$res=DB::$dbs->query("SELECT id FROM user WHERE nick= ?",array($nick));
if($row=$res->Fetch())$al['id']=$row['id'];
}
if (DB::$dbs->querySingle("SELECT COUNT(*) FROM `user` WHERE `id` = ? LIMIT 1",array($al['id']))==0){header("Location: /index.php?".SID);exit;}
$al=DB::$dbs->queryFetch("SELECT * FROM `user` WHERE `id` = ? LIMIT 1",array($al['id']));
if ( isset( $_GET['rating'] ) && $_GET['rating'] >= 1 && $_GET['rating'] <= 5 ){
if ( isset( $access['user_voice'] ) && $us['id'] != $al['id'] && $us['balls'] >= 50 && $us['rating'] >= 0 && DB::$dbs->querySingle( "SELECT COUNT(*) FROM `user_voice` WHERE `id_user` = ? AND `id_kont` = ?",array($us['id'],$al['id'])) == 0 )
{
$ratsun = intval($_GET['rating']);
DB::$dbs->query("INSERT INTO `my_rating` SET `id_user`=?, `id_ank`=?, `rat`=?, `time`=?",array($al['id'], $us['id'], $ratsun, $time));
$msgrat="[b]$us[nick][/b] Проголосовал за вашу страничку! Оценка на +$ratsun";
DB::$dbs->query("INSERT INTO `jurnal` SET `id_user`=?, `id_kont`=?, `msg`=?, `time`=?",array(0, $al['id'], $msgrat, $time));
$timer = intval($_SERVER['REQUEST_TIME']);
$msb='[b][url=/'.$us['id'].']'.$us['nick'].'[/url][/b] оценил'.($user['pol']==0?'а':'').' [url=/my_rating.php]вашу анкету[/url] на [b]<font color="red">+'.$ratsun.'</font>[/b]!';
DB::$dbs->query("INSERT INTO `op` SET `id_us` = ?,`msg` = ?,`type` = ?,`time` = ?",array($al['id'], $msb, 3,$timer));
DB::$dbs->query("UPDATE `user` SET `rating` = `rating`+ ? WHERE `id` = ? LIMIT 1",array($ratsun,$al['id']));
DB::$dbs->query("INSERT INTO `user_voice` SET `id_user`=?, `id_kont`=?",array($us['id'], $al['id']));
echo'<div class="phpmenu">Вы оценили '.$al['nick'].' на +'.$ratsun.'!</div>';
$al=DB::$dbs->queryFetch("SELECT * FROM `user` WHERE `id` = ? LIMIT 1",array($al['id']));
}else echo'Что бы получить возможность голосовать, вам нужно набрать 50 баллов Или же вы уже голосовали за этого человека!';
}
if (isset($us) && $us['id']!=$al['id']){
$timer = intval($_SERVER['REQUEST_TIME']);
DB::$dbs->query("INSERT INTO `p_g` SET `id_user` = ?, `id_guest` = ?, `time` = ?,`unread` = ?",array($al['id'], $us['id'], $timer,1));
}
$set['title']=''.$al['nick'].'';
verh();
echo '<a href="main.php?id='.$al['id'].'&zoom">';
avatar($al['id']);
echo'</a>';
if ($al['ank_name']!=NULL){echo "<img src='img/tabor/imya.png'> $al[ank_name] ($al[nick])n";}else{echo "<img src='img/tabor/imya.png'> $al[nick]n";}
echo '<a href="main.php?id='.$al['id'].'&online">';
if (DB::$dbs->querySingle("SELECT COUNT(*) FROM `user` WHERE `id` = ? AND `date_last` > '".(time()-2500)."' LIMIT 1",array($al['id']))==1){
echo "<img src='img/olorg.gif' alt='on' class='icon'/><br />n";
}else{
echo "<img src='img/ofl.gif' alt='off' class='icon'/><br />n";
}
echo'</a>';
include 'incl/zod.php';
if ($us['id']==$al['id']){
echo "<img src='img/tabor/posl.png'>n";
echo '<a href="main.php?id='.$al['id'].'&settings">Кабинет</a> | <a href="ank.php?id='.$al['id'].'">Анкета</a><br />';
}else{
echo "<img src='img/tabor/posl.png'>n";
echo '<a href="ank.php?id='.$al['id'].'">'.(($al['pol']==1)?'Его':'Её').' анкета</a><br />';
}
if($us['level_access']>=150){
$invite = DB::$dbs->queryFetch("SELECT * FROM `refer` where `who` = ? limit 1",array($al['id']));
$people = DB::$dbs->queryFetch("SELECT * FROM `user` where `id` = ? limit 1",array($invite['us']));
if(!empty($people['nick'])){
echo'<div class="prof">Пригласил'.(($people['pol']==0)?'а':'').' <b><a href="/'.$people['id'].'">'.$people['nick'].'</a></b></div>';
}
}
$settings = (isset($_GET['settings'])) ? htmlspecialchars(mysql_real_escape_string(trim($_GET['settings']))) : NULL;
if (isset($settings)){
include 'incl/settings.php';
}else{
include 'incl/status.php';
$zoom = (isset($_GET['zoom'])) ? htmlspecialchars(mysql_real_escape_string(trim($_GET['zoom']))) : NULL;
if(isset($zoom)){
echo'<hr>';
echo '<form action="main.php?id='.$al['id'].'&zooms" method="post" name="form" enctype="multipart/form-data">';
echo 'Ширина:<br/>';
echo "<form><textarea rows='1' cols='6' name='width' maxlength='12'></textarea></br>";
echo 'Высота: <br/>';
echo "<form><textarea rows='1' cols='6' name='height' maxlength='3'></textarea></br>";
echo '<input type="submit" value="Показать по размерам" />';
echo '</form>';
echo '<a href="main.php?id='.$al['id'].'&original"><input type="submit" value="Показать оригинал" /></a>';
echo '<div class="prof"><img src="img/guest.png" alt="" align="middle"><a href="main.php?id='.$al['id'].'"> <big>Скрыть меню</a></big> </div>';
echo'<hr>';
}
$original = (isset($_GET['original'])) ? htmlspecialchars(mysql_real_escape_string(trim($_GET['original']))) : NULL;
if (isset($original)){
echo'<hr>';
if (is_file(H."files/avatar/$al[id].gif"))
echo "<p><img src='/files/avatar/$al[id].gif' alt=''/> /></p>n";
elseif (is_file(H."files/avatar/$al[id].jpg"))
echo "<p><img src='/files/avatar/$al[id].jpg' alt='' /></p>n";
elseif (is_file(H."files/avatar/$al[id].png"))
echo "<p><img src='/files/avatar/$al[id].png' alt='' /></p>n";
else
echo "<img src='/img/user.jpg' alt='' />n";
if ($_SERVER['PHP_SELF']=='/main.php' && (is_file(H."files/avatar/$al[id].gif") || is_file(H."files/avatar/$al[id].jpg") || is_file(H."files/avatar/$al[id].png")));
if (isset($us) && isset($access['user_voice']) && $us['id']!=$al['id'] && $us['balls']>=0 && $us['rating']>=0 && mysql_result(mysql_query("SELECT COUNT(*) FROM `user_voice` WHERE `id_user` = '$us[id]' AND `id_kont` = '$al[id]'"), 0)==0){
echo "<div class='prof'>Проголосовать за страничку:</br>";
echo "<a href="/main.php?id=$al[id]&rating=1" title="+1"><img src='/img/1+.gif' alt='' class='icon'/>+1</a>|";
echo "<a href="/main.php?id=$al[id]&rating=2" title="+2"><img src='/img/2+.gif' alt='' class='icon'/>+2</a>|";
echo "<a href="/main.php?id=$al[id]&rating=3" title="+3"><img src='/img/3+.gif' alt='' class='icon'/>+3</a>|";
echo "<a href="/main.php?id=$al[id]&rating=4" title="+4"><img src='/img/4+.gif' alt='' class='icon'/>+4</a>|";
echo "<a href="/main.php?id=$al[id]&rating=5" title="+5"><img src='/img/5+.gif' alt='' class='icon'/>+5</a></div>";
}
echo '<div class="prof"><img src="img/guest.png" alt="" align="middle"><a href="main.php?id='.$al['id'].'"> <big>Скрыть меню</a></big> </div>';
echo'<hr>';
}
$zooms = (isset($_GET['zooms'])) ? htmlspecialchars(mysql_real_escape_string(trim($_GET['zooms']))) : NULL;
if (isset($zooms)){
echo'<hr>';
$width=intval($_POST['width']);
$height=intval($_POST['height']);
if (is_file(H."files/avatar/$al[id].gif"))
echo "<img src='/files/avatar/$al[id].gif' alt='' width='$width' height='$height' alt=''/> />n";
elseif (is_file(H."files/avatar/$al[id].jpg"))
echo "<img src='/files/avatar/$al[id].jpg' alt='' width='$width' height='$height' />n";
elseif (is_file(H."files/avatar/$al[id].png"))
echo "<img src='/files/avatar/$al[id].png' alt='' width='$width' height='$height' />n";
else
echo "<img src='/img/user.jpg' alt='' align='left'/>n";
if ($_SERVER['PHP_SELF']=='/main.php' && (is_file(H."files/avatar/$id.gif") || is_file(H."files/avatar/$id.jpg") || is_file(H."files/avatar/$id.png")));
if (isset($us) && isset($access['user_voice']) && $us['id']!=$al['id'] && $us['balls']>=0 && $us['rating']>=0 && DB::$dbs->querySingle("SELECT COUNT(*) FROM `user_voice` WHERE `id_user` = ? AND `id_kont` = ?",array($us['id'],$al['id']))==0){
echo "<div class='prof'>Проголосовать за страничку:</br>";
echo "<a href="/main.php?id=$al[id]&rating=1" title="+1"><img src='/img/1+.gif' alt='' class='icon'/>+1</a>|";
echo "<a href="/main.php?id=$al[id]&rating=2" title="+2"><img src='/img/2+.gif' alt='' class='icon'/>+2</a>|";
echo "<a href="/main.php?id=$al[id]&rating=3" title="+3"><img src='/img/3+.gif' alt='' class='icon'/>+3</a>|";
echo "<a href="/main.php?id=$al[id]&rating=4" title="+4"><img src='/img/4+.gif' alt='' class='icon'/>+4</a>|";
echo "<a href="/main.php?id=$al[id]&rating=5" title="+5"><img src='/img/5+.gif' alt='' class='icon'/>+5</a></div>";
}
echo '<div class="prof"><img src="img/guest.png" alt="" align="middle"><a href="main.php?id='.$al['id'].'"> <big>Скрыть меню</a></big> </div>';
echo'<hr>';
}
$online = (isset($_GET['online'])) ? htmlspecialchars(mysql_real_escape_string(trim($_GET['online']))) : NULL;
if (isset($online)){
echo "<img src='img/tabor/posl.png'>n";
echo "Посл. посещение: ".vremja($al['date_last'])."<br />n";
echo "<img src='img/tabor/regs.png'>n";
echo "Регистрация: ".vremja($al['date_reg'])."<br />n";
$timediff=DB::$dbs->querySingle("SELECT `time` FROM `user` WHERE `id` = ? LIMIT 1",array($al['id']));
$oneMinute=60;
$oneHour=60*60;
$oneDay=60*60*24;
$dayfield=floor($timediff/$oneDay);
$hourfield=floor(($timediff-$dayfield*$oneDay)/$oneHour);
$minutefield=floor(($timediff-$dayfield*$oneDay-$hourfield*$oneHour)/$oneMinute);
$secondfield=floor(($timediff-$dayfield*$oneDay-$hourfield*$oneHour-$minutefield*$oneMinute));
$sDaysLeft=$dayfield;
$sDaysText = "дней";
$nDaysLeftLength =strlen($sDaysLeft);
$d_1=substr($sDaysLeft,-1,1);
if (substr($sDaysLeft,-2,1) != 1 && $nDaysLeftLength>1)
{
if ($d_1 == 2 || $d_1== 3 || $d_1== 4)
{
$sDaysText = "дня";
}
elseif ($d_1== 1)
{
$sDaysText = "день";
}
}
if ($nDaysLeftLength==1)
{
if ($d_1==2 || $d_1== 3 || $d_1== 4)
{
$sDaysText = "дня";
}
elseif ($d_1== 1)
{
$sDaysText = "день";
}
}
$sHoursLeft=$hourfield;
$sHoursText = "часов";
$nHoursLeftLength = strlen($sHoursLeft);
$h_1=substr($sHoursLeft,-1,1);
if (substr($sHoursLeft,-2,1) != 1 && $nHoursLeftLength>1)
{
if ($h_1== 2 || $h_1== 3 || $h_1== 4)
{
$sHoursText = "часа";
}
elseif ($h_1== 1)
{
$sHoursText = "час";
}
}
if ($nHoursLeftLength==1)
{
if ($h_1== 2 || $h_1== 3 || $h_1== 4)
{
$sHoursText = "часа";
}
elseif ($h_1== 1)
{
$sHoursText = "час";
}
}
$sMinsLeft =$minutefield;
$sMinsText = "минут";
$nMinsLeftLength = strlen($sMinsLeft);
$m_1=substr($sMinsLeft,-1,1);
if ($nMinsLeftLength>1 && substr($sMinsLeft,-2,1) != 1)
{
if ($m_1== 2 || $m_1== 3 || $m_1== 4)
{
$sMinsText = "минуты";
}
else if ($m_1== 1)
{
$sMinsText = "минута";
}
}
if ($nMinsLeftLength==1)
{
if ($m_1== 2 || $m_1==3 || $m_1== 4)
{
$sMinsText = "минуты";
}
elseif ($m_1== "1")
{
$sMinsText = "минута";
}
}
$sSecsLeft = $secondfield;
$sSecsText = "секунд";
$s_1=substr($sSecsLeft,-1,1);
$nSecsLeftLength = strlen($sSecsLeft);
if (substr($sSecsLeft,-2,1)!= 1 && $nSecsLeftLength>1)
{
if ($s_1== 2 || $s_1== 3 || $s_1== 4)
{
$sSecsText = "секунды";
}
elseif ($s_1== 1)
{
$sSecsText = "секунда";
}
}
if ($nSecsLeftLength==1)
{
if ($s_1== 2 || $s_1== 3 || $s_1== 4)
{
$sSecsText = "секунды";
}
elseif ($sSecsLeft== "1")
{
$sSecsText = "секунда";
}
} $displaystring="".
$sDaysLeft." ".
$sDaysText." ".
$sHoursLeft." ".
$sHoursText." ".
$sMinsLeft." ".
$sMinsText." ".
$sSecsLeft." ".
$sSecsText;
echo "<img src='img/tabor/nasait.png'>n";
echo "На сайте провел: $displaystring<br />n";
$perehodu=DB::$dbs->querySingle("SELECT `perehodu` FROM `user` WHERE `id` = ? LIMIT 1",array($al['id']));
echo "<img src='img/tabor/perehod.png'>n";
echo 'Переходов по сайту: '.$perehodu.'<br />';
$kule1=DB::$dbs->querySingle("SELECT COUNT(*) FROM `duels` WHERE `idur` = ? AND `kolur` > `koler` AND `act` = ?",array($al['id'],2)); $kule2=DB::$dbs->querySingle("SELECT
COUNT(*) FROM `duels` WHERE `ider` = ? AND `koler` > `kolur` AND `act` = ?",array($al['id'],2)); $obshij = ($kule1+$kule2); echo "n";
echo "<img src='/img/tabor/vigr.png' alt='' class='icon'/>n";
echo "Выигранных дуэлей:n";echo"<font color='#FF0000'>$obshij</font><br/>";
$kuleq1=DB::$dbs->querySingle("SELECT COUNT(*) FROM `duels`
WHERE `idur` = ? AND `kolur` < `koler` AND `act` = ?",array($al['id'],2)); $kuleq2=DB::$dbs->querySingle("SELECT COUNT(*) FROM `duels` WHERE `ider` = ? AND `koler` < `kolur`
AND `act` = ?",array($al['id'],2)); $obshijq = ($kuleq1+$kuleq2); echo "n";
echo "<img src='/img/tabor/progr.png' alt='' class='icon'/>n";
echo "Проигранных дуэлей:n";echo"<font color='#FF0000'>$obshijq</font><br/>";
}
if($us['id']==$al['id']){
$new=DB::$dbs->query("SELECT * FROM `news` ORDER BY time DESC LIMIT 1");
while ($news = $new -> Fetch())
{
echo '<div class="phpmenu"><b>('.vremja($news['time']).'):</b> '.substr($news['msg'],0,400).'<a href="/news">...</a> <br/><a href="/news/komm.php?id='.$news['id'].'">Комментарии ('.DB::$dbs->querySingle("SELECT COUNT(*) FROM `news_komm` WHERE `id_news` = ? LIMIT 1",array($news['id'])).')</a> | <a href="news">>></a></div>';
}}
include_once 'incl/friend_act.php';
if ($user['id']!==$al['id']){
echo'<div class="prof">';
echo '<a href="msg'.$al['id'].'"><img src="img/mail.png" alt="ico"></a> ';
if (isset($us) && $us['id']!=$al['id'] && mysql_result($d1sql, 0)==0 && mysql_result($d2sql, 0)==0) {
if (isset($us) && $us['id']!=$al['id'])echo ' <a href="main.php?id='.$al['id'].'&friend=ok"><img src="img/add_user.png" alt="ico"></a> ';
}else{
if (isset($us) && $us['id']!=$al['id']) echo '<a href="main.php?id='.$al['id'].'&friend=delete"><img src="img/delete_user.png" alt="ico"></a> ';
}
echo ' <a href="money/gifts.php?pod=1&ud='.$al['id'].'"><img src="img/present.png" alt="ico"></a> ';
echo ' <a href="actions.php?uid='.$al['id'].'"><img src="img/green.png" alt="ico"></a>';
echo'</div><hr>';
}
$menu = (isset($_GET['menu'])) ? htmlspecialchars(mysql_real_escape_string(trim($_GET['menu']))) : NULL;
if(isset($menu)){
include 'incl/menu.php';
}else{
$f_onl = DB::$dbs->querySingle("SELECT COUNT(*) FROM `frends` INNER JOIN `user` ON `frends`.`frend`=`user`.`id` WHERE `frends`.`user` = ? AND `frends`.`i` = ? AND `user`.`date_last`>'".(time()-600)."'",array($al['id'],1));
$k_fr = DB::$dbs->querySingle("SELECT COUNT(*) FROM `frends` WHERE `user` = ? AND `i` = ?",array($al['id'],1));
echo '<div class="prof"><img src="img/friendster.png" alt="" align="middle"><a href="frend.php?id='.$al['id'].'"> <big>Друзья</a> ('.$k_fr.'/On:'.$f_onl.')</big></div>';
if ($user['id']==$al['id']){
$currD=date("d", time());
$currm=date("m", time());
$bday=DB::$dbs->querySingle("SELECT COUNT(*) FROM `user` WHERE `ank_d_r` = ? and `ank_m_r` = ?",array($currD,$currm));
if ($bday==!0){
echo '<div class="prof"><img src="img/birth.png" alt="" align="middle"><a href="birthday.php"> <big>Именинники </a>('.$bday.')</big></div>';}
}
$k_lenta = DB::$dbs->querySingle("SELECT COUNT(*) FROM `lenta_saita`");
$k_lentas = DB::$dbs->querySingle("SELECT COUNT(*) FROM `lenta_saita` WHERE `time` > '".(time()-86400)."'");
$lent=DB::$dbs->querySingle("SELECT COUNT(*) FROM `lenta_saita` where `user`=? OR `to_user`=? OR `to_user`=? ORDER BY `time`",array($al['nick'],$al['nick'],$al['id']));
$lent=DB::$dbs->querySingle("SELECT COUNT(*) FROM `lenta_saita` where `user`=? OR `to_user`=? OR `to_user`=? ORDER BY `time`",array($al['nick'],$al['nick'],$al['id']));
if ($user['id']!==$al['id']){
echo '<div class="prof"><img src="img/list.png" alt="" align="middle"><a href="service/lp.php?id='.$al['id'].'"> <big>Лента</a> (<a href="service/lp.php?id='.$al['id'].'">'.$lent.'</a>)</big></div>';
}else{
echo '<div class="prof"><img src="img/list.png" alt="" align="middle"><a href="service/lp.php?id='.$al['id'].'"> <big>Лента</a> (<a href="service/lp.php?id='.$al['id'].'">'.$lent.'</a>/<a href="service/lenta.php">'.$k_lenta.'</a>|<b><font color="red">+'.$k_lentas.'</font></b>)</big></div>';
}
if ($user['id']==$al['id']){
$g=DB::$dbs->querySingle("SELECT COUNT(*) FROM `p_g` WHERE `id_user` = ?",array($us['id']));
$gnew=DB::$dbs->querySingle("SELECT COUNT(*) FROM `p_g` WHERE `id_user` = ? and `unread`= ?",array($us['id'],1));
echo '<div class="prof"><img src="img/guest.png" alt="" align="middle"><a href="Гости"> <big>Гости</a> ('.$g.''.(($gnew>0)?'/'.$gnew.'':'').')</big></div>';
}
echo '<div class="prof"><img src="img/vp.png" alt="" align="middle"><a href="vp.php?id='.$al['id'].'"> <big>Вопросы ('.DB::$dbs->querySingle("SELECT count(id) FROM `vp` where `id_us` = ? limit 1",array($al['id'])).')</big></a></div>';
$fotos = DB::$dbs->querySingle("SELECT count(*) FROM `gallery` WHERE `id_user` = ?",array($us['id']));
echo '<div class="prof"><img src="img/photo.png" alt="" align="middle"><a href="foto/'.$al['id'].'/"> <big>Фотоальбомы ('.$fotos.')</big></a></div>';
$dne=DB::$dbs->querySingle("SELECT count(*) from `vmobe_net_dnevnik` where `uid`=?",array($al['id']));
echo '<div class="prof"><img src="img/diar.png" alt="" align="middle"><a href="dnevnik/dn'.$al['id'].'"> <big>Дневник</a> ('.$dne.')</big></div>';
$groups = DB::$dbs->querySingle("SELECT COUNT(id) FROM `klan` LIMIT 1");
$my_groups = DB::$dbs->querySingle("SELECT COUNT(*) FROM `klan_u` WHERE `user` = ?",array($al['id']));
echo '<div class="prof"><img src="img/group.png" alt="" align="middle"><a href="group/group_my.php?id='.$al['id'].'"> <big>Группы</a> (<a href="group/group_my.php?id='.$al['id'].'">'.$my_groups.'</a>/<a href="group/index.php">'.$groups.')</a></big></div>';
$gu=DB::$dbs->querySingle("SELECT COUNT(*) FROM `guest`");
$stena=DB::$dbs->querySingle("SELECT COUNT(*) FROM `us_guest` WHERE `id_user_adm` = ?",array($al['id']));
echo '<div class="prof"><img src="img/wall.png" alt="" align="middle"><a href="us_guest/index.php?id='.$al['id'].'"> <big>Стена</a> (<a href="us_guest/index.php?id='.$al['id'].'">'.$stena.'</a>/<a href="guest/index.php">'.$gu.')</a></big></div>';
$k_pf=DB::$dbs->querySingle("SELECT COUNT(*) FROM `obmennik_files` WHERE `id_user` = ? AND `id_dir`= ? ",array($al['id'],205));
echo '<div class="prof"><img src="img/files.png" alt="" align="middle"><a href="files.php?id='.$al['id'].'"> <big>Файлы ('.$k_pf.')</a></big></div>';
echo '<div class="prof"><img src="img/giftss.png" alt="" align="middle"><a href="gifts.php?id='.$al['id'].'"> <big>Подарки</a></big></div>';
echo '<div class="prof"><img src="img/feel_good.png" alt="" align="middle"><a href="actions.php?uid='.$al['id'].'"> <big>Действия</a></big></div>';
if($user['id']==$al['id']){
$reffers = DB::$dbs->querySingle("SELECT COUNT(*) FROM `refer` where `us` = ?",array($al['id']));
echo '<div class="prof"><img src="img/referal.png" alt="" align="middle"><a href="/kab/invite.php"> <big>Реффералы</a> ('.$reffers.')</big></div>';
}
echo'</div>';
if($user['id']==$al['id']){
echo '<div class="prof"><img src="img/other.png" alt="" align="middle"><a href="main.php?id='.$al['id'].'&menu"> <big>Разделы сайта</a></big> </div>';
echo'<hr>';
}
$on=DB::$dbs->querySingle("SELECT COUNT(*) FROM `user` WHERE `date_last` > ".(time()-3600)."");
$ong=DB::$dbs->querySingle("SELECT COUNT(*) FROM `guests` WHERE `date_last` > ".(time()-3600)."");
$l=$on+$ong;
$knu= DB::$dbs->querySingle("SELECT COUNT(*) FROM `user`");
$new = DB::$dbs->querySingle("SELECT COUNT(*) FROM `user` WHERE `date_reg` > '".(time()-86400)."'");
echo '<div class="prof">';
echo '<div class="dclass"><img src="img/online.png" alt="" align="middle"><big><a href="/here.php" >На сайте: '.$l.'</a> | <a href="love">'.$knu.'</a></big></div>';
if($us['id']==$al['id']){
echo '<div class="dclass"><img src="img/exit.png" alt="" ><big><a href="exit.php">Выход</a></big></div></div>';
}
echo'</div>';
if($us['level']>=3){
echo "<div class='prof'>";
echo "<img src='img/tabor/bullet.png' alt=''> <a href='/tabor_ad_panel/user.php?id=$al[id]'>Редактировать профиль</a><br />n";
if ($al['ban']>time()){
echo "<img src='img/bullet.png' alt=''> <a href='panel/ban.php?id=$al[id]&act=del'>Снять бан</a><br />n";
}else{
echo "<img src='img/tabor/bullet.png' alt=''> <a href='panel/ban.php?id=$al[id]'>Забанить пользователя</a><br />n";
}
echo "<img src='img/tabor/bullet.png' alt=''> <a href='tabor_ad_panel/delete_user.php?id=$al[id]'>Удалить пользователя</a><br />";
if($al['ip']==!NULL){
echo "IP: ".long2ip($al['ip'])." ";
echo " [<a href='tabor_ad_panel/ban_ip.php?min=$al[ip]'>Бан</a>]";
echo "<br />n";}
if($al['ip_cl']==!NULL){
echo "IP (CLIENT): ".long2ip($al['ip_cl'])."";
echo " [<a href='tabor_ad_panel/ban_ip.php?min=$al[ip_cl]'>Бан</a>]";
echo "<br />n";}
if($al['ip_xff']==!NULL){
echo "IP (XFF): ".long2ip($al['ip_xff'])."";
echo " [<a href='tabor_ad_panel/ban_ip.php?min=$al[ip_xff]'>Бан</a>]";
echo "<br />n";}
if($al['ua']==!NULL){
echo "UA: $al[ua]<br />n";}
if(opsos($al['ip'])==!NULL){
echo "Пров: ".opsos($al['ip'])."<br />n";}
if($al['ip_cl']==!NULL){
echo "Пров (CL): ".opsos($al['ip_cl'])."<br />n";}
if(opsos($al['ip_xff'])==!NULL){
echo "Пров (XFF): ".opsos($al['ip_xff'])."<br />n";}
echo "</div>n";
echo '<div class="prof"><a href="/tabor_ad_panel/index.php">Админка</a></div> ';
}
}
}
if($user['reklama_time']<time()){
$bn=DB::$dbs->querySingle("SELECT count(*) FROM `reklama` where `activ`=?",array(1));
$onpage=10;
$rekl=DB::$dbs->query("SELECT * FROM `reklama` WHERE `activ`= ? ORDER BY `id` DESC LIMIT 100",array(1));
while($r=$rekl->Fetch()){
$data[]='<a href="panel/ref.php?to=ok&id='.$r['id'].'">'.$r['rekl'].'</a>';
if ($r['rekl_s']>=$r['pereh']){
DB::$dbs->query("UPDATE `reklama` SET `activ`= ? where `id` = ?",array(0,$r['id']));
}
}
$ra=rand(0,count($data)-1);
echo '<div class="prof"><center>'.$data[$ra].'</center></div>';
}
niz();
?>
alt=