📄 userzhai.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="include/function.asp"-->
<!--#include file="include/setup.asp"-->
<!--#include file="head.asp"-->
<!--#include file = "So_page.asp"-->
<%
dim sort
xsort=Request.QueryString("xsort")
%>
<script language="JavaScript">
function submitForm(obj)
{
var Title=obj.Title.value;
var Sort=obj.Sort.value;
obj.action="list.asp?sort="+Sort+"&title="+escape(Title);
return true;
}
</script>
<%
ZhaiUser=Request.QueryString("ZhaiUser")
%>
<LINK href="css/css.css" type=text/css rel=stylesheet>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="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="#BECDE6" class="title">48小时精彩好贴</td>
</tr>
<tr>
<td align="left" bgcolor="#EAEFF7" class="list"><%
row=0
set rszhai=conn.execute("select top 10 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=10 then
Exit do
end if
loop
rszhai.close
%></td>
</tr>
<tr>
<td height="10"></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28" align="left" bgcolor="#BECDE6" class="title">本周精彩好贴</td>
</tr>
<tr>
<td align="left" bgcolor="#EAEFF7" class="list"><%
row=0
set rszhai=conn.execute("select top 10 ID,IIf(Len(Title)<13,Title,Left(Title,13)+'..') as Title,HtmUrl,UserID,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)<=7 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=10 then
Exit do
end if
loop
rszhai.close
%></td>
</tr>
<tr>
<td height="10"></td>
</tr>
</table></td>
<td width="10"></td>
<td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="28" align="left" class="title" bgcolor="#D4D0C8"><%=ZhaiUser%> 收藏的网摘</td>
</tr>
<tr>
<td height="28" align="left" class="list" align="left" bgcolor="#F4EFE5"><%
pageno=cint(request.querystring("pageno"))
if pageno=0 then pageno=1
sql="select ID,UserID,IIf(Len(Title)<38,Title,Left(Title,38)+'...') as Title,FromURL,filepath,htmurl,a.Sort,b.SortName,IIf(Len(Intro)<100,Intro,Left(Intro,100)+'...') as Intro,format$(PostTime,'yyyy-mm-dd') as PostTime,Reads,Rank from zhai a,sort b where a.Sort=b.SortID and UserID='"&ZhaiUser&"' 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=20
rs.absolutepage=pageno
for i=1 to rs.pagesize
if rs.eof then exit for
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("·<a href="&linkadd&" target='_blank'>"&HTMLEncode(rs("Title"))&"</a> <span class='ray'>["&a(1)&"."&trim(left(a(2),2))&"] - ["&rs("reads")&"]</span><br>")
rs.MoveNext
row=row+1
next
tj="ZhaiUser="&ZhaiUser
page "userzhai.asp",tj,pageno,rs.pagecount,rs.pagesize,rs.recordcount
else
response.write "暂无数据"
end if
%>
</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<!--#include file="bottom.asp"-->
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -