?? adminconfig.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#Include file = "BBSConfig.asp"-->
<!--#include file="Session.asp"-->
<!--#include file = "function.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>基本配置</title>
<link href="Style.css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0">
<%
Sub errorMsg(theError)
response.write"<script language=javascript>alert('"& theError &"');history.back();</script>"
response.End
End Sub
'---------------------------------------
action = trim(request.QueryString("action"))
IF action = "Submit" then
Board_name = replace(Trim(request.Form("Board_name")),"'","")
if Board_name = "" then errorMsg "論壇名稱不可為空!"
Board_Url = replace(Trim(request.Form("Board_Url")),"'","")
Home_name = replace(Trim(request.Form("Home_name")),"'","")
Home_Url = replace(Trim(request.Form("Home_Url")),"'","")
master_Email = replace(Trim(request.Form("master_Email")),"'","")
sendmailserver = replace(Trim(request.Form("sendmailserver")),"'","")
sendEmailuser = replace(Trim(request.Form("sendEmailuser")),"'","")
sendmailPass = replace(Trim(request.Form("sendmailPass")),"'","")
Board_close = trim(request.Form("Board_close"))
if Board_close=1 then Board_close=true
Board_closecause = SetSafeStr(request.Form("Board_closecause"))
userreg=trim(request.Form("userreg"))
if userreg=1 then userreg=true
usernameshort = Trim(request.Form("usernameshort"))
if Not(IsNuMeric(usernameshort)) then ErrorMsg "用戶注冊名最短數(shù)只能為數(shù)字!"
usernamelong = Trim(request.Form("usernamelong"))
if Not(IsNuMeric(usernamelong)) then ErrorMsg "用戶注冊名最長數(shù)只能為數(shù)字!"
useremailonly = trim(request.Form("useremailonly"))
if useremailonly=1 then useremailonly=true
usernamestay = replace(Trim(request.Form("usernamestay")),"'","")
userregagree = SetSafeStr(request.Form("userregagree"))
IPstay = replace(Trim(request.Form("IPstay")),"'","")
useronlinetiem = Trim(request.Form("useronlinetiem"))
if Not(IsNumeric(useronlinetiem)) then errorMsg "刪除無動作用戶時長數(shù)只可為數(shù)字"
homeshowuseronline = trim(request.Form("homeshowuseronline"))
if homeshowuseronline=1 then homeshowuseronline=true
'==========================
set rs = server.CreateObject("adodb.recordset")
rs.open "SELECT * From JBB_config",conn,1,3
rs("Board_name") = Board_name
rs("Board_Url") = Board_Url
rs("Home_name") = Home_name
rs("Home_Url") = Home_Url
rs("master_Email") = master_Email
rs("sendmailserver") = sendmailserver
rs("sendEmailuser") = sendEmailuser
rs("sendmailPass") = sendmailPass
rs("Board_close") = request.Form("Board_close")
rs("Board_closecause") = Board_closecause
rs("userreg") = request.Form("userreg")
rs("useremailonly") = request.Form("useremailonly")
rs("usernameshort") = usernameshort
rs("usernamelong") = usernamelong
rs("usernamestay") = usernamestay
rs("userregagree") = userregagree
rs("IPstay") = IPstay
rs("useronlinetiem") = useronlinetiem
rs("homeshowuseronline") = request.Form("homeshowuseronline")
rs.Update
useronlinecount=rs("useronlinecount")
useronlinecounttime=rs("useronlinecounttime")
rs.close
set rs = Nothing
Application.Lock
Application(JBBMasterCookies&"BBS_Config")=array(Board_name,Board_Url,Home_name,Home_Url,master_Email,Board_close,Board_closecause,userreg,usernameshort,usernamelong,useremailonly,usernamestay,userregagree,IPstay,useronlinetiem,homeshowuseronline,useronlinecount,useronlinecounttime)
Application.UnLock
response.write "<br><br> 感謝更新!~"
else
%>
<table width="560" height="84" border="0" align="center" cellpadding="3" cellspacing="0">
<tr>
<td height="22" colspan="3"> </td>
</tr>
<tr>
<td height="23" colspan="3"><strong>論壇設(shè)置:</strong></td>
</tr>
<tr>
<td width="207">
<div align="center"><a href="#1">打開或者關(guān)閉論壇</a></div></td>
<td width="153">
<div align="center"><a href="#2">常規(guī)設(shè)置</a></div></td>
<td width="182"><a href="#4">用戶注冊選項(xiàng)</a></td>
</tr>
<tr>
<td>
<div align="center"><a href="#3">SMTP服務(wù)器設(shè)置</a></div></td>
<td>
<div align="center"><a href="#6">IP 禁止</a></div></td>
<td><a href="#8">在線用戶選項(xiàng)</a></td>
</tr>
<tr>
<td height="30" colspan="3"><a name="1"></a> </td>
</tr>
</table>
<%
set rs = server.CreateObject("adodb.recordset")
rs.open "select * From JBB_config",conn,1,1
if Not(rs.Bof and rs.Eof) then
Board_name = Rtrim(rs("Board_name"))
Board_Url = Rtrim(rs("Board_Url"))
Home_name = Rtrim(rs("Home_name"))
Home_Url = Rtrim(rs("Home_Url"))
master_Email = Rtrim(rs("master_Email"))
sendmailserver = Rtrim(rs("sendmailserver"))
sendEmailuser = Rtrim(rs("sendEmailuser"))
sendmailPass = Rtrim(rs("sendmailPass"))
Board_closecause = GetSafeStr(rs("Board_closecause"))
usernameshort = Rtrim(rs("usernameshort"))
usernamelong = Rtrim(rs("usernamelong"))
usernamestay = Rtrim(rs("usernamestay"))
userregagree = GetSafeStr(rs("userregagree"))
IPstay = Rtrim(rs("IPstay"))
useronlinetiem = Rtrim(rs("useronlinetiem"))
End if
%>
<table width="560" border="0" align="center" cellpadding="0" cellspacing="0">
<form name="form1" method="post" action="?action=Submit">
<tr>
<td><table width="560" height="122" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#EFEFE7">
<td height="22" colspan="2"><strong>打開或者關(guān)閉論壇</strong></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td width="190" height="76">關(guān)閉論壇:<br>
有的時候你需要關(guān)閉論壇, 比如進(jìn)行維護(hù)或者升級, 這時候訪問你的論壇的用戶會得到一條論壇暫時關(guān)閉的信息. </td>
<td width="347" bgcolor="#FFFFFF"> 是
<input name="Board_close" type="radio" value="1" <%if rs("Board_close") then response.write "checked"%>>
否
<input type="radio" name="Board_close" value="0" <%if Not(rs("Board_close")) then response.write "checked"%>>
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">論壇關(guān)閉的原因:<br>
在論壇關(guān)閉時出現(xiàn)這樣的信息.</td>
<td><textarea name="Board_closecause" cols="40" rows="5" id="textarea"><%=Board_closecause%></textarea></td>
</tr>
</table>
<font color="#000000"><strong><a name="2"></a></strong></font><br>
<table width="560" height="72" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#EFEFE7">
<td height="22" colspan="2"><strong>常規(guī)設(shè)置</strong></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td width="232" height="23">論壇名稱<br>
論壇名稱. 這將是所有頁面的窗口標(biāo)題.<br></td>
<td width="305"> <input name="Board_name" type="text" id="Board_name2" value="<%=Board_name%>" maxlength="30">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">主頁名稱<br>
主頁名稱. 這將顯示在每頁的底部.<br></td>
<td><input name="Home_Name" type="text" id="Home_Name2" value="<%=Home_name%>" maxlength="30"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">論壇URL<br>
論壇的URL(不要以 "/" 結(jié)尾).<br></td>
<td><input name="Board_url" type="text" id="Board_url2" value="<%=Board_Url%>" maxlength="80"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">主頁的URL<br>
主頁的URL. 這將顯示在每頁的底部.<br></td>
<td><input name="Home_Url" type="text" id="Home_Url3" value="<%=Home_Url%>" maxlength="80"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">管理員郵箱地址<br>
管理員的郵箱地址.<br></td>
<td><input name="master_email" type="text" id="master_email5" value="<%=master_email%>" maxlength="80"></td>
</tr>
</table>
<font color="#000000"><strong><a name="3"></a></strong></font><br>
<table width="560" height="96" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#EFEFE7">
<td height="22" colspan="2"><strong>SMTP服務(wù)器設(shè)置</strong></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td width="232" height="23">SMTP服務(wù)器:<br>
用來發(fā)送Email服務(wù)器<br> </td>
<td width="305"><input name="sendmailserver" type="text" id="sendmailserver4" value="<%=sendmailserver%>" maxlength="80">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">SMTP用戶名:<br>
用來發(fā)送Email的帳號 </td>
<td><input name="sendEmailuser" type="text" id="sendEmailuser4" value="<%=sendEmailuser%>" maxlength="80"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">SMTP用戶密碼:<br>
用來發(fā)送Email的用戶密碼</td>
<td><input name="sendmailPass" type="password" id="sendmailPass6" value="<%=sendmailPass%>" maxlength="80"></td>
</tr>
</table>
<font color="#000000"><strong><a name="4"></a></strong></font><br>
<table width="560" height="96" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#EFEFE7">
<td height="22" colspan="2"><strong>用戶注冊選項(xiàng)</strong></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td width="232" height="23">允許注冊:<br>
如果點(diǎn)選否,論壇將不允許新用戶注冊 <br> </td>
<td width="305">是
<input type="radio" name="userreg" value="1" <%if rs("userreg") then response.write "checked"%>>
否
<input type="radio" name="userreg" value="0" <%if Not(rs("userreg")) then response.write "checked"%>> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">用戶名最短:<br>
用戶注冊時用戶名將不能少于此數(shù)</td>
<td><input name="usernameshort" type="text" id="usernameshort" value="<%=usernameshort%>" size="8" maxlength="5"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">用戶名最長:<br>
用戶注冊時用戶名將不能多于此數(shù)</td>
<td><input name="usernamelong" type="text" id="usernamelong" value="<%=usernamelong%>" size="8" maxlength="5"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">Email唯一:<br>
是否需要一個Email只可注冊一位用戶</td>
<td>是
<input name="useremailonly" type="radio" value="1" <%if rs("useremailonly") then response.write "checked"%>>
否
<input type="radio" name="useremailonly" value="0" <%if Not(rs("useremailonly")) then response.write "checked"%>></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">用戶名禁止:<br>
禁止注冊的用戶名,多個用分號分開</td>
<td><input name="usernamestay" type="text" id="usernamestay2" value="<%=usernamestay%>" size="40"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">注冊聲明:<br>
用戶注冊時需同意的論壇聲明</td>
<td><textarea name="userregagree" cols="40" rows="10" id="textarea2"><%=userregagree%></textarea></td>
</tr>
</table>
<br>
<a name="6"></a><br>
<table width="560" height="48" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#EFEFE7">
<td height="22" colspan="2"><strong>IP 禁止</strong></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td width="232" height="23">禁止的IP地址:<br>
IP 地址禁止列表: 你可以禁止某個IP地址的用戶注冊和發(fā)表信息, 輸入完整的IP地址(比如243.21.31.7),或者是一部分的IP地址(比如243.21.31),
論壇會匹配每個你輸入的IP地址的開頭幾位, 如果你輸入IP地址243.21.31,IP地址為243.21.31.5的用戶將不能注冊.
同樣的, 如果你輸入的IP地址為243.21, 那么IP地址為243.21.3.44的用戶就不能注冊, 因此請小心使用IP禁止列表.
每個IP地址間以空格間隔, 被禁止的地址的用戶將無法注冊和發(fā)表帖子.<br> <br> </td>
<td width="305"><textarea name="IPstay" cols="40" rows="8" id="textarea3"><%=IPstay%></textarea>
</td>
</tr>
</table>
<br>
<a name="8" id="8"></a><br>
<table width="560" height="72" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#CCCCCC">
<tr bgcolor="#EFEFE7">
<td height="22" colspan="2"><strong>在線用戶設(shè)置</strong></td>
</tr>
<tr>
<td width="232" height="23" bgcolor="#FFFFFF">刪除無動作用戶時長<br>
用戶多長時間無動作將不顯示在在線列表中?請輸入數(shù)字<br> </td>
<td width="305" bgcolor="#FFFFFF">
<input name="useronlinetiem" type="text" id="useronlinetiem" value="<%=useronlinetiem%>" size="10" maxlength="5">
分鐘 </td>
</tr>
<tr>
<td height="23" valign="top" bgcolor="#FFFFFF">在論壇首頁顯示在線列表?</td>
<td valign="top" bgcolor="#FFFFFF">是
<input type="radio" name="homeshowuseronline" value="1" <%if rs("homeshowuseronline") then response.write "checked"%>>
否
<input type="radio" name="homeshowuseronline" value="0" <%if Not(rs("homeshowuseronline")) then response.write "checked"%>></td>
</tr>
</table>
<br>
<br>
<table width="560" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><div align="center">
<input name="Submit" type="submit" class="form1" value="更新">
<input name="Submit2" type="reset" class="form1" value="重設(shè)">
</div></td>
</tr>
</table>
<br>
</td>
</tr></form>
</table>
<%
rs.close
set rs = Nothing
'====================
End IF
set conn = nothing
%>
</body>
</html>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -