Файл: modules/phpcodes/new.php
Строк: 20
<?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 `time`>='".time()."-86400' AND `moderation`='1'");
$q = $db->query('SELECT `id`, `name` FROM `phpcodes_codes` WHERE `time`>='.time().'-86400 AND `moderation`=1 ORDER BY `id` DESC LIMIT '.$nav->start.','.$nav->nstr);
while($c=$q->fetch_assoc()){
?>
<div class="section"><a href="/phpcodes/code/<?=$c['id']?>"><?=htmlspecialchars($c['name'])?></a></div>
<?
}
?>
<div class="nvgstr">
<?
$nav->panel();
?>
</div>
<?
if($db->query("SELECT `id` FROM `phpcodes_codes` WHERE `time`>=".time()."-86400")->num_rows==0){
?>
<div class="error">Новых кодов нет.</div>
<?
}
include_once($_SERVER["DOCUMENT_ROOT"].'/style/foot.php');
?>