File size: 2.29Kb
<?php
/*\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//
// Sitchi CMS - Mobile Content Management System //
// The author: Nikoloz Sitchinava [sitchi] //
// Link: http://sitchicms.num.ge //
// Skype: SitchiCMS //
// License: LICENSE.txt (see attached file) //
// Version: VERSION.txt (see attached file) //
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\*/
define('_SITCHICMS', 1);
$root_path='../../';
require $root_path.'includes/db_connect.php';
require $root_path.'includes/start.php';
require $root_path.'includes/header.php';
require $root_path.'includes/functions.php';
require $root_path.'includes/head.php'; // თავი
$lng_forum = load_lng('forum');
head(''.$lng_forum['1_1'].' | '.$lng_forum['1_5'].'');
echo'<div class="hdr"><b><a href="index.php">'.$lng_forum['1_1'].'</a> | '.$lng_forum['1_5'].'</b></div>';
$k_post=mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_topic2_view` WHERE `time` > '".($time-86400)."'"),0);
$k_page=k_page($k_post,$set['p_count']);
$page=page($k_page);
$start=$set['p_count']*$page-$set['p_count'];
if ($k_post==0)
{
echo'<div class="errmenu">';
echo''.$lng_forum['1_28'].'';
echo'</div>';
}
$q=mysql_query("SELECT * FROM `forum_topic2_view` WHERE `time` > '".($time-86400)."' ORDER BY `id` DESC LIMIT $start, $set[p_count]");
while ($them = mysql_fetch_array($q))
{
$ank=mysql_fetch_array(mysql_query("SELECT * FROM `users` WHERE `id`='".$them['id_user']."' LIMIT 1"));
$forum=mysql_fetch_array(mysql_query("SELECT * FROM `forum_section` WHERE `id` = '$them[id_forum]' LIMIT 1"));
$section=mysql_fetch_array(mysql_query("SELECT * FROM `forum_section_view` WHERE `id` = '$them[id_section]' LIMIT 1"));
echo'<div class="menu">';
echo'<img src="/themes/'.$set['set_them'].'/images/sqe_'.$ank['sqe'].'.png" alt="" /> <a href="/pages/info.php?id='.$ank['id'].'">'.$ank['login'].'</a> '.online($ank['id']).'['.timef($them['time']).']<br/>';
echo mb_substr($them['msg'],0, 512).'... <a href="index.php?act=view_topic&id_them='.$them['id_them'].'"><span style="color:red;">»</span></a>';
echo'</div>';
}
if ($k_page>1)str("?",$k_page,$page);
echo'<a href="/modules/forum/">'.$lng['1_50'].'</a>';
require $root_path.'includes/end.php'; // დასასრული
?>