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

📄 admin_itemhistroly.asp

📁 正版创力4.1SQL商业版!!!ASP版。
💻 ASP
字号:
<!--#include file="Inc/Const.asp"-->
<!--#include file="../Inc/Cl_ClsCollect.asp"-->
<!--#include file="../Inc/Cl_Function_Collect.asp"-->
<%
'========================================
'	Edit by GDWneo
'	Last modify at 9:22 2007-9-6
'========================================
Header
Dim SqlItem,RsItem,Action,ModuleName
Dim HistrolyID,ItemID,ClassID,SpecialID,InfoID,Title,CollecDate,NewsUrl,Result
Dim  Arr_Histroly,Arr_InfoID,i_Arr,Del,Flag
Dim MaxPerPage,AllPage,HistrolyNum,i_His
MaxPerPage=20
FoundErr=False
Del=Trim(Request("Del"))
Action=Trim(Request("Action"))
OpenConn_C
If Del="Del" Then
	Call DelHistroly()
End If
If FoundErr<>True Then
	Call Main()
else
	Call Cl.ShowErr(ErrMsg)
End If
Footer

Sub Main%>
<script language=javascript>
function unselectall(thisform)
{
	 if(thisform.chkAll.checked)
	{
		thisform.chkAll.checked = thisform.chkAll.checked&0;
	 } 	
}

function CheckAll(thisform)
{
	for (var i=0;i<thisform.elements.length;i++)
	 {
	var e = thisform.elements[i];
	if (e.Name != "chkAll"&&e.disabled!=true)
		e.checked = thisform.chkAll.checked;
	 }
}
</script>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border">
  <tr class="title"> 
	 <td height="22" colspan="2" align="center"><strong>采 集 系 统 历 史 记 录 管 理</strong></td>
  </tr>
  <tr class="tdbg">
	 <td height="30" width="65"><strong>管理导航:</strong></td>  
	 <td height="30"><a href="Admin_ItemHistroly.asp">管理首页</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="Admin_ItemHistroly.asp?Action=Succeed">成功记录</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="Admin_ItemHistroly.asp?Action=Failure">失败记录</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="Admin_ItemHistroly.asp?Action=LoseEf">失效记录</a></td>	  
  </tr>			
</table>	 
<br>	
<%										
Set RsItem=server.createobject("adodb.recordset")			
SqlItem="select * from Histroly"
If Action="Succeed"  Then
	SqlItem=SqlItem  &  " Where  Result=True"
	Flag="成 功 记 录"
ElseIf Action="Failure"  Then
	SqlItem=SqlItem  &  " Where  Result=False"
	Flag="失 败 记 录"
ElseIf  Action="LoseEf"  Then
	Flag="失 效 记 录"
	Set Rs=server.createobject("adodb.recordset")
	Sql="Select InfoID From Cl_Article Where Deleted=False"
	OpenConn : Rs.open  Sql,Conn,1,1
	If (Not Rs.Eof) And (Not Rs.Bof) Then
		Do While not rs.eof
			Arr_InfoID=Arr_InfoID & "," & CStr(rs("InfoID"))
		Rs.MoveNext
		Loop
	End  If
	Rs.Close
	Set Rs=Nothing
	If Arr_InfoID<>"" Then
		Arr_InfoID=0 & Arr_InfoID
	Else
		Arr_InfoID=0
	End If
	SqlItem=SqlItem  &  " Where InfoID Not In("  &  Arr_InfoID & ")"
Else
	Flag="所 有 记 录"
End  If
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
	 <tr> 
		<td height="22" colspan="2" class="title"> <div align="center"><strong>历  史  记  录 - <%=Flag%></strong></div></td>
	 </tr>
</table>
 </table>
<table width="100%" border="0" align="center" cellpadding="2" cellspacing="1" class="border"> 
	<form name="form1" method="POST" action="Admin_ItemHistroly.asp">			
		<tr class="title">		
		<td width="30" height="22" align="center">选择</td>						
		<td width="112" align="center">项目名称</td>			
		<td align="center">文章标题</td>
		<td width="60" height="22" align="center">频道</td> 
		<td width="60" height="22" align="center">栏目</td> 
		<td width="60" align="center">来源</td>			
		<td width="40" align="center">结果</td>
		<td width="40" height="22" align="center">操作</td>			
	  </tr>			
<%
If Request("page")<>"" then
	 CurrentPage=Cint(Request("Page"))
Else
	 CurrentPage=1
End if 
SqlItem=SqlItem  &  " order by HistrolyID DESC"
RsItem.open SqlItem,Conn_C,1,1
If (Not RsItem.Eof) and (Not RsItem.Bof) then
	TotalPut=RsItem.RecordCount
	if (TotalPut mod MaxPerPage)=0 then
		TotalPages = TotalPut \ MaxPerPage
	else
		TotalPages = TotalPut \ MaxPerPage + 1
	end if
	if CurrentPage > TotalPages then CurrentPage=TotalPages
	if CurrentPage < 1 then CurrentPage=1
	RsItem.move (CurrentPage-1)*MaxPerPage
	i_His=0
	Do While not RsItem.Eof
%>
	 <tr class="tdbg" onmouseout="this.style.backgroundColor=''" onmouseover="this.style.backgroundColor='#BFDFFF'">			 
		<td width="30" align="center">			 
			<input type="checkbox" value="<%=RsItem("HistrolyID")%>" name="HistrolyID" onclick="unselectall(this.form)">			
		</td>					
		<td width="112" align="center">			 
			<%=ShowItem_Name(RsItem("ItemID"))%>			
		</td>			
		<td align="left"><%=RsItem("Title")%>
		</td>  
		<td width="60" align="center"><%=ShowChannel_Name(RsItem("ChannelID"))%></td>
		<td width="60" align="center"><%=ShowClass_Name(RsItem("ChannelID"),RsItem("ClassID"))%></td>
		<td width="60" align="center"><a href="<%=RsItem("NewsUrl")%>" target=_blank title=<%=RsItem("NewsUrl")%>>点击访问</a></td>	  
		<td width="40" align="center">
		<%If RsItem("Result")=True Then
			Response.write "<font color=Green>成功</font>"
		ElseIf RsItem("Result")=False Then
			Response.Write "<font color=red>失败</font>"
		Else
			Response.Write "<font color=red>异常</font>"
		End If
		%>
		</td>
		<td width="40" align="center">									
		<a href="Admin_ItemHistroly.asp?Action=<%=Action%>&Del=Del&HistrolyID=<%=RsItem("HistrolyID")%>" onclick='return confirm("确定要删除此记录吗?");'>删除</a>						
		</td>			
	 </tr>			
<%			
			i_His=i_His+1
			If i_His > MaxPerPage Then
			Exit Do
		End If
		RsItem.Movenext			
	Loop			
%>			
	 <tr class="tdbg">			 
		<td colspan=8 height="30">		 
			<input name="Del" type="hidden" id="Del" value="Del">	
			<input name="Action" type="hidden" id="Action" value="<%=Action%>"> 
			<input name="chkAll" type="checkbox" id="chkAll" onclick=CheckAll(this.form) value="checkbox">全选
		</td>			
	 </tr> 
	 <tr class="tdbg">			 
		<td colspan=8 height="30" align=center>
			<input type="submit" value="清除选中记录" name="DelFlag" onclick='return confirm("确定要清除所选记录吗?");'>&nbsp;&nbsp;		 
			<input type="submit" value="清除失败记录" name="DelFlag" onclick='return confirm("确定要清除所有失败记录吗?");'>&nbsp;&nbsp;
			<input type="submit" value="清除失效记录" name="DelFlag"  onclick='return confirm("确定要清除所有失效记录吗?");'>&nbsp;&nbsp;
			<input type="submit" value="清空所有记录" name="DelFlag" onclick='return confirm("确定要清除所有记录吗?");'>
		</td>			
	 </tr> 
	 <tr class="tdbg">			 
		<td colspan=8 height="30">			 
			
		</td>			
	 </tr>		 
<%Else%>
<tr class="tdbg">
			<td colspan='9' class="tdbg" align="center"><br>系统中暂无历史记录!</td>
</tr> 
<%End  If%>		 
<%			
RsItem.Close			
Set RsItem=Nothing				
%>			
</form>			
</table>  
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="border" >
	 <tr> 
		<td height="22" colspan="2" class="tdbg">
<%
Response.Write Cl.ShowPage("Admin_ItemHistroly.asp?Action="& Action,HistrolyNum,MaxPerPage,"个","记录")
%>

		</td>
	 </tr>
</table>
<%End Sub
Sub DelHistroly
Dim DelFlag
DelFlag=Trim(Request("DelFlag"))
HistrolyID=Trim(Request("HistrolyID"))
If HistrolyID<>"" Then
	HistrolyID=Replace(HistrolyID," ","")
End If
If DelFlag="清除选中记录" Then
	If HistrolyID="" Then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请选择要删除的记录</li>"
	Else
		HistrolyID=Replace(HistrolyID," ","")
		SqlItem="delete * from [Histroly] Where HistrolyID in(" & HistrolyID & ")"
	End If
ElseIf DelFlag="清除失败记录" Then
	SqlItem="delete * from [Histroly] Where Result=False"
ElseIf DelFlag="清除失效记录" Then
	Set Rs=server.createobject("adodb.recordset")
	Sql="Select InfoID From Cl_Article Where Deleted=False"
	OpenConn : Rs.open Sql,Conn,1,1
	If (Not Rs.Eof) And (Not Rs.Bof) Then
		Do While not rs.eof
			Arr_InfoID=Arr_InfoID & "," & CStr(rs("InfoID"))
		Rs.MoveNext
		Loop
	End  If
	Rs.Close
	Set Rs=Nothing
	If Arr_InfoID<>"" Then
		Arr_InfoID=0 & Arr_InfoID
		SqlItem="delete * from [Histroly] Where InfoID Not In(" & Arr_InfoID & ")"
	Else
		SqlItem="delete * from [Histroly]"
	End If
ElseIf DelFlag="清空所有记录" Then
	SqlItem="delete * from [Histroly]"
Else
	If HistrolyID="" Then
		FoundErr=True
		ErrMsg=ErrMsg & "<br><li>请选择要删除的记录</li>"
	Else
		HistrolyID=Replace(HistrolyID," ","")
		SqlItem="delete * from [Histroly] Where HistrolyID In(" & HistrolyID & ")"
	End If
End if

If FoundErr<>True Then
	Conn_C.Execute(SqlItem)
End If
End Sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -