📄 conf.asp
字号:
ErrMsg=ErrMsg & "<br><li>请指定备份目录!</li>"
end if
if bkdbname="" then
FoundErr=True
ErrMsg=ErrMsg & "<br><li>请指定备份文件名</li>"
end if
If FoundErr=True then exit sub
bkfolder=server.MapPath(bkfolder)
Set Fso=server.createobject("scripting.filesystemobject")
if fso.FileExists(dbpath) then
If fso.FolderExists(bkfolder)=false Then
fso.CreateFolder(bkfolder)
end if
fso.copyfile dbpath,bkfolder & "\" & bkdbname & ".asa"
Response.write("<script>alert('数据库备份成功,备份的数据库为"&bkdbname&".asa!');location.href=""ConF.asp"";</script>")
Response.End
Else
response.write("<script>alert('找不到源数据库文件,请检查conn.asp中的配置。');history.go(-1)</script>")
End if
end sub
else
%><FORM name=form action="Conf.asp?menu=edit" method=post>
<TABLe cellSpacing=1 cellPadding=0 width=100% align=center bgColor=#000000 border=0>
<TR><TD align=left colspan="4" bgcolor=#FFFFFF class=name background=images/cent.gif height=25> <B><%response.write webname%></B>学生成绩查询系统基本信息配置</TD></tr>
<tr bgcolor=#FFFFFF><td height=35 align="left"> 帐号: <font color=red><INPUT type="text" maxLength=250 size=15 name=XX_A_Name value="<%=Rs("A_Name")%>"></font> 密码: <INPUT type="password" maxLength=250 size=15 name=XX_A_Pass value="<%=Rs("A_Pass")%>" onclick="this.value=''"> 网站名称: <INPUT maxLength=250 size=25 name=webname value="<%=webname%>"> 网站网址: <INPUT maxLength=250 size=25 name=weburl value="<%=weburl%>"></td></tr>
<tr bgcolor=#FFFFFF><td height=35 align="left"> 锁定注册: <input type="radio" value="1" name="XX_A_LockReg"<%If UserR_LocK<>0 Then Response.Write " checked"%> style="border-width: 0">是 <input type="radio" value="0" name="XX_A_LockReg"<%If UserR_LocK=0 Then Response.Write " checked"%> style=" border-width: 0">否 最高学制(年): <INPUT maxLength=250 size=5 name=A_ZGXZ value="<%=XX_A_ZGXZ%>"> 数据保存年数: <INPUT maxLength=250 size=5 name=A_Year value="<%=A_Year%>"></td></tr>
<TR><TD align=center colspan="4" bgcolor=#FFFFFF class=name background=images/cent.gif height=25><INPUT type=submit value=提交文件 name=B1> <INPUT type=reset value=重写文件 name=B2></TD></TR></FORM>
</TABLE>
<br>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor=#000000>
<form method="post" action="ConF.asp?menu=Backup">
<tr bgcolor="#FFFFFF"> <td height="25" colspan="3" align="left" valign="middle" background=images/cent.gif> <b>系统数据备份</b></td></tr>
<tr bgcolor="#FFFFFF"><td height="30" align="left" colspan="2"> 备份目录:<input name=bkfolder type=text class="input" value="databak" size=9> 备份名称:<input name=bkDBname type=text class="input" value="<%=(date()&"-"&Rndword(2))%>" size=12> 不用输入文件名后缀(默认为“.asa”);如有同名文件,将覆盖。</td><td width="90" align="center"><input name="submit" type=submit value=" 备 份 "></td></tr>
</form>
<tr bgcolor="#FFFFFF"> <td height="25" colspan="3" align="left" valign="middle" background=images/cent.gif> <b>系统数据概况</b></td></tr>
<tr bgcolor="#FFFFFF"><td width="20%" height="30" align="center" colspan="3"><a href=ConF.asp?menu=Clean>更新统计</a> 专业共计:<font color=red><%=Conn.Execute("Select Count(Yz_Id) From [T_Yz] Where Yz_FollowId<>0")(0)%></font>个; 学生共计:<font color=red><%=Conn.Execute("Select Count(id) From [T_Stu]")(0)%></font>人; 教师共计:<font color=red><%=Conn.Execute("Select Count(T_Id) From [T_TeaC]")(0)%></font>人; 科目共计:<font color=red><%=Conn.Execute("Select Count(C_Id) From [T_Ke]")(0)%></font>门; 选课共计:<font color=red><%=Conn.Execute("Select Count(C_Id) From [T_Class]")(0)%></font>门; 留言共计:<font color=red><%=Conn.Execute("Select Count(G_Id) From [T_GBook]")(0)%></font>条; 日志共计:<font color=red><%=Conn.Execute("Select Count(L_Use) From [T_Log]")(0)%></font>条</td></tr>
<%
If Request("SuperPass")<>"" Then Session("SuperPass")=Request("SuperPass")
If Session("SuperPass")="123456789" Then
%>
<tr bgcolor="#FFFFFF"> <td height="25" colspan="3" align="left" valign="middle" background=images/cent.gif> <b>系统学生管理</b></td></tr>
<form method="post" action="ConF.asp?menu=LocktuD">
<tr bgcolor="#FFFFFF"><td width="20%" height="30" align="center">批量锁定学生:<BR></td><td height="30"> <select name="X_S_Year"><%dim X_Year_1,i_1:i_1=0
Do until i_1=int(XX_A_ZGXZ)+2
X_Year_1=DatePart("yyyy",now())-XX_A_ZGXZ+i_1-1
Response.Write "<option value="&X_Year_1
Response.Write ">"&X_Year_1&"</option>"
i_1=i_1+1
loop
%>
</select> <select name="X_xy">
<option value="all">锁定所有专业学生</option>
<%
Set Rs_Yz=Conn.Execute("select * from T_Yz where Yz_FollowId=0 order by Yz_SortNum")
do until Rs_Yz.eof
Response.Write "<option value="&Rs_Yz("Yz_Id")&" "
Response.Write ">"&Rs_Yz("Yz_Name")&"</option>"
Set Rs_YzF=Conn.Execute("Select * from T_Yz where Yz_FollowId="&Rs_Yz("Yz_Id")&" order by Yz_SortNum")
do until Rs_YzF.eof
Response.Write "<option value="&Rs_YzF("Yz_Id")&" "
Response.Write ">|-"&Rs_YzF("Yz_Name")&"</option>"
Rs_YzF.movenext
loop
Rs_YzF.close
set Rs_YzF=nothing
Rs_Yz.movenext
loop
Rs_Yz.close
Set Rs_Yz=nothing
%></select></td><td width="90" align="center"> <input name="submit" type=submit class="button" value=" 锁 定 "></td></tr></form>
<form method="post" action="ConF.asp?menu=UnLocktuD">
<tr bgcolor="#FFFFFF"><td width="20%" height="30" align="center">批量显示学生:<BR></td><td height="30"> <select name="X_S_Year"><%dim X_Year_2,i_2:i_2=0
Do until i_2=int(XX_A_ZGXZ)+2
X_Year_2=DatePart("yyyy",now())-XX_A_ZGXZ+i_2-1
Response.Write "<option value="&X_Year_2
Response.Write ">"&X_Year_2&"</option>"
i_2=i_2+1
loop
%>
</select> <select name="X_xy">
<option value="all">显示所有专业学生</option>
<%
Set Rs_Yz=Conn.Execute("select * from T_Yz where Yz_FollowId=0 order by Yz_SortNum")
do until Rs_Yz.eof
Response.Write "<option value="&Rs_Yz("Yz_Id")&" "
Response.Write ">"&Rs_Yz("Yz_Name")&"</option>"
Set Rs_YzF=Conn.Execute("Select * from T_Yz where Yz_FollowId="&Rs_Yz("Yz_Id")&" order by Yz_SortNum")
do until Rs_YzF.eof
Response.Write "<option value="&Rs_YzF("Yz_Id")&" "
Response.Write ">|-"&Rs_YzF("Yz_Name")&"</option>"
Rs_YzF.movenext
loop
Rs_YzF.close
set Rs_YzF=nothing
Rs_Yz.movenext
loop
Rs_Yz.close
Set Rs_Yz=nothing
%></select></td><td width="90" align="center"> <input name="submit" type=submit class="button" value=" 显 示 "></td></tr></form>
<TR><TD align=center colspan="3" bgcolor=#FFFFFF height=20></TD></tr>
<form method="post" action="ConF.asp?menu=delStuD">
<tr bgcolor="#FFFFFF"><td width="20%" height="30" align="center">学生批量清理:<BR></td><td height="30"> <select name="X_S_Year"><%dim X_Year,i:i=0
Do until i=int(XX_A_ZGXZ)+2
X_Year=DatePart("yyyy",now())-XX_A_ZGXZ+i-1
Response.Write "<option value="&X_Year
Response.Write ">"&X_Year&"</option>"
i=i+1
loop
%>
</select> 请输入要清理哪年以前的所有留言,选择年份就可!</td><td width="90" align="center"> <input onclick=checkclick('您真的要清理数据吗?\n\n请您在清理前最好检查下您的选项\n\n清空前请备份数据库,清空后不可还原!') name="submit" type=submit class="button" value=" 清 理 "></td></tr></form>
<form method="post" action="ConF.asp?menu=delGBook">
<tr bgcolor="#FFFFFF"> <td height="25" colspan="3" align="left" valign="middle" background=images/cent.gif> <b>系统留言管理</b></td></tr>
<tr bgcolor="#FFFFFF"><td width="20%" height="30" align="center">系统留言清理:<BR></td><td height="30"> <input name="X_G_day" type=text class="input" value="400" size="3" onkeyup=if(isNaN(this.value))this.value='400'> 请输入要清理多少天以前的所有留言,只输入天数就可!</td><td width="90" align="center"> <input name="submit" type=submit class="button" value=" 清 理 "></td></tr></form>
<form method="post" action="ConF.asp?menu=delLOG">
<tr bgcolor="#FFFFFF"><td colspan="3" align="left" height="25" background=images/cent.gif> <b>系统日志管理</b></td></tr>
<tr bgcolor="#FFFFFF"><td width="20%" height="25" align="center" class=topic>系统日志清理:</td>
<td height="30"> <input name="X_Day" type=text class="input" value="7" size="3" onkeyup=if(isNaN(this.value))this.value='7'> 请输入要清理多少天以前的系统日志,只输入天数就可!</td>
<td width="90" align="center"><input type="submit" value=" 清 理 " name="Submit"></td></tr></form>
<%
Set Rs_Log=Conn.Execute("Select * From [T_Log] Order BY L_LastT desc")
Do until Rs_Log.eof
Response.Write "<tr bgcolor=""#FFFFFF""><td width=""20%"" height=""25"" align=""center"">"&Rs_Log("L_LastT")&"</td>"
Response.Write "<td colspan=2> ["&Rs_Log("L_IP")&"] "&Rs_Log("L_What")&"</td></tr>"
Rs_Log.MoveNext
Loop
%>
<%Else%>
<form method="post" action="ConF.asp">
<tr bgcolor="#FFFFFF"><td width="20%" height="45" align="left" class=topic colspan=3> <font color=red>要对系统数据进行整理请输入超级管理密码</font> <input name="SuperPass" type="password" class="input" size=16> <input type="submit" value="提交" name="Submit"></td></tr></form>
<%End If%>
<form method="post" action="ConF.asp?menu=Compact"><input type="hidden" value="<%Response.Write DBP&DBN%>" name="dbpath">
<tr bgcolor="#FFFFFF"><td colspan="3" align="left" height="25" background=images/cent.gif> <b>压缩系统数据</b></td></tr>
<tr bgcolor="#FFFFFF"><td width="20%" height="25" align="center" class=topic>数据库格式:<BR></td>
<td height="30"> <input type="radio" value="True" name="boolIs97" style="font-family: 宋体; font-size: 9pt; background-color: #FFFFFF; border-style: solid; border-width: 0">Access 97 <input type="radio" value="" name="boolIs97" checked style="font-family: 宋体; font-size: 9pt; background-color: #FFFFFF; border-style: solid; border-width: 0">Access 2000、2002、2003</td>
<td width="90" align="center"><input type="submit" value=" 压 缩 " name="Submit"></td></tr></form>
<tr bgcolor="#FFFFFF"><td colspan="3" align="center" background=images/cent.gif height="25"></td></tr>
</table>
<%
end if
%>
<% Call bottom() %>
</body></html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -