<!--#include file="../conn.asp"-->
<!--#include file="admin_check.asp"-->
<!--#include file="../inc/function.asp"-->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/>
<title>管理页面</title>
<link id="maincss" rel="stylesheet" href="images/css/admin_style_<%= AdminSkin %>.css" type="text/css" media="all" />
</head>
<body leftmargin="0" bottommargin="0" rightmargin="0" topmargin="5" marginheight="0" marginwidth="0" bgcolor="#DDEEFF">
<%
Call chkFlag(10)
Dim act
act=Trim(Request.QueryString("action"))
Dim AskD
opendb
Set AskD = Server.CreateObject("KwAsk.FunAsk")
	set AskD.myConn =conn
	AskD.myPredb =predb
	AskD.Getsetting()
	siteinfo=AskD.siteinfo
	setting=AskD.setting
	regForm=AskD.regForm
Select Case act
  Case "save"
    Call Modi()
  Case Else
    Call Main()
End Select
set AskD.myConn =Nothing
closedb
Set AskD = Nothing

Sub Modi()
Dim i,regform
   for i=1 to 8
   regform=regform&"|"&Trim(Request.Form("form"&i))
   Next
   conn.execute("update "&predb&"system set regForm='"&regform&"',regcontrol='"&Trim(Request.Form("checkbox"))&"' where id=1")
   Call AskD.ClsSetting()
      Call SendMsg("修改注册控制成功")
      Response.Write("<script>setTimeout(""location.href='?'"",2000)</script>")
End Sub

Sub main()
%>
<table class="tableBorder" cellspacing="1" cellpadding="2" width="96%" align="center" border="0">
<tr>
		<th height="25" colspan="3" align="left">会员注册控制</th>
	</tr>
<%
dim rs,regform
set rs=conn.execute("select regForm,regcontrol from "&predb&"system where id=1")
regform=split(rs("regform"),"|")
%>
<form action="?action=save" method="post" name="regcontrol">
  <tr>
    <td align="right" class="TableRow1">注册是否需要审核：</td>
    <td colspan="2" class="TableRow1"><input type="radio" name="form1" value="0" <% If regform(1)="0" Then %>checked<% End If %>>
是
  <input type="radio" name="form1" value="1" <% If regform(1)="1" Then %>checked<% End If %>>
否</td>
  </tr>
  <tr>
    <td align="right" class="TableRow2">相同Email是否允许</td>
    <td colspan="2" class="TableRow2"><input type="radio" name="form2" value="0"  <% If regform(2)="0" Then %>checked<% End If %>>
是
  <input type="radio" name="form2" value="1" <% If regform(2)="1" Then %>checked<% End If %>>
否</td>
  </tr>
  <tr>
    <td align="right" class="TableRow1">注册是否邮件激活：</td>
    <td colspan="2" class="TableRow1"><input type="radio" name="form3" value="0" <% If regform(3)="0" Then %>checked<% End If %>>
是
  <input type="radio" name="form3" value="1" <% If regform(3)="1" Then %>checked<% End If %>>
否</td>
  </tr>
  
  <tr>
    <td width="22%" align="right" class="TableRow2">每人每天允许的注册数：</td>
    <td colspan="2" class="TableRow2"><input name="form4" type="text" id="form4" size="4" value="<%= regform(4) %>">
      <span class="xing">*</span>不限制请填写 0</td>
  </tr>
  <tr>
    <td align="right" class="TableRow1">新用户注册用户名至少：</td>
    <td colspan="2" class="TableRow1"><input name="form5" type="text" id="form5"  value="<%= regform(5) %>" size="4"></td>
  </tr>
  <tr>
    <td align="right" class="TableRow2">新用户注册用户名至多：</td>
    <td colspan="2" class="TableRow2"><input name="form6" type="text" id="form6"  value="<%= regform(6) %>" size="4"></td>
  </tr>
  <tr>
    <td align="right" class="TableRow1">不允许的用户名：</td>
    <td colspan="2" class="TableRow1"><input name="form7" type="text" id="form7"  value="<%= regform(7) %>" size="45">
      用“,”分割</td>
  </tr>
  <tr>
    <td align="right" class="TableRow2">不允许的IP地址：</td>
    <td colspan="2" class="TableRow2"><textarea name="form8" cols="38" rows="6" id="form8"><%= regform(8) %></textarea>
      每行填写一个IP</td>
  </tr>
  <tr>
    <td colspan="3" align="center" class="TableRow2"><font color="#008800">注册表单选项</font></td>
  </tr>
  <tr>
    <td align="center" class="TableRow1"><strong>表单项目</strong></td>
    <td align="center" class="TableRow1"><strong>是否启用</strong></td>
    <td align="center" class="TableRow1"><strong>是否必填</strong></td>
  </tr>
  <tr>
    <td align="right" class="TableRow2">验证码：</td>
    <td align="center" class="TableRow2"><input name="checkbox" type="checkbox" value="passcode1" <% If instr(rs("regcontrol"),"passcode1")>0 Then %>checked<% End If %>></td>
    <td align="center" class="TableRow2"><input name="checkbox" type="checkbox" value="passcode2" <% If instr(rs("regcontrol"),"passcode2")>0 Then %>checked<% End If %>></td>
  </tr>
  <tr>
    <td align="right" class="TableRow1">性别：</td>
    <td align="center" class="TableRow1"><input name="checkbox" type="checkbox" value="sex1" <% If instr(rs("regcontrol"),"sex1")>0 Then %>checked<% End If %>></td>
    <td align="center" class="TableRow1"><input name="checkbox" type="checkbox" value="sex2" <% If instr(rs("regcontrol"),"sex2")>0 Then %>checked<% End If %>></td>
  </tr>
  <tr>
    <td align="right" class="TableRow2">密码提示问题：</td>
    <td align="center" class="TableRow2"><input name="checkbox" type="checkbox" value="question1" <% If instr(rs("regcontrol"),"question1")>0 Then %>checked<% End If %>></td>
    <td align="center" class="TableRow2"><input name="checkbox" type="checkbox" value="question2" <% If instr(rs("regcontrol"),"question2")>0 Then %>checked<% End If %>></td>
  </tr>
  <tr>
    <td align="right" class="TableRow1">真实姓名：</td>
    <td align="center" class="TableRow1"><input name="checkbox" type="checkbox" value="truename1" <% If instr(rs("regcontrol"),"truename1")>0 Then %>checked<% End If %>></td>
    <td align="center" class="TableRow1"><input name="checkbox" type="checkbox" value="truename2" <% If instr(rs("regcontrol"),"truename2")>0 Then %>checked<% End If %>></td>
  </tr>
  <tr>
    <td align="right" class="TableRow2">QQ：</td>
    <td align="center" class="TableRow2"><input name="checkbox" type="checkbox" value="qq1" <% If instr(rs("regcontrol"),"qq1")>0 Then %>checked<% End If %>></td>
    <td align="center" class="TableRow2"><input name="checkbox" type="checkbox" value="qq2" <% If instr(rs("regcontrol"),"qq2")>0 Then %>checked<% End If %>></td>
  </tr>
  <tr>
    <td align="right" class="TableRow1">MSN：</td>
    <td align="center" class="TableRow1"><input name="checkbox" type="checkbox" value="msn1" <% If instr(rs("regcontrol"),"msn1")>0 Then %>checked<% End If %>></td>
    <td align="center" class="TableRow1"><input name="checkbox" type="checkbox" value="msn2" <% If instr(rs("regcontrol"),"msn2")>0 Then %>checked<% End If %>></td>
  </tr>
  <tr>
    <td align="right" class="TableRow2">电话：</td>
    <td align="center" class="TableRow2"><input name="checkbox" type="checkbox" value="tel1" <% If instr(rs("regcontrol"),"tel1")>0 Then %>checked<% End If %>></td>
    <td align="center" class="TableRow2"><input name="checkbox" type="checkbox" value="tel2" <% If instr(rs("regcontrol"),"tel2")>0 Then %>checked<% End If %>></td>
  </tr>
  <tr>
    <td align="right" class="TableRow1">简介：</td>
    <td align="center" class="TableRow1"><input name="checkbox" type="checkbox" value="info1" <% If instr(rs("regcontrol"),"info1")>0 Then %>checked<% End If %>></td>
    <td align="center" class="TableRow1"><input name="checkbox" type="checkbox" value="info2" <% If instr(rs("regcontrol"),"info2")>0 Then %>checked<% End If %>></td>
  </tr>
  <tr>
    <td colspan="3" align="center" class="TableRow2"><input type="submit" name="button" id="button" value="确认修改"></td>
  </tr>
  </form>
</table>
<%
set rs=nothing
End Sub
%>
<br>
</body>
</html>
