<!--#include virtual="/inc/conn.asp"-->
<!--#include virtual="/inc/md52.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<%
if trim(SafeRequestform("act"))="setpass" then

uid=trim(SafeRequestform("uid"))
upass=trim(SafeRequestform("upass"))
ayadminpass=trim(SafeRequestform("ayadminpass"))
ayadminpass2=trim(SafeRequestform("ayadminpass2"))

if uid="" or upass="" or ayadminpass="" or ayadminpass2="" then PopErr("请填写完整")
if ayadminpass<>ayadminpass2 then PopErr("两次独立密码输入不一致")

sql="select ayusername,aypassword,ayjibie,mdulipa,aymasterid from ayname where ayusername='"&uid&"' and aypassword='"&md5(upass)&"'" 
rs.open sql,conn,1,3
if rs.bof and rs.eof then PopErr("账号或密码输入有误")
if cint(rs("ayjibie"))<>9 then PopErr("权限不足1-1")
if cint(rs("aymasterid"))=9 then PopErr("权限不足1-2")

if trim(rs("mdulipa"))<>"" and isnull(trim(rs("mdulipa")))=false then
call PopErr2("独立密码已设置，如需修改请联系管理员","logadminpass.asp")
end if
rs("mdulipa")=md5(ayadminpass)
rs.update
rs.close
call PopErr2("独立密码设置成功","logadminpass.asp")

end if
%>


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>设置独立密码</title>
<style type="text/css">
<!--
body,td,th {
	font-size: 13px;
}
-->
</style></head>

<body>
<br><br><br><br><br><br><br><br><br><br><br>
<form name="form1" method="post" action="">
  <table width="546" height="309" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td background="<%=ossurl%>Template/Template4/images/masterbj.jpg"><table width="434" height="157" border="0" align="center">
        <tr>
          <td width="91" height="25" align="center">&nbsp;</td>
          <td width="98" align="center"><span class="STYLE1">用户名</span></td>
          <td align="left"><input name="uid" type="text" id="uid" size="25" maxlength="20" /></td>
          </tr>
        <tr>
          <td height="25" align="center"></td>
          <td align="center"><span class="STYLE1">密 码</span></td>
          <td align="left"><input name="upass" type="password" id="upass" size="26" maxlength="20" /></td>
          </tr>
        <tr>
          <td height="25" align="center"></td>
          <td align="center"><span class="STYLE1">独立密码</span></td>
          <td align="left"><input name="ayadminpass" type="password" id="ayadminpass" size="26" maxlength="20" />
              <input name="act" type="hidden" id="act" value="setpass" /></td>
          </tr>
        <tr>
          <td height="25" align="center"></td>
          <td align="center"><span class="STYLE1">确认独立密码</span></td>
          <td align="left"><input name="ayadminpass2" type="password" id="ayadminpass2" size="26" maxlength="20" /></td>
          </tr>
        <tr>
          <td height="25" align="center">&nbsp;</td>
          <td colspan="2" align="center"><input type="submit" name="Submit" value=" 设 置 独 立 密 码" /></td>
          </tr>
      </table></td>
    </tr>
  </table>
</form>
</body>
</html>
