Файл: all/smile.php
Строк: 18
<?
include_once '../system/sys.php';
include_once '../system/funcs.php';
if(!$cms->us['id']){
header('location: /');
exit;
}
$r = DB::$dbs->queryFetch("SELECT * from `smiles_r` where (`id`=?)",array($func->num($_GET['id'])));
if(!$r['id']){
header('location: /');
exit;
}
verh('Смайлы');
echo '<div class="menu"><a href="/all/smiles_r.php" style="color:#ffffff;">Категории</a> | '.$r['name'].'</div>';
$posts = DB::$dbs->querySingle("SELECT count(`id`) from `smile` where (`r`=?)",array($r['id']));
if($posts>0){
$smiles = DB::$dbs->query("SELECT * FROM `smile` where (`r`=?) order by `id`",array($r['id']));
while($smile = $smiles->fetch()){
echo '<div class="lst">'.$smile['name'].' - <img src="/design/smiles/'.$smile['img'].'" alt="'.$smile['name'].'"/>'.($cms->us['level']>0?' [<a href="/all/smile.php?id='.$r['id'].'&mod=redk&smile='.$smile['id'].'">ред</a>] [<a href="/all/smile.php?id='.$r['id'].'&mod=del&smile='.$smile['id'].'">x</a>]':NULL).'</div>';
}
}else{ echo '<div class="list1">Смайлов нет!</div>'; }
niz();
?>