Файл: modules/phpcodes/history_rating.php
Строк: 25
<?php
$title = 'Полезные PHP коды | История изменения рейтинга';
include_once($_SERVER["DOCUMENT_ROOT"].'/style/head.php');
$_GET['id'] = abs(intval($_GET['id']));
if($db->query("SELECT `id` FROM `phpcodes_codes` WHERE `id`='".$_GET['id']."'")->num_rows==0){
error('Кода не существует.');
}
$code = $db->query("SELECT `id`, `name` FROM `phpcodes_codes` WHERE `id`='".$_GET['id']."'")->fetch_assoc();
$folder = $db->query("SELECT * FROM `phpcodes_folders` WHERE `id`='".$code['folder']."'")->fetch_assoc();
?>
<div class="title"><a href="/phpcodes">Полезные PHP коды</a> | <a href="/phpcodes/folder/<?=$folder['id']?>"><?=htmlspecialchars($folder['name'])?></a> | <a href="/phpcodes/code/<?=$code['id']?>"><?=htmlspecialchars($code['name'])?></a> | История изменения рейтинга</div>
<?
$nav=new navig("SELECT * FROM `phpcodes_rating` WHERE `id_code`='".$_GET['id']."'");
$q = $db->query('SELECT * FROM `phpcodes_rating` WHERE `id_code`='.$_GET['id'].' ORDER BY `id` DESC LIMIT '.$nav->start.','.$nav->nstr);
while($c=$q->fetch_assoc()){
if($c['type']==1){
$type = 'положительно';
}elseif($c['type']==2){
$type = 'отрицательно';
}
?>
<div class="section1">
<?=nick($c['id_us'])?> (<?=times($c['time'])?>)<br/>
Оценил <b><?=$type?></b>.
</div>
<?
}
?>
<div class="nvgstr">
<?
$nav->panel();
?>
</div>
<?
if($db->query("SELECT `id` FROM `phpcodes_rating` WHERE `id_code`='".$_GET['id']."'")->num_rows==0){
?>
<div class="error">Данный код, пока никто не оценивал.</div>
<?
}
include_once($_SERVER["DOCUMENT_ROOT"].'/style/foot.php');
?>