<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
ElseIf Request("username")="" or RegExpTest("[^A-Za-z0-9]",Request("username")) Then
	ef=True
	ec="用户名没填或非法！"
elseIf session("canchnkefu")="" Then
	ef=True
	ec="您没有此操作的权限。"
end if
if not ef then
Set conn=Server.CreateObject("ADODB.Connection")
	conn.Open Application("FreeHostDBlink")

if Request("Submit")="更换" then


Sql="update FreeHost.FreeHost_USER set kefunow='"&Request("kefuto")&"',kefuto=null where username = '"&Request("username")&"'"
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
    conn.Execute Sql
Sql="update FreeHost.FreeHost_agent set kefunow='"&Request("kefuto")&"',kefuto=null where username = '"&Request("username")&"'"
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
    conn.Execute Sql
conn.Execute "update FreeHost.FreeHost_Product_Host set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_Email set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_SQL set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_Other set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_IDC set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_domain set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_VPS set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"


else
Sql="update FreeHost.FreeHost_USER set kefunow=kefuto,kefuto=null where username = '"&Request("username")&"'"
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
    conn.Execute Sql
Sql="update FreeHost.FreeHost_agent set kefunow=kefuto,kefuto=null where username = '"&Request("username")&"'"
		if Instr(1,sql, ";", 1)>0 or Instr(1,sql, "--", 1)>0 then
Response.Write "非法字符！"
Response.End
end if
    conn.Execute Sql
conn.Execute "update FreeHost.FreeHost_Product_Host set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_Email set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_SQL set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_Other set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_IDC set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"
conn.Execute "update FreeHost.FreeHost_Product_domain set kefu='"&Request("kefuto")&"' where username='"&Request("username")&"'"

end if
	
	%>
<!--#include virtual="/inc-freehost-function/htmlwrite.asp"--><%=htmlwrite("html8")%>
<%=htmlwrite("html9")%>
完成
<%=htmlwrite("html10")%>
<%end if

if ef then
Response.Redirect "e.asp?e="&ec
end if%>


