📄 class_blog.asp
字号:
else
xmlstr = xmlstr & "<link>" & Trim(oblog.CacheConfig(3)) & user_path & "/index." & f_ext & "</link>" & vbCrLf
end if
xmlstr = xmlstr & "<description><![CDATA[" & Replace(BlogName," "," ") & "]]></description>" & vbCrLf
'处理用户信息
'update_info user_id
'处理群组
'update_mygroups user_id
if user_showlog_num=0 then user_showlog_num=1
Set rs = oblog.execute("select subjectid,subjectname from oblog_subject where userid="&user_id)
While Not rs.EOF
substr = substr & rs(0) & "!!??((" & rs(1) & "##))=="
rs.movenext
Wend
set rs=oblog.execute("select top "&user_showlog_num&" face,topic,subjectid,logid,istop,addtime,logtext,ishide,commentnum,showword,ispassword,iis,trackbacknum,isbest,blog_password,author,logfile,ishide,authorid,passcheck,Abstract from oblog_log where (userid=" & user_id & " or authorid=" & user_id & ") and isdraft=0 and isdel=0 order by istop desc,addtime desc")
while not rs.eof
strtmp=""
If rs("ishide") = 1 Then strtmp = "此日志为隐藏日志,仅好友可见,<a href='" & blogurl & "more.asp?id=" & rs("logid") & "'>点击进入验证页面</a>。"
If rs("ispassword") <> "" Then strtmp = "<form method='post' action='" & blogurl & "more.asp?id=" & rs("logid") & "' target='_blank'>请输入日志访问密码:<input type=""password"" size=""15"" name=""password"" /> <input type=""submit"" value=""提交""></form>"
If rs("passcheck") = 0 Then strtmp = "此日志需要管理员审核后才可见。"
'if rs("face")="0" then show_emot="" else show_emot="<img src=../../images/face/"&rs(0)&".gif >"
if user_nickname="" or isnull(user_nickname) then
show_author=user_username
else
show_author=user_nickname
end if
if rs("authorid")<>user_id then show_author=rs("author")
show_addtime=rs("addtime")
show_topic=show_emot
if rs("istop")=1 then show_topic="[置顶]"
if rs("subjectid")>0 then
show_topic = show_topic & "<a href=""" & user_truepath&"cmd."&f_ext&"?uid="&user_id&"&do=blogs&id=" & rs("subjectid") & """>[" & oblog.filt_html(getsubname(substr,rs("subjectid"))) & "]</a>"
end if
show_topictxt="<a href="""&log_truepath&rs("logfile")&""">"&oblog.filt_html(rs("topic"))&"</a>"
if rs(13)=1 Then show_topictxt = show_topictxt & " <img src=" & blogurl & "images/jhinfo.gif >"
show_topic=show_topic&show_topictxt
if rs("istop")=1 then show_topictxt="[置顶]"&show_topictxt
show_loginfo=show_author&" 发表于 "&show_addtime
show_more="<a href="""&log_truepath&rs("logfile")&""">阅读全文<span id=""ob_logr"&rs("logid")&"""></span></a>"
show_more=show_more&" | "&"<a href="""&log_truepath&rs("logfile")&"#comment"">回复<span id=""ob_logc"&rs("logid")&"""></span></a>"
show_more = show_more & " | <a href=""" & blogurl & "showtb.asp?id=" & rs(3) & """ target=""_blank"">引用通告<span id=""ob_logt" & rs("logid") & """></span></a>"
if strtmp<>"" then
show_logtext=strtmp
else
if rs("Abstract")="" or isnull(rs("Abstract")) then
show_logtext=rs(6)
' show_logtext=oblog.filt_html_b(show_logtext)
'show_logtext=trimlog(show_logtext,rs(9))
show_logtext=trimlog(show_logtext,rs("showword"))
if left(show_logtext,7)="#isubb#" then
show_logtext=UBBCode(show_logtext,1)
show_logtext=replace(show_logtext,CHR(10),"<br /> <a href='"&log_truepath&rs("logfile")&"'>点击显示全文</a>")
'show_logtext=oblog.filt_html_b(show_logtext)
end if
show_logtext=replace(show_logtext,"#isubb#","")
show_logtext=filtimg(show_logtext)
if oblog.cacheConfig(45)=1 then show_logtext=profilthtm(show_logtext)
' show_logtext = Replace (show_logtext,"</P>","")
' show_logtext = Replace (show_logtext,"<P>","")
else
show_logtext=oblog.filt_html_b(rs("Abstract"))
end if
end if
'处理RSS
strlogn=strlogn&"$"&rs("logid")
If (rs("ispassword")="" Or IsNull(rs("ispassword"))) And rs("blog_password")=0 And rs("ishide")=0 Then
xmlstr = xmlstr & "<item>" & vbCrLf & "<title><![CDATA[" & rs("topic") & "]]></title>" & vbCrLf
if true_domain=1 then
xmlstr = xmlstr & "<link>" &rs("logfile") & "</link>" & vbCrLf
else
xmlstr = xmlstr & "<link>" & Trim(oblog.CacheConfig(3)) & rs("logfile") & "</link>" & vbCrLf
end if
xmlstr = xmlstr & "<description><![CDATA[" & oblog.trueurl(show_logtext) & "]]></description>" & vbCrLf
xmlstr = xmlstr & "<author>" & Replace(show_author," "," ") & "</author>" & vbCrLf
xmlstr = xmlstr & "<pubDate>" & show_addtime & "</pubDate>" & vbCrLf & "</item>" & vbCrLf
end if
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$", "")
'列表式样
strlist=strlist&"<li>"&show_topictxt&" "&show_author&" <span>"&show_addtime&"</span></li>"&vbcrlf
rs.movenext
show_logmore=show_logmore&show_logcyc
wend
xmlstr=xmlstr& vbcrlf&"</channel>" & vbcrlf&"</rss>"
set rstmp=oblog.execute("select count(logid) from oblog_log where userid=" & user_id & " and passcheck=1 and isdraft=0 and isdel=0")
G_P_This=1
start = CreateStaticPageBar(rstmp(0),user_showlog_num,0)
rstmp.Close
Set rstmp=Nothing
injsfile = "<script src=""" & blogurl & "count.asp?action=logs&id=" & strlogn & """></script>"
if user_indexlist=1 then show_logmore="<div id=""subject_index""><ul>全部日志"&strlist&"</ul></div>"
show=replace(user_skin_main,"$show_log$",show_logmore&start)
'ATFLAG首页替换掉文摘显示
show=replace(show,"$show_blogzhai$","")
show=filt_inc(show)
'处理连接
if showpwblog=false then
'show=replace(show,"$show_calendar$","<!-- #include file=""calendar\"&newcalendar(user_path&"/calendar")&".htm"" -->")
'show=repl_label(show,"",blogname,user_username&","&user_nickname,blogname,user_siteinfo)
show = repl_label(show, injsfile, BlogName, user_userName & "," & user_nickName, BlogName, user_siteinfo, newcalendar(blogdir&user_path&"/" & "calendar"))
if ispwblog=false then
savefile user_path,"/index."&f_ext,show
savefile user_path,"/rss2.xml",xmlstr
else
savefile user_path, "\rss2.xml", "<?xml version=""1.0"" encoding=""GB2312"" ?> <rss version=""2.0""><channel><title><![CDATA[ 此blog已加密 ]]> </title></channel></rss>"
savefile user_path,"/index."&f_ext,"<script language=javascript>window.location.replace('"&blogurl&"pwblog.asp?action=blog&userid="&user_id&"')</script>"
end if
if resp=1 then
response.Write("<li><a href="&user_path&"/index."&f_ext&" target=_blank>点击查看生成的首页</a></li>")
elseif resp=2 then
response.Redirect(user_path&"/index."&f_ext)
ElseIf resp = 3 Then
response.Redirect(user_path&"/index."&f_ext)
'response.Write("<li><a href="&user_path&"/index."&f_ext&" target=_blank>点击查看生成的团队博客首页</a></li>")
end if
else
m_index = show&injsfile
end if
end sub
Public Sub Update_message(resp)
Dim show_topic, show_emot, show_addtime, show_logtext, show_author, show_loginfo, show_more, show_logcyc, show_topictxt, show_logmore, show
Dim homepage_str, user_filepath,strPageBar,lngAll
Set rs = oblog.Execute("select count(*) from oblog_message where userid=" & user_id)
lngAll=rs(0)
Set rs = oblog.Execute("select top " & user_showlog_num & " message_user,messagetopic,message,addtime,messageid,homepage,isguest,ishide,ubbedit from oblog_message where userid=" & user_id & " and istate= 1 order by messageid desc")
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=""" & oblog.filt_html(rs(5)) & """ target=""_blank"">个人主页</a>"
End If
End If
show_topic = oblog.filt_html(rs(1)) & "<a name='" & rs(4) & "'></a>"
If rs(6) = 1 Then
show_author = oblog.filt_html(rs(0)) & "(游客)"
Else
show_author = oblog.filt_html(rs(0))
End If
show_addtime = rs(3)
show_topictxt = show_topic
show_loginfo = show_author & "发表留言于" & show_addtime
If rs("ubbedit")= 2 Then
show_logtext = oblog.FilterUbbFlash(filtscript(rs(2)))
Else
show_logtext = oblog.Ubb_Comment(rs(2))
End if
'show_logtext = oblog.FilterUbbFlash(filtscript(rs(2)))
show_more = homepage_str & " | <a href='#cmt'>签写留言</a> | <a href='"&blogurl&"user_messages.asp?action=modify&re=true&id=" & rs(4) & "'>回复</a>"
show_more = show_more & " | <a href=""" & blogurl & "user_messages.asp?action=del&id=" & rs(4) & """ target=""_blank"">删除</a>"
if rs("ishide")=1 then
show_topictxt="悄悄话"
show_topic="悄悄话"
show_logtext="此留言为悄悄话。"
show_more=replace(show_more,"回复","查看")
end if
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_logcyc = Replace(show_logcyc, "$show_blogtag$", "")
show_logcyc = Replace(show_logcyc, "$show_blogzhai$", "")
show_logmore = show_logmore & show_logcyc
rs.movenext
Wend
strPageBar = CreateStaticPageBar(lngAll,user_showlog_num,1)
Else
show_logmore = "暂无留言"
strPageBar =""
End If
show_logmore = show_logmore & strPageBar
Dim strguest, strart, i
If oblog.cacheConfig(27) Then strguest = "(游客无须输入密码)" Else strguest = ""
show_logmore = filt_inc(show_logmore)
show_logmore = show_logmore & strart & "#ad_usercomment#<a name='cmt'></a><h2>签写留言:</h2>" & vbCrLf
show_logmore = show_logmore & "<div id=""form_comment""><form action='" & blogurl & "savemessage.asp?userid=" & user_id & "' method='post' name='commentform' id='commentform' onSubmit='return Verifycomment()'>" & vbCrLf
show_logmore = show_logmore & "<ul>大名:<input name='UserName' type='text' id='UserName' size='15' maxlength='20' value='' /></ul>" & vbCrLf
show_logmore = show_logmore & "<ul>密码:<input name='Password' type='password' id='Password' size='15' maxlength='20' value='' /> " & strguest & "</ul>" & vbCrLf
show_logmore = show_logmore & "<ul>主页:<input name='homepage' type='text' id='homepage' size='42' maxlength='50' value='http://' /></ul>"
show_logmore = show_logmore & "<ul>标题:<input name='commenttopic' type='text' id='commenttopic' size='42' maxlength='50' value='' /></ul>"
show_logmore = show_logmore & "<ul><input type='hidden' name='edit' id='edit' value='' />" & vbCrLf
show_logmore = show_logmore & "<div id=""oblog_edit""></div>" & vbCrLf
show_logmore = show_logmore & "</ul>" & vbCrLf
show_logmore = show_logmore & "<ul>悄悄话:<input name='ishide' type='checkbox' id='ishide' value='1' /></ul>"
show_logmore = show_logmore & "<ul><span id=""ob_code""></span><input name='login' type='submit' id='Login' value=' 提交 ' /> " & vbCrLf
show_logmore = show_logmore & "</ul>" & vbCrLf
show_logmore = show_logmore & "</form></div>" & vbCrLf
show_logmore = "<h1>留言板首页(<a href='#cmt'>签写留言</a>)</h1>" & vbCrLf & show_logmore
show = Replace(user_skin_main, "$show_log$", show_logmore)
if showpwblog=false then
show = repl_label(show, "", BlogName & "--留言板", user_userName & "," & user_nickName, BlogName, BlogName, newcalendar(blogdir&user_path & "/calendar"))
if true_domain=1 then
user_filepath = "http://"&user_domain & "/message." & f_ext
else
user_filepath = user_path & "/message." & f_ext
end if
If ispwBlog = False Then
savefile user_path, "\message." & f_ext, show
Else
savefile user_path, "\message." & f_ext, "<script language=javascript>window.location.replace('" & blogurl & "pwblog.asp?action=message&userid=" & user_id & "')</script>"
End If
If resp = 1 Then
Response.Write ("<li><a href=" & user_filepath & " target=_blank>点击查看留言板!</a></li>")
ElseIf resp = 2 Then
Response.Redirect (user_filepath)
ElseIf resp = 3 Then
GoUrl = user_filepath
End If
Else
m_message=show
End If
End Sub
public sub update_info(userid)
dim show
show="<ul>"&vbcrlf
'show=show&"<li><img src=""" & blogdir & oblog.l_uIco&""" widht=""50"" height=""50""/></li>"
'show=show&"<li>会员昵称:"&OB_IIf(user_nickName,oblog.l_uname)&"</li>"&vbcrlf
'show=show&"<li>所在城市:"&user_province&user_city&"</li>"&vbcrlf
'show=show&"<li>会员等级:"&oblog.l_Group(1,0)&"</li>"&vbcrlf
show=show&"<li><a href="""&user_truepath&"cmd." & f_ext &"?uid="&user_id&"&do=info"">详细信息</a></li><li><a href="""&blogurl&"user_index.asp?url=user_url.asp?action=add$mainuserid="&user_id&"$surl="&user_truepath&"rss2.xml$stitle="&blogname&""" target=""_blank"">站内订阅("&user_subnum&")</a></li></ul>"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -