Размер файла: 1.02Kb
<?php
include_once('./system/config.php');
$sys['title'] = 'Все записи';
include_once('./system/head.php');
$c_note = mysql_result(mysql_query("SELECT COUNT(*) FROM `note` "), 0);
echo '<div class="title">Все записи:</div>';
nav_start($c_note, 10);
if ($c_note != 0) {
$sql_note = mysql_query("SELECT * FROM `note` ORDER BY `id` DESC LIMIT $start, 10");
while ($note = mysql_fetch_assoc($sql_note)) {
$cat = mysql_fetch_assoc(mysql_query("SELECT * FROM `cat` WHERE `id` ='".$note['id_cat']."' "));
echo '<div class="content"><a href="http://'.txt($_SERVER['HTTP_HOST']).'/notes/'.trans($note['title']).'-'.$note['id'].'.xhtml">'.$note['title'].'</a><br/>'.mb_substr($note['note'], 0, 200).'...
<hr/>Категория: <a href="http://'.txt($_SERVER['HTTP_HOST']).'/category-'.$cat['id'].'.xhtml">'.$cat['title'].'</a></div>';
}
} else { echo '<div class="error">Записей нет !</div>'; }
view_nav('http://'.txt($_SERVER['HTTP_HOST']).'/all_notes.xhtml/');
include_once('./system/foot.php');
?>