📄 class_blog.asp
字号:
End if
'-----------------------------Addon End--------------------
show_logcyc = Replace(user_skin_showlog, "$show_topic$", show_topic)
show_logcyc = Replace(show_logcyc, "$show_loginfo$", show_loginfo)
show_logcyc = Replace(show_logcyc, "$show_logtext$", show_logtext)
show_logcyc = Replace(show_logcyc, "$show_more$", show_more)
show_logcyc = Replace(show_logcyc, "$show_emot$", 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_logcyc = Replace(show_logcyc, "$show_blogtag$", "")
show_logcyc = Replace(show_logcyc, "$show_blogzhai$", "<div id=""blogzhai""></div>")
show_logmore = show_logcyc
show_logmore=show_logmore&sAddon
show_logmore = show_logmore & vbcrlf & "<div id=""morelog"">" & vbcrlf
show_logmore = show_logmore&" <ul>" & vbcrlf
set rstmp=oblog.execute("select top 1 logfile,topic from oblog_log where logid<"&logid&" and userid="&user_id&" and logtype="&logtype&" and isdraft=0 and isdel=0 order by addtime desc")
if not rstmp.eof then
show_logmore = show_logmore&" <li>上一篇:"&"<a href="""&log_truepath&rstmp(0)&""">"&oblog.filt_html(rstmp(1))&"</a></li>" & vbcrlf
rstmp.movenext
end if
set rstmp=oblog.execute("select top 1 logfile,topic from oblog_log where logid>"&logid&" and userid="&user_id&" and logtype="&logtype&" and isdraft=0 and isdel=0 order by addtime asc")
if not rstmp.eof then
show_logmore = show_logmore&" <li>下一篇:"&"<a href="""&log_truepath&rstmp(0)&""">"&oblog.filt_html(rstmp(1))&"</a></li>" & vbcrlf
rstmp.movenext
end if
show_logmore = show_logmore&" </ul>" & vbcrlf
show_logmore = show_logmore&"</div>" & vbcrlf
'vote0=OB_IIF(rs("vote0"),"0")
'vote1=OB_IIF(rs("vote1"),"0")
If strtmp = "" Then
If user_commentasc = 1 Then commentasc = " order by commentid asc" Else commentasc = " order by commentid desc"
Set rs = oblog.Execute("select top 40 comment_user,commenttopic,comment,addtime,commentid,homepage,isguest,ubbedit from oblog_comment where istate =1 and isdel=0 and mainid=" & logid & commentasc)
If Not rs.EOF Then
While Not rs.EOF
If IsNull(rs(5)) Then
homepage_str = "个人主页"
Else
If Trim(Replace(rs(5), "http://", "")) = "" Then
homepage_str = "个人主页"
Else
homepage_str = "<a href=""" &blogurl&"go.asp?url="& oblog.filt_html(rs(5)) & """ target=""_blank"">个人主页</a>"
End If
End If
commentid = rs(4)
show_topic = oblog.filt_html(rs(1)) & "<a name='" & rs(4) & "'></a>"
If rs(6) = 1 Then
show_author = "<span id=""n_" & commentid & """>" & oblog.filt_html(rs(0)) & "(游客)</span>"
faceurl=blogurl&"images/ico_default.gif"
Else
show_author = "<span id=""n_" & commentid & """>" & oblog.filt_html(rs(0)) & "</span>"
set rstmp=oblog.execute("select user_icon1 from oblog_user where username='"&oblog.filt_badstr(rs(0))&"'")
if not rstmp.eof then
faceurl = ProIco (rstmp(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"" alt=""" & oblog.filt_html(rs(0))
If rs(6) = 1 Then
faceurl = faceurl & "(游客)"
End If
faceurl= faceurl & """ />"
faceurl=Replace(homepage_str,"个人主页",faceurl)
show_addtime = "<span id=""t_" & commentid & """>" & rs(3) & "</span>"
show_topictxt = OB_IIF(show_topic,"无题")
show_loginfo = show_author & "发表评论于" & show_addtime
show_logtext = faceurl&"<span id=""c_" & commentid & """>"
If rs("ubbedit")= 2 Then
show_logtext = show_logtext & oblog.FilterUbbFlash(filtscript(rs(2)))
Else
show_logtext = show_logtext & oblog.Ubb_Comment(rs(2))
End if
show_logtext = show_logtext &"</span>"
show_more = homepage_str & " | <a href=""javascript:reply_quote('" & commentid & "')"" >引用</a> | <a href=""#top"">返回</a>"
show_more = show_more & " | <a href=""" & blogurl & "user_comments.asp?action=del&id=" & commentid & """ target=""_blank"">删除</a>"
show_more = show_more & " | <a href=""" & blogurl & "user_comments.asp?action=modify&re=true&id=" & commentid & """ target=""_blank"">回复</a>"
show_logcyc = Replace(user_skin_showlog, "$show_topic$", show_topic)
show_logcyc = Replace(show_logcyc, "$show_loginfo$", show_loginfo)
show_logcyc = Replace(show_logcyc, "$show_logtext$", show_logtext)
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$", "")
rs.movenext
i = i + 1
Wend
End If
If i >= 40 Then
show_logmore = show_logmore & "<div id=""saveurl""><a href=""" & blogurl & "more.asp?action=comment&id=" & logid & "&page=1"">查看所有评论</a></div>"
End If
'Ajax Mode
'show_logmore = show_logmore & "<div id=""saveurl""> ::<a href=""javascript:SendRequest('" & blogurl & "AjaxServer.asp?action=vote&v=1&logid=" & logid & "','ob_log_msg','');"">"&C_Vote_Action1&"("&vote1&")</a>::"
'show_logmore = show_logmore & "<a href=""javascript:SendRequest('" & blogurl & "AjaxServer.asp?action=vote&v=0&logid=" & logid & "','ob_log_msg','');"">"&C_Vote_Action2&"("&vote0&")</a>::</div>"
'show_logmore = show_logmore & "<div id=""ob_log_msg""></div>"
If encommment = 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 & " #gg_usercomment#<a name=""cmt""></a><div class=""title"">发表评论:</div>" & vbCrLf
show_logmore = show_logmore & " <form action=""" & blogurl & "savecomment.asp?logid=" & logid & """ 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
End If
End If
show = Replace(user_skin_main_new, "$show_log$", show_logmore)
If showpwblog = False And showpwlog = False Then
show = repl_label(show, injsfile, log_title & "--" & BlogName, user_userName_new & "," & user_nickName_new, log_title, Left(RemoveHTML(showDes), 80), log_month)
if true_domain=1 then
user_logpath1 = Replace(user_logpath,user_path_new,"http://"&user_domain_new) & "/" & filename & "." & f_ext
else
user_logpath1 = user_logpath & "/" & filename & "." & f_ext
end if
show=Replace(show,"$show_calendar$","<!-- #include file=""..\..\calendar\"&log_month&".htm"" -->")
If ispwblog = False Then
savefile user_logpath,"\"&filename&"."&f_ext,show
Else
savefile user_logpath,"\"&filename&"."&f_ext,"<script language=javascript>window.location.replace('"&blogurl&"pwblog.asp?action=log&userid="&user_id&"&logid="&logid&"')</script>"
End If
oblog.execute("update oblog_log set logfile='"&user_logpath1&"' where logid="&logid)
If resp = 1 Then
gourl = user_logpath1
ElseIf resp = 2 Then
Response.Redirect (user_logpath1)
ElseIf resp = 3 Then
gourl = user_logpath1
End If
Else
If f_ext = "htm" Or f_ext = "html" Then
m_log=Replace(show,"$show_calendar$","<div id=""calendar""></div><script src='"&user_path_new&"/calendar/"&log_month&".htm'></script>")
Else
m_log=Replace(show,"$show_calendar$","<div id=""calendar"">"&oblog.readfile(user_path_new&"\calendar",log_month&".htm")&"</div>")
End If
m_log=m_log&injsfile
End If
End Sub
public sub showcmt(logid)
dim sql,rstmp
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
logid=Int(logid)
if user_commentasc=1 then commentasc=" order by commentid asc" else commentasc=" order by commentid desc"
set rs=Server.CreateObject("Adodb.RecordSet")
rs.open "select comment_user,commenttopic,comment,addtime,commentid,homepage,isguest,ubbedit from oblog_comment where istate= 1 and isdel=0 and mainid="&logid&commentasc,conn,1,1
if rs.eof and rs.bof then
show_logmore=show_logmore & "共有0篇评论<br>"
else
dim show_page,i
G_P_FileName="more.asp?action=comment&id="&logid
G_P_AllRecords=rs.recordcount
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)*G_P_PerMax<G_P_AllRecords then
rs.move (G_P_This-1)*G_P_PerMax
show_page=oblog.showpage(false,true,"篇日志")
end if
do while not rs.eof
if isnull(rs(5)) then
homepage_str="个人主页"
else
if Trim(Replace(rs(5),"http://",""))="" then
homepage_str="个人主页"
else
homepage_str="<a href=""" &blogurl&"go.asp?url="&oblog.filt_html(rs(5))&""" target=""_blank"">个人主页</a>"
end if
end If
commentid=rs(4)
show_topic=oblog.filt_html(rs(1))&"<a name='"&rs(4)&"'></a>"
if rs(6)=1 then
show_author="<span id=""n_"&commentid&""">"&oblog.filt_html(rs(0))&"(游客)</span>"
faceurl=blogurl&"images/ico_default.gif"
else
show_author="<span id=""n_"&commentid&""">"&oblog.filt_html(rs(0))&"</span>"
set rstmp=oblog.execute("select user_icon1 from oblog_user where username='"&oblog.filt_badstr(rs(0))&"'")
if not rstmp.eof then
faceurl = ProIco (rstmp(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&""">"&rs(3)&"</span>"
show_topictxt=show_topic
show_loginfo=show_author&"发表评论于"&show_addtime
show_logtext = faceurl &"<span id=""c_" & commentid & """>"
If rs("ubbedit")= 2 Then
show_logtext = show_logtext & oblog.FilterUbbFlash(filtscript(rs(2)))
Else
show_logtext = show_logtext & oblog.Ubb_Comment(rs(2))
End if
show_logtext = show_logtext &"</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(user_skin_showlog,"$show_topic$",show_topic)
show_logcyc=Replace(show_logcyc,"$show_loginfo$",show_loginfo)
show_logcyc=Replace(show_logcyc,"$show_logtext$",show_logtext)
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
i=i+1
if i>=G_P_PerMax then exit do
rs.movenext
loop
end if
show_logmore = Replace(show_logmore, "$show_blogtag$", "")
show_logmore = Replace(show_logmore, "$show_blogzhai$", "")
show_logmore=show_logmore&show_page
if encommment=1 then
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -