📄 allnews.asp
字号:
<td colspan=3>
<table border=0 cellpadding=0 cellspacing=0 width=570>
<tbody>
<tr>
<td><img height=35 src="images/pics2/wp_sbox_01.gif"
width=5></td>
<td background=images/pics2/wp_sbox_02.gif width=596>
<form action="search.asp" method="post" name="form" id="form">
<table width="550" border=0 align=left cellpadding=0 cellspacing=0>
<tbody>
<tr>
<td width=95><font color=#666666><img
height=20 src="images/pics2/wp_sbox_search_pp2.gif"
width=94></font></td>
<td width="84" align=right>
<div align="center">
<input type="text" name="hw_name" size="20" class=input>
</div>
</td>
<td width="85" align=right>
<%
sql = "select * from sort"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else%>
<select name="sort_id" size="1">
<option selected value="">所有</option>
<% dim selclass
selclass=rs("sort_id")
do while not rs.eof
%>
<option value="<%=trim(rs("sort_id"))%>"><%=trim(rs("sort_name"))%></option>
<%rs.movenext
loop
end if
rs.close
%>
</select>
</td>
<td width=62>
<div align="center">
<input type="image" border="0" name="imageField" src="IMAGES/pics2/wp_sbox_bt_search.gif" width="51" height="19">
</div>
</td>
<td width=30>
<div align="right"><img src="IMAGES/pics2/icon_money.gif" width="19" height="13"></div>
</td>
<td width=42 valign="middle">
<div align="center">原价</div>
</td>
<td width=15>
<div align="right"><img src="IMAGES/pics2/icon_unisex.gif" width="14" height="13"></div>
</td>
<td width=60>
<div align="center">会员价</div>
</td>
<td width=15>
<div align="right"><img src="IMAGES/pics2/icon_heart.gif" width="14" height="12"></div>
</td>
<td width=60>
<div align="center">贵宾价</div>
</td>
</tr>
</tbody>
</table>
</form>
</td>
<td><img height=35 src="images/pics2/wp_sbox_03.gif"
width=5></td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
</td>
</tr>
<tr>
<td height=2></td>
</tr>
</tbody>
</table>
</TD>
</TR>
<TR>
<TD height=6></TD>
</TR>
</TBODY>
</TABLE>
<table width="570" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="2" width="14%" valign="top" background="images/pics2/top_bg.gif"> </td>
<td height="2" width="60%" background="images/pics2/top_bg.gif" valign="top"> </td>
<td height="2" width="4%" align="right" valign="top"><img src="images/pics2/join.gif" width="56" height="41"></td>
<td height="2" width="10%" align="right" valign="top"><a href="ding1.asp"><img src="images/pics2/avarta_bu.gif" width="128" height="41" border="0"></a></td>
<td height="2" width="12%" align="right" valign="top"><a href="ding2.asp"><img src="images/pics2/item_bu.gif" width="129" height="41" border="0"></a></td>
</tr>
<tr>
<TD height=6></TD>
</tr>
</table>
<TABLE border=0 cellPadding=0 cellSpacing=0 width=570>
<TBODY>
<TR>
<TD width="606"><IMG height=24
src="images/pics2/newslink.gif" width=570></TD>
</TR>
<TR>
<TD height="67">
<%
sql="select * from news order by news_id DESC"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "还 没 有 任 何 新闻 !"
else
totalPut=rs.recordcount
if currentpage<1 then
currentpage=1
end if
if (currentpage-1)*MaxPerPage>totalput then
if (totalPut mod MaxPerPage)=0 then
currentpage= totalPut \ MaxPerPage
else
currentpage= totalPut \ MaxPerPage + 1
end if
end if
if currentPage=1 then
showpages
showContent
showpages
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showpages
showContent
showpages
else
currentPage=1
showpages
showContent
showpages
end if
end if
end if
sub showcontent
%>
<%do while not rs.eof%>
<p style="word-spacing: 2; line-height: 120%; margin-top: 4; margin-bottom: 6">
<%i=0 %>
<%if len(rs("news_title"))>20 then
news_title=left(rs("news_title"),20)
%>
<img src="IMAGES/pics2/wp_main_why_q.gif" width="18" height="16"> <a href="news.asp?news_id=<%=rs("news_id")%>"><%=news_title%>…… (<%=rs("news_date")%>)
</a>
<%else%>
<img src="IMAGES/pics2/wp_main_why_q.gif" width="18" height="16"> <a href="news.asp?news_id=<%=rs("news_id")%>"><%=rs("news_title")%> (<%=rs("news_date")%>)</a>
<%end if%>
<br>
<% i=i+1
if i>=MaxPerPage then exit do
rs.movenext
loop
end sub%>
<%
sub showpages()
dim n
if (totalPut mod MaxPerPage)=0 then
n= totalPut \ MaxPerPage
else
n= totalPut \ MaxPerPage + 1
end if
response.write "<center>"
response.write "<br>"
response.write "<font color='#000080'> 共</font><b><font color=red>"&totalput&"</font></b><font color='#000080'>条新闻</font> "
dim k
response.write "分页 "
for k=1 to n
if k=currentPage then
response.write "[<b>"+Cstr(k)+"</b>] "
else
response.write "[<b>"+"<a href='allnews.asp?page="+cstr(k)+"&user_province="&keyword&"'>"+Cstr(k)+"</a></b>] "
end if
next
response.write "</center>"
end sub %>
</TD>
</TR>
</TBODY>
</TABLE>
</TD>
</TR>
<TR>
<TD colSpan=3 height=28> </TD>
</TR>
</TBODY>
</TABLE>
<!--#include file="copy.asp"-->
</center>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -