<!--#include file="../../../inc/cms_admin.asp" -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link href="<%=sitepath%>css/bootstrap.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/font-awesome.min.css" rel="stylesheet">
<link href="<%=sitepath%>plugins/bootstrap-table/bootstrap-table.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/animate.min.css" rel="stylesheet">
<link href="<%=sitepath%>css/style.min.css" rel="stylesheet">
<script src="<%=sitepath%>js/jquery.min.js"></script>
<script src="<%=sitepath%>plugins/layer/layer.min.js"></script> 
<!--[if lte IE 9]>
<script src="<%=sitepath%>js/respond.min.js"></script>
<script src="<%=sitepath%>js/html5.js"></script>
<![endif]-->
</head>
<%
dim act : act=getForm("act","get")
if act="savepass" then
dim oldpass : oldpass=getForm("oldpass","post")
dim newpass : newpass=getForm("newpass","post")
dim renewpass : renewpass=getForm("renewpass","post")	:	if renewpass<>newpass then  layererr "新密码与确认密码不相符","-1"
	if newpass=renewpass then 
		if md5(oldpass,16)=dbsqlone("select Password from [dbpre]user where uid="&getsession("adminId")) then
			dbsql "update [dbpre]user set [Password]='"&md5(newpass,16)&"' where uid="&getsession("adminId")&""			
			layermsg "密码修改完成"
		else
			layererr "原密码不正确","-1"
		end if
	else
	layererr "密码不相符","-1"
	end if
end if
%>
<body>
<div class="float-e-margins">
  <div class="ibox-content">
    <form class="form-horizontal m-t" method="post" action="?act=savepass">
      <div class="form-group">
        <label class="col-xs-3 control-label">原密码</label>
        <div class="col-xs-8">
          <input type="password" name="oldpass" id="oldpassword" value="" required class="form-control" >
        </div>
      </div>
      <div class="form-group">
        <label class="col-xs-3 control-label">新密码</label>
        <div class="col-xs-8">
          <input type="password" name="newpass" id="newpassword" value="" required class="form-control" >
        </div>
      </div>
      <div class="form-group">
        <label class="col-xs-3 control-label">确认密码</label>
        <div class="col-xs-8">
          <input type="password" name="renewpass" id="renewpassword" value="" required class="form-control">
        </div>
      </div>
      <div class="form-group">
        <div class="col-sm-4 col-sm-offset-3">
          <button class="btn btn-primary" type="submit"><i class="fa fa-floppy-o"></i> 保存修改</button>
           <button onClick="closelayer()" class="btn btn-primary1" type="button"><i class="fa fa-reply"></i> 关闭</button>
        </div>
      </div>
    </form>
  </div>
</div>
</body>
<script src="<%=sitepath%>js/bootstrap.min.js"></script>
<script src="<%=sitepath&adminPath%>js/adminjs.js"></script>
</html>
