?? wap_so.asp
字號:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="Conn.asp"-->
<%Response.ContentType = "text/vnd.wap.wml; charset=utf-8"%><?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN" "http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<head>
<meta http-equiv="Cache-Control" content="no-Cache"/>
<meta http-equiv="Cache-Control" content="max-age=0"/>
</head>
<%
'**********************************************************************
'* 程序名稱: 瑪雅自助導航系統
'* 程序功能:搜索
'* 英文名稱: WapLink Ver 4.5
'* 程序開發: Wapcr
'* 主頁地址: http://wapcr.cn/
'* 演示地址: http://wapcr.cn/link/
'**********************************************************************
Find=Wap.checkstr(Trim(Request("Find")),50)
webtype=Request("webtype")
condition = " where inp>="&inpc&" and isverify="&strTrue
pl=Request("pl")
if pl="" then
pl="indate"
end if
linkstr = "pl=" & pl
ob = Request("ob")
if ob<>"asc" then ob="desc"
if webtype="" or not isnumeric(webtype) then
webtype=0
title="搜索-全部"
else
'查詢是否有此分類,取出類別名稱
set trs = Wap.execute("select name from WebType where id="&webtype)
if trs.eof then
webtype=0
title="搜索-全部"
else
webtypename="類別:"&trs(0)
title="搜索-"&webtypename
end if
set trs = nothing
end if
if webtype>0 then
condition = condition & " and webtype="&webtype
linkstr = linkstr & "&webtype="&webtype
end if
if Find<>"" then
condition = condition & " and (sitename like '%"&Find&"%' or siteintro like '%"&Find&"%' or siteurl like '%"&Find&"%')"
linkstr = linkstr & "&Find="&Find
end if
'普通sql語句
sql="select id,siteTitle from Link" & condition &" ORDER BY "&pl&" "&ob
%>
<card title="<%=title%>">
<p align="left">
<%if Find="" then%>
關鍵字:<input name="Find" type="text" value="<%=Find%>" maxlength="20"/>
分類:<select name="webtype">
<option value="">全部</option>
<%set rs=wap.execute("select * from WebType order by orderid")
m=1
do while not rs.eof
Response.write " <option value="""&rs("id")&""">"&rs("name")&"</option>"
rs.movenext
m=m+1
loop
set rs=nothing
%>
</select>
排序:<select name="pl">
<option value="inc">總計點入</option>
<option value="inj">今天點入</option>
<option value="inp">平均點入</option>
<option value="outc">總計點出</option>
<option value="outj">今天點出</option>
<option value="outp">平均點出</option>
<option value="indate">點入時間</option>
<option value="outdate">點出時間</option>
<option value="fromdate">統計時間</option>
<option value="dateandtime">加入時間</option>
</select>
<select name="ob">
<option value="asc">順序</option>
<option value="desc">倒序</option>
</select>
<anchor>查詢<go href="Wap_So.asp" method="post">
<postfield name="Find" value="$(Find)"/>
<postfield name="webtype" value="$(webtype)"/>
<postfield name="pl" value="$(pl)"/>
<postfield name="ob" value="$(ob)"/>
</go></anchor><br/>
<%else%>
<%
pag=WapXiaxian'顯示個站點
p=Cint(Request("p"))
if p="" or p<1 then p=1
set rs=server.createobject("adodb.recordset")
rs.open sql,Conn,1,2
if rs.eof then
Response.write "沒有找到你所查詢的網站<br/>"
else
rs.Move((p-1)*pag)
j=1
do while ((not rs.EOF) and j<=clng(pag))
If WapChuzhan=1 Then
Response.write ""&((p-1)*pag+j)&".<a href='Wap_View.asp?id="&rs("id")&"'>"&Wap.Ubb(rs("siteTitle"))&"</a><br/>"
Else
Response.write ""&((p-1)*pag+j)&".<a href='Wap_Out.asp?id="&rs("id")&"'>"&Wap.Ubb(rs("siteTitle"))&"</a><br/>"
End If
rs.MoveNext
j=j+1
loop
if p*pag<rs.recordcount then response.write("--------<br/><a href=""Wap_So.asp?p="&p+1&"&Find="&Request("Find")&"&pl="&Request("pl")&"&ob="&Request("ob")&""">下頁</a> ")
if p>1 then response.write("<a href=""Wap_So.asp?p="&p-1&"&Find="&Request("Find")&"&pl="&Request("pl")&"&ob="&Request("ob")&""">上頁</a> ")
if p*pag<rs.recordcount or p>1 then response.write("(" & p & "/" & (int((rs.recordcount-1)/pag)+1) & ")<br/>")
if p*pag<rs.recordcount or p>1 then
%>
<input name="page" title="頁碼" type="text" format="*N" emptyok="true" size="3" maxlength="4" value="<%if p>=maxpage then response.write(p-1) else response.write(p+1)%>"/>
<anchor>跳轉頁面<go href="Wap_So.asp?Find=<%=Request("Find")%>&pl=<%=Request("pl")%>&ob=<%=Request("ob")%>"><postfield name="p" value="$(page)"/></go></anchor>
<br/>
<%
end if
end if
rs.close
set rs=nothing
%>
<%end if%>
--------<br/>
<a href="index.asp"><%=ChannelName%></a><br/>
<%
Rem 顯示整合后的返回首頁
If WapZhenghe=1 Then Response.write "<a href="""&WapUrl&""">返回首頁</a><br/>"
Rem 讀取網站底部開始
Response.write Wap.DefineContents("9")
Rem 顯示網站訪問
Response.write Wap.Online()
set wap=nothing%>
</p>
</card>
</wml>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -