📄 sysadm_para.asp
字号:
<!--#INCLUDE FILE="setup.asp" -->
<!--#include file=char.asp-->
<!--#include file=checkuser.asp-->
<!--#include file=email.asp-->
<title><%=SchoolmateName%>--管理页面</title>
<!--#include file="css.asp"-->
<body alink=#333333 vlink=#333333 link=#333333 topmargin=0 bgcolor=<%=bodycolor%>>
<%
if not sysadmin or session("adminlogin")<>"OK" then
Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=sysadm_index.asp target=_top>登陆</a>后进入。"
call Error("Information",errmsg)
else
call main()
set rs=nothing
call endconnection()
end if
sub main()
%><BR>
<table cellpadding=0 cellspacing=0 border=0 width=90% bgcolor=<%=tablebordercolor%> align=center>
<tr>
<td>
<table cellpadding=3 cellspacing=1 border=0 width=100%>
<tr bgcolor='<%=Tabletitlecolor%>'>
<td><font color="<%=TablefontColor%>">欢迎<b><%=membername%></b>进入管理页面</font>
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="100%" valign=top><font color="<%=TableContentColor%>">
<%
if request("action")="update" then
call updatepara()
else
call paraform()
end if
%></font>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
end sub
sub paraform()
%>
<BR>
<form method="POST" action=sysadm_para.asp name=paraform>
<input type=hidden name=action value=update>
<table width=85% bgcolor=<%=tablebordercolor%> cellspacing=1 cellpadding=5 align=center>
<tr bgcolor=<%=tablebodycolor1%>><td colspan=2>同学录基本参数</td></tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>学校名称</B></td>
<td width="60%">
<input type="text" name="schoolname" size="35" value="<%=schoolname%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>同学录名称</B></td>
<td width="60%">
<input type="text" name="schoolmatename" size="35" value="<%=schoolmatename%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>同学录URL</B></td>
<td width="60%">
<input type="text" name="schoolmateurl" size="50" value="<%=schoolmateurl%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>同学录管理员Email</B></td>
<td width="60%">
<input type="text" name="systememail" size="35" value="<%=systememail%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>每位注册用户最多加入班级数</B></td>
<td width="60%">
<input type="text" name="maxjoinclass" size="35" value="<%=maxjoinclass%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>打开/关闭注册新用户功能</B></td>
<td width="60%">
<input type="checkbox" name="RegEnabled" value="1" <%if RegEnabled=true then response.write "checked"%>>允许新用户注册
</td>
</tr>
<tr bgcolor=<%=tablebodycolor1%>><td colspan=2>发送邮件参数</td></tr>
<script language=javascript>
function relating(){
var cindex=document.paraform.EmailFlag.selectedIndex;
if (cindex==0||cindex==3)
{server.style.display='none'}
else
{server.style.display=''}
if(cindex==1)
{account.style.display='';
pwd.style.display='';}
else
{account.style.display='none';
pwd.style.display='none'}
}
</script>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>发送邮件组件</B></td>
<td width="60%">
<select name="EmailFlag" onchange="relating()">
<option value="0" <%if EmailFlag=0 then%>selected<%end if%>>不支持
<option value="4" <%if EmailFlag=4 then%>selected<%end if%>>JMAIL.Message
<option value="1" <%if EmailFlag=1 then%>selected<%end if%>>JMAIL.SMTPMail
<option value="2" <%if EmailFlag=2 then%>selected<%end if%>>CDONTS
<option value="3" <%if EmailFlag=3 then%>selected<%end if%>>ASPEMAIL
</select>
</td></tr>
<tr bgcolor="<%=tablebodycolor2%>" id="server" <%if EmailFlag=0 or EmailFlag=2 then%>style="DISPLAY: none"<%end if%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>SMTP SERVER地址</B></td>
<td width="60%">
<input type="text" name="SMTPServer" size="35" value="<%=SMTPServer%>">
</td>
</tr>
<tr bgcolor="<%=tablebodycolor2%>" id="account" <%if EmailFlag<>4 then%>style="DISPLAY: none"<%end if%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>SMTP SERVER帐号</B></td>
<td width="60%">
<input type="text" name="SMTPAccount" size="35" value="<%=SMTPAccount%>" >
</td>
</tr>
<tr bgcolor="<%=tablebodycolor2%>" id="pwd" <%if EmailFlag<>4 then%>style="DISPLAY: none"<%end if%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>SMTP SERVER密码</B></td>
<td width="60%">
<input type="text" name="SMTPPwd" size="35" value="<%=SMTPPwd%>" >
</td>
</tr>
<tr bgcolor=<%=tablebodycolor1%>><td colspan=2>留言板参数</td></tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>每页显示留言数</B></td>
<td width="60%">
<input type="text" name="pagesize" size="35" value="<%=pagesize%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>最大留言长度</B>(KBytes)</td>
<td width="60%">
<input type="text" name="maxboardsize" size="35" value="<%=maxboardsize%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>签写留言/帖子模式</B></td>
<td width="60%">
<input type="checkbox" name="signmodeflag" value="1" <%if signmodeflag=true then response.write "checked"%>>使用高级发贴模式
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>打开/关闭UBB标签</B></td>
<td width="60%">
<input type="checkbox" name="ubbflag" value="1" <%if ubbflag=true then response.write "checked"%>>打开UBB标签
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>显示/关闭用户来源鉴定</B></td>
<td width="60%">
<input type="checkbox" name="fromflag" value="1" <%if fromflag=true then response.write "checked"%>>显示用户来源
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>不良语句过滤</B></td>
<td width="60%">
<input type="text" name="badwords" size="50" value="<%=badwords%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor1%>><td colspan=2>照片上传参数</td></tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>打开/关闭上传功能</B></td>
<td width="60%">
<input type="checkbox" name="uploadflag" value="1" <%if uploadflag=true then response.write "checked"%>>允许用户上传图片功能
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>图片上传目录</B></td>
<td width="60%">
<input type="text" name="photopath" size="35" value="<%=photopath%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>最大上传图片大小</B>(KBytes)</td>
<td width="60%">
<input type="text" name="MaxPhotoSize" size="35" value="<%=MaxPhotoSize%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>班级相册大小</B>(MBytes)</td>
<td width="60%">
<input type="text" name="MaxAlbumSize" size="35" value="<%=MaxAlbumSize%>">
</td>
</tr>
<tr bgcolor=<%=Tabletitlecolor%>>
<td height="23" colspan="3" align=right >
<input type="submit" name="submit" value="修改">
</td>
</tr>
</table>
</form>
<br>
<%
end sub
sub updatepara()
set rs=server.createobject("adodb.recordset")
sql="Select * from [config]"
rs.open sql,conn,1,3
if Request("schoolname")="" then
errmsg = errmsg + "<br>" + "<li>请填学校名称!</li>"
Founderr=true
else
rs("schoolname") = Request("schoolname")
end if
if Request("schoolmatename")="" then
errmsg = errmsg + "<br>" + "<li>请填同学录名称!</li>"
Founderr=true
else
rs("schoolmatename") = Request("schoolmatename")
end if
if Request("schoolmateurl")="" then
errmsg = errmsg + "<br>" + "<li>请填同学录主页地址!</li>"
Founderr=true
else
rs("schoolmateurl") = Request("schoolmateurl")
end if
if Request("systememail")="" then
errmsg = errmsg + "<br>" + "<li>请填同学录管理员邮件地址!</li>"
Founderr=true
else
rs("systememail") = Request("systememail")
end if
if Request("maxjoinclass")="" then
errmsg = errmsg + "<br>" + "<li>请填最多允许加入班级数!</li>"
Founderr=true
else
rs("maxjoinclass") = Request("maxjoinclass")
end if
if Request("RegEnabled")="1" then
rs("RegEnabled")=true
else
rs("RegEnabled")=false
end if
mailtype=request("emailflag")
rs("emailflag")=mailtype
if (mailtype<>0 and mailtype<>2) and request("smtpserver")="" then
errmsg = errmsg + "<br>" + "<li>请填SMTP服务器地址!</li>"
Founderr=true
else
rs("smtpserver")=trim(request("smtpserver"))
end if
'if mailtype=1 and request("smtpaccount")="" then
'errmsg = errmsg + "<br>" + "<li>请填SMTP服务器帐号!</li>"
'Founderr=true
'else
rs("smtpaccount")=trim(request("smtpaccount"))
'end if
'if mailtype=1 and request("smtppwd")="" then
'errmsg = errmsg + "<br>" + "<li>请填SMTP服务器密码!</li>"
'Founderr=true
'else
rs("smtppwd")=trim(request("smtppwd"))
'end if
if Request("pagesize")="" then
errmsg = errmsg + "<br>" + "<li>请填每页显示留言数!</li>"
Founderr=true
else
rs("pagesize") = Request("pagesize")
end if
if Request("maxboardsize")="" then
errmsg = errmsg + "<br>" + "<li>请填最大留言长度!</li>"
Founderr=true
else
rs("maxboardsize") = Request("maxboardsize")
end if
if Request("signmodeflag")="1" then
rs("signmodeflag")=true
else
rs("signmodeflag")=false
end if
if Request("ubbflag")="1" then
rs("ubbflag")=true
else
rs("ubbflag")=false
end if
if Request("fromflag")="1" then
rs("fromflag")=true
else
rs("fromflag")=false
end if
if Request("badwords")="" then
errmsg = errmsg + "<br>" + "<li>请输入不良语句过滤字符!</li>"
Founderr=true
else
rs("badwords") = Request("badwords")
end if
if Request("uploadflag")="1" then
rs("uploadflag")=true
else
rs("uploadflag")=false
end if
if Request("photopath")="" then
errmsg = errmsg + "<br>" + "<li>请输入上传图片目录!</li>"
Founderr=true
else
rs("photopath") = Request("photopath")
end if
if Request("MaxPhotoSize")="" then
errmsg = errmsg + "<br>" + "<li>请输入最大上传图片大小!</li>"
Founderr=true
else
rs("MaxPhotoSize") = Request("MaxPhotoSize")
end if
if Request("MaxAlbumSize")="" then
errmsg = errmsg + "<br>" + "<li>请输入班级相册容量!</li>"
Founderr=true
else
rs("MaxAlbumSize") = Request("MaxAlbumSize")
end if
if founderr=true then
response.write errmsg
exit sub
end if
rs.update
rs.close
set rs=nothing
%>
<center><p><b>更新同学录参数成功!</b>
<%
end sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -