📄 system_gatherdatatrim.asp
字号:
<!--#include file="System_Gather.asp"-->
<%
Dim ID,i,Grso
Dim WR_Title,WR_Content,WR_Time,WR_Author,WR_CopyFrom,WR_Tags,WR_ChannelID,WR_ClassID,WR_AreaID,WR_Item,BaseSetting
Dim WR_County,WR_Contact,WR_Email,WR_QQ,WR_AddRess,WR_Tel,WR_Pic,WR_Intro,WR_Mobile,WR_Fax,WR_WEB
Call WR.Hand()
ID = WR.CheckStr(Request("ID"), 0)
Module = WR.CheckStr(Request("Module"), 1)
Page = WR.CheckStr(Request("page"),1)
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
Content = Content & "<tr class=td2><td><a href=System_Gather"&WRMPS.GetReplace(WRMPS.GetReplace(WRMPS.GetReplace(Module,1,"Article"),2,"Class"),3,"Company")&".asp>项目管理首页</a> | <a href=System_Gather"&WRMPS.GetReplace(WRMPS.GetReplace(WRMPS.GetReplace(Module,1,"Article"),2,"Class"),3,"Company")&".asp?Action=Item>添加项目</a> | <a href=System_GatherDataTrim.asp?Module="&Module&">数据审核</a> | <a href=System_GatherDataTrim.asp?Action=Histroly&Module="&Module&">采集历史</a> | <a href=System_GatherLeach.asp?Module="&Module&">过滤管理</a> | <a href=System_GatherLeach.asp?Action=Leach&Module="&Module&">添加新过滤</a></td></tr>" & vbCrLf
Content = Content & "</table>" & vbCrLf
Call ConnOpen()
Set Grs = server.cReateobject("adodb.Recordset")
Select Case Request("Action")
Case "Histroly"
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
Content = Content & "<form name='from1' method='post' Action='?Action=Del&Module="&Module&"'>" & vbCrLf
Content = Content & "<tr class=td4><td colspan=7><strong>历史记录管理</strong></td></tr>" & vbCrLf
Content = Content & "<tr class=td3 align=center><td width='3%'></td>" & vbCrLf
Content = Content & "<td width='20%'>所属项目</td>" & vbCrLf
Content = Content & "<td width='*'>标题</td>" & vbCrLf
Content = Content & "<td width='20%'>点击查看</td>" & vbCrLf
Content = Content & "<td width='10%'>操作</td>" & vbCrLf
Content = Content & "</tr>" & vbCrLf
Grs.Open "Select A.WR_ID,A.WR_Title,A.WR_Url,B.WR_Name From WR_Histroly A Inner Join WR_Item B on A.WR_ItemID = B.WR_ID Where A.WR_Module="&Module&" Order by A.WR_ID Desc", Gconn, 1, 1
If Grs.EOF Then
Content = Content & "<tr class=td2><td align=center colspan=5>没有记录</td></tr></table>" & vbCrLf
Else
'分页的实现
ListNum = 20
Grs.PageSize = ListNum
If Page = "" Then Page = 1
If Page < 1 Then Page = 1
Grs.AbsolutePage = Page
i = 0
Do While Not Grs.EOF And i < ListNum
Content = Content & "<tr class=td2 align=center>"
Content = Content & "<td><input type='checkbox' name='ID' value=" & Grs(0) & " style='border:0'></td>" & vbCrLf
Content = Content & "<td>" & Grs(3) & "</td>" & vbCrLf
Content = Content & "<td align=left>" & Grs(1) & "</td>" & vbCrLf
Content = Content & "<td><a href="&Grs(2)&" target=_blank>点击查看</a></td>" & vbCrLf
Content = Content & "<td><a href=?Action=Del&ID="&Grs(0)&"&Page="&Page&"&Module="&Module&" onclick=""Return confirm('确定删除?');"">删除</a></td>" & vbCrLf
Content = Content & "</tr>" & vbCrLf
Grs.MoveNext
i = i + 1
Loop
URLParameter = "Action=Histroly&Module="&Module&""
Content = Content & "<tr class=td3><td colspan=3><input name='chkall' type='checkbox' id='chkall' value='select' onclick=""CheckAll(this.form)"" style='border:0'>全选 <input name='Page' type='hidden' value='" & Page & "'> <input type='submit' name='submit' value='批量删除'> <input type='button' onclick=""if(confirm('确定清空?')){window.open('?Action=DelAllHistroly&Module="&Module&"','_self')};"" value='清 空'></td><td colspan=2 align=right>" & GetAdminPageList(URLParameter, ListNum, Grs.RecordCount, Page) & " </td></tr></form>" & vbCrLf
Grs.Close
Content = Content & "</form></table>" & vbCrLf
End If
Case "Del"
ID = Replace(ID," ","")
If ID <> "" Then
ID = Split(ID, ",")
For i = 0 To UBound(ID)
Gconn.Execute("Delete From WR_Histroly Where WR_Module="&Module&" and WR_ID="&Int(ID(i)))
Next
End If
Set Grs = Nothing
Call WRMPS.ErrView("·操作成功<meta http-equiv=RefResh content='1;URL=?Page="&Page&"&Action=Histroly&Module="&Module&"'>",1)
Case "DelAllHistroly"
Gconn.Execute("Delete From WR_Histroly Where WR_Module="&Module)
Gconn.Execute("UpDate WR_Item Set WR_LastTime = Null,WR_Anamnesis = Null Where WR_Module="&Module)
Call WRMPS.ErrView("·操作成功<meta http-equiv=RefResh content='1;URL=?Action=Histroly&Module="&Module&"'>",1)
Case "DelAll"
Select Case Module
Case 1
Gconn.Execute("Delete From WR_Article")
Case 2
Gconn.Execute("Delete From WR_ClassAD")
Case 3
Gconn.Execute("Delete From WR_Company")
End Select
Call WRMPS.ErrView("·操作成功<meta http-equiv=RefResh content='1;URL=?Module="&Module&"'>",1)
Case "Save"
ID = Replace(ID," ","")
If ID <> "" Then
Select Case Request("SaveType")
Case "入库"
Select Case Module
Case 1
Set Grs = Gconn.Execute("Select WR_Title,WR_Content,WR_Time,WR_Author,WR_CopyFrom,WR_Tags,WR_ChannelID,WR_ClassID,WR_AreaID,WR_Pic,WR_Item From WR_Article Where WR_ID in("&ID&")")
Do While Not Grs.Eof
WR_Title = "":WR_Content = "":WR_Time = "":WR_Author = "":WR_CopyFrom = "":WR_Tags = "":WR_ChannelID = "":WR_ClassID = "":WR_AreaID = "":WR_Pic = "":WR_Item = ""
WR_Title = Grs(0)
WR_Content = Grs(1)
WR_Time = Grs(2)
WR_Author = Grs(3):If WR_Author = "" Then WR_Author = NULL
WR_CopyFrom = Grs(4):If WR_CopyFrom = "" Then WR_CopyFrom = NULL
WR_Tags = Grs(5):If WR_Tags = "" Then WR_Tags = NULL
WR_ChannelID = Grs(6):If WR_ChannelID = "" Then WR_ChannelID = 0
WR_ClassID = Grs(7):If WR_ClassID = "" Then WR_ClassID = 0
WR_AreaID = Grs(8):If WR_AreaID = "" Then WR_AreaID = 0
WR_Pic = Grs(9):If WR_Pic = "" Then WR_Pic = NULL
WR_Item = Grs(10)
Set Grso = Gconn.Execute("Select Top 1 WR_BaseSetting From WR_Item Where WR_ID="&WR_Item)
If Not Grso.Eof Then
BaseSetting = Grso(0)
BaseSetting = Split(BaseSetting,"§§§")
End If
Grso.Close
Call ASave(WR_Title,WR_Content,WR_Time,WR_Author,WR_CopyFrom,WR_Tags,WR_ChannelID,WR_ClassID,WR_Pic)
Grs.Movenext
Loop
Grs.Close
Set Grs = Nothing
Gconn.Execute("Delete From WR_Article Where WR_ID in("&ID&")")
Case 2
Set Grs = Gconn.Execute("Select WR_Title,WR_Content,WR_Time,WR_Tags,WR_Contact,WR_Email,WR_QQ,WR_AddRess,WR_TEL,WR_ChannelID,WR_ClassID,WR_AreaID,WR_Pic,WR_Item From WR_ClassAD Where WR_ID in("&ID&")")
Do While Not Grs.Eof
WR_Title = "":WR_Content = "":WR_Time = "":WR_Tags = "":WR_Contact = "":WR_Email = "":WR_QQ = "":WR_AddRess = "":WR_TEL = "":WR_ChannelID = "":WR_ClassID = "":WR_AreaID = "":WR_Pic = "":WR_Item = ""
WR_Title = Grs(0)
WR_Content = Grs(1)
WR_Time = Grs(2)
WR_Tags = Grs(3):If WR_Tags = "" Then WR_Tags = NULL
WR_Contact = Grs(4):If WR_Contact = "" Then WR_Contact = NULL
WR_Email = Grs(5):If WR_Email = "" Then WR_Email = NULL
WR_QQ = Grs(6):If WR_QQ = "" Then WR_QQ = NULL
WR_AddRess = Grs(7):If WR_AddRess = "" Then WR_AddRess = NULL
WR_TEL = Grs(8):If WR_TEL = "" Then WR_TEL = NULL
WR_ChannelID = Grs(9):If WR_ChannelID = "" Then WR_ChannelID = 0
WR_ClassID = Grs(10):If WR_ClassID = "" Then WR_ClassID = 0
WR_AreaID = Grs(11):If WR_AreaID = "" Then WR_AreaID = 0
WR_Pic = Grs(12):If WR_Pic = "" Then WR_Pic = NULL
WR_Item = Grs(13)
Set Grso = Gconn.Execute("Select Top 1 WR_BaseSetting From WR_Item Where WR_ID="&WR_Item)
If Not Grso.Eof Then
BaseSetting = Grso(0)
BaseSetting = Split(BaseSetting,"§§§")
End If
Grso.Close
Call CSave(WR_Title,WR_Content,WR_Contact,WR_Email,WR_QQ,WR_AddRess,WR_TEL,WR_Time,WR_Tags,WR_ClassID,WR_AreaID,WR_Pic)
Grs.Movenext
Loop
Grs.Close
Set Grs = Nothing
Gconn.Execute("Delete From WR_ClassAD Where WR_ID in("&ID&")")
Case 3
Set Grs = Gconn.Execute("Select WR_Company,WR_Intro,WR_AddRess,WR_Tel,WR_Mobile,WR_Fax,WR_Web,WR_Time,WR_Tags,WR_ChannelID,WR_ClassID,WR_AreaID,WR_Pic,WR_Item From WR_Company Where WR_ID in("&ID&")")
Do While Not Grs.Eof
WR_Company = "":WR_Intro = "":WR_AddRess = "":WR_Tel = "":WR_Mobile = "":WR_Fax = "":WR_Web = "":WR_Time = "":WR_Tags = "":WR_ChannelID = "":WR_ClassID = "":WR_AreaID = "":WR_Pic = "":WR_Item = ""
WR_Company = Grs(0)
WR_Intro = Grs(1):If WR_Intro = "" Then WR_Intro = NULL
WR_AddRess = Grs(2)
WR_Tel = Grs(3):If WR_Tel = "" Then WR_Tel = NULL
WR_Mobile = Grs(4):If WR_Mobile = "" Then WR_Mobile = NULL
WR_Fax = Grs(5):If WR_Fax = "" Then WR_Fax = NULL
WR_Web = Grs(6):If WR_Web = "" Then WR_Web = NULL
WR_Time = Grs(7)
WR_Tags = Grs(8):If WR_Tags = "" Then WR_Tags = NULL
WR_ChannelID = Grs(9):If WR_ChannelID = "" Then WR_ChannelID = 0
WR_ClassID = Grs(10):If WR_ClassID = "" Then WR_ClassID = 0
WR_AreaID = Grs(11):If WR_AreaID = "" Then WR_AreaID = 0
WR_Pic = Grs(12):If WR_Pic = "" Then WR_Pic = NULL
WR_Item = Grs(13)
Set Grso = Gconn.Execute("Select Top 1 WR_BaseSetting From WR_Item Where WR_ID="&WR_Item)
If Not Grso.Eof Then
BaseSetting = Grso(0)
BaseSetting = Split(BaseSetting,"§§§")
End If
Grso.Close
Call YSave(WR_Company,WR_Intro,WR_AddRess,WR_Tel,WR_Mobile,WR_Fax,WR_Web,WR_Time,WR_Tags,WR_ClassID,WR_AreaID,WR_Pic)
Grs.Movenext
Loop
Grs.Close
Set Grs = Nothing
Gconn.Execute("Delete From WR_Company Where WR_ID in("&ID&")")
End Select
Case "删除"
ID = Split(ID, ",")
For i = 0 To UBound(ID)
Select Case Module
Case 1
Gconn.Execute("Delete From WR_Article Where WR_ID="&Int(ID(i)))
Case 2
Gconn.Execute("Delete From WR_ClassAD Where WR_ID="&Int(ID(i)))
Case 3
Gconn.Execute("Delete From WR_Company Where WR_ID="&Int(ID(i)))
End Select
Next
End Select
End If
Call WRMPS.ErrView("·操作成功<meta http-equiv=RefResh content='1;URL=?Page="&Page&"&Module="&Module&"'>",1)
Case Else
Content = Content & "<table width='100%' cellpadding=3 cellspacing=1 class=td1>" & vbCrLf
Content = Content & "<form name='from1' method='post' Action='?Action=Save'>" & vbCrLf
Content = Content & "<tr class=td4><td colspan=7><strong>采集记录管理</strong></td></tr>" & vbCrLf
Content = Content & "<tr class=td3 align=center><td width='3%'></td>" & vbCrLf
Content = Content & "<td width='*'>标题</td>" & vbCrLf
Content = Content & "<td width='20%'>时间</td>" & vbCrLf
Content = Content & "<td width='10%'>操作</td>" & vbCrLf
Content = Content & "</tr>" & vbCrLf
Select Case Module
Case 1 '文章
Grs.Open "Select WR_ID,WR_Title,WR_Time From WR_Article Order by WR_ID Desc", Gconn, 1, 1
Case 2 '分类信息
Grs.Open "Select WR_ID,WR_Title,WR_Time From WR_ClassAD Order by WR_ID Desc", Gconn, 1, 1
Case 3 '店铺
Grs.Open "Select WR_ID,WR_Company,WR_Time From WR_Company Order by WR_ID Desc", Gconn, 1, 1
End Select
If Grs.EOF Then
Content = Content & "<tr class=td2><td align=center colspan=4>没有记录</td></tr></table>" & vbCrLf
Else
'分页的实现
ListNum = 20
Grs.PageSize = ListNum
If Page = "" Then Page = 1
If Page < 1 Then Page = 1
Grs.AbsolutePage = Page
i = 0
Do While Not Grs.EOF And i < ListNum
Content = Content & "<tr class=td2 align=center>"
Content = Content & "<td><input type='checkbox' name='ID' value=" & Grs(0) & " style='border:0'></td>" & vbCrLf
Content = Content & "<td align=left>" & Grs(1) & "</td>" & vbCrLf
Content = Content & "<td>" & Grs(2) & "</td>" & vbCrLf
Content = Content & "<td><a href=?Module="&Module&"&Action=Save&ID="&Grs(0)&"&Page="&Page&"&SaveType=入库>入库</a> | <a href=?Module="&Module&"&Action=Save&ID="&Grs(0)&"&Page="&Page&"&SaveType=删除 onclick=""Return confirm('确定删除?');"">删除</a></td>" & vbCrLf
Content = Content & "</tr>" & vbCrLf
Grs.MoveNext
i = i + 1
Loop
URLParameter = "Module="&Module
Content = Content & "<tr class=td3><td colspan=2><input name='chkall' type='checkbox' id='chkall' value='select' onclick=""CheckAll(this.form)"" style='border:0'>全选 <input name='Page' type='hidden' value='" & Page & "'><input name='Module' type='hidden' value='" & Module & "'><select name='SaveType'><option value='入库'>入库</option><option value='删除'>删除</option></select> <input type='submit' name='submit' value='批量操作'> <input type='button' onclick=""if(confirm('确定清空?')){window.open('?Module="&Module&"&Action=DelAll','_self')};"" value='清 空'></td><td colspan=2 align=right>" & GetAdminPageList(URLParameter, ListNum, Grs.RecordCount, Page) & " </td></tr></form>" & vbCrLf
Grs.Close
Content = Content & "</form></table>" & vbCrLf
End If
End Select
Set Grs = Nothing
Call ConnClose()
Response.write Content
Call GetBottom()
Call ClassEnd()
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -