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

📄 histroy.asp

📁 这个就是受到众人喜爱的许愿墙了
💻 ASP
字号:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/function.asp"-->
<%
Dim Rs,Sql,SqlHistroy,RsHistroy,Action,FoundErr,ErrMsg
Dim HistroyID,ItemID,ChannelID,ClassID,SpecialID,ArticleID,Title,CollecDate,NewsUrl,Result
Dim  Arr_Histroy,Arr_ArticleID,i_Arr,Del,Flag
Dim CurrentPage,AllPage,HistroyNum,i_His
Const PerPage=10
FoundErr=False
Del=Trim(Request("Del"))
Action=Trim(Request("Action"))
If Del="Del" Then
   Call DelHistroy()
End If

Call Top()
                            
Set RsHistroy=server.createobject("adodb.recordset")         
SqlHistroy="select * from Histroy"
If Action="Succeed"  Then
   SqlHistroy=SqlHistroy  &  " Where  Result=True"
   Flag="成 功 记 录"
ElseIf Action="Failure"  Then
   SqlHistroy=SqlHistroy  &  " Where  Result=False"
   Flag="失 败 记 录"
Else
   Flag="所 有 记 录"
End  If

if FoundErr<>True Then
%>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
    <tr> 
      <td height="22" colspan="2"> <div align="center"><strong>历  史  记  录 - <%=Flag%></strong></div></td>
    </tr>
</table>
  <table class="tableBorder" border="0" cellspacing="1" width="97%" cellpadding="0" align="center">         
   <form name="form1" method="POST" action="histroy.asp">         
     <tr  style="padding: 0px 2px;">         
      <td width="56" height="22" align="center" class=ButtonList>选择</td>                 
      <td width="214" align="center" class=ButtonList>项目名称</td>         
      <td width="435" align="center" class=ButtonList>新闻标题</td>
      <td width="123" height="22" align="center" class=ButtonList>频道</td> 
      <td width="120" height="22" align="center" class=ButtonList>栏目</td> 
      <td width="126" align="center" class=ButtonList>来源</td>        
      <td width="87" align="center" class=ButtonList>结果</td>
      <td width="93" height="22" align="center" class=ButtonList>操作</td>         
     </tr>         
<%
If Request("page")<>"" then
    CurrentPage=Cint(Request("Page"))
Else
    CurrentPage=1
End if 
SqlHistroy=SqlHistroy  &  " order by HistroyID DESC"
RsHistroy.open SqlHistroy,ConnHistroy,1,1
If (Not RsHistroy.Eof) and (Not RsHistroy.Bof) then
   RsHistroy.PageSize=PerPage
   Allpage=RsHistroy.PageCount
   If Currentpage>Allpage Then Currentpage=1
   HistroyNum=RsHistroy.RecordCount
   RsHistroy.MoveFirst
   RsHistroy.AbsolutePage=CurrentPage
   i_His=0
   Do While not RsHistroy.Eof
%>
    <tr  onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#cccccc'" style="padding: 0px 2px;">          
      <td width="56" align="center">          
        <input type="checkbox" value="<%=RsHistroy("HistroyID")%>" name="HistroyID" onClick="unselectall(this.form)" style="border: 0px;background-color: #E1F4EE;">         
      </td>               
      <td width="214" align="center">          
        <%Call ShowProject_Name(RsHistroy("ProjectID"))%>         
      </td>         
      <td width="435" align="left"><%=RsHistroy("Title")%>
      </td>  
      <td width="123" align="center"><%Call ShowChannel_Name(RsHistroy("ChannelID"))%></td>
      <td width="120" align="center"><%Call ShowClass_Name(RsHistroy("ChannelID"),RsHistroy("ClassID"))%></td>
      <td width="126" align="center"><a href="<%=RsHistroy("NewsUrl")%>" target=_blank title=<%=RsHistroy("NewsUrl")%>>点击访问</a></td>     
      <td width="87" align="center">
      <%If RsHistroy("Result")=True Then
           Response.write "成功"
        ElseIf RsHistroy("Result")=False Then
           Response.Write "<font color=red>失败</font>"
        Else
           Response.Write "<font color=red>异常</font>"
        End If
      %>
      </td>
      <td width="93" align="center">                           
      <a href="histroy.asp?Action=<%=Action%>&Del=Del&HistroyID=<%=RsHistroy("HistroyID")%>" onclick='return confirm("确定要删除此记录吗?");'>删除</a>                 
      </td>         
    </tr>         
<%         
           i_His=i_His+1
           If i_His > PerPage Then
              Exit Do
           End If
        RsHistroy.Movenext         
   Loop         
%>         
    <tr>          
      <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" style="border: 0px;background-color: #E1F4EE;">全选
      </td>         
    </tr> 
    <tr>          
      <td colspan=8 height="30" align=center>
        <input type="submit" value="删除选中记录" onclick='return confirm("确定要清除所选记录吗?");'>       
        <!--<input type="submit" value="清除失败记录" name="DelFlag" onclick='return confirm("确定要清除所有失败记录吗?");' style="cursor: hand;background-color: #cccccc;">&nbsp;&nbsp;
        <input type="submit" value="清除失效记录" name="DelFlag"  onclick='return confirm("确定要清除所有失效记录吗?");' style="cursor: hand;background-color: #cccccc;">&nbsp;&nbsp;
        <input type="submit" value="清空所有记录" name="DelFlag" onclick='return confirm("确定要清除所有记录吗?");' style="cursor: hand;background-color: #cccccc;">-->
      </td>         
    </tr> 
    <tr>          
      <td colspan=8 height="30">          
        
      </td>         
    </tr>       
<%Else%>
<tr>
        <td colspan='9'  align="center"><br>系统中暂无历史记录!</td>
</tr> 
<%End  If%>       
<%         
RsHistroy.Close         
Set RsHistroy=nothing           
%>         
</form>         
</table>  
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder" >
    <tr> 
      <td height="22" colspan="2" >
<%
Response.Write ShowPage("histroy.asp?Action="& Action,HistroyNum,PerPage,True,True," 个记录")
%>

      </td>
    </tr>
</table>
<%
else
	Call WriteErrMsg(ErrMsg)
end if
%>           
</body>         
</html>
<%
'关闭数据库链接
Call CloseConn()
Call CloseConnHistroy()

Sub DelHistroy()
HistroyID=Trim(Request("HistroyID"))
If HistroyID<>"" Then
   HistroyID=Replace(HistroyID," ","")
End If

If HistroyID="" Then
	FoundErr=True
	ErrMsg=ErrMsg & "<br>请选择要删除的记录"
Else
    HistroyID=Replace(HistroyID," ","")
    SqlHistroy="Delete From [Histroy] Where HistroyID in(" & HistroyID & ")"
End If

If FoundErr<>True Then
    ConnHistroy.Execute(SqlHistroy)
End If
End Sub

Sub Top()%>
<html>
<head>
<title>通用信息采集系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="css/style.css">
<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>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table cellpadding="0" cellspacing="1" border="0" width="97%" class="tableBorder" align=center>
  <tr>
	<td height="22" colspan="2" align="center"><strong> 历 史 记 录 管 理</strong></td>
  </tr>
</table>
<table width="97%" border="0" align="center" cellpadding="0" cellspacing="1" class="tableBorder">
  <tr> 
    <td height="30" width="65"><strong>管理导航:</strong></td>  
    <td height="30"><a href="histroy.asp">管理首页</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="histroy.asp?Action=Succeed">成功记录</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="histroy.asp?Action=Failure">失败记录</a></td>     
  </tr>         
</table>    
<br>  
<%End Sub

Sub Bottom()%>

<%End Sub%>

⌨️ 快捷键说明

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