c_system_event.asp
上传用户:saigedz
上传日期:2019-10-14
资源大小:997k
文件大小:83k
源码类别:

中间件编程

开发平台:

HTML/CSS

  1. <%
  2. '///////////////////////////////////////////////////////////////////////////////
  3. '//              Z-Blog
  4. '// 作    者:    朱煊(zx.asd)
  5. '// 版权所有:    RainbowSoft Studio
  6. '// 技术支持:    rainbowsoft@163.com
  7. '// 程序名称:    
  8. '// 程序版本:    
  9. '// 单元名称:    c_system_event.asp
  10. '// 开始时间:    2005.02.11
  11. '// 最后修改:    
  12. '// 备    注:    
  13. '///////////////////////////////////////////////////////////////////////////////
  14. '/////////////////////////////////////////////////////////////////////////////////////////
  15. '*********************************************************
  16. ' 目的:    用户登陆
  17. '*********************************************************
  18. Public Function Login()
  19. If CheckVerifyNumber(Request.Form("edtCheckOut"))=False Then Call ShowError(38)
  20. Login=BlogUser.Verify
  21. End Function
  22. '*********************************************************
  23. '*********************************************************
  24. ' 目的:    用户退出
  25. '*********************************************************
  26. Public Function Logout()
  27. 'Response.Cookies("username")=""
  28. 'Response.Cookies("password")=""
  29. Response.Write "<script language=""JavaScript"" src=""script/common.js"" type=""text/javascript""></script>"
  30. Response.Write "<script language=""JavaScript"" type=""text/javascript"">"
  31. Response.Write "function SetCookie(sName, sValue,iExpireDays) {if (iExpireDays){var dExpire = new Date();dExpire.setTime(dExpire.getTime()+parseInt(iExpireDays*24*60*60*1000));document.cookie = sName + ""="" + escape(sValue) + ""; expires="" + dExpire.toGMTString();}else{document.cookie = sName + ""="" + escape(sValue); }}"
  32. Response.Write "SetCookie(""username"","""","""");"
  33. Response.Write "SetCookie(""password"","""","""");"
  34. Response.Write "window.location=""" & ZC_BLOG_HOST & """;"
  35. Response.Write "</script>"
  36. Logout=True
  37. End Function
  38. '*********************************************************
  39. '/////////////////////////////////////////////////////////////////////////////////////////
  40. '*********************************************************
  41. ' 目的:    文件上抟
  42. '*********************************************************
  43. Function UploadFile(bolAutoName,bolReload)
  44. Dim objUpLoadFile
  45. Set objUpLoadFile=New TUpLoadFile
  46. objUpLoadFile.AuthorID=BlogUser.ID
  47. If bolReload=True Then
  48. ShowError_Custom="Response.Write ""<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'><html xmlns='http://www.w3.org/1999/xhtml' xml:lang='zh-CN' lang='zh-CN'><head> <link rel='stylesheet' rev='stylesheet' href='CSS/admin.css' type='text/css' media='screen' /></head><body><form id='edit' name='edit' method='post'><p>" & ZC_MSG098 & ":" & """&ZVA_ErrorMsg(id)&""" & "</p><p><a href='cmd.asp?act=FileSnd'>" & ZC_MSG295 & "</a></p></form></body></html>"":Response.End"
  49. End If
  50. If objUpLoadFile.UpLoad(bolAutoName) Then
  51. UploadFile=True
  52. If bolReload=False Then Exit Function
  53. Response.Write "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8""/><meta http-equiv=""Content-Language"" content=""zh-cn"" /><link rel=""stylesheet"" rev=""stylesheet"" href=""CSS/admin.css"" type=""text/css"" media=""screen"" /></head><body>"
  54. Response.Write "<form border=""1"" name=""edit"" id=""edit"" method=""post"" enctype=""multipart/form-data"" action="""& ZC_BLOG_HOST &"cmd.asp?act=FileSnd"">"
  55. Response.Write "<p>"& ZC_MSG236 &":"
  56. Response.Write ""& "<a href="""& objUpLoadFile.FullUrlPathName &""" target=""_blank"">"& objUpLoadFile.FullUrlPathName &"</a></p>"
  57. Response.Write "<p><input type=""submit"" class=""button"" value="""& ZC_MSG237 &""" name=""B1"" /></p></form>"
  58. Dim strFileType
  59. Dim strFileName
  60. Dim strUPLOADDIR
  61. Dim strUPLOADDIR2
  62. If ZC_UPLOAD_DIRBYMONTH Then
  63. CreatDirectoryByCustomDirectory(ZC_UPLOAD_DIRECTORY&"/"&Year(GetTime(Now()))&"/"&Month(GetTime(Now())))
  64. strUPLOADDIR = ZC_UPLOAD_DIRECTORY&"/"&Year(GetTime(Now()))&"/"&Month(GetTime(Now())) & "/"
  65. strUPLOADDIR2 = "upload/"&Year(GetTime(Now()))&"/"&Month(GetTime(Now())) & "/"
  66. Else
  67. strUPLOADDIR = ZC_UPLOAD_DIRECTORY & "/"
  68. strUPLOADDIR2 ="upload/"
  69. End If
  70. strFileType=LCase(objUpLoadFile.FileName)
  71. If (CheckRegExp(strFileType,".(jpeg|jpg|gif|png|bmp)$")=True) Then
  72. strFileName="[IMG]"&strUPLOADDIR2&objUpLoadFile.FileName&"[/IMG]"
  73. ElseIf (CheckRegExp(strFileType,".(swf)$")=True) Then 
  74. strFileName="[FLASH=400,300,True]"&strUPLOADDIR2&objUpLoadFile.FileName&"[/FLASH]"
  75. ElseIf (CheckRegExp(strFileType,".(wmv|avi|asf)$")=True) Then 
  76. strFileName="[WMV=400,300,True]"&strUPLOADDIR2&objUpLoadFile.FileName&"[/WMV]"
  77. ElseIf (CheckRegExp(strFileType,".(qt|mov)$")=True) Then 
  78. strFileName="[QT=400,300,True]"&strUPLOADDIR2&objUpLoadFile.FileName&"[/QT]"
  79. ElseIf (CheckRegExp(strFileType,".(rm|rmvb|mpg|mpeg)$")=True) Then 
  80. strFileName="[RM=400,300,True]"&strUPLOADDIR2&objUpLoadFile.FileName&"[/RM]"
  81. ElseIf (CheckRegExp(strFileType,".(wma)$")=True) Then 
  82. strFileName="[WMA=True]"&strUPLOADDIR2&objUpLoadFile.FileName&"[/WMA]"
  83. ElseIf (CheckRegExp(strFileType,".(rm)$")=True) Then 
  84. strFileName="[RA=True]"&strUPLOADDIR2&objUpLoadFile.FileName&"[/RA]"
  85. Else
  86. strFileName="[URL="&strUPLOADDIR2 & objUpLoadFile.FileName &"]"& objUpLoadFile.FileName &"[/URL]"
  87. End If
  88. 'edit
  89. Response.Write "<script language=""Javascript"">try{parent.document.edit.txaContent.currPos.text+='"&strFileName&"';}catch(e){try{parent.document.edit.txaContent.value+='"&strFileName&"'}catch(e){}}</script>"
  90. 'edit_widgeditor
  91. Response.Write "<script language=""Javascript"">try{parent.document.getElementById('txaContentWidgIframe').contentWindow.document.getElementsByTagName('body')[0].innerHTML+='"&strFileName&"'}catch(e){}</script>"
  92. 'edit_fckeditor
  93. Response.Write "<script language=""Javascript"">try{parent.document.getElementById('MyEditor___Frame').contentWindow.frames[0].document.getElementsByTagName('body')[0].innerHTML+='"&Replace(TransferHTML(UBBCode(strFileName,"[link][image][media][flash]"),"[upload]"),"'","'")&"'}catch(e){}</script>"
  94. 'edit_htmlarea
  95. Response.Write "<script language=""Javascript"">try{parent.document.getElementById('ta').parentNode.getElementsByTagName('iframe')[0].contentWindow.document.getElementsByTagName('body')[0].innerHTML+='"&strFileName&"'}catch(e){}</script>"
  96. 'edit_tinymce
  97. Response.Write "<script language=""Javascript"">try{parent.document.getElementById('mce_editor_0').contentWindow.document.getElementsByTagName('body')[0].innerHTML+='"&strFileName&"'}catch(e){}</script>"
  98. 'edit_ewebeditor
  99. Response.Write "<script language=""Javascript"">try{parent.document.getElementById('eWebEditor1').contentWindow.document.getElementsByTagName('body')[0].innerHTML+='"&strFileName&"'}catch(e){}</script>"
  100. Response.Write "</body></html>"
  101. 'If bolReload=True Then Response.End
  102. Else
  103. If bolReload=True Then Response.Redirect "admin/admin.asp?act=FileSnd"
  104. End If
  105. Set objUpLoadFile=Nothing
  106. End Function
  107. '*********************************************************
  108. '*********************************************************
  109. ' 目的:    Form of Send File
  110. '*********************************************************
  111. Function SendFile()
  112. Response.Write "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8""/><meta http-equiv=""Content-Language"" content=""zh-cn"" /><link rel=""stylesheet"" rev=""stylesheet"" href=""CSS/admin.css"" type=""text/css"" media=""screen"" /><script src=""script/common.js"" type=""text/javascript""></script></head><body>"
  113. Response.Write "<form border=""1"" name=""edit"" id=""edit"" method=""post"" enctype=""multipart/form-data"" action="""& ZC_BLOG_HOST &"cmd.asp?act=FileUpload&reload=1"">"
  114. Response.Write "<p>"& ZC_MSG108 &": </p>"
  115. Response.Write "<p><input type=""file"" id=""edtFileLoad"" name=""edtFileLoad"" size=""20"">  <input type=""submit"" class=""button"" value="""& ZC_MSG087 &""" name=""B1"" onclick='document.getElementById(""edit"").action=document.getElementById(""edit"").action+""&filename=""+escape(document.getElementById(""edtFileLoad"").value)' /> <input class=""button"" type=""reset"" value="""& ZC_MSG088 &""" name=""B2"" />"
  116. Response.Write "&nbsp;<input type=""checkbox"" onclick='if(this.checked==true){document.getElementById(""edit"").action=document.getElementById(""edit"").action+""&autoname=1"";}else{document.getElementById(""edit"").action="""& ZC_BLOG_HOST &"cmd.asp?act=FileUpload&reload=1"";};SetCookie(""chkAutoFileName"",this.checked,365);' id=""chkAutoName"" id=""chkAutoName""/><label for=""chkAutoName"">"& ZC_MSG131 &"</label></p></form>"
  117. Response.Write "<script type=""text/javascript"">if(GetCookie(""chkAutoFileName"")==""true""){document.getElementById(""chkAutoName"").checked=true;document.getElementById(""edit"").action=document.getElementById(""edit"").action+""&autoname=1"";};</script></body></html>"
  118. End Function
  119. '*********************************************************
  120. '*********************************************************
  121. ' 目的:     文件删除
  122. '*********************************************************
  123. Function DelFile(intID)
  124. Dim objUpLoadFile
  125. Set objUpLoadFile=New TUpLoadFile
  126. If objUpLoadFile.LoadInfoByID(intID) Then
  127. If (objUpLoadFile.AuthorID=BlogUser.ID) Or (CheckRights("Root")=True) Then
  128. If objUpLoadFile.Del Then DelFile=True
  129. End If
  130. Else
  131. Exit Function
  132. End If
  133. Set objUpLoadFile=Nothing
  134. End Function
  135. '*********************************************************
  136. '/////////////////////////////////////////////////////////////////////////////////////////
  137. '*********************************************************
  138. ' 目的:    Post Article
  139. '*********************************************************
  140. Function PostArticle()
  141. Dim s,i,t,k
  142. Dim strTag
  143. If Request.Form("edtID")<>"0" Then
  144. Dim objTestArticle
  145. Set objTestArticle=New TArticle
  146. If objTestArticle.LoadInfobyID(Request.Form("edtID")) Then
  147. If Not((objTestArticle.AuthorID=BlogUser.ID) Or (CheckRights("Root")=True)) Then Exit Function
  148. strTag=objTestArticle.Tag
  149. objTestArticle.DelFile
  150. Else
  151. Call ShowError(9)
  152. End If
  153. End If
  154. Dim objArticle
  155. Set objArticle=New TArticle
  156. objArticle.ID=Request.Form("edtID")
  157. objArticle.CateID=Request.Form("edtCateID")
  158. objArticle.AuthorID=Request.Form("edtAuthorID")
  159. objArticle.Level=Request.Form("edtLevel")
  160. objArticle.PostTime=Request.Form("edtYear") & "-" & Request.Form("edtMonth") & "-" & Request.Form("edtDay") & " " &  Request.Form("edtTime")
  161. objArticle.Title=Request.Form("edtTitle")
  162. objArticle.Tag=ParseTag(Request.Form("edtTag"))
  163. objArticle.Alias=Request.Form("edtAlias")
  164. objArticle.Istop=Request.Form("edtIstop")
  165. objArticle.Intro=Request.Form("txaIntro")
  166. Select Case LCase(Request.QueryString("type"))
  167. Case "htmlarea"
  168. objArticle.Content=Request.Form("ta")
  169. If objArticle.Intro="" Then
  170. s=objArticle.Content
  171. If Len(s)>ZC_TB_EXCERPT_MAX Then
  172. i=InStr(s,vbCrlf)
  173. If i>0 Then
  174. t=Split(s,vblf)
  175. s=""
  176. For k=LBound(t) To UBound(t)
  177. s=s & t(k)
  178. If Len(s)>ZC_TB_EXCERPT_MAX Then Exit For
  179. Next
  180. s=Replace(s,vbCr,vbCrlf)
  181. End If
  182. s=s & ZC_MSG305
  183. End If
  184. s=TransferHTML(s,"[closehtml]")
  185. objArticle.Intro=s
  186. End If
  187. Case "tinymce"
  188. objArticle.Content=Request.Form("txaContent")
  189. If objArticle.Intro="" Then
  190. s=objArticle.Content
  191. If Len(s)>ZC_TB_EXCERPT_MAX Then
  192. i=InStr(s,vbCrlf)
  193. If i>0 Then
  194. t=Split(s,vblf)
  195. s=""
  196. For k=LBound(t) To UBound(t)
  197. s=s & t(k)
  198. If Len(s)>ZC_TB_EXCERPT_MAX Then Exit For
  199. Next
  200. s=Replace(s,vbCr,vbCrlf)
  201. End If
  202. s=s & ZC_MSG305
  203. End If
  204. s=TransferHTML(s,"[closehtml]")
  205. objArticle.Intro=s
  206. End If
  207. objArticle.Content=Replace(objArticle.Content,vbCrLf,"")
  208. objArticle.Content=Replace(objArticle.Content,vbLf,"")
  209. objArticle.Intro=Replace(objArticle.Intro,vbCrLf,"")
  210. objArticle.Intro=Replace(objArticle.Intro,vbLf,"")
  211. Case "fckeditor"
  212. objArticle.Content=Request.Form("txaContent")
  213. If objArticle.Intro="" Then
  214. s=objArticle.Content
  215. If Len(s)>ZC_TB_EXCERPT_MAX Then
  216. i=InStr(s,vbCrlf)
  217. If i>0 Then
  218. t=Split(s,vblf)
  219. s=""
  220. For k=LBound(t) To UBound(t)
  221. s=s & t(k)
  222. If Len(s)>ZC_TB_EXCERPT_MAX Then Exit For
  223. Next
  224. s=Replace(s,vbCr,vbCrlf)
  225. End If
  226. s=s & ZC_MSG305
  227. End If
  228. s=TransferHTML(s,"[closehtml]")
  229. objArticle.Intro=s
  230. End If
  231. objArticle.Content=Replace(objArticle.Content,vbCrLf,"")
  232. objArticle.Content=Replace(objArticle.Content,vbLf,"")
  233. objArticle.Intro=Replace(objArticle.Intro,vbCrLf,"")
  234. objArticle.Intro=Replace(objArticle.Intro,vbLf,"")
  235. Case "ewebeditor"
  236. objArticle.Content=Request.Form("txaContent")
  237. If objArticle.Intro="" Then
  238. s=objArticle.Content
  239. If Len(s)>ZC_TB_EXCERPT_MAX Then
  240. i=InStr(s,vbCrlf)
  241. If i>0 Then
  242. t=Split(s,vblf)
  243. s=""
  244. For k=LBound(t) To UBound(t)
  245. s=s & t(k)
  246. If Len(s)>ZC_TB_EXCERPT_MAX Then Exit For
  247. Next
  248. s=Replace(s,vbCr,vbCrlf)
  249. End If
  250. s=s & ZC_MSG305
  251. End If
  252. s=TransferHTML(s,"[closehtml]")
  253. objArticle.Intro=s
  254. End If
  255. objArticle.Content=Replace(objArticle.Content,vbCrLf,"")
  256. objArticle.Content=Replace(objArticle.Content,vbLf,"")
  257. objArticle.Intro=Replace(objArticle.Intro,vbCrLf,"")
  258. objArticle.Intro=Replace(objArticle.Intro,vbLf,"")
  259. Case "widgeditor"
  260. objArticle.Content=Request.Form("txaContent")
  261. If objArticle.Intro="" Then
  262. s=objArticle.Content
  263. If Len(s)>ZC_TB_EXCERPT_MAX Then
  264. i=InStr(s,vbCrlf)
  265. If i>0 Then
  266. t=Split(s,vblf)
  267. s=""
  268. For k=LBound(t) To UBound(t)
  269. s=s & t(k)
  270. If Len(s)>ZC_TB_EXCERPT_MAX Then Exit For
  271. Next
  272. s=Replace(s,vbCr,vbCrlf)
  273. End If
  274. s=s & ZC_MSG305
  275. End If
  276. s=TransferHTML(s,"[closehtml]")
  277. objArticle.Intro=s
  278. End If
  279. objArticle.Content=Replace(objArticle.Content,vbCrLf,"")
  280. objArticle.Content=Replace(objArticle.Content,vbLf,"")
  281. objArticle.Intro=Replace(objArticle.Intro,vbCrLf,"")
  282. objArticle.Intro=Replace(objArticle.Intro,vbLf,"")
  283. Case Else
  284. objArticle.Content=Request.Form("txaContent")
  285. If objArticle.Intro="" Then
  286. s=objArticle.Content
  287. If Len(s)>ZC_TB_EXCERPT_MAX Then
  288. i=InStr(s,vbCrlf)
  289. If i>0 Then
  290. t=Split(s,vblf)
  291. s=""
  292. For k=LBound(t) To UBound(t)
  293. s=s & t(k)
  294. If Len(s)>ZC_TB_EXCERPT_MAX Then Exit For
  295. Next
  296. s=Replace(s,vbCr,vbCrlf)
  297. End If
  298. s=s & ZC_MSG305
  299. End If
  300. s=TransferHTML(s,"[closehtml]")
  301. objArticle.Intro=s
  302. End If
  303. End Select
  304. '接口
  305. Call Filter_Plugin_PostArticle_Core(objArticle)
  306. If objArticle.Post Then
  307. Call Filter_Plugin_PostArticle_Succeed(objArticle)
  308. Call ScanTagCount(strTag)
  309. Call ScanTagCount(objArticle.Tag)
  310. Call BuildArticle(objArticle.ID,True,True)
  311. PostArticle=True
  312. End If
  313. Set objArticle=Nothing
  314. End Function
  315. '*********************************************************
  316. '*********************************************************
  317. ' 目的:    Del Article
  318. '*********************************************************
  319. Function DelArticle(intID)
  320. Dim strTag
  321. If intID<>"" Then
  322. Dim objTestArticle
  323. Set objTestArticle=New TArticle
  324. If objTestArticle.LoadInfobyID(intID) Then
  325. If Not((objTestArticle.AuthorID=BlogUser.ID) Or (CheckRights("Root")=True)) Then Exit Function
  326. strTag=objTestArticle.Tag
  327. Else
  328. Call ShowError(9)
  329. End If
  330. Set objTestArticle=Nothing
  331. End If
  332. Dim objArticle
  333. Set objArticle=New TArticle
  334. If objArticle.LoadInfoByID(intID) Then
  335. Call ScanTagCount(objArticle.Tag)
  336. If objArticle.Del Then DelArticle=True
  337. Call ScanTagCount(strTag)
  338. If ZC_MOONSOFT_PLUGIN_ENABLE=True Then
  339. Call BuildCategory(Empty,Categorys(objArticle.CateID).ID,Empty,Empty,Empty,ZC_DISPLAY_MODE_ALL,Categorys(objArticle.CateID).Directory,Categorys(objArticle.CateID).FileName)
  340. Call BuildCategory(Empty,Empty,Empty,Year(objArticle.PostTime) & "-" & Month(objArticle.PostTime),Empty,ZC_DISPLAY_MODE_ALL,ZC_STATIC_DIRECTORY,Year(objArticle.PostTime) & "_" & Month(objArticle.PostTime) & "." & ZC_STATIC_TYPE)
  341. End If
  342. Call BlogReBuild_Comments
  343. Dim objNavArticle
  344. Dim objRS
  345. Set objRS=objConn.Execute("SELECT TOP 1 [log_ID] FROM [blog_Article] WHERE ([log_Level]>2) AND ([log_PostTime]<#" & objArticle.PostTime & "#) ORDER BY [log_PostTime] DESC")
  346. If (Not objRS.bof) And (Not objRS.eof) Then
  347. Call BuildArticle(objRS("log_ID"),False,False)
  348. End If
  349. Set objRS=Nothing
  350. Set objRS=objConn.Execute("SELECT TOP 1 [log_ID] FROM [blog_Article] WHERE ([log_Level]>2) AND ([log_PostTime]>#" & objArticle.PostTime & "#) ORDER BY [log_PostTime] ASC")
  351. If (Not objRS.bof) And (Not objRS.eof) Then
  352. Call BuildArticle(objRS("log_ID"),False,False)
  353. End If
  354. Set objRS=Nothing
  355. End If
  356. Set objArticle=Nothing
  357. End Function
  358. '*********************************************************
  359. '/////////////////////////////////////////////////////////////////////////////////////////
  360. '*********************************************************
  361. ' 目的:    Post Category
  362. '*********************************************************
  363. Function PostCategory()
  364. If Request.Form("edtID")<>"0" Then
  365. Dim objTestCategory
  366. Set objTestCategory=New TCategory
  367. If objTestCategory.LoadInfobyID(Request.Form("edtID")) Then
  368. objTestCategory.DelFile
  369. End If
  370. End If
  371. Dim objCategory
  372. Set objCategory=New TCategory
  373. objCategory.ID=Request.Form("edtID")
  374. objCategory.Name=Request.Form("edtName")
  375. objCategory.Order=Request.Form("edtOrder")
  376. objCategory.Alias=Request.Form("edtAlias")
  377. '接口
  378. Call Filter_Plugin_PostCategory_Core(objCategory)
  379. If objCategory.Post Then
  380. Call Filter_Plugin_PostCategory_Succeed(objCategory)
  381. Call BuildCategory(Empty,objCategory.ID,Empty,Empty,Empty,ZC_DISPLAY_MODE_ALL,objCategory.Directory,objCategory.FileName)
  382. PostCategory=True
  383. End If
  384. Set objCategory=Nothing
  385. End Function
  386. '*********************************************************
  387. '*********************************************************
  388. ' 目的:    Del Category
  389. '*********************************************************
  390. Function DelCategory(intID)
  391. Dim objCategory
  392. Set objCategory=New TCategory
  393. If objCategory.LoadInfobyID(intID) Then
  394. If objCategory.Del Then DelCategory=True
  395. End If
  396. Set objCategory=Nothing
  397. End Function
  398. '*********************************************************
  399. '/////////////////////////////////////////////////////////////////////////////////////////
  400. '*********************************************************
  401. ' 目的:    Post Comment
  402. '*********************************************************
  403. Function PostComment(strKey)
  404. If IsEmpty(Request.Form("inpAjax"))=False Then
  405. ShowError_Custom="Call RespondError(id,ZVA_ErrorMsg(id)):Response.End"
  406. End If
  407. If ZC_COMMENT_TURNOFF Then
  408. Call ShowError(40)
  409. End If
  410. If ZC_COMMENT_VERIFY_ENABLE Then
  411. If CheckVerifyNumber(Request.Form("inpVerify"))=False Then Call ShowError(38)
  412. End If
  413. Dim inpID,inpName,inpArticle,inpEmail,inpHomePage
  414. inpID=Request.Form("inpID")
  415. inpName=Request.Form("inpName")
  416. inpArticle=Request.Form("inpArticle")
  417. inpEmail=Request.Form("inpEmail")
  418. inpHomePage=Request.Form("inpHomePage")
  419. If Len(inpArticle)=0 Or Len(inpArticle)>ZC_CONTENT_MAX Then
  420. Call  ShowError(46)
  421. End If
  422. Dim objComment
  423. Dim objArticle
  424. Set objComment=New TComment
  425. objComment.log_ID=inpID
  426. objComment.AuthorID=BlogUser.ID
  427. objComment.Author=inpName
  428. objComment.Content=inpArticle
  429. objComment.Email=inpEmail
  430. objComment.HomePage=inpHomePage
  431. '接口
  432. Call Filter_Plugin_PostComment_Core(objComment)
  433. If objComment.AuthorID>0 Then
  434. objComment.Author=Users(objComment.AuthorID).Name
  435. End If
  436. If objComment.log_ID>0 Then
  437. Set objArticle=New TArticle
  438. If objArticle.LoadInfoByID(objComment.log_ID) Then
  439. If Not (strKey=objArticle.CommentKey) Then Call ShowError(43)
  440. If objArticle.Level<4 Then Call ShowError(44)
  441. End If
  442. Set objArticle=Nothing
  443. Else
  444. If Not (strKey=Left(MD5(ZC_BLOG_HOST & ZC_BLOG_CLSID & CStr(0) & CStr(Day(GetTime(Now())))),8)) Then Call ShowError(43)
  445. End If
  446. Dim objUser
  447. For Each objUser in Users
  448. If IsObject(objUser) Then
  449. If (UCase(objUser.Name)=UCase(objComment.Author)) And (objUser.ID<>objComment.AuthorID) Then Call ShowError(31)
  450. End If
  451. Next
  452. If objComment.Post Then
  453. Call Filter_Plugin_PostComment_Succeed(objComment)
  454. If objComment.log_ID>0 Then
  455. Call BuildArticle(objComment.log_ID,False,True)
  456. BlogReBuild_Comments
  457. Else
  458. BlogReBuild_GuestComments
  459. End If
  460. PostComment=True
  461. End if
  462. If IsEmpty(Request.Form("inpAjax"))=False Then
  463. Call ReturnAjaxComment(objComment)
  464. Call ClearGlobeCache
  465. Call LoadGlobeCache
  466. End If
  467. Set objComment=Nothing
  468. End Function
  469. '*********************************************************
  470. '*********************************************************
  471. ' 目的:    Del Comment
  472. '*********************************************************
  473. Function DelComment(intID,intLog_ID)
  474. Dim objComment
  475. Dim objArticle
  476. Set objComment=New TComment
  477. Set objArticle=New TArticle
  478. If objComment.LoadInfobyID(intID) Then
  479. If objComment.log_ID>0 Then
  480. Dim objTestArticle
  481. Set objTestArticle=New TArticle
  482. If objTestArticle.LoadInfobyID(objComment.log_ID) Then
  483. If Not((objComment.AuthorID=BlogUser.ID) Or (objTestArticle.AuthorID=BlogUser.ID) Or (CheckRights("Root")=True)) Then Exit Function
  484. Else
  485. Call ShowError(9)
  486. End If
  487. Set objTestArticle=Nothing
  488. Else
  489. If Not ((objComment.log_ID=0) And (CheckRights("GuestBookMng")=True)) Then Exit Function
  490. End If
  491. If objComment.Del Then
  492. If objComment.log_ID>0 Then
  493. Call BuildArticle(objComment.log_ID,False,True)
  494. BlogReBuild_Comments
  495. Else
  496. BlogReBuild_GuestComments
  497. End If
  498. DelComment=True
  499. End If
  500. End If
  501. Set objComment=Nothing
  502. End Function
  503. '*********************************************************
  504. '*********************************************************
  505. ' 目的:    Revert Comment
  506. '*********************************************************
  507. Function RevertComment(strKey,intRevertCommentID)
  508. If IsEmpty(Request.Form("inpAjax"))=False Then
  509. ShowError_Custom="Call RespondError(id,ZVA_ErrorMsg(id)):Response.End"
  510. End If
  511. Call CheckParameter(intRevertCommentID,"int",0)
  512. If ZC_COMMENT_TURNOFF Then
  513. Call ShowError(40)
  514. End If
  515. If ZC_COMMENT_VERIFY_ENABLE Then
  516. If CheckVerifyNumber(Request.Form("inpVerify"))=False Then Call ShowError(38)
  517. End If
  518. Dim inpName,inpArticle
  519. inpName=Request.Form("inpName")
  520. inpArticle=Request.Form("inpArticle")
  521. If Len(inpArticle)=0 Or Len(inpArticle)>ZC_CONTENT_MAX Then
  522. Call  ShowError(46)
  523. End If
  524. Dim objComment
  525. Dim objArticle
  526. Set objComment=New TComment
  527. If objComment.LoadInfoByID(intRevertCommentID)=True Then
  528. If BlogUser.ID=0 Then
  529. If ZC_GUEST_REVERT_COMMENT_ENABLE=False Then Call ShowError(47)
  530. Dim objUser
  531. For Each objUser in Users
  532. If IsObject(objUser) Then
  533. If (UCase(objUser.Name)=UCase(inpName)) Then Call ShowError(31)
  534. End If
  535. Next
  536. Else
  537. inpName=BlogUser.Name
  538. End If
  539. objComment.Content=TransferHTML(objComment.Content,"[anti-html-format]") & "[REVERT="& Replace(Replace(ZC_MSG264,"%s",inpName,1,1),"%s",GetTime(Now()),1,1) &"]"&inpArticle&"[/REVERT]"
  540. End If
  541. If objComment.log_ID>0 Then
  542. Set objArticle=New TArticle
  543. If objArticle.LoadInfoByID(objComment.log_ID) Then
  544. If Not (strKey=objArticle.CommentKey) Then Call ShowError(43)
  545. If objArticle.Level<4 Then Call ShowError(44)
  546. Else
  547. Call ShowError(9)
  548. End If
  549. Set objArticle=Nothing
  550. 'objComment.PostTime=GetTime(Now())
  551. Else
  552. 'If BlogUser.ID=0 Then Call ShowError(45)
  553. If Not (strKey=Left(MD5(ZC_BLOG_HOST & ZC_BLOG_CLSID & CStr(0) & CStr(Day(GetTime(Now())))),8)) Then Call ShowError(43)
  554. End If
  555. '接口
  556. Call Filter_Plugin_PostComment_Core(objComment)
  557. If objComment.Post Then
  558. Call Filter_Plugin_PostComment_Succeed(objComment)
  559. If objComment.log_ID>0 Then
  560. Call BuildArticle(objComment.log_ID,False,False)
  561. BlogReBuild_Comments
  562. Else
  563. BlogReBuild_GuestComments
  564. End If
  565. RevertComment=True
  566. End if
  567. If IsEmpty(Request.Form("inpAjax"))=False Then
  568. Call ReturnAjaxComment(objComment)
  569. Call ClearGlobeCache
  570. Call LoadGlobeCache
  571. End If
  572. Set objComment=Nothing
  573. End Function
  574. '*********************************************************
  575. '*********************************************************
  576. ' 目的:    Save Comment
  577. '*********************************************************
  578. Function SaveComment(intID,intLog_ID)
  579. Dim objComment
  580. Dim objArticle
  581. Set objComment=New TComment
  582. If objComment.LoadInfoByID(intID)=True Then
  583. objComment.log_ID=intLog_ID
  584. objComment.Author=Request.Form("inpName")
  585. objComment.Email=Request.Form("inpEmail")
  586. objComment.HomePage=Request.Form("inpHomePage")
  587. objComment.Content=Request.Form("txaArticle") & vbCrlf  & Replace(Replace(ZC_MSG273,"%s",BlogUser.Name,1,1),"%s",GetTime(Now()),1,1)
  588. End If
  589. If objComment.log_ID>0 Then
  590. Set objArticle=New TArticle
  591. If objArticle.LoadInfoByID(objComment.log_ID) Then
  592. If Not ((objArticle.AuthorID=BlogUser.ID) Or (objComment.AuthorID=BlogUser.ID) Or (CheckRights("Root")=True)) Then Exit Function
  593. End If
  594. Set objArticle=Nothing
  595. Else
  596. If Not ((objComment.log_ID=0) And (CheckRights("GuestBookMng")=True)) Then Exit Function
  597. End If
  598. If objComment.Post Then
  599. Call Filter_Plugin_PostComment_Succeed(objComment)
  600. If objComment.log_ID>0 Then
  601. Call BuildArticle(objComment.log_ID,False,False)
  602. BlogReBuild_Comments
  603. Else
  604. BlogReBuild_GuestComments
  605. End If
  606. SaveComment=True
  607. End if
  608. Set objComment=Nothing
  609. End Function
  610. '*********************************************************
  611. '*********************************************************
  612. ' 目的:    Return Ajax Comment
  613. '*********************************************************
  614. Dim ReturnAjaxComment_aryTemplateTagsName
  615. Dim ReturnAjaxComment_aryTemplateTagsValue
  616. Function ReturnAjaxComment_Plugin(aryTemplateTagsName,aryTemplateTagsValue)
  617. ReturnAjaxComment_aryTemplateTagsName=aryTemplateTagsName
  618. ReturnAjaxComment_aryTemplateTagsValue=aryTemplateTagsValue
  619. End Function
  620. Function ReturnAjaxComment(objComment)
  621. Dim i,j
  622. i=0
  623. Dim objArticle
  624. If objComment.log_ID>0 Then
  625. 'Filter_Plugin_TArticle_Export_TemplateTags
  626. Call Add_Filter_Plugin("Filter_Plugin_TArticle_Export_TemplateTags","ReturnAjaxComment_Plugin")
  627. Set objArticle=New TArticle
  628. If objArticle.LoadInfoByID(objComment.log_ID) Then
  629. Call objArticle.Export(ZC_DISPLAY_MODE_ALL)
  630. i=objArticle.CommNums
  631. End If
  632. Else
  633. 'Filter_Plugin_TGuestBook_Export_TemplateTags
  634. Call Add_Filter_Plugin("Filter_Plugin_TGuestBook_Export_TemplateTags","ReturnAjaxComment_Plugin")
  635. Dim GuestBook
  636. Set GuestBook=New TGuestBook
  637. Call GuestBook.Export("")
  638. Dim objRS
  639. Set objRS=Server.CreateObject("ADODB.Recordset")
  640. objRS.CursorType = adOpenKeyset
  641. objRS.LockType = adLockReadOnly
  642. objRS.ActiveConnection=objConn
  643. objRS.Source=""
  644. objRS.Open("SELECT COUNT([comm_ID])AS allComment FROM [blog_Comment] WHERE [blog_Comment].[log_ID]=0")
  645. If (Not objRS.bof) And (Not objRS.eof) Then
  646. i=objRS("allComment")
  647. End If
  648. objRS.Close
  649. Set objRS=Nothing
  650. End If
  651. Dim strC
  652. strC=GetTemplate("TEMPLATE_B_ARTICLE_COMMENT")
  653. objComment.Count=i
  654. strC=objComment.MakeTemplate(strC)
  655. strC=Replace(strC,"<#ZC_BLOG_HOST#>",ZC_BLOG_HOST)
  656. Dim aryTemplateTagsName2
  657. Dim aryTemplateTagsValue2
  658. aryTemplateTagsName2=TemplateTagsName
  659. aryTemplateTagsValue2=TemplateTagsValue
  660. j=UBound(aryTemplateTagsName2)
  661. For i=1 to j
  662. strC=Replace(strC,"<#" & aryTemplateTagsName2(i) & "#>",aryTemplateTagsValue2(i))
  663. Next
  664. j=UBound(ReturnAjaxComment_aryTemplateTagsName)
  665. For i=1 to j
  666. strC = Replace(strC,"<#" & ReturnAjaxComment_aryTemplateTagsName(i) & "#>", ReturnAjaxComment_aryTemplateTagsValue(i))
  667. Next
  668. strC= Replace(strC,vbCrLf,"")
  669. strC= Replace(strC,vbLf,"")
  670. strC= Replace(strC,vbTab,"")
  671. Response.Write strC
  672. ReturnAjaxComment=True
  673. End Function
  674. '*********************************************************
  675. '/////////////////////////////////////////////////////////////////////////////////////////
  676. '*********************************************************
  677. ' 目的:    Post TrackBack
  678. '*********************************************************
  679. Function PostTrackBack(intID,strKey)
  680. Dim objTrackBack
  681. Dim objArticle
  682. Dim keys
  683. Dim i,j,k,b
  684. If ZC_TRACKBACK_TURNOFF Then
  685. Call RespondError(41,ZVA_ErrorMsg(41))
  686. End If
  687. If Len(strKey)=5 Then
  688. If CheckVerifyNumber(strKey)=False Then Call ShowError(43)
  689. ElseIf Len(strKey)=8 Then
  690. Set objArticle=New TArticle
  691. If objArticle.LoadInfoByID(intID) Then
  692. If Not (strKey=objArticle.TrackBackKey) Then Call RespondError(43)
  693. If objArticle.Level<4 Then Call RespondError(44)
  694. End If
  695. Set objArticle=Nothing
  696. Else
  697. Exit Function
  698. End If
  699. Set objTrackBack=New TTrackBack
  700. Set objArticle=New TArticle
  701. objTrackBack.log_ID=intID
  702. objTrackBack.URL=Request.Form("url")
  703. objTrackBack.Title=Request.Form("title")
  704. objTrackBack.Blog=Request.Form("blog_name")
  705. objTrackBack.Excerpt=Request.Form("excerpt")
  706. '接口
  707. Call Filter_Plugin_PostTrackBack_Core(objTrackBack)
  708. If objTrackBack.Post Then
  709. Call Filter_Plugin_PostTrackBack_Succeed(objTrackBack)
  710. Call BuildArticle(objTrackBack.log_ID,False,True)
  711. BlogReBuild_TrackBacks
  712. PostTrackBack=True
  713. End If
  714. Response.ContentType = "text/xml"
  715. Response.Clear
  716. Response.Write objTrackBack.TbXML
  717. Set objTrackBack=Nothing
  718. End Function
  719. '*********************************************************
  720. '*********************************************************
  721. ' 目的:    Del TrackBack
  722. '*********************************************************
  723. Function DelTrackBack(intID,intLog_ID)
  724. Dim objTrackBack
  725. Dim objArticle
  726. Set objTrackBack=New TTrackBack
  727. Set objArticle=New TArticle
  728. If objTrackBack.LoadInfobyID(intID) Then
  729. Dim objTestArticle
  730. Set objTestArticle=New TArticle
  731. If objTestArticle.LoadInfobyID(objTrackBack.log_ID) Then
  732. If Not((objTestArticle.AuthorID=BlogUser.ID) Or (CheckRights("Root")=True)) Then Exit Function
  733. Else
  734. Call ShowError(9)
  735. End If
  736. Set objTestArticle=Nothing
  737. If objTrackBack.Del Then
  738. Call BuildArticle(objTrackBack.log_ID,False,True)
  739. BlogReBuild_TrackBacks
  740. DelTrackBack=True
  741. End If
  742. End If
  743. Set objTrackBack=Nothing
  744. End Function
  745. '*********************************************************
  746. '*********************************************************
  747. ' 目的:    Send TrackBack
  748. '*********************************************************
  749. Function SendTrackBack()
  750. Dim objTrackBack
  751. Dim objArticle
  752. Set objTrackBack=New TTrackBack
  753. Set objArticle=New TArticle
  754. If objArticle.LoadInfobyID(Request.Form("edtID")) Then
  755. objTrackBack.URL=objArticle.Url
  756. objTrackBack.Title=objArticle.Title
  757. objTrackBack.Blog=ZC_BLOG_NAME
  758. objTrackBack.Excerpt=Left(objArticle.HtmlContent,250)
  759. Else
  760. Call ShowError(9)
  761. End If
  762. If objTrackBack.Send(Request.Form("edtTrackBack")) Then SendTrackBack=True
  763. Set objTrackBack=Nothing
  764. End Function
  765. '*********************************************************
  766. '/////////////////////////////////////////////////////////////////////////////////////////
  767. '*********************************************************
  768. ' 目的:    Edit User
  769. '*********************************************************
  770. Function EditUser()
  771. Dim objUser
  772. Set objUser=New TUser
  773. objUser.ID=Request.Form("edtID")
  774. objUser.Level=Request.Form("edtLevel")
  775. objUser.Name=Request.Form("edtName")
  776. objUser.PassWord=Request.Form("edtPassWord")
  777. objUser.Email=Request.Form("edtEmail")
  778. objUser.HomePage=Request.Form("edtHomePage")
  779. objUser.Alias=Request.Form("edtAlias")
  780. If Not((CInt(objUser.ID)=BlogUser.ID) Or (CheckRights("Root")=True)) Then Exit Function
  781. '接口
  782. Call Filter_Plugin_EditUser_Core(objUser)
  783. If objUser.Edit(BlogUser) Then 
  784. Call Filter_Plugin_EditUser_Succeed(objUser)
  785. EditUser=True
  786. End IF
  787. Set objUser=Nothing
  788. End Function
  789. '*********************************************************
  790. '*********************************************************
  791. ' 目的:    Del User
  792. '*********************************************************
  793. Function DelUser(intID)
  794. Dim objRS
  795. Dim objUser
  796. Dim objUpLoadFile
  797. Set objUser=New TUser
  798. objUser.ID=intID
  799. If objUser.Del(BlogUser) Then DelUser=True
  800. Set objUser=Nothing
  801. End Function
  802. '*********************************************************
  803. '/////////////////////////////////////////////////////////////////////////////////////////
  804. '*********************************************************
  805. ' 目的:    Blog ReBuild
  806. '*********************************************************
  807. Function MakeBlogReBuild()
  808. 'plugin node
  809. For Each sAction_Plugin_MakeBlogReBuild_Begin in Action_Plugin_MakeBlogReBuild_Begin
  810. If Not IsEmpty(sAction_Plugin_MakeBlogReBuild_Begin) Then Call Execute(sAction_Plugin_MakeBlogReBuild_Begin)
  811. If bAction_Plugin_MakeBlogReBuild_Begin=True Then Exit Function
  812. Next
  813. Call MakeBlogReBuild_Core()
  814. Call SetBlogHint(True,False,Empty)
  815. Response.Write "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" /><link rel=""stylesheet"" rev=""stylesheet"" href=""CSS/admin.css"" type=""text/css"" media=""screen"" /></head><body>"
  816. Response.Write "<div id=""divMain""><div class=""Header"">" & ZC_MSG072 & "</div>"
  817. Response.Write "<div id=""divMain2"">"
  818. Call GetBlogHint()
  819. Response.Write "<form  name=""edit"" id=""edit"">"
  820. Response.Write "<p>" & ZC_MSG225 &"</p>"
  821. Response.Write "<p>" & Replace(ZC_MSG169,"%n",RunTime/1000)&"</p>"
  822. Response.Write "</form></div></div>"
  823. Response.Write "</body></html>"
  824. MakeBlogReBuild=True
  825. 'plugin node
  826. For Each sAction_Plugin_MakeBlogReBuild_End in Action_Plugin_MakeBlogReBuild_End
  827. If Not IsEmpty(sAction_Plugin_MakeBlogReBuild_End) Then Call Execute(sAction_Plugin_MakeBlogReBuild_End)
  828. If bAction_Plugin_MakeBlogReBuild_End=True Then Exit Function
  829. Next
  830. End Function
  831. '*********************************************************
  832. '*********************************************************
  833. ' 目的:    MakeDirectoryReBuild
  834. '*********************************************************
  835. Function MakeDirectoryReBuild()
  836. Dim objRS
  837. Dim objStream
  838. Dim ArtList
  839. 'Catalogs
  840. Dim strCatalog
  841. Set objRS=objConn.Execute("SELECT * FROM [blog_Category] ORDER BY [cate_Order] ASC,[cate_Count] DESC,[cate_ID] ASC")
  842. If (Not objRS.bof) And (Not objRS.eof) Then
  843. Do While Not objRS.eof
  844. strCatalog=strCatalog & "<li><span class=""feed-icon""><a href="""& Categorys(objRS("cate_ID")).RssUrl &""" target=""_blank""><img title=""rss"" width=""20"" height=""12"" src="""&ZC_BLOG_HOST&"IMAGE/LOGO/rss.png"" border=""0"" alt=""rss"" /></a>&nbsp;</span><a href="""& Categorys(objRS("cate_ID")).Url & """>"+Categorys(objRS("cate_ID")).Name + "<span class=""article-nums""> (" & Categorys(objRS("cate_ID")).Count & ")</span>" +"</a></li>"
  845. If ZC_MOONSOFT_PLUGIN_ENABLE=True Then
  846. Call BuildCategory(Empty,Categorys(objRS("cate_ID")).ID,Empty,Empty,Empty,ZC_DISPLAY_MODE_ALL,Categorys(objRS("cate_ID")).Directory,Categorys(objRS("cate_ID")).FileName)
  847. End If
  848. objRS.MoveNext
  849. Loop
  850. End If
  851. objRS.Close
  852. Set objRS=Nothing
  853. Dim i
  854. Dim j
  855. Dim l
  856. Dim n
  857. 'Archives
  858. Dim strArchives
  859. Set objRS=objConn.Execute("SELECT * FROM [blog_Article] WHERE ([log_Level]>1) ORDER BY [log_PostTime] DESC")
  860. If (Not objRS.bof) And (Not objRS.eof) Then
  861. Dim dtmYM()
  862. i=0
  863. j=0
  864. ReDim Preserve dtmYM(0)
  865. Do While Not objRS.eof
  866. j=UBound(dtmYM)
  867. i=Year(objRS("log_PostTime")) & "-" & Month(objRS("log_PostTime"))
  868. If i<>dtmYM(j) Then
  869. ReDim Preserve dtmYM(j+1)
  870. dtmYM(j+1)=i
  871. End If
  872. objRS.MoveNext
  873. Loop
  874. End If
  875. objRS.Close
  876. Set objRS=Nothing
  877. If Not IsEmpty(dtmYM) Then
  878. For i=1 to UBound(dtmYM)
  879. l=Year(dtmYM(i))
  880. n=Month(dtmYM(i))+1
  881. IF n>12 Then l=l+1:n=1
  882. Set objRS=objConn.Execute("SELECT COUNT([log_ID]) FROM [blog_Article] WHERE ([log_Level]>1) AND [log_PostTime] BETWEEN #"& Year(dtmYM(i)) &"-"& Month(dtmYM(i)) &"-1# AND #"& l &"-"& n &"-1#")
  883. If (Not objRS.bof) And (Not objRS.eof) Then
  884. If ZC_MOONSOFT_PLUGIN_ENABLE=True Then
  885. strArchives=strArchives & "<li><a href="""& ZC_BLOG_HOST & ZC_STATIC_DIRECTORY & "/" & Year(dtmYM(i)) & "_" & Month(dtmYM(i)) & "." & ZC_STATIC_TYPE & """>" & Year(dtmYM(i)) & " " & ZVA_Month(Month(dtmYM(i))) & " (" & objRS(0) & ")" +"</a></li>"
  886. Call BuildCategory(Empty,Empty,Empty,Year(dtmYM(i)) & "-" & Month(dtmYM(i)),Empty,ZC_DISPLAY_MODE_ALL,ZC_STATIC_DIRECTORY,Year(dtmYM(i)) & "_" & Month(dtmYM(i))& "." & ZC_STATIC_TYPE)
  887. Else
  888. strArchives=strArchives & "<li><a href="""& ZC_BLOG_HOST &"catalog.asp?date=" & Year(dtmYM(i)) & "-" & Month(dtmYM(i)) & """>" & Year(dtmYM(i)) & " " & ZVA_Month(Month(dtmYM(i))) & "<span class=""article-nums""> (" & objRS(0) & ")</span>" +"</a></li>"
  889. End If
  890. If ZC_ARCHIVE_COUNT>0 Then
  891. If i=ZC_ARCHIVE_COUNT Then Exit For
  892. End If
  893. End If
  894. objRS.Close
  895. Set objRS=Nothing
  896. Next
  897. End If
  898. MakeDirectoryReBuild=True
  899. End Function
  900. '*********************************************************
  901. '*********************************************************
  902. ' 目的:    All Files ReBuild
  903. '*********************************************************
  904. Function MakeFileReBuild()
  905. On Error Resume Next
  906. 'plugin node
  907. For Each sAction_Plugin_MakeFileReBuild_Begin in Action_Plugin_MakeFileReBuild_Begin
  908. If Not IsEmpty(sAction_Plugin_MakeFileReBuild_Begin) Then Call Execute(sAction_Plugin_MakeFileReBuild_Begin)
  909. If bAction_Plugin_MakeFileReBuild_Begin=True Then Exit Function
  910. Next
  911. Dim intPage
  912. Dim intAllTime
  913. intPage=CInt(Request.QueryString("page"))
  914. intAllTime=CLng(Request.QueryString("all"))
  915. If intPage=0 Then
  916. Call MakeBlogReBuild_Core()
  917. intPage=1
  918. Response.Redirect ZC_BLOG_HOST&"cmd.asp?act=FileReBuild&page="&intPage&"&all="&intAllTime
  919. End If
  920. Dim i,j
  921. Dim objRS
  922. Dim objArticle
  923. Set objRS=Server.CreateObject("ADODB.Recordset")
  924. objRS.CursorType = adOpenKeyset
  925. objRS.LockType = adLockReadOnly
  926. objRS.ActiveConnection=objConn
  927. objRS.Source="SELECT [log_ID] FROM [blog_Article] WHERE [log_Level]>1"
  928. objRS.Open()
  929. If (Not objRS.bof) And (Not objRS.eof) Then
  930. objRS.PageSize = ZC_REBUILD_FILE_COUNT
  931. If intPage>objRS.PageCount Then
  932. Call SetBlogHint(True,Empty,False)
  933. Response.Write "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" /><link rel=""stylesheet"" rev=""stylesheet"" href=""CSS/admin.css"" type=""text/css"" media=""screen"" /></head><body>"
  934. Response.Write "<div id=""divMain""><div class=""Header"">" & ZC_MSG073 & "</div>"
  935. Response.Write "<div id=""divMain2"">"
  936. Call GetBlogHint()
  937. Response.Write "<form  name=""edit"" id=""edit"">"
  938. Response.Write "<p>" & ZC_MSG225 &"</p>"
  939. Response.Write "<p>" & Replace(ZC_MSG169,"%n",intAllTime/1000)&"</p>"
  940. Response.Write "</form></div></div>"
  941. Response.Write "</body></html>"
  942. MakeFileReBuild=True
  943. 'plugin node
  944. For Each sAction_Plugin_MakeFileReBuild_End in Action_Plugin_MakeFileReBuild_End
  945. If Not IsEmpty(sAction_Plugin_MakeFileReBuild_End) Then Call Execute(sAction_Plugin_MakeFileReBuild_End)
  946. If bAction_Plugin_MakeFileReBuild_End=True Then Exit Function
  947. Next
  948. Exit Function
  949. End If
  950. objRS.AbsolutePage = intPage
  951. For i = 1 To ZC_REBUILD_FILE_COUNT
  952. Call BuildArticle(objRS("log_ID"),False,False)
  953. objRS.MoveNext
  954. If objRS.eof Then Exit For
  955. Next
  956. intAllTime=CLng(intAllTime)+RunTime
  957. Response.Write "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8""/><meta http-equiv=""Content-Language"" content=""zh-cn"" /><meta http-equiv=""refresh"" content="""&ZC_REBUILD_FILE_INTERVAL&";URL=cmd.asp?act=FileReBuild&page="&intPage+1&"&all="&intAllTime&"""/><link rel=""stylesheet"" rev=""stylesheet"" href=""CSS/admin.css"" type=""text/css"" media=""screen"" /><title>"&ZC_MSG073&"</title></head><body>"
  958. Response.Write "<div id=""divMain""><div class=""Header"">" & ZC_MSG073 & "</div>"
  959. Response.Write "<div id=""divMain2"">"
  960. Response.Write "<form  name=""edit"" id=""edit"">"
  961. For j=1 To intPage
  962. Response.Write "<p>" &Replace(ZC_MSG227,"%n",j)&"</p>"
  963. Next
  964. Response.Write "<p>" &Replace(ZC_MSG152,"%n",ZC_REBUILD_FILE_INTERVAL)&"</p>"
  965. Response.Write "</form></div></div>"
  966. Response.Write "</body></html>"
  967. Else
  968. Call SetBlogHint(True,Empty,False)
  969. Response.Redirect "admin/admin.asp?act=AskFileReBuild"
  970. End If
  971. Err.Clear
  972. End Function
  973. '*********************************************************
  974. '/////////////////////////////////////////////////////////////////////////////////////////
  975. '*********************************************************
  976. ' 目的:    List User Rights
  977. '*********************************************************
  978. Function ListUser_Rights()
  979. Dim s
  980. Dim i
  981. Dim strAction
  982. Dim aryAction
  983. strAction="login|verify|logout|admin|cmt|tb|vrs|BlogReBuild|FileReBuild|ArticleMng|ArticleEdt|ArticlePst|ArticleDel|CategoryMng|CategoryPst|CategoryDel|CommentMng|CommentDel|CommentRev|TrackBackMng|TrackBackDel|TrackBackSnd|UserMng|UserEdt|UserCrt|UserDel|FileMng|FileUpload|FileDel|Search|TagMng|TagEdt|TagPst|TagDel|SettingMng|SettingSav|PlugInMng|rss|SiteFileMng|SiteFileEdt|SiteFilePst|SiteFileDel|Root"
  984. aryAction=Split(strAction, "|")
  985. s=ZC_MSG019
  986. Response.Write "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8""/><meta http-equiv=""Content-Language"" content=""zh-cn"" /><link rel=""stylesheet"" rev=""stylesheet"" href=""CSS/admin.css"" type=""text/css"" media=""screen"" /><title>"&ZC_MSG021&"</title></head><body>"
  987. Response.Write "<div id=""divMain""><div class=""Header"">" & ZC_MSG021 & "</div>"
  988. Response.Write "<div id=""divMain2""><form  name=""edit"" id=""edit""><P>"
  989. Response.Write ZC_MSG001 & ":" & BLogUser.Name & "<br/><br/>"
  990. Response.Write ZC_MSG249 & ":" & ZVA_User_Level_Name(BLogUser.Level) & "<br/><br/>"
  991. For i=LBound(aryAction) To UBound(aryAction)
  992. If Not CheckRights(aryAction(i)) Then s=Replace(s,"%s",":<font color=Red>fail</font>"&"<br/><br/>",1,1) Else s=Replace(s,"%s",":<font color=green>ok</font>"&"<br/><br/>",1,1)
  993. Next
  994. Response.Write s
  995. Response.Write "</p></form></div></div>"
  996. Response.Write "</body></html>"
  997. ListUser_Rights=True
  998. End Function
  999. '*********************************************************
  1000. '/////////////////////////////////////////////////////////////////////////////////////////
  1001. '*********************************************************
  1002. ' 目的:    Save Blog Setting
  1003. '*********************************************************
  1004. Function SaveSetting()
  1005. On Error Resume Next
  1006. Dim i,j
  1007. Dim s,t
  1008. Dim strContent
  1009. strContent=LoadFromFile(BlogPath & "/c_custom.asp","utf-8")
  1010. Dim strZC_BLOG_HOST
  1011. Dim strZC_BLOG_TITLE
  1012. Dim strZC_BLOG_SUBTITLE
  1013. Dim strZC_BLOG_NAME
  1014. Dim strZC_BLOG_SUB_NAME
  1015. Dim strZC_BLOG_CSS
  1016. Dim strZC_BLOG_THEME
  1017. Dim strZC_BLOG_COPYRIGHT
  1018. Dim strZC_BLOG_MASTER
  1019. strZC_BLOG_HOST=Request.Form("edtZC_BLOG_HOST")
  1020. If Right(strZC_BLOG_HOST,1)<>"/" Then strZC_BLOG_HOST=strZC_BLOG_HOST & "/"
  1021. If Left(strZC_BLOG_HOST,8)<>"https://" Then
  1022. If Left(strZC_BLOG_HOST,7)<>"http://" Then strZC_BLOG_HOST="http://" & strZC_BLOG_HOST
  1023. End If
  1024. strZC_BLOG_TITLE=Request.Form("edtZC_BLOG_TITLE")
  1025. strZC_BLOG_SUBTITLE=Request.Form("edtZC_BLOG_SUBTITLE")
  1026. strZC_BLOG_NAME=Request.Form("edtZC_BLOG_NAME")
  1027. strZC_BLOG_SUB_NAME=Request.Form("edtZC_BLOG_SUB_NAME")
  1028. strZC_BLOG_CSS=Request.Form("edtZC_BLOG_CSS")
  1029. strZC_BLOG_THEME=Request.Form("edtZC_BLOG_THEME")
  1030. strZC_BLOG_COPYRIGHT=Replace(Replace(Request.Form("edtZC_BLOG_COPYRIGHT"),vbCr,""),vbLf,"")
  1031. strZC_BLOG_MASTER=Request.Form("edtZC_BLOG_MASTER")
  1032. Call ScanPluginToThemeFile(strZC_BLOG_CSS,strZC_BLOG_THEME)
  1033. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_HOST",strZC_BLOG_HOST)
  1034. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_TITLE",strZC_BLOG_TITLE)
  1035. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_SUBTITLE",strZC_BLOG_SUBTITLE)
  1036. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_NAME",strZC_BLOG_NAME)
  1037. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_SUB_NAME",strZC_BLOG_SUB_NAME)
  1038. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_CSS",strZC_BLOG_CSS)
  1039. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_THEME",strZC_BLOG_THEME)
  1040. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_COPYRIGHT",strZC_BLOG_COPYRIGHT)
  1041. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_MASTER",strZC_BLOG_MASTER)
  1042. If UCase(strZC_BLOG_HOST)<>UCase("""" & CStr(ZC_BLOG_HOST) & """") Then Call SetBlogHint(Empty,Empty,True)
  1043. If UCase(strZC_BLOG_TITLE)<>UCase("""" & CStr(ZC_BLOG_TITLE) & """") Then Call SetBlogHint(Empty,Empty,True)
  1044. If UCase(strZC_BLOG_SUBTITLE)<>UCase("""" & CStr(ZC_BLOG_SUBTITLE) & """") Then Call SetBlogHint(Empty,Empty,Empty)
  1045. If UCase(strZC_BLOG_NAME)<>UCase("""" & CStr(ZC_BLOG_NAME) & """") Then Call SetBlogHint(Empty,Empty,True)
  1046. If UCase(strZC_BLOG_SUB_NAME)<>UCase("""" & CStr(ZC_BLOG_SUB_NAME) & """") Then Call SetBlogHint(Empty,Empty,True)
  1047. If UCase(strZC_BLOG_CSS)<>UCase("""" & CStr(ZC_BLOG_CSS) & """") Then Call SetBlogHint(Empty,True,Empty)
  1048. If UCase(strZC_BLOG_THEME)<>UCase("""" & CStr(ZC_BLOG_THEME) & """") Then Call SetBlogHint(Empty,True,True)
  1049. If UCase(strZC_BLOG_COPYRIGHT)<>UCase("""" & CStr(ZC_BLOG_COPYRIGHT) & """") Then Call SetBlogHint(Empty,Empty,True)
  1050. If UCase(strZC_BLOG_MASTER)<>UCase("""" & CStr(ZC_BLOG_MASTER) & """") Then Call SetBlogHint(Empty,True,Empty)
  1051. Call SaveToFile(BlogPath & "/c_custom.asp",strContent,"utf-8",False)
  1052. strContent=LoadFromFile(BlogPath & "/c_option.asp","utf-8")
  1053. Dim strZC_BLOG_CLSID
  1054. strZC_BLOG_CLSID=Request.Form("edtZC_BLOG_CLSID")
  1055. If CheckRegExp(strZC_BLOG_CLSID,"[guid]") Then
  1056. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_CLSID",strZC_BLOG_CLSID)
  1057. If UCase(strZC_BLOG_CLSID)<>UCase("""" & CStr(ZC_BLOG_CLSID) & """") Then Call SetBlogHintWithCLSID(True,True,True,Replace(strZC_BLOG_CLSID,"""",""))
  1058. End If
  1059. Dim strZC_TIME_ZONE
  1060. strZC_TIME_ZONE=Request.Form("edtZC_TIME_ZONE")
  1061. Call SaveValueForSetting(strContent,True,"String","ZC_TIME_ZONE",strZC_TIME_ZONE)
  1062. If UCase(strZC_TIME_ZONE)<>UCase("""" & CStr(ZC_TIME_ZONE) & """") Then Call SetBlogHint(Empty,Empty,True)
  1063. Dim strZC_HOST_TIME_ZONE
  1064. strZC_HOST_TIME_ZONE=Request.Form("edtZC_HOST_TIME_ZONE")
  1065. Call SaveValueForSetting(strContent,True,"String","ZC_HOST_TIME_ZONE",strZC_HOST_TIME_ZONE)
  1066. If UCase(strZC_HOST_TIME_ZONE)<>UCase("""" & CStr(ZC_HOST_TIME_ZONE) & """") Then Call SetBlogHint(Empty,Empty,True)
  1067. Dim strZC_BLOG_LANGUAGE
  1068. strZC_BLOG_LANGUAGE=Request.Form("edtZC_BLOG_LANGUAGE")
  1069. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_LANGUAGE",strZC_BLOG_LANGUAGE)
  1070. If UCase(strZC_BLOG_LANGUAGE)<>UCase("""" & CStr(ZC_BLOG_LANGUAGE) & """") Then Call SetBlogHint(Empty,Empty,True)
  1071. Dim strZC_UPDATE_INFO_URL
  1072. strZC_UPDATE_INFO_URL=Request.Form("edtZC_UPDATE_INFO_URL")
  1073. If (Not CheckRegExp(strZC_UPDATE_INFO_URL,"[homepage]")) And (strZC_UPDATE_INFO_URL<>"") Then strZC_UPDATE_INFO_URL="http://update.rainbowsoft.org/info/"
  1074. Call SaveValueForSetting(strContent,True,"String","ZC_UPDATE_INFO_URL",strZC_UPDATE_INFO_URL)
  1075. If UCase(strZC_UPDATE_INFO_URL)<>UCase("""" & CStr(ZC_UPDATE_INFO_URL) & """") Then Call SetBlogHint(Empty,Empty,Empty)
  1076. Dim strZC_STATIC_TYPE
  1077. strZC_STATIC_TYPE=Request.Form("edtZC_STATIC_TYPE")
  1078. Call SaveValueForSetting(strContent,True,"String","ZC_STATIC_TYPE",strZC_STATIC_TYPE)
  1079. If UCase(strZC_STATIC_TYPE)<>UCase("""" & CStr(ZC_STATIC_TYPE) & """") Then Call SetBlogHint(Empty,Empty,True)
  1080. Dim strZC_STATIC_DIRECTORY
  1081. strZC_STATIC_DIRECTORY=Request.Form("edtZC_STATIC_DIRECTORY")
  1082. Call SaveValueForSetting(strContent,True,"String","ZC_STATIC_DIRECTORY",strZC_STATIC_DIRECTORY)
  1083. If UCase(strZC_STATIC_DIRECTORY)<>UCase("""" & CStr(ZC_STATIC_DIRECTORY) & """") Then Call SetBlogHint(Empty,Empty,True)
  1084. Dim strZC_BLOG_VERSION
  1085. strZC_BLOG_VERSION=Request.Form("edtZC_BLOG_VERSION")
  1086. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_VERSION",strZC_BLOG_VERSION)
  1087. If UCase(strZC_BLOG_VERSION)<>UCase("""" & CStr(ZC_BLOG_VERSION) & """") Then Call SetBlogHint(Empty,Empty,True)
  1088. Dim strZC_BLOG_WEBEDIT
  1089. strZC_BLOG_WEBEDIT=Request.Form("edtZC_BLOG_WEBEDIT")
  1090. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_WEBEDIT",strZC_BLOG_WEBEDIT)
  1091. If UCase(strZC_BLOG_WEBEDIT)<>UCase("""" & CStr(ZC_BLOG_WEBEDIT) & """") Then Call SetBlogHint(Empty,Empty,Empty)
  1092. Dim strZC_REBUILD_FILE_COUNT
  1093. strZC_REBUILD_FILE_COUNT=Request.Form("edtZC_REBUILD_FILE_COUNT")
  1094. Call SaveValueForSetting(strContent,True,"Numeric","ZC_REBUILD_FILE_COUNT",strZC_REBUILD_FILE_COUNT)
  1095. If UCase(strZC_REBUILD_FILE_COUNT)<>UCase(CStr(ZC_REBUILD_FILE_COUNT)) Then Call SetBlogHint(Empty,Empty,Empty)
  1096. Dim strZC_REBUILD_FILE_INTERVAL
  1097. strZC_REBUILD_FILE_INTERVAL=Request.Form("edtZC_REBUILD_FILE_INTERVAL")
  1098. Call SaveValueForSetting(strContent,True,"Numeric","ZC_REBUILD_FILE_INTERVAL",strZC_REBUILD_FILE_INTERVAL)
  1099. If UCase(strZC_REBUILD_FILE_INTERVAL)<>UCase(CStr(ZC_REBUILD_FILE_INTERVAL)) Then Call SetBlogHint(Empty,Empty,Empty)
  1100. Dim strZC_UPLOAD_FILETYPE
  1101. strZC_UPLOAD_FILETYPE=Request.Form("edtZC_UPLOAD_FILETYPE")
  1102. Call SaveValueForSetting(strContent,True,"String","ZC_UPLOAD_FILETYPE",strZC_UPLOAD_FILETYPE)
  1103. If UCase(strZC_UPLOAD_FILETYPE)<>UCase("""" & CStr(ZC_UPLOAD_FILETYPE) & """") Then Call SetBlogHint(Empty,Empty,Empty)
  1104. Dim strZC_UPLOAD_FILESIZE
  1105. strZC_UPLOAD_FILESIZE=Request.Form("edtZC_UPLOAD_FILESIZE")
  1106. Call SaveValueForSetting(strContent,True,"Numeric","ZC_UPLOAD_FILESIZE",strZC_UPLOAD_FILESIZE)
  1107. If UCase(strZC_UPLOAD_FILESIZE)<>UCase(CStr(ZC_UPLOAD_FILESIZE)) Then Call SetBlogHint(Empty,Empty,Empty)
  1108. Dim strZC_COMMENT_VERIFY_ENABLE
  1109. strZC_COMMENT_VERIFY_ENABLE=Request.Form("edtZC_COMMENT_VERIFY_ENABLE")
  1110. Call SaveValueForSetting(strContent,True,"Boolean","ZC_COMMENT_VERIFY_ENABLE",strZC_COMMENT_VERIFY_ENABLE)
  1111. If UCase(strZC_COMMENT_VERIFY_ENABLE)<>UCase(CStr(ZC_COMMENT_VERIFY_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1112. Dim strZC_MSG_COUNT
  1113. strZC_MSG_COUNT=Request.Form("edtZC_MSG_COUNT")
  1114. Call SaveValueForSetting(strContent,True,"Numeric","ZC_MSG_COUNT",strZC_MSG_COUNT)
  1115. If UCase(strZC_MSG_COUNT)<>UCase(CStr(ZC_MSG_COUNT)) Then Call SetBlogHint(Empty,True,Empty)
  1116. Dim strZC_ARCHIVE_COUNT
  1117. strZC_ARCHIVE_COUNT=Request.Form("edtZC_ARCHIVE_COUNT")
  1118. Call SaveValueForSetting(strContent,True,"Numeric","ZC_ARCHIVE_COUNT",strZC_ARCHIVE_COUNT)
  1119. If UCase(strZC_ARCHIVE_COUNT)<>UCase(CStr(ZC_ARCHIVE_COUNT)) Then Call SetBlogHint(Empty,True,Empty)
  1120. Dim strZC_PREVIOUS_COUNT
  1121. strZC_PREVIOUS_COUNT=Request.Form("edtZC_PREVIOUS_COUNT")
  1122. Call SaveValueForSetting(strContent,True,"Numeric","ZC_PREVIOUS_COUNT",strZC_PREVIOUS_COUNT)
  1123. If UCase(strZC_PREVIOUS_COUNT)<>UCase(CStr(ZC_PREVIOUS_COUNT)) Then Call SetBlogHint(Empty,True,Empty)
  1124. Dim strZC_DISPLAY_COUNT
  1125. strZC_DISPLAY_COUNT=Request.Form("edtZC_DISPLAY_COUNT")
  1126. Call SaveValueForSetting(strContent,True,"Numeric","ZC_DISPLAY_COUNT",strZC_DISPLAY_COUNT)
  1127. If UCase(strZC_DISPLAY_COUNT)<>UCase(CStr(ZC_DISPLAY_COUNT)) Then Call SetBlogHint(Empty,True,Empty)
  1128. Dim strZC_MANAGE_COUNT
  1129. strZC_MANAGE_COUNT=Request.Form("edtZC_MANAGE_COUNT")
  1130. Call SaveValueForSetting(strContent,True,"Numeric","ZC_MANAGE_COUNT",strZC_MANAGE_COUNT)
  1131. If UCase(strZC_MANAGE_COUNT)<>UCase(CStr(ZC_MANAGE_COUNT)) Then Call SetBlogHint(Empty,Empty,Empty)
  1132. Dim strZC_RSS2_COUNT
  1133. strZC_RSS2_COUNT=Request.Form("edtZC_RSS2_COUNT")
  1134. Call SaveValueForSetting(strContent,True,"Numeric","ZC_RSS2_COUNT",strZC_RSS2_COUNT)
  1135. If UCase(strZC_RSS2_COUNT)<>UCase(CStr(ZC_RSS2_COUNT)) Then Call SetBlogHint(Empty,True,Empty)
  1136. Dim strZC_SEARCH_COUNT
  1137. strZC_SEARCH_COUNT=Request.Form("edtZC_SEARCH_COUNT")
  1138. Call SaveValueForSetting(strContent,True,"Numeric","ZC_SEARCH_COUNT",strZC_SEARCH_COUNT)
  1139. If UCase(strZC_SEARCH_COUNT)<>UCase(CStr(ZC_SEARCH_COUNT)) Then Call SetBlogHint(Empty,Empty,Empty)
  1140. Dim strZC_PAGEBAR_COUNT
  1141. strZC_PAGEBAR_COUNT=Request.Form("edtZC_PAGEBAR_COUNT")
  1142. Call SaveValueForSetting(strContent,True,"Numeric","ZC_PAGEBAR_COUNT",strZC_PAGEBAR_COUNT)
  1143. If UCase(strZC_PAGEBAR_COUNT)<>UCase(CStr(ZC_PAGEBAR_COUNT)) Then Call SetBlogHint(Empty,True,Empty)
  1144. Dim strZC_USE_NAVIGATE_ARTICLE
  1145. strZC_USE_NAVIGATE_ARTICLE=Request.Form("edtZC_USE_NAVIGATE_ARTICLE")
  1146. Call SaveValueForSetting(strContent,True,"Boolean","ZC_USE_NAVIGATE_ARTICLE",strZC_USE_NAVIGATE_ARTICLE)
  1147. If UCase(strZC_USE_NAVIGATE_ARTICLE)<>UCase(CStr(ZC_USE_NAVIGATE_ARTICLE)) Then Call SetBlogHint(Empty,Empty,True)
  1148. Dim strZC_MUTUALITY_COUNT
  1149. strZC_MUTUALITY_COUNT=Request.Form("edtZC_MUTUALITY_COUNT")
  1150. Call SaveValueForSetting(strContent,True,"Numeric","ZC_MUTUALITY_COUNT",strZC_MUTUALITY_COUNT)
  1151. If UCase(strZC_MUTUALITY_COUNT)<>UCase(CStr(ZC_MUTUALITY_COUNT)) Then Call SetBlogHint(Empty,Empty,True)
  1152. Dim strZC_UBB_LINK_ENABLE
  1153. strZC_UBB_LINK_ENABLE=Request.Form("edtZC_UBB_LINK_ENABLE")
  1154. Call SaveValueForSetting(strContent,True,"Boolean","ZC_UBB_LINK_ENABLE",strZC_UBB_LINK_ENABLE)
  1155. If UCase(strZC_UBB_LINK_ENABLE)<>UCase(CStr(ZC_UBB_LINK_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1156. Dim strZC_UBB_FONT_ENABLE
  1157. strZC_UBB_FONT_ENABLE=Request.Form("edtZC_UBB_FONT_ENABLE")
  1158. Call SaveValueForSetting(strContent,True,"Boolean","ZC_UBB_FONT_ENABLE",strZC_UBB_FONT_ENABLE)
  1159. If UCase(strZC_UBB_FONT_ENABLE)<>UCase(CStr(ZC_UBB_FONT_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1160. Dim strZC_UBB_CODE_ENABLE
  1161. strZC_UBB_CODE_ENABLE=Request.Form("edtZC_UBB_CODE_ENABLE")
  1162. Call SaveValueForSetting(strContent,True,"Boolean","ZC_UBB_CODE_ENABLE",strZC_UBB_CODE_ENABLE)
  1163. If UCase(strZC_UBB_CODE_ENABLE)<>UCase(CStr(ZC_UBB_CODE_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1164. Dim strZC_UBB_FACE_ENABLE
  1165. strZC_UBB_FACE_ENABLE=Request.Form("edtZC_UBB_FACE_ENABLE")
  1166. Call SaveValueForSetting(strContent,True,"Boolean","ZC_UBB_FACE_ENABLE",strZC_UBB_FACE_ENABLE)
  1167. If UCase(strZC_UBB_FACE_ENABLE)<>UCase(CStr(ZC_UBB_FACE_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1168. Dim strZC_UBB_IMAGE_ENABLE
  1169. strZC_UBB_IMAGE_ENABLE=Request.Form("edtZC_UBB_IMAGE_ENABLE")
  1170. Call SaveValueForSetting(strContent,True,"Boolean","ZC_UBB_IMAGE_ENABLE",strZC_UBB_IMAGE_ENABLE)
  1171. If UCase(strZC_UBB_IMAGE_ENABLE)<>UCase(CStr(ZC_UBB_IMAGE_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1172. Dim strZC_UBB_MEDIA_ENABLE
  1173. strZC_UBB_MEDIA_ENABLE=Request.Form("edtZC_UBB_MEDIA_ENABLE")
  1174. Call SaveValueForSetting(strContent,True,"Boolean","ZC_UBB_MEDIA_ENABLE",strZC_UBB_MEDIA_ENABLE)
  1175. If UCase(strZC_UBB_MEDIA_ENABLE)<>UCase(CStr(ZC_UBB_MEDIA_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1176. Dim strZC_UBB_FLASH_ENABLE
  1177. strZC_UBB_FLASH_ENABLE=Request.Form("edtZC_UBB_FLASH_ENABLE")
  1178. Call SaveValueForSetting(strContent,True,"Boolean","ZC_UBB_FLASH_ENABLE",strZC_UBB_FLASH_ENABLE)
  1179. If UCase(strZC_UBB_FLASH_ENABLE)<>UCase(CStr(ZC_UBB_FLASH_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1180. Dim strZC_UBB_TYPESET_ENABLE
  1181. strZC_UBB_TYPESET_ENABLE=Request.Form("edtZC_UBB_TYPESET_ENABLE")
  1182. Call SaveValueForSetting(strContent,True,"Boolean","ZC_UBB_TYPESET_ENABLE",strZC_UBB_TYPESET_ENABLE)
  1183. If UCase(strZC_UBB_TYPESET_ENABLE)<>UCase(CStr(ZC_UBB_TYPESET_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1184. Dim strZC_UBB_AUTOLINK_ENABLE
  1185. strZC_UBB_AUTOLINK_ENABLE=Request.Form("edtZC_UBB_AUTOLINK_ENABLE")
  1186. Call SaveValueForSetting(strContent,True,"Boolean","ZC_UBB_AUTOLINK_ENABLE",strZC_UBB_AUTOLINK_ENABLE)
  1187. If UCase(strZC_UBB_AUTOLINK_ENABLE)<>UCase(CStr(ZC_UBB_AUTOLINK_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1188. 'Dim strZC_AUTO_NEWLINE
  1189. 'strZC_AUTO_NEWLINE=Request.Form("edtZC_AUTO_NEWLINE")
  1190. 'Call SaveValueForSetting(strContent,True,"Boolean","ZC_AUTO_NEWLINE",strZC_AUTO_NEWLINE)
  1191. 'If UCase(strZC_AUTO_NEWLINE)<>UCase(CStr(ZC_AUTO_NEWLINE)) Then Call SetBlogHint(Empty,Empty,True)
  1192. Dim strZC_COMMENT_NOFOLLOW_ENABLE
  1193. strZC_COMMENT_NOFOLLOW_ENABLE=Request.Form("edtZC_COMMENT_NOFOLLOW_ENABLE")
  1194. Call SaveValueForSetting(strContent,True,"Boolean","ZC_COMMENT_NOFOLLOW_ENABLE",strZC_COMMENT_NOFOLLOW_ENABLE)
  1195. If UCase(strZC_COMMENT_NOFOLLOW_ENABLE)<>UCase(CStr(ZC_COMMENT_NOFOLLOW_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1196. Dim strZC_JAPAN_TO_HTML
  1197. strZC_JAPAN_TO_HTML=Request.Form("edtZC_JAPAN_TO_HTML")
  1198. Call SaveValueForSetting(strContent,True,"Boolean","ZC_JAPAN_TO_HTML",strZC_JAPAN_TO_HTML)
  1199. If UCase(strZC_JAPAN_TO_HTML)<>UCase(CStr(ZC_JAPAN_TO_HTML)) Then Call SetBlogHint(Empty,Empty,True)
  1200. Dim strZC_EMOTICONS_FILENAME
  1201. strZC_EMOTICONS_FILENAME=Request.Form("edtZC_EMOTICONS_FILENAME")
  1202. Call SaveValueForSetting(strContent,True,"String","ZC_EMOTICONS_FILENAME",strZC_EMOTICONS_FILENAME) 
  1203. If UCase(strZC_EMOTICONS_FILENAME)<>UCase("""" & CStr(ZC_EMOTICONS_FILENAME) & """") Then Call SetBlogHint(Empty,Empty,True)
  1204. Dim strZC_EMOTICONS_FILESIZE
  1205. strZC_EMOTICONS_FILESIZE=Request.Form("edtZC_EMOTICONS_FILESIZE")
  1206. Call SaveValueForSetting(strContent,True,"Numeric","ZC_EMOTICONS_FILESIZE",strZC_EMOTICONS_FILESIZE)
  1207. If UCase(strZC_EMOTICONS_FILESIZE)<>UCase(CStr(ZC_EMOTICONS_FILESIZE)) Then Call SetBlogHint(Empty,Empty,True)
  1208. Dim strZC_MOONSOFT_PLUGIN_ENABLE
  1209. strZC_MOONSOFT_PLUGIN_ENABLE=Request.Form("edtZC_MOONSOFT_PLUGIN_ENABLE")
  1210. Call SaveValueForSetting(strContent,True,"Boolean","ZC_MOONSOFT_PLUGIN_ENABLE",strZC_MOONSOFT_PLUGIN_ENABLE)
  1211. If UCase(strZC_MOONSOFT_PLUGIN_ENABLE)<>UCase(CStr(ZC_MOONSOFT_PLUGIN_ENABLE)) Then Call SetBlogHint(Empty,True,Empty)
  1212. Dim strZC_MOONSOFT_PLUGIN_REGEX
  1213. strZC_MOONSOFT_PLUGIN_REGEX=Request.Form("edtZC_MOONSOFT_PLUGIN_REGEX")
  1214. Call SaveValueForSetting(strContent,True,"String","ZC_MOONSOFT_PLUGIN_REGEX",strZC_MOONSOFT_PLUGIN_REGEX) 
  1215. If UCase(strZC_MOONSOFT_PLUGIN_REGEX)<>UCase("""" & CStr(ZC_MOONSOFT_PLUGIN_REGEX) & """") Then Call SetBlogHint(Empty,True,Empty)
  1216. Dim strZC_MOONSOFT_PLUGIN_ANONYMOUS
  1217. strZC_MOONSOFT_PLUGIN_ANONYMOUS=Request.Form("edtZC_MOONSOFT_PLUGIN_ANONYMOUS")
  1218. Call SaveValueForSetting(strContent,True,"Boolean","ZC_MOONSOFT_PLUGIN_ANONYMOUS",strZC_MOONSOFT_PLUGIN_ANONYMOUS)
  1219. If UCase(strZC_MOONSOFT_PLUGIN_ANONYMOUS)<>UCase(CStr(ZC_MOONSOFT_PLUGIN_ANONYMOUS)) Then Call SetBlogHint(Empty,True,Empty)
  1220. Dim strZC_COMMENT_REVERSE_ORDER_EXPORT
  1221. strZC_COMMENT_REVERSE_ORDER_EXPORT=Request.Form("edtZC_COMMENT_REVERSE_ORDER_EXPORT")
  1222. Call SaveValueForSetting(strContent,True,"Boolean","ZC_COMMENT_REVERSE_ORDER_EXPORT",strZC_COMMENT_REVERSE_ORDER_EXPORT)
  1223. If UCase(strZC_COMMENT_REVERSE_ORDER_EXPORT)<>UCase(CStr(ZC_COMMENT_REVERSE_ORDER_EXPORT)) Then Call SetBlogHint(Empty,Empty,True)
  1224. Dim strZC_GUESTBOOK_CONTENT
  1225. strZC_GUESTBOOK_CONTENT=Replace(Replace(Request.Form("edtZC_GUESTBOOK_CONTENT"),vbCr,""),vbLf,"")
  1226. Call SaveValueForSetting(strContent,True,"String","ZC_GUESTBOOK_CONTENT",strZC_GUESTBOOK_CONTENT) 
  1227. If UCase(strZC_GUESTBOOK_CONTENT)<>UCase("""" & CStr(ZC_GUESTBOOK_CONTENT) & """") Then Call SetBlogHint(Empty,Empty,Empty)
  1228. Dim strZC_CUSTOM_DIRECTORY_ENABLE
  1229. strZC_CUSTOM_DIRECTORY_ENABLE=Request.Form("edtZC_CUSTOM_DIRECTORY_ENABLE")
  1230. Call SaveValueForSetting(strContent,True,"Boolean","ZC_CUSTOM_DIRECTORY_ENABLE",strZC_CUSTOM_DIRECTORY_ENABLE)
  1231. If UCase(strZC_CUSTOM_DIRECTORY_ENABLE)<>UCase(CStr(ZC_CUSTOM_DIRECTORY_ENABLE)) Then Call SetBlogHint(Empty,Empty,True)
  1232. Dim strZC_CUSTOM_DIRECTORY_ANONYMOUS
  1233. strZC_CUSTOM_DIRECTORY_ANONYMOUS=Request.Form("edtZC_CUSTOM_DIRECTORY_ANONYMOUS")
  1234. Call SaveValueForSetting(strContent,True,"Boolean","ZC_CUSTOM_DIRECTORY_ANONYMOUS",strZC_CUSTOM_DIRECTORY_ANONYMOUS)
  1235. If UCase(strZC_CUSTOM_DIRECTORY_ANONYMOUS)<>UCase(CStr(ZC_CUSTOM_DIRECTORY_ANONYMOUS)) Then Call SetBlogHint(Empty,Empty,True)
  1236. Dim strZC_CUSTOM_DIRECTORY_REGEX
  1237. strZC_CUSTOM_DIRECTORY_REGEX=Request.Form("edtZC_CUSTOM_DIRECTORY_REGEX")
  1238. If strZC_CUSTOM_DIRECTORY_ANONYMOUS="True" Then
  1239. If InStr(strZC_CUSTOM_DIRECTORY_REGEX,"{%id%}")=0 And InStr(strZC_CUSTOM_DIRECTORY_REGEX,"{%alias%}")=0 Then
  1240. strZC_CUSTOM_DIRECTORY_REGEX=strZC_CUSTOM_DIRECTORY_REGEX & "{%id%}"
  1241. End If
  1242. End If
  1243. Call SaveValueForSetting(strContent,True,"String","ZC_CUSTOM_DIRECTORY_REGEX",strZC_CUSTOM_DIRECTORY_REGEX) 
  1244. If UCase(strZC_CUSTOM_DIRECTORY_REGEX)<>UCase("""" & CStr(ZC_CUSTOM_DIRECTORY_REGEX) & """") Then Call SetBlogHint(Empty,Empty,True)
  1245. 'Dim strZC_IE_DISPLAY_WAP
  1246. 'strZC_IE_DISPLAY_WAP=Request.Form("edtZC_IE_DISPLAY_WAP")
  1247. 'Call SaveValueForSetting(strContent,True,"Boolean","ZC_IE_DISPLAY_WAP",strZC_IE_DISPLAY_WAP)
  1248. Dim strZC_DISPLAY_COUNT_WAP
  1249. strZC_DISPLAY_COUNT_WAP=Request.Form("edtZC_DISPLAY_COUNT_WAP")
  1250. Call SaveValueForSetting(strContent,True,"Numeric","ZC_DISPLAY_COUNT_WAP",strZC_DISPLAY_COUNT_WAP)
  1251. Dim strZC_COMMENT_COUNT_WAP
  1252. strZC_COMMENT_COUNT_WAP=Request.Form("edtZC_COMMENT_COUNT_WAP")
  1253. Call SaveValueForSetting(strContent,True,"Numeric","ZC_COMMENT_COUNT_WAP",strZC_COMMENT_COUNT_WAP)
  1254. Dim strZC_PAGEBAR_COUNT_WAP
  1255. strZC_PAGEBAR_COUNT_WAP=Request.Form("edtZC_PAGEBAR_COUNT_WAP")
  1256. Call SaveValueForSetting(strContent,True,"Numeric","ZC_PAGEBAR_COUNT_WAP",strZC_PAGEBAR_COUNT_WAP)
  1257. Dim strZC_SINGLE_SIZE_WAP
  1258. strZC_SINGLE_SIZE_WAP=Request.Form("edtZC_SINGLE_SIZE_WAP")
  1259. Call SaveValueForSetting(strContent,True,"Numeric","ZC_SINGLE_SIZE_WAP",strZC_SINGLE_SIZE_WAP)
  1260. Dim strZC_SINGLE_PAGEBAR_COUNT_WAP
  1261. strZC_SINGLE_PAGEBAR_COUNT_WAP=Request.Form("edtZC_SINGLE_PAGEBAR_COUNT_WAP")
  1262. Call SaveValueForSetting(strContent,True,"Numeric","ZC_SINGLE_PAGEBAR_COUNT_WAP",strZC_SINGLE_PAGEBAR_COUNT_WAP)
  1263. Dim strZC_COMMENT_PAGEBAR_COUNT_WAP
  1264. strZC_COMMENT_PAGEBAR_COUNT_WAP=Request.Form("edtZC_COMMENT_PAGEBAR_COUNT_WAP")
  1265. Call SaveValueForSetting(strContent,True,"Numeric","ZC_COMMENT_PAGEBAR_COUNT_WAP",strZC_COMMENT_PAGEBAR_COUNT_WAP) 
  1266. Dim strZC_FILENAME_WAP
  1267. strZC_FILENAME_WAP=Request.Form("edtZC_FILENAME_WAP")
  1268. Call SaveValueForSetting(strContent,True,"String","ZC_FILENAME_WAP",strZC_FILENAME_WAP)
  1269. Dim strZC_WAPCOMMENT_ENABLE
  1270. strZC_WAPCOMMENT_ENABLE=Request.Form("edtZC_WAPCOMMENT_ENABLE")
  1271. Call SaveValueForSetting(strContent,True,"Boolean","ZC_WAPCOMMENT_ENABLE",strZC_WAPCOMMENT_ENABLE)  
  1272. Dim strZC_UPLOAD_DIRBYMONTH
  1273. strZC_UPLOAD_DIRBYMONTH=Request.Form("edtZC_UPLOAD_DIRBYMONTH")
  1274. Call SaveValueForSetting(strContent,True,"Boolean","ZC_UPLOAD_DIRBYMONTH",strZC_UPLOAD_DIRBYMONTH)
  1275. If UCase(ZC_UPLOAD_DIRBYMONTH)<>UCase(CStr(ZC_UPLOAD_DIRBYMONTH)) Then Call SetBlogHint(Empty,Empty,True)
  1276. Dim strZC_IMAGE_WIDTH
  1277. strZC_IMAGE_WIDTH=Request.Form("edtZC_IMAGE_WIDTH")
  1278. Call SaveValueForSetting(strContent,True,"Numeric","ZC_IMAGE_WIDTH",strZC_IMAGE_WIDTH)
  1279. If UCase(strZC_IMAGE_WIDTH)<>UCase(CStr(ZC_IMAGE_WIDTH)) Then Call SetBlogHint(Empty,Empty,True)
  1280. Dim strZC_RSS_EXPORT_WHOLE
  1281. strZC_RSS_EXPORT_WHOLE=Request.Form("edtZC_RSS_EXPORT_WHOLE")
  1282. Call SaveValueForSetting(strContent,True,"Boolean","ZC_RSS_EXPORT_WHOLE",strZC_RSS_EXPORT_WHOLE)
  1283. If UCase(strZC_RSS_EXPORT_WHOLE)<>UCase(CStr(ZC_RSS_EXPORT_WHOLE)) Then Call SetBlogHint(Empty,True,Empty)
  1284. Dim strZC_COMMENT_TURNOFF
  1285. strZC_COMMENT_TURNOFF=Request.Form("edtZC_COMMENT_TURNOFF")
  1286. Call SaveValueForSetting(strContent,True,"Boolean","ZC_COMMENT_TURNOFF",strZC_COMMENT_TURNOFF)
  1287. Dim strZC_TRACKBACK_TURNOFF
  1288. strZC_TRACKBACK_TURNOFF=Request.Form("edtZC_TRACKBACK_TURNOFF")
  1289. Call SaveValueForSetting(strContent,True,"Boolean","ZC_TRACKBACK_TURNOFF",strZC_TRACKBACK_TURNOFF)
  1290. Dim strZC_GUEST_REVERT_COMMENT_ENABLE
  1291. strZC_GUEST_REVERT_COMMENT_ENABLE=Request.Form("edtZC_GUEST_REVERT_COMMENT_ENABLE")
  1292. Call SaveValueForSetting(strContent,True,"Boolean","ZC_GUEST_REVERT_COMMENT_ENABLE",strZC_GUEST_REVERT_COMMENT_ENABLE)
  1293. Dim strZC_VERIFYCODE_WIDTH
  1294. strZC_VERIFYCODE_WIDTH=Request.Form("edtZC_VERIFYCODE_WIDTH")
  1295. Call SaveValueForSetting(strContent,True,"Numeric","ZC_VERIFYCODE_WIDTH",strZC_VERIFYCODE_WIDTH) 
  1296. Dim strZC_VERIFYCODE_HEIGHT
  1297. strZC_VERIFYCODE_HEIGHT=Request.Form("edtZC_VERIFYCODE_HEIGHT")
  1298. Call SaveValueForSetting(strContent,True,"Numeric","ZC_VERIFYCODE_HEIGHT",strZC_VERIFYCODE_HEIGHT) 
  1299. Dim strZC_VERIFYCODE_STRING
  1300. strZC_VERIFYCODE_STRING=Request.Form("edtZC_VERIFYCODE_STRING")
  1301. Call SaveValueForSetting(strContent,True,"String","ZC_VERIFYCODE_STRING",strZC_VERIFYCODE_STRING) 
  1302. If UCase(strZC_VERIFYCODE_STRING)<>UCase(CStr(ZC_VERIFYCODE_STRING)) Then Application.Lock : Application(ZC_BLOG_CLSID & "VERIFY_NUMBER")=Empty : Application.UnLock
  1303. Dim strZC_RECENT_COMMENT_WORD_MAX
  1304. strZC_RECENT_COMMENT_WORD_MAX=Request.Form("edtZC_RECENT_COMMENT_WORD_MAX")
  1305. Call SaveValueForSetting(strContent,True,"Numeric","ZC_RECENT_COMMENT_WORD_MAX",strZC_RECENT_COMMENT_WORD_MAX) 
  1306. If UCase(strZC_RECENT_COMMENT_WORD_MAX)<>UCase(CStr(ZC_RECENT_COMMENT_WORD_MAX)) Then Call SetBlogHint(Empty,True,Empty)
  1307. Dim strZC_TAGS_DISPLAY_COUNT
  1308. strZC_TAGS_DISPLAY_COUNT=Request.Form("edtZC_TAGS_DISPLAY_COUNT")
  1309. Call SaveValueForSetting(strContent,True,"Numeric","ZC_TAGS_DISPLAY_COUNT",strZC_TAGS_DISPLAY_COUNT) 
  1310. If UCase(strZC_TAGS_DISPLAY_COUNT)<>UCase(CStr(ZC_TAGS_DISPLAY_COUNT)) Then Call SetBlogHint(Empty,True,Empty)
  1311. ' Dim str<#>
  1312. ' str<#>=Request.Form("edt<#>")
  1313. ' Call SaveValueForSetting(strContent,True,"Boolean","<#>",str<#>) 
  1314. Call SaveToFile(BlogPath & "/c_option.asp",strContent,"utf-8",False)
  1315. 'Call MakeBlogReBuild_Core()
  1316. SaveSetting=True
  1317. Err.Clear
  1318. End Function
  1319. '*********************************************************
  1320. '/////////////////////////////////////////////////////////////////////////////////////////
  1321. '*********************************************************
  1322. ' 目的:    Post Tag
  1323. '*********************************************************
  1324. Function PostTag()
  1325. Dim objTag
  1326. Set objTag=New TTag
  1327. objTag.ID=Request.Form("edtID")
  1328. objTag.Name=Request.Form("edtName")
  1329. objTag.Order=Request.Form("edtOrder")
  1330. objTag.Intro=Request.Form("edtIntro")
  1331. '接口
  1332. Call Filter_Plugin_PostTag_Core(objTag)
  1333. If objTag.Post Then
  1334. Call Filter_Plugin_PostTag_Succeed(objTag)
  1335. Call ScanTagCount("{"&objTag.ID&"}")
  1336. PostTag=True
  1337. End If
  1338. Set objTag=Nothing
  1339. End Function
  1340. '*********************************************************
  1341. '*********************************************************
  1342. ' 目的:    Del Tag
  1343. '*********************************************************
  1344. Function DelTag(intID)
  1345. Dim objTag
  1346. Set objTag=New TTag
  1347. objTag.ID=intID
  1348. If objTag.Del Then DelTag=True
  1349. Set objTag=Nothing
  1350. End Function
  1351. '*********************************************************
  1352. '/////////////////////////////////////////////////////////////////////////////////////////
  1353. '*********************************************************
  1354. ' 目的:    Post KeyWord
  1355. '*********************************************************
  1356. Function PostKeyWord()
  1357. End Function
  1358. '*********************************************************
  1359. '*********************************************************
  1360. ' 目的:    Del Tag
  1361. '*********************************************************
  1362. Function DelKeyWord(intID)
  1363. End Function
  1364. '*********************************************************
  1365. '*********************************************************
  1366. ' 目的:    
  1367. '*********************************************************
  1368. Function PostSiteFile(tpath)
  1369. Dim txaContent
  1370. txaContent=Request.Form("txaContent")
  1371. If IsEmpty(txaContent) Then txaContent=Null
  1372. If Not IsNull(tpath) Then
  1373. If Not IsNull(txaContent) Then
  1374. Call SaveToFile(BlogPath & tpath,txaContent,"utf-8",False)
  1375. PostSiteFile=True
  1376. End IF
  1377. End If
  1378. End Function
  1379. '*********************************************************
  1380. '*********************************************************
  1381. ' 目的:    
  1382. '*********************************************************
  1383. Function DelSiteFile(tpath)
  1384. Dim Fso
  1385. Set Fso = Createobject("Scripting.Filesystemobject")
  1386. If Fso.FileExists(BlogPath & tpath) Then
  1387. Fso.Deletefile(BlogPath & tpath)
  1388. Set Fso = Nothing
  1389. DelSiteFile=True
  1390. Exit Function
  1391. Else
  1392. Set Fso = Nothing
  1393. Exit Function
  1394. End If
  1395. End Function
  1396. '*********************************************************
  1397. '*********************************************************
  1398. ' 目的:    
  1399. '*********************************************************
  1400. Function GetRealUrlofTrackBackUrl(intID)
  1401. If IsEmpty(Request.Form("edtCheckOut")) Then
  1402. Response.Write "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" /><link rel=""stylesheet"" rev=""stylesheet"" href=""CSS/admin.css"" type=""text/css"" media=""screen"" /></head><body>"
  1403. Response.Write "<div id=""divMain""><div class=""Header"">" & ZC_MSG145 & "</div>"
  1404. Response.Write "<div id=""divMain2""><form method=""post""  name=""edit"" id=""edit"" action="""& ZC_BLOG_HOST & "cmd.asp?act=gettburl&id=" & intID &""">"
  1405. Response.Write "<p></p>"
  1406. Response.Write "<p>"& ZC_MSG161 &"</p>"
  1407. Response.Write "<p><img style=""border:1px solid black""  src=""function/c_validcode.asp?name=gettburlvalid"" height="""&ZC_VERIFYCODE_HEIGHT&""" width="""&ZC_VERIFYCODE_WIDTH&""" alt="""" title=""""/>&nbsp;<input type=""text"" id=""edtCheckOut"" name=""edtCheckOut"" size=""30"" />&nbsp;<input class=""button"" type=""submit"" value=""" & ZC_MSG087 & """ id=""btnPost""></p>"
  1408. Response.Write "<p></p>"
  1409. Response.Write "</form></div></div>"
  1410. Response.Write "</body></html>"
  1411. ElseIf CheckVerifyNumber(Request.Form("edtCheckOut"))=True Then
  1412. Response.Write "<!DOCTYPE html PUBLIC ""-//W3C//DTD XHTML 1.0 Transitional//EN"" ""http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd""><html><head><meta http-equiv=""Content-Type"" content=""text/html; charset=utf-8"" /><link rel=""stylesheet"" rev=""stylesheet"" href=""CSS/admin.css"" type=""text/css"" media=""screen"" /></head><body>"
  1413. Response.Write "<div id=""divMain""><div class=""Header"">" & ZC_MSG145 & "</div>"
  1414. Response.Write "<div id=""divMain2""><form method=""post""  name=""edit"" id=""edit"" action="""& ZC_BLOG_HOST & "cmd.asp?act=gettburl&id=" & intID &""">"
  1415. Response.Write "<p></p>"
  1416. Response.Write "<p>" & ZC_BLOG_HOST & "cmd.asp?act=tb&amp;id=" & intID & "&amp;key=" & GetVerifyNumber() &"</p>"
  1417. Response.Write "<p></p>"
  1418. Response.Write "</form></div></div>"
  1419. Response.Write "</body></html>"
  1420. Session("gettburlvalid")=Empty
  1421. Else
  1422. Call ShowError(38)
  1423. End If
  1424. End Function
  1425. '*********************************************************
  1426. '*********************************************************
  1427. ' 目的:    
  1428. '*********************************************************
  1429. Function DelCommentBatch()
  1430. Dim i,j
  1431. Dim s,t
  1432. Dim aryArticle()
  1433. s=Request.Form("edtBatch")
  1434. t=Split(s,",")
  1435. ReDim Preserve aryArticle(UBound(t))
  1436. For j=0 To UBound(t)-1
  1437. aryArticle(j)=0
  1438. Next
  1439. Dim objComment
  1440. Dim objArticle
  1441. For i=0 To UBound(t)-1
  1442. Set objComment=New TComment
  1443. If objComment.LoadInfobyID(t(i)) Then
  1444. If objComment.log_ID>0 Then
  1445. Dim objTestArticle
  1446. Set objTestArticle=New TArticle
  1447. If objTestArticle.LoadInfobyID(objComment.log_ID) Then
  1448. For j=0 To UBound(t)-1
  1449. If aryArticle(j)=0 Then
  1450. aryArticle(j)=objComment.log_ID
  1451. End If
  1452. If aryArticle(j)=objComment.log_ID Then Exit For
  1453. Next
  1454. If Not((objComment.AuthorID=BlogUser.ID) Or (objTestArticle.AuthorID=BlogUser.ID) Or (CheckRights("Root")=True)) Then Exit Function
  1455. Else
  1456. Call ShowError(9)
  1457. End If
  1458. Set objTestArticle=Nothing
  1459. Else
  1460. If Not((objComment.log_ID=0) And (CheckRights("GuestBookMng")=True)) Then Exit Function
  1461. End If
  1462. objComment.Del
  1463. End If
  1464. Set objComment=Nothing
  1465. Next
  1466. For j=0 To UBound(t)-1
  1467. If aryArticle(j)>0 Then
  1468. Call BuildArticle(aryArticle(j),False,False)
  1469. End If
  1470. Next
  1471. BlogReBuild_Comments
  1472. BlogReBuild_GuestComments
  1473. DelCommentBatch=True
  1474. End Function
  1475. '*********************************************************
  1476. '*********************************************************
  1477. ' 目的:    
  1478. '*********************************************************
  1479. Function DelTrackBackBatch()
  1480. Dim i,j
  1481. Dim s,t
  1482. Dim aryArticle()
  1483. s=Request.Form("edtBatch")
  1484. t=Split(s,",")
  1485. ReDim Preserve aryArticle(UBound(t))
  1486. For j=0 To UBound(t)-1
  1487. aryArticle(j)=0
  1488. Next
  1489. Dim objTrackBack
  1490. Dim objArticle
  1491. Set objArticle=New TArticle
  1492. For i=0 To UBound(t)-1
  1493. Set objTrackBack=New TTrackBack
  1494. If objTrackBack.LoadInfobyID(t(i)) Then
  1495. Dim objTestArticle
  1496. Set objTestArticle=New TArticle
  1497. If objTestArticle.LoadInfobyID(objTrackBack.log_ID) Then
  1498. For j=0 To UBound(t)-1
  1499. If aryArticle(j)=0 Then
  1500. aryArticle(j)=objTrackBack.log_ID
  1501. End If
  1502. If aryArticle(j)=objTrackBack.log_ID Then Exit For
  1503. Next
  1504. If Not((objTestArticle.AuthorID=BlogUser.ID) Or (CheckRights("Root")=True)) Then Exit Function
  1505. Else
  1506. Call ShowError(9)
  1507. End If
  1508. Set objTestArticle=Nothing
  1509. objTrackBack.Del
  1510. End If
  1511. Set objTrackBack=Nothing
  1512. Next
  1513. For j=0 To UBound(t)-1
  1514. If aryArticle(j)>0 Then
  1515. Call BuildArticle(aryArticle(j),False,False)
  1516. End If
  1517. Next
  1518. BlogReBuild_TrackBacks
  1519. DelTrackBackBatch=True
  1520. End Function
  1521. '*********************************************************
  1522. '*********************************************************
  1523. ' 目的:     文件删除
  1524. '*********************************************************
  1525. Function DelFileBatch()
  1526. Dim i,j
  1527. Dim s,t
  1528. s=Request.Form("edtBatch")
  1529. t=Split(s,",")
  1530. Dim objUpLoadFile
  1531. For i=0 To UBound(t)-1
  1532. t(i)=CLng(t(i))
  1533. If t(i)>0 Then
  1534. Set objUpLoadFile=New TUpLoadFile
  1535. If objUpLoadFile.LoadInfoByID(t(i)) Then
  1536. If (objUpLoadFile.AuthorID=BlogUser.ID) Or (CheckRights("Root")=True) Then
  1537. objUpLoadFile.Del
  1538. End If
  1539. Else
  1540. Exit Function
  1541. End If
  1542. Set objUpLoadFile=Nothing
  1543. End If
  1544. Next
  1545. DelFileBatch=True
  1546. End Function
  1547. '*********************************************************
  1548. '*********************************************************
  1549. ' 目的:    Save Themes Setting
  1550. '*********************************************************
  1551. Function SaveThemes()
  1552. Dim i,j
  1553. Dim s,t
  1554. Dim strContent
  1555. strContent=LoadFromFile(BlogPath & "/c_custom.asp","utf-8")
  1556. Dim strZC_BLOG_CSS
  1557. Dim strZC_BLOG_THEME
  1558. strZC_BLOG_CSS=Request.Form("edtZC_BLOG_CSS")
  1559. strZC_BLOG_THEME=Request.Form("edtZC_BLOG_THEME")
  1560. Call ScanPluginToThemeFile(strZC_BLOG_CSS,strZC_BLOG_THEME)
  1561. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_CSS",strZC_BLOG_CSS)
  1562. Call SaveValueForSetting(strContent,True,"String","ZC_BLOG_THEME",strZC_BLOG_THEME)
  1563. If UCase(strZC_BLOG_CSS)<>UCase("""" & CStr(ZC_BLOG_CSS) & """") Then Call SetBlogHint(Empty,True,Empty)
  1564. If UCase(strZC_BLOG_THEME)<>UCase("""" & CStr(ZC_BLOG_THEME) & """") Then Call SetBlogHint(Empty,True,True):Call UninstallPlugin(ZC_BLOG_THEME)
  1565. Call SaveToFile(BlogPath & "/c_custom.asp",strContent,"utf-8",False)
  1566. Call MakeBlogReBuild_Core()
  1567. SaveThemes=True
  1568. End Function
  1569. '*********************************************************
  1570. '*********************************************************
  1571. ' 目的:    Save Links
  1572. '*********************************************************
  1573. Function SaveLink()
  1574. Dim tpath
  1575. Dim txaContent
  1576. Dim strContent
  1577. tpath="./INCLUDE/link.asp"
  1578. txaContent=Request.Form("txaContent_Link")
  1579. If IsEmpty(txaContent) Then txaContent=Null
  1580. If Not IsNull(tpath) Then
  1581. If Not IsNull(txaContent) Then
  1582. Call SaveToFile(BlogPath & tpath,txaContent,"utf-8",False)
  1583. End IF
  1584. End If
  1585. tpath="./INCLUDE/favorite.asp"
  1586. txaContent=Request.Form("txaContent_Favorite")
  1587. If IsEmpty(txaContent) Then txaContent=Null
  1588. If Not IsNull(tpath) Then
  1589. If Not IsNull(txaContent) Then
  1590. Call SaveToFile(BlogPath & tpath,txaContent,"utf-8",False)
  1591. End IF
  1592. End If
  1593. tpath="./INCLUDE/misc.asp"
  1594. txaContent=Request.Form("txaContent_Misc")
  1595. If IsEmpty(txaContent) Then txaContent=Null
  1596. If Not IsNull(tpath) Then
  1597. If Not IsNull(txaContent) Then
  1598. Call SaveToFile(BlogPath & tpath,txaContent,"utf-8",False)
  1599. End IF
  1600. End If
  1601. tpath="./INCLUDE/navbar.asp"
  1602. txaContent=Request.Form("txaContent_Navbar")
  1603. If IsEmpty(txaContent) Then txaContent=Null
  1604. If Not IsNull(tpath) Then
  1605. If Not IsNull(txaContent) Then
  1606. strContent=LoadFromFile(BlogPath & tpath,"utf-8")
  1607. If txaContent<>strContent Then
  1608. Call SetBlogHint(Empty,True,True)
  1609. End If
  1610. Call SaveToFile(BlogPath & tpath,txaContent,"utf-8",False)
  1611. End IF
  1612. End If
  1613. Call SetBlogHint(Empty,True,Empty)
  1614. Call MakeBlogReBuild_Core()
  1615. SaveLink=True
  1616. End Function
  1617. '*********************************************************
  1618. '*********************************************************
  1619. ' 目的:    ActivePlugIn By Name
  1620. '*********************************************************
  1621. Function ActivePlugInByName(strPluginName)
  1622. Dim s,i,t,b
  1623. s= ZC_USING_PLUGIN_LIST 
  1624. If s="" Then
  1625. s=strPluginName
  1626. Else
  1627. t=Split(ZC_USING_PLUGIN_LIST,"|")
  1628. For i=LBound(t) To UBound(t)
  1629. If UCase(t(i))=UCase(strPluginName) Then
  1630. b=True
  1631. End If
  1632. Next
  1633. If b<>True Then
  1634. s=s & "|" & strPluginName
  1635. End If
  1636. End If
  1637. Dim strContent
  1638. Dim strZC_USING_PLUGIN_LIST
  1639. strContent=LoadFromFile(BlogPath & "/c_option.asp","utf-8")
  1640. strZC_USING_PLUGIN_LIST=s
  1641. Call SaveValueForSetting(strContent,True,"String","ZC_USING_PLUGIN_LIST",strZC_USING_PLUGIN_LIST)
  1642. Call SaveToFile(BlogPath & "/c_option.asp",strContent,"utf-8",False)
  1643. Call ScanPluginToIncludeFile(s)
  1644. ActivePlugInByName=True
  1645. End Function
  1646. '*********************************************************
  1647. '*********************************************************
  1648. ' 目的:    DisablePlugIn By Name
  1649. '*********************************************************
  1650. Function DisablePlugInByName(strPluginName)
  1651. Call UninstallPlugin(strPluginName)
  1652. Dim s,i,t
  1653. s=Split(ZC_USING_PLUGIN_LIST,"|")
  1654. For i=LBound(s) To UBound(s)
  1655. If UCase(s(i))<>UCase(strPluginName) Then
  1656. If t="" Then
  1657. t=s(i)
  1658. Else
  1659. t=t & "|" & s(i)
  1660. End If
  1661. End If
  1662. Next
  1663. Dim strContent
  1664. Dim strZC_USING_PLUGIN_LIST
  1665. strContent=LoadFromFile(BlogPath & "/c_option.asp","utf-8")
  1666. strZC_USING_PLUGIN_LIST=t
  1667. Call SaveValueForSetting(strContent,True,"String","ZC_USING_PLUGIN_LIST",strZC_USING_PLUGIN_LIST)
  1668. Call SaveToFile(BlogPath & "/c_option.asp",strContent,"utf-8",False)
  1669. Call ScanPluginToIncludeFile(t)
  1670. DisablePlugInByName=True
  1671. End Function
  1672. '*********************************************************
  1673. '*********************************************************
  1674. ' 目的:    
  1675. '*********************************************************
  1676. Function ScanPluginToIncludeFile(newZC_USING_PLUGIN_LIST)
  1677. On Error Resume Next
  1678. Dim aryPL,i,j,s,t
  1679. aryPL=Split(newZC_USING_PLUGIN_LIST,"|")
  1680. If newZC_USING_PLUGIN_LIST<>"" Then
  1681. i=UBound(aryPL)
  1682. Else
  1683. i=0
  1684. End If
  1685. Dim objXmlFile,strXmlFile
  1686. Dim fso, f, f1, fc
  1687. Set fso = CreateObject("Scripting.FileSystemObject")
  1688. Set f = fso.GetFolder(BlogPath & "/plugin/")
  1689. Set fc = f.SubFolders
  1690. For j=0 To i
  1691. If fso.FileExists(BlogPath & "/plugin/" & aryPL(j) & "/" & "plugin.xml") Then
  1692. strXmlFile =BlogPath & "/plugin/" & aryPL(j) & "/" & "plugin.xml"
  1693. Set objXmlFile=Server.CreateObject("Microsoft.XMLDOM")
  1694. objXmlFile.async = False
  1695. objXmlFile.ValidateOnParse=False
  1696. objXmlFile.load(strXmlFile)
  1697. If objXmlFile.readyState=4 Then
  1698. If objXmlFile.parseError.errorCode <> 0 Then
  1699. Else
  1700. If CheckPluginStateByNewValue(objXmlFile.documentElement.selectSingleNode("id").text,newZC_USING_PLUGIN_LIST) Then
  1701. If Trim(objXmlFile.documentElement.selectSingleNode("include").text)<>"" Then
  1702. If (fso.FileExists(BlogPath & "/plugin/" & objXmlFile.documentElement.selectSingleNode("id").text & "/" & objXmlFile.documentElement.selectSingleNode("include").text)) Then
  1703. t="<!-- #include file="""& objXmlFile.documentElement.selectSingleNode("id").text &"/"& objXmlFile.documentElement.selectSingleNode("include").text &""" -->"
  1704. If InStr(s,t)=0 Then
  1705. s=s & t  & vbCrLf
  1706. End If
  1707. End If
  1708. End If
  1709. End If
  1710. End If
  1711. End If
  1712. Set objXmlFile=Nothing
  1713. End If
  1714. Next
  1715. Call SaveToFile(BlogPath & "/PLUGIN/p_include.asp",s,"utf-8",False)
  1716. Err.Clear
  1717. End Function
  1718. '*********************************************************
  1719. '*********************************************************
  1720. ' 目的:    
  1721. '*********************************************************
  1722. Function ScanPluginToThemeFile(newZC_BLOG_CSS,newZC_BLOG_THEME)
  1723. On Error Resume Next
  1724. Dim objXmlFile,strXmlFile,s
  1725. strXmlFile =BlogPath & "/themes/" & newZC_BLOG_THEME & "/" & "theme.xml"
  1726. Set objXmlFile=Server.CreateObject("Microsoft.XMLDOM")
  1727. objXmlFile.async = False
  1728. objXmlFile.ValidateOnParse=False
  1729. objXmlFile.load(strXmlFile)
  1730. If objXmlFile.readyState=4 Then
  1731. If objXmlFile.parseError.errorCode <> 0 Then
  1732. Else
  1733. If LCase(objXmlFile.documentElement.selectSingleNode("id").text)=LCase(newZC_BLOG_THEME) Then
  1734. Dim fso
  1735. Set fso = CreateObject("Scripting.FileSystemObject")
  1736. If (fso.FileExists(BlogPath & "/themes/" & objXmlFile.documentElement.selectSingleNode("id").text &"/plugin/" & objXmlFile.documentElement.selectSingleNode("plugin/include").text)) Then
  1737. If Trim(objXmlFile.documentElement.selectSingleNode("plugin/include").text)<>"" Then
  1738. s=s & "<!-- #include file=""../themes/"& objXmlFile.documentElement.selectSingleNode("id").text &"/plugin/"& objXmlFile.documentElement.selectSingleNode("plugin/include").text &""" -->" & vbCrLf
  1739. End If
  1740. End If
  1741. End If
  1742. End If
  1743. End If
  1744. Set objXmlFile=Nothing
  1745. Call SaveToFile(BlogPath & "/PLUGIN/p_theme.asp",s,"utf-8",False)
  1746. Err.Clear
  1747. End Function
  1748. '*********************************************************
  1749. '*********************************************************
  1750. ' 目的:    
  1751. '*********************************************************
  1752. Function ScanTagCount(strTags)
  1753. On Error Resume Next
  1754. Dim t,i,s
  1755. Dim objRS,j,k
  1756. If strTags<>"" Then
  1757. s=strTags
  1758. s=Replace(s,"}","")
  1759. t=Split(s,"{")
  1760. For i=LBound(t) To UBound(t)
  1761. If t(i)<>"" Then
  1762. k=Tags(t(i)).ID
  1763. Set objRS=objConn.Execute("SELECT COUNT([log_ID]) FROM [blog_Article] WHERE [log_Level]>1 AND [log_Tag] LIKE '%{" & k & "}%'")
  1764. j=objRS(0)
  1765. objConn.Execute("UPDATE [blog_Tag] SET [tag_Count]="&j&" WHERE [tag_ID] =" & k)
  1766. Set objRS=Nothing
  1767. End If
  1768. Next
  1769. s=Join(t,",")
  1770. s=Right(s,Len(s)-1)
  1771. strTags=s
  1772. End If
  1773. Err.Clear
  1774. End Function
  1775. '*********************************************************
  1776. %>