Файл: modules/others/smile.php
Строк: 26
<?php
$title = 'Смайлы';
include_once($_SERVER["DOCUMENT_ROOT"].'/style/head.php');
?><div class="title">Смайлы</div><?
switch ($_GET['act']) {
case 'section':
$_GET['id'] = abs(intval($_GET['id']));
if($db->query("SELECT * FROM `smile_section` WHERE `id`='".$_GET['id']."'")->num_rows==0){
error('Подраздела не существует!');
}
$nav=new navig("SELECT * FROM `smile` WHERE `section`='".$_GET['id']."'");
$q = $db->query("SELECT * FROM `smile` WHERE `section`='".$_GET['id']."' ORDER BY `id` DESC LIMIT ".$nav->start.", ".$nav->nstr);
while($s = $q->fetch_assoc()){
?>
<div class="section1">
<img src="/files/smile/<?=$s['file']?>"> - <?=htmlspecialchars($s['name'])?>
</div>
<?
}
?>
<div class="nvgstr">
<?
$nav->panel();
?>
</div>
<?
break;
default:
$q = $db->query("SELECT * FROM `smile_section`");
while ($s = $q->fetch_assoc()) {
?>
<div class="section"><a href="/others/smile?act=section&id=<?=$s['id']?>"><?=htmlspecialchars($s['name'])?></a></div>
<?
}
break;
}
include_once($_SERVER["DOCUMENT_ROOT"].'/style/foot.php');
?>