Просмотр файла forum/forum/newpost.php

Размер файла: 1.63Kb
<?php
require_once"../template/start.php";
require_once"../template/regglobals.php";
require_once"../template/config.php";
require_once"../template/functions.php";
require_once"../template/antidos.php";
require_once"../template/cookies.php";
require_once"../template/gzip.php";
require_once"../template/header.php";
require_once"../template/referer.php";
include_once"../themes/$config_themes/index.php";
include_once"../template/isset.php";
require_once"../template/db.php";
include_once"fnc.php";
echo "<img src='".$config_home."/images/img/partners.gif' alt=''>Новые сообщения<br><br>\n";
$flt = $sitetime-60*60*24*7;
$tops = mysql_query("SELECT * FROM `posts` WHERE `time` >= '$flt' ORDER BY `id` DESC LIMIT 10");
if(mysql_num_rows($tops) != '0'){
while($top = mysql_fetch_array($tops)){
$themes = mysql_query("SELECT * FROM `theme` WHERE `id` = '$top[theme]'");
$theme = mysql_fetch_array($themes);
echo "<div>\n";
echo "<img src='".$config_home."/forum/img/t.gif' alt=''> <a href='".$config_home."/forum/posts/".$theme['id']."'><b>".$theme['name']." </b></a><br>";
echo antimat(bb_code(check2($top['msg'])))."<br>\n";
echo "Написал: ".$top['author']." (".date_fixed($top['time']).")<br>\n";
echo '<span style="color:#CC00CC; font-size: 9px;">('.$top['brow'].', '.$top['ip'].')</span>';
echo "</div><hr>\n";
}}else{ echo "<br> <img src='".$config_home."/images/img/close.gif' alt=''>Сообщений еще нет!<br>\n";}

echo ": <a href='".$config_home."/forum/'>К форумам</a><br>"; 
echo ":: <a href='".$config_home."'>На главную</a>"; 
include_once"../themes/$config_themes/foot.php";
?>