|
<?php require_once('./templates/overall_header.tpl.php'); ?>
|
|
<script type="text/javascript">
|
|
function confirm_action(c_name, url)
|
|
{
|
|
if (confirm(c_name))
|
|
{
|
|
document.location = url;
|
|
}
|
|
}
|
|
</script>
|
|
<div id="content">
|
|
|
|
<?php
|
|
$items = 0;
|
|
for ($i=0; $i<count($this->TPL['forums_list']); $i++)
|
|
{
|
|
if ($this->TPL['forums_list'][$i]['forum_id'] != null)
|
|
{
|
|
if ($i > 0)
|
|
{
|
|
if ($this->TPL['forums_list'][$i-1]['category_id'] != $this->TPL['forums_list'][$i]['category_id'])
|
|
echo '</div><br><div class="forum_table">
|
|
<div class="row">
|
|
<div class="hc1">'.$this->TPL['forums_list'][$i]['category_name'].'</div>
|
|
<div class="hc2" style="width: 80px"> </div>
|
|
<div class="hc3" style="width: 80px"> </div>
|
|
<div class="hc4"> </div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="tc1 tab_desc">Forum name</div>
|
|
<div class="tc2 tab_desc" style="width: 80px">Topics</div>
|
|
<div class="tc3 tab_desc" style="width: 80px">Posts</div>
|
|
<div class="tc4 tab_desc">Last Post</div>
|
|
</div>';
|
|
}
|
|
else
|
|
{
|
|
echo '<div class="forum_table">
|
|
<div class="row">
|
|
<div class="hc1">'.$this->TPL['forums_list'][$i]['category_name'].'</div>
|
|
<div class="hc2" style="width: 80px"> </div>
|
|
<div class="hc3" style="width: 80px"> </div>
|
|
<div class="hc4"> </div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="tc1 tab_desc">Forum name</div>
|
|
<div class="tc2 tab_desc" style="width: 80px">Topics</div>
|
|
<div class="tc3 tab_desc" style="width: 80px">Posts</div>
|
|
<div class="tc4 tab_desc">Last Post</div>
|
|
</div>';
|
|
}
|
|
echo '<div class="row">'."\n";
|
|
echo "\t\t\t".'<div class="tc1"><a href="index.php?mode=viewforum&id='.$this->TPL['forums_list'][$i]['forum_id'].'" class="sect">'.$this->TPL['forums_list'][$i]['forum_name'].'</a><br><span class="fsmall">'.$this->TPL['forums_list'][$i]['forum_desc'].'</span></div>'."\n";
|
|
echo "\t\t\t".'<div class="tc2" style="width: 80px">'.$this->TPL['forums_list'][$i]['topic_count'].'</div>'."\n";
|
|
echo "\t\t\t".'<div class="tc3" style="width: 80px">'.$this->TPL['forums_list'][$i]['post_count'].'</div>'."\n";
|
|
|
|
if ($this->TPL['forums_list'][$i]['lastpost_post_id'] != null)
|
|
{
|
|
$lastpost = '<span class="fsmall"><span style="font-weight: bold">'.$this->TPL['forums_list'][$i]['lastpost_date'].'</span><br><a href="index.php?mode=viewtopic&id='.$this->TPL['forums_list'][$i]['lastpost_topic_id'].'#p'.$this->TPL['forums_list'][$i]['lastpost_post_id'].'" style="font-weight: bold">Topic #'.$this->TPL['forums_list'][$i]['lastpost_topic_id'].'</a>: ';
|
|
if ($this->TPL['forums_list'][$i]['lastpost_user_id'] != null)
|
|
$lastpost .= '<a href="index.php?mode=viewprofile&id='.$this->TPL['forums_list'][$i]['lastpost_user_id'].'">'.$this->colorRank($this->TPL['forums_list'][$i]['lastpost_nick'], $this->TPL['forums_list'][$i]['lastpost_user_rank']).'</a>';
|
|
else
|
|
$lastpost .= 'Anonymous';
|
|
$lastpost .= '</span>';
|
|
}
|
|
else
|
|
{
|
|
$lastpost = 'No posts';
|
|
}
|
|
|
|
echo "\t\t\t".'<div class="tc4">'.$lastpost.'</div>'."\n";
|
|
echo "\t\t".'</div>'."\n";
|
|
|
|
$items++;
|
|
}
|
|
}
|
|
|
|
if ($items > 0)
|
|
echo '</div>';
|
|
else
|
|
{
|
|
echo '<div class="forum_table">
|
|
<div class="row">
|
|
<div class="hc1 hc4">Forum message</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="tc1 tc4">No forums</div>
|
|
</div>
|
|
</div>';
|
|
}
|
|
?>
|
|
|
|
<br>
|
|
<div class="forum_table">
|
|
<div class="row">
|
|
<div class="hc1 hc4">Statistics</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="tc1 tc4" style="text-align: left">
|
|
Our users have written <span style="font-weight: bold"><?php echo $this->TPL['posts_count']; ?></span> posts.<br>
|
|
We have <span style="font-weight: bold"><?php echo $this->TPL['users_count']; ?></span> unique users.<br>
|
|
Last registered user: <a href="index.php?mode=viewprofile&id=<?php echo $this->TPL['last_user']['user_id']; ?>" style="font-weight: bold"><?php echo $this->TPL['last_user']['nick']; ?></a><br>
|
|
Users ranks: <a href="index.php?mode=userlist&rank=admin"><span class="fadmin">Admin</span></a> • <a href="index.php?mode=userlist&rank=mod"><span class="fmod">Mod</span></a> • User<br>
|
|
This forum is browsing by <span style="font-weight: bold"><?php echo $this->TPL['logged_users_count']; ?></span> logged users(list):<br>
|
|
<?php
|
|
if ($this->TPL['logged_users_count'] == 0) echo 'none.';
|
|
else
|
|
for ($i=0; $i<count($this->TPL['logged_users']); $i++)
|
|
{
|
|
echo '<a href="index.php?mode=viewprofile&id='.$this->TPL['logged_users'][$i]['user_id'].'">'.$this->colorRank($this->TPL['logged_users'][$i]['nick'], $this->TPL['logged_users'][$i]['rank']).'</a>';
|
|
|
|
if ($i<count($this->TPL['logged_users'])-1)
|
|
echo ', ';
|
|
}
|
|
|
|
|
|
?>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<?php require_once('./templates/overall_footer.tpl.php'); ?>
|