<!--#include file="const.asp"-->
<%
Admin_header
'=====================================================================
' 软件名称：新云网站管理系统
' 当前版本：NewAsp Content Management System Version 4.0
' 文件名称：admin_setting.asp
' 更新日期：2008-09-16
' 官方网站：新云网络(www.NewAsp.net www.NewAsp.cn) QQ：94022511
'=====================================================================
' Copyright 2003-2008 NewAsp.net - All Rights Reserved.
' newasp is a trademark of NewAsp.net
'=====================================================================
%>
<table class="table1" cellspacing="1" cellpadding="3" align="center" border="0">
	<tr>
		<td class="tableline linetitle" width="120" align="left">问吧管理</td>
		<td class="tableline" width="*" align="right"><a href="admin_setting.asp?ChannelID=<%=ChannelID%>">基本信息设置</a>
		| <a href="admin_setting.asp#setting2">系统邮件设置</a>
		| <a href="admin_setting.asp#setting3">用户注册设置</a>
		| <a href="admin_setting.asp?action=point&ChannelID=<%=ChannelID%>"><font color="blue">用户积分设置</font></a>
		| <a href="admin_setting.asp?action=posts&ChannelID=<%=ChannelID%>"><font color="blue">发帖相关设置</font></a>
		| <a href="?action=cache&ChannelID=<%=ChannelID%>"><font color="red">重建问吧缓存</font></a>
		</td>
	</tr>
</table>
<%
Dim Action
Action = LCase(Request("action"))
Select Case Trim(Action)
Case "save"
	Call savedit()
Case "savepoint"
	SavePointSetting()
Case "saveposts"
	SavePostsSetting()
Case "point"
	ShowPointSetting()
Case "posts"
	ShowPostsSetting()
Case "cache"
	Call ReloadCache()
Case Else
	Call showmain()
End Select
If FoundErr=True Then
	ReturnError(ErrMsg)
End If
Admin_footer
SaveLogInfo(AdminName)
NewAsp.PageEnd
Ask_CloseConn

Sub showmain()
	Dim Rs,Asked_Setting,strAskedKey,Point_Setting,i
	Set Rs = Newasp.Ask_Execute("SELECT * FROM NC_Ask_Setup")
	If Rs.BOF And Rs.EOF Then
		Set Rs = Nothing
		FoundErr = True
		ErrMsg = "问吧安装错误,找不到问吧设置!"
		Exit Sub
	End If
	Asked_Setting = Split(Rs("Asked_Setting") & "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||", "|||")
	Point_Setting = Split(Rs("Point_Setting") & "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||", "|||")
	strAskedKey = Trim(Rs("AskedKey") & "")
	If Len(strAskedKey) < 2 Then strAskedKey = GetRandomCode(8)
%>
<iframe width="260" height="165" id="colourPalette" src="../script/selcolor.htm" style="visibility:hidden; position: absolute; left: 0px; top: 0px;border:1px gray solid" frameborder="0" scrolling="no" ></iframe>
<form name="myform" method="post" action="?action=save">
<input type="hidden" name="ChannelID" value="<%=ChannelID%>"/>
<table border="0" align="center" cellspacing="1" class="tableborder" cellpadding="3">
<tr>
	<th>问吧基本设置</th>
</tr>
<tr>
	<td class="tablerow1">
	<fieldset style="cursor: default"><legend>&nbsp;基本信息设置<a name="setting1"></a>[<a href="#top">顶部</a>]</legend><table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder2">
		<tr>
			<td class="tablerow2" width="35%" align="right"><u>问吧所在目录</u>：</td>
			<td class="tablerow2" width="65%">
			<input type="text" name="InstallDir" size="20" value="<%=Rs("InstallDir")%>">
			<font color="red">如果您的问吧在站点根目录请输入“/”</font>
			<input type="submit" value="保存设置" name="B2" class="button"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>默认模板文件路径</u>：</td>
			<td class="tablerow1">
			<input type="text" name="TemplatePath" size="35" value="<%=Server.HTMLEncode(Rs("TemplatePath"))%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>默认皮肤图片路径</u>：</td>
			<td class="tablerow2">
			<input type="text" name="SkinPath" size="35" value="<%=Server.HTMLEncode(Rs("SkinPath"))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>问吧安全密钥</u>：</td>
			<td class="tablerow1">
			<input type="text" name="AskedKey" size="35" value="<%=Server.HTMLEncode(strAskedKey)%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>问吧名称</u>：</td>
			<td class="tablerow2">
			<input type="text" name="Asked_Setting(0)" size="35" value="<%=Asked_Setting(0)%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>问吧访问地址</u>：</td>
			<td class="tablerow1"><input type="text" name="Asked_Setting(1)" size="35" value="<%=Asked_Setting(1)%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>首页文件名</u>：</td>
			<td class="tablerow2">
			<input type="text" name="Asked_Setting(2)" size="20" value="<%=Asked_Setting(2)%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>网站主页名称</u>：</td>
			<td class="tablerow1"><input type="text" name="Asked_Setting(3)" size="35" value="<%=Server.HTMLEncode(Asked_Setting(3))%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>网站主页访问地址</u>：</td>
			<td class="tablerow2"><input type="text" name="Asked_Setting(4)" size="35" value="<%=Asked_Setting(4)%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>管理员Email</u>：</td>
			<td class="tablerow1"><input type="text" name="Asked_Setting(5)" size="35" value="<%=Asked_Setting(5)%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>问吧版权信息(支持HTML语法)</u>：</td>
			<td class="tablerow2">
			<textarea rows="5" name="Asked_Setting(6)" cols="60"><%=Server.HTMLEncode(Asked_Setting(6))%></textarea></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>是否禁止代理服务器访问(建议关闭)</u>：</td>
			<td class="tablerow1">
			<input type="radio" name="Asked_Setting(7)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(7)) = 0 Then Response.Write (" checked=""checked""")%>/> 否
			<input type="radio" name="Asked_Setting(7)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(7)) = 1 Then Response.Write (" checked=""checked""")%>/> 是</td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>限制同一IP连接数(不限制设为0)</u>：</td>
			<td class="tablerow2"><input type="text" name="Asked_Setting(8)" size="10" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Asked_Setting(8))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>问吧访问状态</u>：</td>
			<td class="tablerow1">
			<input type="radio" name="Asked_Setting(9)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(9)) = 0 Then Response.Write (" checked=""checked""")%>/> 打开
			<input type="radio" name="Asked_Setting(9)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(9)) = 1 Then Response.Write (" checked=""checked""")%>/> 关闭
			<input type="radio" name="Asked_Setting(9)" value="2"<%If NewAsp.ChkNumeric(Asked_Setting(9)) = 2 Then Response.Write (" checked=""checked""")%>/> 只读</td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>网站访问状态说明(支持HTML语法)</u>：</td>
			<td class="tablerow2">
			<textarea rows="5" name="Asked_Setting(10)" cols="60"><%=Server.HTMLEncode(Asked_Setting(10))%></textarea></td>
		</tr>
	</table></fieldset>
	<br>
	<fieldset style="cursor: default"><legend>&nbsp;系统邮件设置<a name="setting2"></a>[<a href="#top">顶部</a>]</legend><table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder2">
		<tr>
			<td class="tablerow1" width="35%" align="right"><u>发送邮件组件(如果不支持请选择关闭)</u>：</td>
			<td class="tablerow1" width="65%"><select size="1" name="Asked_Setting(11)"  onChange="chkselect(options[selectedIndex].value,'know1');">
			<option value="0"<%If NewAsp.ChkNumeric(Asked_Setting(11)) = 0 Then Response.Write (" selected")%>>关闭邮件</option>
			<option value="1"<%If NewAsp.ChkNumeric(Asked_Setting(11)) = 1 Then Response.Write (" selected")%>>JMAIL</option>
			<option value="2"<%If NewAsp.ChkNumeric(Asked_Setting(11)) = 2 Then Response.Write (" selected")%>>CDONTS</option>
			<option value="3"<%If NewAsp.ChkNumeric(Asked_Setting(11)) = 3 Then Response.Write (" selected")%>>ASPEMAIL</option>
			</select><div id="know1"></div></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>系统管理员Email：<br>
			给用户发送邮件时，显示的来源Email信息</div></td>
			<td class="tablerow2">
			<input type="text" name="Asked_Setting(12)" size="35" value="<%=Asked_Setting(12)%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>SMTP Server地址</u>：</td>
			<td class="tablerow1">
			<input type="text" name="Asked_Setting(13)" size="35" value="<%=Asked_Setting(13)%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>邮件登录用户名</u>：</td>
			<td class="tablerow2">
			<input type="text" name="Asked_Setting(14)" size="35" value="<%=Asked_Setting(14)%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>邮件登录密码</u>：</td>
			<td class="tablerow1">
			<input type="password" name="Asked_Setting(15)" size="35" value="<%=Asked_Setting(15)%>"></td>
		</tr>
	</table></fieldset>
	<br>
	<fieldset style="cursor: default"><legend>&nbsp;注册用户设置<a name="setting3"></a>[<a href="#top">顶部</a>]</legend><table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder2">
		<tr>
			<td class="tablerow2" width="35%" align="right"><u>是否允许新用户注册</u>：</td>
			<td class="tablerow2">
			<input type="radio" name="Asked_Setting(16)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(16)) = 0 Then Response.Write (" checked")%>> 否
			<input type="radio" name="Asked_Setting(16)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(16)) = 1 Then Response.Write (" checked")%>> 是</td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>注册会员是否要管理员审核</u>：</td>
			<td class="tablerow1">
			<input type="radio" name="Asked_Setting(17)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(17)) = 0 Then Response.Write (" checked")%>> 否
			<input type="radio" name="Asked_Setting(17)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(17)) = 1 Then Response.Write (" checked")%>> 是</td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>注册会员是否Email通知密码：<br>所包含密码为系统随机生成</div></td>
			<td class="tablerow2">
			<input type="radio" name="Asked_Setting(18)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(18)) = 0 Then Response.Write (" checked")%>> 关闭
			<input type="radio" name="Asked_Setting(18)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(18)) = 1 Then Response.Write (" checked")%>> 打开</td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>一个Email只能注册一个会员</u>：</td>
			<td class="tablerow1">
			<input type="radio" name="Asked_Setting(19)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(19)) = 0 Then Response.Write (" checked")%>> 关闭
			<input type="radio" name="Asked_Setting(19)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(19)) = 1 Then Response.Write (" checked")%>> 打开</td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>发送注册邮件信息：<br>请确认您打开了邮件功能</div></td>
			<td class="tablerow2">
			<input type="radio" name="Asked_Setting(20)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(20)) = 0 Then Response.Write (" checked")%>> 关闭
			<input type="radio" name="Asked_Setting(20)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(20)) = 1 Then Response.Write (" checked")%>> 打开</td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>是否禁止代理服务器注册/登录</u>：</td>
			<td class="tablerow1">
			<input type="radio" name="Asked_Setting(21)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(21)) = 0 Then Response.Write (" checked")%>> 否
			<input type="radio" name="Asked_Setting(21)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(21)) = 1 Then Response.Write (" checked")%>> 是</td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>是否禁止同时登陆</u>：</td>
			<td class="tablerow2">
			<input type="radio" name="Asked_Setting(22)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(22)) = 0 Then Response.Write (" checked")%>> 否
			<input type="radio" name="Asked_Setting(22)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(22)) = 1 Then Response.Write (" checked")%>> 是</td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>登录是否采用验证码</u>：</td>
			<td class="tablerow1">
				<input type="radio" name="Asked_Setting(23)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(23)) = 0 Then Response.Write (" checked")%>> 否
				<input type="radio" name="Asked_Setting(23)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(23)) = 1 Then Response.Write (" checked")%>> 是
			</td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u title="Asked_Setting(24)">评论是否采用验证码</u>：</td>
			<td class="tablerow2">
				<input type="radio" name="Asked_Setting(24)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(24)) = 0 Then Response.Write (" checked")%>> 否
				<input type="radio" name="Asked_Setting(24)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(24)) = 1 Then Response.Write (" checked")%>> 是
			</td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u title="Asked_Setting(25)">会员取回密码是否采用验证码</u>：</td>
			<td class="tablerow1">
				<input type="radio" name="Asked_Setting(25)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(25)) = 0 Then Response.Write (" checked")%>> 否
				<input type="radio" name="Asked_Setting(25)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(25)) = 1 Then Response.Write (" checked")%>> 是
			</td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u title="Asked_Setting(26)">会员取回密码次数限制</u>：</td>
			<td class="tablerow2"><input type="text" name="Asked_Setting(26)" size="10" value="<%=NewAsp.ChkNumeric(Asked_Setting(26))%>">
			<font color="red">* 0=表示无限制；999=禁止使用密码找回功能</font></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u title="Asked_Setting(27)">最短用户名长度</u>：</td>
			<td class="tablerow1"><input type="text" name="Asked_Setting(27)" size="10" value="<%=NewAsp.ChkNumeric(Asked_Setting(27))%>">
			<font color="red">* 填写数字，不能小于1大于50</font></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u title="Asked_Setting(28)">最长用户名长度</u>：</td>
			<td class="tablerow2"><input type="text" name="Asked_Setting(28)" size="10" value="<%=NewAsp.ChkNumeric(Asked_Setting(28))%>">
			<font color="red">* 填写数字，不能小于1大于50</font></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u title="Asked_Setting(29)">同一IP注册间隔时间</u>：</td>
			<td class="tablerow1"><input type="text" name="Asked_Setting(29)" size="10" value="<%=NewAsp.ChkNumeric(Asked_Setting(29))%>">
			<font color="red">* 0则表示无限制</font></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u title="Asked_Setting(30)">注册新用户增加的点数</u>：</td>
			<td class="tablerow2"><input type="text" name="Asked_Setting(30)" size="10" value="<%=NewAsp.ChkNumeric(Asked_Setting(30))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u title="Asked_Setting(31)">注册是否采用问题验证</u>：</td>
			<td class="tablerow1">
				<input type="radio" name="Asked_Setting(31)" value="0"<%If NewAsp.ChkNumeric(Asked_Setting(31)) = 0 Then Response.Write (" checked")%>> 否
				<input type="radio" name="Asked_Setting(31)" value="1"<%If NewAsp.ChkNumeric(Asked_Setting(31)) = 1 Then Response.Write (" checked")%>> 是
				<font color="blue">开启此项可以防止恶意注册</font>
			</td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u title="Asked_Setting(32)">注册验证问题</u>：<br/>可以设置多个验证问题，<br/>每个问题使用,(英文逗号)分隔</td>
			<td class="tablerow2"><textarea name="Asked_Setting(32)" rows="5" cols="60"><%=Server.HTMLEncode(Asked_Setting(32))%></textarea></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u title="Asked_Setting(33)">注册验证答案</u>：<br/>设置回答上述问题的答案，<br/>每个问题答案,(英文逗号)分隔，<br/>和上面的问题顺序对应</td>
			<td class="tablerow1"><textarea name="Asked_Setting(33)" rows="5" cols="60"><%=Server.HTMLEncode(Asked_Setting(33))%></textarea></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u title="Asked_Setting(34)">禁止的邮件地址中包含的字符</u>：<br/>每个字符请使用,(英文逗号)分隔</td>
			<td class="tablerow2"><input type="text" name="Asked_Setting(34)" size="45" value="<%=Server.HTMLEncode(Asked_Setting(34))%>">
			<font color="red">* 邮件中所包含的此字符将被禁止注册</font></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u title="Asked_Setting(35)">禁止的用户名中包含的字符</u>：<br/>每个字符请使用,(英文逗号)分隔</td>
			<td class="tablerow1"><input type="text" name="Asked_Setting(35)" size="45" value="<%=Server.HTMLEncode(Asked_Setting(35))%>">
			<font color="red">* 用户名中所包含的此字符将被禁止使用</font></td>
		</tr>
	</table></fieldset>
	</td>
</tr>
<tr>
	<td class="tablerow1" align="center">
		<input type="submit" value="保存设置" name="B1" class="button"></td>
</tr>
</table>
</form>
<%
	Rs.Close:Set Rs = Nothing
	Dim InstalledObjects(10)
	Response.Write "<div id=""Issubport0"" style=""display:none"">请选择EMAIL组件！</div>" & vbCrLf
	Response.Write "<div id=""Issubport999"" style=""display:none"">请选择上传组件！</div>" & vbCrLf

	InstalledObjects(1) = "JMail.Message"				'JMail 4.3
	InstalledObjects(2) = "CDONTS.NewMail"				'CDONTS
	InstalledObjects(3) = "Persits.MailSender"			'ASPEMAIL
	'-----------------------
	InstalledObjects(4) = "Adodb.Stream"				'Adodb.Stream
	InstalledObjects(5) = "Persits.Upload"				'Aspupload3.0
	InstalledObjects(6) = "SoftArtisans.FileUp"			'SA-FileUp 4.0
	InstalledObjects(7) = "DvFile.Upload"				'DvFile-Up V1.0
	'-----------------------
	InstalledObjects(8) = "CreatePreviewImage.cGvbox"		'CreatePreviewImage
	InstalledObjects(9) = "Persits.Jpeg"				'AspJpeg
	InstalledObjects(10) = "SoftArtisans.ImageGen"			'SoftArtisans ImgWriter V1.21
	For i = 1 To 10
		Response.Write "<div id=""Issubport" & i & """ style=""display:none"">"
		If Not CheckObjInstalled(InstalledObjects(i)) Then
			Response.Write "<b>×</b>服务器不支持!"
		Else
			Response.Write "<font color=red><b>√</b>服务器支持!</font>"
		End If
		Response.Write "</div>"
	Next
	Response.Write "<script language=""JavaScript"">" & vbCrLf
	Response.Write "<!--" & vbCrLf
	Response.Write "function chkselect(s,divid)" & vbCrLf
	Response.Write "{" & vbCrLf
	Response.Write "var divname='Issubport';" & vbCrLf
	Response.Write "var chkreport;" & vbCrLf
	Response.Write "s=Number(s)" & vbCrLf
	Response.Write "if (divid==""know1"")" & vbCrLf
	Response.Write "{" & vbCrLf
	Response.Write "divname=divname+s;" & vbCrLf
	Response.Write "}" & vbCrLf
	Response.Write "if (divid==""know2"")" & vbCrLf
	Response.Write "{" & vbCrLf
	Response.Write "s+=4;" & vbCrLf
	Response.Write "if (s==1003){s=999;}" & vbCrLf
	Response.Write "divname=divname+s;" & vbCrLf
	Response.Write "}" & vbCrLf
	Response.Write "if (divid==""know3"")" & vbCrLf
	Response.Write "{" & vbCrLf
	Response.Write "s+=8;" & vbCrLf
	Response.Write "if (s==1007){s=999;}" & vbCrLf
	Response.Write "divname=divname+s;" & vbCrLf
	Response.Write "}" & vbCrLf
	Response.Write "document.getElementById(divid).innerHTML=divname;" & vbCrLf
	Response.Write "chkreport=document.getElementById(divname).innerHTML;" & vbCrLf
	Response.Write "document.getElementById(divid).innerHTML=chkreport;" & vbCrLf
	Response.Write "}" & vbCrLf
	Response.Write "//-->"
	Response.Write "</script>" & vbCrLf
End Sub

Sub ShowPointSetting()
	Dim Rs,Point_Setting
	Set Rs = Newasp.Ask_Execute("SELECT * FROM NC_Ask_Setup")
	If Rs.BOF And Rs.EOF Then
		Set Rs = Nothing
		FoundErr = True
		ErrMsg = "问吧安装错误,找不到问吧设置!"
		Exit Sub
	End If
	Point_Setting = Split(Rs("Point_Setting") & "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||", "|||")
%>
<form name="myform" method="post" action="?action=savepoint">
<input type="hidden" name="ChannelID" value="<%=ChannelID%>"/>
<table border="0" align="center" cellspacing="1" class="tableborder" cellpadding="3">
<tr>
	<th>用户积分设置</th>
</tr>
<tr>
	<td class="tablerow1"><fieldset style="cursor: default"><legend>&nbsp;获得积分设置<a name="setting4"></a>[<a href="#top">顶部</a>]</legend><table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder2">
		<tr>
			<td class="tablerow2" width="35%" align="right"><u>注册会员获得积分</u>：</td>
			<td class="tablerow2"><input type="text" name="Point_Setting(0)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(0))%>">
			经验值：<input type="text" name="Point_Setting(1)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(1))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>会员登陆获得积分</u>：</td>
			<td class="tablerow1"><input type="text" name="Point_Setting(2)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(2))%>">
			经验值：<input type="text" name="Point_Setting(3)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(3))%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>提交问题获得积分</u>：</td>
			<td class="tablerow2"><input type="text" name="Point_Setting(4)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(4))%>">
			经验值：<input type="text" name="Point_Setting(5)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(5))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>处理问题获得积分</u>：</td>
			<td class="tablerow1"><input type="text" name="Point_Setting(6)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(6))%>">
			经验值：<input type="text" name="Point_Setting(7)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(7))%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>提交答案获得积分</u>：</td>
			<td class="tablerow2"><input type="text" name="Point_Setting(8)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(8))%>">
			经验值：<input type="text" name="Point_Setting(9)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(9))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>答案被采纳获得积分</u>：</td>
			<td class="tablerow1"><input type="text" name="Point_Setting(10)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(10))%>">
			经验值：<input type="text" name="Point_Setting(11)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(11))%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>投票获得积分</u>：</td>
			<td class="tablerow2"><input type="text" name="Point_Setting(12)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(12))%>">
			经验值：<input type="text" name="Point_Setting(13)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(13))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>提交分享获得积分</u>：</td>
			<td class="tablerow1"><input type="text" name="Point_Setting(14)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(14))%>">
			经验值：<input type="text" name="Point_Setting(15)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(15))%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>特殊奖励积分</u>：</td>
			<td class="tablerow2"><input type="text" name="Point_Setting(16)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(16))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>每日提交问题获得最多积分(不限制设为0)</u>：</td>
			<td class="tablerow1"><input type="text" name="Point_Setting(17)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(17))%>"></td>
		</tr>
	</table></fieldset>
	<br>
	<fieldset style="cursor: default"><legend>&nbsp;降低积分设置<a name="setting5"></a>[<a href="#top">顶部</a>]</legend><table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder2">
		<tr>
			<td class="tablerow2" align="right"><u>匿名提问减去积分</u>：</td>
			<td class="tablerow2"><input type="text" name="Point_Setting(18)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(18))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>站内广播减去积分</u>：</td>
			<td class="tablerow1"><input type="text" name="Point_Setting(19)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(19))%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>删除问题减去积分</u>：</td>
			<td class="tablerow2"><input type="text" name="Point_Setting(20)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(20))%>">
			经验值：<input type="text" name="Point_Setting(21)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(21))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>删除已处理问题减去积分</u>：</td>
			<td class="tablerow1"><input type="text" name="Point_Setting(22)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(22))%>">
			经验值：<input type="text" name="Point_Setting(23)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(23))%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>删除答案减去积分</u>：</td>
			<td class="tablerow2"><input type="text" name="Point_Setting(24)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(24))%>">
			经验值：<input type="text" name="Point_Setting(25)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(25))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>删除最佳答案减去积分</u>：</td>
			<td class="tablerow1"><input type="text" name="Point_Setting(26)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(26))%>">
			经验值：<input type="text" name="Point_Setting(27)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(27))%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>删除投票减去积分</u>：</td>
			<td class="tablerow2"><input type="text" name="Point_Setting(28)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(28))%>">
			经验值：<input type="text" name="Point_Setting(29)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(29))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>删除分享减去积分</u>：</td>
			<td class="tablerow1"><input type="text" name="Point_Setting(30)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(30))%>">
			经验值：<input type="text" name="Point_Setting(31)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(31))%>"></td>
		</tr>
		<tr>
			<td class="tablerow1" align="right"><u>删除评论减去积分</u>：</td>
			<td class="tablerow1"><input type="text" name="Point_Setting(32)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(32))%>">
			经验值：<input type="text" name="Point_Setting(33)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(33))%>"></td>
		</tr>
		<tr>
			<td class="tablerow2" align="right"><u>问题15天内不处理减去积分</u>：</td>
			<td class="tablerow2"><input type="text" name="Point_Setting(34)" size="15" onkeyup="if(isNaN(this.value))this.value='0'" value="<%=NewAsp.ChkNumeric(Point_Setting(34))%>"></td>
		</tr>
	</table></fieldset>
	</td>
</tr>
<tr>
	<td class="tablerow1" align="center">
		<input type="submit" value="保存积分设置" name="B1" class="button"></td>
</tr>
</table>
</form>
<%
	Rs.Close:Set Rs = Nothing
End Sub

Sub ShowPostsSetting()
	Dim Rs,Posts_Setting
	Set Rs = Newasp.Ask_Execute("SELECT * FROM NC_Ask_Setup")
	If Rs.BOF And Rs.EOF Then
		Set Rs = Nothing
		FoundErr = True
		ErrMsg = "问吧安装错误,找不到问吧设置!"
		Exit Sub
	End If
	Posts_Setting = Split(Rs("Posts_Setting") & "|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||", "|||")
%>
<form name="myform" method="post" action="?action=saveposts">
<input type="hidden" name="ChannelID" value="<%=ChannelID%>"/>
<table border="0" align="center" cellspacing="1" class="tableborder" cellpadding="3">
<tr>
	<th colspan="2">发帖相关设置</th>
</tr>
<tr>
	<td class="tablerow2" width="35%" align="right"><u>是否允许用户提问</u>：</td>
	<td class="tablerow2">
	<input type="radio" name="Posts_Setting(0)" value="0"<%If NewAsp.ChkNumeric(Posts_Setting(0)) = 0 Then Response.Write (" checked")%>> 否
	<input type="radio" name="Posts_Setting(0)" value="1"<%If NewAsp.ChkNumeric(Posts_Setting(0)) = 1 Then Response.Write (" checked")%>> 是</td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>是否允许用户回答</u>：</td>
	<td class="tablerow1">
	<input type="radio" name="Posts_Setting(1)" value="0"<%If NewAsp.ChkNumeric(Posts_Setting(1)) = 0 Then Response.Write (" checked")%>> 否
	<input type="radio" name="Posts_Setting(1)" value="1"<%If NewAsp.ChkNumeric(Posts_Setting(1)) = 1 Then Response.Write (" checked")%>> 是</td>
</tr>
<tr>
	<td class="tablerow2" align="right"><u>是否允许用户评论</u>：</td>
	<td class="tablerow2">
	<input type="radio" name="Posts_Setting(2)" value="0"<%If NewAsp.ChkNumeric(Posts_Setting(2)) = 0 Then Response.Write (" checked")%>> 否
	<input type="radio" name="Posts_Setting(2)" value="1"<%If NewAsp.ChkNumeric(Posts_Setting(2)) = 1 Then Response.Write (" checked")%>> 是</td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>是否允许发表分享</u>：</td>
	<td class="tablerow1">
	<input type="radio" name="Posts_Setting(3)" value="0"<%If NewAsp.ChkNumeric(Posts_Setting(3)) = 0 Then Response.Write (" checked")%>> 否
	<input type="radio" name="Posts_Setting(3)" value="1"<%If NewAsp.ChkNumeric(Posts_Setting(3)) = 1 Then Response.Write (" checked")%>> 是</td>
</tr>
<tr>
	<td class="tablerow2" align="right"><u>是否允许回复分享</u>：</td>
	<td class="tablerow2">
	<input type="radio" name="Posts_Setting(4)" value="0"<%If NewAsp.ChkNumeric(Posts_Setting(4)) = 0 Then Response.Write (" checked")%>> 否
	<input type="radio" name="Posts_Setting(4)" value="1"<%If NewAsp.ChkNumeric(Posts_Setting(4)) = 1 Then Response.Write (" checked")%>> 是</td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>是否允许用户删除</u>：</td>
	<td class="tablerow1">
	<input type="radio" name="Posts_Setting(5)" value="0"<%If NewAsp.ChkNumeric(Posts_Setting(5)) = 0 Then Response.Write (" checked")%>> 否
	<input type="radio" name="Posts_Setting(5)" value="1"<%If NewAsp.ChkNumeric(Posts_Setting(5)) = 1 Then Response.Write (" checked")%>> 是</td>
</tr>
<tr>
	<td class="tablerow2" align="right"><u>是否允许补充问题</u>：</td>
	<td class="tablerow2">
	<input type="radio" name="Posts_Setting(6)" value="0"<%If NewAsp.ChkNumeric(Posts_Setting(6)) = 0 Then Response.Write (" checked")%>> 否
	<input type="radio" name="Posts_Setting(6)" value="1"<%If NewAsp.ChkNumeric(Posts_Setting(6)) = 1 Then Response.Write (" checked")%>> 是</td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>是否允许关闭问题</u>：</td>
	<td class="tablerow1">
	<input type="radio" name="Posts_Setting(7)" value="0"<%If NewAsp.ChkNumeric(Posts_Setting(7)) = 0 Then Response.Write (" checked")%>> 否
	<input type="radio" name="Posts_Setting(7)" value="1"<%If NewAsp.ChkNumeric(Posts_Setting(7)) = 1 Then Response.Write (" checked")%>> 是</td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>是否允许发起投票</u>：</td>
	<td class="tablerow1">
	<input type="radio" name="Posts_Setting(8)" value="0"<%If NewAsp.ChkNumeric(Posts_Setting(8)) = 0 Then Response.Write (" checked")%>> 否
	<input type="radio" name="Posts_Setting(8)" value="1"<%If NewAsp.ChkNumeric(Posts_Setting(8)) = 1 Then Response.Write (" checked")%>> 是</td>
</tr>
<tr>
	<td class="tablerow2" align="right"><u>是否开启审核功能</u>：</td>
	<td class="tablerow2">
	<input type="radio" name="Posts_Setting(9)" value="0"<%If NewAsp.ChkNumeric(Posts_Setting(9)) = 0 Then Response.Write (" checked")%>> 否
	<input type="radio" name="Posts_Setting(9)" value="1"<%If NewAsp.ChkNumeric(Posts_Setting(9)) = 1 Then Response.Write (" checked")%>> 是</td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>问题标题长度限制</u>：</td>
	<td class="tablerow1">最小字节：
	<input type="text" size="8" name="Posts_Setting(10)" value="<%=NewAsp.ChkNumeric(Posts_Setting(10))%>">
	最大字节：
	<input type="text" size="8" name="Posts_Setting(11)" value="<%=NewAsp.ChkNumeric(Posts_Setting(11))%>"> <font color="red">注：一个汉字等于两个字节</font></td>
</tr>
<tr>
	<td class="tablerow2" align="right"><u>问题描述长度限制</u>：</td>
	<td class="tablerow2">最小字节：
	<input type="text" size="8" name="Posts_Setting(12)" value="<%=NewAsp.ChkNumeric(Posts_Setting(12))%>">
	最大字节：
	<input type="text" size="8" name="Posts_Setting(13)" value="<%=NewAsp.ChkNumeric(Posts_Setting(13))%>"> <font color="red">注：一个汉字等于两个字节</font></td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>补充问题长度限制</u>：</td>
	<td class="tablerow1">最小字节：
	<input type="text" size="8" name="Posts_Setting(14)" value="<%=NewAsp.ChkNumeric(Posts_Setting(14))%>">
	最大字节：
	<input type="text" size="8" name="Posts_Setting(15)" value="<%=NewAsp.ChkNumeric(Posts_Setting(15))%>"> <font color="red">注：一个汉字等于两个字节</font></td>
</tr>
<tr>
	<td class="tablerow2" align="right"><u>回答问题长度限制</u>：</td>
	<td class="tablerow2">最小字节：
	<input type="text" size="8" name="Posts_Setting(16)" value="<%=NewAsp.ChkNumeric(Posts_Setting(16))%>">
	最大字节：
	<input type="text" size="8" name="Posts_Setting(17)" value="<%=NewAsp.ChkNumeric(Posts_Setting(17))%>"> <font color="red">注：一个汉字等于两个字节</font></td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>评论内容长度限制</u>：</td>
	<td class="tablerow1">最小字节：
	<input type="text" size="8" name="Posts_Setting(18)" value="<%=NewAsp.ChkNumeric(Posts_Setting(18))%>">
	最大字节：
	<input type="text" size="8" name="Posts_Setting(19)" value="<%=NewAsp.ChkNumeric(Posts_Setting(19))%>"> <font color="red">注：一个汉字等于两个字节</font></td>
</tr>
<tr>
	<td class="tablerow2" align="right"><u>分享标题长度限制</u>：</td>
	<td class="tablerow2">最小字节：
	<input type="text" size="8" name="Posts_Setting(20)" value="<%=NewAsp.ChkNumeric(Posts_Setting(20))%>">
	最大字节：
	<input type="text" size="8" name="Posts_Setting(21)" value="<%=NewAsp.ChkNumeric(Posts_Setting(21))%>"> <font color="red">注：一个汉字等于两个字节</font></td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>分享内容长度限制</u>：</td>
	<td class="tablerow1">最小字节：
	<input type="text" size="8" name="Posts_Setting(22)" value="<%=NewAsp.ChkNumeric(Posts_Setting(22))%>">
	最大字节：
	<input type="text" size="8" name="Posts_Setting(23)" value="<%=NewAsp.ChkNumeric(Posts_Setting(23))%>"> <font color="red">注：一个汉字等于两个字节</font></td>
</tr>
<tr>
	<td class="tablerow2" align="right"><u>回复分享长度限制</u>：</td>
	<td class="tablerow2">最小字节：
	<input type="text" size="8" name="Posts_Setting(24)" value="<%=NewAsp.ChkNumeric(Posts_Setting(24))%>">
	最大字节：
	<input type="text" size="8" name="Posts_Setting(25)" value="<%=NewAsp.ChkNumeric(Posts_Setting(25))%>"> <font color="red">注：一个汉字等于两个字节</font></td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>显示最多分类问题数</u>：</td>
	<td class="tablerow1">父级分类数：
	<input type="text" size="8" name="Posts_Setting(26)" value="<%=NewAsp.ChkNumeric(Posts_Setting(26))%>">
	子级分类数：
	<input type="text" size="8" name="Posts_Setting(27)" value="<%=NewAsp.ChkNumeric(Posts_Setting(27))%>"> <font color="red">注：不限制请输入“0”</font></td>
</tr>
<tr>
	<td class="tablerow2" align="right"><u>每页显示问题记录数</u>：</td>
	<td class="tablerow2">分类:
	<input type="text" size="5" name="Posts_Setting(28)" value="<%=NewAsp.ChkNumeric(Posts_Setting(28))%>">
	问题库：
	<input type="text" size="5" name="Posts_Setting(29)" value="<%=NewAsp.ChkNumeric(Posts_Setting(29))%>">
	用户：
	<input type="text" size="5" name="Posts_Setting(30)" value="<%=NewAsp.ChkNumeric(Posts_Setting(30))%>">
	分享：
	<input type="text" size="5" name="Posts_Setting(31)" value="<%=NewAsp.ChkNumeric(Posts_Setting(31))%>"></td>
</tr>
<tr>
	<td class="tablerow1" align="right"><u>显示最多问题记录数</u>：</td>
	<td class="tablerow1">回答:
	<input type="text" size="5" name="Posts_Setting(32)" value="<%=NewAsp.ChkNumeric(Posts_Setting(32))%>">
	评论：
	<input type="text" size="5" name="Posts_Setting(33)" value="<%=NewAsp.ChkNumeric(Posts_Setting(33))%>">
	问题库：
	<input type="text" size="5" name="Posts_Setting(34)" value="<%=NewAsp.ChkNumeric(Posts_Setting(34))%>">
	回复：
	<input type="text" size="5" name="Posts_Setting(35)" value="<%=NewAsp.ChkNumeric(Posts_Setting(35))%>"></td>
</tr>
<tr>
	<td class="tablerow1" colspan="2" align="center">
		<input type="submit" value="保存帖子设置" name="B1" class="button"></td>
</tr>
</table>
</form>
<%
	Rs.Close:Set Rs = Nothing
End Sub

Sub savedit()
	Dim Rs,SQL,i
	Dim m_strInstallDir,m_strAskedSetting,m_strPointSetting,m_strAskedKey
	Dim m_strTemplatePath,m_strSkinPath
	m_strTemplatePath = Replace(Replace(Trim(Request.Form("TemplatePath")), "\", "/"), "//", "/")
	If m_strTemplatePath = "" Then m_strTemplatePath = "template/default/"
	If Right(m_strTemplatePath,1) <> "/" Then m_strTemplatePath = m_strTemplatePath & "/"
	m_strSkinPath = Replace(Replace(Trim(Request.Form("SkinPath")), "\", "/"), "//", "/")
	If m_strSkinPath = "" Then m_strSkinPath = "skins/default/"
	If Right(m_strSkinPath,1) <> "/" Then m_strSkinPath = m_strSkinPath & "/"
	m_strInstallDir = Replace(Replace(Trim(Request.Form("InstallDir")), "\", "/"), "//", "/")
	If m_strInstallDir = "" Then m_strInstallDir = "/"
	If Right(m_strInstallDir,1) <> "/" Then m_strInstallDir = m_strInstallDir & "/"
	If Left(m_strInstallDir,1) <> "/" Then m_strInstallDir = "/" & m_strInstallDir
	m_strAskedSetting = ""
	For i = 0 To 35
		m_strAskedSetting = m_strAskedSetting & Replace(Trim(Request.Form("Asked_Setting(" & i & ")")), "|||", "") & "|||"
	Next
	m_strPointSetting = ""
	For i = 0 To 34
		m_strPointSetting = m_strPointSetting & Replace(Trim(Request.Form("Point_Setting(" & i & ")")), "|||", "") & "|||"
	Next
	m_strAskedKey = Trim(Request.Form("AskedKey"))
	If Len(m_strAskedKey) < 2 Then m_strAskedKey = GetRandomCode(8)
	If FoundErr = True Then Exit Sub
	Set Rs = Newasp.Ask_Execute("SELECT * FROM NC_Ask_Setup")
	Set Rs=NewAsp.CreateAXObject("ADODB.Recordset")
	SQL = "SELECT * FROM NC_Ask_Setup"
	Rs.Open SQL,Ask_Conn,1,3
		Rs("InstallDir") = m_strInstallDir
		Rs("Asked_Setting") = m_strAskedSetting & "0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||"
		Rs("AskedKey") = m_strAskedKey
		Rs("TemplatePath") = m_strTemplatePath
		Rs("SkinPath") = m_strSkinPath
	Rs.update
	Rs.close:set Rs = Nothing
	DelAskedCahe("setup")
	Succeed("<li>恭喜您！保存问吧设置成功。</li>")
End Sub

Sub ReloadCache()
	DelAskedCahe("0")
	Succeed("<li>友情提示！重建问吧缓存完成。</li>")
End Sub

Sub SavePointSetting()
	Dim Rs,SQL,i
	Dim m_strPointSetting
	m_strPointSetting = ""
	For i = 0 To 34
		m_strPointSetting = m_strPointSetting & Replace(Trim(Request.Form("Point_Setting(" & i & ")")), "|||", "") & "|||"
	Next
	If FoundErr = True Then Exit Sub
	Set Rs = Newasp.Ask_Execute("SELECT * FROM NC_Ask_Setup")
	Set Rs=NewAsp.CreateAXObject("ADODB.Recordset")
	SQL = "SELECT * FROM NC_Ask_Setup"
	Rs.Open SQL,Ask_Conn,1,3
		Rs("Point_Setting") = m_strPointSetting & "0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||"
	Rs.update
	Rs.close:set Rs = Nothing
	DelAskedCahe("setup")
	Succeed("<li>恭喜您！保存问吧用户积分设置成功。</li>")
End Sub

Sub SavePostsSetting()
	Dim Rs,SQL,i
	Dim m_strPostsSetting
	m_strPostsSetting = ""
	For i = 0 To 35
		m_strPostsSetting = m_strPostsSetting & Replace(Trim(Request.Form("Posts_Setting(" & i & ")")), "|||", "") & "|||"
	Next
	If FoundErr = True Then Exit Sub
	Set Rs = Newasp.Ask_Execute("SELECT * FROM NC_Ask_Setup")
	Set Rs=NewAsp.CreateAXObject("ADODB.Recordset")
	SQL = "SELECT * FROM NC_Ask_Setup"
	Rs.Open SQL,Ask_Conn,1,3
		Rs("Posts_Setting") = m_strPostsSetting & "0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||0|||"
	Rs.update
	Rs.close:set Rs = Nothing
	DelAskedCahe("setup")
	Succeed("<li>恭喜您！保存问吧用户发帖设置成功。</li>")
End Sub

%>