📄 class_usercommand.asp
字号:
Set trs = Oblog.Execute ("SELECT COUNT(photoID) FROM oblog_album WHERE TeamID=0 AND (ishide=0 OR ishide IS NULL) AND userid="&mUserId&" AND userClassId=0 ")
Set rsPic = Oblog.Execute ("SELECT TOP 1 photo_path FROM oblog_album WHERE TeamID=0 AND (ishide=0 OR ishide IS NULL) AND userid="&mUserId&" AND userClassId=0 ")
If Not rsPic.Eof Then
DefaultPic = rsPic(0)
rsPic.Close
Set rsPic = Nothing
End if
goUrl = mUserCmdpath&"cmd."&f_ext&"?uid="&mUserid&"&do=album&id=-1"
title = "<div class=""photo_album_name""><a href="""&goUrl&""" title=""相册:未分类"">未分类</a></div><div class=""photo_album_num"">相片数:"&TRS(0)&"</div>"
sReturn=sReturn&"<tr><td align='center'><div class="""&album_ClassName&"""><div class=""photo_ico""><table><tr><td><a href="""&goUrl&"""><img src='"&ProIco(DefaultPic,4)&"' align=""absmiddle"" /></a></td></tr></table></div>"&title&"</div></td></tr>"& vbcrlf
Set TRS = Nothing
End if
sReturn=sReturn&"</tbody></table>" & VBCRLF
Else
'如果是浏览相片
sReturn=vbcrlf & "<table width=""100%"" align=""center"" cellpadding=""0"" cellspacing=""1""><tbody>"& vbcrlf
Do While not rsPhoto.eof
sReturn=sReturn&"<tr>"& vbcrlf
For n=1 to mUserPhotoRow
if rsPhoto.eof then
' sReturn=sReturn&"<td width=""25%""></td>"& vbcrlf
Else
Oblog.Execute ("UPDATE oblog_subject SET views = views + 1 WHERE subjectid="&id)
goUrl = mUserCmdpath&"cmd."&f_ext&"?do=photocomment&fileid="&rsPhoto(1)&"&uid="&mUserid
title="<div class=""photo_name""><a href="""&goUrl&""" title="""&ob_IIF(rsPhoto(2),"无标题")&""">"&ob_IIF(rsPhoto(2),"无标题")&"</a></div>"
imgsrc = ProIco(rsPhoto(0),4)
'imgsrc=Replace(imgsrc,right(imgsrc,3),"jpg")
'imgsrc=Replace(imgsrc,right(imgsrc,len(imgsrc)-InstrRev(imgsrc,"/")),"pre"&right(imgsrc,len(imgsrc)-InstrRev(imgsrc,"/")))
'if not fso.FileExists(Server.MapPath(imgsrc)) then
'imgsrc=blogurl&rsPhoto(0)
'End if
If oblog.CacheConfig(67) = "1" Then
If Left(LCase(imgsrc),7)="http://" Then
imgsrc=imgsrc
Else
imgsrc = "attachment.asp?path="&imgsrc
End If
End If
sReturn=sReturn&"<td align='center'><div class=""photo_album_list""><div class=""photo_ico""><table><tr><td><a href="""&goUrl&"""><img src='"&imgsrc&"' style=""vertical-align:middle;max-width: 100px; max-height: 100px; width: expression(this.width >100 && this.height < this.width ? 100: true); height: expression(this.height > 100 ? 100: true);"" align=""absmiddle"" /></a></td></tr></table></div>"&title&"</div></td>"& vbcrlf
i=i+1
rsPhoto.movenext
End if
Next
sReturn=sReturn&"</tr>"& vbcrlf
if i>=G_P_PerMax then exit do
Loop
sReturn=sReturn&"</tbody></table>" & VBCRLF
End if
' Set fso=nothing
getPhotolist=sReturn
End Function
'获取用户分类
Function GetUserClasses(typestr)
Dim rst,sReturn
Set rst=conn.Execute("select * From oblog_subject Where subjecttype=1 AND (ishide = 0 OR ishide IS NULL) and userid="&mUserid&" order by ordernum")
If rst.Eof Then
sReturn=""
Else
Do While Not rst.Eof
sReturn=sReturn&"<option value="&rst("subjectid")&">" & rst("subjectname") & "</option>" & VBCRLF
rst.Movenext
Loop
sReturn = "<option value="""">请选择相片分类</option><option value='0'>所有分类</option>" & VBCRLF & sReturn
sReturn = sReturn &"<option value='-1'>未分类</option>" & VBCRLF
sReturn="<select name=classid onchange=""javascript:window.location='"&mUserCmdpath&"cmd."&f_ext&"?uid="&muserid&"&do="&typestr&"&id='+this.options[this.selectedIndex].value;"">" & VBCRLF & sReturn & "</select>"
End If
rst.Close
Set rst=Nothing
' sReturn=sReturn&" <a href=""#"" onclick=""window.open('"&strPlayerUrl&"','_photo','height=500, width=480, top=100, left=400, toolbar=no, menubar=no, scrollbars=no, resizable=yes,status=no')"">启用自动播放</a>" & VBCRLF
sReturn=sReturn&" <a href='"&mUserCmdpath&"cmd."&f_ext&"?uid="&mUserid&"&do=flash'>Flash方式浏览</a>"
GetUserClasses = sReturn
End Function
function showinfo()
dim rs,str,c0,c1,c2
select case Trim(Request("infotype"))
case "1"
str=str&"<ul class=""ob_user_friend"">"
set rs=oblog.execute("select a.username,a.nickname,a.user_icon1,a.userid from oblog_user a,oblog_friend b where a.userid=b.friendid and b.userid ="&Muserid&" and b.isblack=0 order by b.id desc")
while not rs.eof
str=str&"<li><a href=" &blogurl & "go.asp?userid="&rs(3)&" target=_blank><img src=""" & ProIco(rs(2),1) & """ class=""ob_face_info"" /><br />"&OB_IIF(rs(1),rs(0))&"</a></li>"&vbcrlf
rs.movenext
wend
str=str&"</ul>"& vbcrlf
c1=" class='nowselect' "
case "2"
str=str&"<ul class=""ob_user_group"">"
set rs=oblog.execute("select a.t_name,a.teamid,a.t_ico from oblog_team a,oblog_teamusers b where a.teamid=b.teamid and a.istate=3 and (b.state=3 or b.state=5 ) and userid ="&Muserid)
while not rs.eof
str=str&"<li><a href=" &blogurl & "group.asp?gid="&rs(1)&" target=""_blank""><img src=""" & ProIco(rs(2),2) & """ class=""group_logo_info"" /><br />"&oblog.filt_html(left(rs(0),18))&"</a></li>"&vbcrlf
rs.movenext
wend
str=str&"</ul>"& vbcrlf
c2=" class='nowselect' "
case else
set rs=oblog.execute("select * from oblog_user where userid="&Muserid)
if not rs.eof then
str=str&"<ul class=""ob_user_info""><img src=""" & ProIco(rs("user_icon1"),1) & """ class=""ob_face_info"" /><li>用户名:"&rs("username")&"</li><li>昵 称:"&rs("nickname")&"</li><li>性 别:"&ob_IIF2(rs("sex")=1,"男","女")&"</li><li>真 名:"&rs("truename")&"</li><li>所在地:"&rs("province")&rs("city")&"</li><li>生 日:"&rs("birthday")&"</li><li>职 业:"&rs("job")&"</li><li>MSN:"&rs("msn")&"</li><li>Q Q:"&rs("qq")&"</li><li>地 址:"&rs("address")&"</li><li>简 介:"&oblog.filt_html(rs("siteinfo"))&"</li></ul>"& vbcrlf
end if
c0=" class='nowselect' "
end select
showinfo="<div id=""ob_userinfo""><ul class=""top""><li"&c0&"><a href='"&mUserCmdpath&"cmd."&f_ext&"?uid="&mUserid&"&do=info'>详细资料</a></li><li"&c1&"><a href='"&mUserCmdpath&"cmd."&f_ext&"?uid="&mUserid&"&do=info&infotype=1'>好友</a></li><li"&c2&"><a href='"&mUserCmdpath&"cmd."&f_ext&"?uid="&mUserid&"&do=info&infotype=2'>" &oblog.CacheConfig(69)& "</a></li></ul>"&str&"</div>"
set rs=nothing
end function
Function GetPhotoComment(rsPComment,strUnit)
Dim trs,i
Dim sPInfo,sPComment,imgsrc
Dim show_topic,show_emot,show_addtime,show_logtext,show_author,show_loginfo,show_more,show_logcyc,show_topictxt,show_logmore,show,commentasc,faceurl
dim homepage_str,commentid,strtmp
Dim commenttopic
Dim allsub,substr,rsSubject
Set rsSubject=Server.CreateObject("Adodb.Recordset")
rsSubject.Open "select subjectid,subjectname From oblog_subject Where userid=" & mUserid & " And subjecttype=1",conn,1,3
If Not rsSubject.Eof Then
Do While Not rsSubject.Eof
allsub=allsub&rsSubject(0)&"!!??(("&rsSubject(1)&"##))=="
rsSubject.movenext
Loop
End If
Set rsSubject = Nothing
Set trs = oblog.Execute ("select PHOTO_title,PHOTO_readme,PHOTO_path,a.addtime,b.nickname,b.username,a.views,a.isencomment,a.userClassId,a.commentnum FROM oblog_album a INNER JOIN oblog_user b ON a.userid = b.userid WHERE (a.ishide = 0 OR A.ishide IS NULL) AND a.TeamID = 0 AND a.fileid="&fileid)
If TRS.EOF Then
GetPhotoComment = "此相片不存在,或者被隐藏。"
trs.Close
Set trs = Nothing
Exit Function
Else
Dim thisSubName
thiSsubName=getsubname(trs("userClassId"),allsub)
If thiSsubName="——" Then thiSsubName = ""
thiSsubName = "["&thiSsubName&"]"
Oblog.Execute ("UPDATE oblog_album SET views = views + 1 WHERE fileid="&fileid)
If oblog.CacheConfig(67) = "1" Then
imgsrc = "attachment.asp?path="&trs("PHOTO_path")
Else
imgsrc = ProIco(trs(2),4)
End If
sPInfo = Replace(mUserSkinLog, "$show_topic$", ob_IIF(thiSsubName&trs(0),"无标题"))
sPInfo = Replace(sPInfo, "$show_loginfo$", "")
sPInfo = Replace(sPInfo, "$show_logtext$", "<img src="&imgsrc&" onclick=""javascript:window.open(this.src);"" style=""CURSOR: pointer"" onload=""rsimg(this,400);"" /><br />"&ob_IIF(trs(1),"无简介"))
sPInfo = Replace(sPInfo, "$show_more$", "<a href=""#"">查看("&OB_IIF(trs(6),0)&")</a> | <a href=""#cmt"">评论("&OB_IIF(trs(9),0)&")</a>")
sPInfo = Replace(sPInfo, "$show_emot$", "")
sPInfo = Replace(sPInfo, "$show_author$", OB_IIF(trs(4),trs(5)))
sPInfo = Replace(sPInfo, "$show_addtime$",trs(3))
sPInfo = Replace(sPInfo, "$show_topictxt$", "")
sPInfo = Replace(sPInfo, "$show_blogtag$", "")
sPInfo = Replace(sPInfo, "$show_blogzhai$", "")
End If
commenttopic = "Re:" & ob_IIF(trs(0),"无标题")
' GetPhotoComment = sPInfo & "<div style=font-size:14px;font-weight:600>评论列表:</div>"
GetPhotoComment = sPInfo
If rsPComment.EOF Then
' GetPhotoComment = GetPhotoComment & "此相册暂无评论"
rsPComment.Close
Set rsPComment = Nothing
Else
i = 0
Do While Not rsPComment.EOF
if isnull(rsPComment(1)) then
homepage_str="个人主页"
else
if Trim(Replace(rsPComment(1),"http://",""))="" then
homepage_str="个人主页"
else
homepage_str="<a href="""&oblog.filt_html(rsPComment(1))&""" target=""_blank"">个人主页</a>"
end if
end If
commentid=rsPComment(4)
show_topic=oblog.filt_html(rsPComment(2))&"<a name='"&rsPComment(4)&"'></a>"
if rsPComment(6)=1 then
show_author="<span id=""n_"&commentid&""">"&oblog.filt_html(rsPComment(0))&"(游客)</span>"
faceurl=blogurl&"images/ico_default.gif"
else
show_author="<span id=""n_"&commentid&""">"&oblog.filt_html(rsPComment(0))&"</span>"
Dim rsUser
Set rsUser = oblog.Execute ("SELECT user_icon1 FROM oblog_user WHERE username = '"&rsPComment("comment_user")&"'")
If Not rsUser.Eof Then
faceurl = ProIco (rsUser(0),1)
Else
faceurl=blogurl&"images/ico_default.gif"
End if
end If
faceurl="<img class=""ob_face"" src="""&faceurl&""" width=""48"" height=""48"" align=""absmiddle"" />"
faceurl=Replace(homepage_str,"个人主页",faceurl)
show_addtime="<span id=""t_"&commentid&""">"&rsPComment(5)&"</span>"
show_topictxt=show_topic
show_loginfo=show_author&"发表评论于"&show_addtime
sPComment = faceurl &"<span id=""c_" & commentid & """>"
sPComment = sPComment & oblog.Ubb_Comment(rsPComment(3))
sPComment = sPComment &"</span>"
show_more=homepage_str&" | <a href=""javascript:reply_quote('"&commentid&"')"" >引用</a> | <a href=""#top"">返回</a>"
show_more=show_more&" | <a href=""user_comments.asp?action=del&id="&commentid&""" target=""_blank"">删除</a>"
show_logcyc=Replace(mUserSkinLog,"$show_topic$",show_topic)
show_logcyc=Replace(show_logcyc,"$show_loginfo$",show_loginfo)
show_logcyc=Replace(show_logcyc,"$show_logtext$",sPComment)
show_logcyc=Replace(show_logcyc,"$show_more$",show_more)
show_logcyc=Replace(show_logcyc,"$show_emot$","")
show_logcyc=Replace(show_logcyc,"$show_author$",show_author)
show_logcyc=Replace(show_logcyc,"$show_addtime$",show_addtime)
show_logcyc=Replace(show_logcyc,"$show_topictxt$",show_topictxt)
show_logmore=show_logmore&show_logcyc
show_logmore = Replace(show_logmore, "$show_blogtag$", "")
show_logmore = Replace(show_logmore, "$show_blogzhai$", "")
rsPComment.MoveNext
i = i + 1
If i>=G_P_PerMax Then Exit Do
Loop
show_logmore = show_logmore &oblog.showpage(false,true,strUnit)
End If
If trs("isencomment") = "1" Then
Dim strguest
If oblog.cacheConfig(27) = 1 Then strguest = "(游客无须输入密码)" Else strguest = ""
show_logmore = filt_inc(show_logmore)
show_logmore = show_logmore & vbCrLf & "<div id=""form_comment"">" & vbCrLf
show_logmore = show_logmore & " #ad_usercomment#<a name=""cmt""></a><div class=""title"">发表评论:</div>" & vbCrLf
show_logmore = show_logmore & " <form action=""" & blogurl & "SaveAlbumComment.asp?fileid=" & Fileid & """ method=""post"" name=""commentform"" id=""commentform"" onSubmit=""return Verifycomment()"">" & vbCrLf
show_logmore = show_logmore & " <div class=""d1""><label>昵称:<input name=""UserName"" type=""text"" id=""UserName"" size=""20"" maxlength=""20"" value="""" /></label></div>" & vbCrLf
show_logmore = show_logmore & " <div class=""d2""><label>密码:<input name=""Password"" type=""password"" id=""Password"" size=""20"" maxlength=""20"" value="""" /> " & strguest & "</label></div>" & vbCrLf
show_logmore = show_logmore & " <div class=""d3""><label>主页:<input name=""homepage"" type=""text"" id=""homepage"" size=""42"" maxlength=""50"" value=""http://"" /></label></div>" & vbCrLf
show_logmore = show_logmore & " <div class=""d4""><label>标题:<input name=""commenttopic"" type=""text"" id=""commenttopic"" size=""42"" maxlength=""50"" value=""" & commenttopic & """ /></label></div>" & vbCrLf
show_logmore = show_logmore & " <div class=""d5"">" & vbCrLf
show_logmore = show_logmore & " <input type=""hidden"" name=""edit"" id=""edit"" value="""" />" & vbCrLf
show_logmore = show_logmore & " <div id=""oblog_edit"">"& oblog.CacheConfig(41)&"</div>" & vbCrLf
show_logmore = show_logmore & " </div>" & vbCrLf
show_logmore = show_logmore & " <div class=""d6""><span id=""ob_code""></span><input type=""submit"" value="" 提 交 "" onclick='oblog_edittext.createTextRange().execCommand(""Copy"");'></div>" & vbCrLf
show_logmore = show_logmore & " </form>" & vbCrLf
show_logmore = show_logmore & "</div>" & vbCrLf
show_logmore = Replace(show_logmore, "#ad_usercomment#", "<div id=""ad_usercomment""></div>")
End if
GetPhotoComment = GetPhotoComment & show_logmore
End Function
End Class
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -