?? list.asp
字號:
?<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%response.buffer=true%>
<%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">
<!--#include file="conn.asp"-->
<%
'====================================================================
' 請你保留這段說明,這并不會影響你的速度. 交流QQ:31424717
' 程序制作:找北
' 升級時間: 2006-2-5
' E-Mail: g362hao@gmail.com
'====================================================================
%>
<wml>
<head>
<meta http-equiv="Cache-Control" content="no-Cache"/>
<meta http-equiv="Cache-Control" content="max-age=0"/>
</head>
<%
id=cint(request.QueryString("id"))
p=cint(request.QueryString("p"))
if p="" or p<1 then
p=1
end If
%>
<%
set objgbrs=server.createobject("ADODB.Recordset")
Sql="select fy from site"
objgbrs.open Sql,conn,1,1
fy=objgbrs("fy")
objgbrs.close
Set objgbrs=nothing
%>
<%
set objgbrs=server.createobject("ADODB.Recordset")
Sql="select classname,logo from class where id=" & id
objgbrs.open Sql,conn,1,1
if not objgbrs.eof then
classname=objgbrs("classname")
end if
%>
<card title='<%=classname%>'>
<p>
<!--#include file="admin/i.asp"-->
<%
if objgbrs("logo")<>"" then%>
<img src="<%=objgbrs("logo")%>" alt=""/><br/>
<%
end if
objgbrs.close
set objgbrs=nothing
%>
<%
e=cint(request.QueryString("e"))
if e=1 then
response.write("按:人氣||<a href='list.asp?e=2&id="&id&"'>最新</a>||<a href='list.asp?e=3&id="&id&"'>推薦</a>||<a href='list.asp?e=8&id="&id&"'>評論</a><br/><br/>")
end if
if e=2 or e="" or e=0 then
response.write("按:<a href='list.asp?e=1&id="&id&"'>人氣</a>||最新||<a href='list.asp?e=3&id="&id&"'>推薦</a>||<a href='list.asp?e=8&id="&id&"'>評論</a><br/><br/>")
end if
if e=3 then
response.write("按:<a href='list.asp?e=1&id="&id&"'>人氣</a>||<a href='list.asp?e=2&id="&id&"'>最新</a>||推薦||<a href='list.asp?e=8&id="&id&"'>評論</a><br/><br/>")
end if
if e=8 then
response.write("按:<a href='list.asp?e=1&id="&id&"'>人氣</a>||<a href='list.asp?e=2&id="&id&"'>最新</a>||<a href='list.asp?e=3&id="&id&"'>推薦</a>||評論<br/><br/>")
end if
%>
<%
set rs=Server.CreateObject("ADODB.Recordset")
select case e
case "1"
rsstr="select id,title,hot from art where pass and classID="&id&" order by hot desc"
rs.open rsstr,conn,1,2
case "2"
rsstr="select id,title,hot from art where pass and classid="&id&" order by id desc"
rs.open rsstr,conn,1,2
case "3"
rsstr="select id,title,hot from art where pass and classid="&id&" order by good desc"
rs.open rsstr,conn,1,2
case "8"
rsstr="select id,title,hot from art where pass and classID="&id&" order by pl desc"
rs.open rsstr,conn,1,2
case else
rsstr="select id,title,hot from art where pass and classid="&id&" order by id desc"
rs.open rsstr,conn,1,2
end select
maxpage=int((rs.recordcount-1)/fy)+1
if p>maxpage then
p=maxpage
end If
if rs.recordcount = 0 then
response.write("此類暫無內容!<br/>")
end If
if rs.recordcount > 0 then
rs.Move((p-1)*fy)
end If
dim j
j=1
do while ((not rs.EOF) and j<=fy)
%>
<%
Response.write "<a href='read.asp?id="&rs("id")&"&p=1'>"&((p-1)*fy+j)&"."&rs("title")&"</a> 人氣:"&rs("hot")&"<br/>"
%>
<%
rs.MoveNext
j=j+1
loop
%>
<%
if p*fy<rs.recordcount then
response.write("<a href='list.asp?e=" & e & "&id=" & id & "&p=" & p+1 & "'>[下頁]</a> ")
end If
if p>1 then
response.write("<a href='list.asp?e=" & e & "&id=" & id & "&p=" & p-1 & "'>[上頁]</a> ")
end If
if p*fy<rs.recordcount or p>1 then
response.write("<br/>第" & p & "頁,共" & (int((rs.recordcount-1)/fy)+1) & "頁<br/>")
end If
%>
<%if p*fy<rs.recordcount or p>1 then%>
<input name="page" title="頁碼" type="text" format="*N" emptyok="true" size="3" maxlength="4" value=""/>
<anchor>Go!
<go href="list.asp?e=<%=e%>" accept-charset='utf-8'>
<postfield name='id' value="<%=id%>"/>
<postfield name="p" value="$(page)"/>
</go>
</anchor><br/>
<%end if%>
<%
rs.close
Set rs=nothing
%>
<%
Response.write "--------<br/>"
Response.write "<a href='http://"&url&"'>"&name&"</a>"
response.write "<br/></p></card></wml>"
response.end
objgbrs.close
Set objgbrs=nothing
conn.close
set conn=nothing
%>
</p>
</card>
</wml>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -