<%@page contentType="text/html; charset=GBK"%><%@include file="../../include/Admin.jsp"%><%@include file="../../include/DBCon.jsp"%><%if(!StrFormat.isNull(request.getParameter("act")) && !StrFormat.isNull(StrTrans.toGBK(request.getParameter("oldpassw"))) && !StrFormat.isNull(StrTrans.toGBK(request.getParameter("passw")))){try{DBStmt = DBCon.createStatement();if(StrTrans.toGBK(request.getParameter("passw")).equals(StrTrans.toGBK(request.getParameter("passw2")))){DBSql = "select id from admin where passw='"+ MD5.getMD5ofStr(StrFormat.htmlTo(StrTrans.toGBK(request.getParameter("oldpassw").trim()))) +"' and id="+AdmID;DBRs = DBStmt.executeQuery(DBSql);if(DBRs.next()){DBSql = "update admin set passw='"+ MD5.getMD5ofStr(StrFormat.htmlTo(StrTrans.toGBK(request.getParameter("passw").trim()))) +"' where id="+AdmID;DBStmt.executeUpdate(DBSql);MesStr = "修改成功！";}else{MesStr = "原密码输入错误！";}}else{MesStr = "新密码两次输入不一致！";}}catch(Exception ie){MesStr = "修改失败！";if(isShowErr!=0){MesStr += "\\r\\nErrInfo:"+ie;}}finally{if(DBRs!=null)DBRs.close();if(DBStmt!=null)DBStmt.close();}out.print("<script language=\"javascript\" src=\"../../js/common.js\"></script><script language=\"javascript\">alert(\""+MesStr+"\");history.back(-2);</script>");}else{%><html><head><meta http-equiv="Content-Type" content="text/html; charset=GBK" /><meta name="keywords" content="向继根,Xiang Jigen,QQ,190582560"><meta name="description" content="Programmer:向继根 QQ:190582560 Email:190582560@qq.com"><meta name="author" content="向继根,Xiang Jigen" /><title><%=TitleStr%>修改密码</title><link rel="stylesheet" type="text/css" href="../images/Style.css"/><script type="text/javascript" src="../../js/min.js"></script><script type="text/javascript" src="../../js/common.js"></script><script type="text/javascript" src="../../js/css.js"></script><script type="text/javascript">function doCheck(){if(isNull($GenID('oldpassw').value)){alert('原密码不能为空！');		$GenID('oldpassw').focus();return false;}if(isNull($GenID('passw').value)){alert('新密码不能为空！');		$GenID('passw').focus();return false;}if($GenID('passw').value != $GenID('passw2').value){alert('新密码两次输入不一致！');		$GenID('passw2').focus();return false;}return true;}</script></head><body><form action="?act=do" method="post" name="form" id="form" onSubmit="return doCheck();"><table cellpadding="0" cellspacing="1" class="table_list"><caption>修改密码</caption><tr><th width="20%"><strong>昵 称</strong></th><td>&nbsp;<%=AdmName%></td></tr><tr><th><span class="red">*</span> <strong>原密码</strong></th><td>&nbsp;<input type="password" name="oldpassw" id="oldpassw" value="" size="20" /></td></tr><tr><th><span class="red">*</span> <strong>新密码</strong></th><td>&nbsp;<input type="password" name="passw" id="passw" value="" size="20" /></td></tr><tr><th><span class="red">*</span> <strong>重复新密码</strong></th><td>&nbsp;<input type="password" name="passw2" id="passw2" value="" size="20" /></td></tr></table><div id="button"><input type="submit" name="dosubmit" class="button_style" value="确 定" />&nbsp;<input type="reset" name="reset" class="button_style" value="清 除" />&nbsp;<input type="button" name="button" class="button_style" value="返 回" onClick="history.back();"></div></form></body></html><%}%><%@include file="../../include/DBConClose.jsp"%>