www.gusucode.com > 云枫工作室企业网站源代码第五版 1.0 > docc/admin/mima.asp

    <%@LANGUAGE="VBSCRIPT"%>
<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<!--#include file="include.asp"-->
<%
	Dim MM_TableName           '表名
	Dim MM_DatabaseStr         '数据库各项
	Dim MM_FormStr             '表单各项
	Dim MM_SqlKey              '条件数据库项
	Dim MM_SqlValue            '条件值
	Dim MM_SqlQuery            '最终执行语句
	Dim MM_ReturnPath          '执行成功后返回的路径
	
	MM_TableName = "adminuser"
	MM_DatabaseStr  = "Password|value"
    MM_FormStr = "sqlpas|',none,''"
	MM_SqlKey = "sqlindex"
	MM_SqlValue = Request.Form("MM_recordId")
	MM_ReturnPath = "mima.asp"
	
	'以下是更新数据代码
	If (CStr(Request("MM_update")) <> "" And CStr(Request("MM_recordId")) <> "") Then
		MyPassword = Request.Form("password")
		MM_SqlQuery = GetUpdateSql(MM_TableName,MM_DatabaseStr,MM_FormStr,MM_SqlKey,MM_SqlValue)
		conn.Execute(MM_SqlQuery)
		response.write("<script language=javascript>alert('修改成功,请记住新密码!');</script>")
	end if
	
	'以下是查询数据代码
	MyID = session("lyj_admin")
	MM_SqlQuery = "select * from adminuser where sqlindex=" & MyID
	set Recordset1 = conn.Execute(MM_SqlQuery) 
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function check()
{
	if(form1.password.value == "")
	{
		alert("密码不能为空!");
		form1.password.focus();
		return(false);
	}
	if(form1.password.value != form1.password1.value)
	{
		alert("确认密码不符!");
		form1.password1.focus();
		return(false);
	}
}
</script>
</head>

<body bgcolor="#799AE1">
<table width="75%" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td height="41" colspan="3"><div align="center"><img src="images/quanxian.gif" width="154" height="33"></div></td>
  </tr>
  <tr> 
    <td width="9%" height="104" valign="top" bgcolor="#f5f5f5">&nbsp;</td>
    <td width="81%" valign="top" bgcolor="#f5f5f5" class="unnamed1"> <p><font color="#FF0000">您的登陆权限是:</font><br>
        用户名: <%=(Recordset1.Fields.Item("sqluser").Value)%></p>
      <form name="form1" method="POST" action="<%=MM_editAction%>" onsubmit="javascript:return check()">
        <p><font color="#FF0000">更改用户权限:</font><br>
          新的密码: 
          <input name="password" type="password" id="password" size="20">
          <br>
          <br>
          确认密码: 
          <input name="password1" type="password" id="password1" size="20">
        </p>
        <p align="left"> 
          <input type="submit" name="Submit" value="  确定  ">
          <input type="reset" name="Submit2" value="重置">
        </p>
        <input type="hidden" name="MM_update" value="form1">
        <input type="hidden" name="MM_recordId" value="<%= Recordset1.Fields.Item("sqlindex").Value %>">
      </form>
      <p>&nbsp;</p>
    </td>
    <td width="10%" valign="top" bgcolor="#f5f5f5">&nbsp;</td>
  </tr>
  <tr> 
    <td colspan="3" bgcolor="#f5f5f5">&nbsp;</td>
  </tr>
</table>
</body>
</html>
<%
	Recordset1.Close()
	Set Recordset1 = Nothing
%>