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

📄 news_readlist.asp

📁 ASP程序实现的科技期刊系统
💻 ASP
字号:
<!--#include file="../Include/AdoConn.asp"-->
<% usercode=session("usercode")
   departcode=left(usercode,3)

dim objrst(3),strsql(3),no(3),cont(3),cont_for(3)
	sql="and 发送日期<='"&date&"' and 有效日期>='"&date&"' order by 发送日期 desc"
	strsql(1)="select * from xt_Vd_usermessage where 发送类别='全体'"+sql
	strsql(2)="select * from xt_Vd_usermessage where 发送类别='部门'and 部门编码='" &departcode&"'"+sql
    strsql(3)="select * from xt_Vd_usermessage where 发送类别='个人'and 用户编码='" &usercode&"'"+sql	
    for i=1 to 3 
  	set objrst(i)=server.CreateObject ("adodb.recordset")

	objrst(i).CursorType =3
	objrst(i).CursorLocation =3
	objrst(i).LockType =2
	objrst(i).Open strsql(i),strconn
	no(i)=0
	cont(i)=objrst(i).recordcount
		if cont(i)<=10 then
		cont_for(i)=Cont(i)
		else
		cont_for(i)=10
		end if
	next

%>
<html>
<head>
<title>消息中心</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="/CssLib/Cssbutton.css">
<link rel="stylesheet" href="/CssLib/CssLink.css">
<style>
td{font-size:9pt}

A:link
{
    COLOR: #000000;
    FONT-FAMILY: 宋体;
    FONT-SIZE: 9pt
}
A:visited
{
    COLOR: #000000;
    FONT-FAMILY: 宋体;
    FONT-SIZE: 9pt
}
A:active
{
    COLOR: #000000;
    FONT-FAMILY: 宋体;
    FONT-SIZE: 9pt
}
A:hover
{
    COLOR: blue;
    FONT-FAMILY: 宋体;
    FONT-SIZE: 9pt
}

</style>
</head>

<body bgcolor="#FFFFFF" text="#000000">
<table width="100%" border="1" cellspacing="0" cellpadding="0" align="center" bordercolor="#FFFFFF">
  <tr> 
    <td height="42" width="31%"><img src="images/title_news.gif" width="227" height="38"></td>
    <td colspan="3" height="42" valign="bottom" width="69%">您共有:<a href="#all" class="blank">全体新闻</a> 
      <%if objrst(1).eof then response.write "0" else response.write cont(1) end if%>
      条,<a href="#depart" class="blank">部门新闻</a> 
      <%if objrst(2).eof then response.write "0" else response.write cont(2) end if%>
      条,<a href="#person" class="blank">个人新闻</a> 
      <%if objrst(3).eof then response.write "0" else response.write cont(3) end if%>
      条。 </td>
  </tr>
  <tr> 
    <td colspan="4">
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td width="47" height="20" align="center" bgcolor="#0080C0" bordercolor="#FFFFFF"> 
            <div align="center"><font color="#FFFFFF">序号</font></div>
          </td>
          <td width="34" height="20" align="center" bgcolor="#0080C0" bordercolor="#FFFFFF"><font color="#FFFFFF">附件</font></td>
          <td width="390" height="20" bgcolor="#0080C0" bordercolor="#FFFFFF" align="left"> 
            <font color="#FFFFFF">  消 息 标 题</font></td>
          <td width="138" height="20" bgcolor="#0080C0" bordercolor="#FFFFFF" align="left"> 
            <font color="#FFFFFF">发送日期</font></td>
          <td width="150" height="20" bgcolor="#0080C0" bordercolor="#FFFFFF" align="left"> 
            <font color="#FFFFFF">发送者</font></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td width="20%" bgcolor="#CCCCCC"> <font color="#FFFFFF">  </font><b>全体新闻 
      <%if objrst(1).eof then response.write "0" else response.write cont(1) end if%>
      条<a name="all"></a></b></td>
    <td width="79%"><img src="../public/images/title.gif" width="20" height="18"></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bordercolor="#FFFFFF">
  <%if objrst(1).eof then %>
  <tr bgcolor="#EAEAEA"> 
    <td colspan="5" height="20">&nbsp; 无全体消息。 </td>
  </tr>
  <%else
    for i=1 to cont_for(1)
  no(1)=no(1)+1
  %>
  <tr bgcolor="#EAEAEA"> 
    <td width="47" height="20" align="center"><img src="../public/images/lastpost.gif" width="11" height="11"> 
      <%=no(1)%> </td>
    <td width="31" height="20" align="center"> 
      <%if objrst(1)("附件号")<>"0" then %>
      <img src="images/fj.gif" width="16" height="16"> 
      <%end if%>
    </td>
    <td width="395" height="20"> <a href="javascript:open1('<%=objrst(1)("消息题名")%>','<%=cstr(objrst(1)("发送日期"))%>')"> 
      <%=objrst(1)("消息题名")%></a></td>
    <td width="139" height="20">&nbsp;<%=objrst(1)("发送日期")%></td>
    <td width="151" height="20"><%=objrst(1)("发送人姓名")%></td>
  </tr>
  <%objrst(1).movenext
  next
    objrst(1).close
  set objrst(1)=nothing
  end if%>
  <%if cont(1)>10 then%>
  <tr bgcolor="#EAEAEA"> 
    <td width="47" height="20" align="center">&nbsp;</td>
    <td width="31" height="20" align="center">&nbsp;</td>
    <td width="395" height="20">&nbsp;</td>
    <td width="139" height="20">&nbsp;</td>
    <td width="151" height="20" align="right"><a href="News_ReadList_more.asp?i=1" class="blank">更多.....</a></td>
  </tr>
  <%end if%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td width="20%" bgcolor="#CCCCCC">  <b>部门新闻 
      <%if objrst(2).eof then response.write "0" else response.write cont(2) end if%>
      条<a name="depart"></a></b></td>
    <td><img src="../public/images/title.gif" width="20" height="18"></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bordercolor="#FFFFFF">
  <%if objrst(2).eof then %>
  <tr bgcolor="#EAEAEA"> 
    <td colspan="5" height="20" >&nbsp; 无部门消息。 </td>
  </tr>
  <%else  for i=1 to cont_for(2)
  no(2)=no(2)+1
  %>
  <tr bgcolor="#EAEAEA"> 
    <td width="47" height="20" align="center"><img src="../public/images/lastpost.gif" width="11" height="11"> 
      <%=no(2)%> </td>
    <td width="30" height="20" align="center"> 
      <%if objrst(2)("附件号")<>"0" then %>
      <img src="images/fj.gif" width="16" height="16"> 
      <%end if%>
    </td>
    <td width="396" height="20"> <a href="javascript:open1('<%=objrst(2)("消息题名")%>','<%=cstr(objrst(2)("发送日期"))%>')"> 
      <%=objrst(2)("消息题名")%></a></td>
    <td width="139" height="20">&nbsp;<%=objrst(2)("发送日期")%></td>
    <td width="151" height="20"><%=objrst(2)("发送人姓名")%></td>
  </tr>
  <%objrst(2).movenext
  next
  objrst(2).close
  set objrst(2)=nothing
  end if
  %>
  <%if cont(2)>10 then%>
  <tr bgcolor="#EAEAEA"> 
    <td width="47" height="20" align="center">&nbsp;</td>
    <td width="30" height="20" align="center">&nbsp;</td>
    <td width="396" height="20">&nbsp;</td>
    <td width="139" height="20">&nbsp;</td>
    <td width="151" height="20" align="right"><a href="News_ReadList_more.asp?i=2" class="blank">更多.....</a></td>
  </tr>
  <%end if%>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td width="20%" bgcolor="#CCCCCC">  <b>个人新闻 
      <%if objrst(3).eof then response.write "0" else response.write cont(3) end if%>
      条<a name="person"></a></b></td>
    <td><img src="../public/images/title.gif" width="20" height="18"></td>
  </tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center" bordercolor="#FFFFFF">
  <%if objrst(3).eof then %>
  <tr bgcolor="#EAEAEA"> 
    <td colspan="5" height="20">&nbsp; 无个人消息。 </td>
  </tr>
  <%else
  for i=1 to cont_for(3)
  no(3)=no(3)+1
  %>
  <tr bgcolor="#EAEAEA"> 
    <td width="47" height="20" align="center"><img src="../public/images/lastpost.gif" width="11" height="11"> 
      <%=no(3)%> </td>
    <td width="31" height="20" align="center"> 
      <%if objrst(3)("附件号")<>"0" then %>
      <img src="images/fj.gif" width="16" height="16"> 
      <%end if%>
    </td>
    <td width="395" height="20"> <a href="javascript:open1('<%=objrst(3)("消息题名")%>','<%=cstr(objrst(3)("发送日期"))%>')"> 
      <%=objrst(3)("消息题名")%></a></td>
    <td width="139" height="20">&nbsp;<%=objrst(3)("发送日期")%></td>
    <td width="151" height="20"><%=objrst(3)("发送人姓名")%></td>
  </tr>
  <%objrst(3).movenext
  next
  objrst(3).close
  set objrst(3)=nothing
  end if
  %>
  <%if cont(3)>10 then%>
  <tr bgcolor="#EAEAEA"> 
    <td width="47" height="20" align="center">&nbsp;</td>
    <td width="31" height="20" align="center">&nbsp;</td>
    <td width="395" height="20">&nbsp;</td>
    <td width="139" height="20">&nbsp;</td>
    <td width="151" height="20" align="right"><a href="News_ReadList_more.asp?i=3" class="blank">更多.....</a></td>
  </tr>
  <%end if%>
</table>

<p>&nbsp;</p>
<p>&nbsp;</p>
</body>
</html>
<script language=javascript>
			function open1(title,date)
			{
			window.open("news_ContentDisplay.asp?newstitle="+title+"&senddate="+date,"新闻内容","height=410,width=500,toolbar=no,menubar=no,scrollbars=yes,resizable=no,status=no,location=no")
			}
</script>

⌨️ 快捷键说明

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