📄 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 "用户注册名最短数只能为数字!"
usernamelong = Trim(request.Form("usernamelong"))
if Not(IsNuMeric(usernamelong)) then ErrorMsg "用户注册名最长数只能为数字!"
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 "删除无动作用户时长数只可为数字"
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>论坛设置:</strong></td>
</tr>
<tr>
<td width="207">
<div align="center"><a href="#1">打开或者关闭论坛</a></div></td>
<td width="153">
<div align="center"><a href="#2">常规设置</a></div></td>
<td width="182"><a href="#4">用户注册选项</a></td>
</tr>
<tr>
<td>
<div align="center"><a href="#3">SMTP服务器设置</a></div></td>
<td>
<div align="center"><a href="#6">IP 禁止</a></div></td>
<td><a href="#8">在线用户选项</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>打开或者关闭论坛</strong></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td width="190" height="76">关闭论坛:<br>
有的时候你需要关闭论坛, 比如进行维护或者升级, 这时候访问你的论坛的用户会得到一条论坛暂时关闭的信息. </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">论坛关闭的原因:<br>
在论坛关闭时出现这样的信息.</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>常规设置</strong></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td width="232" height="23">论坛名称<br>
论坛名称. 这将是所有页面的窗口标题.<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(不要以 "/" 结尾).<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服务器设置</strong></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td width="232" height="23">SMTP服务器:<br>
用来发送Email服务器<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>
用来发送Email的帐号 </td>
<td><input name="sendEmailuser" type="text" id="sendEmailuser4" value="<%=sendEmailuser%>" maxlength="80"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">SMTP用户密码:<br>
用来发送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>用户注册选项</strong></td>
</tr>
<tr valign="top" bgcolor="#FFFFFF">
<td width="232" height="23">允许注册:<br>
如果点选否,论坛将不允许新用户注册 <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>
用户注册时用户名将不能少于此数</td>
<td><input name="usernameshort" type="text" id="usernameshort" value="<%=usernameshort%>" size="8" maxlength="5"></td>
</tr>
<tr bgcolor="#FFFFFF">
<td valign="top">用户名最长:<br>
用户注册时用户名将不能多于此数</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地址的用户注册和发表信息, 输入完整的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地址间以空格间隔, 被禁止的地址的用户将无法注册和发表帖子.<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>在线用户设置</strong></td>
</tr>
<tr>
<td width="232" height="23" bgcolor="#FFFFFF">删除无动作用户时长<br>
用户多长时间无动作将不显示在在线列表中?请输入数字<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="重设">
</div></td>
</tr>
</table>
<br>
</td>
</tr></form>
</table>
<%
rs.close
set rs = Nothing
'====================
End IF
set conn = nothing
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -