千万个美丽的未来,抵不上一个温暖的现在,每一个真实的现在,都是我们曾经幻想的未来!
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]
Feb 13
三、根目录中的ConContent.asp文件
修改后的源码:
<!--#include file="conCommon.asp" -->
<!--#include file="common/function.asp" -->
<!--#include file="common/library.asp" -->
<!--#include file="common/cache.asp" -->
<!--#include file="common/checkUser.asp" -->
<!--#include file="FCKeditor/fckeditor.asp" -->
<!--#include file="common/XML.asp" -->
<!--#include file="common/ModSet.asp" -->
<!--#include file="class/cls_logAction.asp" -->
<!--#include file="class/cls_control.asp" -->
<%
'***************PJblog2 后台管理页面*******************
' PJblog2 Copyright 2005
' Update:2006-6-10
'**************************************************
if not ChkPost() then
  session(CookieName&"_System")=""
  session(CookieName&"_disLink")=""
  session(CookieName&"_disCount")=""
  %>
   <script>try{top.location="default.asp"}catch(e){location="default.asp"}</script>
  <%
end if
if session(CookieName&"_System")=true and memName<>empty and stat_Admin=true then
dim i
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="UTF-8">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Language" content="UTF-8" />
<meta name="author" content="[email protected],PuterJam" />
<meta name="Copyright" content="PL-Blog 2 CopyRight 2005" />
<meta name="keywords" content="PuterJam,Blog,ASP,designing,with,web,standards,xhtml,css,graphic,design,layout,usability,ccessibility,w3c,w3,w3cn" />
<meta name="description" content="PuterJam's BLOG" />
<link rel="stylesheet" rev="stylesheet" href="common/control.css" type="text/css" media="all" />
<script type="text/javascript" src="common/control.js"></script>
<title>后台管理-内容</title>
<style type="text/css">
<!--
.style1 {color: #999}
-->
</style>
</head>
<body class="ContentBody">
<div class="MainDiv">
<%
if Request.QueryString("Fmenu")="General" 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=General">设置基本信息</a> | <a href="?Fmenu=General&Smenu=visitors">查看访客记录</a> | <a href="?Fmenu=General&Smenu=Misc">初始化数据</a></div>
<%
if Request.QueryString("Smenu")="visitors" then
%>
     <table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
<%
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
dim bCounter,PageC
Set bCounter=Server.CreateObject("ADODB.RecordSet")
SQL="Select * FROM blog_Counter order by coun_Time desc"
bCounter.Open SQL,Conn,1,1
PageC=0
IF not bCounter.EOF Then
  bCounter.PageSize=30
  bCounter.AbsolutePage=CurPage
  Dim bCounter_nums
  bCounter_nums=bCounter.RecordCount
    response.write "<tr><td colspan=""6"" style=""border-bottom:1px solid #999;""><div class=""pageContent"">"&MultiPage(bCounter_nums,30,CurPage,"?Fmenu=General&Smenu=visitors&","","float:left")&"</div><div class=""Content-body"" style=""line-height:200%""></td></tr>"
%>
        <tr align="center">
          <td width="100" nowrap="nowrap" class="TDHead">访客IP</td>
          <td width="120" nowrap="nowrap" class="TDHead">访客操作系统</td>
          <td nowrap="nowrap" class="TDHead">访客浏览器</td>
          <td width="300" nowrap="nowrap" class="TDHead">访客介入地址</td>
          <td class="TDHead">访客访问时间</td>
     </tr>
     <%
       Do Until bCounter.EOF or PageC=bCounter.PageSize
   %>
        <tr align="center">
          <td nowrap><%=bCounter("coun_IP")%></td>
          <td nowrap><%=bCounter("coun_OS")%></td>
          <td nowrap><%=bCounter("coun_Browser")%></td>
          <td nowrap align="left"><a href="<%=bCounter("coun_Referer")%>" target="_blank" title="<%=bCounter("coun_Referer")%>"><%=CutStr(bCounter("coun_Referer"),40)%></a></td>
          <td nowrap><%=bCounter("coun_Time")%></td>
     </tr>
   <%  
       bCounter.MoveNext
      PageC=PageC+1
  loop
    bCounter.Close
    Set bCounter=Nothing
    response.write ("</table>")
end if    
elseif Request.QueryString("Smenu")="Misc" then%>
<form action="ConContent.asp" method="post" style="margin:0px">
  <input type="hidden" name="action" value="General"/>
  <input type="hidden" name="whatdo" value="Misc"/>
    <div align="left" style="padding:5px;"><%getMsg%>
    <input type="checkbox" name="ReBulid" value="1" id="T1"/> <label for="T1">重建数据缓存</label><br/>
    <input type="checkbox" name="ReTatol" value="1" id="T2"/> <label for="T2">重新统计网站数据</label><br/>
    <input type="checkbox" name="ReBulidArticle" value="1" id="T3"/> <label for="T3">重新生成所有日志到文件</label> <span style="color:#f00">(这个过程可能会花很长时间,由你的日志数量来决定)</span><br/>
    <input type="checkbox" name="ReBulidIndex" value="1" id="T4"/> <label for="T4">重新建立日志索引</label><br/>
    <input type="checkbox" name="CleanVisitor" value="1" id="T5"/> <label for="T5">清除访客记录</label><br/>
   </div>
   <div class="SubButton">
      <input type="submit" name="Submit" value="保存配置" class="button"/>
     </div>
   </form>
   <%else%>
     <form action="ConContent.asp" method="post">
  <input type="hidden" name="action" value="General"/>
  <input type="hidden" name="whatdo" value="General"/>
     <%getMsg%>
<fieldset>
    <legend> 站点基本信息</legend>
    <div align="left">      
      <table border="0" cellpadding="2" cellspacing="1">
        <tr>
          <td width="180"><div align="right"> BLOG 名称 </div></td>
          <td align="left"><input name="SiteName" type="text" size="30" class="text" value="<%=SiteName%>"/></td>
        </tr>
    <tr>
          <td width="180"><div align="right"> BLOG 副标题 </div></td>
          <td align="left"><input name="blog_Title" type="text" size="50" class="text" value="<%=blog_Title%>"/></td>
        </tr>
    <tr>
          <td width="180"><div align="right"> 站长昵称 </div></td>
          <td align="left"><input name="blog_master" type="text" size="10" class="text" value="<%=blog_master%>" maxlength="10"/></td>
        </tr>
    <tr>
          <td width="180"><div align="right"> 站长邮件地址 </div></td>
          <td align="left"><input name="blog_email" type="text" size="50" class="text" value="<%=blog_email%>"/></td>
        </tr>
        <tr>
          <td width="180"><div align="right"> BLOG 地址
                  <div class="shuom">关系到<strong>RSS</strong>地址的可读性</div>
          </div></td>
          <td align="left"><input name="SiteURL" type="text" size="50" class="text" value="<%=SiteURL%>"/></td>
        </tr>
    <tr>
          <td width="180"><div align="right"> 网站备案信息 </div></td>
          <td align="left"><input name="blog_about" type="text" size="50" class="text" value="<%=blogabout%>"/></td>
        </tr>        
        <tr>
          <td><div align="right">Blog对外开放</div></td>
          <td align="left"><input name="SiteOpen" type="checkbox" value="1" <%if Application(CookieName & "_SiteEnable")=1 then response.write ("checked=""checked""")%>/></td>
        </tr>
      </table>
    </div>
  </fieldset>
  <fieldset>
    <legend> 显示设置</legend>
    <div align="left">
      <table border="0" cellpadding="2" cellspacing="1">
    <tr><td width="180" align="right">每页显示日志</td><td width="300"><input name="blogPerPage" type="text" size="5" class="text" value="<%=blogPerPage%>"/> 篇</td></tr>
    <tr><td width="180" align="right">默认显示模式</td><td width="300"><select name="blog_DisMod"><option value="0">普通</option><option  value="1" <%if blog_DisMod then response.write ("selected=""selected""")%>>列表</option></select></td></tr>
    <tr><td width="180" align="right">是否在首页显示图片友情链接</td><td width="300"><input name="blog_ImgLink" type="checkbox" value="1" <%if blog_ImgLink then response.write ("checked=""checked""")%>  /> </td></tr>
      </table>
    </div>
  </fieldset>
  <fieldset>
    <legend> 日志保存设置</legend>
    <div align="left">
      <table border="0" cellpadding="2" cellspacing="1">
     <tr><td width="180" align="right">静态日志模式</td><td><input name="blog_postFile" type="checkbox" value="1" <%if blog_postFile then response.write ("checked=""checked""")%>  <%if not CheckObjInstalled("ADODB.Stream") then response.write "disabled"%>/> <span style="color:#999">把文章保存成文件, 减轻数据库负担. <%if not CheckObjInstalled("ADODB.Stream") then response.write "<b style='color:#f00'>需要 ADODB.Stream 组件支持</b>"%></span> </td></tr>
     <tr><td width="180" align="right">日志预览分割类型</td><td><select name="blog_SplitType"><option value="0">按照字符数量分割</option><option  value="1" <%if blog_SplitType then response.write ("selected=""selected""")%>>按照行数分割</option></select> <span style="color:#999">只对重新编辑日志或新建日志有效</span></td></tr>
    <tr><td width="180" align="right">日志预览最大字符数</td><td><input name="blog_introChar" type="text" size="5" class="text" value="<%=blog_introChar%>"/> 个 <span style="color:#999">只对UBB编辑器有效</span></td></tr>
    <tr><td width="180" align="right">日志预览切割行数</td><td><input name="blog_introLine" type="text" size="5" class="text" value="<%=blog_introLine%>"/> 行</td></tr>
      </table>
    </div>
  </fieldset>  
  <fieldset>
    <legend> 评论设置</legend>
    <table border="0" cellpadding="2" cellspacing="1">
      <tr><td width="180" align="right">每页显示评论数</td><td width="300"><input name="blogcommpage" type="text" size="5" class="text" value="<%=blogcommpage%>"/> 篇</td></tr>
    <tr><td width="180" align="right">发表评论时间间隔</td><td width="300"><input name="blog_commTimerout" type="text" size="5" class="text" value="<%=blog_commTimerout%>"/> 秒</td></tr>
    <tr><td width="180" align="right">发表评论字数限制</td><td width="300"><input name="blog_commLength" type="text" size="5" class="text" value="<%=blog_commLength%>"/> 字</td></tr>
    <tr><td width="180" align="right">发表评论必须输入验证码</td><td width="300"><input name="blog_validate" type="checkbox" value="1" <%if blog_validate then response.write ("checked=""checked""")%>  /> <span style="color:#999">可以让会员不写验证码也可以发表评论</span> </td></tr>
    <tr><td width="180" align="right">禁用评论UBB代码</td><td width="300"><input name="blog_commUBB" type="checkbox" value="1" <%if blog_commUBB then response.write ("checked=""checked""")%>  /></td></tr>
    <tr><td width="180" align="right">禁用评论贴图</td><td width="300"><input name="blog_commIMG" type="checkbox" value="1" <%if blog_commIMG then response.write ("checked=""checked""")%> /></td></tr>
    </table>
  </fieldset>
  <fieldset>
    <legend> Wap设置</legend>
    <div align="left">
      <table border="0" cellpadding="2" cellspacing="1">
    <tr><td width="180" align="right">允许使用wap方式浏览Blog</td><td width="300"><input name="blog_wap" type="checkbox" value="1" <%if blog_wap then response.write ("checked=""checked""")%>  /></td></tr>
    <tr><td width="180" align="right">允许wap使用简单HTML</td><td width="300"><input name="blog_wapHTML" type="checkbox" value="1" <%if blog_wapHTML then response.write ("checked=""checked""")%>  /></td></tr>
    <tr><td width="180" align="right">允许wap显示图片</td><td width="300"><input name="blog_wapImg" type="checkbox" value="1" <%if blog_wapImg then response.write ("checked=""checked""")%>  /></td></tr>
    <tr><td width="180" align="right">允许wap保留文章超链接</td><td width="300"><input name="blog_wapURL" type="checkbox" value="1" <%if blog_wapURL then response.write ("checked=""checked""")%>  /></td></tr>
    <tr><td width="180" align="right">允许通过wap登录</td><td width="300"><input name="blog_wapLogin" type="checkbox" value="1" <%if blog_wapLogin then response.write ("checked=""checked""")%>  /></td></tr>
    <tr><td width="180" align="right">允许通过wap发评论</td><td width="300"><input name="blog_wapComment" type="checkbox" value="1" <%if blog_wapComment then response.write ("checked=""checked""")%>  /></td></tr>
    <tr><td width="180" align="right">Wap日志显示数量</td><td width="300"><input name="blog_wapNum" type="text" size="5" class="text" value="<%=blog_wapNum%>"/> 篇</td></tr>
      </table>
    </div>
  </fieldset>
  <fieldset>
    <legend> 用户注册与过滤</legend>
    <div align="left">
      <table border="0" cellpadding="2" cellspacing="1">
      <tr><td width="180" align="right">不允许注册新用户</td><td width="300"><input name="blog_Disregister" type="checkbox" value="1" <%if blog_Disregister then response.write ("checked=""checked""")%>  /> </td></tr>
        <tr><td width="180" align="right">访客记录最大值</td><td width="300"><input name="blog_CountNum" type="text" size="5" class="text" value="<%=blog_CountNum%>"/>  <span style="color:#999">设置为0则不进行任何访客记录</span></td></tr>
     <tr>
         <td width="180" valign="top"><div align="right">注册名字过滤
              <div class="shuom">用"|"分割需要过滤的名字</div>              
              <div class="shuom"></div>
          </div></td>
          <td align="left"><textarea name="Register_UserNames" cols="50" rows="5"><%=Register_UserNames%></textarea></td>
        </tr>
        <tr>
          <td width="180" valign="top"><div align="right">IP过滤
              <div class="shuom">以下Ip地址将无法访问Blog</div>              
              <div class="shuom">使用"|"分割IP地址,IP地址可以包含通配符号"*"用来禁止某个IP段的无法访问Blog</div>
          </div></td>
          <td align="left"><textarea name="FilterIPs" cols="50" rows="5"><%=FilterIPs%></textarea></td>
        </tr>
     </table>
    </div>
  </fieldset>  <div class="SubButton">
      <input type="submit" name="Submit" value="保存配置" class="button"/>
     </div>
   </form>
   <%end if%>
   </td>
  </tr></table>
<%
elseif Request.QueryString("Fmenu")="Categories" then '日志分类管理
      dim Arr_Category,blog_Cate,blog_Cate_Item,Icons_Lists,Icons_List,CateInOpstions
        dim CategoryListDB
%>
<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=Categories">设置日志分类</a> | <a href="?Fmenu=Categories&Smenu=move">批量移动日志</a> | <a href="?Fmenu=Categories&Smenu=del">批量删除日志</a> | <a href="?Fmenu=Categories&Smenu=tag">Tag管理</a></div>
<%
if Request.QueryString("Smenu")="tag" then
%>
   <form action="ConContent.asp" method="post" style="margin:0px">
   <input type="hidden" name="action" value="Categories"/>
   <input type="hidden" name="whatdo" value="Tag"/>
      <div align="left" style="padding:5px;"><%getMsg%>

     <table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
        <tr align="center">
      <td width="16" nowrap="nowrap" class="TDHead"> </td>
          <td width="100" nowrap="nowrap" class="TDHead">Tag名称</td>
          <td  nowrap="nowrap" class="TDHead">日志数量</td>
     </tr>
     <%
    dim BTag
      Set BTag=conn.execute("select * from blog_tag order by tag_id desc")
    do until BTag.eof
     %>
     <tr align="center">
      <td><input name="selectTagID" type="checkbox" value="<%=BTag("tag_id")%>"/></td>
          <td><input name="TagID" type="hidden" value="<%=BTag("tag_id")%>"/><input name="tagName" type="text" size="14" class="text" value="<%=BTag("tag_name")%>"/></td>
          <td><input name="tagCount" type="text" size="2" class="text" value="<%=BTag("tag_count")%>" readonly style="background:#ffe"/> 篇</td>
     </tr>
     <%
     BTag.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"/>添加Tag</td>
       </tr>  
        <tr align="center">
      <td></td>
          <td><input name="TagID" type="hidden" value="-1"/><input name="tagName" type="text" size="14" class="text"/></td>
          <td></td>
     </tr>
    </table>
  <div class="SubButton" style="text-align:left;">
       <select name="doModule">
       <option value="SaveAll">保存所有Tag</option>
       <option value="DelSelect">删除所选Tag</option>
     </select>
    <input type="submit" name="Submit" value="提交" class="button" style="margin-bottom:0px"/>
     </div>  </form>
    <div style="color:#f00">提示:在发表和编辑日志的同时,也可以直接输入多个tag.系统会自动添加不存在的tag</div>
    
    </div>
</td></tr></table>
</div>
<%    
elseif Request.QueryString("Smenu")="move" then
        set CategoryListDB=conn.execute("select * from blog_Category order by cate_local asc, cate_Order desc")
       do while not CategoryListDB.eof
        if not CategoryListDB("cate_OutLink") then
         CateInOpstions=CateInOpstions&"<option value="""&CategoryListDB("cate_ID")&""">&nbsp;&nbsp;"&CategoryListDB("cate_Name")&" ["&CategoryListDB("cate_count")&"]</option>"
        end if
        CategoryListDB.movenext
         loop
         set CategoryListDB=nothing
%>
  <form action="ConContent.asp" method="post" style="margin:0px" onsubmit="return CheckMove()">
   <input type="hidden" name="action" value="Categories"/>
   <input type="hidden" name="whatdo" value="move"/>
    <div align="left" style="padding:5px;"><%getMsg%>
    
<select name="source">
<option value="null" style="color:#333">源日志分类</option>
<option value="null" style="color:#333">-----------------</option>

<%=CateInOpstions%>
</select> 移动到
<select name="target">
<option value="null" style="color:#333">目标日志分类</option>
<option value="null" style="color:#333">-----------------</option>
<%=CateInOpstions%>
</select> <input type="submit" name="Submit" value="移动日志" class="button" style="margin-bottom:-1px;"/>
    </div>
     </form></td>
  </tr>
   <%
   elseif  Request.QueryString("Smenu")="del" then
   dim TempOsel,FilterO
       set CategoryListDB=conn.execute("select * from blog_Category order by cate_local asc, cate_Order desc")
       FilterO=checkstr(request.QueryString("filter"))
       if len(FilterO)<1 then FilterO=-1
       do while not CategoryListDB.eof
        if not CategoryListDB("cate_OutLink") then
         if int(FilterO)=CategoryListDB("cate_ID") then TempOsel= "selected"
         CateInOpstions=CateInOpstions&"<option value="""&CategoryListDB("cate_ID")&""" "&TempOsel&">&nbsp;&nbsp;&nbsp; - "&CategoryListDB("cate_Name")&" ["&CategoryListDB("cate_count")&"]</option>"
         TempOsel=""
        end if
        CategoryListDB.movenext
         loop
         set CategoryListDB=nothing
   %>
  <form action="ConContent.asp" method="post" style="margin:0px">
   <input type="hidden" name="action" value="Categories"/>
   <input type="hidden" name="whatdo" value="batdel"/>
    <div align="left" style="padding:5px;"><%getMsg%>
     过滤器: <select name="filter" onchange="location='?Fmenu=Categories&Smenu=del&filter='+this.value">
      <option value="-1">显示所有日志</option>
        <%=CateInOpstions%>
      <option value="-3" <%if int(FilterO)=-3 then response.write "selected"%>>  显示所有隐藏日志</option>
      <option value="-2" <%if int(FilterO)=-2 then response.write "selected"%>>  显示所有草稿</option>
    </select>
    
    <table style="font-size:12px;margin:8px 0px 8px 0px">
    <%
     dim DelContent
      if int(FilterO)=-1 then
       SQL="select * from blog_content order by log_posttime desc"
      elseif int(FilterO)=-2 then
       SQL="select * from blog_content where log_IsDraft=true order by log_posttime desc"
      elseif int(FilterO)=-3 then
       SQL="select * from blog_content where log_IsShow=false order by log_posttime desc"
      else
       SQL="select * from blog_content where log_CateID="&int(FilterO)&" and log_IsDraft=false order by log_posttime desc"
      end if
     set DelContent=conn.execute(SQL)
       if DelContent.eof and DelContent.bof then
         %>
         <tr><td>没有找到符合条件的查询</td></tr>
         <%else
         Dim TempImg
         do until DelContent.eof
         if DelContent("log_IsShow")=false then TempImg="<img src=""images/icon_lock.gif"" alt="""" border=""0"" style=""margin:0px 0px -3px 2px""/>"
            if int(FilterO)=-2 then
             %>
             <tr><td><input name="CID" type="checkbox" value="<%=DelContent("log_ID")%>"/></td><td><a href="blogedit.asp?id=<%=DelContent("log_ID")%>" target="_blank"><%=DelContent("log_ID")%>. <%=DelContent("log_Title")%> <%=TempImg%></a></td></tr>
             <%
            else
             %>
             <tr><td><input name="CID" type="checkbox" value="<%=DelContent("log_ID")%>"/></td><td><a href="article.asp?id=<%=DelContent("log_ID")%>" target="_blank"><%=DelContent("log_ID")%>. <%=DelContent("log_Title")%> <%=TempImg%></a></td></tr>
             <%
            end if
          TempImg=""
          DelContent.movenext
          loop
        end if
        DelContent.close
        set DelContent=nothing
       %>
    </table>
<input type="checkbox" name="checkbox" style="margin-bottom:-1px;" onclick="checkAll(this)"/> 全选
<input type="submit" name="Submit" value="删除选中的日志" class="button" style="margin-bottom:-1px;"/>
    </div>
     </form>
     <br/>
   <%else
        set CategoryListDB=conn.execute("select * from blog_Category order by cate_local asc, cate_Order asc")
        if CheckObjInstalled("Scripting.FileSystemObject") then Icons_Lists=split(getPathList("images\icons")(1),"*")
   %>
   <script>
     var il = [];
        <%
        for each Icons_List in Icons_Lists
          response.write ("il.push('"&Icons_List&"');" & chr(13))
        next
       %>
      
       function fillList(o){
         var v = o.defaultValue;
         for (var i=0;i<il.length;i++){
           var n = new Option(il[i],"images/icons/" + il[i]);
           o.options.add(n);
         }
         if (!v) o.selectedIndex = 0; else o.value  = v;
       }
      
       function fillAllList(){
           var ci = document.getElementsByName("Cate_icons");
           for (var i=0;i<ci.length;i++)
             fillList(ci[i]);
           fillList(document.getElementsByName("New_Cate_icons")[0]);
       }
   </script>
   <form action="ConContent.asp" method="post" style="margin:0px">
   <input type="hidden" name="action" value="Categories"/>
   <input type="hidden" name="whatdo" value="Cate"/>
   <input type="hidden" name="DelCate" value=""/>
    <div align="left" style="padding:5px;"><%getMsg%>
      <table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
        <tr align="center">
          <td class="TDHead" nowrap>分类图标</td>
          <td class="TDHead" nowrap>标题</td>
          <td class="TDHead" nowrap>提示说明</td>
          <td width="180" class="TDHead" nowrap>外部链接</td>
          <td width="29" class="TDHead" nowrap>排序</td>
          <td class="TDHead" nowrap>位置</td>
          <td class="TDHead" nowrap>保密</td>
          <td class="TDHead" nowrap>日志数量</td>
          <td align="center" class="TDHead"> </td>
        </tr>
        <%
      do while not CategoryListDB.eof
        %>
        <tr id="Catetr_<%=CategoryListDB("cate_ID")%>" style="background:<%
         if int(CategoryListDB("cate_local"))=1 then
          response.write ("#a9c9e9")
         elseif int(CategoryListDB("cate_local"))=2 then
          response.write ("#bcf39e")
         else
          
         end if
        %>">
          <td align="center" nowrap>
          <img name="CateImg_<%=CategoryListDB("cate_ID")%>" src="<%=CategoryListDB("cate_icon")%>" width="16" height="16" />
         <%if CheckObjInstalled("Scripting.FileSystemObject") then%>
          <select name="Cate_icons" defaultValue="<%=CategoryListDB("cate_icon")%>" onchange="document.images['CateImg_<%=CategoryListDB("cate_ID")%>'].src=this.value;" style="width:120px;"></select>
          <%else%>
          <input name="Cate_icons" type="text" class="text" value="<%=CategoryListDB("cate_icon")%>" size="18" onchange="document.images['CateImg_<%=CategoryListDB("cate_ID")%>'].src=this.value"/>
          <%end if%>
          </td>
          <td><input name="Cate_Name" type="text" class="text" value="<%=CategoryListDB("cate_Name")%>" size="14"/></td>
          <td align="left"><input name="Cate_Intro" type="text" class="text" value="<%=CategoryListDB("cate_Intro")%>" size="30"/></td>
          <td align="left"><input name="cate_URL" type="text" value="<%=CategoryListDB("cate_URL")%>" size="30" class="text" <%if CategoryListDB("cate_count")>0 Then response.write "readonly=""readonly"" style=""background:#e5e5e5"""%>/></td>
          <td align="left"><input name="cate_Order" type="text" value="<%=CategoryListDB("cate_Order")%>" size="2" class="text"/></td>
          <td align="center">
           <select name="Cate_local" onchange="getElementById('Catetr_<%=CategoryListDB("cate_ID")%>').style.backgroundColor=(this.value==1)?'#a9c9e9':(this.value==2)?'#bcf39e':''">
              <option value="0">同时</option>
              <option value="1" <%if int(CategoryListDB("cate_local"))=1 then response.write "selected=""selected"""%>>顶部</option>
              <option value="2" <%if int(CategoryListDB("cate_local"))=2 then response.write "selected=""selected"""%>>侧边</option>
           </select>
          </td>
          <td>
           <select name="cate_Secret" <%If CategoryListDB("cate_OutLink") Then response.write "disabled=""disabled"""%>>
            <option value="0" style="background:#0f0">公开</option>
            <option value="1" style="background:#f99" <%if int(CategoryListDB("cate_Secret")) then response.write "selected=""selected"""%>>保密</option>
           </select>
           <%If CategoryListDB("cate_OutLink") Then response.write "<input type=""hidden"" name=""cate_Secret"" value=""0""/>"%>
           </td>
          <td align="left" nowrap><input type="text" class="text" name="cate_count" value="<%=CategoryListDB("cate_count")%>" size="2" readonly="readonly" style="background:#ffe"/> 篇</td>
          <td align="center">
       <%if not CategoryListDB("cate_Lock") then response.write ("<a href=""javascript:CheckDel("&CategoryListDB("cate_ID")&")"" title=""删除该分类""><img border=""0"" src=""images/icon_del.gif"" width=""16"" height=""16"" /></a>")%>
           <input type="hidden" name="Cate_ID" value="<%=CategoryListDB("cate_ID")%>"/>
          </td>
        </tr>
        <%
        CategoryListDB.movenext
        loop
        set CategoryListDB=nothing
        %>
        <tr align="center" bgcolor="#D5DAE0">
         <td colspan="9" class="TDHead" align="left" style="border-top:1px solid #999"><img src="images/add.gif" style="margin:0px 2px -3px 2px"/>添加日志分类</td>
        </tr>
        <tr>
          <td align="center" nowrap><img name="CateImg" src="images/icons/1.gif" width="16" height="16" />
          <%if CheckObjInstalled("Scripting.FileSystemObject") then%>
            <select name="New_Cate_icons" onchange="document.images['CateImg'].src=this.value" style="width:120px;"></select>
          <%else%>
          <input name="New_Cate_icons" type="text" class="text" value="images/icons/1.gif" size="18" onchange="document.images['CateImg'].src=this.value"/>
          <%end if%>
          </td>
          <td><input name="New_Cate_Name" type="text" size="14" class="text"/></td>
          <td align="left"><input name="New_Cate_Intro" type="text" class="text" size="30"/></td>
          <td align="left"><input name="New_cate_URL" type="text" size="30" class="text"/></td>
          <td align="left"><input name="New_cate_Order" type="text" size="2" class="text"/></td>
          <td align="center">
           <select name="New_Cate_local">
            <option value="0">同时</option>
            <option value="1">顶部</option>
            <option value="2">侧边</option>
           </select>
          </td>
          <td>
          <select name="New_cate_Secret">
            <option value="0" style="background:#0f0">公开</option>
            <option value="1" style="background:#f99">保密</option>
           </select>
          </td>
          <td align="center"> </td>
          <td align="center"> </td>
        </tr>
      </table>
      <script>fillAllList()</script>
    </div>
    <div style="color:#f00">如果分类中存在日志,则无法使用外部连接.删除日志分类的时假如分类中存在日志,那么日志也会被删除</div>
  <div class="SubButton">
      <input type="submit" name="Submit" value="保存日志分类" class="button"/>
     </div>  
     </form></td>
  </tr>
<%end if%>
</td></tr>
</table>
<%
'============================================
'      评论留言管理
'============================================
elseif Request.QueryString("Fmenu")="Comment" 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" style="line-height:160%">
    <b>评论管理:</b> <a href="?Fmenu=Comment">评论管理</a> | <a href="?Fmenu=Comment&Smenu=msg">留言管理</a> | <a href="?Fmenu=Comment&Smenu=trackback">引用管理</a>
    <br/>
    <b>评论过滤:</b> <a href="?Fmenu=Comment&Smenu=spam" title="面向初级用户,提供简单的过滤功能">初级过滤功能</a> | <a href="?Fmenu=Comment&Smenu=reg" title="面向高级级用户,提供功能强大的过滤功能">高级过滤功能</a>
  </div>
  
   <%
   if Request.QueryString("Smenu")="spam" then
     dim spamXml,spamList
     set spamXml=new PXML
        spamXml.XmlPath="spam.xml"
        spamXml.open
        %>
        <div align="left" style="padding-top:5px;"><%getMsg%>
        <form action="ConContent.asp" method="post" style="margin:0px" onsubmit="return addSpanKey()" name="filter">
          <input type="hidden" name="action" value="Comment"/>
          <input type="hidden" name="doModule" value="updateKey"/>
          <input type="hidden" name="keyList" id="keyList" value=""/>
        <table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
        <tr><td class="TDHead">过滤关键字</td></tr>
        <tr><td><div style="width:394px;overflow:hidden">
        <%
        spamList = "<select name=""spamList"" id=""spamList"" size=""20"" multiple=""multiple"" style=""width:400px;margin:-3px 0 -3px -3px"">"
        for i=0 to spamXml.GetXmlNodeLength("key")-1
          spamList = spamList & "<option value=""" & spamXml.SelectXmlNodeItemText("key",i) & """>" & spamXml.SelectXmlNodeItemText("key",i) & "</option>"
        next
         response.write spamList
       set spamXml= nothing
      %>
       </div></td></tr>
       <tr><td style="padding-bottom:5px;background:#FAE1AF"><img src="images/add.gif" alt="" style="margin:0 5px -3px"/>添加关键字:<input id="keyWord" type="text" size="27" class="text" onkeypress="this.style.backgroundColor='#fff';"/>
       <input type="Submit" name="Submit" value="添加" class="button" style="margin-bottom:-2px"/><input type="button" name="button" value="移除" class="button" style="margin-bottom:-2px" onclick="clearKey()"/>
       </td></tr>
       </table>
           <div class="SubButton" style="text-align:left;padding:5px;margin:0px">
             <button accesskey="s" class="button" style="margin-bottom:0px;margin-left:-5px;" onclick="submitList()" >保存关键字列表(<u>S</u>)</button>
          
          </div>          
            <div style="color:#f00"><b>友情提示:</b><br/> - 添加或清除关键字后必须 <b>保存关键字列表</b>,垃圾关键字列表才生效。<br/> - 使用逗号或者空格输入字符串可以一次添加多个关键字<br/> - enter键直接插入关键字 ,用ctrl或shift键多选清除关键字</div>
      </div>
      </form>
      <%
     elseif Request.QueryString("Smenu")="reg" then
         dim reSpamXml,reSpamList
         set reSpamXml=new PXML
            reSpamXml.XmlPath="reg.xml"
            reSpamXml.open

    %>
     <script src="common/reg.js" Language="javascript"></script>
        <div align="left" style="padding-top:5px;"><%getMsg%>
          <form name="reFilter" action="ConContent.asp" method="post" style="margin:0px">
         <input type="hidden" name="action" value="Comment"/>
         <input type="hidden" name="doModule" value="updateRegKey"/>
         <input type="hidden" name="keyList" id="keyList" value=""/>
           <div align="left" style="padding-top:5px;">
            <table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
            <tr>
              <td class="TDHead" width="150" align="center">规则描述</td>
              <td class="TDHead" width="300" align="center">正则表达式</td>
              <td class="TDHead" align="center">允许匹配次数</td>
            </tr>
            <tr>
              <td colspan=3 id="reList"></td>
            </tr>
            <tr align="center" bgcolor="#D5DAE0">
               <td colspan="3" class="TDHead" align="left" style="border-top:1px solid #999"><img src="images/add.gif" style="margin:0px 2px -3px 2px"/>添加新规则</td>
            </tr>
           <tr>
              <td colspan=3>
                <div>
                  <input id="reTitle" type="text" class="text" style="width:150px"/>
                   <input id="reRules" type="text" class="text" style="width:300px"/>
                  <input id="reTimes" type="text" class="text" style="width:30px" maxlength="3"/>
                  <input name="des" type="button" class="button" value="添加" onclick="addRules()" style="font-size:12px;margin:0px;margin-top:-2px;margin-bottom:-1px;height:20px;"/>
               </div>
              </td>
            </tr>
            <tr align="center" bgcolor="#D5DAE0">
               <td colspan="3" class="TDHead" align="left" style="border-top:1px solid #999"><img src="images/html.gif" style="margin:0px 2px -3px 2px"/>测试文本区域</td>
            </tr>
           <tr>
              <td colspan=3>
                <textarea id="testArea" name="testArea" style="width:100%;height:100px"><%=reSpamXml.SelectXmlNodeItemText("text",0)%></textarea>
              </td>
            </tr>
            <tr></tr>
      </table>
           <div class="SubButton" style="text-align:left;padding:5px;margin:0px">
             <button accesskey="t" class="button" style="margin-bottom:0px;margin-left:-5px;" onclick="testRules()">测试(<u>T</u>)</button>
            <button accesskey="s" class="button" style="margin-bottom:0px" onclick="submitReList()">保存(<u>S</u>)</button>
          </div>          
            <div style="color:#f00"><b>友情提示:</b>
              <br/> - <b>允许匹配次数:</b> 允许规则匹配的最大次数
              <br/> - 当匹配次数设置为0时,说明评论中不允许有次规则的文字
            </div>
      </form>
      <script>
      <%
           for i=0 to reSpamXml.GetXmlNodeLength("key")-1
              response.write "addRule('" & replace(reSpamXml.GetAttributes("key","des",i),"'","\'") & "','" & replace(reSpamXml.GetAttributes("key","re",i),"'","\'") & "','" & reSpamXml.GetAttributes("key","times",i) & "');" & chr(13)
            next
      %>
      </script>
    </div>
    <%
          set reSpamXml= nothing
     else
   %>
    <form action="ConContent.asp" method="post" style="margin:0px">
       <input type="hidden" name="action" value="Comment"/>
       <input type="hidden" name="doModule" value="DelSelect"/>
          <div align="left" style="padding-top:5px;"><%getMsg%>
          <%
              dim blog_Comment,comm_Num,commArr,commArrLen,Pcount,aUrl,pSize,saveButton
          Pcount=0
          saveButton = "<input type=""button"" value=""保存全部"" class=""button"" onclick=""updateComment()"" style=""font-weight:bold;margin:0px;margin-bottom:5px;float:right;margin-right:6px""/>"
            Set blog_Comment=Server.CreateObject("Adodb.RecordSet")
            if Request.QueryString("Smenu")="trackback" then
              SQL="Select tb_ID,tb_Intro,tb_Site,tb_PostTime,tb_Title,blog_ID,tb_URL,C.log_Title FROM blog_Content C,blog_Trackback T Where T.blog_ID=C.log_ID orDER BY tb_PostTime desc"
              aUrl="?Fmenu=Comment&Smenu=trackback&"
              pSize = 100
              saveButton=""
              response.write "<input type=""hidden"" name=""whatdo"" value=""trackback""/>"
            elseif Request.QueryString("Smenu")="msg" then
              SQL="Select book_ID,book_Content,book_Messager,book_PostTime,book_IP,book_reply FROM blog_book orDER BY book_PostTime desc"
              aUrl="?Fmenu=Comment&Smenu=msg&"
              pSize = 12
              response.write "<input type=""hidden"" name=""whatdo"" value=""msg""/>"
              else '评论
              SQL="Select comm_ID,comm_Content,comm_Author,comm_PostTime,comm_PostIP,blog_ID,T.log_Title,comm_Reply from blog_Comment C,blog_Content T Where C.blog_ID=T.log_ID orDER BY C.comm_PostTime desc"
              aUrl="?Fmenu=Comment&"
              pSize = 15
              response.write "<input type=""hidden"" name=""whatdo"" value=""comment""/>"
            end if
          %>
             <div style="height:24px;">
               <input type="button" value="删除所选内容" onclick="DelComment()" class="button" style="margin:0px;margin-bottom:5px;float:right;"/>
               <input type="button" value="全选" onclick="checkAll()" class="button" style="margin:0px;margin-bottom:5px;float:right;margin-right:6px"/>
               <%=saveButton%>
               <div id="page1" class="pageContent"></div>
             </div>
             <div class="msgDiv">
          <%
            blog_Comment.Open SQL,Conn,1,1
            IF blog_Comment.EOF AND blog_Comment.BOF Then
              response.write "</div>"
            else
              blog_Comment.PageSize=pSize
              blog_Comment.AbsolutePage=CurPage
              comm_Num=blog_Comment.RecordCount
                      
              commArr=blog_Comment.GetRows(comm_Num)
              blog_Comment.close
              set blog_Comment = nothing
              commArrLen=Ubound(commArr,2)
              'commArr(3,Pcount)
              do until Pcount = commArrLen+1 or Pcount = pSize
                if Request.QueryString("Smenu")="trackback" then
                    %>
                      <div class="item"><input type="hidden" name="CommentID" value="<%=commArr(0,Pcount)%>"/>
                        <div class="title"><span class="blogTitle"><a href="article.asp?id=<%=commArr(5,Pcount)%>" target="_blank" title="<%=commArr(7,Pcount)%>"><%=CutStr(commArr(7,Pcount),25)%></a></span><input type="checkbox" name="selectCommentID" value="<%=commArr(0,Pcount)%>|<%=commArr(5,Pcount)%>" onclick="highLight(this)"/><img src="images/icon_trackback.gif" alt=""/><b><a href="<%=commArr(6,Pcount)%>" target="_blank"><%=commArr(2,Pcount)%></a></b> <span class="date">[<%=DateToStr(commArr(3,Pcount),"Y-m-d H:I:S")%>]</span></div>
                        <div class="contentTB">
                         <b>标题:</b> <%=checkURL(HTMLDecode(commArr(4,Pcount)))%><br/>
                         <b>链接:</b> <a href="<%=commArr(6,Pcount)%>" target="_blank"><%=commArr(6,Pcount)%></a><br/>
                         <b>摘要:</b> <%=checkURL(HTMLDecode(commArr(1,Pcount)))%><br/>
                        </div>
                    </div>
                    <%
                    elseif Request.QueryString("Smenu")="msg" then
                    %>
                      <div class="item"><input type="hidden" name="CommentID" value="<%=commArr(0,Pcount)%>"/>
                        <div class="title"><input type="checkbox" name="selectCommentID" value="<%=commArr(0,Pcount)%>" onclick="highLight(this)"/><img src="images/reply.gif" alt=""/><b><%=HtmlEncode(commArr(2,Pcount))%></b> <span class="date">[<%=DateToStr(commArr(3,Pcount),"Y-m-d H:I:S")%> | <%=commArr(4,Pcount)%>]</span></div>
                        <div class="content"><textarea name="message_<%=commArr(0,Pcount)%>" onfocus="focusMe(this)" onblur="blurMe(this)" onmouseover="overMe(this)" onmouseout="outMe(this)"><%=UnCheckStr(commArr(1,Pcount))%></textarea></div>
                        <div class="reply"><h5>回复内容:<%if len(trim(commArr(5,Pcount)))<1 or IsNull(commArr(5,Pcount)) then response.write "<span class=""tip"">(无回复留言)</span>"%></h5><textarea name="reply_<%=commArr(0,Pcount)%>" onfocus="focusMe(this)" onblur="blurMe(this)" onmouseover="overMe(this)" onmouseout="outMe(this)" onchange="checkMe(this);document.getElementById('edited_<%=commArr(0,Pcount)%>').value=1"><%=UnCheckStr(commArr(5,Pcount))%></textarea><input id="edited_<%=commArr(0,Pcount)%>" name="edited_<%=commArr(0,Pcount)%>" type="hidden" value="0"></div>
                    </div>
                    <%
                     else '评论
                    %>
                      <div class="item"><input type="hidden" name="CommentID" value="<%=commArr(0,Pcount)%>"/>
                        <div class="title"><span class="blogTitle"><a href="article.asp?id=<%=commArr(5,Pcount)%>" target="_blank" title="<%=commArr(6,Pcount)%>"><%=CutStr(commArr(6,Pcount),25)%></a></span><input type="checkbox" name="selectCommentID" value="<%=commArr(0,Pcount)%>|<%=commArr(5,Pcount)%>" onclick="highLight(this)"/><img src="images/icon_quote.gif" alt=""/><b><%=HtmlEncode(commArr(2,Pcount))%></b> <span class="date">[<%=DateToStr(commArr(3,Pcount),"Y-m-d H:I:S")%> | <%=commArr(4,Pcount)%>]</span></div>
                        <div class="content"><textarea name="message_<%=commArr(0,Pcount)%>" onfocus="focusMe(this)" onblur="blurMe(this)" onmouseover="overMe(this)" onmouseout="outMe(this)"><%=UnCheckStr(commArr(1,Pcount))%></textarea></div>
                    <div class="reply"><h5>回复内容:<%if len(trim(commArr(7,Pcount)))<1 or IsNull(commArr(7,Pcount)) then response.write "<span class=""tip"">(无回复留言)</span>"%></h5><textarea name="reply_<%=commArr(0,Pcount)%>" onFocus="focusMe(this)" onBlur="blurMe(this)" onMouseOver="overMe(this)" onMouseOut="outMe(this)" onChange="checkMe(this)"><%=UnCheckStr(commArr(7,Pcount))%></textarea></div>
                    </div>
                    <%
                end if
                Pcount=Pcount+1
              loop
              %>
            </div>
            <div style="height:24px;">
                   <input type="button" value="删除所选内容" onclick="DelComment()" class="button" style="margin:0px;margin-bottom:5px;float:right;"/>
                   <input type="button" value="全选" onclick="checkAll()" class="button" style="margin:0px;margin-bottom:5px;float:right;margin-right:6px"/>
                   <%=saveButton%>
                   <div id="page2" class="pageContent"><%=MultiPage(comm_Num,pSize,CurPage,aUrl,"","")%></div>
                   <script>document.getElementById("page1").innerHTML=document.getElementById("page2").innerHTML</script>
              </div>
        </div>
     </form>
       <%
    end if
    set blog_Comment=nothing
   end if  
  %>
  </td></tr>
  </table>
<%
'============================================
'      界面设置
'============================================
elseif Request.QueryString("Fmenu")="Skins" Then
dim bmID,bMInfo
Dim blog_module
dim PluginsFolders,PluginsFolder,Bmodules,Bmodule,tempB,SubItemLen,tempI
Dim PluginsXML,DBXML,TypeArray
TypeArray=Array("sidebar","content","function")
%>
<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=Skins">设置外观</a> | <a href="?Fmenu=Skins&Smenu=module">设置模块</a> | <a href="?Fmenu=Skins&Smenu=Plugins">已装插件管理</a> | <a href="?Fmenu=Skins&Smenu=PluginsInstall">安装模块插件</a></div>

<%
if Request.QueryString("Smenu")="module" then
%>
   <div align="left" style="padding:5px;"><%getMsg%>
   <form action="ConContent.asp" method="post" style="margin:0px">
       <input type="hidden" name="action" value="Skins"/>
       <input type="hidden" name="whatdo" value="UpdateModule"/>
       <input type="hidden" name="DoID" value=""/>
      <table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
        <tr align="center">
          <td width="18" class="TDHead"><nobr> </nobr></td>
          <td width="18" class="TDHead"> </td>
          <td width="18" class="TDHead"> </td>
          <td width="18" class="TDHead"><nobr> </nobr></td>
          <td width="68" class="TDHead"><nobr>类型</nobr></td>
      <td width="82" class="TDHead"><nobr>模块标识</nobr></td>
      <td width="160" class="TDHead"><nobr>模块名称</nobr></td>
          <td width="42" class="TDHead"><nobr>排序</nobr></td>
          <td  class="TDHead"><nobr>模块操作</nobr></td>
          </tr>
<%
dim blogModule
set blogModule=conn.execute("select * from blog_module where type<>'function' order by type desc,SortID asc")
do until blogModule.eof
%>        <tr id="tr_<%=blogModule("id")%>" align="center" style="background:<%if blogModule("type")="content" then response.write ("#a9c9e9")%>">
          <td><input type="checkbox" name="selectID" value="<%=blogModule("id")%>"/></td>
          <td><%if blogModule("IsHidden") then response.write "<img src=""images/icon_lock.gif"" alt=""隐藏模块""/>" %></td>
        <td><%if blogModule("IndexOnly") then response.write "<img src=""images/urlInTop.gif"" alt=""只在首页出现""/>" %></td>
          <td><img name="Mimg_<%=blogModule("id")%>" src="images/<%=blogModule("type")%>.gif" width="16" height="16"/></td>
          <td><input type="hidden" name="mID" value="<%=blogModule("id")%>"/>
            <select name="mType" onchange="document.getElementById('tr_<%=blogModule("id")%>').style.backgroundColor=(this.value=='content')?'#a9c9e9':'';document.images['Mimg_<%=blogModule("id")%>'].src='images/'+this.value+'.gif'" <%if blogModule("IsSystem") then response.write "disabled"%>>
             <option value="sidebar">侧边模块</option>
             <option value="content" <%if blogModule("type")="content" then response.write ("selected=""selected""")%>>内容模块</option>
            </select>
           <%if blogModule("IsSystem") then response.write "<input name=""mType"" type=""hidden"" value="""&blogModule("type")&""">"%>
          </td>
          <td><input name="mName" type="text" size="12" class="text" title="<%=blogModule("name")%>" value="<%=blogModule("name")%>" readonly="readonly" style="background:#ffe;"/></td>
          <td><input name="mTitle" type="text" size="24" class="text" value="<%=blogModule("title")%>" <%if blogModule("name")="ContentList" then response.write ("readonly=""readonly"" style=""background:#e5e5e5;""")%>/></td>
          <td><input name="mOrder" type="text" size="3" class="text" value="<%=blogModule("SortID")%>" <%if blogModule("name")="ContentList" then response.write ("readonly=""readonly"" style=""background:#e5e5e5;""")%>/></td>
          <td align="left"><nobr>
          <%if blogModule("name")<>"ContentList" then %>      
            <a href="?Fmenu=Skins&Smenu=editModule&miD=<%=blogModule("id")%>" title="可视化编辑模块"><img border="0" src="images/html.gif" style="margin:0px 2px -3px 0px"/>可视化编辑</a> <a href="?Fmenu=Skins&Smenu=editModuleNormal&miD=<%=blogModule("id")%>" title="编辑HTML源代码"><img border="0" src="images/code.gif" style="margin:0px 2px -3px 0px"/>编辑HTML</a> <%if not blogModule("IsSystem") then%><a href="javascript:DelModule(<%=blogModule("id")%>,'<%=blogModule("IsSystem")%>')" title="删除该模块"><img border="0" src="images/icon_del.gif" style="margin:0px 2px -3px 0px"/>删除</a><%end if%>
          <%end if%>
          </nobr></td>
          </tr>
      <%
      blogModule.movenext
      loop
      %>
        <tr align="center" bgcolor="#D5DAE0">
         <td colspan="9" 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></td>
          <td></td>
        <td></td>
         <td><img src="images/sidebar.gif" width="16" height="16"/></td>
          <td><input type="hidden" name="mID" value="-1"/><select name="mType">
           <option value="sidebar">侧边模块</option>
           <option value="content">内容模块</option>
          </select></td>
          <td><input name="mName" type="text" size="12" class="text" /></td>
          <td><input name="mTitle" type="text" size="24" class="text" /></td>
          <td><input name="mOrder" type="text" size="3" class="text" /></td>
          <td></td>
          </tr>
          </table>
    <div class="SubButton" style="text-align:left;padding:5px;margin:0px">
    <select name="doModule">
       <option>所选模块可用操作</option>
       <option>------------------------</option>
       <option value="dohidden">  - 设置隐藏</option>
       <option value="cancelhidden">  - 取消隐藏</option>
       <option>------------------------</option>
       <option value="doIndex">  - 设置首页独享</option>
       <option value="cancelIndex">  - 取消首页独享</option>
     </select>
      <input type="submit" name="Submit" value="保存模块" class="button" style="margin-bottom:0px"/>
     </div>          
               <div style="color:#f00">模块标识是唯一标记.一旦确定就无法修改.系统自带的模块不允许删除,内容模块只在首页有效.<br/><b>ContentList</b> 是系统自带的日志列表模块,不允许做任何修改</div>
    </div>
  </form>
<%
'========================================================
' 可视化编辑模块HTML代码
'========================================================
  elseif Request.QueryString("Smenu")="editModule" Then
%>

     <div align="center" style="padding:5px;"><%getMsg%>
   <form action="ConContent.asp" method="post" style="margin:0px" onsubmit="return checkSystem()">
     <%
     bmID=Request.QueryString("miD")
     if IsInteger(bmID)=True then
     set bMInfo=conn.execute("select * from blog_module where id="&bmID)
     if bMInfo.eof or bMInfo.bof then
          session(CookieName&"_ShowMsg")=true
          session(CookieName&"_MsgText")="没找到符合条件的模块!"
          Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
      Else
      %>
      <input type="hidden" name="action" value="Skins"/>
      <input type="hidden" name="whatdo" value="editModule"/>
      <input type="hidden" name="DoID" value="<%=bmID%>"/>
      <input type="hidden" name="DoName" value="<%=bMInfo("name")%>"/>
      <input type="hidden" name="editType" value="fck"/>
      <div style="font-weight:bold;font-size:14px;margin:3px;margin-left:0px;text-align:left"><img src="images/<%=bMInfo("type")%>.gif" width="16" height="16" style="margin:0px 4px -3px 0px"/>模块名称: <%=bMInfo("Title")%></div>
      <%
          Dim sBasePath
          sBasePath = "fckeditor/"
          Dim oFCKeditor
          Set oFCKeditor = New FCKeditor
          oFCKeditor.BasePath  = sBasePath
          oFCKeditor.Config("AutoDetectLanguage") = true
          oFCKeditor.Config("DefaultLanguage")    = "zh-cn"
          oFCKeditor.Config("FormatSource") = true
          oFCKeditor.Config("FormatOutput") = true
          oFCKeditor.Config("EnableXHTML") = true
          oFCKeditor.Config("EnableSourceXHTML") = true
          oFCKeditor.Value  = UnCheckStr(bMInfo("HtmlCode"))
          oFCKeditor.Create "HtmlCode"

       end if
      else
     session(CookieName&"_ShowMsg")=true
     session(CookieName&"_MsgText")="你提交了非法字符!"
     Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
     end if
     %>
  <div class="SubButton">
      <input type="submit" name="Submit" value="保存模块代码" class="button" />
      <input type="button" name="Submit" value="返回模块列表" class="button" onclick="location='ConContent.asp?Fmenu=Skins&Smenu=module'"/>
     </div>  
   </div>
   <script>
   function checkSystem(){
    <%if bMInfo("IsSystem") then%>
     if (confirm("这个是系统内置的模块,修改不当,会使系统不正常。\n确定继续吗?")){
      return true
     }
     else
     {return false}
    <%end if%>
    return true
   }
   </script>
<%
'========================================
' 编辑模块HTML代码
'========================================
elseif Request.QueryString("Smenu")="editModuleNormal" Then %>
     <div align="left" style="padding:5px;"><%getMsg%>
   <form action="ConContent.asp" method="post" style="margin:0px" onsubmit="return checkSystem()">
     <%
     bmID=Request.QueryString("Mid")
     if IsInteger(bmID)=True then
     set bMInfo=conn.execute("select * from blog_module where id="&bmID)
     if bMInfo.eof or bMInfo.bof then
          session(CookieName&"_ShowMsg")=true
          session(CookieName&"_MsgText")="没找到符合条件的模块!"
          Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
      Else
      %>
      <input type="hidden" name="action" value="Skins"/>
      <input type="hidden" name="whatdo" value="editModule"/>
      <input type="hidden" name="DoID" value="<%=bmID%>"/>
      <input type="hidden" name="DoName" value="<%=bMInfo("name")%>"/>
      <input type="hidden" name="editType" value="normal"/>
      <div style="font-weight:bold;font-size:14px;margin:3px;margin-left:0px;text-align:left"><img src="images/<%=bMInfo("type")%>.gif" width="16" height="16" style="margin:0px 4px -3px 0px"/>模块名称: <%=bMInfo("Title")%></div>
      <textarea style="width:700px;height:200px" name="HtmlCode"><%=UnCheckStr(bMInfo("HtmlCode"))%></textarea>
      <%
       end if
      else
     session(CookieName&"_ShowMsg")=true
     session(CookieName&"_MsgText")="你提交了非法字符!"
     Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=module")
     end if
     %>
  <div class="SubButton" style="text-align:left">
      <input type="submit" name="Submit" value="保存HTML代码" class="button" <%If Not CheckObjInstalled("ADODB.Stream") Then Response.Write("disabled")%>/>
      <input type="button" name="Submit" value="返回模块列表" class="button" onclick="location='ConContent.asp?Fmenu=Skins&Smenu=module'"/>
     </div>  
   </div>
   <script>
   function checkSystem(){
    <%if bMInfo("IsSystem") then%>
     if (confirm("这个是系统内置的模块,修改不当,会使系统不正常。\n确定继续吗?")){
      return true
     }
     else
     {return false}
    <%end if%>
    return true
   }
   </script>
<%
elseif Request.QueryString("Smenu")="PluginsInstall" then
  Bmodule=getModName
  PluginsFolders=split(getPathList("Plugins")(0),"*")
%>
    <div align="left" style="padding:5px;"><%getMsg%>
      <table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
        <tr align="center">
          <td width="18" class="TDHead"> </td>
      <td width="200" align="left" class="TDHead">名称</td>
      <td width="82" class="TDHead">作者</td>
          <td width="100" class="TDHead">发布日期</td>
          <td width="140" class="TDHead"> </td>
          </tr>
   <%
  if CheckObjInstalled(getXMLDOM()) then
   if CheckObjInstalled("Scripting.FileSystemObject") then
       set PluginsXML=new PXML
       for each PluginsFolder in PluginsFolders
        PluginsXML.XmlPath="Plugins/"&PluginsFolder&"/install.xml"
        PluginsXML.open
         if PluginsXML.getError=0 then
          if len(PluginsXML.SelectXmlNodeText("PluginInstall/main/PluginName"))>0 and IsvalidPlugins(PluginsXML.SelectXmlNodeText("PluginInstall/main/PluginName")) and (not IsvalidValue(Bmodule,PluginsXML.SelectXmlNodeText("PluginInstall/main/PluginName"))) and IsvalidValue(TypeArray,PluginsXML.SelectXmlNodeText("PluginInstall/main/PluginType")) then
        %>    
             <tr>
               <td align="center"><img src="images/<%=PluginsXML.SelectXmlNodeText("PluginInstall/main/PluginType")%>.gif" width="16" height="16"/></td>
            <td align="left"><%=PluginsXML.SelectXmlNodeText("PluginInstall/main/PluginTitle")%></td>
            <td align="center"><%=PluginsXML.SelectXmlNodeText("PluginInstall/main/Author")%></td>
               <td align="center"><%=PluginsXML.SelectXmlNodeText("PluginInstall/main/pubDate")%></td>
               <td align="center"><a href="?Fmenu=Skins&Smenu=InstallPlugins&Plugins=<%=PluginsFolder%>">安装此插件</a> | <a href="javascript:alert('<%=PluginsXML.SelectXmlNodeText("PluginInstall/main/About")%>')">关于</a></td>
             </tr>
       <%
          end If
         end if
         PluginsXML.CloseXml()
       next
     else
    response.write ("<tr><td colspan=""6"" align=""center""><div style=""background:#ffffe8;border:1px solid #95801c;padding:3px;text-align:left;"">你的系统不支持 <b>Scripting.FileSystemObject</b> 只能手动输入插件的文件夹名称</div>")
    response.write ("<div style=""text-align:left;padding:3px""><b>插件路径:</b> Plugins / <input id=""SPath"" type=""text"" size=""16"" class=""text"" value=""""/> <input type=""button"" value=""安装插件"" class=""button"" style=""margin-bottom:-2px"" onclick=""if (document.getElementById('SPath').value.length>0) {location='ConContent.asp?Fmenu=Skins&Smenu=InstallPlugins&Plugins='+document.getElementById('SPath').value}else{alert('请输入插件路径!')}""/></div>")
    response.write ("</td></tr>")
     end if
   else
    response.write ("<tr><td colspan=""6"" align=""center""><div style=""background:#ffffe8;border:1px solid #95801c;padding:3px;text-align:left;"">你的系统不支持 <b>"&getXMLDOM()&"</b>,无法使用插件管理功能,请与服务商联系!</div></td></tr>")
   end if
    %>
      </table>
  <div style="color:#f00;text-align:left">
  此处列出系统找到的合法的PJBlog2插件,安装插件前需要把插件连同其目录一起上传到Plugins文件夹内
  <br/><b>注意:这里只列出没有安装的插件。</b>
  <br/><%If Not CheckObjInstalled("ADODB.Stream") Then %><b>你的服务器不支持</b> <b><a href="http://www.google.com/search?hl=zh-CN&q=ADODB.Stream&btnG=Google+%E6%90%9C%E7%B4%A2&lr=" target="_blank"><b>ADODB.Stream</b></a> 组件,那将意味着大部分插件的无法正常工作</b><%End If%>
  </div>    
</div>
<%


'============================================================
'    安装插件
'============================================================
Elseif Request.QueryString("Smenu")="InstallPlugins" then
    InstallPlugins
'============================================================
'    显示已经安装插件
'============================================================
elseif Request.QueryString("Smenu")="Plugins" then
  dim Blog_Plugins
  set Blog_Plugins=conn.execute("select * from blog_module where IsInstall=true order by id desc")
  %>
    <div align="left" style="padding:5px;"><%getMsg%>
      <table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
        <tr align="center">
          <td width="18" class="TDHead"> </td>
      <td width="150" align="left" class="TDHead">名称</td>
          <td width="150" class="TDHead">插件所在目录</td>
          <td width="150" class="TDHead">安装时间</td>
          <td width="140" class="TDHead"> </td>
        </tr>
       <%do until Blog_Plugins.eof%>
        <tr align="center">
          <td ><img src="images/<%=Blog_Plugins("type")%>.gif" width="16" height="16"/></td>
      <td align="left"><%=Blog_Plugins("title")%></td>
          <td align="left">Plugins/<%=Blog_Plugins("InstallFolder")%>/</td>
          <td ><%=Blog_Plugins("InstallDate")%></td>
          <td>
          <%if len(Blog_Plugins("SettingXML"))>0 then %>
              <a href="?Fmenu=Skins&Smenu=PluginsOptions&Plugins=<%=Blog_Plugins("name")%>">基本设置</a>
            <%else%>
              <span style="color:#999">基本设置</span>
          <%end if%>
           |
          <%if len(Blog_Plugins("ConfigPath"))>0 then %>
              <a href="Plugins/<%=Blog_Plugins("InstallFolder")%>/<%=Blog_Plugins("ConfigPath")%>">高级设置</a>
            <%else%>
              <span style="color:#999">高级设置</span>
          <%end if%>          
           | <a href="javascript:DelPlugins('<%=Blog_Plugins("InstallFolder")%>','<%=Blog_Plugins("type")%>')">反安装此插件</a></td>
          </tr>
           <%
       Blog_Plugins.movenext
       loop
       set Blog_Plugins=nothing
       %>
     </table>
       <div style="color:#f00;text-align:left">
       <%If Not CheckObjInstalled("ADODB.Stream") Then %>
         <b>你的服务器不支持</b> <b><a href="http://www.google.com/search?hl=zh-CN&q=ADODB.Stream&btnG=Google+%E6%90%9C%E7%B4%A2&lr=" target="_blank"><b>ADODB.Stream</b></a> 组件,那将意味着大部分插件的无法正常工作</b>
       <%else%>
         <input type="button" name="button" value="修复插件" class="button" onclick="FixPlugins()"/>
       <%End If%>
<br/>
假如插件反安装不成功,请到 <b>数据库与附件-数据库管理</b> 压缩修复数据再反安装
</div>
  <%
  
  
  
'============================================================
'    反安装插件
'============================================================
elseif Request.QueryString("Smenu")="UnInstallPlugins" then
   Dim UnPlugName,getCateID,DropTable,KeepTable,ModSetTemp1,getMod
   PluginsFolder=CheckStr(Request.QueryString("Plugins"))
   KeepTable=CBool(Request.QueryString("Keep"))
   set PluginsXML=new PXML
   PluginsXML.XmlPath="Plugins/"&PluginsFolder&"/install.xml"
   PluginsXML.open
   if PluginsXML.getError=0 Then
     UnPlugName=PluginsXML.SelectXmlNodeText("PluginInstall/main/PluginName")
     Set ModSetTemp1=New ModSet
     ModSetTemp1.Open UnPlugName
     ModSetTemp1.RemoveApplication
     DropTable=PluginsXML.SelectXmlNodeText("PluginInstall/main/DropTable")
     set getMod=conn.Execute("select CateID from blog_module where name='"&UnPlugName&"'")
     if getMod.eof then
          session(CookieName&"_ShowMsg")=true
          session(CookieName&"_MsgText")="<font color=""#ff0000"">"&UnPlugName&"</font> 无法反安装,数据库没有找到相应的信息!"
          Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=Plugins")
      else
        getCateID=getMod(0)
        if len(getCateID)>0 then conn.Execute("delete * from blog_Category where cate_ID="&getCateID)
        delPlugins UnPlugName
        if len(DropTable)>0 And KeepTable=False Then conn.Execute("Drop TABLE "&DropTable)
        SubItemLen = int(PluginsXML.GetXmlNodeLength("PluginInstall/SubItem/item"))
        
        for tempI=0 to SubItemLen-1
          if not PluginsXML.SelectXmlNodeText("PluginInstall/SubItem/item/PluginType")="function" then
             delPlugins UnPlugName&"SubItem"&(tempI+1)
          end If
       Next
         If len(PluginsXML.SelectXmlNodeText("PluginInstall/main/SettingFile"))>0 Then
          if KeepTable=False Then InstallPlugingSetting "",UnPlugName,"delete"
       End If
     end if
   end If
  
   PluginsXML.CloseXml()
   log_module(2)
   CategoryList(2)
   FixPlugins(0)
   session(CookieName&"_ShowMsg")=true
   session(CookieName&"_MsgText")="<font color=""#ff0000"">"&UnPlugName&"</font> 插件反安装完成!"
   Response.Redirect("ConContent.asp?Fmenu=Skins&Smenu=Plugins")
  
'============================================================
'    修复插件
'============================================================  
elseif Request.QueryString("Smenu")="FixPlugins" then
  FixPlugins(1)
'============================================================
'    插件配置
'============================================================
elseif Request.QueryString("Smenu")="PluginsOptions" then
dim PluginsSetting,LoadSetXML,KeyLen,Si,LoadModSet,SelectTemp
set PluginsSetting=conn.execute("select top 1 * from blog_module where name='"+checkstr(Request.QueryString("Plugins"))+"'")
set LoadSetXML=new PXML
Set LoadModSet=New ModSet
LoadModSet.Open(PluginsSetting("name"))
LoadSetXML.XmlPath="Plugins/"&PluginsSetting("InstallFolder")&"/"&PluginsSetting("SettingXML")
LoadSetXML.Open
   if LoadSetXML.getError=0 then
    KeyLen = int(LoadSetXML.GetXmlNodeLength("PluginOptions/Key"))
    getMsg
    Response.Write ("<div align=""center""><form action=""ConContent.asp"" method=""post"" style=""margin:0px"">")
    Response.Write ("<input type=""hidden"" name=""action"" value=""Skins""/>")
    Response.Write ("<input type=""hidden"" name=""whatdo"" value=""SavePluginsSetting""/>")
    Response.Write ("<input type=""hidden"" name=""PluginsName"" value="""&PluginsSetting("name")&"""/>")
    response.write  "<table border=""0"" cellpadding=""2"" cellspacing=""1"" class=""TablePanel"" style=""margin:6px"">"
     response.write("<tr><td colspan=""2"" align=""left"" style=""background:#e5e5e5;padding:6px""><div style=""font-weight:bold;font-size:14px;"">"&PluginsSetting("title")&" 的基本设置</div></td></tr>")
       For tempI=0 To KeyLen-1
          response.write "<tr><td align=""right"" width=""200"" valign=""top"" style=""padding-top:6px"">"&LoadSetXML.GetAttributes("PluginOptions/Key","description",TempI)&"</td><td width=""300"">"
          if Lcase(LoadSetXML.GetAttributes("PluginOptions/Key","type",TempI))="select" then
             response.write "<select name="""&LoadSetXML.GetAttributes("PluginOptions/Key","name",TempI)&""">"
                for Si=0 to LoadSetXML.SelectXmlNode("PluginOptions/Key",TempI).getElementsByTagName("option").length-1
                     If LoadModSet.getKeyValue(LoadSetXML.GetAttributes("PluginOptions/Key","name",tempI)) = LoadSetXML.SelectXmlNode("PluginOptions/Key",TempI).getElementsByTagName("option").item(Si).attributes(0).value Then SelectTemp="selected"
                    If LoadSetXML.SelectXmlNode("PluginOptions/Key",TempI).getElementsByTagName("option").item(Si).attributes.length>0 Then
                        Response.write "<option "&SelectTemp&" value="""&LoadSetXML.SelectXmlNode("PluginOptions/Key",TempI).getElementsByTagName("option").item(Si).attributes(0).value&""">"&LoadSetXML.SelectXmlNode("PluginOptions/Key",TempI).getElementsByTagName("option").item(Si).text&"</option>"
                     else
                        Response.write "<option "&SelectTemp&">"&LoadSetXML.SelectXmlNode("PluginOptions/Key",TempI).getElementsByTagName("option").item(Si).text&"</option>"
                    end If
                    SelectTemp=""
                Next
             response.write "</select></td></tr>"
          elseif Lcase(LoadSetXML.GetAttributes("PluginOptions/Key","type",TempI))="textarea" Then
             response.write "<textarea name="""&LoadSetXML.GetAttributes("PluginOptions/Key","name",tempI)&""" rows="""&LoadSetXML.GetAttributes("PluginOptions/Key","rows",TempI)&""" cols="""&LoadSetXML.GetAttributes("PluginOptions/Key","cols",TempI)&""">"&LoadModSet.getKeyValue(LoadSetXML.GetAttributes("PluginOptions/Key","name",tempI))&"<&#47textarea></td></tr>"
          Else
             response.write "<input name="""&LoadSetXML.GetAttributes("PluginOptions/Key","name",TempI)&""" type="""&LoadSetXML.GetAttributes("PluginOptions/Key","type",TempI)&""" size="""&LoadSetXML.GetAttributes("PluginOptions/Key","size",TempI)&""" value="""&LoadModSet.getKeyValue(LoadSetXML.GetAttributes("PluginOptions/Key","name",tempI))&"""/></td></tr>"
          end If
       next
    response.write "<tr><td colspan=""2"" align=""center""><input type=""submit"" name=""Submit"" value=""保存设置"" class=""button""/><input type=""button"" value=""放弃返回"" class=""button"" onclick=""history.go(-1)""/></td></tr>"
    response.write "</table>"
    response.write "</form></div>"
   else
    response.write "无法找到配置文件"
   end if
set LoadSetXML=nothing
set PluginsSetting=nothing
'============================================================
'    设置外观
'============================================================
else
dim SkinFolders,SkinFolder
  SkinFolders=split(getPathList("skins")(0),"*")
%>
    <div align="left" style="padding:5px;"><%getMsg%>
   <form action="ConContent.asp" method="post" style="margin:0px">
       <input type="hidden" name="action" value="Skins"/>
       <input type="hidden" name="whatdo" value="setDefaultSkin"/>
       <input type="hidden" name="SkinName" value=""/>
       <input type="hidden" name="SkinPath" value=""/>
  </form>
      <table border="0" cellpadding="2" cellspacing="1" class="TablePanel" width="700">
        <tr>
            <td width="700" class="TDHead" colspan="2">界面列表</td>
        </tr>
   <%
  if CheckObjInstalled(getXMLDOM()) and CheckObjInstalled("Scripting.FileSystemObject") then
      dim SkinXML,k,SkinPreview
      k=2
     set SkinXML=new PXML
   for each SkinFolder in  SkinFolders
      SkinXML.XmlPath="skins/"&SkinFolder&"/skin.xml"
      SkinXML.open
    if SkinXML.getError=0 then
    if k/2=int(k/2) then response.write "<tr>"
    SkinPreview="images/Control/skin.jpg"
    if FileExist("skins/"&SkinFolder&"/Preview.jpg") then SkinPreview="skins/"&SkinFolder&"/Preview.jpg"
   %>  
     <td width="50%" style='border-bottom:1px dotted #ccc'>
       <div class="<%if Lcase(blog_DefaultSkin)<>Lcase(SkinFolder) then response.write ("un")%>selectskin">
       <img src="<%=SkinPreview%>" alt="" border="0" class="skinimg"/>
         <div class="skinDes">
         <div style="height:38px;overflow:hidden"><b style="color:#004000"><%=SkinXML.SelectXmlNodeText("SkinName")%></b></div>
         <span style="height:16px;overflow:hidden;cursor:default" title="设计者:<%=SkinXML.SelectXmlNodeText("SkinDesigner")%>"><B>设计者:</B> <%=SkinXML.SelectXmlNodeText("SkinDesigner")%></span><br/>
         <B>发布时间:</B> <%=SkinXML.SelectXmlNodeText("pubDate")%><br/></div>
     <%
        if Lcase(blog_DefaultSkin)=Lcase(SkinFolder) then
        response.write ("<div class=""cskin""><img src=""images/Control/select.gif"" alt="""" border=""0"" /></div>当前界面")
       else
        response.write ("<a href=""javascript:setSkin('"&SkinFolder&"','"&SkinXML.SelectXmlNodeText("SkinName")&"')"">设置为当前主题</a>")
      end if
      %>
      </div>
     </td>
  <%
    end if
   SkinXML.CloseXml
   if k/2<>int(k/2) then response.write "</tr>"
   k=k+1
  next
   if k/2<>int(k/2) then response.write "</tr>"
  
  set SkinXML=nothing
   else
    response.write ("<tr><td colspan=""2"" align=""center""><div style=""background:#ffffe8;border:1px solid #95801c;padding:3px;text-align:left;"">你的系统不支持 <b>"&getXMLDOM()&"</b> 或 <b>Scripting.FileSystemObject</b> 只能手动输入Skin的文件夹名称</div>")
    response.write ("<div style=""text-align:left;padding:3px""><b>界面路径:</b> Skins / <input id=""SPath"" type=""text"" size=""16"" class=""text"" value="""+blog_DefaultSkin+"""/> <input type=""button"" value=""保存界面"" class=""button"" style=""margin-bottom:-2px"" onclick=""if (document.getElementById('SPath').value.length>0) {setSkin(document.getElementById('SPath').value,document.getElementById('SPath').value)}else{alert('请输入界面路径!')}""/></div>")
    response.write ("</td></tr>")
   end if
  %>
      </table>
</div>
<%end if%>
</td>
  </tr></table>
<%

elseif Request.QueryString("Fmenu")="SQLFile" 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=SQLFile">数据库管理</a> | <a href="?Fmenu=SQLFile&Smenu=Attachments">附件管理</a></div>
    <div align="left" style="padding:5px;"><%getMsg%>
     <%
     if Request.QueryString("Smenu")="Attachments" then
     %>
   <form action="ConContent.asp" method="post" style="margin:0px" onsubmit="if (confirm('是否删除选择的文件或文件夹')) {return true} else {return false}">
   <input type="hidden" name="action" value="Attachments"/>
   <input type="hidden" name="whatdo" value="DelFiles"/>
     <%
     dim AttPath,ArrFolder,Arrfile,ArrFolders,Arrfiles,arrUpFolders,arrUpFolder,TempF
     TempF=""
     AttPath=Request.QueryString("AttPath")
    if len(AttPath)<1 then
       AttPath="attachments"
     elseif bc(server.mapPath(AttPath),server.mapPath("attachments")) then
       AttPath="attachments"
     end If
     ArrFolders=split(getPathList(AttPath)(0),"*")
     Arrfiles=split(getPathList(AttPath)(1),"*")
     response.write "<div style=""font-weight:bold;font-size:14px;margin:3px;margin-left:0px"">"&AttPath&"</div><div style=""margin:3px;margin-left:0px;"">"
     if AttPath<>"attachments" then
       arrUpFolders=split(AttPath,"/")
       for i=0 to ubound(arrUpFolders)-1
        arrUpFolder=arrUpFolder&TempF&arrUpFolders(i)
        TempF="/"
       next
     end if
     if len(arrUpFolder)>0 then
      response.write "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href=""?Fmenu=SQLFile&Smenu=Attachments&AttPath="&arrUpFolder&"""><img border=""0"" src=""images/file/folder_up.gif"" style=""margin:4px 3px -3px 0px""/>返回上级目录</a><br>"
     end if
     for each ArrFolder in ArrFolders
      response.write "<input name=""folders"" type=""checkbox"" value="""&AttPath&"/"&ArrFolder&"""/>&nbsp;<a href=""?Fmenu=SQLFile&Smenu=Attachments&AttPath="&AttPath&"/"&ArrFolder&"""><img border=""0"" src=""images/file/folder.gif"" style=""margin:4px 3px -3px 0px""/>"&ArrFolder&"</a><br>"
     next
     for each Arrfile in Arrfiles
      response.write "<input name=""Files"" type=""checkbox"" value="""&AttPath&"/"&Arrfile&"""/>&nbsp;<a href="""&AttPath&"/"&Arrfile&""" target=""_blank"">"&getFileIcons(getFileInfo(AttPath&"/"&Arrfile)(1))&Arrfile&"</a>&nbsp;&nbsp;"&getFileInfo(AttPath&"/"&Arrfile)(0)&" | "&getFileInfo(AttPath&"/"&Arrfile)(2)&" | "&getFileInfo(AttPath&"/"&Arrfile)(3)&"<br>"
     next
     response.write "</div>"
     %>
    <div style="color:#f00">如果文件夹内存在文件,那么该文件夹将无法删除!</div>
      <div class="SubButton">
      <input type="button" value="全选" class="button" onclick="checkAll()"/>  <input type="submit" name="Submit" value="删除所选的文件或文件夹" class="button"/>
     </div>
     </form>
    <%else%>
    <b>数据库路径:</b> <%=Server.MapPath(AccessFile)%><br/>
    <b>数据库大小:</b> <span id="accessSize"><%=getFileInfo(AccessFile)(0)%></span><br/>
    <b>数据库操作:</b> <a href="?Fmenu=SQLFile&do=Compact">压缩修复</a> | <a href="?Fmenu=SQLFile&do=Backup">备份</a><br/>
    <%
    Dim AccessFSO,AccessEngine,AccessSource
'-------------压缩数据库-----------------
    if Request.QueryString("do")="Compact" then
      Set AccessFSO=Server.CreateObject("Scripting.FileSystemObject")
        IF AccessFSO.FileExists(Server.Mappath(AccessFile)) Then
      Response.Write "<div style='padding:4px 0px 4px 10px;border: 1px dotted #999;margin:2px;background:#ffffee'>"
      Response.Write "压缩数据库开始,网站暂停一切用户的前台操作...<br/>"
      Response.Write "关闭数据库操作...<br/>"
      call CloseDB
      Application.Lock
      FreeApplicationMemory
      Application(CookieName & "_SiteEnable") = 0
      Application(CookieName & "_SiteDisbleWhy") = "网站暂停中,请稍候几分钟后再来..."
        Application.UnLock
        Set AccessEngine = CreateObject("JRO.JetEngine")
        AccessEngine.CompactDatabase "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath(AccessFile), "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.Mappath(AccessFile & ".temp")
        AccessFSO.CopyFile Server.Mappath(AccessFile & ".temp"),Server.Mappath(AccessFile)
        AccessFSO.DeleteFile(Server.Mappath(AccessFile & ".temp"))
        Set AccessFSO = Nothing
        Set AccessEngine = Nothing
      Application.Lock
      Application(CookieName & "_SiteEnable") = 1
      Application(CookieName & "_SiteDisbleWhy") = ""
      Application.UnLock
      Response.write "压缩数据库完成...<br/>"
      Application.Lock
      Application(CookieName & "_SiteEnable") = 1
      Application(CookieName & "_SiteDisbleWhy") = ""
      Application.UnLock
      Response.Write "网站恢复正常访问..."
      Response.Write "</div>"
      Response.write "<script>document.getElementById('accessSize').innerText='"&getFileInfo(AccessFile)(0)&"'</script>"
        end if
    end if
'-------------备份数据库数据库-----------------
    if Request.QueryString("do")="Backup" then
      Set AccessFSO=Server.CreateObject("Scripting.FileSystemObject")
        IF AccessFSO.FileExists(Server.Mappath(AccessFile)) Then
      Response.Write "<div style='padding:4px 0px 4px 10px;border: 1px dotted #999;margin:2px;background:#ffffee'>"
      Response.Write "备份数据库开始,网站暂停一切用户的前台操作...<br/>"
      Response.Write "关闭数据库操作...<br/>"
      call CloseDB
      Application.Lock
      FreeApplicationMemory
      Application(CookieName & "_SiteEnable") = 0
      Application(CookieName & "_SiteDisbleWhy") = "网站暂停中,请稍候几分钟后再来..."
        Application.UnLock
          CopyFiles Server.Mappath(AccessFile),Server.Mappath("backup/Backup_" & DateToStr(Now(),"YmdHIS") & "_" & randomStr(8) &".mbk")
      Application.Lock
      Application(CookieName & "_SiteEnable") = 1
      Application(CookieName & "_SiteDisbleWhy") = ""
      Application.UnLock
      Response.write "压缩数据库完成...<br/>"
      Application.Lock
      Application(CookieName & "_SiteEnable") = 1
      Application(CookieName & "_SiteDisbleWhy") = ""
      Application.UnLock
      Response.Write "网站恢复正常访问..."
      Response.Write "</div>"
      Response.write "<script>document.getElementById('accessSize').innerText='"&getFileInfo(AccessFile)(0)&"'</script>"
        end if
       Set AccessFSO=Nothing
    end if
'---------------还原数据库------------
    if Request.QueryString("do")="Restore" then
     AccessSource=Request.QueryString("source")
      Set AccessFSO=Server.CreateObject("Scripting.FileSystemObject")
        IF AccessFSO.FileExists(Server.Mappath(AccessSource)) Then
      Response.Write "<div style='padding:4px 0px 4px 10px;border: 1px dotted #999;margin:2px;background:#ffffee'>"
      Response.Write "还原数据库开始,网站暂停一切用户的前台操作...<br/>"
      Response.Write "关闭数据库操作...<br/>"
      call CloseDB
      Application.Lock
      FreeApplicationMemory
      Application(CookieName & "_SiteEnable") = 0
      Application(CookieName & "_SiteDisbleWhy") = "网站暂停中,请稍候几分钟后再来..."
        Application.UnLock
          CopyFiles Server.Mappath(AccessFile),Server.Mappath(AccessFile & ".TEMP")
          if DeleteFiles(Server.Mappath(AccessFile)) then response.write ("原数据库删除成功<br/>")
          response.write CopyFiles(Server.Mappath(AccessSource),Server.Mappath(AccessFile))
          if DeleteFiles(Server.MapPath(AccessSource)) then response.write ("数据库备份删除成功<br/>")
        if DeleteFiles(Server.Mappath(AccessFile & ".TEMP")) then response.write ("Temp备份删除成功<br/>")
      Application.Lock
      Application(CookieName & "_SiteEnable") = 1
      Application(CookieName & "_SiteDisbleWhy") = ""
      Application.UnLock
      Response.write "数据库还原完成...<br/>"
      Application.Lock
      Application(CookieName & "_SiteEnable") = 1
      Application(CookieName & "_SiteDisbleWhy") = ""
      Application.UnLock
      Response.Write "网站恢复正常访问..."
      Response.Write "</div>"
      Response.write "<script>document.getElementById('accessSize').innerText='"&getFileInfo(AccessFile)(0)&"'</script>"
        end if
       Set AccessFSO=Nothing
    end if
'---------------删除备份数据库------------
    if Request.QueryString("do")="DelFile" then
     AccessSource=Request.QueryString("source")
      Set AccessFSO=Server.CreateObject("Scripting.FileSystemObject")
        IF AccessFSO.FileExists(Server.Mappath(AccessSource)) Then
      Response.Write "<div style='padding:4px 0px 4px 10px;border: 1px dotted #999;margin:2px;background:#ffffee'>"
          if DeleteFiles(Server.MapPath(AccessSource)) then response.write ("数据库备份删除成功<br/>")
      Response.Write "</div>"
        end if
       Set AccessFSO=Nothing
      end if
    %>
        <br/><b>数据库备份列表:</b> <br/>
    <%
     dim BackUpFiles,BackUpFile
     BackUpFiles=split(getPathList("backup")(1),"*")
       for each BackUpFile in BackUpFiles
        response.write "<a href=""backup/"&BackUpFile&""" target=""_blank"">"&getFileIcons(getFileInfo("backup/"&BackUpFile)(1))&BackUpFile&"</a>"
        response.write "&nbsp;&nbsp;<a href=""?Fmenu=SQLFile&do=DelFile&source=backup/"&BackUpFile&""" title=""删除备份文件"">删除</a> | <a href=""?Fmenu=SQLFile&do=Restore&source=backup/"&BackUpFile&""" title=""删除备份文件"">还原数据库</a>"
        response.write " | "&getFileInfo("backup/"&BackUpFile)(0)&" | "&getFileInfo("backup/"&BackUpFile)(2)&"<br/>"
       next
       %>
   <%end if%>
   </div>
</td>
  </tr></table>
<%
elseif Request.QueryString("Fmenu")="Members" then '帐户与权限
Dim blog_Status,blog_Statu,StatusItem,blog_Status_Len
%>
<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=Members">权限管理</a> | <a href="?Fmenu=Members&Smenu=Users">帐户管理</a></div>
<%
if Request.QueryString("Smenu")="Users" then

%>
<%getMsg%>
<form action="ConContent.asp" method="post" style="margin:0px">
   <input type="hidden" name="action" value="Members"/>
   <input type="hidden" name="whatdo" value="SaveUserRight"/>
   <input type="hidden" name="DelID" value=""/>
<table border="0" cellpadding="2" cellspacing="1" class="TablePanel" style="margin:5px;">
<%
blog_Status=Application(CookieName&"_blog_rights")
dim FindUser,FindUserFilter
FindUser=Request.QueryString("User")
if len(FindUser)<1 then
FindUserFilter=""
else
FindUserFilter=" AND M.mem_Name='" & FindUser & "'"
end if
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
dim bMember,PageCM
Set bMember=Server.CreateObject("ADODB.RecordSet")
SQL="Select M.*,S.stat_name,S.stat_title FROM blog_Member as M,blog_status as S where M.mem_Status=S.stat_name"&FindUserFilter&" order by mem_RegTime desc"
bMember.Open SQL,Conn,1,1
PageCM=0
    response.write ("<tr><td colspan=""8"" style=""border-bottom:1px solid #999;background:#fae1af;height:36px"">&nbsp;用户名&nbsp;<input id=""FindUser"" type=""text"" class=""text"" size=""16""/><input type=""button"" value=""查找用户"" class=""button"" style=""margin-bottom:-2px"" onclick=""location='ConContent.asp?Fmenu=Members&Smenu=Users&User='+escape(document.getElementById('FindUser').value)""/></td></tr>")
IF not bMember.EOF Then
  bMember.PageSize=30
  bMember.AbsolutePage=CurPage
  Dim bMember_nums
  bMember_nums=bMember.RecordCount
    response.write "<tr><td colspan=""8"" style=""border-bottom:1px solid #999;""><div class=""pageContent"">"&MultiPage(bMember_nums,30,CurPage,"?Fmenu=Members&Smenu=Users&","","float:left")&"</div><div class=""Content-body"" style=""line-height:200%""></td></tr>"

%>
        <tr align="center">
          <td nowrap="nowrap" class="TDHead">编号</td>
          <td width="100" nowrap="nowrap" class="TDHead">会员名称</td>
          <td width="100" class="TDHead">会员身份</td>
          <td class="TDHead">注册时间</td>
          <td class="TDHead">上次访问时间</td>
          <td class="TDHead">最后登录IP地址</td>
          <td class="TDHead">设置权限</td>
          <td class="TDHead"> </td>
     </tr>
     <%
        blog_Status_Len=ubound(blog_Status,2)
       Do Until bMember.EOF or PageCM=bMember.PageSize
   %>
        <tr align="center">
          <td nowrap><%=bMember("mem_ID")%>
          <%
            if bMember("mem_Name") <> memName then
              response.write "<input type=""hidden"" name=""mem_ID"" value="""&bMember("mem_ID")&"""/>"
            end if
          %>
    </td>
          <td nowrap align="left"><a href="member.asp?action=view&memName=<%=Server.URLEncode(bMember("mem_Name"))%>" target="_blank"><%=bMember("mem_Name")%></a></td>
          <td nowrap> <span id="RightStr_<%=bMember("mem_ID")%>"><%=bMember("stat_title")%></span> </td>
          <td nowrap> <%=DateToStr(bMember("mem_RegTime"),"Y-m-d")%> </td>
          <td nowrap> <%=DateToStr(bMember("mem_lastVisit"),"Y-m-d H:I A")%> </td>
          <td nowrap> <%=bMember("mem_lastIP")%> </td>
          <td>
            <select name="mem_Status" onchange="ChValue(this.value,'RightStr_<%=bMember("mem_ID")%>')" <%if bMember("mem_Name") = memName then response.write "disabled"%>><%
        For i=0 to blog_Status_Len
                if bMember("stat_name")=blog_Status(0,i) then
                    response.write "<option value="""&blog_Status(0,i)&""" selected=""selected"">"&blog_Status(0,i)&"</option>"
                 else
                    response.write "<option value="""&blog_Status(0,i)&""">"&blog_Status(0,i)&"</option>"
                end if
             next
            %></select>
          </td>
          <td>
           <%if bMember("mem_Name") <> memName then%>
            <a href="javascript:delUser(<%=bMember("mem_ID")%>)"><img border="0" src="images/icon_del.gif" width="16" height="16" /></a>
          <%end if%>
          </td>
     </tr>
   <%  
       bMember.MoveNext
      PageCM=PageCM+1
  loop
    bMember.Close
    Set bMember=Nothing
   else
   response.write ("<tr><td colspan=""8"" align=""center"" >你所查询的用户不存在!</td></tr>")
end if  
   %></table>
   <div class="SubButton">
      <input type="submit" name="Submit" value="保存用户权限" class="button"/>
     </div>
     </form>
<script>
  function ChValue(str,obj){
   <%
       For i=0 to blog_Status_Len
              response.write "if (str=='"&blog_Status(0,i)&"') {document.getElementById(obj).innerText='"&blog_Status(1,i)&"'};"
           next
   %>
   }
</script>
<%
     elseif Request.QueryString("Smenu")="EditRight" then
     dim RightDB
     sql="select * from blog_status where stat_name='" & checkstr(Request.QueryString("id")) & "'"
     set RightDB=conn.execute(sql)
       if RightDB.eof then
        response.write "没找到该权限组.请重新更新blog缓存信息"
       else

%>
      <form action="ConContent.asp" method="post" style="margin:0px">
       <input type="hidden" name="action" value="Members"/>
       <input type="hidden" name="whatdo" value="EditGroup"/>
       <input type="hidden" name="status_name" value="<%=checkstr(Request.QueryString("id"))%>"/>
       <div align="left" style="padding:5px;"><%getMsg%>
       <table border="0" cellpadding="3" cellspacing="1" class="TablePanel" style="margin:6px">
       <tr><td colspan="2" align="left" style="background:#e5e5e5;padding:6px">
       <div style="font-weight:bold;font-size:14px;"><%=RightDB("stat_name")%> 权限设置</div></td></tr>
         <tr><td align="right" width="100">权限名称</td><td width="300"><input name="status_title" type="text" size="20" class="text" value="<%=RightDB("stat_title")%>"/></td></tr>
         <tr><td align="right">添加日志</td>
             <td><select name="AddArticle">
                    <option value="11" style="background:#C5FDB7">允许</option>
                    <option value="00" style="background:#FABABA" <%if not CBool(mid(RightDB("stat_code"),2,1)) then response.write ("selected=""selected""") %>>不允许</option>
                   </select>
              </td></tr>
            
           <tr><td align="right">编辑日志</td>
               <td><select name="EditArticle">
            <option value="11" style="background:#C5FDB7">所有</option>
            <option value="01" style="background:#B7D8FD" <%if not CBool(mid(RightDB("stat_code"),3,1)) and CBool(mid(RightDB("stat_code"),4,1)) then response.write ("selected=""selected""")%>>自己</option>
            <option value="00" style="background:#FABABA" <%if not CBool(mid(RightDB("stat_code"),3,1)) and not CBool(mid(RightDB("stat_code"),4,1)) then response.write ("selected=""selected""")%>>不允许</option>
                     </select>
                 </td></tr>

           <tr><td align="right">删除日志</td>
               <td><select name="DelArticle">
                  <option value="11" style="background:#C5FDB7">所有</option>
                  <option value="01" style="background:#B7D8FD" <%if not CBool(mid(RightDB("stat_code"),5,1)) and CBool(mid(RightDB("stat_code"),6,1)) then response.write ("selected=""selected""")%>>自己</option>
                  <option value="00" style="background:#FABABA" <%if not CBool(mid(RightDB("stat_code"),5,1)) and not CBool(mid(RightDB("stat_code"),6,1)) then response.write ("selected=""selected""")%>>不允许</option>
              </select>
          </td></tr>
           <tr><td align="right">发表评论</td>
              <td ><select name="AddComment">
                  <option value="11" style="background:#C5FDB7">允许</option>
                  <option value="00" style="background:#FABABA" <%if not CBool(mid(RightDB("stat_code"),7,1)) then response.write ("selected=""selected""")%>>不允许</option>
                    </select>
                </td></tr>
           <tr><td align="right">删除评论</td>
              <td ><select name="DelComment">
                <option value="1" style="background:#C5FDB7">允许</option>
                <option value="0" style="background:#FABABA" <%if not CBool(mid(RightDB("stat_code"),9,1)) then response.write ("selected=""selected""")%>>不允许</option>
              </select>
            </td></tr>
            <tr><td align="right">允许查看隐藏分类</td>
              <td ><select name="ShowHiddenCate">
                  <option value="1" style="background:#C5FDB7">允许</option>
                  <option value="0" style="background:#FABABA" <%if not CBool(mid(RightDB("stat_code"),12,1)) then response.write ("selected=""selected""")%>>不允许</option>
                    </select>
                </td></tr>
               <tr><td align="right">管理员</td>
             <td ><select name="IsAdmin">
                <option value="1" style="background:#C5FDB7">是</option>
                <option value="0" style="background:#FABABA" <%if not CBool(mid(RightDB("stat_code"),11,1)) then response.write ("selected=""selected""")%>>否</option>
              </select>
            </td></tr>
           <tr><td align="right">上传附件</td>
              <td ><select name="CanUpload">
                <option value="1" style="background:#C5FDB7">允许</option>
                <option value="0" style="background:#FABABA" <%if not CBool(mid(RightDB("stat_code"),10,1)) then response.write ("selected=""selected""")%>>不允许</option>
              </select>
          </td></tr>
           <tr><td align="right">附件大小</td><td ><input name="UploadSize" type="text" size="20" class="text" title="<%=RightDB("stat_attSize")%>字节" value="<%=RightDB("stat_attSize")%>" style="font-size:11px" onchange="this.title=this.value+' 字节'"/></td></tr>
             <tr><td align="right">附件类型</td><td ><input name="UploadType" type="text" size="50" class="text" title="<%=RightDB("stat_attType")%>" value="<%=RightDB("stat_attType")%>" style="font-size:11px" onchange="this.title=this.value"/></td></tr>
             <tr><td colspan="2" align="center"><input type="submit" name="Submit" value="保存设置" class="button"/><input type="button" value="放弃返回" class="button" onclick="history.go(-1)"/></td></tr>
          
       </table>
       </div>
      </form>
<%
       end if
   else
%>  
   <form action="ConContent.asp" method="post" style="margin:0px">
   <input type="hidden" name="action" value="Members"/>
   <input type="hidden" name="whatdo" value="Group"/>
   <input type="hidden" name="DelGroup" value=""/>
    <div align="left" style="padding:5px;"><%getMsg%>
        <table border="0" cellpadding="2" cellspacing="1" class="TablePanel">
        <tr align="center">
          <td nowrap="nowrap" class="TDHead">权限标识</td>
          <td nowrap="nowrap" class="TDHead">权限标题</td>
          <td width="16" nowrap="nowrap" class="TDHead"> </td>
     </tr>
<%
blog_Status=Application(CookieName&"_blog_rights")
blog_Status_Len=ubound(blog_Status,2)

For i=0 to blog_Status_Len
%>    
        <tr align="center">
          <td ><input name="status_name" type="text" size="15" class="text" value="<%=blog_Status(0,i)%>"  readonly="readonly" style="background:#ffe;font-size:11px"/></td>
          <td ><input name="status_title" type="text" size="20" class="text" value="<%=blog_Status(1,i)%>"/></td>
          <td align="left">
文件太长一次发不完,下文接
Tags: ,
Feb 13
二、根目录中的blogcomm.asp文件
修改后的源码:
<!--#include file="commond.asp" -->
<!--#include file="header.asp" -->
<!--#include file="class/cls_logAction.asp" -->
<div id="Tbody">
    <div style="text-align:center;"><br/>
<%
'=====================================
'  评论处理页面
'    更新时间: 2006-1-12
'=====================================
IF not ChkPost() Then
response.write ("非法操作!!")
elseif Request.Form("action")="post" Then
'评论发表代码
Dim PostBComm
PostBComm=postcomm
%>
   <div style="text-align:center;">
    <div id="MsgContent" style="width:300px">
      <div id="MsgHead"><%=PostBComm(0)%></div>
      <div id="MsgBody">
     <div class="<%=PostBComm(2)%>"></div>
         <div class="MessageText"><%=PostBComm(1)%></div>
    </div>
  </div>
  </div>
<%
elseif Request.QueryString("action")="del" then
Dim DelBComm
DelBComm=delcomm
%>
   <div style="text-align:center;">
    <div id="MsgContent" style="width:300px">
      <div id="MsgHead"><%=DelBComm(0)%></div>
      <div id="MsgBody">
     <div class="<%=DelBComm(2)%>"></div>
         <div class="MessageText"><%=DelBComm(1)%></div>
    </div>
  </div>
  </div>
  <%
elseif Request("action")="Reply" then
PostBComm=replyMsg
%>
   <div style="text-align:center;">
    <div id="MsgContent" style="width:300px">
      <div id="MsgHead"><%=PostBComm(0)%></div>
      <div id="MsgBody">
                 <div class="<%=PostBComm(2)%>"></div>
         <div class="MessageText"><%=PostBComm(1)%></div>
          </div>
        </div>
  </div>
<%
else
response.write ("非法操作!!")
end if

'============================ 删除评论函数 =================================================
function delcomm
dim post_commID,blog_Comm,blog_CommAuthor,logid
dim ReInfo
  ReInfo=Array("错误信息","","MessageIcon")
  post_commID=clng(CheckStr(request.QueryString("commID")))
  set blog_Comm=Conn.ExeCute("select top 1 comm_ID,blog_ID,comm_Author from blog_Comment where comm_ID="&post_commID)
  if blog_Comm.eof or blog_Comm.bof then
   ReInfo(0)="错误信息"
   ReInfo(1)="<b>不存在此评论,或该评论已经被删除!</b><br/><a href=""javascript:history.go(-1);"">单击返回</a>"
   ReInfo(2)="WarningIcon"
   delcomm=ReInfo
   exit function
  end if
  blog_CommAuthor=blog_Comm("comm_Author")
  if stat_Admin=true or (stat_CommentDel=true and memName=blog_CommAuthor) then
   ReInfo(0)="评论删除成功"
   ReInfo(1)="<b>评论已经被删除成功!</b><br/><a href=""default.asp?id="&blog_Comm("blog_ID")&""">单击返回</a>"
   ReInfo(2)="MessageIcon"
     logid=Conn.ExeCute("select blog_ID from blog_Comment where comm_ID="&post_commID)(0)
     Conn.ExeCute("update blog_Content set log_CommNums=log_CommNums-1 where log_ID="&blog_Comm("blog_ID"))
     Conn.ExeCute("Delete * FROM blog_Comment Where comm_ID="&post_commID)
     Conn.ExeCute("update blog_Info set blog_CommNums=blog_CommNums-1")
     PostArticle logid
     getInfo(2)
     NewComment(2)
    delcomm=ReInfo
    Session(CookieName&"_LastDo")="DelComment"
  else
   ReInfo(0)="错误信息"
   ReInfo(1)="<b>你没有权限删除评论</b><br/><a href=""javascript:history.go(-1);"">单击返回</a>"
   ReInfo(2)="WarningIcon"
   delcomm=ReInfo
  end if
end function

'====================== 评论发表函数 ===========================================================
function postcomm
dim username,post_logID,post_From,post_FromURL,post_disImg,post_DisSM,post_DisURL,post_DisKEY,post_DisUBB,post_Message,validate
dim password
dim ReInfo,LastMSG,FlowControl
  ReInfo=Array("错误信息","","MessageIcon")
  username=trim(CheckStr(request.form("username")))
  password=trim(CheckStr(request.form("password")))
  post_logID=clng(CheckStr(request.form("logID")))
  validate=trim(request.form("validate"))
  post_Message=CheckStr(request.form("Message"))
  FlowControl=false
  
  IF (memName=empty or blog_validate=true) and cstr(lcase(Session("GetCode")))<>cstr(lcase(validate)) or IsEmpty(Session("GetCode")) then
    ReInfo(0)="评论发表错误信息"
    ReInfo(1)="<b>验证码有误,请返回重新输入</b><br/><a href=""javascript:history.go(-1);"">请返回重新输入</a>"
    ReInfo(2)="ErrorIcon"
    postcomm=ReInfo
    Session("GetCode") = empty
      exit function
  end if
  
  set LastMSG=conn.execute("select top 1 comm_Content from blog_Comment order by comm_ID desc")
  if LastMSG.eof then
     FlowControl=false
   else
    if trim(LastMSG("comm_Content")) = trim(post_Message) then FlowControl=true
  end if
  
  if stat_Admin = false then
      '高级过滤规则
    if regFilterSpam(post_Message,"reg.xml") then
        ReInfo(0)="评论发表错误信息"
      ReInfo(1)="<b>评论中包含被屏蔽的字符</b><br/><a href=""javascript:history.go(-1);"">返回</a>"
      ReInfo(2)="ErrorIcon"
      postcomm=ReInfo
        exit function
    end if
    
      '基本过滤规则
    if filterSpam(post_Message,"spam.xml") then
        ReInfo(0)="评论发表错误信息"
      ReInfo(1)="<b>评论中包含被屏蔽的字符</b><br/><a href=""javascript:history.go(-1);"">返回</a>"
      ReInfo(2)="WarningIcon"
      postcomm=ReInfo
        exit function
    end if
  end if
  
  if FlowControl then
      ReInfo(0)="评论发表错误信息"
    ReInfo(1)="<b>禁止恶意灌水!</b><br/><a href=""javascript:history.go(-1);"">返回</a>"
    ReInfo(2)="WarningIcon"
    postcomm=ReInfo
      exit function
  end if

  if DateDiff("s",Request.Cookies(CookieName)("memLastPost"),Now())<blog_commTimerout then
    ReInfo(0)="评论发表错误信息"
    ReInfo(1)="<b>发言太快,请 "&blog_commTimerout&" 秒后再发表评论</b><br/><a href=""javascript:history.go(-1);"">返回</a>"
    ReInfo(2)="WarningIcon"
    postcomm=ReInfo
      exit function  
  end if
  if len(username)<1 then
    ReInfo(0)="评论发表错误信息"
    ReInfo(1)="<b>请输入你的昵称.</b><br/><a href=""javascript:history.go(-1);"">请返回重新输入</a>"
    ReInfo(2)="ErrorIcon"
    postcomm=ReInfo
      exit function  
  end if
  
  if IsValidUserName(username)=false then
   ReInfo(0)="错误信息"
   ReInfo(1)="<b>非法用户名!<br/>请尝试使用其他用户名!</b><br/><a href=""javascript:history.go(-1);"">单击返回</a>"
   ReInfo(2)="ErrorIcon"
   postcomm=ReInfo
   exit function
end if
  
  dim checkMem
  if memName=empty then
    if len(password)>0 then
        Dim loginUser
        loginUser=login(Request.Form("username"),Request.Form("password"))
         if not request.Cookies(CookieName)("memName")=username then
               ReInfo(0)="评论发表错误信息"
               ReInfo(1)="<b>登录失败,请检查用户名和密码</b><br/><a href=""javascript:history.go(-1);"">单击返回</a>"
               ReInfo(2)="WarningIcon"
               postcomm=ReInfo
               exit function
         end if
    else
       set checkMem=Conn.ExeCute("select top 1 mem_id from blog_Member where mem_Name='"&username&"'")
       if not checkMem.eof then
       ReInfo(0)="评论发表错误信息"
       ReInfo(1)="<b>该用户已经存在,无法发表评论</b><br/><a href=""javascript:history.go(-1);"">单击返回</a>"
       ReInfo(2)="WarningIcon"
       postcomm=ReInfo
       exit function
       end if
    end if
  end if
  if not stat_CommentAdd then
   ReInfo(0)="评论发表错误信息"
   ReInfo(1)="<b>你没有权限发表评论</b><br/><a href=""javascript:history.go(-1);"">单击返回</a>"
   ReInfo(2)="ErrorIcon"
   postcomm=ReInfo
   exit function
  end if  
  if Conn.ExeCute("select log_DisComment from blog_Content where log_ID="&post_logID)(0) then
   ReInfo(0)="评论发表错误信息"
   ReInfo(1)="<b>该日志不允许发表任何评论</b><br/><a href=""javascript:history.go(-1);"">单击返回</a>"
   ReInfo(2)="WarningIcon"
   postcomm=ReInfo
   exit function
  end if
  post_DisSM=request.form("log_DisSM")
  post_DisURL=request.form("log_DisURL")
  post_DisKEY=request.form("log_DisKey")

  if len(post_Message)<1 then
   ReInfo(0)="评论发表错误信息"
   ReInfo(1)="<b>不允许发表空评论</b><br/><a href=""javascript:history.go(-1);"">单击返回</a>"
   ReInfo(2)="ErrorIcon"
   postcomm=ReInfo
   exit function
  end if
  if len(post_Message)>blog_commLength then
   ReInfo(0)="评论发表错误信息"
   ReInfo(1)="评论超过最大字数限制<br/><a href=""javascript:history.go(-1);"">单击返回</a>"
   ReInfo(2)="ErrorIcon"
   postcomm=ReInfo
   exit function
  end if  
  'UBB 特别属性
  post_disImg=1
  post_DisUBB=0
  if post_DisSM=1 then post_DisSM=1 else post_DisSM=0
  if post_DisURL=1 then post_DisURL=0 else post_DisURL=1
  if post_DisKEY=1 then post_DisKEY=0 else post_DisKEY=1
'插入数据
Dim AddComm
AddComm=array(array("blog_ID",post_logID),array("comm_Content",post_Message),array("comm_Author",username),array("comm_DisSM",post_DisSM),array("comm_DisUBB",post_DisUBB),array("comm_DisIMG",post_disImg),array("comm_AutoURL",post_DisURL),Array("comm_PostIP",getIP),Array("comm_AutoKEY",post_DisKEY))
DBQuest "blog_Comment",AddComm,"insert"
'Conn.ExeCute("Insert INTO blog_Comment(blog_ID,comm_Content,comm_Author,comm_DisSM,comm_DisUBB,comm_DisIMG,comm_AutoURL,comm_PostIP,comm_AutoKEY) VALUES ("&post_logID&",'"&post_Message&"','"&username&"',"&post_DisSM&","&post_DisUBB&","&post_disImg&","&post_DisURL&",'"&getIP()&"',"&post_DisKEY&")")
Conn.ExeCute("update blog_Content set log_CommNums=log_CommNums+1 where log_ID="&post_logID)
Conn.ExeCute("update blog_Info set blog_CommNums=blog_CommNums+1")
Response.Cookies(CookieName)("memLastpost")=Now()
getInfo(2)
NewComment(2)
if memName<>empty then
    conn.execute("update blog_Member set mem_PostComms=mem_PostComms+1 where mem_Name='"&memName&"'")
end if
SQLQueryNums=SQLQueryNums+3
ReInfo(0)="评论发表成功"
ReInfo(1)="<b>你成功地对该日志发表了评论</b><br/><a href=""default.asp?id="&post_logID&""">单击返回该日志</a>"
ReInfo(2)="MessageIcon"
Session("GetCode") = empty
Session(CookieName&"_LastDo")="AddComment"
postcomm=ReInfo
PostArticle post_logID
end function
function replyMsg
  dim post_Message,MsgID,ReInfo,post_logID
  ReInfo=Array("错误信息","","MessageIcon")
  MsgID = CheckStr(Request.form("commID"))
  post_Message=CheckStr(request.form("Message"))
  post_logID=CheckStr(request.form("logID"))
           if not (memName<>empty and stat_Admin) then
                         ReInfo(0)="评论回复错误信息"
                         ReInfo(1)="你没有权限回复留言<a href=""javascript:history.go(-1)"">单击返回</a>"
                         ReInfo(2)="ErrorIcon"
           end if
           If MsgID=Empty then
                         ReInfo(0)="评论回复错误信息"
                         ReInfo(1)="非法操作<a href=""javascript:history.go(-1)"">单击返回</a>"
                         ReInfo(2)="ErrorIcon"
           end if
           If IsInteger(MsgID)=0 then
                         ReInfo(0)="评论回复错误信息"
                         ReInfo(1)="非法操作<a href=""javascript:history.go(-1)"">单击返回</a>"
                         ReInfo(2)="ErrorIcon"
           end if
      Conn.ExeCute("update blog_Comment set Comm_reply='"&post_Message&"',Comm_replytime='"&now&"' where comm_ID=" & MsgID)
         ReInfo(0)="评论回复成功"
         ReInfo(1)="<b>你成功地对该评论进行了回复</b><br/><a href=""article.asp?id="&post_logID&""">单击返回该日志</a>"
         ReInfo(2)="MessageIcon"
replyMsg=ReInfo
end function
%>
  <br/></div>
</div>
<!--#include file="footer.asp" -->
Tags: ,
Feb 13
所谓给PJ博客加评论回复功能的简单方法就是直接替换需要替换的文件即可,现在把所需修改的文件修改后的源码发布:
一、class目录里的cls_article.asp文件
修改后的源码:
<%
'==================================
'  日志类文件
'    更新时间: 2006-1-22
'==================================

'SQL="Select top 1 log_ID,log_CateID,log_title,Log_IsShow,log_ViewNums,log_Author,log_comorder,log_DisComment,log_Content,log_PostTime,log_edittype,log_ubbFlags,log_CommNums,log_QuoteNums,log_weather,log_level,log_Modify,log_FromUrl,log_From,log_tag FROM blog_Content Where log_ID="&id&" and log_IsDraft=false"
'row序号:          0     ,1         ,2         ,3        ,4           ,5         ,6           ,7             ,8          ,9           ,10          ,11          ,12           ,13         ,14         ,15       ,16        ,17         ,18       ,19

'*******************************************
'  显示日志内容
'*******************************************

    sub updateViewNums(logID,vNums)
     if not blog_postFile then exit sub
     dim LoadArticle,splitStr,getA,i,tempStr
     splitStr="<"&"%ST(A)%"&">"
     tempStr=""
     LoadArticle=LoadFromFile("cache/"&LogID&".asp")
     if LoadArticle(0)=0 then
       getA=split(LoadArticle(1),splitStr)
       getA(2)=vNums
       for i=1 to ubound(getA)
         tempStr=tempStr&splitStr&getA(i)
       next
       call SaveToFile (tempStr,"cache/" & LogID & ".asp")  
       end if
    end sub


sub ShowArticle(LogID)
         If (log_ViewArr(5,0)=memName And log_ViewArr(3,0)=False) or stat_Admin or log_ViewArr(3,0)=true then
           else
           showmsg "错误信息","该日志为隐藏日志,没有权限查看该日志!<br/><a href=""default.asp"">单击返回</a>","ErrorIcon",""
       End if
       If (Not getCate.cate_Secret) or (log_ViewArr(5,0)=memName And getCate.cate_Secret) or stat_Admin or (getCate.cate_Secret and stat_ShowHiddenCate) Then
           else
           showmsg "错误信息","该日志分类为保密类型,无法查看该日志!<br/><a href=""default.asp"">单击返回</a>","ErrorIcon",""
       end if
                
     if log_ViewArr(6,0) then comDesc="Desc" else comDesc="Asc" end If
            
       '从文件读取日志
       if blog_postFile then
         dim LoadArticle,TempStr,TempArticle
         LoadArticle=LoadFromFile("post/"&LogID&".asp")
        
         if LoadArticle(0)=0 then
              TempArticle=LoadArticle(1)
            TempStr=""
            if stat_EditAll or (stat_Edit and memName=log_ViewArr(5,0)) then
             TempStr=TempStr&"<a href=""blogedit.asp?id="&LogID&""" title=""编辑该日志"" accesskey=""E""><img src=""images/icon_edit.gif"" alt="""" border=""0"" style=""margin-bottom:-2px""/></a> "
          end if
        
          if stat_DelAll or (stat_Del and memName=log_ViewArr(5,0)) then
             TempStr=TempStr&"<a href=""blogedit.asp?action=del&amp;id="&LogID&""" onclick=""if (!window.confirm('是否要删除该日志')) return false"" title=""删除该日志"" accesskey=""K""><img src=""images/icon_del.gif"" alt="""" border=""0"" style=""margin-bottom:-2px""/></a>"
          end if
          
            TempArticle=Replace(TempArticle,"<"&"%ST(A)%"&">","")
            TempArticle=Replace(TempArticle,"<$EditAndDel$>",TempStr)
            TempArticle=Replace(TempArticle,"<$log_ViewNums$>",log_ViewArr(4,0))
            
          response.write TempArticle
              ShowComm LogID,comDesc,log_ViewArr(7,0)
            call updateViewNums(id,log_ViewArr(4,0))
         else
          response.write "读取日志出错.<br/>" & LoadArticle(0) & " : " &  LoadArticle(1)
         end if
           exit sub
        end If
        
       '从数据库读取日志
       'on error resume Next
    set preLog=Conn.Execute("Select TOP 1 log_Title,log_ID FROM blog_Content Where log_PostTime<#"&DateToStr(log_ViewArr(9,0),"Y-m-d H:I:S")&"# and log_IsShow=true and log_IsDraft=false orDER BY log_PostTime DESC")
    set nextLog=Conn.Execute("Select TOP 1 log_Title,log_ID FROM blog_Content Where log_PostTime>#"&DateToStr(log_ViewArr(9,0),"Y-m-d H:I:S")&"# and log_IsShow=true and log_IsDraft=false orDER BY log_PostTime ASC")
    SQLQueryNums=SQLQueryNums+2

%>
             <div id="Content_ContentList" class="content-width"><a name="body" accesskey="B" href="#body"></a>
             <div class="pageContent">
               <div style="float:right;width:180px !important;width:auto">
               <%
                 if not preLog.eof then
                     response.write ("<a href=""?id="&preLog("log_ID")&""" title=""上一篇日志: "&preLog("log_Title")&""" accesskey="",""><img border=""0"" src=""images/Cprevious.gif"" alt=""""/> 上一篇</a>")
                    else
                     response.write ("<img border=""0"" src=""images/Cprevious1.gif"" alt=""这是最新一篇日志""/>上一篇")
                  end if
                  if not nextLog.eof then
                     response.write (" | <a href=""?id="&nextLog("log_ID")&""" title=""下一篇日志: "&nextLog("log_Title")&""" accesskey="".""><img border=""0"" src=""images/Cnext.gif"" alt=""""/> 下一篇</a>")
                    else
                     response.write (" | <img border=""0"" src=""images/Cnext1.gif"" alt=""这是最后一篇日志""/>下一篇")
                  end if
                  preLog.close
                  nextLog.close
                  set preLog=nothing
                  set nextLog=nothing
               %>
               </div>
                <img src="<%=getCate.cate_icon%>" style="margin:0px 2px -4px 0px" alt=""/> <strong><a href="default.asp?cateID=<%=log_ViewArr(1,0)%>" title="查看所有<%=getCate.cate_Name%>的日志"><%=getCate.cate_Name%></a></strong> <a href="feed.asp?cateID=<%=log_ViewArr(1,0)%>" target="_blank" title="订阅所有<%=getCate.cate_Name%>的日志" accesskey="O"><img border="0" src="images/rss.png" alt="订阅所有<%=getCate.cate_Name%>的日志" style="margin-bottom:-1px"/></a>
             </div>
             <div class="Content">
             <div class="Content-top"><div class="ContentLeft"></div><div class="ContentRight"></div>
               <h1 class="ContentTitle"><strong><%=HtmlEncode(log_ViewArr(2,0))%></strong></h1>
               <h2 class="ContentAuthor">作者:<%=log_ViewArr(5,0)%> 日期:<%=DateToStr(log_ViewArr(9,0),"Y-m-d")%></h2>
             </div>
              <div class="Content-Info">
              <div class="InfoOther">字体大小: <a href="javascript:SetFont('12px')" accesskey="1">小</a> <a href="javascript:SetFont('14px')" accesskey="2">中</a> <a href="javascript:SetFont('16px')" accesskey="3">大</a></div>
              <div class="InfoAuthor"><img src="images/weather/hn2_<%=log_ViewArr(14,0)%>.gif" style="margin:0px 2px -6px 0px" alt=""/><img src="images/weather/hn2_t_<%=log_ViewArr(14,0)%>.gif" alt=""/> <img src="images/<%=log_ViewArr(15,0)%>.gif" style="margin:0px 2px -1px 0px" alt=""/>
                <%if stat_EditAll or (stat_Edit and log_ViewArr(5,0)=memName) then %> <a href="blogedit.asp?id=<%=log_ViewArr(0,0)%>" title="编辑该日志" accesskey="E"><img src="images/icon_edit.gif" alt="" border="0" style="margin-bottom:-2px"/></a><%end if%>
                  <%if stat_DelAll or (stat_Del and log_ViewArr(5,0)=memName)  then %> <a href="blogedit.asp?action=del&id=<%=log_ViewArr(0,0)%>" onclick="if (!window.confirm('是否要删除该日志')) return false" accesskey="K"><img src="images/icon_del.gif" alt="" border="0" style="margin-bottom:-2px"/></a><%end if%>
              </div>
            </div>
            <div id="logPanel" class="Content-body">
            <%
              keyword=CheckStr(Request.QueryString("keyword"))
            if log_ViewArr(10,0)=1 then
             response.write (highlight(UnCheckStr(UBBCode(HtmlEncode(log_ViewArr(8,0)),mid(log_ViewArr(11,0),1,1),mid(log_ViewArr(11,0),2,1),mid(log_ViewArr(11,0),3,1),mid(log_ViewArr(11,0),4,1),mid(log_ViewArr(11,0),5,1))),keyword))
            else
             response.write (highlight(UnCheckStr(log_ViewArr(8,0)),keyword))
            end if  %>
             <br/><br/>

             </div>
             <div class="Content-body">
              <%if len(log_ViewArr(16,0))>0 then response.write (log_ViewArr(16,0)&"<br/>")%>
            <img src="images/From.gif" style="margin:4px 2px -4px 0px" alt=""/><strong>文章来自:</strong> <a href="<%=log_ViewArr(17,0)%>" target="_blank"><%=log_ViewArr(18,0)%></a><br/>
            <img src="images/icon_trackback.gif" style="margin:4px 2px -4px 0px" alt=""/><strong>引用通告:</strong> <a href="<%="trackback.asp?tbID="&id&"&amp;action=view"%>" target="_blank">查看所有引用</a> | <a href="javascript:;" title="获得引用文章的链接" onclick="getTrackbackURL(<%=id%>)">我要引用此文章</a><br/>
               <%dim getTag
              set getTag=new tag
            %>
             <img src="images/tag.gif" style="margin:4px 2px -4px 0px" alt=""/><strong>Tags:</strong> <%=getTag.filterHTML(log_ViewArr(19,0))%><br/>
             </div>
             <div class="Content-bottom"><div class="ContentBLeft"></div><div class="ContentBRight"></div>评论: <%=log_ViewArr(12,0)%> | 引用: <%=log_ViewArr(13,0)%> | 查看次数: <%=log_ViewArr(4,0)%>
             </div></div>
             </div>
<%                     set getTag=nothing
     ShowComm LogID,comDesc,log_ViewArr(7,0) '显示评论内容
end sub


'*******************************************
'  显示日志评论内容
'*******************************************
Sub ShowComm(LogID,comDesc,DisComment)
       dim action,commID,CommReplyContent
          action = trim(Request.QueryString("action"))
     response.write ("<a name=""comm_top"" href=""#comm_top"" accesskey=""C""></a>")
     dim blog_Comment,Pcount,comm_Num,blog_CommID,blog_CommAuthor,blog_CommContent,Url_Add,commArr,commArrLen
     Set blog_Comment=Server.CreateObject("Adodb.RecordSet")
     Pcount=0
     if action="Reply" then
                commID=request("commID")
           SQL="Select comm_ID,comm_Content,comm_Author,comm_PostTime,comm_DisSM,comm_DisUBB,comm_DisIMG,comm_AutoURL,comm_PostIP,comm_AutoKEY,comm_Reply,comm_Replytime FROM blog_Comment Where comm_ID="&commID&" UNION ALL Select 0,tb_Intro,tb_Title,tb_PostTime,tb_URL,tb_Site,tb_ID,0,'127.0.0.1',0,0,0 FROM blog_Trackback Where blog_ID="&LogID&" orDER BY comm_PostTime "&comDesc
                else
           SQL="Select comm_ID,comm_Content,comm_Author,comm_PostTime,comm_DisSM,comm_DisUBB,comm_DisIMG,comm_AutoURL,comm_PostIP,comm_AutoKEY,comm_Reply,comm_Replytime FROM blog_Comment Where blog_ID="&LogID&" UNION ALL Select 0,tb_Intro,tb_Title,tb_PostTime,tb_URL,tb_Site,tb_ID,0,'127.0.0.1',0,0,0 FROM blog_Trackback Where blog_ID="&LogID&" orDER BY comm_PostTime "&comDesc
           end if
     blog_Comment.Open SQL,Conn,1,1
     SQLQueryNums=SQLQueryNums+1
    IF blog_Comment.EOF AND blog_Comment.BOF Then
      else
     blog_Comment.PageSize=blogcommpage
     blog_Comment.AbsolutePage=CurPage
     comm_Num=blog_Comment.RecordCount
    
     commArr=blog_Comment.GetRows(comm_Num)
       blog_Comment.close
       set blog_Comment = nothing
       commArrLen=Ubound(commArr,2)
      
     Url_Add="?id="&LogID&"&"%>
       <div class="pageContent"><%=MultiPage(comm_Num,blogcommpage,CurPage,Url_Add,"#comm_top","float:right")%></div>
     <%
     Do Until Pcount = commArrLen + 1 or Pcount=blogcommpage
     blog_CommID=commArr(0,Pcount)
     blog_CommAuthor=commArr(2,Pcount)
     blog_CommContent=commArr(1,Pcount)
     dim CommReplyConten
CommReplyContent=commArr(10,Pcount)
     %>
    <div class="comment">
    <%IF blog_CommID=0 Then%>
      <div class="commenttop"><img src="images/icon_trackback.gif" alt="" style="margin:0px 4px -3px 0px"/><strong><%=("<a href="""&commArr(4,Pcount)&""">"&commArr(5,Pcount)&"</a>")%></strong> <span class="commentinfo">[<%=DateToStr(commArr(3,Pcount),"Y-m-d H:I A")%><%if stat_Admin=true then response.write (" | <a href=""trackback.asp?action=deltb&amp;tbID="&commArr(6,Pcount)&"&amp;logID="&LogID&""" onclick=""if (!window.confirm('是否删除该引用?')) {return false}""><img src=""images/del1.gif"" alt=""删除该引用"" border=""0""/></a>") end if%>]</span></div>
      <div class="commentcontent">
    <b>标题:</b> <%=blog_CommAuthor%><br/>
    <b>链接:</b> <%=("<a href="""&commArr(4,Pcount)&""" target=""_blank"">"&commArr(4,Pcount)&"</a>")%><br/>
    <b>摘要:</b> <%=checkURL(HTMLDecode(blog_CommContent))%><br/>
<br/>
    </div>
    <%else%>
      <div class="commenttop"><a name="comm_<%=blog_CommID%>" href="javascript:addQuote('<%=blog_CommAuthor%>','commcontent_<%=blog_CommID%>')"><img border="0" src="images/<%if memName=blog_CommAuthor then response.write ("icon_quote_author.gif") else response.write ("icon_quote.gif") end if%>" alt="" style="margin:0px 4px -3px 0px"/></a><a href="member.asp?action=view&memName=<%=Server.URLEncode(blog_CommAuthor)%>"><strong><%=blog_CommAuthor%></strong></a> <span class="commentinfo">[<%=DateToStr(commArr(3,Pcount),"Y-m-d H:I A")%> <%if stat_Admin then response.write (" | "&commArr(8,Pcount)) end if%><%if stat_Admin=true or (stat_CommentDel=true and memName=blog_CommAuthor) then response.write (" | <a href=""article.asp?action=Reply&commID="&blog_CommID&"&ID="&LogID&"#comm_"&blog_CommID&"""><img src=""Plugins/guestbook/reply.gif"" alt=""回复"" border=""0"" style=""margin-bottom:-3px""/></a><a href=""blogcomm.asp?action=del&amp;commID="&blog_CommID&""" onclick=""if (!window.confirm('是否删除该评论?')) {return false}""><img src=""images/del1.gif"" alt=""删除该评论"" border=""0""/></a>") end if%>]</span></div>
      <div class="commentcontent" id="commcontent_<%=blog_CommID%>"><%=UBBCode(HtmlEncode(blog_CommContent),commArr(4,Pcount),blog_commUBB,blog_commIMG,commArr(7,Pcount),commArr(9,Pcount))%></div>
    <%if len(commArr(10,Pcount))>0 then %>
<div class="commenttop"><img src="images/reply.gif" alt="" border="0" style="margin:0px 3px -3px 0px"/><b><%=blog_master%>回复</b>  <span class="commentinfo">[<%=DateToStr(commArr(11,Pcount),"Y-m-d H:I A")%>]</span></div>
<div class="commentcontent"><%=UBBCode(HtmlEncode(commArr(10,Pcount)),0,0,0,1,1)%></div>
<%end if%>
    <%end if%>
     </div>
    <%
     Pcount=Pcount+1
     loop
       %>
       <div class="pageContent"><%=MultiPage(comm_Num,blogcommpage,CurPage,Url_Add,"#comm_top","float:right")%></div>
       <%
       end if
     if not DisComment then
    %>
    <div id="MsgContent" style="width:94%;">
      <div id="MsgHead"><%
          if action="Reply" then
                  response.write "回复评论"
          else
                  response.write "发表评论"
          end if
%></div>
      <div id="MsgBody">
      <%
       if not stat_CommentAdd then
        response.write ("你没有权限发表留言!")
        response.write ("</div></div>")
        exit sub
       end if
      %>
      <script type="text/javascript">
          function checkCommentPost(){
            if (!CheckPost) return false
        // 备用方法
            return true
          }
      </script>
      <form name="frm" action="blogcomm.asp" method="post" onsubmit="return checkCommentPost()" style="margin:0px;">    
    <table width="100%" cellpadding="0" cellspacing="0">    
    <tr><td align="right" width="70"><strong>昵 称:</strong></td><td align="left" style="padding:3px;"><input name="username" type="text" size="18" class="userpass" maxlength="24" <%if not memName=empty then response.write ("value="""&memName&""" readonly=""readonly""")%>/></td></tr>
      <%if memName=empty then%><tr><td align="right" width="70"><strong>密 码:</strong></td><td align="left" style="padding:3px;"><input name="password" type="password" size="18" class="userpass" maxlength="24"/> 游客发言不需要密码.</td></tr><%end if%>
    <%if memName=empty or blog_validate=true then%><tr><td align="right" width="70"><strong>验证码:</strong></td><td align="left" style="padding:3px;"><input name="validate" type="text" size="4" class="userpass" maxlength="4"/> <%=getcode()%></td></tr><%end if%>
    <tr><td align="right" width="70" valign="top"><strong>内 容:</strong><br/>
    </td><td style="padding:2px;"><%
     UBB_TextArea_Height="150px;"
     UBB_Tools_Items="bold,italic,underline"
     UBB_Tools_Items=UBB_Tools_Items&"||image,link,mail,quote,smiley"
     if action="Reply" then
              UBB_Msg_Value=UBBFilter(UnCheckStr(CommReplyContent))
           end if
     UBBeditor("Message")
    %></td></tr>
    <tr><td align="right" width="70" valign="top"><strong>选 项:</strong></td><td align="left" style="padding:3px;">
             <label for="label5"><input name="log_DisSM" type="checkbox" id="label5" value="1" />禁止表情转换</label>
             <label for="label6"><input name="log_DisURL" type="checkbox" id="label6" value="1" />禁止自动转换链接</label>
             <label for="label7"><input name="log_DisKey" type="checkbox" id="label7" value="1" />禁止自动转换关键字</label>
    </td></tr>
          <tr>
            <td colspan="2" align="center" style="padding:3px;">
        <input name="logID" type="hidden" value="<%=LogID%>"/>
              <%
          if action="Reply" then
%>
              <input name="action" type="hidden" value="Reply"/>
              <input name="commID" type="hidden" value="<%=blog_CommID%>"/>
<%
          else
%>
              <input name="action" type="hidden" value="post"/>
<%
          end if
%>
        <input name="submit2" type="submit" class="userbutton" value="发表评论" accesskey="S"/>
              <input name="button" type="reset" class="userbutton" value="重写"/></td>
          </tr>
          <tr>
            <td colspan="2" align="right" >
       <%if memName=empty then%>虽然发表评论不用注册,但是为了保护您的发言权,建议您<a href="register.asp">注册帐号</a>. <br/><%end if%>
    字数限制 <b><%=blog_commLength%> 字</b> |
    UBB代码 <b><%if (blog_commUBB=0) then response.write ("开启") else response.write ("关闭") %></b> |
    [img]标签 <b><%if (blog_commIMG=0) then response.write ("开启") else response.write ("关闭") %></b>

      </td>
          </tr>      
    </table></form>
     <%
       response.write ("</div></div>")
    end if
end sub
%>

一次发布不完,请继续第二篇第三篇
Tags: ,
分页: 1/1 第一页 1 最后页 [ 显示模式: 摘要 | 列表 ]