#####################################################
#  LEO SuperCool BBS / LeoBBS X / 雷傲極酷超級論壇  #
#####################################################
# 基於山鷹(糊)、花無缺製作的 LB5000 XP 2.30 免費版  #
#   新版程式製作 & 版權所有: 雷傲科技 (C)(R)2004    #
#####################################################
#      主頁地址： http://www.LeoBBS.com/            #
#      論壇地址： http://bbs.LeoBBS.com/            #
#####################################################

sub getadmincheck {
    my $currenttime = time;
    $memberfilename = $inmembername;
    $memberfilename =~ y/ /_/;
    $memberfilename =~ tr/A-Z/a-z/;
    $memberfilename = "${lbdir}verifynum/login/$memberfilename.cgi";

    if (-e $memberfilename) {
        open (FILE, "$memberfilename");
        my $logintime = <FILE>;
        close(FILE);
        chomp $logintime;
        if ($currenttime > $logintime + 900 ) { # 管理員登入如果15分鐘未做任何操$div_edit，需要重新登入
            unlink ("$memberfilename");
	    print "Set-Cookie: adminpass=\"\"\n";
	    $inpassword = "";
        } else {
	    open (FILE, ">$memberfilename");
	    print FILE "$currenttime\n";
	    close(FILE);
        }
        
    } else {
        print "Set-Cookie: adminpass=\"\"\n";
	$inpassword = "";
    }
}

sub adminlogin {
    $inmembername =~ s/\_/ /g;
    if ($useverify eq "yes") {

        if ($verifyusegd ne "no") {
	    eval ('use GD;');
	    if ($@) {
                $verifyusegd = "no";
            }
        }
        if ($verifyusegd eq "no") {
	    $houzhui = "bmp";
        } else {
	    $houzhui = "png";
        }
        
    	require 'verifynum.cgi';
    }
    $loginprog = $thisprog if ($loginprog eq "");
    print qq~
<tr><td bgcolor="#2159C9" colspan=2><font color=#FFFFFF>
<b>歡迎來到 LeoBBS 論壇管理中心</b>
</td></tr>
<form action=admin.cgi method=post>
<input type=hidden name=action value=login>
<input type=hidden name=loginprog value=$loginprog>
<tr><td bgcolor=#EEEEEE valign=middle colspan=2 align=center><font color=#333333><b>請輸入您的會員名稱、密碼登入</b></font></td></tr>
<tr><td bgcolor=#FFFFFF valign=middle width=40% align=right><BR><font color=#555555>請輸入您的會員名稱</font></td>
<td bgcolor=#FFFFFF valign=middle><BR><input type=text name=membername value="$inmembername" maxlength=15></td></tr>
<tr><td bgcolor=#FFFFFF valign=middle width=40% align=right><font color=#555555>請輸入您的密碼</font></td>
<td bgcolor=#FFFFFF valign=middle><input type=password name=password maxlength=20></td></tr>
~;
print qq~<tr><td bgcolor=#FFFFFF valign=middle width=40% align=right><font color=#555555>請輸入右邊圖片的數字</font></td><td bgcolor=#FFFFFF valign=middle><input type=hidden name=sessionid value="$sessionid"><input type=text name="verifynum" size=4 maxlength=4>　　<img src=$imagesurl/verifynum/$sessionid.$houzhui border=0 height=24 align=absmiddle> 如果看不清，請重新整理本頁</td></tr>~ if ($useverify eq "yes");
print qq~<tr><td bgcolor=#FFFFFF valign=middle colspan=2 align=center><BR><input type=submit name=submit value="登 入"></form></td></tr>
<tr><td bgcolor=#FFFFFF valign=middle align=left colspan=2><font color=#555555>
<blockquote><b>請注意:</b><p><b>只有論壇的壇主$div_then能登入論壇管理中心。未經過授權的嘗試登入行為將會被記錄在案！</b><p>在進入論壇管理中心前，請確定你的瀏覽器打開了 Cookie 選項。<br> Cookie 只會存在於目前的瀏覽器工$div_edit中。為了安全起見，當你關閉了瀏覽器後，Cookie 會失效並被自動刪除。</blockquote>
</td></tr></table></td></tr></table>
~;
}

sub admintitle {
    print qq~
<html>
<head>
<title>LeoBBS - 論壇管理中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=big5">
<style>
<!--
A:visited {	TEXT-DECORATION: none			}
A:active {	TEXT-DECORATION: none			}
A:hover {	TEXT-DECORATION: underline overline	}
A:link {	TEXT-DECORATION: none;			}
A:hover {COLOR: #428eff					}
.t {	LINE-HEIGHT: 1.4				}
.sec_menu {BACKGROUND: #d6dff7; BORDER-BOTTOM: white 1px solid; BORDER-LEFT: white 1px solid; BORDER-RIGHT: white 1px solid; OVERFLOW: hidden}
.menu_title {						}
.menu_title SPAN {COLOR: #215dc6; FONT-WEIGHT: bold; LEFT: 8px; POSITION: relative; TOP: 2px}
.menu_title2 {						}
.menu_title2 SPAN {COLOR: #428eff; FONT-WEIGHT: bold; LEFT: 8px; POSITION: relative; TOP: 2px}
BODY {	FONT-FAMILY: Arial; FONT-SIZE: 9pt; BACKGROUND: #799ae1;
SCROLLBAR-HIGHLIGHT-COLOR: buttonface;
SCROLLBAR-SHADOW-COLOR: buttonface;
SCROLLBAR-3DLIGHT-COLOR: buttonhighlight;
SCROLLBAR-TRACK-COLOR: #eeeeee;
SCROLLBAR-DARKSHADOW-COLOR: buttonshadow		}
A {COLOR: #215dc6; FONT: 9pt Arial; TEXT-DECORATION: none}
TABLE {BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-RIGHT: 0px; BORDER-TOP: 0px}
IMG {BORDER-BOTTOM: 0px; BORDER-LEFT: 0px; BORDER-RIGHT: 0px; BORDER-TOP: 0px;}
caption,TD,DIV,form ,OPTION,P,TD,BR{FONT-FAMILY: Arial; FONT-SIZE: 9pt}
INPUT {BORDER-TOP-WIDTH: 1px;
PADDING-RIGHT: 1px;
PADDING-LEFT: 1px;
BORDER-LEFT-WIDTH: 1px;
FONT-SIZE: 9pt;
BORDER-LEFT-COLOR: #cccccc;
BORDER-BOTTOM-WIDTH: 1px;
BORDER-BOTTOM-COLOR: #cccccc;
PADDING-BOTTOM: 1px;
BORDER-TOP-COLOR: #cccccc;
PADDING-TOP: 1px;
HEIGHT: 18px;
BORDER-RIGHT-WIDTH: 1px;
BORDER-RIGHT-COLOR: #cccccc				}
textarea, select {BORDER-WIDTH: 1;
BORDER-COLOR: #cccccc;
BACKGROUND-COLOR: #efefef;
FONT-FAMILY: Arial;
FONT-SIZE: 9pt;
FONT-STYLE: bold;					}
-->
</style>
<script language="javascript"> 
function save_changes() { document.the_form.process.value="true"; } 
function preview_template() {document.the_form.target="_blank"; document.the_form.process.value="preview template";}
</script>

</head>
<body alink=#333333 vlink=#333333 link=#333333 topmargin=0 leftmargin=2>

<table width=97% cellpadding=0 cellspacing=0 bgcolor=#483D95 align=center valign=top>
<tr><td>
  <table width=100% cellpadding=0 cellspacing=0>
  <tr><td width=17% valign=top bgcolor=#799ae1>
    <table width=100% cellpadding=6 cellspacing=0>
	<tr><td bgcolor=#799ae1>
	<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <tr>
          <TD vAlign=top><IMG src="$imagesurl/images/title.gif" width=200 height=38><BR>
	  <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=20 align=center><font color=#336333><b>注意：總版主可管理帶 (*) 的頁面</b></TD></TR>
	  </TABLE>
	</TD></TR>
 	</TABLE>
        </td></tr>

<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <TBODY>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 管理主欄</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;>> <a href="admin.cgi">管理中心首頁(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="leobbs.cgi">進入您的論壇(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="admin.cgi?action=logout">登出管理中心(*)</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>

<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <TBODY>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 會員管理</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;>> <a href="setmembers.cgi">會員管理/排名(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="usermanager.cgi">會員分類/管理(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="cansale.cgi">文章買賣會員管理(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setmemberbak.cgi">會員數據庫備份/還原</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="resetusr.cgi">會員數目據清空重設</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>

<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <TBODY>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 註冊管理</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;>> <a href="noreg.cgi">保留特殊會員名稱(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="noregemail.cgi">保留特殊 Email(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setallowemail.cgi">限制(准許\)可註冊的電子郵件名(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="noregip.cgi">禁止特殊 IP 註冊會員(*)</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>

<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <TBODY>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 論壇管理</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;>> <a href="setforums.cgi">論壇設定和管理</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setcatedisplay.cgi">論壇區資料排列模式</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="merge.cgi">合併論壇</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="adbackup.cgi">論壇備份到本地/還原</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="shareforums.cgi">聯盟論壇管理</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="rebuildall.cgi">重建所有論壇</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="rebuildmain.cgi">重新建立論壇主界面(*)</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>

<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <TBODY>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 設定管理</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;>> <a href="foruminit.cgi">初始化論壇資料</a> <B>(注)</B></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setstyles.cgi">預設風格設定</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setvariables.cgi">基本變數設定</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setmpic.cgi">論壇顏色&圖片設定</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setbank.cgi">論壇銀行設定</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setcity.cgi">論壇貨幣設定</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setawards.cgi">論壇勛章管理</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setmembertitles.cgi">會員等級設定</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setjhmp.cgi">論壇門派管理器</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setemoticon.cgi">表情轉換設定管理</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setemotes.cgi">EMOTE 設定</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setad.cgi">文章隨機廣告管理器</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>

<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <TBODY>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 限制管理</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;>> <a href="setbadwords.cgi">詞語自動轉換</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setfilter.cgi">不良詞語過濾(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setipbans.cgi">IP 禁止(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setidbans.cgi">ID 禁止(*)</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>

<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <TBODY>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 特殊功\能</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;>> <a href="exportemail.cgi">匯出會員 Email 地址</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="massmsg.cgi">群發短訊</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="mailmembers.cgi">Email 群發</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="filemanage.cgi">論壇檔案超級管理器</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setplugin.cgi">論壇$div_out掛程式設定</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setskin.cgi">管理區$div_out掛程式設定</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>

<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <TBODY>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 論壇編輯</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;>> <a href="setregrules.cgi">修改註冊聲明</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setregmsg.cgi">修改短訊歡迎信息</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="settemplate.cgi">編輯論壇模板</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="setcss.cgi">論壇 CSS 控制碼建立</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="newstyles.cgi">新建/修改風格檔案</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>

<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <TBODY>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 其它設定</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;>> <a href="userratinglog.cgi">會員威望積分操$div_edit記錄(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="baddellogs.cgi">論壇安全記錄</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="adminloginlogs.cgi">管理區安全記錄</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="sizecount.cgi">統計論壇使用空間</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="vercheck.cgi">論壇版本/更新</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>
    ~;
    
    if (-e "${lbdir}data/leoskin.cgi"){
	eval { require "${lbdir}data/leoskin.cgi"; };
	if ($@) {
	} else {
	    if ($skin1name ne ""){
	        print qq~
<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <TBODY>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 論壇$div_out掛程式</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
	~;    
        print qq~<TR><TD height=18>&nbsp;>> <a href="$skin1url">$skin1name</a></TD></TR>~ if ($skin1name ne "");
        print qq~<TR><TD height=18>&nbsp;>> <a href="$skin2url">$skin2name</a></TD></TR>~ if ($skin2name ne "");
        print qq~<TR><TD height=18>&nbsp;>> <a href="$skin3url">$skin3name</a></TD></TR>~ if ($skin3name ne "");
        print qq~<TR><TD height=18>&nbsp;>> <a href="$skin4url">$skin4name</a></TD></TR>~ if ($skin4name ne "");
        print qq~<TR><TD height=18>&nbsp;>> <a href="$skin5url">$skin5name</a></TD></TR>~ if ($skin5name ne "");
        print qq~<TR><TD height=18>&nbsp;>> <a href="$skin6url">$skin6name</a></TD></TR>~ if ($skin6name ne "");
        print qq~<TR><TD height=18>&nbsp;>> <a href="$skin7url">$skin7name</a></TD></TR>~ if ($skin7name ne "");
        print qq~<TR><TD height=18>&nbsp;>> <a href="$skin8url">$skin8name</a></TD></TR>~ if ($skin8name ne "");
        print qq~<TR><TD height=18>&nbsp;>> <a href="$skin9url">$skin9name</a></TD></TR>~ if ($skin9name ne "");
        print qq~<TR><TD height=18>&nbsp;>> <a href="$skin10url">$skin10name</a></TD></TR>~ if ($skin10name ne "");
        print qq~</TABLE></TD></TR></TABLE></td></tr>~;
	    }
        }
    }

    print qq~
<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● 管理主欄</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;>> <a href="admin.cgi">管理中心首頁(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="leobbs.cgi">進入您的論壇(*)</a></TD></TR>
              <TR><TD height=18>&nbsp;>> <a href="admin.cgi?action=logout">登出管理中心(*)</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>

<tr><td bgcolor=#799ae1>
<TABLE align=left cellPadding=0 cellSpacing=0 width=200>
        <tr>
          <TD background=$imagesurl/images/title_bg_show.gif class=menu_title height=25 onmouseout="this.className='menu_title';" onmouseover="this.className='menu_title2';">
          <SPAN>● LeoBBS 信息</SPAN> </TD></TR>
        <TR>
          <TD>
            <TABLE align=center cellPadding=0 cellSpacing=0 width=200 class=sec_menu>
              <TR><TD height=18>&nbsp;程式版本: $versionnumber</TD></TR>
              <TR><TD height=18>&nbsp;版權所有: <a href="http://www.leobbs.com/" target=_blank>雷傲科技</a></TD></TR>
              <TR><TD height=18>&nbsp;技術支援: <a href="http://bbs.leobbs.com/" target=_blank>極酷超級論壇</a></TD></TR>
              <TR><TD height=18>&nbsp;繁化支援: <a href="http://www.hklight.net/" target=_blank>勁秋論壇</a></TD></TR>
	    </TABLE>
	    </TD></TR></TABLE>
</td></tr>

</table>
    </td><td width=70% valign=top bgcolor=#ffffff>
    <table width=100% cellpadding=5 cellspacing=0><tr><td bgcolor=#799ae1><img src=$imagesurl/images/none.gif width=0 height=6></td></tr></table><table width=100% cellpadding=6 cellspacing=0><tr><td bgcolor=#799ae1>
    ~;
}
1;  
