?? commend.asp
字號:
<!--#include file="Config.asp" -->
<%
dim totalPut
dim CurrentPage
dim TotalPages
dim i,j
dim sql
dim rs
Const MaxPerPage=10
if not isempty(request("page")) then
currentPage=cint(request("page"))
else
currentPage=1
end if
%>
<HTML><HEAD><TITLE><%= Title_Name %><%= CategoryName_CHS %> ==>> 選擇分類 </TITLE>
<META http-equiv=Content-Type content="text/html; charset=gb2312">
<meta name=keywords content="安徽二手市場">
<LINK href="style.css" type=text/css rel=stylesheet>
</HEAD>
<BODY text=#003300 vLink=#002200 bgColor=#cccccc leftMargin=0 topMargin=0>
<!--#include file="top.asp" -->
<!--#include file="navbar.asp" -->
<table width="770" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td colspan="7" valign="top" bgcolor="#FFFFFF" ><table width="98%" border="0" align="center">
<tr>
<td><img src="images/dotdb.gif" width="10" height="10" align="absmiddle">
當前位置:<a class=white_bg
href="http://2so.fjxn.com">首頁</a> >> <a class=white_bg
href="./"><%= CategoryName_CHS %></a> >> 信息推薦</td>
</tr>
</table>
<% set rs=server.createobject("adodb.recordset")
sql="select SoftID,SoftName,SoftVer,Content,SoftSize,SoftTime,System,images from "&CategoryName&"_SoftInfo where images<>''and iscommend=true"
sql=sql&" order by SoftTime desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<p align='center'>沒有或沒有找到任何信息</p><br><br>"
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
showContent
showpage totalput,MaxPerPage,"Commend.asp"
else
if (currentPage-1)*MaxPerPage<totalPut then
rs.move (currentPage-1)*MaxPerPage
dim bookmark
bookmark=rs.bookmark
showContent
showpage totalput,MaxPerPage,"Commend.asp"
else
currentPage=1
showContent
showpage totalput,MaxPerPage,"Commend.asp"
end if
end if
rs.close
set rs=nothing
end if
sub showContent
dim i
i=0
%>
<table width="98%" border=0 align="center" cellpadding=5 cellspacing=1>
<%do while not rs.eof%>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td width="28%" align="center"><a href="SoftView.Asp?SoftID=<%=rs("SoftID")%>" title="<%=rs("SoftName")&rs("SoftVer")%>"><img src="<%=rs("images")%>" border=0 width="150" height="110" ></a></td>
<td> <table width="100%" border="0" cellspacing="1" cellpadding="3">
<tr>
<td width="15%" bgcolor="#EFEFEF" align="center">物品名稱:</td>
<td colspan="3"><a href="SoftView.asp?SoftID=<%=rs("SoftID")%>" class="ArticleList"><%=rs("SoftName")%></a></td>
</tr>
<tr>
<td width="15%" bgcolor="#EFEFEF" align="center">新舊程度:</td>
<td width="40%"><%=trim(rs("SoftVer"))%></td>
<td width="15%" bgcolor="#EFEFEF" align="center">發(fā)布日期:</td>
<td width="30%"><%=rs("SoftTime")%></td>
</tr>
<tr>
<td width="15%" bgcolor="#EFEFEF" align="center">物品價格:</td>
<td width="30%"><% if rs("softsize")="0" then
Response.Write"價格面議"
else
Response.Write(round(rs("SoftSize")))&"元(RMB)"
end if
%></td>
</tr>
<tr>
<td colspan="4">
<%if len(trim(rs("Content")))>118 then%>
· <%=left(trim(rs("Content")),118)%>...
<%else%>
· <%=trim(rs("Content"))%>
<%end if%>
</td>
</tr>
</table></td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<tr>
<td height="1" background="images/bgline.gif" colspan="2" ></td>
</tr>
<%
i=i+1
rs.movenext
if i>=MaxPerPage then exit do
loop
%>
</table>
<% end sub
function showpage(totalnumber,maxperpage,filename)
dim n
if totalnumber mod maxperpage=0 then
n= totalnumber \ maxperpage
else
n= totalnumber \ maxperpage+1
end if
response.write "<table width='98%' border='0' align='center'><form method=Post action="&filename&"><tr><td align='center'> "
response.write "<font color='red'>推薦信息</font> "
if CurrentPage<2 then
response.write ""&totalnumber&"條信息 首頁 上一頁 "
else
response.write ""&totalnumber&"個 <a href="&filename&"?page=1>首頁</a> "
response.write "<a href="&filename&"?page="&CurrentPage-1&">上一頁</a> "
end if
if n-currentpage<1 then
response.write "下一頁 尾頁"
else
response.write "<a href="&filename&"?page="&(CurrentPage+1)&">"
response.write "下一頁</a> <a href="&filename&"?page="&n&">尾頁</a>"
end if
response.write " 頁次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>頁 "
response.write " <b>"&maxperpage&"</b>條信息/頁 "
%>
轉(zhuǎn)到:
<select name='page' size='1' onChange='javascript:submit()'>
<%for i = 1 to n%>
<option value='<%=i%>' <%if CurrentPage=cint(i) then%> selected <%end if%>>第<%=i%>頁</option>
<%next%>
</select>
<%response.write "</td></tr></form></table>"%>
<%
end function
%>
</td>
</tr>
</table>
<!--#include file="end.asp" -->
</BODY></HTML>
<%
CloseDatabase
%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -