?? tagzhai.asp
字號:
<!--#include file="conn.asp"-->
<!--#include file="char.asp"-->
<!--#include file="include/function.asp"-->
<!--#include file="include/setup.asp"-->
<!--#include file="head.asp"-->
<!--#include file = "So_page.asp"-->
<%
dim xsort,zhaiuser
xsort=HTMLcode(Request.QueryString("tag"))
zhaiuser=HTMLcode(Request.QueryString("zhaiuser"))
%>
<script language="JavaScript">
function submitForm(obj)
{
var Title=obj.Title.value;
var Sort=obj.Sort.value;
obj.action="itemzhai.asp?sort="+Sort+"&title="+escape(Title);
return true;
}
</script>
<table width="900" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10" colspan="3"></td>
</tr>
<tr>
<td width="200" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28" align="left" bgcolor="#9E9EAD" class="title">熱門關鍵字</td>
</tr>
<tr>
<td bgcolor="#F0F0F4"><%
set rs=conn.execute("select top 100 id,sort,XSort from XSort order by hits desc")
i=1
do while i<=100 and not rs.eof
%>
<A class=link2 href="tag.asp?xsort=<%=rs(2)%>"><%=rs(2)%></A>
<%
i=i+1
rs.movenext
loop
rs.close%>
<a style="padding:0px; COLOR: #ff6600; text-decoration:underline" target="_blank" href="tagmore.asp">更多>></a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="10"></td>
</tr>
<tr>
<td align="left" bgcolor="#D4D0C8" height="28" class="title">48小時精彩好貼</td>
</tr>
<tr>
<td bgcolor="#F4EFE5" class="list" align="left"><%
row=0
set rszhai=conn.execute("select top 8 ID,IIf(Len(Title)<13,Title,Left(Title,13)+'..') as Title,UserID,HtmUrl,PostTime,filepath,FromURL,a.Sort,b.SortName,IIf(Len(Intro)<100,Intro,Left(Intro,100)+'...') as Intro,c.ZhaiID,c.Visits from zhai a,sort b,(select ZhaiID,count(*) as Visits from visit where int(now-VisitTime)<=2 group by ZhaiID order by count(*) desc) c where a.Sort=b.SortID and ID=c.ZhaiID and isPub=true order by Visits desc")
do while not rszhai.Eof
if isgd=1 then
linkadd="article/"&rszhai("filepath")&"/"&rszhai("HtmUrl")
else
linkadd="goto.asp?id="&rszhai("id")
end if
a=split(rszhai("PostTime"),"-")
Response.Write("·<a href="&linkadd&" target='_blank'>"&HTMLEncode(rszhai("Title"))&"</a><br>")
rszhai.movenext
row=row+1
if row=8 then
Exit do
end if
loop
rszhai.close
%></td>
</tr>
</table></td>
<td width="10" height="28"></td>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28" class="title" bgcolor="#B3BDC4" align="left">用戶 <font color="#FF0000"><%=zhaiuser%></font> 的 <font color="#0000FF"><%=xsort%></font> 標簽</td>
</tr>
</table><table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E3E8EA">
<%
pageno=cint(request.querystring("pageno"))
if pageno=0 then pageno=1
sql="select ID,IIf(Len(Title)<46,Title,Left(Title,46)+'...') as Title,UserID,HtmUrl,filepath,FromURL,PostTime,b.SortName,IIf(Len(Intro)<100,Intro,Left(Intro,100)+'...') as Intro from zhai a,sort b where a.Sort=b.SortID and a.userid='"&zhaiuser&"' and a.XSort like '%"&xsort&"%' and isPub=true order by ID desc"
set rs=server.createobject("ADODB.recordset")
rs.open sql,conn,1
if not rs.bof and not rs.eof then ' 當有數據的時候
rs.pagesize=30
rs.absolutepage=pageno
for i=1 to rs.pagesize
if rs.eof then exit for
if i mod 2 =1 then
bg="#FFFFFF"
else
bg="#FBF3EC"
end if
Response.Write("<tr>")
if isgd=1 then
linkadd="article/"&rs("filepath")&"/"&rs("HtmUrl")
else
linkadd="goto.asp?id="&rs("id")
end if
a=split(rs("PostTime"),"-")
Response.Write("<td bgcolor="&BG&" align='left' class='list'>·<a href="&linkadd&" target='_blank'>"&HTMLEncode(rs("Title"))&"</a><span class='grayscript'><font color=#C0C0C0>["&a(1)&"."&trim(left(a(2),2))&"]</font></span> -<a href="&rs("FromURL")&" target='_blank' title='直達網址'><span class='grayscript'><font color=#008000>GO>></font></span></a></td>")
rs.MoveNext
row=row+1
Response.Write("</tr>")
next
Response.Write "<tr>"
response.write "<td class='mt'><br>"
tj="tag="&xsort&"&zhaiuser="&zhaiuser
page "tagzhai.asp",tj,pageno,rs.pagecount,rs.pagesize,rs.recordcount
response.write "</td>"
Response.Write "</tr>"
else
response.write "暫無數據"
end if
%>
</table> </td>
</tr>
</table>
<!--#include file="bottom.asp"-->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -