⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 admin_user_modify.asp

📁 商业网站/图片管理系统/投票系统/新闻管理系统/
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<% Option Explicit %>
<%
if request.cookies("admin_OK")="" then
	response.redirect("admin_login.html")
end if
%>
<% dim db
db=0
%>
<!--用户管理-修改用户资料-->
<!--#include file="../config/db.asp"-->
<!--#include file="../config/function.inc.asp"-->
<!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">
<!--
.STYLE1 {color: #FF0000}
-->
</style>
</head>

<body>
<%
dim rst,sql,myErrors
set rst=server.createobject("adodb.recordset")
'修改密码
if request.querystring("act")="update" then
   if isnumeric(request.querystring("id")) and not isempty(request.querystring("id")) then
      if request.form("f_password")="" then
	     msgboxU("密码不能为空")
	  else
	     sql="update shop_user set u_password='"&request.form("f_password")&"',u_realname='"&request.form("f_realname")&"',u_sex='"&request.form("f_sex")&"',u_tel='"&request.form("f_tel")&"',u_email='"&request.form("f_email")&"' where u_id="&request.querystring("id")
		 conn.execute sql
		 set myErrors=conn.errors
		 if myErrors.count=0 then
		    msgboxU("修改成功!")
		 else
		    msgboxU("修改失败!原因:"&myErrors.item(0).description)
		 end if
	  end if
   else
      msgboxU("错误参数")
   end if
end if


'查找密码
if request.querystring("act")="modify" then
   if isnumeric(request.querystring("id")) and request.querystring("id")<>0 then
	  sql="select * from shop_user where u_id="&request.querystring("id")
	  rst.open sql,conn,1,1
	  if rst.eof and rst.bof then
	     msgboxU("未找到用户,可能是参数有误")
	  else
%>	  
<form id="form" name="form" method="post" action="admin_user_modify.asp?act=update&id=<%=request.querystring("id")%>">
  <table width="521" height="294" border="1" cellpadding="0" cellspacing="0">
    <tr>
      <td colspan="2">用户管理--&gt;修改用户资料</td>
    </tr>
    <tr>
      <td width="172">用户名:</td>
      <td width="343"><%=rst("u_name")%></td>
    </tr>
    <tr>
      <td>密&nbsp;&nbsp;码:</td>
      <td><input name="f_password" type="text" id="f_password" value="<%=rst("u_password")%>" />
      &nbsp;<span class="STYLE1">*</span>可以修改</td>
    </tr>
    <tr>
      <td>姓&nbsp;&nbsp;名:</td>
      <td><input name="f_realname" type="text" id="f_realname" value="<%=rst("u_realname")%>" />
      &nbsp;<span class="STYLE1">*</span>可以修改</td>
    </tr>
    <tr>
      <td>性&nbsp;&nbsp;别:</td>
      <td>男
        <input name="f_sex" type="radio" value="男" checked="checked" />
        <input type="radio" name="f_sex" value="女" <% if rst("u_sex")="女" then response.write "checked"%> />
        &nbsp;<span class="STYLE1">*</span>可以修改</td>
    </tr>
    <tr>
      <td>电 &nbsp;话:</td>
      <td><input name="f_tel" type="text" id="f_tel" value="<%=rst("u_tel")%>" />
      &nbsp;<span class="STYLE1">*</span>可以修改</td>
    </tr>
    <tr>
      <td>E-mail:</td>
      <td><input name="f_email" type="text" id="f_email" value="<%=rst("u_email")%>" />
      &nbsp;<span class="STYLE1">*</span>可以修改</td>
    </tr>
    <tr>
      <td>密码提示:</td>
      <td><%=rst("u_question")%></td>
    </tr>
    <tr>
      <td>密码答案:</td>
      <td><%=rst("u_answer")%></td>
    </tr>
    <tr>
      <td>加入时间:</td>
      <td><%=rst("u_adddate")%></td>
    </tr>
    <tr>
      <td colspan="2"><div align="center">
        <input type="submit" name="Submit" value="修改用户资料" />
        &nbsp;&nbsp;
        <input type="reset" name="Submit2" value="重置" />
      </div></td>
    </tr>
  </table>
</form>
<%
	  end if   
   else
      msgboxU("非法参数")
   end if
end if
rst.close
set rst=nothing
conn.close
set conn=nothing
%>
</body>
</html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -