Файл: monst/core/pag/rating/forum.php
Строк: 50
<div style='text-align: center;'>
<span style='font-size: 20px;'><?=$lang['rating.php']['forum_count']?></span>
</div>
<br/>
<?
$on_page = 9;
$find = $_users -> find(
[
'id' => [
'$gt' => 0
]
]
);
$find -> limit($on_page);
$find -> sort(
[
'forum_count' => -1,
]
);
$count = $find -> count();
$nav = nav($on_page);
?>
<div style='text-align: center;'>
<?
$i = 1;
$page = ( isset($_GET['page']) ? (int)$_GET['page'] : 0 );
if ( $page > 1 ) {
$skip = ( $page * $on_page ) - $on_page;
$i = $i + $skip;
}
foreach ( $find as $f ) {
if ( $f['id'] ) {
$display = 'inline-block';
$im_size = 40;
if ( $i == 1 ) {
$display = 'block';
$im_size = 150;
}
if ( $i == 2 OR $i == 3 ) {
$im_size = 70;
}
?>
<div style='display: <?=$display?>; margin: 10px; padding: 5px; '>
<a href='/id<?=$f['id']?>'>
<img src='<?=av($f['id'])?>' alt='' width='<?=$im_size?>' style='
<?
if ( $i == 1 ) print 'border: 2px solid mediumpurple; box-shadow: 0 0 20px mediumpurple;';
if ( $i == 2 ) print 'border: 2px solid orangered; box-shadow: 0 0 20px orangered;';
if ( $i == 3 ) print 'border: 2px solid yellowgreen; box-shadow: 0 0 20px yellowgreen;';
if ( $i == 4 ) print 'border: 2px solid coral; box-shadow: 0 0 20px coral;';
if ( $i == 5 ) print 'border: 2px solid #fff; box-shadow: 0 0 20px #fff;';
?>
'/><br/>
<?=Name($f['id'])?><br/>
<span style='color: #ccc; font-size: 20px;'><?=$i?>.</span> <span style='color: #777;'><?=$f['forum_count']?></span>
</a>
</div>
<?
if ( $i % 3 == 0) {
print '<br/>';
}
$i++;
}
}
?>
</div>
<?
print $nav;