Файл: inc/collective/mr_rat_ct.php
Строк: 69
<?php
$title='Рейтинги по взносам';
include_once '../system/config.php';
$mcu =mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective_user` WHERE `id_user` = '$ku[id]'"));
$ct =mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_collective` WHERE `id` = '".intval($_GET['rating'])."'"));
if(isset($_GET['rating']) && ($_GET['rating'])!=NULL && ($ct['id']==$mc['id']) && mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective` WHERE `id` = '".($_GET['rating'])."' LIMIT 1"),0)!=0){
$sort='money';
$img='money.png';
if(isset($_GET['rubies']))
{
$sort='rubies';
$img='ruby.png';
if(isset($_GET['week']))$sort='rubies_week';
}
echo "<div class='title'><a href='/kolhoz/cash/$ct[id]/'>Касса</a> / Рейтинг</h2></div>";
?>
<div class="content">
<div class="div">
<ul>
<?
$k_post = mysql_result(mysql_query("SELECT COUNT(*) FROM `kolhoz_collective_user` WHERE `id_collective` = '$ct[id]'"),0);
if ($k_post==0)
{
echo "Список пуст...";
}
$k_page=k_page($k_post,$set['p_str']);
$page=page($k_page);
$start=$set['p_str']*$page-$set['p_str'];
$num=($page-1)*$k_page;
$q=mysql_query("SELECT * FROM `kolhoz_collective_user` WHERE `id_collective` = '$ct[id]' ORDER BY `$sort` DESC LIMIT $start, $set[p_str]");
echo "<ul>";
while($post=mysql_fetch_array($q))
{
$num++;
$uuk=mysql_fetch_array(mysql_query("SELECT * FROM `kolhoz_user` WHERE `id` = '$post[id_user]'"));
//$uk=mysql_fetch_array(mysql_query("SELECT * FROM `user` WHERE `id` = '$uuk[id_user]'"));
echo "<li><span class='minor'><span>$num</span>.</span><span>";
echo "".on_k($uuk['id'])."";
echo " <a class='' href='/user/$uuk[id]'>".nc($uuk['id'])."</a> <span class='n'><img src='/img/icons/$img' alt='o'> <span class='n'>$post[$sort]</span></span></li>";
}
echo "</ul>";
if ($k_page>1)str("/kolhoz/$ct[id]/rating/".(isset($_GET['rubies'])?"rubies":"money")."".(isset($_GET['rubies']) && isset($_GET['week'])?"/week":null)."/",$k_page,$page); // Вывод страниц
echo "<div class='pt'>n
<ul>n
<li><img src='/img/icons/ruby.png' alt='o'> ".($sort!='rubies'?"<a href='/kolhoz/$ct[id]/rating/rubies'>":"<span>")."Рейтинг по рубинам за всё время".($sort!='rubies'?"</a>":"</span>")."</li>n
<li><img src='/img/icons/clock.png' alt='o'> ".($sort!='rubies_week'?"<a href='/kolhoz/$ct[id]/rating/rubies/week'>":"<span>")."Рейтинг по рубинам за неделю".($sort!='rubies_week'?"</a>":"</span>")."</li>n
<li><img src='/img/icons/money.png' alt='o'> ".($sort!='money'?"<a href='/kolhoz/$ct[id]/rating/money'>":"<span>")."Рейтинг по монетам".($sort!='money'?"</a>":"</span>")."</li>n
</ul>n
</div>n
</div>n";
include_once '../system/foot.php';
}else
{
echo "<div class='title'>Ошибка</h2></div>";
echo "<div class='content'>";
echo "<div class='div'>";
echo 'Так просто ты тут ни чего не узнаешь. Попробуй найти того, кто тебе объяснит.';
include_once '../system/foot.php';
echo "</div></div>";
}
?>