⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 sysadm_para.asp

📁 功能非常完整的校友录
💻 ASP
字号:
<%response.expires=0%>
<!--#include file="conn.asp"-->
<!--#include file="const.asp" -->
<!--#include file=char.asp-->
<!--#include file=checkuser.asp-->
<title><%=SchoolmateName%>--管理页面</title>
<link rel="stylesheet" type="text/css" href="txl.css">

<body alink=#333333 vlink=#333333 link=#333333 topmargin=0 bgcolor=<%=bodycolor%>>
<%
	if  issystemadmin(0)=false or session("adminlogin")<>"OK" then
		Errmsg=Errmsg+"<br>"+"<li>本页面为管理员专用,请<a href=sysadm_index.asp target=_top>登陆</a>后进入。"
		call Error(errmsg)
	else
		call main()
		set rs=nothing
		call endconnection()
end if

	sub main()
%><BR>
<table cellpadding=0 cellspacing=0 border=0 width=<%=tablewidth%> 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>
<input type=hidden name=action value=update>
<table width=95% bgcolor=<%=tablebordercolor%> cellspacing=1  cellpadding=5>
<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=<%=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="moodurl" size="35" value="<%=moodurl%>">
</td>
</tr>
<tr bgcolor=<%=tablebodycolor2%>>
<td width="40%"><font color="<%=TablefontColor%>"><B>肖像图片目录</B></td>
<td width="60%"> 
<input type="text" name="faceurl" size="35" value="<%=faceurl%>">
</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></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>打开/关闭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>显示/关闭详细IP地址</B></td>
<td width="60%"> 
<input type="checkbox" name="ipflag" value="1" <%if ipflag=true then response.write "checked"%>>显示详细IP地址
</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></td>
<td width="60%"> 
<input type="text" name="MaxPhotoSize" size="35" value="<%=MaxPhotoSize%>">
</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("moodurl")="" then 
errmsg = errmsg + "<br>" + "<li>请填表情图片目录!</li>"
Founderr=true
else
rs("moodurl") = Request("moodurl")
end if

if Request("faceurl")="" then 
errmsg = errmsg + "<br>" + "<li>请填肖像图片目录!</li>"
Founderr=true
else
rs("faceurl") = Request("faceurl")
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("ubbflag")="1" then 
rs("ubbflag")=true
else
rs("ubbflag")=false
end if

if Request("ipflag")="1" then 
rs("ipflag")=true
else
rs("ipflag")=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 founderr=true then
	call error(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 + -