sibtracker/system/inc/forum/table.php
2019-05-18 13:46:03 +08:00

208 lines
7.0 KiB
PHP

<?php
function echo_top($echoheader = false)
{
if (!$echoheader)
{
echoheader("", "");
if ($_REQUEST['action'])
{
echo echo_top (x);
echo "<div class=\"quick\"><a href=\"?mod=forum\">DLE Forum</a></div>";
echo echo_bottom (x);
}
}
echo <<<HTML
<div style="padding-top:5px;padding-bottom:2px;">
<table width="100%">
<tr>
<td width="4"><img src="system/skins/images/tl_lo.gif" width="4" height="4" border="0"></td>
<td background="system/skins/images/tl_oo.gif"><img src="system/skins/images/tl_oo.gif" width="1" height="4" border="0"></td>
<td width="6"><img src="system/skins/images/tl_ro.gif" width="6" height="4" border="0"></td>
</tr>
<tr>
<td background="system/skins/images/tl_lb.gif"><img src="system/skins/images/tl_lb.gif" width="4" height="1" border="0"></td>
<td style="padding:5px;" bgcolor="#FFFFFF">
HTML;
}
function echo_bottom($echofooter = false)
{
echo <<<HTML
</td>
<td background="system/skins/images/tl_rb.gif"><img src="system/skins/images/tl_rb.gif" width="6" height="1" border="0"></td>
</tr>
<tr>
<td><img src="system/skins/images/tl_lu.gif" width="4" height="6" border="0"></td>
<td background="system/skins/images/tl_ub.gif"><img src="system/skins/images/tl_ub.gif" width="1" height="6" border="0"></td>
<td><img src="system/skins/images/tl_ru.gif" width="6" height="6" border="0"></td>
</tr>
</table>
</div>
HTML;
if (!$echofooter) echofooter();
}
function echo_title($title)
{
echo <<<HTML
<table width="100%"><tr>
<td bgcolor="#EFEFEF" height="29" style="padding-left:10px;"><div class="navigation">{$title}</div></td></tr></table>
<div class="unterline"></div>
HTML;
}
function echo_stats($forum_config, $forum_stats)
{
global $f_lg;
echo "<table width=\"100%\">
<tr>
<td style=\"padding:2px;\">{$f_lg['forum_status']}</td><td>{$forum_stats['line']}</td>
</tr>
<tr>
<td style=\"padding:2px;\">{$f_lg['forum_topic']}</td><td>{$forum_stats['topics']}</td>
</tr>
<tr>
<td style=\"padding:2px;\">{$f_lg['forum_posts']}</td><td>{$forum_stats['posts']}</td>
</tr>
<tr>
<td style=\"padding:2px;\">{$f_lg['forum_db_size']}</td><td>{$forum_stats['db_size']}</td>
</tr>
<tr>
<td style=\"padding:2px;\">{$f_lg['forum_files']}</td><td>{$forum_stats['sum_size']}</td>
</tr>
<tr>
<td style=\"padding:2px;\">{$f_lg['forum_cache']}</td><td>{$forum_stats['cache']}</td>
</tr>
</table>
<br />
<a href=\"?mod=forum&action=clear\"><input onclick=\"document.location='?mod=forum&action=clear'\" class=\"edit\" style=\"width:150px;\" type=\"button\" value=\"{$f_lg['clear_cache']}\"></a>";
}
if(!defined('DLE_FORUM')){ exit; }
function forum_menu()
{
global $f_lg;
echo <<<HTML
<script language="javascript" type="text/javascript">
function MenuCategory( m_id ){
var menu=new Array()
var lang_action = "";
menu[0]='<a onClick="document.location=\'?mod=forum&action=forum&sid=&sid=' + m_id + '\'; return(false)" href="#">{$f_lg['java_add_forum']}</a>';
menu[1]='<a onClick="document.location=\'?mod=forum&action=content_forums&sid=' + m_id + '\'; return(false)" href="#">{$f_lg['java_sort_f']}</a>';
menu[2]='<a onClick="document.location=\'?mod=forum&action=access&sid=' + m_id + '\'; return(false)" href="#">{$f_lg['java_access']}</a>';
menu[3]='<a onClick="document.location=\'?mod=forum&action=category_edit&sid=' + m_id + '\'; return(false)" href="#">{$f_lg['java_edit']}</a>';
menu[4]='<a onClick="document.location=\'?mod=forum&action=category_del&sid=' + m_id + '\'; return(false)" href="#">{$f_lg['java_del']}</a>';
return menu;
}
function MenuForum( m_id, sub ){
var menu=new Array()
menu[1]='<a onClick="document.location=\'?mod=forum&action=moderator_new&id=' + m_id + '\'; return(false)" href="#">{$f_lg['java_moderator']}</a>';
menu[2]='<a onClick="document.location=\'?mod=forum&action=forum_edit&id=' + m_id + '\'; return(false)" href="#">{$f_lg['java_edit']}</a>';
if (!sub){
menu[3]='<a onClick="document.location=\'?mod=forum&action=content_sub_forums&id=' + m_id + '\'; return(false)" href="#">{$f_lg['java_ssort']}</a>';
}
menu[4]='<a onClick="document.location=\'?mod=forum&action=forum_del&id=' + m_id + '\'; return(false)" href="#">{$f_lg['java_del']}</a>';
return menu;
}
function Moderators( m_id ){
var menu=new Array()
menu[1]='<a onClick="document.location=\'?mod=forum&action=moderator_edit&id=' + m_id + '\'; return(false)" href="#">{$f_lg['java_edit']}</a>';
menu[2]='<a onClick="document.location=\'?mod=forum&action=moderator_del&id=' + m_id + '\'; return(false)" href="#">{$f_lg['java_del']}</a>';
return menu;
}
</script>
HTML;
}
$options = array(
array(
'name' => $f_lg['m_new_cat'],
'url' => "$PHP_SELF?mod=forum&action=category",
'descr' => $f_lg['m_new_cat2'],
'image' => "category.png",
'access' => "1",
),
array(
'name' => $f_lg['m_new_forum'],
'url' => "$PHP_SELF?mod=forum&action=forum",
'descr' => $f_lg['m_new_forum2'],
'image' => "forum.png",
'access' => "1",
),
array(
'name' => $f_lg['m_content'],
'url' => "$PHP_SELF?mod=forum&action=content",
'descr' => $f_lg['m_content2'],
'image' => "content.png",
'access' => "1",
),
array(
'name' => $f_lg['m_usergroup'],
'url' => "$PHP_SELF?mod=forum&action=usergroup",
'descr' => $f_lg['m_usergroup2'],
'image' => "usersgroup.png",
'access' => "1",
),
array(
'name' => $f_lg['m_rank'],
'url' => "$PHP_SELF?mod=forum&action=rank",
'descr' => $f_lg['m_rank2'],
'image' => "rank.png",
'access' => "1",
),
array(
'name' => $f_lg['m_tools'],
'url' => "$PHP_SELF?mod=forum&action=tools",
'descr' => $f_lg['m_tools2'],
'image' => "tools.png",
'access' => "1",
),
array(
'name' => $f_lg['m_service'],
'url' => "$PHP_SELF?mod=forum&action=service",
'descr' => $f_lg['m_service2'],
'image' => "service.png",
'access' => "1",
),
array(
'name' => $f_lg['m_email'],
'url' => "$PHP_SELF?mod=forum&action=email",
'descr' => $f_lg['m_email2'],
'image' => "mset.png",
'access' => "1",
),
);
?>