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

📄 sechand.asp

📁 校园二手交易系统,具有完备的后台操作以及应用功能!
💻 ASP
📖 第 1 页 / 共 2 页
字号:
                <td width="5%" class="tablebody1" ><div align="center"><%= rst("hits") %></div></td>
 
  </tr>
<%  
Rst.movenext
		loop
	end if
	Rst.close
  %>
<% 
   if id <>"" then
			SqlT = "Select top 10 * from 2s_list where sxs = 0 and classid="& id &" and top1= 1 order by Intime desc,Intime"
	Set Rst = Conn.execute(SqlT)		
	if Rst.eof and Rst.bof then
		Response.write ""
	else
		do while not Rst.eof
		
 %>
  <tr> 
                <td width="6%" class="tablebody1"> <div align="center"><img src="images/2s1.gif"></div></td>
                <td width="9%" class="tablebody1"> <div align="center"> 
                    <% 
		  Select Case rst("lx")
                Case "1"
                response.write "<font color=""#008000"">[出售]</font>"
                Case "2"
                response.write "<font color=""#FF00FF"">[求购]</font>"
                Case "3"
                response.write "<font color=""#008000"">[出租]</font>"
                Case "4"
                response.write "<font color=""#FF00FF"">[求租]</font>"
                Case "5"
                response.write "<font color=""#ff0000"">[求职]</font>"
                Case "6"
                response.write "<font color=""#ff0000"">[招聘]</font>"
                Case Else
                response.write "<font color=""#FF00FF"">[其它]</font>"
                End Select
		   %>
                  </div></td>
                <td class="tablebody1" width="39%"><a href="show.asp?id=<%= id %>&Unid=<%= rst("s_id") %>"><%= left(rst("title"),16) %></a></td> <td width="16%" class="tablebody1"><div align="center"><%=GetSchool(Rst("dq"))%></div></td>
                <td width="11%" class="tablebody1"> <div align="center"><%=FormatDateTime(rst("Intime"),vbshortdate)%></div></td>
                <td width="11%" class="tablebody1"> <div align="center"> 
                    <% 
		  Select Case rst("jx")
                Case "0"
                response.write "<font color=""#008000"">[未完]</font>"
                Case "1"
                response.write "<font color=""#FF00FF"">[完成]</font>"
                End Select
		   %>
                  </div></td>
                <td width="5%" class="tablebody1"><div align="center"><%= rst("hits") %></div></td>
 
  </tr>
<%  
Rst.movenext
		loop
	end if
	Rst.close
	end if
%>
              <%

	set rs=server.createobject("adodb.recordset")
	sql="Select * from 2s_list where sxs =0 "
	if title<>"" then sql=sql & " and title like '%"&title&"%'"
	if author<>"" then sql=sql & " and author LIKE '%"&author&"%'"
	if Nclassid<>"" then sql=sql & " and Nclassid ="&Nclassid&""
	if classid<>"" then sql=sql & " and classid ="&classid&""
	if dq<>"" then sql=sql & " and dq LIKE '%"&dq&"%'"
	if lx<>"" then sql=sql & " and lx ="&lx&""
	if u_id<>"" then sql=sql & " and u_id ="&u_id&""
	sql=sql & " order by s_id desc"
	rs.open sql,conn,1,1
 	if rs.eof and rs.bof then
		Response.Write "<center><font color=red>还没相关信息。</font></center>"
	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,"sechand.asp"
       		else
          		if (currentPage-1)*MaxPerPage<totalPut then
            			rs.move  (currentPage-1)*MaxPerPage
            			dim bookmark
            			bookmark=rs.bookmark           			
            			showContent
             			showpage totalput,MaxPerPage,"sechand.asp"
        		else
	        		currentPage=1                  			
           			showContent
           			showpage totalput,MaxPerPage,"sechand.asp"
	      		end if
	   		end if
		rs.close
		set rs = nothing	
   	end if 
	sub showContent
	dim i 
	   	i=0
	%>
              
                <%do while not rs.eof%>
                <tr onMouseOver=chc(idfm<%= rs(0) %>) onMouseOut=chb(idfm<%= rs(0) %>) id=idfm<%= rs(0) %>> 
                  <td width="6%" class="tablebody1"> <div align="center"><img src="images/2s.gif"></div></td>
                  <td width="9%" class="tablebody1"> <div align="center"> 
                      <% 
		  Select Case rs("lx")
                Case "1"
                response.write "<font color=""#008000"">[出售]</font>"
                Case "2"
                response.write "<font color=""#FF00FF"">[求购]</font>"
                Case "3"
                response.write "<font color=""#008000"">[出租]</font>"
                Case "4"
                response.write "<font color=""#FF00FF"">[求租]</font>"
                Case "5"
                response.write "<font color=""#ff0000"">[求职]</font>"
                Case "6"
                response.write "<font color=""#ff0000"">[招聘]</font>"
                Case Else
                response.write "<font color=""#FF00FF"">[其它]</font>"
                End Select
		   %>
                    </div></td>
                  <td class="tablebody1" width="39%"><a href="show.asp?id=<%= id %>&Unid=<%= rs("s_id") %>"><%= left(rs("title"),16) %></a></td> <td width="16%" class="tablebody1"><div align="center"><%=GetSchool(Rs("dq"))%></div></td>
                  <td width="11%" class="tablebody1"> <div align="center"><%=FormatDateTime(rs("Intime"),vbshortdate)%></div></td>
                  <td width="11%" class="tablebody1"> <div align="center"> 
                      <% 
		  Select Case rs("jx")
                Case "0"
                response.write "<font color=""#008000"">[未完]</font>"
                Case "1"
                response.write "<font color=""#FF00FF"">[完成]</font>"
                End Select
		   %>
                    </div></td>
                  <td width="5%" class="tablebody1"><div align="center"><%= rs("hits") %></div></td>
                </tr>
                <%
  i=i+1
	      if i>=MaxPerPage then exit do
  rs.movenext
  loop
  %>
              
              <tr> 
                <td height="25" colspan="7" class="tablebody1"> 
                  <%
   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 cellspacing=1 width='100%' border=0 colspan='23' ><form method=Post action="""&filename&"""><tr><td align=right> "
  	if CurrentPage<2 then
    		response.write "共<b><font color=red>"&totalnumber&"</font></b>条信息&nbsp;首页 上一页&nbsp;"
  	else
    		response.write "共<b><font color=red>"&totalnumber&"</font></b>条信息&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="menu1" onChange="MM_jumpMenu('parent',this,0)">
                    <%for i = 1 to n%>
                    <option value='<%=filename%>?page=<%=i%>'>第<%=i%>页</option>
                    <%next%>
                  </select> 
                  <%   
	response.write "</td></tr></FORM></table>"
end function




%>
                </td>
              </tr>
              </table></div>
	</td>
  </tr>
</table>       


<!--#include file="bottom.asp"-->

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -