⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 class_blog.asp

📁 是个不错的文件代码,希望大家好好用,
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		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=""" & 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
							if lcase(left(rstmp(0),7))="http://" then
								faceurl=rstmp(0)
							else
								if trim(rstmp(0))=""  or isnull(rstmp(0)) then
									faceurl=blogurl&"images/ico_default.gif"
								else
									faceurl=blogurl&rstmp(0)
								end if
							end if
						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 = 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=5"" target=""_blank"">查看所有评论</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 & "#ad_usercomment#<a name='cmt'></a><h2>发表评论:</h2>" & vbCrLf
				show_logmore = show_logmore & "<div id=""form_comment""><form action='" & blogurl & "savecomment.asp?logid=" & logid & "' 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='" & commenttopic & "' /></ul>"
				show_logmore = show_logmore & "<ul><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 & "</ul>" & vbCrLf
				show_logmore = show_logmore & "<ul><span id=""ob_code""></span><input type='submit' value=' 提交 '></ul>" & vbCrLf
				show_logmore = show_logmore & "</form></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(show_logtext), 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
				If isMulti="0" Then
					response.Write("<li><a href="&user_logpath1&" target=_blank>点击查看生成的日志</a></li>")
					response.Write("<li><a href=user_post.asp?logid="&logid&"&t="&request("t")&">点击修改刚刚提交的日志</a></li>")
				End If
			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
		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="""&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>"
					else
						show_author="<span id=""n_"&commentid&""">"&oblog.filt_html(rs(0))&"</span>"
					end if
					show_addtime="<span id=""t_"&commentid&""">"&rs(3)&"</span>"
					show_topictxt=show_topic
					show_loginfo=show_author&"发表评论于"&show_addtime
					show_logtext = "<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
				dim strguest
				if oblog.cacheConfig(27)=1 then strguest="(游客无须输入密码)" else	strguest=""
				show_logmore=filt_inc(show_logmore)
				show_logmore=show_logmore&"#ad_usercomment#<a name='comment'></a><h2>发表评论:</h2>"& vbcrlf
			show_logmore = show_logmore & "<div id=""form_comment""><form action='" & blogurl & "savecomment.asp?logid=" & logid & "' 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='"&commenttopic&"' /></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><script src=""" & blogurl & "count.asp?action=code""></script><input type='Submit' value=' 提交 '></ul>" & vbCrLf
				show_logmore=show_logmore& "</form></div>" & vbcrlf
			end if
		show=replace(user_skin_main,"$show_log$",show_logmore)
		If f_ext = "htm" Or f_ext = "html" Then
			m_commentsmore = Replace(show, "$show_calendar$", "<div id=""calendar""></div><script src='" & user_path & "\calendar\" & log_month & ".htm'></script>")
		ElseIf Page="cmd" Then
			m_commentsmore = Replace(show, "$show_calendar$", "<div id=""calendar""></div><" & "%'=Calendar(intYear,intMonth,intDay)%" & ">")        	
		Else
			m_commentsmore = Replace(show, "$show_calendar$", "<div id=""calendar"">" & oblog.readfile(user_path & "\calendar", log_month & ".htm") & "</div>")
		End If
	end sub

	public sub update_index(resp)
		Dim injsfile
		dim show_topic,show_emot,show_addtime,show_logtext,show_author,show_loginfo,show_more,show_logcyc,show_topictxt,show_logmore,show,rssubject,strtmp,xmlstr,rstmp,start,i,strlogn,strlist,substr
		xmlstr = "<?xml version=""1.0"" encoding=""GB2312""?>" & vbCrLf
		xmlstr = xmlstr&"<?xml-stylesheet type=""text/css"" href="""&blogurl&"oblogstyle/rss.css""?>"& vbCrLf
		xmlstr = xmlstr& "<rss version=""2.0"">"& vbCrLf
		If IsNull(BlogName) Then BlogName=""
		xmlstr = xmlstr & "<channel>" & vbCrLf & "<title><![CDATA[" & Replace(BlogName,"&nbsp;"," ") & "]]></title>" & vbCrLf
		if true_domain=1 then
			xmlstr = xmlstr & "<link>http://" & user_domain & "/index." & f_ext & "</link>" & vbCrLf

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -