<%@ Language=VBScript %>
<!--#include virtual="/inc-freehost-function/FreeHostFunction.asp"-->
<!--#include virtual="/inc-freehost-function/FreeHostFunctionMain.asp"-->
<%
If session("admau")="" Then
	ef=True
	ec="授权非法，有可能是超时造成的。"
elseIf Request.Form ("username")="" or RegExpTest("[^A-Za-z0-9]",Request.Form ("username")) Then
	ef=True
	ec="用户名没填或非法！"
ElseIf Request.Form ("password")="" Then
	ef=True
	ec="密码没填！"
ElseIf Instr(1, Request.Form("username"), "'", 1)>0 then
	ef=True
	ec="非法用户名！"
ElseIf Request.Form ("password")<>""  and len(Request.Form ("password"))<6 Then
	ef=True
	ec="密码没填/或密码过于简单(不能小于6位数)！"
elseIf session("canuserpass")="" 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_USER 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

if not ef then
ds("password")=md5(request.Form ("password"))
ds.Update

ds.Close
set ds=nothing
conn.Close 
set conn=nothing%>
<%="操作成功：用户："&Request.Form ("username")&" 密码已成功更改。"%>
<%end if
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>