?? news.asp
字號:
<!--#include file="head.asp" -->
<%
'* 個人版價格:500元 商業版價格:700元
'* 演示:http://Demo.wenday.com
'* 版本:Engine_WenDay網站信息系統 Ver 2.0 演示版
'* 版權所有: 一奔網絡工作室(Wenday.Com)
'* 聯系QQ: 42367091
'* Email :wenday@21cn.com
'* 程序開發: Wenday
%>
<%
MaxPerPage=page_count '分頁顯示的紀錄個數
dim sql
dim rs
dim gstBookID
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
%>
<TABLE width=778 border=0 align="center" cellPadding=0 cellSpacing=0>
<TBODY>
<TR>
<TD width="100%"> <TABLE cellSpacing=0 cellPadding=0 width=778 align=center border=0>
<TBODY>
<TR bgColor=#ffffff>
<TD colSpan=3 height=2></TD>
</TR>
<TR>
<TD width="19" height=22 align=right><img src="Img/02_1.gif" width="12" height="9"></TD>
<TD width="748"><FONT color=#333333> 您的位置: </FONT>網站的首頁</TD>
<TD width="11"> </TD>
</TR>
</TBODY>
</TABLE>
<TABLE cellSpacing=0 cellPadding=0 width=778 border=0>
<TBODY>
<TR>
<TD vAlign=top colSpan=2>
<TABLE cellSpacing=0 cellPadding=0 width="100%" align=center
border=0>
<TBODY>
<TR bgColor=#cccccc>
<TD colSpan=2 height=1></TD>
</TR>
<TR>
<TD colSpan=2 height=2></TD>
</TR>
<TR>
<TD width=62 bgColor=#eeeeee height=22></TD>
<TD bgColor=#eeeeee> <% Call Marquee()%></TD>
</TR>
<TR>
<TD bgColor=#cccccc colSpan=2
height=3></TD>
</TR>
</TBODY>
</TABLE></TD></TR>
<TR>
<TD style="BORDER-RIGHT: #d8d8d8 1px solid;BORDER-left: #d8d8d8 1px solid" vAlign=top width=185
bgColor=#f6f6f6><TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD background=""> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=34 background="Img/homedhbg.gif"><IMG
src="Img/hydl.gif"></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD height=40><TABLE width=95% height="100" border=0 align=center cellPadding=0 cellSpacing=1 bgColor=#e8e8e8>
<TBODY>
<TR>
<TD height="53" bgColor=#f9f9f9>
<% Call UserLogin() %>
</TD>
</TR>
</TABLE></TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD background=Img/homedhbg.gif> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=34><div align="center"><strong>熱 門 信 息</strong></div></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD vAlign=top><TABLE cellSpacing=0 cellPadding=5 width=99% align=center bgColor=#e8e8e8 border=0>
<TBODY>
<TR>
<TD width="100%" bgColor=#f9f9f9>
<% Call Ew_ShowInfo(1,10,13,0,0) %>
</TD>
</TR>
</TABLE></TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD background=Img/homedhbg.gif> <TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=34><div align="center"><strong>網 站 調 查</strong></div></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD vAlign=top><TABLE style="WORD-BREAK: break-all" height="100%" cellPadding=4 width="100%" border=0>
<TBODY>
<TR>
<TD vAlign=top height=80> <TABLE width=99% height="100%" border=0 align=center cellPadding=0 cellSpacing=1 bgColor=#e8e8e8>
<TBODY>
<TR>
<TD width="100%" height="52" bgColor=#f9f9f9>
<% Call Ew_FlashVote() %>
</TD>
</TR>
</TABLE></TD>
</TR>
</TBODY>
</TABLE></TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD height="32" background=Img/homedhbg.gif> </TD>
</TR>
<TR>
<TD></TD>
</TR>
<TR>
<TD height="7"></TD>
</TR>
</TBODY>
</TABLE></TD>
<TD vAlign=top align=left width=593 style="BORDER-RIGHT: #d8d8d8 1px solid">
<TABLE cellSpacing=0 cellPadding=0 width="100%" border=0>
<TBODY>
<TR>
<TD height=8></TD>
</TR>
</TBODY>
</TABLE>
<table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3"><img src="Img/News.gif" width="548" height="33"></td>
</tr>
<tr>
<td width="26" height="258" valign="top"><img src="Img/left.gif" width="13" height="175"></td>
<td width="507"valign="top"> <br>
<%
sql="select * from news ORDER BY id DESC"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,1,1
'Set Rs=Conn.Execute("select * from news ORDER BY id DESC")
rs.pagesize=MaxPerPage
If trim(Request("Page"))<>"" and IsNumeric(Request("Page")) then
CurrentPage= CLng(request("Page"))
If CurrentPage< 1 then
CurrentPage= 1
ElseIf CurrentPage> rs.PageCount then
CurrentPage = rs.PageCount
End If
Else
CurrentPage= 1
End If
if rs.eof then
response.write "<p align='center'>還沒有添加信息...</p>"
else
totalPut=rs.recordcount '記錄總數
if CurrentPage=1 then
showContent
showpages
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move(currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark '移動到開始顯示的記錄位置
showContent
showpages
else
currentPage=1
showContent
end if
end if
rs.close
end if
set rs=nothing
set conn=nothing
sub showContent
%>
<TABLE width="100%" align="center" cellspacing="2" >
<%
dim i
i=0
do while not (rs.eof or err)
%>
<tr>
<td width="40" height="18">
<div align="right"><img src="Img/doc.gif" width="10" height="12" align="absmiddle"></div></td>
<td width="278"><div align="left"><a href="NewsInfo.asp?id=<%response.write rs(0)%>" title="<%=rs("title")%>">
<% if len(rs("title"))>17 then%>
<%=Left(rs("title"),17)%>...
<%else%>
<%response.write rs("title")%>
<%end if%>
</a></div></td>
<td width="212">[ <%=rs("time")%> ]</td>
</tr>
<%
i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
%>
</TABLE>
<%end sub%>
<%sub showpages()%>
<br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28" align="right">
<%
dim n,k
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
%>
共有<%=rs.recordcount%>個記錄 每頁<%=Page_count%>個記錄
<%
k=currentPage
if k=1 then
response.write " 首頁 "& vbCrLf
response.write " 上一頁 "& vbCrLf
end if
if k<>1 then
response.write "<a href='News.asp?page=1'> 首頁 </a>"
response.write "<a href='News.asp?page="+cstr(k-1)+"'> 上一頁 </a>"
end if
if k=n then
response.write " 下一頁 "& vbCrLf
response.write " 末頁 "& vbCrLf
end if
if k<>n then
response.write "<a href='News.asp?page="+cstr(k+1)+"'> 下一頁 </a>"
response.write "<a href='News.asp?page="+cstr(n)+"'> 末頁 </a>"
end if
%>
</td>
</tr>
</table>
<%
end sub
%> </td>
<td width="16" valign="top"><img src="Img/right.gif" width="16" height="175"></td>
</tr>
</table>
</TD>
</TR></TBODY></TABLE></TD></TR></TBODY></TABLE>
<!--#include file="Bottom.asp" -->
</BODY></HTML>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -