?? news_readlist.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"> 無全體消息。 </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"> <%=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"> </td>
<td width="31" height="20" align="center"> </td>
<td width="395" height="20"> </td>
<td width="139" height="20"> </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" > 無部門消息。 </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"> <%=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"> </td>
<td width="30" height="20" align="center"> </td>
<td width="396" height="20"> </td>
<td width="139" height="20"> </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"> 無個人消息。 </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"> <%=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"> </td>
<td width="31" height="20" align="center"> </td>
<td width="395" height="20"> </td>
<td width="139" height="20"> </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> </p>
<p> </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 + -