?? list.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="include/function.asp"-->
<!--#include file="include/setup.asp"-->
<!--#include file="head.asp"-->
<%
dim sort
sort=HTMLEncode(Request.QueryString("sort"))
sql="select sortid,SortName from sort where sortid='"&sort&"'"
set rs=conn.execute(sql)
if not rs.bof and not rs.eof then
sortname=rs("sortname")
sortid=rs("sortid")
else
response.write "該欄目不存在,請返回!"
response.end
end if
ZhaiUser=HTMLEncode(Request.QueryString("ZhaiUser"))
title=HTMLEncode(Request.QueryString("title"))
%>
<script language="JavaScript">
function submitForm(obj)
{
var Title=obj.Title.value;
var Sort=obj.Sort.value;
obj.action="list.asp?sort="+Sort+"&title="+Title;
return true;
}
</script>
<table width="900" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td width="380" valign="top" bgcolor="#F4EFE5"><table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="28" align="left" bgcolor="#D4D0C8" class="title">圖片信息</td>
<td align="right" bgcolor="#D4D0C8"><a href="img.asp?sort=<%=rs("sortid")%>" target="_blank">更多>>></a> </td>
</tr>
<tr>
<td height="6" colspan="2"></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%"
border="0">
<tr>
<% aa8=0%>
<%
pxzd="hot"
sql="select top 20 ID,IIf(Len(Title)<8,Title,Left(Title,7)+'..') as Title,UserID,htmurl,filepath,FromURL,img,b.SortName,IIf(Len(Intro)<100,Intro,Left(Intro,100)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.Sort='"&sort&"' and img<>'' and isPub=true order by ID desc"
set rszhai=server.createobject("ADODB.recordset")
rszhai.open sql,conn,1
do while not rszhai.eof
if isgd=1 then
linkadd="article/"&rszhai("filepath")&"/"&rszhai("HtmUrl")
else
linkadd="goto.asp?id="&rszhai("id")
end if
%>
<% aa8=aa8+1%>
<td><div align="center">
<table border="0" cellspacing="0" cellpadding="2">
<tr><td height="10"></td></tr>
<tr>
<td><a title="<%=HTMLEncode(rszhai("Title"))%>" target="_blank" href="<%=linkadd%>"> <img src="<%=rszhai("img")%>" border="0" width="130" height="100" class="picborder" /></a></td>
</tr>
</table>
<%=HTMLEncode(rszhai("Title"))%> </div></td>
<% if aa8 mod 2=0 then response.write ("<tr>")%>
<%
rszhai.movenext
loop
rszhai.close
%>
</tr>
</table></td>
<td width="10"></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="53%" height="28" align="left" bgcolor="#D8C4B6" class="title">您現(xiàn)在的位置:<a href="index.html" target="_blank">首頁</a> > <%=sortname%></td>
<td width="47%" bgcolor="#D8C4B6">排序方式:<a href="list.asp?sort=<%=sort%>&pxzd=<%=server.urlencode("PostTime")%>">時間</a>- <a href="list.asp?sort=<%=sort%>&pxzd=<%=server.urlencode("Rank")%>">等級</a>- <a href="list.asp?sort=<%=sort%>&pxzd=<%=server.urlencode("reads")%>">點擊</a> <a href="jsfeed.asp?s=<%=sort%>" target="_blank"><img src="image/icon-js.gif" alt="JS格式輸出" border="0" align="absmiddle" /></a> <a href="rss2feed.asp?sort=<%=sort%>&user=<%=ZhaiUser%>" target="_blank"> <img src="image/icon-rss.gif" alt="RSS格式輸出" border="0" align="absmiddle" /></a></td>
</tr>
</table>
<table cellspacing="0" cellpadding="0" width="100%" bgcolor="#ffffff"
border="0">
<tr>
<%
pageno=cint(request.querystring("pageno"))
if pageno=0 then pageno=1
pxzd=HTMLEncode(request.querystring("pxzd"))
if pxzd="" then pxzd="hot"
if ZhaiUser="" then
if title="" then
sql="select ID,IIf(Len(Title)<13,Title,Left(Title,13)+'...') as Title,UserID,FromURL,HtmUrl,filepath,hot,PostTime,Xsort,Reads,b.SortName,IIf(Len(Intro)<80,Intro,Left(Intro,80)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.Sort='"&sort&"' and isPub=true order by "&pxzd&" desc,id desc"
else
sql="select ID,IIf(Len(Title)<13,Title,Left(Title,13)+'...') as Title,UserID,FromURL,HtmUrl,filepath,hot,PostTime,Xsort,Reads,b.SortName,IIf(Len(Intro)<80,Intro,Left(Intro,80)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.Sort='"&sort&"' and a.Title like '%"&title&"%' and isPub=true order by "&pxzd&" desc,id desc"
end if
else
if title="" then
sql="select ID,IIf(Len(Title)<13,Title,Left(Title,13)+'...') as Title,UserID,FromURL,HtmUrl,filepath,hot,PostTime,Xsort,Reads,b.SortName,IIf(Len(Intro)<80,Intro,Left(Intro,80)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.UserId='"&ZhaiUser&"' and a.Sort='"&sort&"' and isPub=true order by "&pxzd&" desc,id desc"
else
sql="select ID,IIf(Len(Title)<13,Title,Left(Title,13)+'...') as Title,UserID,FromURL,HtmUrl,filepath,hot,PostTime,Xsort,Reads,b.SortName,IIf(Len(Intro)<80,Intro,Left(Intro,80)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.UserId='"&ZhaiUser&"' and a.Sort='"&sort&"' and a.Title like '%"&title&"%' and isPub=true order by "&pxzd&" desc,id desc"
end if
end if
set rs=server.createobject("ADODB.recordset")
rs.open sql,conn,1
aaa1=0
if not rs.bof and not rs.eof then ' 當有數(shù)據(jù)的時候
for i=1 to 20
if rs.eof then exit for
%>
<td width="33%" height="24" align="left" bgcolor="#FBF3EC" class="list" style="border-bottom-style:dotted; border-bottom-width:1px; border-bottom-color:#666666;">
<%
aaa1=aaa1+1
if isgd=1 then
linkadd="article/"&rs("filepath")&"/"&rs("HtmUrl")
else
linkadd="goto.asp?id="&rs("id")
end if
Response.Write("<font color='blue'>[聯(lián)盟推薦]</font><a href="&linkadd&" target='_blank' title='"&HTMLEncode(rs("Title"))&"'>"&HTMLEncode(rs("Title"))&"</a>")
%></td>
<%
if (aaa1 mod 2)=0 then response.write "<tr>" end if
rs.MoveNext
row=row+1
next
else
response.write "暫無數(shù)據(jù)"
end if
%>
</tr>
<tr><td height="10"></td></tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<%
pageno=cint(request.querystring("pageno"))
if pageno=0 then pageno=1
pxzd=HTMLEncode(request.querystring("pxzd"))
if pxzd="" then pxzd="hot"
if ZhaiUser="" then
if title="" then
sql="select ID,IIf(Len(Title)<26,Title,Left(Title,26)+'...') as Title,UserID,FromURL,HtmUrl,filepath,hot,PostTime,Xsort,Reads,b.SortName,IIf(Len(Intro)<80,Intro,Left(Intro,80)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.Sort='"&sort&"' and isPub=true order by "&pxzd&" desc,id desc"
else
sql="select ID,IIf(Len(Title)<26,Title,Left(Title,26)+'...') as Title,UserID,FromURL,HtmUrl,filepath,hot,PostTime,Xsort,Reads,b.SortName,IIf(Len(Intro)<80,Intro,Left(Intro,80)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.Sort='"&sort&"' and a.Title like '%"&title&"%' and isPub=true order by "&pxzd&" desc,id desc"
end if
else
if title="" then
sql="select ID,IIf(Len(Title)<26,Title,Left(Title,26)+'...') as Title,UserID,FromURL,HtmUrl,filepath,hot,PostTime,Xsort,Reads,b.SortName,IIf(Len(Intro)<80,Intro,Left(Intro,80)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.UserId='"&ZhaiUser&"' and a.Sort='"&sort&"' and isPub=true order by "&pxzd&" desc,id desc"
else
sql="select ID,IIf(Len(Title)<26,Title,Left(Title,26)+'...') as Title,UserID,FromURL,HtmUrl,filepath,hot,PostTime,Xsort,Reads,b.SortName,IIf(Len(Intro)<80,Intro,Left(Intro,80)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.UserId='"&ZhaiUser&"' and a.Sort='"&sort&"' and a.Title like '%"&title&"%' and isPub=true order by "&pxzd&" desc,id desc"
end if
end if
set rs=server.createobject("ADODB.recordset")
rs.open sql,conn,1
if not rs.bof and not rs.eof then ' 當有數(shù)據(jù)的時候
rs.pagesize=16
rs.absolutepage=pageno
for i=1 to rs.pagesize
if rs.eof then exit for
if i mod 2 =1 then
bg="#FAEFE4"
else
bg="#FBF8F2"
end if
Response.Write("<tr>")
if isgd=1 then
linkadd="article/"&rs("filepath")&"/"&rs("HtmUrl")
else
linkadd="goto.asp?id="&rs("id")
end if
if rs("hot")=1 then
hot="<font color='red'>[薦]</font>"
else
hot=""
end if
a=split(rs("PostTime"),"-")
Response.Write("<td valign='top' bgcolor="&BG&" align=left class='list2'>"&hot&"·<a href="&linkadd&" target='_blank' title='"&HTMLEncode(rs("Title"))&"'><font color=#333366 class='title'>"&HTMLEncode(rs("Title"))&"</font></a><br><span class='ray'> 收藏時間:["&rs("PostTime")&"] (<a href='userzhai.asp?zhaiuser="&rs("userid")&"' target='_blank'>"&rs("userid")&"</a>收藏) 點擊次數(shù):"&rs("reads")&"</br> 原文網(wǎng)址:<a href="&linkadd&" target='_blank'><span class='ray'>"&HTMLEncode(rs("FromURL"))&"</span></a></span></td>")
rs.MoveNext
row=row+1
Response.Write("</tr>")
next
Response.Write "<tr><td height=10></td></tr><tr>"
response.write "<td height=18 bgcolor=#FBF3EC>"
tj="sort="&sort&"&title="&title
page "list.asp",tj,pageno,rs.pagecount,rs.pagesize,rs.recordcount
response.write "</td>"
Response.Write "</tr>"
else
response.write "暫無數(shù)據(jù)"
end if
%>
</table></td>
</tr>
</table>
<!--#include file = "So_page.asp"-->
<!--#include file="bottom.asp"-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -