Файл: forum/new_them.php
Строк: 25
<?php
require_once '../system/sys.php';
require_once 'ini.php';
$title = 'Форум / Последние темы';
require_once '../system/head.php';
if($them <= 0)echo '<div class="err">Тем еще небыло</div>';
//////Навигация
if(isset($user))$str=$user['str'];
else $str="10";
$k_page=k_page($them,$str);
$page=page($k_page);
$start=$str*$page-$str;
$twtw = mysql_query("SELECT * FROM forumt ORDER BY timenew DESC LIMIT $start, $str");
while($tema = mysql_fetch_assoc($twtw)){
$raz = mysql_fetch_assoc(mysql_query("SELECT id,name FROM forumr WHERE id = '$tema[razdel]'"));
$for = mysql_fetch_assoc(mysql_query("SELECT id,name FROM forums WHERE id = '$tema[forums]'"));
echo '<div class="main">';
if($tema['close'] == 1)echo '<img src="'.URL.'/forum/img/close.png"></img> ';
else
echo '<img src="'.URL.'/forum/img/them.png"></img> ';
echo '<a href="/forum/'.$tema['razdel'].'/'.$tema['forums'].'/'.$tema['id'].'">'.$tema['name'].'</a> ['.mysql_result(mysql_query("SELECT COUNT(id) FROM forump WHERE tema = '$tema[id]'"),0).']';
if($tema['up'] == 1)echo ' <img src="'.URL.'/forum/img/up.png"></img> ';
echo ' <a href="/forum/'.$tema['razdel'].'/'.$tema['forums'].'/'.$tema['id'].'/page=end">» </a>';
echo '<div class="cit"><a href="/forum/'.$raz['id'].'">'.$raz['name'].'</a> » <a href="/forum/'.$raz['id'].'/'.$for['id'].'">'.$for['name'].'</a></div>Автор: ';
ank($tema['user']);
echo ' ['.vtime($tema['time']).']</div>';
}
////////Это вниз
if ($k_page>1)str("?",$k_page,$page);
require_once '../system/foot.php';
?>