📄 updatemanage.asp
字号:
<% Option Explicit %>
<!--#include file="inc/Cls_DB.asp" -->
<!--#include file="Inc/Const.asp" -->
<!--#include file="inc/PublicFun.asp" -->
<%
Dim DBC,UpdateConn,Conn
Set DBC = New DataBaseClass
DBC.ConnStr = "DBQ=" + Server.Mappath("SunData/Update.mdb") + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
Set UpdateConn = DBC.OpenConnection()
DBC.ConnStr = "DBQ=" + Server.MapPath(DataBaseConnectStr) + ";DefaultDir=;DRIVER={Microsoft Access Driver (*.mdb)};"
Set Conn = DBC.OpenConnection()
Set DBC = Nothing
'判断权限
%>
<%
'判断权限结束
Dim Action,MainID,DelSql
Action = Request("Action")
if Action = "Del" then
MainID = Request("MainID")
DelSql = "Delete from FieldSO where TableSOID in (Select TableSO.ID from DBSO,TableSO where DBSO.MainID=TableSO.DBSOID and DBSO.MainID='" & MainID & "')"
UpdateConn.Execute(DelSql) '删除字段表中FieldSO的数据
DelSql = "Delete from TableSO where DBSOID='" & MainID & "'"
UpdateConn.Execute(DelSql) '删除数据库表中TableSO的数据
DelSql = "Delete from RelateInfo where DBSOID='" & MainID & "'"
UpdateConn.Execute(DelSql) '删除数据库中RelateInfo的数据
DelSql = "Delete from FlushTable where DBSOID='" & MainID & "'"
UpdateConn.Execute(DelSql) '删除数据库中FlushTable的数据
DelSql = "Delete from DBSO where MainID='" & MainID & "'"
UpdateConn.Execute(DelSql) '删除数据库中DBSO的数据
end if
Dim RSUpdateObj
Set RSUpdateObj = UpdateConn.Execute("Select * from DBSO")
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>数据转移规则</title>
</head>
<link href="inc/Collect.css" rel="stylesheet">
<body topmargin="0" leftmargin="0">
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="#cccccc">
<tr>
<td width="10%" height="30" class="ButtonList">
<div align="center">序号</div></td>
<td nowrap class="ButtonList"> <div align="center">描述</div></td>
<td width="10%" class="ButtonList">
<div align="center">操作</div></td>
</tr>
<%
if Not RSUpdateObj.Eof then
Dim ShowIndex
ShowIndex = 0
do while Not RSUpdateObj.Eof
ShowIndex = ShowIndex + 1
%>
<tr bgcolor="#FFFFFF" onMouseOver="this.style.backgroundColor='#EFEFEF'" onMouseOut="this.style.backgroundColor=''">
<td height="26"> <div align="center" title="<% = RSUpdateObj("SServer") %>">
<% = ShowIndex %>
</div></td>
<td><div align="center">
<% = RSUpdateObj("Description") %>
</div></td>
<td> <div align="center"><span class="SpanStyle" title="修改属性" onClick="window.location='UpdateAdd.asp?MainID=<% = RSUpdateObj("MainID") %>';">属性</span>
| <span class="SpanStyle" title="删除" onClick="if (confirm('确定要删除吗?')==true) window.location='?Action=Del&MainId=<% = RSUpdateObj("MainID") %>';">
删除 </span></div></td>
</tr>
<%
RSUpdateObj.MoveNext
loop
%>
<tr bgcolor="#FFFFFF">
<td height="26" colspan="5"><table width="100%" border="0" cellpadding="5" cellspacing="0" background="images/Collect_bg.gif">
<tr>
<td width="17%" height="30"> <div align="left"><a href="UpdateAdd.asp?MainID=<% = GetRandomID18 %>"><strong><font color="#FF0000">添加规则</font></strong></a></div></td>
<td width="83%" height="30"> <div align="right"> </div></td>
</tr>
</table></td>
</tr>
<%
else
%>
<tr>
<td height="30" colspan="3" bgcolor="#FFFFFF"> <div align="center">没有数据库转换规则,<a href="UpdateAdd.asp?MainID=<% = GetRandomID18 %>">添加规则</a></div></td>
</tr>
<%
end if
%>
</table>
</body>
</html>
<%
Set RSUpdateObj = Nothing
Set UpdateConn = Nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -