Feb
13
接上文:
<a href="?Fmenu=Members&Smenu=EditRight&id=<%=blog_Status(0,i)%>" title="编辑该权限组"><img border="0" src="images/icon_edit.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>编辑权限</a>
<%if lcase(blog_Status(0,i))<>"supadmin" and lcase(blog_Status(0,i))<>"member" and lcase(blog_Status(0,i))<>"guest" then%>
<a href="javascript:CheckDelGroup('<%=blog_Status(0,i)%>')" title="删除该权限组"><img border="0" src="images/icon_del.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>删除权限</a>
<%end if%>
</td>
</tr>
<%next%>
<tr align="center" bgcolor="#D5DAE0">
<td colspan="12" class="TDHead" align="left" style="border-top:1px solid #999"><img src="images/add.gif" style="margin:0px 2px -3px 2px"/>添加新权限分组</td>
</tr>
<tr align="center">
<td ><input name="status_name" type="text" size="15" class="text" style="font-size:11px"/></td>
<td ><input name="status_title" type="text" size="20" class="text"/></td>
<td > </td>
</tr>
</table>
<div style="color:#f00">权限标识是唯一标记.一旦确定就无法修改.系统自带的权限组不允许删除.</div>
<div class="SubButton">
<input type="submit" name="Submit" value="保存权限组" class="button"/>
</div>
</div></form>
</td>
</tr></table>
<%
end if
elseif Request.QueryString("Fmenu")="Link" then '友情链接管理
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
<tr>
<th class="CTitle"><%=categoryTitle%></th>
</tr>
<tr>
<td class="CPanel"><form name="filter" action="ConContent.asp" method="post" style="margin:0px">
<%
dim disLink,disCount
if session(CookieName&"_disLink")="" then session(CookieName&"_disLink")="All"
if session(CookieName&"_disCount")="" then session(CookieName&"_disCount")="10"
disLink=session(CookieName&"_disLink")
disCount=session(CookieName&"_disCount")
dim FilterWhere
If CheckStr(Request.QueryString("Page"))<>Empty Then
Curpage=CheckStr(Request.QueryString("Page"))
If IsInteger(Curpage)=False or Curpage<0 Then Curpage=1
Else
Curpage=1
End If
%>
<div class="SubMenu">过滤器:
<input type="hidden" name="action" value="Links"/>
<input type="hidden" name="whatdo" value="Filter"/>
<select name="disLink" onchange="document.forms['filter'].submit()">
<option value="All">显示所有链接</option>
<option value="Allow" <%if disLink="Allow" then response.write ("selected=""selected""")%>>已通过验证链接</option>
<option value="NoAllow" <%if disLink="NoAllow" then response.write ("selected=""selected""")%>>未通过验证链接</option>
<option value="Top" <%if disLink="Top" then response.write ("selected=""selected""")%>>置顶链接</option>
<option value="NoTop" <%if disLink="NoTop" then response.write ("selected=""selected""")%>>未置顶链接</option>
</select> 每页显示 <select name="disCount" onchange="document.forms['filter'].submit()">
<option <%if int(disCount)=100 then response.write ("selected=""selected""")%>>100</option>
<option <%if int(disCount)=50 then response.write ("selected=""selected""")%>>50</option>
<option <%if int(disCount)=25 then response.write ("selected=""selected""")%>>25 </option>
<option <%if int(disCount)=10 then response.write ("selected=""selected""")%>>10</option>
</select>
条 <a href="#AddLink">添加新友情链接</a></div> </form>
<form name="Link" action="ConContent.asp" method="post" style="margin:0px">
<div align="left" style="padding:5px;"><%getMsg%>
<input type="hidden" name="action" value="Links"/>
<input type="hidden" name="whatdo" value="SaveLink"/>
<input type="hidden" name="ALinkID" value=""/>
<input type="hidden" name="Page" value="<%=Curpage%>"/>
<table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
<%
select case disLink
case "All"
FilterWhere=""
case "Allow"
FilterWhere=" where link_IsShow=true"
case "NoAllow"
FilterWhere=" where link_IsShow=false"
case "Top"
FilterWhere=" where link_IsMain=true"
case "NoTop"
FilterWhere=" where link_IsMain=false"
case else
FilterWhere=""
end select
dim bLink
Set bLink=Server.CreateObject("ADODB.RecordSet")
SQL="Select * FROM blog_Links"&FilterWhere&" order by link_IsShow desc,link_Order desc"
bLink.Open SQL,Conn,1,1
IF not bLink.EOF Then
bLink.PageSize=disCount
bLink.AbsolutePage=CurPage
Dim bLink_nums
bLink_nums=bLink.RecordCount
Dim MultiPages,PageCount
response.write "<tr><td colspan=""6"" style=""border-bottom:1px solid #999;""><div class=""pageContent"">"&MultiPage(bLink_nums,disCount,CurPage,"?Fmenu=Link&Smenu=&","","float:left")&"</div><div class=""Content-body"" style=""line-height:200%""></td></tr>"
end if
%>
<tr align="center">
<td width="16" nowrap="nowrap" class="TDHead"> </td>
<td width="120" nowrap="nowrap" class="TDHead">网站名称</td>
<td width="180" nowrap="nowrap" class="TDHead">网站地址</td>
<td width="250" nowrap="nowrap" class="TDHead">Logo图片地址</td>
<td class="TDHead">排序</td>
<td class="TDHead">操作</td>
</tr>
<%
IF not bLink.EOF Then
Do Until bLink.EOF or PageCount=bLink.PageSize
if not bLink("link_IsShow") then
%>
<tr align="center" bgcolor="#FCF4BC">
<td><img src="images/slink.gif" alt="没有通过验证链接"/></td>
<td><input name="LinkID" type="hidden" value="<%=bLink("link_ID")%>"/><input name="LinkName" type="text" size="18" class="text" value="<%=bLink("link_Name")%>"/></td>
<td><input name="LinkURL" type="text" size="30" class="text" value="<%=bLink("link_URL")%>"/></td>
<td><input name="LinkLogo" type="text" size="40" class="text" value="<%=bLink("link_Image")%>"/></td>
<td><input name="LinkOrder" type="text" class="text" size="2" value="<%=bLink("link_Order")%>"/></td>
<td><a href="#" onclick="ShowLink(<%=bLink("link_ID")%>)" title="通过该链接的验证"><img border="0" src="images/alink.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>通过</a> <a href="<%=bLink("link_URL")%>" target="_blank" title="查看该链接"><img border="0" src="images/icon_trackback.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>查看</a> <a href="#" onclick="Dellink(<%=bLink("link_ID")%>)" title="删除该链接"><img border="0" src="images/icon_del.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>删除</a> </td>
</tr>
<%else%>
<tr align="center">
<td><%if bLink("link_IsMain") then response.write ("<img src=""images/urlInTop.gif"" alt=""置顶链接""/>") else response.write (" ")%></td>
<td><input name="LinkID" type="hidden" value="<%=bLink("link_ID")%>"/><input name="LinkName" type="text" size="18" class="text" value="<%=bLink("link_Name")%>"/></td>
<td><input name="LinkURL" type="text" size="30" class="text" value="<%=bLink("link_URL")%>"/></td>
<td><input name="LinkLogo" type="text" size="40" class="text" value="<%=bLink("link_Image")%>"/></td>
<td><input name="LinkOrder" type="text" class="text" size="2" value="<%=bLink("link_Order")%>"/></td>
<td><%if bLink("link_IsMain") then response.write ("<a href=""#"" onclick=""Toplink("&bLink("link_ID")&")"" title=""取消该链接在首页置顶""><img border=""0"" src=""images/ct.gif"" style=""margin:0px 2px -3px 0px""/>取消</a> ") else response.write ("<a href=""#"" onclick=""Toplink("&bLink("link_ID")&")"" title=""把该链接在首页置顶""><img border=""0"" src=""images/it.gif"" style=""margin:0px 2px -3px 0px""/>置顶</a> ")%>
<a href="<%=bLink("link_URL")%>" target="_blank" title="查看该链接"><img border="0" src="images/icon_trackback.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>查看</a> <a href="#" onclick="Dellink(<%=bLink("link_ID")%>)" title="删除该链接"><img border="0" src="images/icon_del.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>删除</a> </td>
</tr>
<% end if
bLink.MoveNext
PageCount=PageCount+1
loop
bLink.Close
Set bLink=Nothing
end if%>
<tr align="center" bgcolor="#D5DAE0">
<td colspan="6" class="TDHead" align="left" style="border-top:1px solid #999"><a name="AddLink"></a><img src="images/add.gif" style="margin:0px 2px -3px 2px"/>添加新友情链接</td>
</tr>
<tr align="center">
<td> </td>
<td><input name="new_LinkID" type="hidden" value="-1"/><input name="new_LinkName" type="text" size="18" class="text"/></td>
<td><input name="new_LinkURL" type="text" size="30" class="text" /></td>
<td><input name="new_LinkLogo" type="text" size="40" class="text" /></td>
<td><input name="new_LinkOrder" type="text" class="text" size="2" /></td>
<td> </td>
</tr>
</table>
</div>
<div class="SubButton">
<input type="submit" name="Submit" value="保存友情链接" class="button"/>
</div>
</td>
</tr></table></div></form>
<%
elseif Request.QueryString("Fmenu")="smilies" then '表情与关键字
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
<tr>
<th class="CTitle"><%=categoryTitle%></th>
</tr>
<tr>
<td class="CPanel">
<div class="SubMenu"><a href="?Fmenu=smilies">表情管理</a> | <a href="?Fmenu=smilies&Smenu=KeyWord">关键字管理</a></div>
<div align="left" style="padding:5px;"><%getMsg%>
<%if Request.QueryString("Smenu")="KeyWord" then%>
<form action="ConContent.asp" method="post" style="margin:0px">
<input type="hidden" name="action" value="smilies"/>
<input type="hidden" name="whatdo" value="KeyWord"/>
<input type="hidden" name="DelID" value=""/>
<table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
<tr align="center">
<td width="16" nowrap="nowrap" class="TDHead"> </td>
<td width="120" nowrap="nowrap" class="TDHead">关键字</td>
<td width="220" nowrap="nowrap" class="TDHead">关键字链接地址</td>
</tr>
<%
dim bKeyWord
Set bKeyWord=conn.execute("select * from blog_Keywords order by key_ID desc")
do until bKeyWord.eof
%>
<tr align="center">
<td><input name="SelectKeyWordID" type="checkbox" value="<%=bKeyWord("key_ID")%>"/></td>
<td><input name="KeyWordID" type="hidden" value="<%=bKeyWord("key_ID")%>"/><input name="KeyWord" type="text" size="18" class="text" value="<%=bKeyWord("key_Text")%>"/></td>
<td><input name="KeyWordURL" type="text" size="34" class="text" value="<%=bKeyWord("key_URL")%>"/></td>
</tr>
<%
bKeyWord.movenext
loop
%>
<tr align="center" bgcolor="#D5DAE0">
<td colspan="3" class="TDHead" align="left" style="border-top:1px solid #999"><a name="AddLink"></a><img src="images/add.gif" style="margin:0px 2px -3px 2px"/>添加新关键字</td>
</tr>
<tr align="center">
<td></td>
<td><input name="KeyWordID" type="hidden" value="-1"/><input name="KeyWord" type="text" size="18" class="text"/></td>
<td><input name="KeyWordURL" type="text" size="34" class="text"/></td>
</tr>
</table>
<div class="SubButton" style="text-align:left;">
<select name="doModule">
<option value="SaveAll">保存所有关键字</option>
<option value="DelSelect">删除所选关键字</option>
</select>
<input type="submit" name="Submit" value="保存关键字" class="button" style="margin-bottom:0px"/>
</div> </form>
<%else%>
<form action="ConContent.asp" method="post" style="margin:0px">
<input type="hidden" name="action" value="smilies"/>
<input type="hidden" name="whatdo" value="smilies"/>
<input type="hidden" name="DelID" value=""/>
<table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
<tr align="center">
<td width="16" nowrap="nowrap" class="TDHead"> </td>
<td nowrap="nowrap" class="TDHead">图片</td>
<td width="100" nowrap="nowrap" class="TDHead">表情图片代码</td>
<td width="180" nowrap="nowrap" class="TDHead">表情图片地址</td>
</tr>
<%
dim bSmile
Set bSmile=conn.execute("select * from blog_Smilies order by sm_ID desc")
do until bSmile.eof
%>
<tr align="center">
<td><input name="selectSmiliesID" type="checkbox" value="<%=bSmile("sm_ID")%>"/></td>
<td><img src="images/smilies/<%=bSmile("sm_Image")%>" alt="<%=bSmile("sm_Image")%>"/></td>
<td><input name="smilesID" type="hidden" value="<%=bSmile("sm_ID")%>"/><input name="smiles" type="text" size="14" class="text" value="<%=bSmile("sm_Text")%>"/></td>
<td><input name="smilesURL" type="text" size="27" class="text" value="<%=bSmile("sm_Image")%>"/></td>
</tr>
<%
bSmile.movenext
loop
%>
<tr align="center" bgcolor="#D5DAE0">
<td colspan="4" class="TDHead" align="left" style="border-top:1px solid #999"><a name="AddLink"></a><img src="images/add.gif" style="margin:0px 2px -3px 2px"/>添加新表情</td>
</tr>
<tr align="center">
<td></td>
<td></td>
<td><input name="smilesID" type="hidden" value="-1"/><input name="smiles" type="text" size="14" class="text"/></td>
<td><input name="smilesURL" type="text" size="27" class="text"/></td>
</tr>
</table>
<div class="SubButton" style="text-align:left;">
<select name="doModule">
<option value="SaveAll">保存所有表情</option>
<option value="DelSelect">删除所选表情</option>
</select>
<input type="submit" name="Submit" value="保存表情" class="button" style="margin-bottom:0px"/>
</div> </form>
<%end if%>
</div>
</td></tr></table>
<%
elseif Request.QueryString("Fmenu")="Status" then '服务器配置
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
<tr>
<th class="CTitle"><%=categoryTitle%></th>
</tr>
<tr>
<td class="CPanel">
<div align="left" style="padding:5px;line-height:150%">
<b>软件版本:</b> PJBlog2 v<%=blog_version%> - <%=DateToStr(blog_UpdateDate,"mdy")%><br/>
<b>服务器时间:</b> <%=DateToStr(Now(),"Y-m-d H:I A")%><br/>
<b>服务器物理路径:</b> <%=Request.ServerVariables("APPL_PHYSICAL_PATH")%><br/>
<b>服务器空间占用:</b> <%=GetTotalSize(Request.ServerVariables("APPL_PHYSICAL_PATH"),"Folder")%><br/>
<b>服务器CPU数量:</b> <%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%><br/>
<b>服务器IIS版本:</b> <%=Request.ServerVariables("SERVER_SOFTWARE")%><br/>
<b>脚本超时设置:</b> <%=Server.ScriptTimeout%><br/>
<b>脚本解释引擎:</b> <%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %><br/>
<b>服务器操作系统:</b> <%=Request.ServerVariables("OS")%><br/>
<b>服务器IP地址:</b> <%=Request.ServerVariables("LOCAL_ADDR")%><br/>
<b>客户端IP地址:</b> <%=Request.ServerVariables("REMOTE_ADDR")%><br/><br/>
<b>关键组件:</b> (缺少关键组件的服务器会对PJBlog2运行有一定影响)<br/>
<b> - Scripting.FileSystemObject 组件:</b> <%=DisI(CheckObjInstalled("Scripting.FileSystemObject"))%><br/>
<b> - MSXML2.ServerXMLHTTP 组件:</b> <%=DisI(CheckObjInstalled("MSXML2.ServerXMLHTTP"))%><br/>
<b> - Microsoft.XMLDOM 组件:</b> <%=DisI(CheckObjInstalled("Microsoft.XMLDOM"))%><br/>
<b> - ADODB.Stream 组件:</b> <%=DisI(CheckObjInstalled("ADODB.Stream"))%><br/>
<b> - Scripting.Dictionary 组件:</b> <%=DisI(CheckObjInstalled("Scripting.Dictionary"))%><br/>
<br/>
<b>其他组件: </b>(以下组件不影响PJBlog2运行)<br/>
<b> - Msxml2.ServerXMLHTTP.5.0 组件:</b> <%=DisI(CheckObjInstalled("Msxml2.ServerXMLHTTP.5.0"))%><br/>
<b> - Msxml2.DOMDocument.5.0 组件:</b> <%=DisI(CheckObjInstalled("Msxml2.DOMDocument.5.0"))%><br/>
<b> - FileUp.upload 组件:</b> <%=DisI(CheckObjInstalled("FileUp.upload"))%><br/>
<b> - JMail.SMTPMail 组件:</b> <%=DisI(CheckObjInstalled("JMail.SMTPMail"))%><br/>
<b> - GflAx190.GflAx 组件:</b> <%=DisI(CheckObjInstalled("GflAx190.GflAx"))%><br/>
<b> - easymail.Mailsend 组件:</b> <%=DisI(CheckObjInstalled("easymail.Mailsend"))%><br/>
</div>
</td></tr></table>
<%
elseif Request.QueryString("Fmenu")="Logout" then '退出
session(CookieName&"_System")=""
session(CookieName&"_disLink")=""
session(CookieName&"_disCount")=""
%>
<script>try{top.location="default.asp"}catch(e){location="default.asp"}</script>
<%
elseif Request.QueryString("Fmenu")="welcome" then '欢迎%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
<tr>
<th class="CTitle"><%=categoryTitle%></th>
</tr>
<tr>
<td class="CPanel">
<div id="updateInfo" style="background:ffffe1;border:1px solid #89441f;padding:4px;display:none"></div>
<script>
var CVersion="<%=blog_version%>";
var CDate="<%=blog_UpdateDate%>";
</script>
<script src="http://www.pjhome.net/updateN.js"></script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" style="padding:5px;width:140px"><img src="images/Control/Icon/ControlPanel.png"/></td>
<td valign="top">
<div align="left" style="padding:5px;line-height:170%;clear:both;font-size:12px">
<b>当前软件版本:</b> PJBlog2 v<%=blog_version%><br/>
<b>软件更新日期:</b> <%=DateToStr(blog_UpdateDate,"mdy")%><br/>
<b>日志数量:</b> <%=blog_LogNums%> 篇<br/>
<b>评论数量:</b> <%=blog_CommNums%> 个<br/>
<b>引用数量:</b> <%=blog_TbCount%> 个<br/>
<b>留言数量:</b> <%=blog_MessageNums%> 个(需要留言本插件支持)<br/>
<b>会员数:</b> <%=blog_MemNums%> 人<br/>
<b>访问次数:</b> <%=blog_VisitNums%> 次<br/>
</div>
</td>
</tr>
</table>
</td></tr></table>
<%else
'==========================后台信息处理===============================
dim weblog
Set weblog=Server.CreateObject("ADODB.RecordSet")
'==========================基本信息处理===============================
if Request.form("action")="General" then
if Request.form("whatdo")="General" then
'--------------------------基本信息处理-------------------
SQL="Select * FROM blog_Info"
weblog.Open SQL,Conn,1,3
weblog("blog_Name")=checkURL(CheckStr(Request.form("SiteName")))
weblog("blog_Title")=checkURL(CheckStr(Request.form("blog_Title")))
weblog("blog_master")=checkURL(CheckStr(Request.form("blog_master")))
weblog("blog_email")=checkURL(CheckStr(Request.form("blog_email")))
if right(CheckStr(Request.form("SiteURL")),1)<>"/" then
weblog("blog_URL")=checkURL(CheckStr(Request.form("SiteURL")))&"/"
else
weblog("blog_URL")=checkURL(CheckStr(Request.form("SiteURL")))
end if
weblog("blog_affiche")=""
weblog("blog_about")=CheckStr(Request.form("blog_about"))
weblog("blog_PerPage")=CheckStr(Request.form("blogPerPage"))
weblog("blog_commPage")=CheckStr(Request.form("blogcommpage"))
weblog("blog_BookPage")=0 'CheckStr(Request.form("blogBookPage"))
weblog("blog_commTimerout")=CheckStr(Request.form("blog_commTimerout"))
weblog("blog_commLength")=CheckStr(Request.form("blog_commLength"))
if CheckObjInstalled("ADODB.Stream") then
if CheckStr(Request.form("blog_postFile"))="1" then weblog("blog_postFile")=1 else weblog("blog_postFile")=0
else
weblog("blog_postFile")=0
end if
if CheckStr(Request.form("blog_Disregister"))="1" then weblog("blog_Disregister")=1 else weblog("blog_Disregister")=0
if CheckStr(Request.form("blog_validate"))="1" then weblog("blog_validate")=1 else weblog("blog_validate")=0
if CheckStr(Request.form("blog_commUBB"))="1" then weblog("blog_commUBB")=1 else weblog("blog_commUBB")=0
if CheckStr(Request.form("blog_commIMG"))="1" then weblog("blog_commIMG")=1 else weblog("blog_commIMG")=0
if CheckStr(Request.form("blog_ImgLink"))="1" then weblog("blog_ImgLink")=1 else weblog("blog_ImgLink")=0
weblog("blog_SplitType")=CBool(CheckStr(Request.form("blog_SplitType")))
weblog("blog_introChar")=CheckStr(Request.form("blog_introChar"))
weblog("blog_introLine")=CheckStr(Request.form("blog_introLine"))
weblog("blog_FilterName")=CheckStr(Request.form("Register_UserNames"))
weblog("blog_FilterIP")=CheckStr(Request.form("FilterIPs"))
weblog("blog_DisMod")=CheckStr(Request.form("blog_DisMod"))
if not IsInteger(Request.form("blog_CountNum")) then
weblog("blog_CountNum")=0
else
weblog("blog_CountNum")=Request.form("blog_CountNum")
end if
weblog("blog_wapNum")=CheckStr(Request.form("blog_wapNum"))
if CheckStr(Request.form("blog_wapImg"))="1" then weblog("blog_wapImg")=1 else weblog("blog_wapImg")=0
if CheckStr(Request.form("blog_wapHTML"))="1" then weblog("blog_wapHTML")=1 else weblog("blog_wapHTML")=0
if CheckStr(Request.form("blog_wapLogin"))="1" then weblog("blog_wapLogin")=1 else weblog("blog_wapLogin")=0
if CheckStr(Request.form("blog_wapComment"))="1" then weblog("blog_wapComment")=1 else weblog("blog_wapComment")=0
if CheckStr(Request.form("blog_wap"))="1" then weblog("blog_wap")=1 else weblog("blog_wap")=0
if CheckStr(Request.form("blog_wapURL"))="1" then weblog("blog_wapURL")=1 else weblog("blog_wapURL")=0
Response.Cookies(CookieNameSetting)("ViewType")=""
weblog.update
weblog.close
getInfo(2)
if int(Request.form("SiteOpen"))=1 then
Application.Lock
Application(CookieName & "_SiteEnable") = 1
Application(CookieName & "_SiteDisbleWhy") = ""
Application.UnLock
Else
Application.Lock
Application(CookieName & "_SiteEnable") = 0
Application(CookieName & "_SiteDisbleWhy") = "抱歉!网站暂时关闭!"
Application.UnLock
end if
session(CookieName&"_ShowMsg") = true
session(CookieName&"_MsgText") = "基本信息修改成功!"
Response.Redirect("ConContent.asp?Fmenu=General&Smenu=")
elseif Request.form("whatdo")="Misc" Then %>
<!--#include file="common/ubbcode.asp" -->
<%
if Request.form("ReBulidArticle")=1 Then
Dim LoadArticle,LogLen
LogLen=0
Set LoadArticle=conn.Execute("Select log_ID FROM blog_Content")
Do Until LoadArticle.eof
PostArticle LoadArticle("log_ID")
LogLen=LogLen+1
LoadArticle.movenext
Loop
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")=Session(CookieName&"_MsgText")&"共转换 "&LogLen&" 篇日志到文件! "
End If
if Request.form("ReBulidIndex")=1 Then
dim lArticle
set lArticle = new ArticleCache
lArticle.SaveCache
set lArticle = nothing
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")=Session(CookieName&"_MsgText")&"重新输出日志索引! "
end if
if Request.form("ReTatol")=1 Then
dim blog_Content_count,blog_Comment_count,ContentCount,TBCount,Count_Member
ContentCount=0
TBCount=conn.execute("select count(*) from blog_Trackback")(0)
Count_Member=conn.execute("select count(*) from blog_Member")(0)
conn.execute("update blog_Info set blog_tbNums="&TBCount)
conn.execute("update blog_Info set blog_MemNums="&Count_Member)
set blog_Content_count=conn.execute("Select log_CateID, Count(log_CateID) FROM blog_Content where log_IsDraft=false GROUP BY log_CateID")
set blog_Comment_count=conn.execute("Select Count(*) FROM blog_Comment")
do while not blog_Content_count.eof
ContentCount=ContentCount+blog_Content_count(1)
conn.execute("update blog_Category set cate_count="&blog_Content_count(1)&" where cate_ID="&blog_Content_count(0))
blog_Content_count.movenext
Loop
conn.execute("update blog_Info set blog_LogNums="&ContentCount)
conn.execute("update blog_Info set blog_CommNums="&blog_Comment_count(0))
getInfo(2):CategoryList(2)
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"数据统计完成! "
end if
if Request.form("CleanVisitor")=1 then
conn.execute("delete * from blog_Counter")
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"访客数据清除完成! "
end if
if Request.form("ReBulid")=1 then
FreeMemory
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"缓存重建成功! "
end If
Response.Redirect("ConContent.asp?Fmenu=General&Smenu=Misc")
else
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="非法提交内容"
Response.Redirect("ConContent.asp?Fmenu=General&Smenu=")
end if
'==========================处理日志分类===============================
elseif Request.form("action")="Categories" then
'--------------------------处理日志批量移动----------------------------
if Request.form("whatdo")="move" then
dim Cate_source,Cate_target,Cate_source_name,Cate_source_count,Cate_target_name
Cate_source=int(CheckStr(Request.form("source")))
Cate_target=int(CheckStr(Request.form("target")))
if Cate_source=Cate_target then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="源分类和目标分类一致无法移动"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=move")
end if
Cate_source_name=conn.execute("select cate_Name from blog_Category where cate_ID="&Cate_source)(0)
Cate_source_count=conn.execute("select cate_count from blog_Category where cate_ID="&Cate_source)(0)
Cate_target_name=conn.execute("select cate_Name from blog_Category where cate_ID="&Cate_target)(0)
conn.execute ("update blog_Content set log_CateID="&Cate_target&" where log_CateID="&Cate_source)
conn.execute ("update blog_Category set cate_count=0 where cate_ID="&Cate_source)
conn.execute ("update blog_Category set cate_count=cate_count+"&Cate_source_count&" where cate_ID="&Cate_target)
CategoryList(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#f00"">"&Cate_source_name&"</span> 移动到 <span style=""color:#f00"">"&Cate_target_name&"</span> 成功! 批量转移后,请到 <a href=""ConContent.asp?Fmenu=General&Smenu=Misc"" style=""color:#00f"">站点基本设置-初始化数据</a> ,重新生成所有日志到文件"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=move")
'--------------------------处理日志分类----------------------------
elseif Request.form("whatdo")="Cate" then
'处理存在分类
dim LCate_ID,LCate_icons,LCate_Name,LCate_Intro,Lcate_URL,Lcate_Order,Lcate_count,LCate_local,Lcate_Secret
dim NCate_ID,NCate_icons,NCate_Name,NCate_Intro,Ncate_URL,Ncate_Order,NCate_local,Ncate_OutLink,Ncate_Secret
LCate_ID=split(Request.form("Cate_ID"),", ")
LCate_Name=split(Request.form("Cate_Name"),", ")
LCate_icons=split(Request.form("Cate_icons"),", ")
LCate_Intro=split(Request.form("Cate_Intro"),", ")
Lcate_URL=split(Request.form("cate_URL"),", ")
Lcate_Order=split(Request.form("cate_Order"),", ")
Lcate_count=split(Request.form("cate_count"),", ")
LCate_local=Split(Request.form("Cate_local"),", ")
Lcate_Secret=Split(Request.form("cate_Secret"),", ")
For i=0 To UBound(LCate_Name)
SQL="Select * FROM blog_Category where cate_ID="&int(CheckStr(LCate_ID(i)))
weblog.Open SQL,Conn,1,3
weblog("cate_Name")=CheckStr(LCate_Name(i))
weblog("cate_icon")=CheckStr(LCate_icons(i))
weblog("Cate_Intro")=CheckStr(LCate_Intro(i))
if len(trim(Lcate_URL(i)))>1 and int(Lcate_count(i))<1 then
weblog("cate_URL")=trim(CheckStr(Lcate_URL(i)))
weblog("cate_OutLink")=true
else
weblog("cate_URL")=trim(CheckStr(Lcate_URL(i)))
weblog("cate_OutLink")=false
end if
weblog("cate_Order")=int(CheckStr(Lcate_Order(i)))
weblog("Cate_local")=int(CheckStr(LCate_local(i)))
weblog("cate_Secret")=CBool(CheckStr(Lcate_Secret(i)))
weblog.update
weblog.close
next
'判断添加新日志
NCate_Name=trim(CheckStr(Request.form("New_Cate_Name")))
NCate_icons=CheckStr(Request.form("New_Cate_icons"))
NCate_Intro=trim(CheckStr(Request.form("New_Cate_Intro")))
Ncate_URL=trim(CheckStr(Request.form("New_cate_URL")))
Ncate_Order=CheckStr(Request.form("New_cate_Order"))
NCate_local=CheckStr(Request.form("New_Cate_local"))
Ncate_Secret=CheckStr(Request.form("New_Cate_Secret"))
if len(NCate_Name)>0 then
if len(Ncate_Order)<1 then Ncate_Order=conn.execute("select count(*) from blog_Category")(0)
if len(Ncate_URL)>0 then Ncate_OutLink=true else Ncate_OutLink=false
dim AddCateArray
AddCateArray=array(array("cate_Name",NCate_Name),array("cate_icon",NCate_icons),array("Cate_Intro",NCate_Intro),array("cate_URL",Ncate_URL),array("cate_OutLink",Ncate_OutLink),array("cate_Order",int(Ncate_Order)),array("Cate_local",NCate_local),Array("Cate_Secret",NCate_Secret))
if DBQuest("blog_Category",AddCateArray,"insert")=0 then session(CookieName&"_MsgText")="新日志分类添加成功,"
end if
FreeMemory
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"日志分类更新成功!"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=")
'--------------------------批量删除日志----------------------------
elseif Request.form("whatdo")="batdel" then
dim CID,Cids,tti,C1,C2
C1=0
C2=0
CID=checkstr(request.form("CID"))
Cids=split(CID,", ")
for tti=0 to ubound(Cids)
if DeleteLog(Cids(tti))=1 then
C1=C1+1
else
C2=C2+1
end if
next
FreeMemory
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="日志删除状态:"&C1&"篇成功,"&C2&"篇失败! 批量删除后,请到 <a href=""ConContent.asp?Fmenu=General&Smenu=Misc"" style=""color:#00f"">站点基本设置-初始化数据</a> ,重新生成所有日志到文件"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=del")
'--------------------------删除日志分类----------------------------
elseif Request.form("whatdo")="DelCate" then
Dim DelCate,DelLog,DelID,conCount,comCount,P1,P2
P1=0
p2=0
DelCate=Request.form("DelCate")
set DelLog=Conn.Execute("select log_ID FROM blog_Content Where log_CateID="&DelCate)
do while not DelLog.eof
DelID=DelLog("log_ID")
if DeleteLog(DelID)=1 then
P1=P1+1
else
P2=P2+1
end if
DelLog.movenext
loop
Conn.ExeCute("Delete * FROM blog_Category Where cate_ID="&DelCate)
FreeMemory
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"日志分类删除成功! 日志删除状态:"&P1&"篇成功,"&P2&"篇失败! 批量删除后,请到 <a href=""ConContent.asp?Fmenu=General&Smenu=Misc"" style=""color:#00f"">站点基本设置-初始化数据</a> ,重新生成所有日志到文件"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=")
elseif Request.form("whatdo")="Tag" then
Dim TagsID,TagName
if Request.form("doModule")="DelSelect" then
TagsID=split(Request.form("selectTagID"),", ")
for i=0 to ubound(TagsID)
conn.execute("Delete * from blog_tag where tag_id="&TagsID(i))
next
Tags(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&(ubound(TagsID)+1)&" 个Tag被删除!"
if blog_postFile then session(CookieName&"_MsgText")=session(CookieName&"_MsgText")+"由于你使用了静态日志功能,所以删除tag后建议到 <a href='ConContent.asp?Fmenu=General&Smenu=Misc' title='站点基本设置-初始化数据 '>初始化数据</a> 重新生成所有日志一次."
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=tag")
else
TagsID=split(Request.form("TagID"),", ")
TagName=split(Request.form("tagName"),", ")
for i=0 to ubound(TagsID)
if int(TagsID(i))<>-1 then
conn.execute("update blog_tag set tag_name='"&CheckStr(TagName(i))&"' where tag_id="&TagsID(i))
else
if len(trim(CheckStr(TagName(i))))>0 then
conn.execute("insert into blog_tag (tag_name,tag_count) values ('"&CheckStr(TagName(i))&"',0)")
session(CookieName&"_MsgText")="新Tag添加成功! "
end if
end if
next
Tags(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"Tag保存成功!"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=tag")
end if
else
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="非法提交内容!"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=")
end if
'==========================评论留言处理===============================
elseif Request.form("action")="Comment" then
dim selCommID,doCommID,doTitle,doRedirect,t1,t2
selCommID=split(Request.form("selectCommentID"),", ")
doCommID=split(Request.form("CommentID"),", ")
if Request.form("doModule")="updateKey" then
saveFilterKey Request.form("keyList")
elseif Request.form("doModule")="updateRegKey" then
saveReFilterKey
elseif Request.form("doModule")="DelSelect" then
for i=0 to ubound(selCommID)
if Request.form("whatdo")="trackback" then
t1=int(split(selCommID(i),"|")(0)): t2=int(split(selCommID(i),"|")(1))
conn.execute("Update blog_Content SET log_QuoteNums=log_QuoteNums-1 Where log_ID="&t2)
conn.execute("Delete * from blog_Trackback where tb_ID="&t1)
conn.Execute("Update blog_Info Set blog_tbNums=blog_tbNums-1")
doTitle="引用通告"
PostArticle t2
doRedirect="trackback"
elseif Request.form("whatdo")="msg" then
conn.execute("Delete * from blog_book where book_ID="&selCommID(i))
doTitle="留言"
doRedirect="msg"
else
t1=int(split(selCommID(i),"|")(0)): t2=int(split(selCommID(i),"|")(1))
conn.execute("update blog_Content set log_CommNums=log_CommNums-1 where log_ID="&t2)
conn.ExeCute("update blog_Info set blog_CommNums=blog_CommNums-1")
conn.execute("Delete * from blog_Comment where comm_ID="&t1)
doTitle="评论"
doRedirect=""
PostArticle t2
end if
next
getInfo(2)
NewComment(2)
Application.Lock
Application(CookieName&"_blog_Message")=""
Application.UnLock
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=(ubound(selCommID)+1)&" 个"&doTitle&"记录被删除!"
Response.Redirect("ConContent.asp?Fmenu=Comment&Smenu="&doRedirect)
elseif Request.form("doModule")="Update" then
for i=0 to ubound(doCommID)
if Request.form("whatdo")="msg" then
if int(Request.form("edited_"&doCommID(i)))=1 then
conn.execute("Update blog_book SET book_Content='"&checkStr(Request.form("message_"&doCommID(i)))&"',book_replyAuthor='"&memName&"',book_replyTime=#"&DateToStr(now(),"Y-m-d H:I:S")&"#,book_reply='"&checkStr(Request.form("reply_"&doCommID(i)))&"' Where book_ID="&doCommID(i))
else
conn.execute("Update blog_book SET book_Content='"&checkStr(Request.form("message_"&doCommID(i)))&"',book_replyAuthor='"&memName&"',book_reply='"&checkStr(Request.form("reply_"&doCommID(i)))&"' Where book_ID="&doCommID(i))
end if
doTitle="留言"
doRedirect="msg"
elseif Request.form("whatdo")="comment" then
conn.execute("Update blog_Comment SET comm_Content='"&checkStr(Request.form("message_"&doCommID(i)))&"',comm_Reply='"&checkStr(Request.form("reply_"&doCommID(i)))&"',Comm_replytime='"&now&"' Where comm_ID="&doCommID(i))
doTitle="评论"
doRedirect=""
end if
next
NewComment(2)
Application.Lock
Application(CookieName&"_blog_Message")=""
Application.UnLock
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=doTitle&"记录更新成功!"
Response.Redirect("ConContent.asp?Fmenu=Comment&Smenu="&doRedirect)
end if
'==========================处理帐户和权限信息===============================
elseif Request.form("action")="Members" then
'--------------------------处理权限组信息----------------------------
if Request.form("whatdo")="Group" then
dim status_name,status_title,Rights,allCount,addCount
status_name=split(Request.form("status_name"),", ")
status_title=split(Request.form("status_title"),", ")
allCount=ubound(status_name)
dim NS_Name,NS_Title,NS_Code,NS_UpSize,NS_UploadType,tmpNS
if len(status_name(allCount))>0 then
NS_Name=CheckStr(status_name(allCount))
NS_Title=CheckStr(status_title(allCount))
if not IsValidChars(NS_Name) then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">添加新权限失败!权限标识不能为英文或数字以外的字符</span>"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
end if
set tmpNS=conn.execute("select stat_name from blog_status where stat_name='"&NS_Name&"'")
if not tmpNS.eof then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&NS_Name&"”</span> 权限标识已经存在无法添加新分组!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
end if
conn.execute("insert into blog_status (stat_name,stat_title,stat_Code,stat_attSize,stat_attType) values ('"&NS_Name&"','"&NS_Title&"','000000000000',0,'')")
session(CookieName&"_MsgText")="新分组添加成功!"
end if
for i=0 to ubound(status_name)-1
conn.execute("update blog_status set stat_title='"&CheckStr(status_title(i))&"' where stat_name='"&CheckStr(status_name(i))&"'")
next
UserRight(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"权限组信息修改成功!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
'--------------------------处理帐户信息----------------------------
elseif Request.form("whatdo")="User" then
'--------------------------编辑分组信息----------------------------
elseif Request.form("whatdo")="EditGroup" then
dim EditGroup,AddArticle,EditArticle,DelArticle,AddComment,DelComment,ShowHiddenCate,IsAdmin,CanUpload,UploadSize,UploadType,Group_title,SCode
EditGroup=CheckStr(Request.form("status_name"))
AddArticle=CheckStr(Request.form("AddArticle"))
EditArticle=CheckStr(Request.form("EditArticle"))
DelArticle=CheckStr(Request.form("DelArticle"))
AddComment=CheckStr(Request.form("AddComment"))
DelComment=CheckStr(Request.form("DelComment"))
ShowHiddenCate=CheckStr(Request.form("ShowHiddenCate"))
IsAdmin=CheckStr(Request.form("IsAdmin"))
CanUpload=CheckStr(Request.form("CanUpload"))
UploadSize=CheckStr(Request.form("UploadSize"))
UploadType=CheckStr(Request.form("UploadType"))
Group_title=CheckStr(Request.form("status_title"))
SCode=AddArticle & EditArticle & DelArticle &_
AddComment & DelComment & CanUpload & IsAdmin & ShowHiddenCate
conn.execute("update blog_status set stat_title='"&Group_title&"',stat_code='"&SCode&"',stat_attSize="&UploadSize&",stat_attType='"&UploadType&"' where stat_name='"&EditGroup&"'")
UserRight(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&EditGroup&"”</span>权限分组 编辑成功!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=EditRight&id="&EditGroup)
'--------------------------删除分组信息----------------------------
elseif Request.form("whatdo")="DelGroup" then
dim DelGroup
DelGroup=CheckStr(Request.form("DelGroup"))
if lcase(DelGroup)<>"supadmin" and lcase(DelGroup)<>"member" and lcase(DelGroup)<>"guest" then
conn.execute ("update blog_Member set mem_Status='Member' where mem_Status='"&DelGroup&"'")
Conn.ExeCute("Delete * FROM blog_status Where stat_name='"&DelGroup&"'")
UserRight(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&DelGroup&"”</span>权限分组 删除成功!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
else
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="特殊分组无法删除!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
end if
'--------------------------保存用户权限----------------------------
elseif Request.form("whatdo")="SaveUserRight" then
for i=1 to Request.form("mem_ID").count
conn.execute("update blog_Member set mem_Status='"&Request.form("mem_Status").item(i)&"' where mem_ID="&Request.form("mem_ID").item(i))
next
session(CookieName&"_ShowMsg") = true
session(CookieName&"_MsgText") = "用户权限设置成功!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=Users")
'--------------------------删除用户----------------------------
elseif Request.form("whatdo")="DelUser" then
dim DelUserID,DelUserName,blogmemberNum, DelUserStatus
DelUserID=Request.form("DelID")
blogmemberNum=conn.execute("select count(mem_ID) from blog_Member where mem_Status='SupAdmin'")(0)
DelUserStatus=conn.execute("select mem_Status from blog_Member where mem_ID="&DelUserID)(0)
if ((blogmemberNum = 1) and (DelUserStatus = "SupAdmin")) then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="不能删除仅有的管理员权限!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=Users")
else
DelUserName=conn.execute("select mem_Name from blog_Member where mem_ID="&DelUserID)(0)
conn.execute("delete * from blog_Member where mem_ID="&DelUserID)
Conn.ExeCute("Update blog_Info SET blog_MemNums=blog_MemNums-1")
getInfo(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&DelUserName&"”</span> 删除成功!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=Users")
end if
else
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="非法提交内容!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
end if
'==========================友情链接管理===============================
elseif Request.form("action")="Links" then
dim LinkID,LinkName,LinkURL,LinkLogo,LinkOrder,LinkMain
'--------------------------友情链接过滤----------------------------
if Request.form("whatdo")="Filter" then
session(CookieName&"_disLink")=CheckStr(Request.form("disLink"))
session(CookieName&"_disCount")=CheckStr(Request.form("disCount"))
Response.Redirect("ConContent.asp?Fmenu=Link&Smenu=")
'--------------------------保存友情链接----------------------------
elseif Request.form("whatdo")="SaveLink" then
dim TLinkName,TLinkURL,TLinkLogo,TLinkOrder
LinkID=split(Request.form("LinkID"),", ")
LinkName=split(Request.form("LinkName"),", ")
LinkURL=split(Request.form("LinkURL"),", ")
LinkLogo=split(Request.form("LinkLogo"),", ")
LinkOrder=split(Request.form("LinkOrder"),", ")
for i=0 to ubound(LinkID)
if ubound(LinkName)<0 then TLinkName="未知" else TLinkName=LinkName(i)
if ubound(LinkURL)<0 then TLinkURL="http://" else TLinkURL=LinkURL(i)
if ubound(LinkLogo)<0 then TLinkLogo="" else TLinkLogo=LinkLogo(i)
if ubound(LinkOrder)<0 then TLinkOrder="0" else TLinkOrder=LinkOrder(i)
conn.execute("update blog_Links set link_Name='"&CheckStr(TLinkName)&"',link_URL='"&CheckStr(TLinkURL)&"',link_Image='"&CheckStr(TLinkLogo)&"',link_Order='"&CheckStr(TLinkOrder)&"' where link_ID="&LinkID(i))
next
LinkID=Request.form("new_LinkID")
LinkName=Request.form("new_LinkName")
LinkURL=Request.form("new_LinkURL")
LinkLogo=Request.form("new_LinkLogo")
LinkOrder=Request.form("new_LinkOrder")
if len(LinkOrder)<1 then LinkOrder=conn.execute("select count(*) from blog_Links")(0)
if len(trim(CheckStr(LinkName)))>0 then
conn.execute("insert into blog_Links (link_Name,link_URL,link_Image,link_Order,link_IsShow) values ('"&CheckStr(LinkName)&"','"&CheckStr(LinkURL)&"','"&CheckStr(LinkLogo)&"','"&CheckStr(LinkOrder)&"',true)")
session(CookieName&"_MsgText")="新友情链接添加成功! "
end if
Bloglinks(2)
PostLink
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"保存链接成功!"
Response.Redirect("ConContent.asp?Fmenu=Link&Smenu=&page="&Request.form("page"))
'--------------------------通过友情链接----------------------------
elseif Request.form("whatdo")="ShowLink" then
conn.execute ("update blog_Links set link_IsShow=true where link_ID="&CheckStr(Request.form("ALinkID")))
LinkName=conn.execute ("select link_Name from blog_Links where link_ID="&CheckStr(Request.form("ALinkID")))(0)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 通过验证!"
Bloglinks(2)
PostLink
Response.Redirect("ConContent.asp?Fmenu=Link&Smenu=&page="&Request.form("page"))
'--------------------------置顶友情链接----------------------------
elseif Request.form("whatdo")="TopLink" then
conn.execute ("update blog_Links set link_IsMain=not link_IsMain where link_ID="&CheckStr(Request.form("ALinkID")))
LinkName=conn.execute ("select link_Name from blog_Links where link_ID="&CheckStr(Request.form("ALinkID")))(0)
LinkMain=conn.execute ("select link_IsMain from blog_Links where link_ID="&CheckStr(Request.form("ALinkID")))(0)
session(CookieName&"_ShowMsg")=true
if LinkMain then
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 置顶成功!"
else
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 取消首页置顶!"
end if
Bloglinks(2)
PostLink
Response.Redirect("ConContent.asp?Fmenu=Link&Smenu=&page="&Request.form("page"))
'--------------------------删除友情链接----------------------------
elseif Request.form("whatdo")="DelLink" then
LinkName=conn.execute ("select link_Name from blog_Links where link_ID="&CheckStr(Request.form("ALinkID")))(0)
conn.execute ("Delete * from blog_Links where link_ID="&CheckStr(Request.form("ALinkID")))
Session(CookieName&"_ShowMsg")=true
Session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 删除成功!"
Bloglinks(2)
PostLink
Response.Redirect("ConContent.asp?Fmenu=Link&Smenu=&page="&Request.form("page"))
end if
'==========================表情和关键字===============================
elseif Request.form("action")="smilies" then
dim smilesID,smiles,smilesURL
dim KeyWordID,KeyWord,KeyWordURL
'--------------------------处理表情符号----------------------------
if Request.form("whatdo")="smilies" then
if Request.form("doModule")="DelSelect" then
smilesID=split(Request.form("selectSmiliesID"),", ")
for i=0 to ubound(smilesID)
conn.execute("Delete * from blog_Smilies where sm_ID="&smilesID(i))
next
Smilies(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&(ubound(smilesID)+1)&" 个表情被删除!"
Response.Redirect("ConContent.asp?Fmenu=smilies&Smenu=")
else
smilesID=split(Request.form("smilesID"),", ")
smiles=split(Request.form("smiles"),", ")
smilesURL=split(Request.form("smilesURL"),", ")
for i=0 to ubound(smilesID)
if int(smilesID(i))<>-1 then
conn.execute("update blog_Smilies set sm_Text='"&CheckStr(smiles(i))&"',sm_Image='"&CheckStr(smilesURL(i))&"' where sm_ID="&smilesID(i))
else
if len(trim(CheckStr(smiles(i))))>0 then
conn.execute("insert into blog_Smilies (sm_Text,sm_Image) values ('"&CheckStr(smiles(i))&"','"&CheckStr(smilesURL(i))&"')")
session(CookieName&"_MsgText")="新表情添加成功! "
end if
end if
next
Smilies(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"表情保存成功!"
Response.Redirect("ConContent.asp?Fmenu=smilies&Smenu=")
end if
Elseif Request.form("whatdo")="KeyWord" then
if Request.form("doModule")="DelSelect" then
KeyWordID=split(Request.form("SelectKeyWordID"),", ")
for i=0 to ubound(KeyWordID)
conn.execute("Delete * from blog_Keywords where key_ID="&KeyWordID(i))
next
Keywords(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&(ubound(KeyWordID)+1)&"关键字被删除!"
Response.Redirect("ConContent.asp?Fmenu=smilies&Smenu=KeyWord")
else
KeyWordID=split(Request.form("KeyWordID"),", ")
KeyWord=split(Request.form("KeyWord"),", ")
KeyWordURL=split(Request.form("KeyWordURL"),", ")
for i=0 to ubound(KeyWordID)
if int(KeyWordID(i))<>-1 then
conn.execute("update blog_Keywords set key_Text='"&CheckStr(KeyWord(i))&"',key_URL='"&CheckStr(KeyWordURL(i))&"' where key_ID="&KeyWordID(i))
else
if len(trim(CheckStr(KeyWord(i))))>0 then
conn.execute("insert into blog_Keywords (key_Text,key_URL) values ('"&CheckStr(KeyWord(i))&"','"&CheckStr(KeyWordURL(i))&"')")
session(CookieName&"_MsgText")="新关键字添加成功! "
end if
end if
next
Keywords(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"关键字保存成功!"
Response.Redirect("ConContent.asp?Fmenu=smilies&Smenu=KeyWord")
end if
else
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="非法提交内容!"
Response.Redirect("ConContent.asp?Fmenu=smilies&Smenu=")
end if
'==========================设置界面和模版===============================
elseif Request.form("action")="Skins" then
dim skinpath,Skinname,moduleID,moduleName,moduleType,moduleTitle,moduleHidden,moduleTop,moduleOrder,moduleHtmlCode,mOrder
'--------------------------设置默认界面----------------------------
if Request.form("whatdo")="setDefaultSkin" then
skinpath=CheckStr(Request.form("SkinPath"))
Skinname=CheckStr(Request.form("SkinName"))
conn.execute("update blog_Info set blog_DefaultSkin='"&skinpath&"'")
getInfo(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&Skinname&"”</span> 设置为当前默认界面!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=")
'--------------------------保存模块设置----------------------------
elseif Request.form("whatdo")="UpdateModule" then
Dim selectID,doModule
selectID=split(Request.form("selectID"),", ")
doModule=Request.form("doModule")
moduleID=split(Request.form("mID"),", ")
moduleName=split(Request.form("mName"),", ")
moduleType=split(Request.form("mType"),", ")
moduleTitle=split(Request.form("mTitle"),", ")
moduleHidden=split(Request.form("mHidden"),", ")
moduleTop=split(Request.form("mTop"),", ")
moduleOrder=split(Request.form("mOrder"),", ")
',IsHidden="&CBool(moduleHidden(i))&",IndexOnly="&CBool(moduleTop(i))&"
for i=0 to ubound(moduleID)
if int(moduleID(i))<>-1 then
if not conn.execute ("select IsSystem from blog_module where id="&moduleID(i))(0) then
conn.execute("update blog_module set title='"&CheckStr(moduleTitle(i))&"',type='"&CheckStr(moduleType(i))&"',SortID="&CheckStr(moduleOrder(i))&" where id="&moduleID(i))
else
mOrder=CheckStr(moduleOrder(i))
if CheckStr(moduleName(i))="ContentList" then mOrder=0
conn.execute("update blog_module set title='"&CheckStr(moduleTitle(i))&"',SortID="&mOrder&" where id="&moduleID(i))
end if
else
if len(trim(CheckStr(moduleName(i))))>0 then
if not conn.execute("select name from blog_module where name='"&CheckStr(moduleName(i))&"'").eof then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&CheckStr(moduleName(i))&"”</span> 模块标识已经存在无法添加新模块!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
end if
if not IsValidChars(CheckStr(moduleName(i))) then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">添加新模块失败!权限标识不能为英文或数字以外的字符</span>"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
end if
if len(CheckStr(moduleOrder(i)))<1 then
mOrder=conn.execute("select count(id) from blog_module")(0)
else
if IsInteger(CheckStr(moduleOrder(i)))=false then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="输入非法,添加失败!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
end if
mOrder=CheckStr(moduleOrder(i))
end if
conn.execute("insert into blog_module (name,title,type,IsHidden,IndexOnly,SortID) values ('"&CheckStr(moduleName(i))&"','"&CheckStr(moduleTitle(i))&"','"&CheckStr(moduleType(i))&"',false,false,"&mOrder&")")
session(CookieName&"_MsgText")="新模块添加成功! "
end if
end if
next
for i=0 to ubound(selectID)
Select case doModule
Case "dohidden":
conn.execute("update blog_module set IsHidden=true where id="&selectID(i))
Case "cancelhidden":
conn.execute("update blog_module set IsHidden=false where id="&selectID(i))
Case "doIndex":
conn.execute("update blog_module set IndexOnly=true where id="&selectID(i))
Case "cancelIndex":
conn.execute("update blog_module set IndexOnly=false where id="&selectID(i))
end Select
next
log_module(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"模块保存成功!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
'--------------------------编辑模块HTML代码----------------------------
elseif Request.form("whatdo")="editModule" Then
moduleID=Request.form("DoID")
moduleName=Request.form("DoName")
moduleHtmlCode=ClearHTML(CheckStr(request.form("HtmlCode")))
SavehtmlCode moduleHtmlCode,moduleID
log_module(2)
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&moduleName&"”</span> 代码编辑成功!"
if Request.form("editType")="normal" then
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=editModuleNormal&miD="&moduleID)
else
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=editModule&miD="&moduleID)
end if
'-------------------------------删除模块------------------------------
elseif Request.form("whatdo")="delModule" Then
moduleID=Request.form("DoID")
if conn.execute("select isSystem from blog_module where id="&moduleID)(0) Then
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&conn.execute("select title from blog_module where id="&moduleID)(0)&"”</span> 是内置模块无法删除!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
Else
moduleName=conn.execute("select title from blog_module where id="&moduleID)(0)
delModule moduleID
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&moduleName&"”</span> 删除成功!"
log_module(2)
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
end If
'-------------------------------保存插件配置------------------------------
elseif Request.form("whatdo")="SavePluginsSetting" Then
Dim GetPlugName,GetPlugSetItems,GetPlugSetItemName,GetPlugSetItemValue
GetPlugName=Request.Form("PluginsName")
Set GetPlugSetItems=conn.Execute ("Select * from blog_ModSetting where set_ModName='"&GetPlugName&"'")
Do Until GetPlugSetItems.eof
GetPlugSetItemName=GetPlugSetItems("set_KeyName")
GetPlugSetItemValue=checkstr(Request.Form(GetPlugSetItemName))
conn.Execute ("update blog_ModSetting Set set_KeyValue='"&GetPlugSetItemValue&"' where set_ModName='"&GetPlugName&"'and set_KeyName='"&GetPlugSetItemName&"'")
GetPlugSetItems.movenext
Loop
Dim ModSetTemp2
Set ModSetTemp2=New ModSet
ModSetTemp2.Open GetPlugName
ModSetTemp2.ReLoad()
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&GetPlugName&"”</span> 设置保存成功!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=PluginsOptions&Plugins="&GetPlugName)
end If
'==========================附件管理===============================
elseif Request.form("action")="Attachments" then
'-------------------------------删除模块------------------------------
if Request.form("whatdo")="DelFiles" then
dim getFolders,getFiles,getFolder,getFile,getFolderCount,getFileCount
Dim FSODel
Set FSODel=Server.CreateObject("Scripting.FileSystemObject")
getFolders=split(Request.form("folders"),", ")
getFiles=split(Request.form("Files"),", ")
getFolderCount=0
getFileCount=0
for each getFolder in getFolders
if len(getPathList(getFolder)(1))>0 then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&getFolder&"”</span> 文件夹内含有文件,无法删除!"
Response.Redirect("ConContent.asp?Fmenu=SQLFile&Smenu=Attachments")
end if
if FSODel.FolderExists(Server.MapPath(getFolder)) then
FSODel.DeleteFolder Server.MapPath(getFolder),true
getFolderCount=getFolderCount+1
end if
next
for each getFile in getFiles
if FSODel.FileExists(Server.MapPath(getFile)) then
FSODel.DeleteFile Server.MapPath(getFile),true
getFileCount=getFileCount+1
end if
next
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="有 <span style=""color:#900"">"&getFileCount&" 文件, "&getFolderCount&" 个文件夹</span> 被删除!"
Response.Redirect("ConContent.asp?Fmenu=SQLFile&Smenu=Attachments")
end if
else'登录欢迎
end if
'----------------------End if--------------------
end if
%>
</div>
</body>
</html>
<%
Else
Response.Redirect("default.asp")
end if
%>
<a href="?Fmenu=Members&Smenu=EditRight&id=<%=blog_Status(0,i)%>" title="编辑该权限组"><img border="0" src="images/icon_edit.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>编辑权限</a>
<%if lcase(blog_Status(0,i))<>"supadmin" and lcase(blog_Status(0,i))<>"member" and lcase(blog_Status(0,i))<>"guest" then%>
<a href="javascript:CheckDelGroup('<%=blog_Status(0,i)%>')" title="删除该权限组"><img border="0" src="images/icon_del.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>删除权限</a>
<%end if%>
</td>
</tr>
<%next%>
<tr align="center" bgcolor="#D5DAE0">
<td colspan="12" class="TDHead" align="left" style="border-top:1px solid #999"><img src="images/add.gif" style="margin:0px 2px -3px 2px"/>添加新权限分组</td>
</tr>
<tr align="center">
<td ><input name="status_name" type="text" size="15" class="text" style="font-size:11px"/></td>
<td ><input name="status_title" type="text" size="20" class="text"/></td>
<td > </td>
</tr>
</table>
<div style="color:#f00">权限标识是唯一标记.一旦确定就无法修改.系统自带的权限组不允许删除.</div>
<div class="SubButton">
<input type="submit" name="Submit" value="保存权限组" class="button"/>
</div>
</div></form>
</td>
</tr></table>
<%
end if
elseif Request.QueryString("Fmenu")="Link" then '友情链接管理
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
<tr>
<th class="CTitle"><%=categoryTitle%></th>
</tr>
<tr>
<td class="CPanel"><form name="filter" action="ConContent.asp" method="post" style="margin:0px">
<%
dim disLink,disCount
if session(CookieName&"_disLink")="" then session(CookieName&"_disLink")="All"
if session(CookieName&"_disCount")="" then session(CookieName&"_disCount")="10"
disLink=session(CookieName&"_disLink")
disCount=session(CookieName&"_disCount")
dim FilterWhere
If CheckStr(Request.QueryString("Page"))<>Empty Then
Curpage=CheckStr(Request.QueryString("Page"))
If IsInteger(Curpage)=False or Curpage<0 Then Curpage=1
Else
Curpage=1
End If
%>
<div class="SubMenu">过滤器:
<input type="hidden" name="action" value="Links"/>
<input type="hidden" name="whatdo" value="Filter"/>
<select name="disLink" onchange="document.forms['filter'].submit()">
<option value="All">显示所有链接</option>
<option value="Allow" <%if disLink="Allow" then response.write ("selected=""selected""")%>>已通过验证链接</option>
<option value="NoAllow" <%if disLink="NoAllow" then response.write ("selected=""selected""")%>>未通过验证链接</option>
<option value="Top" <%if disLink="Top" then response.write ("selected=""selected""")%>>置顶链接</option>
<option value="NoTop" <%if disLink="NoTop" then response.write ("selected=""selected""")%>>未置顶链接</option>
</select> 每页显示 <select name="disCount" onchange="document.forms['filter'].submit()">
<option <%if int(disCount)=100 then response.write ("selected=""selected""")%>>100</option>
<option <%if int(disCount)=50 then response.write ("selected=""selected""")%>>50</option>
<option <%if int(disCount)=25 then response.write ("selected=""selected""")%>>25 </option>
<option <%if int(disCount)=10 then response.write ("selected=""selected""")%>>10</option>
</select>
条 <a href="#AddLink">添加新友情链接</a></div> </form>
<form name="Link" action="ConContent.asp" method="post" style="margin:0px">
<div align="left" style="padding:5px;"><%getMsg%>
<input type="hidden" name="action" value="Links"/>
<input type="hidden" name="whatdo" value="SaveLink"/>
<input type="hidden" name="ALinkID" value=""/>
<input type="hidden" name="Page" value="<%=Curpage%>"/>
<table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
<%
select case disLink
case "All"
FilterWhere=""
case "Allow"
FilterWhere=" where link_IsShow=true"
case "NoAllow"
FilterWhere=" where link_IsShow=false"
case "Top"
FilterWhere=" where link_IsMain=true"
case "NoTop"
FilterWhere=" where link_IsMain=false"
case else
FilterWhere=""
end select
dim bLink
Set bLink=Server.CreateObject("ADODB.RecordSet")
SQL="Select * FROM blog_Links"&FilterWhere&" order by link_IsShow desc,link_Order desc"
bLink.Open SQL,Conn,1,1
IF not bLink.EOF Then
bLink.PageSize=disCount
bLink.AbsolutePage=CurPage
Dim bLink_nums
bLink_nums=bLink.RecordCount
Dim MultiPages,PageCount
response.write "<tr><td colspan=""6"" style=""border-bottom:1px solid #999;""><div class=""pageContent"">"&MultiPage(bLink_nums,disCount,CurPage,"?Fmenu=Link&Smenu=&","","float:left")&"</div><div class=""Content-body"" style=""line-height:200%""></td></tr>"
end if
%>
<tr align="center">
<td width="16" nowrap="nowrap" class="TDHead"> </td>
<td width="120" nowrap="nowrap" class="TDHead">网站名称</td>
<td width="180" nowrap="nowrap" class="TDHead">网站地址</td>
<td width="250" nowrap="nowrap" class="TDHead">Logo图片地址</td>
<td class="TDHead">排序</td>
<td class="TDHead">操作</td>
</tr>
<%
IF not bLink.EOF Then
Do Until bLink.EOF or PageCount=bLink.PageSize
if not bLink("link_IsShow") then
%>
<tr align="center" bgcolor="#FCF4BC">
<td><img src="images/slink.gif" alt="没有通过验证链接"/></td>
<td><input name="LinkID" type="hidden" value="<%=bLink("link_ID")%>"/><input name="LinkName" type="text" size="18" class="text" value="<%=bLink("link_Name")%>"/></td>
<td><input name="LinkURL" type="text" size="30" class="text" value="<%=bLink("link_URL")%>"/></td>
<td><input name="LinkLogo" type="text" size="40" class="text" value="<%=bLink("link_Image")%>"/></td>
<td><input name="LinkOrder" type="text" class="text" size="2" value="<%=bLink("link_Order")%>"/></td>
<td><a href="#" onclick="ShowLink(<%=bLink("link_ID")%>)" title="通过该链接的验证"><img border="0" src="images/alink.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>通过</a> <a href="<%=bLink("link_URL")%>" target="_blank" title="查看该链接"><img border="0" src="images/icon_trackback.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>查看</a> <a href="#" onclick="Dellink(<%=bLink("link_ID")%>)" title="删除该链接"><img border="0" src="images/icon_del.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>删除</a> </td>
</tr>
<%else%>
<tr align="center">
<td><%if bLink("link_IsMain") then response.write ("<img src=""images/urlInTop.gif"" alt=""置顶链接""/>") else response.write (" ")%></td>
<td><input name="LinkID" type="hidden" value="<%=bLink("link_ID")%>"/><input name="LinkName" type="text" size="18" class="text" value="<%=bLink("link_Name")%>"/></td>
<td><input name="LinkURL" type="text" size="30" class="text" value="<%=bLink("link_URL")%>"/></td>
<td><input name="LinkLogo" type="text" size="40" class="text" value="<%=bLink("link_Image")%>"/></td>
<td><input name="LinkOrder" type="text" class="text" size="2" value="<%=bLink("link_Order")%>"/></td>
<td><%if bLink("link_IsMain") then response.write ("<a href=""#"" onclick=""Toplink("&bLink("link_ID")&")"" title=""取消该链接在首页置顶""><img border=""0"" src=""images/ct.gif"" style=""margin:0px 2px -3px 0px""/>取消</a> ") else response.write ("<a href=""#"" onclick=""Toplink("&bLink("link_ID")&")"" title=""把该链接在首页置顶""><img border=""0"" src=""images/it.gif"" style=""margin:0px 2px -3px 0px""/>置顶</a> ")%>
<a href="<%=bLink("link_URL")%>" target="_blank" title="查看该链接"><img border="0" src="images/icon_trackback.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>查看</a> <a href="#" onclick="Dellink(<%=bLink("link_ID")%>)" title="删除该链接"><img border="0" src="images/icon_del.gif" width="16" height="16" style="margin:0px 2px -3px 0px"/>删除</a> </td>
</tr>
<% end if
bLink.MoveNext
PageCount=PageCount+1
loop
bLink.Close
Set bLink=Nothing
end if%>
<tr align="center" bgcolor="#D5DAE0">
<td colspan="6" class="TDHead" align="left" style="border-top:1px solid #999"><a name="AddLink"></a><img src="images/add.gif" style="margin:0px 2px -3px 2px"/>添加新友情链接</td>
</tr>
<tr align="center">
<td> </td>
<td><input name="new_LinkID" type="hidden" value="-1"/><input name="new_LinkName" type="text" size="18" class="text"/></td>
<td><input name="new_LinkURL" type="text" size="30" class="text" /></td>
<td><input name="new_LinkLogo" type="text" size="40" class="text" /></td>
<td><input name="new_LinkOrder" type="text" class="text" size="2" /></td>
<td> </td>
</tr>
</table>
</div>
<div class="SubButton">
<input type="submit" name="Submit" value="保存友情链接" class="button"/>
</div>
</td>
</tr></table></div></form>
<%
elseif Request.QueryString("Fmenu")="smilies" then '表情与关键字
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
<tr>
<th class="CTitle"><%=categoryTitle%></th>
</tr>
<tr>
<td class="CPanel">
<div class="SubMenu"><a href="?Fmenu=smilies">表情管理</a> | <a href="?Fmenu=smilies&Smenu=KeyWord">关键字管理</a></div>
<div align="left" style="padding:5px;"><%getMsg%>
<%if Request.QueryString("Smenu")="KeyWord" then%>
<form action="ConContent.asp" method="post" style="margin:0px">
<input type="hidden" name="action" value="smilies"/>
<input type="hidden" name="whatdo" value="KeyWord"/>
<input type="hidden" name="DelID" value=""/>
<table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
<tr align="center">
<td width="16" nowrap="nowrap" class="TDHead"> </td>
<td width="120" nowrap="nowrap" class="TDHead">关键字</td>
<td width="220" nowrap="nowrap" class="TDHead">关键字链接地址</td>
</tr>
<%
dim bKeyWord
Set bKeyWord=conn.execute("select * from blog_Keywords order by key_ID desc")
do until bKeyWord.eof
%>
<tr align="center">
<td><input name="SelectKeyWordID" type="checkbox" value="<%=bKeyWord("key_ID")%>"/></td>
<td><input name="KeyWordID" type="hidden" value="<%=bKeyWord("key_ID")%>"/><input name="KeyWord" type="text" size="18" class="text" value="<%=bKeyWord("key_Text")%>"/></td>
<td><input name="KeyWordURL" type="text" size="34" class="text" value="<%=bKeyWord("key_URL")%>"/></td>
</tr>
<%
bKeyWord.movenext
loop
%>
<tr align="center" bgcolor="#D5DAE0">
<td colspan="3" class="TDHead" align="left" style="border-top:1px solid #999"><a name="AddLink"></a><img src="images/add.gif" style="margin:0px 2px -3px 2px"/>添加新关键字</td>
</tr>
<tr align="center">
<td></td>
<td><input name="KeyWordID" type="hidden" value="-1"/><input name="KeyWord" type="text" size="18" class="text"/></td>
<td><input name="KeyWordURL" type="text" size="34" class="text"/></td>
</tr>
</table>
<div class="SubButton" style="text-align:left;">
<select name="doModule">
<option value="SaveAll">保存所有关键字</option>
<option value="DelSelect">删除所选关键字</option>
</select>
<input type="submit" name="Submit" value="保存关键字" class="button" style="margin-bottom:0px"/>
</div> </form>
<%else%>
<form action="ConContent.asp" method="post" style="margin:0px">
<input type="hidden" name="action" value="smilies"/>
<input type="hidden" name="whatdo" value="smilies"/>
<input type="hidden" name="DelID" value=""/>
<table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
<tr align="center">
<td width="16" nowrap="nowrap" class="TDHead"> </td>
<td nowrap="nowrap" class="TDHead">图片</td>
<td width="100" nowrap="nowrap" class="TDHead">表情图片代码</td>
<td width="180" nowrap="nowrap" class="TDHead">表情图片地址</td>
</tr>
<%
dim bSmile
Set bSmile=conn.execute("select * from blog_Smilies order by sm_ID desc")
do until bSmile.eof
%>
<tr align="center">
<td><input name="selectSmiliesID" type="checkbox" value="<%=bSmile("sm_ID")%>"/></td>
<td><img src="images/smilies/<%=bSmile("sm_Image")%>" alt="<%=bSmile("sm_Image")%>"/></td>
<td><input name="smilesID" type="hidden" value="<%=bSmile("sm_ID")%>"/><input name="smiles" type="text" size="14" class="text" value="<%=bSmile("sm_Text")%>"/></td>
<td><input name="smilesURL" type="text" size="27" class="text" value="<%=bSmile("sm_Image")%>"/></td>
</tr>
<%
bSmile.movenext
loop
%>
<tr align="center" bgcolor="#D5DAE0">
<td colspan="4" class="TDHead" align="left" style="border-top:1px solid #999"><a name="AddLink"></a><img src="images/add.gif" style="margin:0px 2px -3px 2px"/>添加新表情</td>
</tr>
<tr align="center">
<td></td>
<td></td>
<td><input name="smilesID" type="hidden" value="-1"/><input name="smiles" type="text" size="14" class="text"/></td>
<td><input name="smilesURL" type="text" size="27" class="text"/></td>
</tr>
</table>
<div class="SubButton" style="text-align:left;">
<select name="doModule">
<option value="SaveAll">保存所有表情</option>
<option value="DelSelect">删除所选表情</option>
</select>
<input type="submit" name="Submit" value="保存表情" class="button" style="margin-bottom:0px"/>
</div> </form>
<%end if%>
</div>
</td></tr></table>
<%
elseif Request.QueryString("Fmenu")="Status" then '服务器配置
%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
<tr>
<th class="CTitle"><%=categoryTitle%></th>
</tr>
<tr>
<td class="CPanel">
<div align="left" style="padding:5px;line-height:150%">
<b>软件版本:</b> PJBlog2 v<%=blog_version%> - <%=DateToStr(blog_UpdateDate,"mdy")%><br/>
<b>服务器时间:</b> <%=DateToStr(Now(),"Y-m-d H:I A")%><br/>
<b>服务器物理路径:</b> <%=Request.ServerVariables("APPL_PHYSICAL_PATH")%><br/>
<b>服务器空间占用:</b> <%=GetTotalSize(Request.ServerVariables("APPL_PHYSICAL_PATH"),"Folder")%><br/>
<b>服务器CPU数量:</b> <%=Request.ServerVariables("NUMBER_OF_PROCESSORS")%><br/>
<b>服务器IIS版本:</b> <%=Request.ServerVariables("SERVER_SOFTWARE")%><br/>
<b>脚本超时设置:</b> <%=Server.ScriptTimeout%><br/>
<b>脚本解释引擎:</b> <%=ScriptEngine & "/"& ScriptEngineMajorVersion &"."&ScriptEngineMinorVersion&"."& ScriptEngineBuildVersion %><br/>
<b>服务器操作系统:</b> <%=Request.ServerVariables("OS")%><br/>
<b>服务器IP地址:</b> <%=Request.ServerVariables("LOCAL_ADDR")%><br/>
<b>客户端IP地址:</b> <%=Request.ServerVariables("REMOTE_ADDR")%><br/><br/>
<b>关键组件:</b> (缺少关键组件的服务器会对PJBlog2运行有一定影响)<br/>
<b> - Scripting.FileSystemObject 组件:</b> <%=DisI(CheckObjInstalled("Scripting.FileSystemObject"))%><br/>
<b> - MSXML2.ServerXMLHTTP 组件:</b> <%=DisI(CheckObjInstalled("MSXML2.ServerXMLHTTP"))%><br/>
<b> - Microsoft.XMLDOM 组件:</b> <%=DisI(CheckObjInstalled("Microsoft.XMLDOM"))%><br/>
<b> - ADODB.Stream 组件:</b> <%=DisI(CheckObjInstalled("ADODB.Stream"))%><br/>
<b> - Scripting.Dictionary 组件:</b> <%=DisI(CheckObjInstalled("Scripting.Dictionary"))%><br/>
<br/>
<b>其他组件: </b>(以下组件不影响PJBlog2运行)<br/>
<b> - Msxml2.ServerXMLHTTP.5.0 组件:</b> <%=DisI(CheckObjInstalled("Msxml2.ServerXMLHTTP.5.0"))%><br/>
<b> - Msxml2.DOMDocument.5.0 组件:</b> <%=DisI(CheckObjInstalled("Msxml2.DOMDocument.5.0"))%><br/>
<b> - FileUp.upload 组件:</b> <%=DisI(CheckObjInstalled("FileUp.upload"))%><br/>
<b> - JMail.SMTPMail 组件:</b> <%=DisI(CheckObjInstalled("JMail.SMTPMail"))%><br/>
<b> - GflAx190.GflAx 组件:</b> <%=DisI(CheckObjInstalled("GflAx190.GflAx"))%><br/>
<b> - easymail.Mailsend 组件:</b> <%=DisI(CheckObjInstalled("easymail.Mailsend"))%><br/>
</div>
</td></tr></table>
<%
elseif Request.QueryString("Fmenu")="Logout" then '退出
session(CookieName&"_System")=""
session(CookieName&"_disLink")=""
session(CookieName&"_disCount")=""
%>
<script>try{top.location="default.asp"}catch(e){location="default.asp"}</script>
<%
elseif Request.QueryString("Fmenu")="welcome" then '欢迎%>
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="CContent">
<tr>
<th class="CTitle"><%=categoryTitle%></th>
</tr>
<tr>
<td class="CPanel">
<div id="updateInfo" style="background:ffffe1;border:1px solid #89441f;padding:4px;display:none"></div>
<script>
var CVersion="<%=blog_version%>";
var CDate="<%=blog_UpdateDate%>";
</script>
<script src="http://www.pjhome.net/updateN.js"></script>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top" style="padding:5px;width:140px"><img src="images/Control/Icon/ControlPanel.png"/></td>
<td valign="top">
<div align="left" style="padding:5px;line-height:170%;clear:both;font-size:12px">
<b>当前软件版本:</b> PJBlog2 v<%=blog_version%><br/>
<b>软件更新日期:</b> <%=DateToStr(blog_UpdateDate,"mdy")%><br/>
<b>日志数量:</b> <%=blog_LogNums%> 篇<br/>
<b>评论数量:</b> <%=blog_CommNums%> 个<br/>
<b>引用数量:</b> <%=blog_TbCount%> 个<br/>
<b>留言数量:</b> <%=blog_MessageNums%> 个(需要留言本插件支持)<br/>
<b>会员数:</b> <%=blog_MemNums%> 人<br/>
<b>访问次数:</b> <%=blog_VisitNums%> 次<br/>
</div>
</td>
</tr>
</table>
</td></tr></table>
<%else
'==========================后台信息处理===============================
dim weblog
Set weblog=Server.CreateObject("ADODB.RecordSet")
'==========================基本信息处理===============================
if Request.form("action")="General" then
if Request.form("whatdo")="General" then
'--------------------------基本信息处理-------------------
SQL="Select * FROM blog_Info"
weblog.Open SQL,Conn,1,3
weblog("blog_Name")=checkURL(CheckStr(Request.form("SiteName")))
weblog("blog_Title")=checkURL(CheckStr(Request.form("blog_Title")))
weblog("blog_master")=checkURL(CheckStr(Request.form("blog_master")))
weblog("blog_email")=checkURL(CheckStr(Request.form("blog_email")))
if right(CheckStr(Request.form("SiteURL")),1)<>"/" then
weblog("blog_URL")=checkURL(CheckStr(Request.form("SiteURL")))&"/"
else
weblog("blog_URL")=checkURL(CheckStr(Request.form("SiteURL")))
end if
weblog("blog_affiche")=""
weblog("blog_about")=CheckStr(Request.form("blog_about"))
weblog("blog_PerPage")=CheckStr(Request.form("blogPerPage"))
weblog("blog_commPage")=CheckStr(Request.form("blogcommpage"))
weblog("blog_BookPage")=0 'CheckStr(Request.form("blogBookPage"))
weblog("blog_commTimerout")=CheckStr(Request.form("blog_commTimerout"))
weblog("blog_commLength")=CheckStr(Request.form("blog_commLength"))
if CheckObjInstalled("ADODB.Stream") then
if CheckStr(Request.form("blog_postFile"))="1" then weblog("blog_postFile")=1 else weblog("blog_postFile")=0
else
weblog("blog_postFile")=0
end if
if CheckStr(Request.form("blog_Disregister"))="1" then weblog("blog_Disregister")=1 else weblog("blog_Disregister")=0
if CheckStr(Request.form("blog_validate"))="1" then weblog("blog_validate")=1 else weblog("blog_validate")=0
if CheckStr(Request.form("blog_commUBB"))="1" then weblog("blog_commUBB")=1 else weblog("blog_commUBB")=0
if CheckStr(Request.form("blog_commIMG"))="1" then weblog("blog_commIMG")=1 else weblog("blog_commIMG")=0
if CheckStr(Request.form("blog_ImgLink"))="1" then weblog("blog_ImgLink")=1 else weblog("blog_ImgLink")=0
weblog("blog_SplitType")=CBool(CheckStr(Request.form("blog_SplitType")))
weblog("blog_introChar")=CheckStr(Request.form("blog_introChar"))
weblog("blog_introLine")=CheckStr(Request.form("blog_introLine"))
weblog("blog_FilterName")=CheckStr(Request.form("Register_UserNames"))
weblog("blog_FilterIP")=CheckStr(Request.form("FilterIPs"))
weblog("blog_DisMod")=CheckStr(Request.form("blog_DisMod"))
if not IsInteger(Request.form("blog_CountNum")) then
weblog("blog_CountNum")=0
else
weblog("blog_CountNum")=Request.form("blog_CountNum")
end if
weblog("blog_wapNum")=CheckStr(Request.form("blog_wapNum"))
if CheckStr(Request.form("blog_wapImg"))="1" then weblog("blog_wapImg")=1 else weblog("blog_wapImg")=0
if CheckStr(Request.form("blog_wapHTML"))="1" then weblog("blog_wapHTML")=1 else weblog("blog_wapHTML")=0
if CheckStr(Request.form("blog_wapLogin"))="1" then weblog("blog_wapLogin")=1 else weblog("blog_wapLogin")=0
if CheckStr(Request.form("blog_wapComment"))="1" then weblog("blog_wapComment")=1 else weblog("blog_wapComment")=0
if CheckStr(Request.form("blog_wap"))="1" then weblog("blog_wap")=1 else weblog("blog_wap")=0
if CheckStr(Request.form("blog_wapURL"))="1" then weblog("blog_wapURL")=1 else weblog("blog_wapURL")=0
Response.Cookies(CookieNameSetting)("ViewType")=""
weblog.update
weblog.close
getInfo(2)
if int(Request.form("SiteOpen"))=1 then
Application.Lock
Application(CookieName & "_SiteEnable") = 1
Application(CookieName & "_SiteDisbleWhy") = ""
Application.UnLock
Else
Application.Lock
Application(CookieName & "_SiteEnable") = 0
Application(CookieName & "_SiteDisbleWhy") = "抱歉!网站暂时关闭!"
Application.UnLock
end if
session(CookieName&"_ShowMsg") = true
session(CookieName&"_MsgText") = "基本信息修改成功!"
Response.Redirect("ConContent.asp?Fmenu=General&Smenu=")
elseif Request.form("whatdo")="Misc" Then %>
<!--#include file="common/ubbcode.asp" -->
<%
if Request.form("ReBulidArticle")=1 Then
Dim LoadArticle,LogLen
LogLen=0
Set LoadArticle=conn.Execute("Select log_ID FROM blog_Content")
Do Until LoadArticle.eof
PostArticle LoadArticle("log_ID")
LogLen=LogLen+1
LoadArticle.movenext
Loop
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")=Session(CookieName&"_MsgText")&"共转换 "&LogLen&" 篇日志到文件! "
End If
if Request.form("ReBulidIndex")=1 Then
dim lArticle
set lArticle = new ArticleCache
lArticle.SaveCache
set lArticle = nothing
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")=Session(CookieName&"_MsgText")&"重新输出日志索引! "
end if
if Request.form("ReTatol")=1 Then
dim blog_Content_count,blog_Comment_count,ContentCount,TBCount,Count_Member
ContentCount=0
TBCount=conn.execute("select count(*) from blog_Trackback")(0)
Count_Member=conn.execute("select count(*) from blog_Member")(0)
conn.execute("update blog_Info set blog_tbNums="&TBCount)
conn.execute("update blog_Info set blog_MemNums="&Count_Member)
set blog_Content_count=conn.execute("Select log_CateID, Count(log_CateID) FROM blog_Content where log_IsDraft=false GROUP BY log_CateID")
set blog_Comment_count=conn.execute("Select Count(*) FROM blog_Comment")
do while not blog_Content_count.eof
ContentCount=ContentCount+blog_Content_count(1)
conn.execute("update blog_Category set cate_count="&blog_Content_count(1)&" where cate_ID="&blog_Content_count(0))
blog_Content_count.movenext
Loop
conn.execute("update blog_Info set blog_LogNums="&ContentCount)
conn.execute("update blog_Info set blog_CommNums="&blog_Comment_count(0))
getInfo(2):CategoryList(2)
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"数据统计完成! "
end if
if Request.form("CleanVisitor")=1 then
conn.execute("delete * from blog_Counter")
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"访客数据清除完成! "
end if
if Request.form("ReBulid")=1 then
FreeMemory
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"缓存重建成功! "
end If
Response.Redirect("ConContent.asp?Fmenu=General&Smenu=Misc")
else
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="非法提交内容"
Response.Redirect("ConContent.asp?Fmenu=General&Smenu=")
end if
'==========================处理日志分类===============================
elseif Request.form("action")="Categories" then
'--------------------------处理日志批量移动----------------------------
if Request.form("whatdo")="move" then
dim Cate_source,Cate_target,Cate_source_name,Cate_source_count,Cate_target_name
Cate_source=int(CheckStr(Request.form("source")))
Cate_target=int(CheckStr(Request.form("target")))
if Cate_source=Cate_target then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="源分类和目标分类一致无法移动"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=move")
end if
Cate_source_name=conn.execute("select cate_Name from blog_Category where cate_ID="&Cate_source)(0)
Cate_source_count=conn.execute("select cate_count from blog_Category where cate_ID="&Cate_source)(0)
Cate_target_name=conn.execute("select cate_Name from blog_Category where cate_ID="&Cate_target)(0)
conn.execute ("update blog_Content set log_CateID="&Cate_target&" where log_CateID="&Cate_source)
conn.execute ("update blog_Category set cate_count=0 where cate_ID="&Cate_source)
conn.execute ("update blog_Category set cate_count=cate_count+"&Cate_source_count&" where cate_ID="&Cate_target)
CategoryList(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#f00"">"&Cate_source_name&"</span> 移动到 <span style=""color:#f00"">"&Cate_target_name&"</span> 成功! 批量转移后,请到 <a href=""ConContent.asp?Fmenu=General&Smenu=Misc"" style=""color:#00f"">站点基本设置-初始化数据</a> ,重新生成所有日志到文件"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=move")
'--------------------------处理日志分类----------------------------
elseif Request.form("whatdo")="Cate" then
'处理存在分类
dim LCate_ID,LCate_icons,LCate_Name,LCate_Intro,Lcate_URL,Lcate_Order,Lcate_count,LCate_local,Lcate_Secret
dim NCate_ID,NCate_icons,NCate_Name,NCate_Intro,Ncate_URL,Ncate_Order,NCate_local,Ncate_OutLink,Ncate_Secret
LCate_ID=split(Request.form("Cate_ID"),", ")
LCate_Name=split(Request.form("Cate_Name"),", ")
LCate_icons=split(Request.form("Cate_icons"),", ")
LCate_Intro=split(Request.form("Cate_Intro"),", ")
Lcate_URL=split(Request.form("cate_URL"),", ")
Lcate_Order=split(Request.form("cate_Order"),", ")
Lcate_count=split(Request.form("cate_count"),", ")
LCate_local=Split(Request.form("Cate_local"),", ")
Lcate_Secret=Split(Request.form("cate_Secret"),", ")
For i=0 To UBound(LCate_Name)
SQL="Select * FROM blog_Category where cate_ID="&int(CheckStr(LCate_ID(i)))
weblog.Open SQL,Conn,1,3
weblog("cate_Name")=CheckStr(LCate_Name(i))
weblog("cate_icon")=CheckStr(LCate_icons(i))
weblog("Cate_Intro")=CheckStr(LCate_Intro(i))
if len(trim(Lcate_URL(i)))>1 and int(Lcate_count(i))<1 then
weblog("cate_URL")=trim(CheckStr(Lcate_URL(i)))
weblog("cate_OutLink")=true
else
weblog("cate_URL")=trim(CheckStr(Lcate_URL(i)))
weblog("cate_OutLink")=false
end if
weblog("cate_Order")=int(CheckStr(Lcate_Order(i)))
weblog("Cate_local")=int(CheckStr(LCate_local(i)))
weblog("cate_Secret")=CBool(CheckStr(Lcate_Secret(i)))
weblog.update
weblog.close
next
'判断添加新日志
NCate_Name=trim(CheckStr(Request.form("New_Cate_Name")))
NCate_icons=CheckStr(Request.form("New_Cate_icons"))
NCate_Intro=trim(CheckStr(Request.form("New_Cate_Intro")))
Ncate_URL=trim(CheckStr(Request.form("New_cate_URL")))
Ncate_Order=CheckStr(Request.form("New_cate_Order"))
NCate_local=CheckStr(Request.form("New_Cate_local"))
Ncate_Secret=CheckStr(Request.form("New_Cate_Secret"))
if len(NCate_Name)>0 then
if len(Ncate_Order)<1 then Ncate_Order=conn.execute("select count(*) from blog_Category")(0)
if len(Ncate_URL)>0 then Ncate_OutLink=true else Ncate_OutLink=false
dim AddCateArray
AddCateArray=array(array("cate_Name",NCate_Name),array("cate_icon",NCate_icons),array("Cate_Intro",NCate_Intro),array("cate_URL",Ncate_URL),array("cate_OutLink",Ncate_OutLink),array("cate_Order",int(Ncate_Order)),array("Cate_local",NCate_local),Array("Cate_Secret",NCate_Secret))
if DBQuest("blog_Category",AddCateArray,"insert")=0 then session(CookieName&"_MsgText")="新日志分类添加成功,"
end if
FreeMemory
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"日志分类更新成功!"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=")
'--------------------------批量删除日志----------------------------
elseif Request.form("whatdo")="batdel" then
dim CID,Cids,tti,C1,C2
C1=0
C2=0
CID=checkstr(request.form("CID"))
Cids=split(CID,", ")
for tti=0 to ubound(Cids)
if DeleteLog(Cids(tti))=1 then
C1=C1+1
else
C2=C2+1
end if
next
FreeMemory
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="日志删除状态:"&C1&"篇成功,"&C2&"篇失败! 批量删除后,请到 <a href=""ConContent.asp?Fmenu=General&Smenu=Misc"" style=""color:#00f"">站点基本设置-初始化数据</a> ,重新生成所有日志到文件"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=del")
'--------------------------删除日志分类----------------------------
elseif Request.form("whatdo")="DelCate" then
Dim DelCate,DelLog,DelID,conCount,comCount,P1,P2
P1=0
p2=0
DelCate=Request.form("DelCate")
set DelLog=Conn.Execute("select log_ID FROM blog_Content Where log_CateID="&DelCate)
do while not DelLog.eof
DelID=DelLog("log_ID")
if DeleteLog(DelID)=1 then
P1=P1+1
else
P2=P2+1
end if
DelLog.movenext
loop
Conn.ExeCute("Delete * FROM blog_Category Where cate_ID="&DelCate)
FreeMemory
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"日志分类删除成功! 日志删除状态:"&P1&"篇成功,"&P2&"篇失败! 批量删除后,请到 <a href=""ConContent.asp?Fmenu=General&Smenu=Misc"" style=""color:#00f"">站点基本设置-初始化数据</a> ,重新生成所有日志到文件"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=")
elseif Request.form("whatdo")="Tag" then
Dim TagsID,TagName
if Request.form("doModule")="DelSelect" then
TagsID=split(Request.form("selectTagID"),", ")
for i=0 to ubound(TagsID)
conn.execute("Delete * from blog_tag where tag_id="&TagsID(i))
next
Tags(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&(ubound(TagsID)+1)&" 个Tag被删除!"
if blog_postFile then session(CookieName&"_MsgText")=session(CookieName&"_MsgText")+"由于你使用了静态日志功能,所以删除tag后建议到 <a href='ConContent.asp?Fmenu=General&Smenu=Misc' title='站点基本设置-初始化数据 '>初始化数据</a> 重新生成所有日志一次."
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=tag")
else
TagsID=split(Request.form("TagID"),", ")
TagName=split(Request.form("tagName"),", ")
for i=0 to ubound(TagsID)
if int(TagsID(i))<>-1 then
conn.execute("update blog_tag set tag_name='"&CheckStr(TagName(i))&"' where tag_id="&TagsID(i))
else
if len(trim(CheckStr(TagName(i))))>0 then
conn.execute("insert into blog_tag (tag_name,tag_count) values ('"&CheckStr(TagName(i))&"',0)")
session(CookieName&"_MsgText")="新Tag添加成功! "
end if
end if
next
Tags(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"Tag保存成功!"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=tag")
end if
else
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="非法提交内容!"
Response.Redirect("ConContent.asp?Fmenu=Categories&Smenu=")
end if
'==========================评论留言处理===============================
elseif Request.form("action")="Comment" then
dim selCommID,doCommID,doTitle,doRedirect,t1,t2
selCommID=split(Request.form("selectCommentID"),", ")
doCommID=split(Request.form("CommentID"),", ")
if Request.form("doModule")="updateKey" then
saveFilterKey Request.form("keyList")
elseif Request.form("doModule")="updateRegKey" then
saveReFilterKey
elseif Request.form("doModule")="DelSelect" then
for i=0 to ubound(selCommID)
if Request.form("whatdo")="trackback" then
t1=int(split(selCommID(i),"|")(0)): t2=int(split(selCommID(i),"|")(1))
conn.execute("Update blog_Content SET log_QuoteNums=log_QuoteNums-1 Where log_ID="&t2)
conn.execute("Delete * from blog_Trackback where tb_ID="&t1)
conn.Execute("Update blog_Info Set blog_tbNums=blog_tbNums-1")
doTitle="引用通告"
PostArticle t2
doRedirect="trackback"
elseif Request.form("whatdo")="msg" then
conn.execute("Delete * from blog_book where book_ID="&selCommID(i))
doTitle="留言"
doRedirect="msg"
else
t1=int(split(selCommID(i),"|")(0)): t2=int(split(selCommID(i),"|")(1))
conn.execute("update blog_Content set log_CommNums=log_CommNums-1 where log_ID="&t2)
conn.ExeCute("update blog_Info set blog_CommNums=blog_CommNums-1")
conn.execute("Delete * from blog_Comment where comm_ID="&t1)
doTitle="评论"
doRedirect=""
PostArticle t2
end if
next
getInfo(2)
NewComment(2)
Application.Lock
Application(CookieName&"_blog_Message")=""
Application.UnLock
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=(ubound(selCommID)+1)&" 个"&doTitle&"记录被删除!"
Response.Redirect("ConContent.asp?Fmenu=Comment&Smenu="&doRedirect)
elseif Request.form("doModule")="Update" then
for i=0 to ubound(doCommID)
if Request.form("whatdo")="msg" then
if int(Request.form("edited_"&doCommID(i)))=1 then
conn.execute("Update blog_book SET book_Content='"&checkStr(Request.form("message_"&doCommID(i)))&"',book_replyAuthor='"&memName&"',book_replyTime=#"&DateToStr(now(),"Y-m-d H:I:S")&"#,book_reply='"&checkStr(Request.form("reply_"&doCommID(i)))&"' Where book_ID="&doCommID(i))
else
conn.execute("Update blog_book SET book_Content='"&checkStr(Request.form("message_"&doCommID(i)))&"',book_replyAuthor='"&memName&"',book_reply='"&checkStr(Request.form("reply_"&doCommID(i)))&"' Where book_ID="&doCommID(i))
end if
doTitle="留言"
doRedirect="msg"
elseif Request.form("whatdo")="comment" then
conn.execute("Update blog_Comment SET comm_Content='"&checkStr(Request.form("message_"&doCommID(i)))&"',comm_Reply='"&checkStr(Request.form("reply_"&doCommID(i)))&"',Comm_replytime='"&now&"' Where comm_ID="&doCommID(i))
doTitle="评论"
doRedirect=""
end if
next
NewComment(2)
Application.Lock
Application(CookieName&"_blog_Message")=""
Application.UnLock
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=doTitle&"记录更新成功!"
Response.Redirect("ConContent.asp?Fmenu=Comment&Smenu="&doRedirect)
end if
'==========================处理帐户和权限信息===============================
elseif Request.form("action")="Members" then
'--------------------------处理权限组信息----------------------------
if Request.form("whatdo")="Group" then
dim status_name,status_title,Rights,allCount,addCount
status_name=split(Request.form("status_name"),", ")
status_title=split(Request.form("status_title"),", ")
allCount=ubound(status_name)
dim NS_Name,NS_Title,NS_Code,NS_UpSize,NS_UploadType,tmpNS
if len(status_name(allCount))>0 then
NS_Name=CheckStr(status_name(allCount))
NS_Title=CheckStr(status_title(allCount))
if not IsValidChars(NS_Name) then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">添加新权限失败!权限标识不能为英文或数字以外的字符</span>"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
end if
set tmpNS=conn.execute("select stat_name from blog_status where stat_name='"&NS_Name&"'")
if not tmpNS.eof then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&NS_Name&"”</span> 权限标识已经存在无法添加新分组!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
end if
conn.execute("insert into blog_status (stat_name,stat_title,stat_Code,stat_attSize,stat_attType) values ('"&NS_Name&"','"&NS_Title&"','000000000000',0,'')")
session(CookieName&"_MsgText")="新分组添加成功!"
end if
for i=0 to ubound(status_name)-1
conn.execute("update blog_status set stat_title='"&CheckStr(status_title(i))&"' where stat_name='"&CheckStr(status_name(i))&"'")
next
UserRight(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"权限组信息修改成功!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
'--------------------------处理帐户信息----------------------------
elseif Request.form("whatdo")="User" then
'--------------------------编辑分组信息----------------------------
elseif Request.form("whatdo")="EditGroup" then
dim EditGroup,AddArticle,EditArticle,DelArticle,AddComment,DelComment,ShowHiddenCate,IsAdmin,CanUpload,UploadSize,UploadType,Group_title,SCode
EditGroup=CheckStr(Request.form("status_name"))
AddArticle=CheckStr(Request.form("AddArticle"))
EditArticle=CheckStr(Request.form("EditArticle"))
DelArticle=CheckStr(Request.form("DelArticle"))
AddComment=CheckStr(Request.form("AddComment"))
DelComment=CheckStr(Request.form("DelComment"))
ShowHiddenCate=CheckStr(Request.form("ShowHiddenCate"))
IsAdmin=CheckStr(Request.form("IsAdmin"))
CanUpload=CheckStr(Request.form("CanUpload"))
UploadSize=CheckStr(Request.form("UploadSize"))
UploadType=CheckStr(Request.form("UploadType"))
Group_title=CheckStr(Request.form("status_title"))
SCode=AddArticle & EditArticle & DelArticle &_
AddComment & DelComment & CanUpload & IsAdmin & ShowHiddenCate
conn.execute("update blog_status set stat_title='"&Group_title&"',stat_code='"&SCode&"',stat_attSize="&UploadSize&",stat_attType='"&UploadType&"' where stat_name='"&EditGroup&"'")
UserRight(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&EditGroup&"”</span>权限分组 编辑成功!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=EditRight&id="&EditGroup)
'--------------------------删除分组信息----------------------------
elseif Request.form("whatdo")="DelGroup" then
dim DelGroup
DelGroup=CheckStr(Request.form("DelGroup"))
if lcase(DelGroup)<>"supadmin" and lcase(DelGroup)<>"member" and lcase(DelGroup)<>"guest" then
conn.execute ("update blog_Member set mem_Status='Member' where mem_Status='"&DelGroup&"'")
Conn.ExeCute("Delete * FROM blog_status Where stat_name='"&DelGroup&"'")
UserRight(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&DelGroup&"”</span>权限分组 删除成功!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
else
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="特殊分组无法删除!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
end if
'--------------------------保存用户权限----------------------------
elseif Request.form("whatdo")="SaveUserRight" then
for i=1 to Request.form("mem_ID").count
conn.execute("update blog_Member set mem_Status='"&Request.form("mem_Status").item(i)&"' where mem_ID="&Request.form("mem_ID").item(i))
next
session(CookieName&"_ShowMsg") = true
session(CookieName&"_MsgText") = "用户权限设置成功!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=Users")
'--------------------------删除用户----------------------------
elseif Request.form("whatdo")="DelUser" then
dim DelUserID,DelUserName,blogmemberNum, DelUserStatus
DelUserID=Request.form("DelID")
blogmemberNum=conn.execute("select count(mem_ID) from blog_Member where mem_Status='SupAdmin'")(0)
DelUserStatus=conn.execute("select mem_Status from blog_Member where mem_ID="&DelUserID)(0)
if ((blogmemberNum = 1) and (DelUserStatus = "SupAdmin")) then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="不能删除仅有的管理员权限!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=Users")
else
DelUserName=conn.execute("select mem_Name from blog_Member where mem_ID="&DelUserID)(0)
conn.execute("delete * from blog_Member where mem_ID="&DelUserID)
Conn.ExeCute("Update blog_Info SET blog_MemNums=blog_MemNums-1")
getInfo(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&DelUserName&"”</span> 删除成功!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=Users")
end if
else
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="非法提交内容!"
Response.Redirect("ConContent.asp?Fmenu=Members&Smenu=")
end if
'==========================友情链接管理===============================
elseif Request.form("action")="Links" then
dim LinkID,LinkName,LinkURL,LinkLogo,LinkOrder,LinkMain
'--------------------------友情链接过滤----------------------------
if Request.form("whatdo")="Filter" then
session(CookieName&"_disLink")=CheckStr(Request.form("disLink"))
session(CookieName&"_disCount")=CheckStr(Request.form("disCount"))
Response.Redirect("ConContent.asp?Fmenu=Link&Smenu=")
'--------------------------保存友情链接----------------------------
elseif Request.form("whatdo")="SaveLink" then
dim TLinkName,TLinkURL,TLinkLogo,TLinkOrder
LinkID=split(Request.form("LinkID"),", ")
LinkName=split(Request.form("LinkName"),", ")
LinkURL=split(Request.form("LinkURL"),", ")
LinkLogo=split(Request.form("LinkLogo"),", ")
LinkOrder=split(Request.form("LinkOrder"),", ")
for i=0 to ubound(LinkID)
if ubound(LinkName)<0 then TLinkName="未知" else TLinkName=LinkName(i)
if ubound(LinkURL)<0 then TLinkURL="http://" else TLinkURL=LinkURL(i)
if ubound(LinkLogo)<0 then TLinkLogo="" else TLinkLogo=LinkLogo(i)
if ubound(LinkOrder)<0 then TLinkOrder="0" else TLinkOrder=LinkOrder(i)
conn.execute("update blog_Links set link_Name='"&CheckStr(TLinkName)&"',link_URL='"&CheckStr(TLinkURL)&"',link_Image='"&CheckStr(TLinkLogo)&"',link_Order='"&CheckStr(TLinkOrder)&"' where link_ID="&LinkID(i))
next
LinkID=Request.form("new_LinkID")
LinkName=Request.form("new_LinkName")
LinkURL=Request.form("new_LinkURL")
LinkLogo=Request.form("new_LinkLogo")
LinkOrder=Request.form("new_LinkOrder")
if len(LinkOrder)<1 then LinkOrder=conn.execute("select count(*) from blog_Links")(0)
if len(trim(CheckStr(LinkName)))>0 then
conn.execute("insert into blog_Links (link_Name,link_URL,link_Image,link_Order,link_IsShow) values ('"&CheckStr(LinkName)&"','"&CheckStr(LinkURL)&"','"&CheckStr(LinkLogo)&"','"&CheckStr(LinkOrder)&"',true)")
session(CookieName&"_MsgText")="新友情链接添加成功! "
end if
Bloglinks(2)
PostLink
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"保存链接成功!"
Response.Redirect("ConContent.asp?Fmenu=Link&Smenu=&page="&Request.form("page"))
'--------------------------通过友情链接----------------------------
elseif Request.form("whatdo")="ShowLink" then
conn.execute ("update blog_Links set link_IsShow=true where link_ID="&CheckStr(Request.form("ALinkID")))
LinkName=conn.execute ("select link_Name from blog_Links where link_ID="&CheckStr(Request.form("ALinkID")))(0)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 通过验证!"
Bloglinks(2)
PostLink
Response.Redirect("ConContent.asp?Fmenu=Link&Smenu=&page="&Request.form("page"))
'--------------------------置顶友情链接----------------------------
elseif Request.form("whatdo")="TopLink" then
conn.execute ("update blog_Links set link_IsMain=not link_IsMain where link_ID="&CheckStr(Request.form("ALinkID")))
LinkName=conn.execute ("select link_Name from blog_Links where link_ID="&CheckStr(Request.form("ALinkID")))(0)
LinkMain=conn.execute ("select link_IsMain from blog_Links where link_ID="&CheckStr(Request.form("ALinkID")))(0)
session(CookieName&"_ShowMsg")=true
if LinkMain then
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 置顶成功!"
else
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 取消首页置顶!"
end if
Bloglinks(2)
PostLink
Response.Redirect("ConContent.asp?Fmenu=Link&Smenu=&page="&Request.form("page"))
'--------------------------删除友情链接----------------------------
elseif Request.form("whatdo")="DelLink" then
LinkName=conn.execute ("select link_Name from blog_Links where link_ID="&CheckStr(Request.form("ALinkID")))(0)
conn.execute ("Delete * from blog_Links where link_ID="&CheckStr(Request.form("ALinkID")))
Session(CookieName&"_ShowMsg")=true
Session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"<span style=""color:#900"">“"&LinkName&"”</span> 删除成功!"
Bloglinks(2)
PostLink
Response.Redirect("ConContent.asp?Fmenu=Link&Smenu=&page="&Request.form("page"))
end if
'==========================表情和关键字===============================
elseif Request.form("action")="smilies" then
dim smilesID,smiles,smilesURL
dim KeyWordID,KeyWord,KeyWordURL
'--------------------------处理表情符号----------------------------
if Request.form("whatdo")="smilies" then
if Request.form("doModule")="DelSelect" then
smilesID=split(Request.form("selectSmiliesID"),", ")
for i=0 to ubound(smilesID)
conn.execute("Delete * from blog_Smilies where sm_ID="&smilesID(i))
next
Smilies(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&(ubound(smilesID)+1)&" 个表情被删除!"
Response.Redirect("ConContent.asp?Fmenu=smilies&Smenu=")
else
smilesID=split(Request.form("smilesID"),", ")
smiles=split(Request.form("smiles"),", ")
smilesURL=split(Request.form("smilesURL"),", ")
for i=0 to ubound(smilesID)
if int(smilesID(i))<>-1 then
conn.execute("update blog_Smilies set sm_Text='"&CheckStr(smiles(i))&"',sm_Image='"&CheckStr(smilesURL(i))&"' where sm_ID="&smilesID(i))
else
if len(trim(CheckStr(smiles(i))))>0 then
conn.execute("insert into blog_Smilies (sm_Text,sm_Image) values ('"&CheckStr(smiles(i))&"','"&CheckStr(smilesURL(i))&"')")
session(CookieName&"_MsgText")="新表情添加成功! "
end if
end if
next
Smilies(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"表情保存成功!"
Response.Redirect("ConContent.asp?Fmenu=smilies&Smenu=")
end if
Elseif Request.form("whatdo")="KeyWord" then
if Request.form("doModule")="DelSelect" then
KeyWordID=split(Request.form("SelectKeyWordID"),", ")
for i=0 to ubound(KeyWordID)
conn.execute("Delete * from blog_Keywords where key_ID="&KeyWordID(i))
next
Keywords(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&(ubound(KeyWordID)+1)&"关键字被删除!"
Response.Redirect("ConContent.asp?Fmenu=smilies&Smenu=KeyWord")
else
KeyWordID=split(Request.form("KeyWordID"),", ")
KeyWord=split(Request.form("KeyWord"),", ")
KeyWordURL=split(Request.form("KeyWordURL"),", ")
for i=0 to ubound(KeyWordID)
if int(KeyWordID(i))<>-1 then
conn.execute("update blog_Keywords set key_Text='"&CheckStr(KeyWord(i))&"',key_URL='"&CheckStr(KeyWordURL(i))&"' where key_ID="&KeyWordID(i))
else
if len(trim(CheckStr(KeyWord(i))))>0 then
conn.execute("insert into blog_Keywords (key_Text,key_URL) values ('"&CheckStr(KeyWord(i))&"','"&CheckStr(KeyWordURL(i))&"')")
session(CookieName&"_MsgText")="新关键字添加成功! "
end if
end if
next
Keywords(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"关键字保存成功!"
Response.Redirect("ConContent.asp?Fmenu=smilies&Smenu=KeyWord")
end if
else
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="非法提交内容!"
Response.Redirect("ConContent.asp?Fmenu=smilies&Smenu=")
end if
'==========================设置界面和模版===============================
elseif Request.form("action")="Skins" then
dim skinpath,Skinname,moduleID,moduleName,moduleType,moduleTitle,moduleHidden,moduleTop,moduleOrder,moduleHtmlCode,mOrder
'--------------------------设置默认界面----------------------------
if Request.form("whatdo")="setDefaultSkin" then
skinpath=CheckStr(Request.form("SkinPath"))
Skinname=CheckStr(Request.form("SkinName"))
conn.execute("update blog_Info set blog_DefaultSkin='"&skinpath&"'")
getInfo(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&Skinname&"”</span> 设置为当前默认界面!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=")
'--------------------------保存模块设置----------------------------
elseif Request.form("whatdo")="UpdateModule" then
Dim selectID,doModule
selectID=split(Request.form("selectID"),", ")
doModule=Request.form("doModule")
moduleID=split(Request.form("mID"),", ")
moduleName=split(Request.form("mName"),", ")
moduleType=split(Request.form("mType"),", ")
moduleTitle=split(Request.form("mTitle"),", ")
moduleHidden=split(Request.form("mHidden"),", ")
moduleTop=split(Request.form("mTop"),", ")
moduleOrder=split(Request.form("mOrder"),", ")
',IsHidden="&CBool(moduleHidden(i))&",IndexOnly="&CBool(moduleTop(i))&"
for i=0 to ubound(moduleID)
if int(moduleID(i))<>-1 then
if not conn.execute ("select IsSystem from blog_module where id="&moduleID(i))(0) then
conn.execute("update blog_module set title='"&CheckStr(moduleTitle(i))&"',type='"&CheckStr(moduleType(i))&"',SortID="&CheckStr(moduleOrder(i))&" where id="&moduleID(i))
else
mOrder=CheckStr(moduleOrder(i))
if CheckStr(moduleName(i))="ContentList" then mOrder=0
conn.execute("update blog_module set title='"&CheckStr(moduleTitle(i))&"',SortID="&mOrder&" where id="&moduleID(i))
end if
else
if len(trim(CheckStr(moduleName(i))))>0 then
if not conn.execute("select name from blog_module where name='"&CheckStr(moduleName(i))&"'").eof then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&CheckStr(moduleName(i))&"”</span> 模块标识已经存在无法添加新模块!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
end if
if not IsValidChars(CheckStr(moduleName(i))) then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">添加新模块失败!权限标识不能为英文或数字以外的字符</span>"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
end if
if len(CheckStr(moduleOrder(i)))<1 then
mOrder=conn.execute("select count(id) from blog_module")(0)
else
if IsInteger(CheckStr(moduleOrder(i)))=false then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="输入非法,添加失败!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
end if
mOrder=CheckStr(moduleOrder(i))
end if
conn.execute("insert into blog_module (name,title,type,IsHidden,IndexOnly,SortID) values ('"&CheckStr(moduleName(i))&"','"&CheckStr(moduleTitle(i))&"','"&CheckStr(moduleType(i))&"',false,false,"&mOrder&")")
session(CookieName&"_MsgText")="新模块添加成功! "
end if
end if
next
for i=0 to ubound(selectID)
Select case doModule
Case "dohidden":
conn.execute("update blog_module set IsHidden=true where id="&selectID(i))
Case "cancelhidden":
conn.execute("update blog_module set IsHidden=false where id="&selectID(i))
Case "doIndex":
conn.execute("update blog_module set IndexOnly=true where id="&selectID(i))
Case "cancelIndex":
conn.execute("update blog_module set IndexOnly=false where id="&selectID(i))
end Select
next
log_module(2)
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")=session(CookieName&"_MsgText")&"模块保存成功!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
'--------------------------编辑模块HTML代码----------------------------
elseif Request.form("whatdo")="editModule" Then
moduleID=Request.form("DoID")
moduleName=Request.form("DoName")
moduleHtmlCode=ClearHTML(CheckStr(request.form("HtmlCode")))
SavehtmlCode moduleHtmlCode,moduleID
log_module(2)
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&moduleName&"”</span> 代码编辑成功!"
if Request.form("editType")="normal" then
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=editModuleNormal&miD="&moduleID)
else
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=editModule&miD="&moduleID)
end if
'-------------------------------删除模块------------------------------
elseif Request.form("whatdo")="delModule" Then
moduleID=Request.form("DoID")
if conn.execute("select isSystem from blog_module where id="&moduleID)(0) Then
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&conn.execute("select title from blog_module where id="&moduleID)(0)&"”</span> 是内置模块无法删除!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
Else
moduleName=conn.execute("select title from blog_module where id="&moduleID)(0)
delModule moduleID
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&moduleName&"”</span> 删除成功!"
log_module(2)
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
end If
'-------------------------------保存插件配置------------------------------
elseif Request.form("whatdo")="SavePluginsSetting" Then
Dim GetPlugName,GetPlugSetItems,GetPlugSetItemName,GetPlugSetItemValue
GetPlugName=Request.Form("PluginsName")
Set GetPlugSetItems=conn.Execute ("Select * from blog_ModSetting where set_ModName='"&GetPlugName&"'")
Do Until GetPlugSetItems.eof
GetPlugSetItemName=GetPlugSetItems("set_KeyName")
GetPlugSetItemValue=checkstr(Request.Form(GetPlugSetItemName))
conn.Execute ("update blog_ModSetting Set set_KeyValue='"&GetPlugSetItemValue&"' where set_ModName='"&GetPlugName&"'and set_KeyName='"&GetPlugSetItemName&"'")
GetPlugSetItems.movenext
Loop
Dim ModSetTemp2
Set ModSetTemp2=New ModSet
ModSetTemp2.Open GetPlugName
ModSetTemp2.ReLoad()
session(CookieName&"_ShowMsg")=True
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&GetPlugName&"”</span> 设置保存成功!"
Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=PluginsOptions&Plugins="&GetPlugName)
end If
'==========================附件管理===============================
elseif Request.form("action")="Attachments" then
'-------------------------------删除模块------------------------------
if Request.form("whatdo")="DelFiles" then
dim getFolders,getFiles,getFolder,getFile,getFolderCount,getFileCount
Dim FSODel
Set FSODel=Server.CreateObject("Scripting.FileSystemObject")
getFolders=split(Request.form("folders"),", ")
getFiles=split(Request.form("Files"),", ")
getFolderCount=0
getFileCount=0
for each getFolder in getFolders
if len(getPathList(getFolder)(1))>0 then
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="<span style=""color:#900"">“"&getFolder&"”</span> 文件夹内含有文件,无法删除!"
Response.Redirect("ConContent.asp?Fmenu=SQLFile&Smenu=Attachments")
end if
if FSODel.FolderExists(Server.MapPath(getFolder)) then
FSODel.DeleteFolder Server.MapPath(getFolder),true
getFolderCount=getFolderCount+1
end if
next
for each getFile in getFiles
if FSODel.FileExists(Server.MapPath(getFile)) then
FSODel.DeleteFile Server.MapPath(getFile),true
getFileCount=getFileCount+1
end if
next
session(CookieName&"_ShowMsg")=true
session(CookieName&"_MsgText")="有 <span style=""color:#900"">"&getFileCount&" 文件, "&getFolderCount&" 个文件夹</span> 被删除!"
Response.Redirect("ConContent.asp?Fmenu=SQLFile&Smenu=Attachments")
end if
else'登录欢迎
end if
'----------------------End if--------------------
end if
%>
</div>
</body>
</html>
<%
Else
Response.Redirect("default.asp")
end if
%>