Файл: smiles.php
Строк: 14
<?php
require_once 'system/sys.php';
$title = ' Смайлы';
require_once 'system/head.php';
$count_smiles = mysql_result(mysql_query("SELECT COUNT(id) FROM smiles"), 0);
if($user['id'] > 0)$str=$user['str'];
else $str="5";
$k_page=k_page($count_smiles,$str);
$page=page($k_page);
$start=$str*$page-$str;
if ($count_smiles == 0){echo '<div class="menu">Смайлы пока не добавлены.</div>';
}
$result = mysql_query("SELECT folder, command FROM smiles ORDER BY id ASC LIMIT $start, $str");
while ($smile = mysql_fetch_assoc($result))
{
echo '<div class="menu"><img src="'.$smile['folder'].'" alt="'.$smile['command'].'" />
» <b>'.$smile['command'].'</b></div>';
}
if($k_page>1)str("?id=$id&",$k_page,$page);
echo '<div class="err"><a href="#" onclick="history.back();return false;"><b> Назад</b></a></div>';
require_once 'system/foot.php';
?>