Файл: modules/phpcodes/rating.php
Строк: 25
<?php
$title = 'Полезные PHP коды | Рейтинг';
include_once($_SERVER["DOCUMENT_ROOT"].'/style/head.php');
?>
<div class="title"><a href="/phpcodes">Полезные PHP коды</a> | Рейтинг</div>
<?
$nav=new navig("SELECT * FROM `phpcodes_codes` WHERE `moderation`='1' ORDER BY `raing`");
$q = $db->query('SELECT * FROM `phpcodes_codes` WHERE `moderation`=1 ORDER BY `rating` DESC LIMIT '.$nav->start.','.$nav->nstr);
while($c=$q->fetch_assoc()){
?>
<div class="section">
<a href="/phpcodes/code/<?=$c['id']?>"><?=htmlspecialchars($c['name'])?></a><br/>
<?
if($c['rating']<0){
$color = 'red';
}else{
$color = 'green';
}
?>
<b>Рейтинг:</b> <font color="<?=$color?>"><?=$c['rating']?></font>
</div>
<?
}
?>
<div class="nvgstr">
<?
$nav->panel();
?>
</div>
<?
include_once($_SERVER["DOCUMENT_ROOT"].'/style/foot.php');
?>