<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf session("cansetagn")="" Then
	ef=True
	ec="您没有此操作的权限。"
elseIf Request.Form ("username")="" or RegExpTest("[^A-Za-z0-9]",Request.Form ("username")) Then
	ef=True
	ec="会员名没有写/或会员名中有非法字符！"
ElseIf Request.Form ("cannextagn")<>"y" and Request.Form ("cannextagn")<>"n" Then
	ef=True
	ec="必须选择允许与否！"
end if
if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")
	Set ds = Server.CreateObject("ADODB.Recordset")	
		Sql="Select * from FreeHost.FreeHost_Agent where username='"&Request.Form ("username")&"'"
if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
		ds.Open Sql,conn,1,3
if ds.eof then
	ef=True
	ec="代理会员不存在！"
end if
end if


if not ef then
ds("cannextagn")=Request.Form ("cannextagn")
ds.update
ds.close
set ds=nothing
conn.Close 
set conn=nothing
%>
<br>
<br>

修改成功！

<%
end if
if ef then%>
<%=ec%>
<%end if%>
<script>
var partable=parent.document.getElementById("table0");
if (partable!=null)
partable.style.display='';

partable=parent.document.getElementById("outconM");
if (partable!=null)
partable.innerHTML = document.body.innerHTML;
</script>