<!--#include file="inc/inc_sys.asp"-->
<%
'20060920:配置项目53项
'7,8空余
Const C_Items=53
Dim Action
Action = Trim(request("action"))
If Action = "saveconfig" Then
    Call Saveconfig
Else
    Call Showconfig
End If

Sub Showconfig()
Dim rs,ac,sConfig,i
Set rs = oblog.execute("Select ob_Value From oblog_config Where Id=1")
sConfig=rs(0)
ac=Split(sConfig,"$$")

'ATAI20060920:主动升级功能,务必需要更改常量C_Items
'序号从1开始
If UBound(ac)<C_Items Then
	For i=1 To (C_Items-UBound(ac))
		sConfig=sConfig & "$$0"
	Next
	'重新分割
	ac=Split(sConfig,"$$")
End If
Set oblog=Nothing
%>
<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>站点配置</title>
<link rel="stylesheet" href="images/style.css" type="text/css" />
<script src="images/menu.js" type="text/javascript"></script>
</head>
<body>
<div id="main_body">
	<ul class="main_top">
		<li class="main_top_left left">网站配置</li>
		<li class="main_top_right right"> </li>
	</ul>
	<div class="main_content_rightbg">
		<div class="main_content_leftbg">
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" Class="border">
    <tr>
      <td width="70" height="30"><strong>管理导航：</strong></td>
    <td height="30"><a href="#SiteInfo">网站信息配置</a> | <a href="#modules">功能模块</a> | <a href="#SiteOption">网站选项配置</a>
      | <a href="#user">注册选项</a> | <a href="#show">日志选项</a> | <a href="#show">留言评论</a></td>
    </tr>
</table>
		</div>
	</div>
	<ul class="main_end">
		<li class="main_end_left left"></li>
		<li class="main_end_right right"></li>
	</ul>
</div>
<br />
<div id="main_body">
	<ul class="main_top">
		<li class="main_top_left left">网站配置</li>
		<li class="main_top_right right"> </li>
	</ul>
	<div class="main_content_rightbg">
		<div class="main_content_leftbg">
<form method="POST" action="admin_setup.asp" id="form1" name="form1">
  <table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#FFFFFF" Class="border">
    <tr >
      <td height="22" class="topbg" ><a name="SiteInfo"></a><strong>网站信息配置</strong></a></td>
      <td height="22" class="topbg1"><a href="#formbottom"><img src="images/ico_bottom.gif" border=0></a>&nbsp;</td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >网站名称(纯文字,不支持Html)：</td>
      <td  width="409" height="25"><% Call EchoInput("a1",40,50,ac(1))%>
      </td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >网站标题(纯文字,不支持Html)：</td>
      <td><% Call EchoInput("a2",40,50,ac(2))%>
      </td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >网站地址：<br>
        重要！请添写完整URL地址,如http://www.oblog.cn/blog/,<font color="#FF0000">不能省略最后的/号</font>,此设置将影响到rss和trackback的正常运行。</td>
      <td><% Call EchoInput("a3",40,255,ac(3))%>
      </td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" > 二级域名根，请按照oioj.net这样的形式书写，如有多个二级域名，请用&quot;|&quot;隔开，<font color="#FF0000">如关闭二级域名，请留空</font>：</td>
      <td><% Call EchoInput("a4",40,255,ac(4))%>
      </td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">是否开启二级域名用户连接,<font color="#FF0000">如关闭二级域名，请选择否</font>：</td>
      <td><% Call EchoRadio("a5","","",ac(5))%>&nbsp;<font color="#FF0000">(如关闭或不支持二级域名，请选择否)</font></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td>站点关键字（更容易被搜索引擎找到,&quot;,&quot;号隔开）</td>
      <td><% Call EchoInput("a9",50,100,ac(9))%></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td height="25">站点版权信息（显示在系统页面底部）：</td>
      <td><textarea name="a10" id='a10' cols="55" rows="5"><%=ac(10)%></textarea>
      </td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >站长信箱：</td>
      <td> <% Call EchoInput("a11",50,100,ac(11))%></td>
    </tr>
    <tr>
      <td height="25" class="topbg"><a name="modules" id="user"></a><strong>功能模块</strong></td>
      <td height="22" class="topbg1"><a href="#top"><img src="images/ico_top.gif" border=0></a>&nbsp;<a href="#formbottom"><img src="images/ico_bottom.gif" border=0></a>&nbsp;</td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >是否启用站内统计(访问量大的站点可以关闭此项目)：</td>
      <td> <% Call EchoRadio("a12","","",ac(12))%></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >编辑器是否启用xhtml查看源码：</td>
      <td> <% Call EchoRadio("a53","","",ac(53))%>(不建议启用，文章字符过多容易造成浏览器假死)</td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >生成静态页面的组件：</td>
      <td><% Call EchoRadio("a24","Adodb.Stream","FSO",ac(24))%></td>
    </tr>
     <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" ><a href="http://news.oblog.cn/news/20060110192.shtml" target="_blank" title="查看介绍">是否启用移动组件：</a></td>
      <td> <% Call EchoRadio("a51","","",ac(51))%>(通过彩信和邮件发布日志，<a href=" http://www.oblog.cn/gmzn.shtml" target="_blank" title="查看介绍"><font color=red>商业版本功能</font></a>)</td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >启用移动组件后,用于接收数据的电子邮件地址(具体请咨询Oblog客服人员)：</td>
       <td><% Call EchoInput("a52",30,50,ac(52))%>(空间足够大，且不要启用太多过滤规则，防止接收不到数据)</td>
    </tr>
    <tr>
      <td height="25" class="topbg"><a name="user" id="user"></a><strong>注册选项</strong></td>
      <td height="22" class="topbg1"><a href="#top"><img src="images/ico_top.gif" border=0></a>&nbsp;<a href="#formbottom"><img src="images/ico_bottom.gif" border=0></a>&nbsp;</td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >是否允许新用户：</td>
      <td> <% Call EchoRadio("a15","","",ac(15))%><font color="#FF0000">（关闭后，将只允许后台添加）</font></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25" >是否允许中文用户名<font color="#FF0000"></font>：</td>
      <td><% Call EchoRadio("a6","","",ac(6))%>&nbsp;<font color="#FF0000">（如果启用用户目录强制为userid）</font></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td>用户注册是否需要验证码：</td>
      <td><% Call EchoRadio("a16","","",ac(16))%></td>
    </tr>
     <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" > <p>是否启用邀请码机制：<a href="#h2" onClick="hookDiv('hh2','')"><img src="images/ico_help.gif" border=0></a></p></td>
      <td> <% Call EchoRadio("a17","","",ac(17))%></td>
    </tr>
    <tr id="hh2" style="display:none" name="h2">
      <td colspan=2> <p>什么是邀请码</p>
        现有会员每天可以获取一定数量的邀请码，他可以将该邀请码手工发送给他人用于本站的注册<br/>
        (根据会员组的不同可用邀请码也不同,每个邀请码只能使用一次，且不可累积)<br/>
        新会员注册时，必须输入一个有效的邀请码才能进行注册，否则不允许注册。<br/>
        使用邀请码机制后，建议不要再启用注册审核，否则会因为注册步骤繁琐而给用户带来不好的体验
        </td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" > <p>新用户注册是否需要管理员认证：<br>
          </p></td>
      <td> <% Call EchoRadio("a18","","",ac(18))%></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" > <p>注册后多长时间可以发布日志：</p></td>
      <td> <% Call EchoInput("a19",10,10,ac(19))%>分钟</td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" > <p>两次注册之间的间隔时间：</p></td>
      <td><% Call EchoInput("a20",10,10,ac(20))%>秒</td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" > <p>同一IP1小时内的注册限制数目,0为不限制(白名单内的IP除外)：</p></td>
      <td> <% Call EchoInput("a21",10,10,ac(21))%>
        </td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" > <p>同一IP总的注册数目，如果超过该数目，该IP的注册用户将被全部禁止；0为不限制(白名单内的IP除外)：</p></td>
      <td> <% Call EchoInput("a14",10,10,ac(14))%>
        </td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" > <p>邮件地址唯一：</p></td>
      <td> <% Call EchoRadio("a22","","",ac(22))%></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" > <p>昵称不允许重复：</p></td>
      <td> <% Call EchoRadio("a47","","",ac(47))%></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" > <p>博客名称不允许重复：</p></td>
      <td> <% Call EchoRadio("a48","","",ac(48))%></td>
    </tr>
    <tr>
      <td height="25" class="topbg"><a name="SiteOption"></a><strong>网站选项配置</strong></td>
      <td height="22" class="topbg1"><a href="#top"><img src="images/ico_top.gif" border=0></a>&nbsp;<a href="#formbottom"><img src="images/ico_bottom.gif" border=0></a>&nbsp;</td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">发表日志，系统日志分类是否为必须：</td>
      <td><% Call EchoRadio("a25","","",ac(25))%></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">是否允许日志全文搜索(建议关闭)：</td>
      <td> <% Call EchoRadio("a26","","",ac(26))%></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25">是否允许游客发表评论及留言：</td>
      <td> <% Call EchoRadio("a27","","",ac(27))%></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25">用户登陆是否需要验证码：</td>
      <td><% Call EchoRadio("a29","","",ac(29))%></td>
    </tr>
   <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25">用户发表评论，留言是否需要验证码：</td>
      <td><% Call EchoRadio("a30","","",ac(30))%></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">用户页面统计防刷新时间：</td>
      <td><% Call EchoInput("a31",10,10,ac(31)) %>
        秒 </td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">留言，评论的时间间隔：</td>
      <td><% Call EchoInput("a32",10,10,ac(32))%>秒 </td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25">首页静态文件的更新时间（建议设置300秒以上，否则将极耗费服务器资源）：</td>
      <td><% Call EchoInput("a33",10,10,ac(33))%>秒 </td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">单篇日志允许最多字数：</td>
      <td><% Call EchoInput("a34",10,10,ac(34))%>
        字(英文字符) </td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">回复及留言允许最多字数：</td>
      <td><% Call EchoInput("a35",10,10,ac(35))%>
        字(英文字符) </td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td height="25" >转向用户首页是否转到index文件：</td>
      <td> <% Call EchoRadio("a46","","",ac(46))%></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td height="25" >申请群组是否需要审核：</td>
      <td> <% Call EchoRadio("a49","","",ac(49))%></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td height="25" >留言与回复是否默认通过审核：</td>
      <td> <% Call EchoRadio("a50","","",ac(50))%></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td height="25" >发生多少次敏感行为后系统自动封禁(0为不限制)：</td>
      <td><% Call EchoInput("a13",10,10,ac(13))%>
    </tr>
    <tr>
      <td height="25" class="topbg"><a name="show"></a><strong>日志选项</strong></td>
      <td class="topbg1"><a href="#top"><img src="images/ico_top.gif" border=0></a>&nbsp;<a href="#formbottom"><img src="images/ico_bottom.gif" border=0></a>&nbsp;</td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''" style="display:block">
      <td width="348" height="25">日志自动保存为草稿的时间（默认2分钟）：</td>
      <td><% Call EchoInput("a7",10,10,ac(7))%>分&nbsp;<font color="#FF0000">（数值不要太小，否则极耗费资源）</font></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''" style="display:block">
      <td>自动读取短消息的时间（默认10分钟）：</td>
      <td><% Call EchoInput("a8",10,10,ac(8))%>分&nbsp;<font color="#FF0000">（数值不要太小，否则极耗费资源）</font></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">全站更新每更新<%=P_BLOG_UPDATEPAUSE%>篇日志暂停的时间（0为不暂停，最大为60，一般设置为10即可）：</td>
      <td><% Call EchoInput("a28",10,10,ac(28))%>秒&nbsp;(建议流量大的网站设置的数值大一些)</td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">系统日志列表每页显示多少条日志标题：</td>
      <td><% Call EchoInput("a36",10,10,ac(36))%></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25"><p>系统日志列表调用前多少篇日志：</p></td>
      <td><% Call EchoInput("a37",10,10,ac(37))%></td>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">相片列表每页显示多少个相片：</td>
      <td><% Call EchoInput("a38",10,10,ac(38))%></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25"><p>相片列表调用前多少个相片：</p></td>
      <td><% Call EchoInput("a39",10,10,ac(39))%></td>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">评论是否顺序排列：</td>
      <td><% Call EchoRadio("a40","倒序","正序",ac(40))%></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td width="348" height="25">页面数据载入时显示字符：</td>
      <td><% Call EchoInput("a41",30,50,ac(41))%></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25">博客列表每页显示条数：</td>
      <td><% Call EchoInput("a42",10,10,ac(42))%></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25">图片自动缩小宽度（为零不缩放）：</td>
      <td><% Call EchoInput("a43",10,10,ac(43))%>像素</td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >图片是否随鼠标滚轮缩放：</td>
      <td> <% Call EchoRadio("a44","","",ac(44))%></td>
    </tr>
    <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >部分显示日志是否使用htm标记强化过滤：<br>
        （若选择此项，所有除图片以外的标记都将被过滤掉）</td>
      <td> <% Call EchoRadio("a45","","",ac(45))%></td>
    </tr>
	 <tr class="tdbg" onMouseOut="this.style.backgroundColor=''" onMouseOver="this.style.backgroundColor='#BFDFFF'">
      <td width="348" height="25" >日志文件名为空时默认为：<br></td>
      <td><% Call EchoRadio("a23","日志ID自动编号","日志发表时间",ac(23))%></td>
    </tr>
    <tr class="tdbg" onMouseOver="this.style.backgroundColor='#BFDFFF'" onMouseOut="this.style.backgroundColor=''">
      <td colspan="2">&nbsp;</td>
    </tr>
    <tr>
      <td height="40" colspan="2" align="center" class="tdbg"> <a name="formbottom"></a><input name="Action" type="hidden" id="Action" value="saveconfig">
        <input name="cmdSave" type="submit" id="cmdSave" value=" 保存设置 " > </td>
    </tr>
  </table>
</form>
		</div>
	</div>
	<ul class="main_end">
		<li class="main_end_left left"></li>
		<li class="main_end_right right"></li>
	</ul>
</div>
</body>
</html>
<%
Set rs = Nothing
End Sub

Sub Saveconfig()
	Dim rs, i,sOpt
    'Check
    For i=1 To C_Items
    	sOpt=Request.Form("a"&i)
    	If sOpt="" Then
    		%>
    		<script language="javascript">
    			//alert("<%=i%>所有项目必须填写!")    			
    			//history.back();
    		</script>
    		<%
    		'Response.End
    	End If
  	Next
  	sOpt=""
  	For i=1 To C_Items
  		sOpt=sOpt & "$$" & Replace(Trim(Request.Form("a"&i)),"$","")
  	Next
  	sOpt=Now&sOpt
    If Not IsObject(conn) Then link_database
    Set rs = server.CreateObject("adodb.recordset")
    rs.Open  "Select * From oblog_config Where Id=1",conn,1,3
    If rs.Eof Then rs.AddNew
    rs("ob_value")=sOpt
    rs.Update
    rs.Close
    Set rs = Nothing
    oblog.ReloadCache
    Set oblog=Nothing
    Response.Redirect "admin_setup.asp"
End Sub

%>