📄 class_blog.asp
字号:
If linkdays(0, c) = thismonth And linkdays(1, c) = count Then
ccode = ccode & "<a href=""" & linkdays(2, c) & """ title=""查看"&thisyear&"年"&thismonth&"月"&thisdate&"日的日志"">"
linkTrue = "True"
End If
End If
Next
If count <= mdays(thismonth) Then ccode = ccode & count
If linkTrue = "True" Then ccode = ccode & "</a>"
ccode = ccode & "</td>" & vbCrLf
count = count + 1
Next
If count > mdays(thismonth) Then
ccode = ccode & "</tr>" & vbCrLf
Else
ccode = ccode & "</tr><tr>" & vbCrLf
End If
startspace = 0
Wend
ccode = ccode & "</tbody>" & vbCrLf
ccode = ccode & "</table>" & vbCrLf
If Int(c_month) < 10 Then c_month = "0" & c_month
'ccode = "<div id=""calendar"">" & ccode & "</div>"
savefile user_path, "\calendar\" & c_year & c_month & ".htm", ccode
End Sub
Public Function filt_pwblog(show, log_title)
update_info (user_id)
update_subject (user_id)
update_newblog (user_id)
update_newmessage (user_id)
update_links (user_id)
update_comment (user_id)
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""><a href="""&xmlurl&""" target=""_blank""><img src='http://www.oblog.cn/xml.jpg' border='0' /></a><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://www.meigui8.cn"" 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(uid)
dim p,i,rs1
uid=Int(uid)
i=1
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 and isdel=0",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
if p=0 then p=1
progress int(i/p*100),"更新所有日志完成!"
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),"更新最新回复..."
update_mygroups uid
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),"整站重新发布完成!"
set rs1=nothing
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""><a href="""&xmlurl&""" target=""_blank""><img src='http://www.oblog.cn/xml.jpg' border='0' /></a><br /><br /><a href="""&user_truepath&"rss2.xml"" target=""_blank""><img src='" & blogurl & "images/xml.gif' width='36' height='14' border='0' /></a></div>")
show = Replace(show, "$show_subject$", "<div id=""subject""><!-- #include file="""&user_truepath&"inc/show_subject.htm"" --></div>")
show = Replace(show, "$show_subject_l$", "<div id=""subject_l""><!-- #include file="""&user_truepath&"inc/show_subject.htm"" --></div>")
show = Replace(show, "$show_newblog$", "<div id=""newblog""><!-- #include file="""&user_truepath&"inc/show_newblog.htm"" --></div>")
show = Replace(show, "$show_comment$", "<div id=""comment""><!-- #include file="""&user_truepath&"inc/show_comment.htm"" --></div>")
show = Replace(show, "$show_mygroups$", "<div id=""mygroups""><!-- #include file="""&user_truepath&"inc/show_mygroups.htm"" --></div>")
show = Replace(show, "$show_myfriend$", "<div id=""myfriend""><!-- #include file="""&user_truepath&"inc/show_myfriend.htm"" --></div>")
show = Replace(show, "$show_blogurl$", "<span id=""blogurl"">"&user_trueurl&"</span>")
show = Replace(show, "$show_blogname$", "<span id=""blogname""><!-- #include file="""&user_truepath&"inc/show_blogname.htm"" --></span>")
show = Replace(show, "$show_newmessage$", "<div id=""newmessage""><!-- #include file="""&user_truepath&"inc/show_newmessage.htm"" --></div>")
show = Replace(show, "$show_links$", "<div id=""links""><!-- #include file="""&user_truepath&"inc/show_links.htm"" --></div><div id=""ad_userlinks""></div>")
show = Replace(show, "$show_info$", "<div id=""info""><!-- #include file="""&user_truepath&"inc/show_info.htm"" --></div>")
show = Replace(show, "$show_search$", "<div id=""search""><!-- #include file="""&user_truepath&"inc/show_search.htm"" --></div>")
show = Replace(show, "$show_login$", "<div id=""ob_login""></div>")
'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="&blogu
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -