Файл: moduls/forum/index.php
Строк: 268
<?php
/**
* @package Prime Social
* @link http://primesocial.ru
* @copyright Copyright (C) 2016 Prime Social
* @author BoB | http://primesocial.ru/about
*/
require_once('../../core/start.php');
check_auth();
switch ($select) {
default:
head('Forum');
if ($_POST['add'] && privilegy('forum')) {
$name = html($_POST['name']);
if (empty($name)) {
echo DIV_ERROR . 'Forum nomini kiriting' . CLOSE_DIV;
} else {
DB::$dbs->query("INSERT INTO ".FORUMS." (`name`) VALUES (?)", array($name));
header("Location: ".HOME."/forums/");
}
}
echo '<div class="white">';
echo '- <a href="'.HOME.'/forum/new_posts/">Yangi sharhlar</a> / ';
echo ' <a href="'.HOME.'/forum/new_themes/">Yangi mavzular</a><br />';
echo '- <a href="'.HOME.'/forum/my_posts/">Mening sharhlarim</a> / ';
echo ' <a href="'.HOME.'/forum/activ_themes/">Faol mavzular</a>';
echo '</div>';
echo '<div class="white"><center>';
echo '<form action="'.HOME.'/forum/search/" method="POST">';
echo '<input type="text" name="q" style="width:50%;"/> <input type="submit" name="search" value="Mavzu izlash" /><br />';
echo '</form></center></div>';
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUMS."");
if ($all == 0) {
echo DIV_AUT . 'Forumlar yo`q' . CLOSE_DIV;
} else {
$sql = DB::$dbs->query("SELECT * FROM ".FORUMS."");
while($forum = $sql -> fetch()) {
$themes = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUMS_THEME." WHERE `forum_id` = ? ", array($forum['id']));
$posts = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUMS_POST." WHERE `forum_id` = ? ", array($forum['id']));
echo '<div class="touch">';
echo '<a href="'.HOME.'/forum/'.$forum['id'].'/">'.icon('forumlar.png').' '.$forum['name'].'
<span class="count">'.$themes.'/'.$posts.'</span>';
echo '</a></div><div class="lines" style="font-size:13px;">';
echo ''.(!empty($forum['ustav']) ?
SubstrMaus(text($forum['ustav']), 300)
:
'Bo`limga ta`rif va qoidalar to`ldirilmagan');
if (privilegy('forum')) {
echo ' <a href="'.HOME.'/forum/ustav/'.$forum['id'].'/" style="color:#959595;font-size:11px;">|Edit</a>';
}
echo '</div>';
}
}
if (privilegy('forum')) {
echo '<div class="white">';
echo '<form action="#" method="POST">';
echo '<input type="text" name="name" />';
echo ' <input type="submit" name="add" value="Yangi forum" /></form>';
echo CLOSE_DIV;
}
$array = array('Forum');
nav($array);
break;
case 'ustav':
$forum = DB::$dbs->queryFetch("SELECT * FROM ".FORUMS." WHERE `id` = ? ", array(abs(num($_GET['forum']))));
if (empty($forum)) {
head('Forum topilmadi');
echo DIV_ERROR . 'Xatolik!' . CLOSE_DIV;
} else {
head('Bo`lim qoidasi: ' . $forum['name']);
if (isset($_GET['ustav']) && privilegy('forum')) {
if ($_POST['send']) {
$ustav = html($_POST['ustav']);
DB::$dbs->query("UPDATE ".FORUMS." SET `ustav` = ? WHERE `id` = ? ", array($ustav, $forum['id']));
header("Location: ".HOME."/forum/ustav/".$forum['id']."/");
}
echo DIV_AUT;
echo '<form action="#" method="POST">';
echo 'Bo`lim qoidasi:<br /><textarea name="ustav" style="width:95%;">'.$forum['ustav'].'</textarea><br />';
echo '<input type="submit" name="send" value="O`zgartirish" /></form>';
bbsmile();
echo CLOSE_DIV;
}
echo ' '. DIV_BLOCK . (!empty($forum['ustav']) ?
text($forum['ustav'])
:
'Qoidalar to`ldirilmagan')
. CLOSE_DIV;
if (privilegy('forum')) {
echo DIV_LI . '<a href="?ustav">Qoidalarni tahrirlash</a>' . CLOSE_DIV;
}
echo DIV_LI . '<b><a href="'.HOME.'/forum/">Orqaga</a></b>' . CLOSE_DIV;
}
$array = array('Forum');
nav($array);
break;
case 'forum':
$forum = DB::$dbs->queryFetch("SELECT * FROM ".FORUMS." WHERE `id` = ? ", array(abs(num($_GET['forum']))));
if (empty($forum)) {
head('Forum topilmadi');
echo DIV_ERROR . 'Xatolik!' . CLOSE_DIV;
} else {
head('Forum: ' . $forum['name']);
if (isset($_GET['ustav']) && privilegy('forum')) {
if ($_POST['send']) {
$ustav = html($_POST['ustav']);
DB::$dbs->query("UPDATE ".FORUMS." SET `ustav` = ? WHERE `id` = ? ", array($ustav, $forum['id']));
header("Location: ".HOME."/forum/".$forum['id']."/?ustav");
}
echo DIV_AUT;
echo '<form action="#" method="POST">';
echo 'Forum qoidasi:<br /><textarea name="ustav">'.$forum['ustav'].'</textarea><br />';
echo '<input type="submit" name="send" value="O`zgartirish" /></form>';
echo CLOSE_DIV;
}
if (isset($_GET['del']) && privilegy('forum')) {
if (!isset($_GET['go'])) {
echo DIV_LI . '<b>O`chirishni tastiqlang:</b> <a href="?del&go">[O`chirish]</a> <a href="'.HOME.'/forum/'.$forum['id'].'/">[Yo`q]</a>' . CLOSE_DIV;
} else {
DB::$dbs->query("DELETE FROM ".FORUMS_CAT." WHERE `forum_id` = ? ", array($forum['id']));
DB::$dbs->query("DELETE FROM ".FORUMS." WHERE `id` = ? ", array($forum['id']));
header("Location: ".HOME."/forums/");
}
}
if (isset($_GET['edit']) && privilegy('forum')) {
if ($_POST['edit']) {
$name = html($_POST['name']);
if (empty($name)) {
echo DIV_ERROR . 'Forum nomini kiriting' . CLOSE_DIV;
} else {
DB::$dbs->query("UPDATE ".FORUMS." SET `name` = ? WHERE `id` = ? ", array($name, $forum['id']));
header("Location: ".HOME."/forum/".$forum['id']."/");
}
}
echo DIV_AUT;
echo '<form action="#" method="POST">';
echo 'Forumni tahrirlash:<br /><input type="text" value="'.$forum['name'].'" name="name" />';
echo '<input type="submit" name="edit" value="O`zgartirish" /></form>';
echo CLOSE_DIV;
}
if ($_POST['add'] && privilegy('forum')) {
$name = html($_POST['name']);
if (empty($name)) {
echo DIV_ERROR . 'Podforum nomini kiriting' . CLOSE_DIV;
} else {
DB::$dbs->query("INSERT INTO ".FORUMS_CAT." (`forum_id`, `name`) VALUES (?, ?)", array($forum['id'], $name));
header("Location: ".HOME."/forum/".$forum['id']."/");
}
}
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUMS_CAT." WHERE `forum_id` = ?", array($forum['id']));
if ($all == 0) {
echo DIV_AUT . 'Podforumlar yo`q' . CLOSE_DIV;
} else {
$n = new Navigator($all,$config['write']['forum_razd'],'forum='.$forum['id'].'&select=forum');
$sql = DB::$dbs->query("SELECT * FROM ".FORUMS_CAT." WHERE `forum_id` = ? LIMIT {$n->start()}, ".$config['write']['forum_razd']." ", array($forum['id']));
while($forumc = $sql -> fetch()) {
$themes = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUMS_THEME." WHERE `forumc_id` = ? ", array($forumc['id']));
$posts = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUMS_POST." WHERE `forumc_id` = ? ", array($forumc['id']));
echo DIV_LI . ''.icon('bulim.png').' <a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/">'.$forumc['name'].'</a> <span class="count">'.$themes.'/'.$posts.'</span>' . CLOSE_DIV;
}
echo $n->navi();
}
}
if (privilegy('forum')) {
echo DIV_AUT;
echo '<form action="#" method="POST">';
echo 'Yangi podforum:<br /><input type="text" name="name" />';
echo '<input type="submit" name="add" value="+" /></form>';
echo CLOSE_DIV;
if (!empty($forum)) {
echo DIV_BLOCK;
echo '- <a href="?edit">Tahrirlash</a><br />';
echo '- <a href="?del">O`chirish</a><br />';
echo '- <a href="?ustav">Qoidalarni tahrirlash</a><br />';
echo CLOSE_DIV;
}
}
echo '<div class="sts"><center><b>' . $forum['name'].'</b></center> ';
echo ''.(!empty($forum['ustav']) ?
SubstrMaus(text($forum['ustav']), 500)
:
'Bo`limga ta`rif va qoidalar to`ldirilmagan');
echo '<a href="'.HOME.'/forum/ustav/'.$forum['id'].'/" style="float:right;"><u>Qoidalar</u></a><br/><br/></div>';
$array = array('Forum');
nav($array);
break;
case 'themes':
$forum = DB::$dbs->queryFetch("SELECT * FROM ".FORUMS." WHERE `id` = ? ", array(abs(num($_GET['forum']))));
if (empty($forum)) {
head('Forum topilmadi');
echo DIV_ERROR . 'Xatolik!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Bosh sahifa</a> / <a href="'.HOME.'/forum/">Forum</a> / <b>Forum topilmadi</b>' . CLOSE_DIV;
require_once('../../core/stop.php');
exit();
}
$forumc = DB::$dbs->queryFetch("SELECT * FROM ".FORUMS_CAT." WHERE `id` = ? ", array(abs(num($_GET['forumc']))));
if (empty($forumc)) {
head('Podforum topilmadi');
echo DIV_ERROR . 'Xatolik!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Bosh sahifa</a> / <a href="'.HOME.'/forum/">Forum</a> / <b>Podforum topilmadi</b>' . CLOSE_DIV;
require_once('../../core/stop.php');
exit();
}
head('Podforum mavzulari: ' . $forumc['name']);
if (isset($_GET['del'])) {
if (!isset($_GET['go'])) {
echo DIV_LI . '<b>O`chirishni tastiqlang:</b> <a href="?del&go">[O`chirish]</a> <a href="'.HOME.'/forum/'.$forum['id'].'/">[Yo`q]</a>' . CLOSE_DIV;
} else {
DB::$dbs->query("DELETE FROM ".FORUMS_CAT." WHERE `id` = ? ", array($forumc['id']));
header("Location: ".HOME."/forum/".$forum['id']."/");
}
}
if (isset($_GET['edit'])) {
if ($_POST['edit']) {
$name = html($_POST['name']);
if (empty($name)) {
echo DIV_ERROR . 'Podforum nomini kiriting' . CLOSE_DIV;
} else {
DB::$dbs->query("UPDATE ".FORUMS_CAT." SET `name` = ? WHERE `id` = ? ", array($name, $forumc['id']));
header("Location: ".HOME."/forum/".$forum['id']."/".$forumc['id']."/");
}
}
echo DIV_AUT;
echo '<form action="#" method="POST">';
echo 'Podforum nomini tahrirlash:<br /><input type="text" value="'.$forumc['name'].'" name="name" />';
echo '<input type="submit" name="edit" value="O`zgartirish" /></form>';
echo CLOSE_DIV;
}
echo DIV_AUT . '<form action="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/new_theme/" method="POST"><input type="submit" name="new_theme" value="Yangi mavzu" /></form>' . CLOSE_DIV;
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUM_THEME." WHERE `forumc_id` = ?", array($forumc['id']));
if ($all == 0) {
echo DIV_AUT . 'Mavzular ochilmagan' . CLOSE_DIV;
} else {
$n = new Navigator($all,$config['write']['forum_theme'],'select=themes&forum='.$forum['id'].'&forumc='.$forumc['id']);
$sql = DB::$dbs->query("SELECT * FROM ".FORUM_THEME." WHERE `forumc_id` = ? ORDER BY `activ` AND `fix` DESC LIMIT {$n->start()}, ".$config['write']['forum_theme']." ", array($forumc['id']));
while($theme = $sql -> fetch()) {
$posts = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUMS_POST." WHERE `theme_id` = ? ", array($theme['id']));
$page = ceil(($posts / $config['write']['forum_post']));
echo DIV_LI . (!empty($theme['fix']) ? '<b>#</b> ' : NULL) . ''.icon('pages.png').' <a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/">'.$theme['name'].'</a>
<a href="'.HOME.'/forum/'.$theme['forum_id'].'/'.$theme['forumc_id'].'/'.$theme['id'].'/?p='.$page.'"> >> </a>
<span class="count">'.$posts.'</span>' . CLOSE_DIV;
}
echo $n->navi();
}
echo DIV_LI . '<b><a href="'.HOME.'/forum/'.$forum['id'].'/">Orqaga qaytish</a></b>' . CLOSE_DIV;
if (privilegy('forum')) {
echo DIV_BLOCK;
echo '<a href="?edit">Podforumni tahrirlash</a><br />';
echo '<a href="?del">Podforumni o`chirish</a><br />';
echo CLOSE_DIV;
}
$array = array('Forum');
nav($array);
break;
case 'theme':
$forum = DB::$dbs->queryFetch("SELECT * FROM ".FORUMS." WHERE `id` = ? ", array(abs(num($_GET['forum']))));
if (empty($forum)) {
head('Forum topimadi');
echo DIV_ERROR . 'Xatolik!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Bosh sahifa</a> / <a href="'.HOME.'/forum/">Forum</a> / <b>Forum topilmadi</b>' . CLOSE_DIV;
require_once('../../core/stop.php');
exit();
}
$forumc = DB::$dbs->queryFetch("SELECT * FROM ".FORUMS_CAT." WHERE `id` = ? ", array(abs(num($_GET['forumc']))));
if (empty($forumc)) {
head('Podforum topilmadi');
echo DIV_ERROR . 'Xatolik!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Bosh sahifa</a> / <a href="'.HOME.'/forum/">Forum</a> / <b>Podforum topilmadi</b>' . CLOSE_DIV;
require_once('../../core/stop.php');
exit();
}
$theme = DB::$dbs->queryFetch("SELECT * FROM ".FORUMS_THEME." WHERE `id` = ? ", array(abs(num($_GET['theme']))));
if (empty($theme)) {
head('Mavzu topilmadi');
echo DIV_ERROR . 'Xatolik!' . CLOSE_DIV;
echo DIV_GO . '<a href="'.HOME.'/">Bosh sahifa</a> / <a href="'.HOME.'/forum/">Forum</a> / <b>Mavzu topilmadi</b>' . CLOSE_DIV;
require_once('../../core/stop.php');
exit();
}
DB::$dbs->query("DELETE FROM ".FORUMS_NEW_POST." WHERE `theme_id` = ? && `user_id` = ? ", array($theme['id'], $user['user_id']));
if ($theme['status'] == 1) {
head('Mavzu: ' . $theme['name'] . ' Muhokama qilish uchun yopilgan!');
} else {
head(' ' . $theme['name']);
}
if (isset($_GET['del']) && privilegy('forum_moder')) {
if (!isset($_GET['go'])) {
echo DIV_LI . '<b>O`chirishni tastiqlang:</b> <a href="?del&go">[O`chirish]</a> <a href="'.HOME.'/forum/'.$forum['id'].'/">[Yo`q]</a>' . CLOSE_DIV;
} else {
$sql = DB::$dbs->query("SELECT * FROM ".FORUM_POST." WHERE `theme_id` = ? ", array($theme['id']));
while($post = $sql -> fetch()) {
unlink('../../files/forum/'.$post['file']);
}
DB::$dbs->query("DELETE FROM ".FORUMS_POST." WHERE `theme_id` = ? ", array($theme['id']));
DB::$dbs->query("DELETE FROM ".FORUMS_THEME." WHERE `id` = ? ", array($theme['id']));
header("Location: ".HOME."/forum/".$forum['id']."/".$forumc['id']."/");
}
}
if ($theme['user_id'] == $user['user_id']) {
echo '<div class="white"> <b>' . $theme['name'] . '</b> ' . ($theme['status'] == 1 ? '| <font color="red"><b>Yopilgan!</b></font>' : NULL) . ' ';
echo '<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/" style="font-size:12px;float:right;">««</a><br/>';
echo '<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/closed_run/"><b>'.($theme['status'] == 0 ? 'Yopish' : 'Ochish').'</b></a> / ';
if ($theme['status'] == 0) {
if (privilegy('forum_moder')) echo '<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/fix/">'.($theme['fix'] == 0 ? 'Mahkamlash' : 'Bo`shatish').'</a> / ';
echo '<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/edit/">Tahrirlash</a> / ';
if (privilegy('forum_moder')) echo '<a href="?del">O`chirish</a> / ';
if (privilegy('forum_moder')) echo '<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/transfer/">Ko`chirish</a> / ';
}
echo '</div>';
} elseif (privilegy('forum_moder') || $theme['user_id'] == $user['user_id']) {
echo '<div class="white"> <b>' . $theme['name'] . '</b> ' . ($theme['status'] == 1 ? '| <font color="red"><b>Yopilgan!</b></font>' : NULL) . '<br/> ';
echo '<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/closed_run/"><b>'.($theme['status'] == 0 ? 'Yopish' : 'Ochish').'</b></a> / ';
if ($theme['status'] == 0) {
if (privilegy('forum_moder')) echo '<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/fix/">'.($theme['fix'] == 0 ? 'Mahkamlash' : 'Bo`shatish').'</a> / ';
echo '<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/edit/">Tahrirlash</a> / ';
echo '<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/transfer/">Ko`chirish</a> / ';
if (privilegy('forum_moder')) {
echo '<a href="?del">O`chirish</a> / ';
}
}
echo '</div>';
}
if (!empty($theme['vote'])) {
echo '<div class="line"><b>' . $theme['vote'] . '</b><br /><br />';
if (DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUM_VOTE." WHERE `theme_id` = ? && `user_id` = ? ", array($theme['id'], $user['user_id'])) == FALSE && $theme['status'] == 0) {
echo '<form action="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/vote/" method="POST"><select name="variant">';
for ($i = 1; $i <= 10; ++$i) {
echo (!empty($theme['vote_'.$i]) ? '<option value="'.$i.'"">'.$theme['vote_'.$i].'</option>' : NULL);
}
echo '</select> <input type="submit" name="myvote" value="Ovoz berish" /></form>';
} else {
for ($i = 1; $i <= 10; ++$i) {
$votes = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUM_VOTE." WHERE `theme_id` = ? && `variant` = ? ", array($theme['id'], $i));
echo (!empty($theme['vote_'.$i]) ? '<b>' . $i . '.</b> ' . $theme['vote_'.$i].' ['.$votes.' kishi.]<br />' : NULL);
}
}
echo CLOSE_DIV;
}
$all = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUM_POST." WHERE `theme_id` = ?", array($theme['id']));
if (empty($all)) {
echo DIV_BLOCK . 'Sharhlar yo`q' . CLOSE_DIV;
} else {
$n = new Navigator($all,$config['write']['forum_post'],'select=theme&forum='.$forum['id'].'&forumc='.$forumc['id'].'&theme='.$theme['id']);
$sql = DB::$dbs->query("SELECT * FROM ".FORUM_POST." WHERE `theme_id` = ? LIMIT {$n->start()}, ".$config['write']['forum_post']."", array($theme['id']));
while($post = $sql -> fetch()) {
echo '<div class="white">';
echo '<table cellspacing="0" cellpadding="0" style="margin-bottom:5px;" width="100%" ><tr>';
echo '<td class="grey" style="width:5%;border-radius: 6px 0 0 6px;"><center>';
echo '' . avatar($post['user_id'],40,40) . '';
echo '</center></td>';
echo '<td class="grey" style="width:95%;border-radius: 0 6px 6px 0;">';
$fsharh = DB::$dbs->querySingle("SELECT COUNT(`id`) FROM ".FORUMS_POST." WHERE `user_id` = ?", array($post['user_id']));
echo '<b>' . userLink($post['user_id']) . '</b> <span style="font-size:12px;font-weight:bold;">(' . $fsharh . ')</span>';
echo '<span style="float:right;">' . ($user['user_id'] != $post['user_id'] && $theme['status'] == 0 ? '
<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/new_post/?post='.$post['id'].'">'.icon('sharh.png').'</a>
<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/new_post/?ctpost='.$post['id'].'">'.icon('oko.png').'</a>
' : NULL) . ( (privilegy('forum_moder') || $post['user_id'] == $user['user_id']) && $theme['status'] == 0 ? '
<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/delete/'.$post['id'].'/">'.icon('minus2.png').'</a>
<a href="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/edit/'.$post['id'].'/">'.icon('pen2.png').'</a> ' : NULL) . '</span>';
echo '<br/><span style="font-size:11px;">' . vrem($post['time']) . '</span><br/>';
echo '</center></td></tr></table>';
if (!empty($post['ct'])) {
$ct = DB::$dbs->queryFetch("SELECT `msg` FROM ".FORUMS_POST." WHERE `id` = ? ", array($post['ct']));
echo DIV_CT . '<small><b>Sitata:</b></small><br />' . text($ct['msg']) . CLOSE_DIV;
}
echo text($post['msg']).' ';
if (!empty($post['file'])) {
$path = '../../files/forum/'.$post['file'];
$size = get_size(filesize($path));
$path_info = pathinfo($path);
echo '<br /><br />Biriktirilgan fayl: <a href="'.HOME.'/files/forum/'.$post['file'].'"><b>[Yuklash]</b></a> ['.$path_info['extension'].'] ['.$size.']<br />';
}
//// Status
$status = DB::$dbs->queryFetch("SELECT * FROM ".STATUS." WHERE `user_id` = ? ORDER BY `id` DESC LIMIT 1",array($post['user_id']));
if ($post['user_id'] != $user['user_id']) {
if (!empty($status)) {
echo '<div class="white" style="font-size:11px;">';
echo '- ' . SubstrMaus(text($status['status']), 50) . '</div>';
}
} else {
echo '<div class="white" style="font-size:11px;">';
echo '- ' . (!empty($status['status']) ? SubstrMaus(text($status['status']), 50) : '') . ' ';
echo ' </div>';
}
//// Status
echo '</div>';
}
echo $n->navi();
}
if ($theme['status'] == 0) {
echo DIV_AUT . '<form action="'.HOME.'/forum/'.$forum['id'].'/'.$forumc['id'].'/'.$theme['id'].'/new_post/" method="POST"><input type="submit" name="new_post" value="Mavzuga javob berish" /></form>' . CLOSE_DIV;
}
$array = array('Forum');
nav($array);
break;
}
require_once('../../core/stop.php');
?>