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

📄 news.asp

📁 网站代码
💻 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>&nbsp;您的位置:&nbsp;</FONT>网站的首页</TD>
                  <TD width="11">&nbsp;</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>&nbsp; </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%>个记录 &nbsp;每页<%=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 + -