groups.asp
来自「是个不错的文件代码,希望大家好好用,」· ASP 代码 · 共 132 行
ASP
132 行
<!--#include file="inc/inc_syssite.asp"-->
<!--#include file="inc/syscode.asp"-->
<%
dim mainsql,strurl,rsmain,bstr1,isbest,show_list,classid,strPlayerUrl
strurl="groups.asp"
isbest=cint(request.QueryString("isbest"))
classid=request.QueryString("classid")
call sysshow()
if isbest=1 then
mainsql=mainsql&" and isbest=1"
if strurl="groups.asp" then
strurl=strurl&"?isbest=1"
else
strurl=strurl&"&isbest=1"
end if
bstr1="→推荐" &P_QQ_NAME
end if
If IsNumeric(classid) Then
classid=CLNG(classid)
If classid>0 Then
mainsql= mainsql & " and Classid=" & classid & " "
end if
if strurl="groups.asp" then
strurl=strurl&"?classid=" & classid
end if
End If
strPlayerUrl= Replace(strurl,"photo.asp","photoplayer.asp")
call sub_showuserlist(mainsql,strurl)
G_P_Show=replace(G_P_Show,"$show_list$",show_list)
response.Write G_P_Show&oblog.site_bottom
sub sub_showuserlist(sql,strurl)
dim topn,msql
G_P_PerMax=int(oblog.CacheConfig(38))
G_P_FileName=strurl
if request("page")<>"" then
G_P_This=cint(request("page"))
else
G_P_This=1
end if
msql="select top "&clng(oblog.CacheConfig(39))&" * from oblog_team Where iState=3 "&mainsql&" order by createtime desc"
if not IsObject(conn) then link_database
Set rsmain=Server.CreateObject("Adodb.RecordSet")
'response.Write(msql)
rsmain.Open msql,Conn,1,1
if rsmain.eof and rsmain.bof then
show_list=show_list & "共调用0个" &P_QQ_NAME& "<br>"
else
G_P_AllRecords=rsmain.recordcount
'show_list=show_list & "共调用" & G_P_AllRecords & " 个相片<br>"
if G_P_This<1 then
G_P_This=1
end if
if (G_P_This-1)*G_P_PerMax>G_P_AllRecords then
if (G_P_AllRecords mod G_P_PerMax)=0 then
G_P_This= G_P_AllRecords \ G_P_PerMax
else
G_P_This= G_P_AllRecords \ G_P_PerMax + 1
end if
end if
if G_P_This=1 then
getlist()
show_list=show_list&oblog.showpage(false,true,"个" &P_QQ_NAME& "")
else
if (G_P_This-1)*G_P_PerMax<G_P_AllRecords then
rsmain.move (G_P_This-1)*G_P_PerMax
dim bookmark
bookmark=rsmain.bookmark
getlist()
show_list=show_list&oblog.showpage(false,true,"个" &P_QQ_NAME& "")
else
G_P_This=1
getlist()
show_list=show_list&oblog.showpage(false,true,"个" &P_QQ_NAME& "")
end if
end if
end if
rsmain.Close
set rsmain=Nothing
end sub
sub getlist()
dim i,bstr,n
dim title
show_list="<table width='100%' border='0'><tr><td>"
show_list=show_list&"当前位置:<a href='index.asp'>首页</a>→" &P_QQ_NAME& "(共调用" & G_P_AllRecords & " 个" &P_QQ_NAME& ")"
'bstr=trim(Request.ServerVariables("query_string"))
'if bstr<>"" then bstr="photo.asp?"&replace(replace(bstr,"&isbest=1",""),"isbest=1","")&"&isbest=1" else bstr="photo.asp?isbest=1"
show_list=show_list&bstr1&"</td></tr><tr><td>"
show_list=show_list&GetSysClasses&"</td></tr></table><hr>"
show_list=show_list&"<table width='100%' align='center' cellpadding='0' cellspacing='1'>"& vbcrlf
do while not rsmain.eof
show_list=show_list&"<tr height='22'>"& vbcrlf
for n=1 to 4
if rsmain.eof then
show_list=show_list&"<td width='25%'></td>"& vbcrlf
else
title="图片说明:"&oblog.filt_html(rsmain(1))
show_list=show_list&"<td align='center'> <a href='group.asp?gid="&rsmain("teamid")&"' title='"&title&"' target='_blank'><img src='"&OB_IIF(rsmain("t_ico"),"images/default_groupico.gif")&"' height='90' width='120' border='0' /></a><br /><a href='group.asp?gid="&rsmain("teamid")&"'>"&rsmain("t_name")&"</a></td>"& vbcrlf
i=i+1
if not rsmain.eof then rsmain.movenext
end if
next
show_list=show_list&"</tr>"& vbcrlf
if i>=G_P_PerMax then exit do
loop
show_list=show_list&"</table>"
end sub
Function GetSysClasses()
Dim rst,sReturn
Set rst=conn.Execute("Select * From oblog_logclass Where idtype=2")
If rst.Eof Then
sReturn=""
Else
Do While Not rst.Eof
sReturn= sReturn & "<option value="&rst("id")&">" & rst("classname") & "</option>" & VBCRLF
rst.Movenext
Loop
sReturn = "<option value=0>所有分类</option>" & VBCRLF & sReturn
sReturn="<form name=photoform method=get><tr><td clospan=2>选择" &P_QQ_NAME& "分类:<select name=classid onchange=""this.form.submit()"">" & VBCRLF & sReturn & "</select></tr></form>"
End If
rst.Close
Set rst=Nothing
GetSysClasses = sReturn
End Function
%>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?