Файл: style/themes/web/left.php
Строк: 51
<?
/*--------------------------друзья онлайн----------------------*/
$set['p_str']=20;
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `frends` INNER JOIN `user` ON `frends`.`frend`=`user`.`id` WHERE `frends`.`user` = '$user[id]' AND `frends`.`i` = '1' AND `user`.`date_last`>'".(time()-600)."'"), 0);
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];$q = mysql_query("SELECT * FROM `frends` INNER JOIN `user` ON `frends`.`frend`=`user`.`id` WHERE `frends`.`user` = '$user[id]' AND `frends`.`i` = '1' AND `user`.`date_last`>'".(time()-600)."' ORDER BY `user`.`date_last` DESC LIMIT $start, $set[p_str]");if ($k_post>0)
{
}
while ($post3 = mysql_fetch_assoc($q))
{
$ank3=get_user($post3['frend']);
echo "<div class='login_t'>Друзья на сайте</div>";
echo '<div class="lider">';
/*---------зебра---------*/
if ($num==0)
{
echo " <div class='nav1'>n";
$num=1;
}
elseif ($num==1)
{
echo " <div class='nav2'>n";
$num=0;
}
echo '<span class="stat">';
echo avatar($ank3['id']);
echo '</span>';
echo group($ank3['id']) , ' <a href="/info.php?id='.$ank3['id'].'">'.$ank3['nick'].'</a>'.medal($ank3['id']).' '.online($ank3['id']).'';
echo '<span class="mail">';
echo '<a href="/mail.php?id='.$ank3['id'].'"><img src="/style/themes/web/mail1.png" alt="*" /></a> ';echo "</div>";
echo '</span>';
echo '</div>';
}
$k_lider = mysql_result(mysql_query("SELECT COUNT(*) FROM `liders` WHERE `time` > '$time'"),0);
$liders = mysql_fetch_assoc(mysql_query("SELECT * FROM `liders` WHERE `time` > '$time' ORDER BY stav DESC LIMIT 2"));
if ($k_lider > 0)
{
echo "<div class='login_t'>Лидеры</div>";
echo '<div class="lider">';
$lider = get_user($liders['id_user']);
echo '<span class="stat">';
echo status($lider['id']);
echo '</span>';
echo group($lider['id']) , ' <a href="/info.php?id=' . $lider['id'] . '">' . $lider['nick'] . '</a> ';
echo medal($lider['id']) , online($lider['id']) , '<br />';
if ($liders['msg'])echo output_text($liders['msg']) . '<br />';
echo '<span class="alllider">';
echo '<a href="/user/liders/"><img src="/style/icons/lider.gif" alt="S"/> Все лидеры</a> ' . $k_lider . '';
echo '</span>';
echo '</div>';
}
echo "<div class='login_t'>Реклама</div>";
echo "<div class='rekl'>n";
rekl(3);
echo "</div>n";
?>