Файл: index.php
Строк: 26
<?php
include_once('system/config.php');
include_once('system/head.php');
$c_film = mysql_result(mysql_query("SELECT COUNT(*) FROM `film` "), 0);
nav_start($c_film, 10);
if ($c_film != 0) {
$sql_film = mysql_query("SELECT * FROM `film` ORDER BY `id` DESC LIMIT $start, 10");
while ($film = mysql_fetch_assoc($sql_film)) {
$films = mysql_result(mysql_query("SELECT COUNT(*) FROM `film` WHERE `id` = '".$film['id']."' "), 0);
echo '<div class="menu">
<table><tbody><tr><td style="width:1%;vertical-align:top;">
<a href="/film.php?id='.$film['id'].'"><img class="ico2" src="http://'.$film['src'].'"width="70">
</td><td style="vertical-align:top;"></a>
<b>Название:</b> '.$film['title'].' <br />
<b>Страна:</b> '.$film['strana'].'<br />
<b>Просмотров:</b> '.$film['look'].' <br />
<b>Дата публикации:</b> '.vtime($film['date']).'
</td></tr></tbody></table></div></div>';
}
} else { echo '<div class="menu">На данном сайте нет ни одного фильма...</div>'; }
$c_cat = mysql_result(mysql_query("SELECT COUNT(*) FROM `cat` "), 0);
nav_start($c_cat, 3);
if ($c_cat != 0) {
$sql_cat = mysql_query("SELECT * FROM `cat` ORDER BY `id` DESC LIMIT $start, 25");
while ($cat = mysql_fetch_assoc($sql_cat)) {
$films = mysql_result(mysql_query("SELECT COUNT(*) FROM `film` WHERE `id_cat` = '".$cat['id']."' "), 0);
echo '<a class="link" href="/cat.php?id='.$cat['id'].'" title="Категории"><span class="arrow"><i class="icon i-magnifying-glass"></i>'.$cat['title'].'<span class="count">('.$films.')</span></span></a></div>';
}
} else { echo '<div class="menu">На данном сайте нет такой категории...</div>'; }
view_nav('?');
include_once('system/foot.php');
?>