📄 change.asp
字号:
<!--#include file ="setup.asp"-->
<!--#include file ="inc/function.asp"-->
<% validate "login.asp",6
Menu=Server.HTMLEncode(Trim(Request.QueryString("Menu")))
if Request.ServerVariables("request_method")="POST" then
Submit=Request.Form("Submit")
Select Case Submit
Case "确 定"
UseID=Split(request.form("FunInfo1"),",")
For i=0 to UbounD(UseID)
conn.execute("update UserInfo set UserGrade=6 where UserID="&UseID(i))
Next
for each nums in request.form("FunId")
conn.execute("update Functions set FunctionInfo='"&trim(request.form("FunInfo"&nums))&"' where FunctionID="&nums)
if request.form("Oc"&nums) <> "" Then
conn.execute("update Functions set FunctionOC=True where FunctionID="&nums)
Else
conn.execute("update Functions set FunctionOC=False where FunctionID="&nums)
End if
next
Case "备 份"
set MyFileObject=Server.CreateOBject("Scripting.FileSystemObject")
MyFileObject.CopyFile Server.MapPath(Request.Form("yl")),Server.MapPath(Request.Form("bf"))
If Not Err = 0 Then Error 2,"本服务器不支持FSO组件!",""
Set MyFileObject=Nothing
Error 3,"备份成功","?Menu="&Menu
Case "恢 复"
set MyFileObject=Server.CreateOBject("Scripting.FileSystemObject")
MyFileObject.CopyFile Server.MapPath(Request.Form("bf")),Server.MapPath(Request.Form("yl"))
If Not Err = 0 Then Error 2,"本服务器不支持FSO组件!",""
Set MyFileObject=Nothing
Error 3,"数据恢复成功","?Menu="&Menu
End Select
Application(registered&"NewP")=""
response.redirect "?Menu="&Request.QueryString("menu")
Response.End
End if
Call Top
Call table()
Response.Write("<style><!-- TABLE{BORDER-TOP:0px;BORDER-LEFT:0px;BORDER-BOTTOM:1px}TD{BORDER-RIGHT:0px;BORDER-TOP:0px}--></style><br>")
if Menu <> "Establish" and Menu <> "Conceal" and Menu <> "Compress" and Menu <> "Spaces" and Menu <> "Image" Then Error 1,"非法信息登陆!\n您的IP已被记录!",""
Select Case Menu
Case "Establish"
Tab "商城环境变量设置","管理信息设定:"%>
<TABLE borderColor=a4b6d7 cellSpacing=0 cellPadding=0 width="100%" border=1 style="border-collapse: collapse" height="24" bgColor="#ecf5ff">
<form name="form1" method="post">
<TR height=25>
<TD width=11% align=middle> <p align="center">序号</TD>
<TD align=middle width="28%"> <div align="center">变量名称</div></TD>
<TD align=middle width="43%"> <div align="center">详细信息</div></TD>
<TD align=middle width=18%> <div align="center">状态</div></TD>
</TR>
</TABLE>
<%
Sql="Select FunctionID,FunctionName,FunctionInfo,FunctionOC From Functions"
Set Rs = Conn.Execute(Sql)
N=0
Do while not Rs.Eof
Select Case Cint(Rs("FunctionID"))
Case 1,2,3,4,6,7,18,20,24,26,27,28
%>
<TABLE borderColor=a4b6d7 cellSpacing=0 cellPadding=0 width="100%" border=1 style="border-collapse: collapse" height="24">
<TR height=25>
<TD width=11% align=middle> <p align="center"><input name="FunId" type="hidden" value="<%= Rs("FunctionID") %>"><%= Rs("FunctionID") %></TD>
<TD align=middle width="28%" align="center"> <%= Rs("FunctionName") %></TD>
<TD align=middle width="43%" align="center"> <input name="FunInfo<%= Rs("FunctionID") %>" type=text value='<%= Rs("FunctionInfo") %>' maxlength="250"></TD>
<TD align=middle width=18%> <div align="center"><%= Rs("FunctionOC") %></div></TD>
</TR>
</TABLE>
<%
End Select
Rs.Movenext
N=N+1
Loop
Rs.Close
Set Rs = Nothing
%>
<TABLE borderColor=#a4b6d7 cellSpacing=0 cellPadding=3 width=100% border=1 style="border-collapse: collapse">
<TR>
<TD height=12 width="75%" > <img src="images/2.gif" width="60" height="9">售价名称制定: (用复选匡来决定是否在首页显示!)
</TD>
</TR>
</table>
<%
Sql="Select FunctionID,FunctionName,FunctionInfo,FunctionOC From Functions"
Set Rs = Conn.Execute(Sql)
Do while not Rs.Eof
Select Case Cint(Rs("FunctionID"))
Case 13,14,15
%>
<TABLE borderColor=a4b6d7 cellSpacing=0 cellPadding=0 width="100%" border=1 style="border-collapse: collapse" height="24">
<TR height=25>
<TD width=11% align=middle> <p align="center"><input name="FunId" type="hidden" value="<%= Rs("FunctionID") %>"><%= Rs("FunctionID") %></TD>
<TD align=middle width="28%"> <div align="center"><%
if Rs("FunctionID") = 13 Then
Response.Write "<strike>"&Rs("FunctionName")&"</strike> (客户参考售价)"
Else
Response.Write Rs("FunctionName")
End if
%></div></TD>
<TD align=middle width="43%"> <div align="center">
<input name="FunInfo<%= Rs("FunctionID") %>" type="text" value="<%= Rs("FunctionInfo") %>" maxlength="250"></div></TD>
<TD align=middle width=18%> <div align="center">
<% if Rs("FunctionOC") = True Then
Response.Write "<input name=Oc"&Rs("FunctionID")&" type=checkbox value=True checked>"
Else
Response.Write "<input name=Oc"&Rs("FunctionID")&" type=checkbox value=True>"
End if%>
</div></TD>
</TR>
</TABLE>
<%
End Select
Rs.Movenext
Loop
Rs.Close
Set Rs = Nothing
%>
<TABLE borderColor=#a4b6d7 cellSpacing=0 cellPadding=3 width=100% border=1 style="border-collapse: collapse">
<TR>
<TD height=12 width="75%" > <img src="images/2.gif" width="60" height="9">其他选项设置:
</TD>
</TR>
</table>
<%
Sql="Select FunctionID,FunctionName,FunctionInfo,FunctionOC From Functions"
Set Rs = Conn.Execute(Sql)
Do while not Rs.Eof
Select Case Cint(Rs("FunctionID"))
Case 10,11,29,30
%>
<TABLE borderColor=a4b6d7 cellSpacing=0 cellPadding=0 width="100%" border=1 style="border-collapse: collapse" height="24">
<TR height=25>
<TD width=11% align=middle> <p align="center"><input name="FunId" type="hidden" value="<%= Rs("FunctionID") %>"><%= Rs("FunctionID") %></TD>
<TD align=middle width="28%"> <div align="center"><%= Rs("FunctionName") %></div></TD>
<TD align=middle width="43%"> <div align="center"><%= Rs("FunctionInfo") %></div></TD>
<TD align=middle width=18%> <div align="center">
<% if Rs("FunctionOC") = True Then
Response.Write "<input name=Oc"&Rs("FunctionID")&" type=checkbox value=True checked>"
Else
Response.Write "<input name=Oc"&Rs("FunctionID")&" type=checkbox value=True>"
End if%>
</div></TD>
</TR>
</TABLE>
<%
End Select
Rs.Movenext
Loop
Rs.Close
Set Rs = Nothing%>
<br>
<center><input name="submit" type="submit" value="确 定"></center>
<%
Case "Conceal"
Tab "商城数据库备份(如果您的空间不支持FSO组件,你将无法使用本功能!)","在备份数据之前请确定您的数据库空间足够,以免发生意外错误!"
%>
<TABLE borderColor=#a4b6d7 cellSpacing=0 cellPadding=3 width=100% border=1 style="border-collapse: collapse">
<TR>
<TD height=12 width="75%" >
<center>
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<form method="post"> <tr>
<td width="36%"><div align="right">数据库路径: </div></td>
<td width="33%"> <div align="left">
<input size="30" value="<%=datafile%>" name="yl">
</div></td>
<td width="31%" rowspan="2"><div align="center">
<input type="submit" value="备 份" name="Submit">
</div></td>
</tr>
<tr>
<td width="36%"><div align="right">备份的数据库路径:</div></td>
<td width="33%"> <div align="left">
<input size="30" value="<%=replace(datafile,".mdb","bak.mdb")%>" name="bf">
</div></td>
</tr></form>
</table>
</TD>
</TR>
</table>
<TABLE borderColor=#a4b6d7 cellSpacing=0 cellPadding=3 width=100% border=1 style="border-collapse: collapse">
<TR>
<TD height=12 width="75%" > <img src="images/2.gif" width="60" height="9"> 数据恢复:
</TD>
</TR>
</table>
<TABLE borderColor=#a4b6d7 cellSpacing=0 cellPadding=3 width=100% border=1 style="border-collapse: collapse">
<TR>
<TD height=12 width="75%" >
<table cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%">
<form method="post"> <tr>
<td width="35%"><div align="right">备份的数据库路径: </div></td>
<td width="34%"> <div align="center">
<input size="30" value="<%=replace(datafile,".mdb","bak.mdb")%>" name="bf">
</div></td>
<td width="31%" rowspan="2"><div align="center">
<input type="submit" value="恢 复" name="Submit">
</div></td>
</tr><tr>
<td width="35%"><div align="right">数据库路径:</div></td>
<td width="34%"><div align="center">
<input size="30" value="<%=datafile%>" name="yl">
</div></td>
</tr>
<tr></tr></form></table>
</TD>
</TR>
</table>
<%Case "Compress"
Tab "数据库空间压缩(建议您每个月至少压缩一次以减少空间负担!)","如果您的空间不支持FSO组件,你将无法使用本功能!"
%>
<TABLE borderColor=#a4b6d7 cellSpacing=0 cellPadding=3 width=100% border=1 style="border-collapse: collapse">
<TR>
<TD height=12 width="75%" >
<center>
<table width="80%" align="center" cellpadding="0" cellspacing="0" style="border-collapse: collapse"><tr>
<form method="post" action=compact.asp>
<td width="67%"> <div align="right">数据库路径:
<input size="30" value="<%=datafile%>" name="dbpath">
<br>
数据库格式:
<input type="radio" value="True" name="boolIs97">
Access 97
<input type="radio" value="" name="boolIs97" checked>
Access 2000、2002</div></td><td width="33%"><div align="center">
<input type="submit" value="压 缩" name="Submit">
</div></td></tr></tr></form></table>
</TD>
</TR>
</table>
<%End Select%>
</form>
<%Htmlend
Sub Tab(Msg1,Msg2)%>
<table borderColor="#a4b6d7" cellSpacing="0" cellPadding="0" width="100%" border="1" style="border-left: 0px none; border-top: 0px none; border-bottom: 1px none; border-collapse:collapse">
<tr><td height="25" background=images/title_sub.gif style="border-right: 0px none; border-top: 0px none">
<b> ■ </b><%= Msg1 %></td>
</tr></table>
<TABLE borderColor=#a4b6d7 cellSpacing=0 cellPadding=3 width=100% border=1 style="border-collapse: collapse">
<TR>
<TD height=12 width="75%" > <img src="images/2.gif" width="60" height="9"><%= Msg2 %></TD>
</TR></TABLE>
<%End Sub%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -