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

📄 commend.asp

📁 .asp网站程序。专业的二手汽车商店网站。功能强大
💻 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> &gt;&gt; <a class=white_bg  
            href="./"><%= CategoryName_CHS %></a> &gt;&gt; 信息推荐</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">发布日期:</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&"条信息&nbsp;首页 上一页&nbsp;" 
  	else 
    		response.write ""&totalnumber&"个&nbsp;<a href="&filename&"?page=1>首页</a>&nbsp;" 
    		response.write "<a href="&filename&"?page="&CurrentPage-1&">上一页</a>&nbsp;" 
  	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 "&nbsp;页次:<strong><font color=red>"&CurrentPage&"</font>/"&n&"</strong>页 " 
    	response.write "&nbsp;<b>"&maxperpage&"</b>条信息/页 " 
%> 
      转到:  
      <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 + -