<!-- #Include File="Include/AMH_Onlogin.asp" -->
<%
'=======================================================
' 欢迎使用《阿赛大型门户网站系统V2.0》，简称“AsaiMHV2”
' 技术支持、商业版咨询、官方唯一指定联系QQ“4941172”
' 官方网站：http://77ya.com      程序负责人：阿赛
'=======================================================

Index_Url = "Channel_Config"
Data_Name = "AsaiMHChannel"
tit_fir="基本配置"
tit="配置管理"
Call AMH_Header(1)
%>
<tr><td align=center colspan=2 height=30>
  <table border=0>
  <tr>
  <td><%Response.Write tit%></td>
  <td width=10></td>
  <td><a href='?ChannelIDs=<%=iChannelIDs%>'><%Response.Write tit_fir%></a></td>
  </tr>
  </table>
</td></tr>
</table>
<%
	Call AMH_Table(1)
%>
<tr align=center>
<td class=td width='18%'>设置名称</td>
<td class=td width='70%'>基本参数设置</td>
<td class=td width='12%'>相关信息</td>
</tr>
<%
	Ok_Config_Main()
Call AMH_Ender(tit)
'//* 软件基本配置 *//
Sub Ok_Config_Main()
 Dim Ok,ChannelOption
 	Dim UserPut, UserLevelName
	Dim Tii
  SQL = "Select ChannelOption From ["&Data_Name&"] Where ChannelIDs="&iChannelIDs&""
  Call Cls.Exe_Conn(Rs,SQL,3)
  ChannelOption=Rs("ChannelOption")
  If Chk() Then
   Dim UserLevel
		Dim iUserPut, iLevelName
		For Each iUserPut in Request.form("UserPut")
			If iUserPut<>"" Then
				If Not Cls.Is_Int(iUserPut) Then
					Exit For
					Call AMH_Msg("积分数必须为整数！","?Action="&Action,1)
					Exit Sub
				End If
				UserPut=UserPut&iUserPut&":"
			End If
		Next
		For Each iLevelName in Request.form("UserLevelName")
			If iLevelName<>"" Then
				UserLevelName=UserLevelName&Code_Config(iLevelName)&":"
			End If
		Next
		If Ubound(Split(UserPut,":"))<>Ubound(Split(UserLevelName,":")) Then
			Call AMH_Msg("请正确填写用户等级！","?Action="&Action,1)
			Exit Sub
		End If
		ChannelOption=code_config(Cls.Code_Admin("Ok_0",1,0))&"|"&code_config(Cls.Code_Admin("Ok_1",1,0))&"|"&code_config(Cls.Code_Admin("Ok_2",1,0))&"|"&code_config(Cls.Code_Admin("Ok_3",1,0))&"|"&code_config(Cls.Code_Admin("Ok_4",1,0))&"|"&UserPut&"|"&UserLevelName
    Rs("ChannelOption")=ChannelOption
	Rs.Update
	Rs.Close
	Call Cls.Cache_Del("Class_3")
	Call Cls.ReloadInfo(UserLevel,15)
	Call ReloadMenu(0)
	Call AMH_Msg("已成功编辑了"&tit_fir&"！","?ChannelIDs="&iChannelIDs,1)
	Exit Sub
   End If
Call Form_First()
Ok=split(ChannelOption,"|")
%>
<SCRIPT LANGUAGE="JavaScript">
<!--
function deldata(n){
	if (document.theform.delall[n].checked==true){
	document.theform.UserPut[n].disabled = true;
	document.theform.UserLevelName[n].disabled = true;
	}else{
	document.theform.UserPut[n].disabled = false;
	document.theform.UserLevelName[n].disabled = false;
	}
}
//-->
</SCRIPT>
<form name=theform action='?ChannelIDs=<%=iChannelIDs%>' method=post>
<input type=hidden name=chk value=yes>
<tr>
<td>回答经验：</td>
<td><input type=text name=Ok_0 value='<%Response.Write Ok(0)%>' size=62 maxlength=200></td>
<td><%Call AMH_Read("","回答经验说明","每回答一次问题可获得经验")%></td>
</tr>
<tr>
<td>过期天数：</td>
<td><input type=text name=Ok_1 value='<%Response.Write Ok(1)%>' size=62 maxlength=200></td>
<td><%Call AMH_Read("","过期天数说明","发布问题的过期天数不能小于此相的限制")%></td>
</tr>
<tr>
<td>投票天数：</td>
<td><input type=text name=Ok_2 value='<%Response.Write Ok(2)%>' size=62 maxlength=200></td>
<td><%Call AMH_Read("","投票天数说明","离过期天数剩余答案的投票天数")%></td>
</tr>
<tr>
<td>投票数量：</td>
<td><input type=text name=Ok_3 value='<%Response.Write Ok(3)%>' size=62 maxlength=200></td>
<td><%Call AMH_Read("","投票数量说明","采纳答案的票数")%></td>
</tr>
<tr>
<td>悬赏分值：</td>
<td><input type=text name=Ok_4 value='<%Response.Write Ok(4)%>' size=62 maxlength=200></td>
<td><%Call AMH_Read("","悬赏分值说明","多个请用“:”隔开")%></td></tr><%
	UserPut = Split(Ok(5),":")
	UserLevelName = Split(Ok(6),":")
	For Tii = 0 To Ubound(UserPut)
		Response.Write VbCrlf&"<tr>"
		Response.Write VbCrlf&"<td>用户等级"&Tii+1&"：</td>"
		Response.Write VbCrlf&"<td>&nbsp;回答问题被采纳&nbsp;<input type=text name=UserPut value='"&UserPut(Tii)&"' size=8 maxlength=5>&nbsp;个可升级为&nbsp;<input type=text name=UserLevelName value='"&UserLevelName(Tii)&"' size=28 maxlength=40>&nbsp;称号</td>"
	    If Tii<>Int(Ubound(UserPut)) Then
		  Response.Write VbCrlf&"<td class=Gys>删除 "&Tii+1&"：<input type=checkbox name=delall onclick=""deldata("&Tii&")""></td>"
	    Else
	      %><td><%call AMH_read("","用户等级设置说明","你可以添加、修改、删除用户等级。<br /><font class=red>添加用户等级</font>即在“增加新用户组”中按规则加入要新添的用户等级，只能单个的增加；<br /><font class=red>修改用户等级</font>可修改所有的，如要排序，只要将其内容互换即可，但所需积分和等级名称要同时互换；<br /><font class=red>删除用户等级</font>可一次删除一个或多个，方法为将要删除的用户等级框里的内容清空，再将栏目数较大的向较小的里转移。</font>")%></td><%
	    End if
		Response.Write VbCrlf&"</tr>"
	Next
		Erase UserPut
	Erase UserLevelName
	Submit_Config()
End Sub
%>
