?? sechand.asp
字號:
<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>條信息 首頁 上一頁 "
else
response.write "共<b><font color=red>"&totalnumber&"</font></b>條信息 <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>條信息/頁 "
%>
轉到:
<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 + -