Файл: forum/index.php
Строк: 23
<?
define('_ON_CMS', 1);
$rootpath = '../';
require_once '../includes/start.php';
require_once '../includes/function.php';
require_once '../includes/header.php';
if($level==0 OR $ban!=0){
header('Location: ../index.php');
}
$PAGINGS = mysql_query("SELECT * FROM `forum_cat` ORDER BY `id` ASC");
if($PAGINGS > 0)
{
while($row = mysql_fetch_array($PAGINGS))
{
echo '<div class="top">';
echo '' . $row['name'] . '</div><div class="conts">';
$PAGINGS1 = mysql_query("SELECT * FROM `forum_podf` WHERE `id_cat`='".$row['id']."' ORDER BY `id` ASC");
if($PAGINGS1 > 0)
{
while($row1 = mysql_fetch_array($PAGINGS1))
{
echo '<img src="../images/folder.png" alt="image" /> <a href="themelist.php?id='.$row1['id'].'">' . $row1['name'] . '</a> ['.$row1['themes'].']<br/>';
}
}
echo '</div>';
}
}
echo '<div class="conts">';
echo '
<a href="themes.php">Мои темы</a><br/>
<a href="themes.php?act=new_theme">Новые темы</a><br/>
';
echo '</div>';
$total_themes=mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_theme`;"), 0);
$total_posts=mysql_result(mysql_query("SELECT COUNT(*) FROM `forum_posts`;"), 0);
echo '<div class="conts">Всего тем: '.$total_themes.'<br/>Всего сообщений: '.$total_posts.'</div>';
div('<a href="../">В игру</a>','conts');
require_once '../includes/footer.php';
?>