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

📄 class_blog.asp

📁 实现一个用JSP、Servlet技术实现的小型物流网站系统。实现功能如下:管理员通过登录该系统
💻 ASP
📖 第 1 页 / 共 5 页
字号:
		Update_placard (user_id)
		Update_friends (user_id)
		Update_mygroups (user_id)
		'show=replace(show,"$show_calendar$",oblog.readfile(user_path&"\calendar",log_month&".htm"))
		show = Replace(show, "$show_placard$", "<div id=""placard"">"&m_placard&"</div>")
		show = Replace(show, "$show_subject$", "<div id=""subject"">"&m_subject&"</div>")
		show = Replace(show, "$show_subject_l$", "<div id=""subject_l"">"&m_subject&"</div>")
		show = Replace(show, "$show_newblog$", "<div id=""newblog"">"&m_newblog&"</div>")
		show = Replace(show, "$show_comment$", "<div id=""comment"">"&m_comment&"</div>")
		show = Replace(show, "$show_newmessage$", "<div id=""newmessage"">"&m_newmessage&"</div>")
		show = Replace(show, "$show_links$", "<div id=""links"">"&m_links&"</div><div id=""ad_userlinks""></div>")
		show = Replace(show, "$show_info$", "<div id=""info"">"&m_info&"</div>")
		show = Replace(show, "$show_blogname$", blogname)		
		show = Replace(show, "$show_myfriend$", "<div id=""myfriend"">" &m_friends&"</div>")
		show = Replace(show, "$show_mygroups$", "<div id=""mygroups"">"&m_mygroups&"</div>")
		show = Replace(show, "$show_blogurl$", user_trueurl)
		'show = Replace(show, "$show_photo$", "<div id=""ob_miniphoto""></div><script>var so = new SWFObject("""&blogurl&"miniphoto.swf?blogurl="&blogurl&"&userid="&user_id&"&gourl="&user_truepath&"cmd."&f_ext&"?uid="&user_id&"$do=album"", ""miniphoto"", ""100%"", ""180"", ""9"", ""#FFFFFF"");so.addParam(""wmode"", ""transparent"");so.write(""ob_miniphoto"");<script>")
		show = Replace(show, "$show_photo$", "<div id=""ob_miniphoto""><object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0' width='100%' height='180' align='middle'><param name=""wmode"" value=""transparent"" /><param name='movie' value='"&blogurl&"miniphoto.swf?blogurl="&blogurl&"&userid="&user_id&"&gourl="&user_truepath&"cmd."&f_ext&"?uid="&user_id&"$do=album' /><param name='quality' value='high' /><embed src='"&blogurl&"miniphoto.swf?blogurl="&blogurl&"&userid="&user_id&"&gourl="&user_truepath&"cmd."&f_ext&"?uid="&user_id&"$do=album' quality='high' pluginspage='http://www.macromedia.com/go/getflashplayer' type='application/x-shockwave-flash' width='100%' height='180'></embed></object></div>")
		show = Replace(show, "#ad_usercomment#", "<div id=""ad_usercomment""></div>")
		show=replace(show,"$show_xml$","<div id=""xml""><span id=""txml""></span><br /><a href="""&user_truepath&"rss2.xml"" target=""_blank""><img src='" & blogurl & "images/xml.gif' width='36' height='14' border='0' /></a></div>")
		If f_ext = "htm" Or f_ext = "html" Then
			show=replace(show,"$show_search$","<div id=""search""></div><script src="""&blogdir&user_path&"/inc/show_search.htm""></script>")
			show=replace(show,"$show_login$","<div id=""ob_login""></div><script src="""&blogdir&user_path&"/inc/show_login.htm""></script>")
		Else
			show=replace(show,"$show_search$",oblog.readfile(user_path&"\inc","show_search.htm"))
			show=replace(show,"$show_login$",oblog.readfile(user_path&"\inc","show_login.htm"))
			'show=replace(show,"$show_xml$",oblog.readfile(user_path&"\inc","show_xml.htm"))
		End If
		show="<script src=""inc/main.js"" type=""text/javascript""></script>"&VbCrLf&show
		show="<link href=""OblogStyle/OblogUserDefault4.css"" rel=""stylesheet"" type=""text/css"" />"&VbCrLf&"</head>"&VbCrLf&"<body><div id=""ad_usertop""></div>"&show
		show=show&"<div id=""powered""><a href=""http://oblog.oioj.net"" target=""_blank""><img src=""images/oblog_powered.gif"" border=""0"" alt=""Powered by Oblog."" /></a></div>"&VbCrLf&"<div id=""ad_userbot""></div></body>"&VbCrLf&"</html>"
		show="<title>"&log_title&"</title>"&VbCrLf&show
		show="<meta http-equiv=""Content-Type"" content=""text/html; charset=gb2312"" />"&VbCrLf&show
		show="<meta http-equiv=""Content-Language"" content=""zh-CN"" />"&VbCrLf&show
		show="<html>"&VbCrLf&"<head>"&VbCrLf&show
		 If InStr(show, "<div id=""oblog_edit"">") Then
			show = show & "<script src=""" & blogurl & "count.asp?action=code31""></script>" & vbCrlf
			show = show & "<script src=""" & blogurl & "commentedit.asp""></script>" & vbCrlf
		End If
		If InStr(show, "<div id=""blogzhai"">") Then
			show = show & "<script src=""" & blogurl & "inc/inc_zhai.js""></script>" & vbCrlf
		End If
		show = show & "<script src=""" & blogurl & "count.asp?action=site&id=" & user_id & """></script>" & vbCrlf
		show = show & "<script src=""" & blogurl & "login.asp?action=showindexlogin""></script>" & vbCrlf
		show =repl_ad(show,1)
		filt_pwblog = show
	End Function

	public sub update_alllog_admin(uid)
		dim rs1,i,p
        uid = CLng(uid)
        oblog.CreateUserDir uid, 0
        userid = uid
		Set rs1 = Server.CreateObject("Adodb.RecordSet")
        rs1.open "select logid from oBlog_log where userid=" & uid & " and isdraft=0 ORDER BY logid", conn, 1, 1
        While Not rs1.EOF
            p = rs1.recordcount + 1
            progress Int(i / p * 100), "更新ID为" & rs1(0) & "的日志..."
            Update_log rs1(0), 0
            Update_calendar rs1(0)
            i = i + 1
            rs1.movenext
        Wend
        rs1.Close
		set rs1=nothing
		update_usite(uid)
	end sub

    Public Sub Update_alllog(uid,lastlogid)
        uid = CLng(uid)
        oblog.CreateUserDir uid, 0
        userid = uid
        update_partlog uid,lastlogid
        update_usite(uid)
    End Sub

	public sub update_partlog(uid,lid)
		dim p,i,rs1,lastid
		uid=Int(uid)
		lid=CLng(lid)
		i=1
		userid=uid
		set rs1=Server.CreateObject("Adodb.RecordSet")
		rs1.open "SELECT TOP " & P_BLOG_UPDATEPAUSE &" logid FROM oblog_log WHERE userid="&uid&" and isdraft=0 and isdel=0 and logid>"&lid & " ORDER BY logid ",conn,1,1
		if rs1.eof then
			rs1.Close
			set rs1=nothing
			progress 100, "更新所有日志完成!"
			exit sub
		end if
		While Not rs1.eof 
			p=rs1.recordcount+1
			progress int(i/p*100),"更新ID为"&rs1(0)&"的日志..."
			update_log rs1(0),0
			update_calendar rs1(0) 
			lastid=rs1(0)
			i=i+1
			rs1.movenext
		Wend
		rs1.close
		set rs1=oblog.execute("select top 1 logid from oblog_log where userid=" & uid & " and isdraft=0 and isdel=0 and logid>"&lastid)
		if rs1.eof then 
			set rs1=Nothing
			progress 100, "更新所有日志完成!"
			exit Sub
		End if
		rs1.Close
		set rs1=Nothing
		Dim ttime
		ttime = oblog.CacheConfig(28)
		If ttime <> "" Then ttime = CLng (ttime) Else ttime = 5
		If ttime > 60 Then ttime = 5
		If ttime > 0 Then
			progress 100, ttime&"秒后自动更新后面的日志,请不要刷新页面..."
			with response
				.Write "<script language=JavaScript>var progress=document.getElementById(""progress"");var secs = "&ttime&";var wait = secs * 1000;"
				.write "for(i = 1; i <= secs; i++){window.setTimeout(""Update("" + i + "")"", i * 1000);}"
				.write "function Update(num){if(num != secs){printnr = (wait / 1000) - num;document.getElementById(""pstr"").innerHTML=printnr+""秒后自动更新后面的日志,请不要刷新页面..."";progress.style.width=(num/secs)*100+""%"";progress.innerHTML=""剩余""+printnr+""秒""}}"
				.write "setTimeout(""window.location='user_update.asp?action=update_alllog&lastlogid="&lastid&"'"","&int(ttime*1000)&");</script>"
			end with
			response.Flush()
			response.End()
        End If
		set rs1=nothing
	end Sub
	
	public sub update_usite(uid)
		dim p
		p = 14
		progress int(1/p*100),"更新首页..."
		update_index 0
		progress int(2/p*100),"更新站点信息文件..."
		update_info uid
		progress int(3/p*100),"生成新日志列表文件..."
		update_newblog(uid)
		progress int(4/p*100),"更新最新留言..."
		update_newmessage uid
		progress int(5/p*100),"生成首页日志分类文件..."
		update_subject(uid)
		progress int(8/p*100),"更新留言板..."
		update_message 0
		progress int(9/p*100),"更新最新回复..."
		progress int(10/p*100),"更新" &P_QQ_NAME& "列表..."
		update_comment uid
		progress int(11/p*100),"更新公告..."
		update_placard uid
		progress int(12/p*100),"更新友情连接..."
		update_links uid
		progress int(13/p*100),"更新blogname..."
		update_friends uid
		update_blogname
		update_mygroups uid
		CreateFunctionPage
		'progress int(13/p*100),"更新整站密码文件..."
		'update_blogpassword
		progress int(14/p*100),"整站重新发布完成!"
	end sub

	public sub update_blogname()
		savefile user_path,"\inc\show_blogname.htm",oblog.filt_html(blogname)
	end sub
	Public Sub savefile(dirstr, fname, str)
		On Error Resume Next
		Dim dirstr1, divid
		if dirstr="" then
			response.Write("用户目录不能为空!")
			response.end
		end if
		dirstr1 = Server.Mappath(blogdir&dirstr)
		'Response.Write "目录2:" & dirstr1  & "<br>"
		'以下转为js格式
		If (Left(fname, 5) = "\inc\" Or Left(fname, 10) = "\calendar\") And (f_ext = "htm" Or f_ext = "html") Then
			If Left(fname, 10) = "\calendar\" Then
				divid = "calendar"
			Else
				divid = Replace(Replace(Replace(fname, "\inc\", ""), ".htm", ""), "show_", "")
			End If
			str = oblog.htm2js_div(str, divid)
		End If
		'以下兼容asp格式,转换路径
		if f_ext="asp" and true_domain=0 then
			if logfilepath=0  then
				str=replace(str,"<!-- #include file="""&user_truepath,"<!-- #include file=""")
			else
				if instr(fname,"index.asp") or instr(fname,"message.asp") or instr(fname,"cmd.asp") then
					str=replace(str,"<!-- #include file="""&user_truepath,"<!-- #include file=""")
				else
					str=replace(str,"<!-- #include file="""&user_truepath,"<!-- #include file=""../../")
				end if
			end if
			
			if logfilepath=0  then
				str=replace(str,"<!-- #include file="""&blogdir,"<!-- #include file=""../../")
			else
				if instr(fname,"index.asp") or instr(fname,"message.asp") or instr(fname,"cmd.asp") then
					str=replace(str,"<!-- #include file="""&blogdir,"<!-- #include file=""../../")
				else
					str=replace(str,"<!-- #include file="""&blogdir,"<!-- #include file=""../../../../")
				end if
			end if
		end if
		if true_domain=1 then
			if logfilepath=0  then
				str=replace(str,"<!-- #include file="""&user_truepath,"<!-- #include file=""")
			else
				if instr(fname,"index."&f_ext) or instr(fname,"message."&f_ext) or instr(fname,"cmd."&f_ext) then
					str=replace(str,"<!-- #include file="""&user_truepath,"<!-- #include file=""")
				else
					str=replace(str,"<!-- #include file="""&user_truepath,"<!-- #include file=""../../")
				end if
			end if
		end if
		If str = "" Or IsNull(str) Then str = " "
		If objFSO.FolderExists(dirstr1) = False Then objFSO.CreateFolder (dirstr1)
		Call oblog.BuildFile(dirstr1 & Trim(fname), str)
	   'If Err Then
			'err.Clear
			'Response.Write "<br />生成文件发生错误,若您是第一次使用,请选择:>>更新>>重新发布全站。"
			'Response.End
		'End If
	End Sub

	public Function newcalendar(folderspec)
		If Is_DeBug=0 Then on error resume next
		Dim f, f1, fc, nname
		'Response.Write folderspec
		if objFSO.FolderExists(server.MapPath(folderspec)) then
			Set f = objFSO.GetFolder(server.MapPath(folderspec))
			Set fc = f.Files
			 nname=0
			For Each f1 in fc
			   if nname<Int(replace(f1.name,".htm","")) then nname=Int(replace(f1.name,".htm",""))
			Next
			newcalendar = nname
		else
			newcalendar="0"
		end if
	End Function

	'str改为了代入的js包含文件
	Public Function repl_label(show, str, title, author, keyword, desc, calendar)
		On Error Resume Next
		show = Replace(show, "#ad_usercomment#", "<div id=""ad_usercomment""></div>")
		show = Replace(show, "$show_placard$", "<div id=""placard""><!-- #include file="""&user_truepath&"inc/show_placard.htm"" --></div>")
		show = Replace(show, "$show_calendar$", "<div id=""calendar""><!-- #include file="""&user_truepath&"calendar/" & calendar & ".htm"" --></div>")
		show = Replace(show, "$show_xml$", "<div id=""xml""><span id=""txml""></span><br /><br /><a href="""&user_truepath&"rss2.xml"" target=""_blank""><img src='" & blogurl & "images/xml.gif' width='36' height='

⌨️ 快捷键说明

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