日期:2012-08-05  浏览次数:20898 次

如何通过 点击list控件中的某一列使它传递给 一个修改的对话框
QQ: 283989349 E-mail: mjf150080@tom.com 有问题时,
我们可以通过http://www.hustc.mpc.cn 这个论坛,
我的另一个blog http://blog.csdn.net/ma88fa/

<!--#include file="conn.asp"-->
<%
if session("admin")="" then
response.redirect "admin.asp"
else
if session("flag")>1 then
response.write "<br><p align=center>您没有操作的权限</p>"
response.end
end if
end if

dim rs, sql
%>
<html>
<head>
<title>用户管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="style.css" rel="stylesheet" type="text/css">
</head>
<%
Set rs=Server.CreateObject("Adodb.RecordSet")

sql="select * from admin where flag>="&Session("flag")&" order by id"

rs.Open sql,conn,1,1
%>
<body>
<center>
<p>修改管理员信息 | <a href=adduser.asp>增加管理员</a></p>

<table width="500" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<tr align="center" class="title">
<td width="120">用户名</td>
<td width="120">密码</td>
<td width="100">权限</td>
<td width="130">操作</td>
</tr>
</table>
<table width="600" height="15" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td></td>
</tr>
</table>
<%while not rs.EOF %>
<%if (rs("flag")>Session("flag")) or (rs("username")=Session("admin")) then%>

<table width="500" border="0" align="center" cellpadding="3" cellspacing="1" class="table">
<form method="post" action="saveuser.asp" style="margin:0">
<tr align="center">
<td width="120" height="30">
<input class="input" type="text" name="manager" value="<%=rs("username")%>" size="12"></td>
<td width="120" height="30">
<input class="input" type="password" name="newpin" value="<%=rs("password")%>" size="12"></td>
<td width="100" height="30">
<%if rs("flag")=1 then%>
超级用户
<%end if%>
<%if rs("flag")=2 then%>
普通用户
<%end if%>
<%if rs("flag")=3 then%>
员工
<%end if%></td>
<td width="130" height="30">
<input class="button" type="submit" name="Submit" value="修改">
<input class="button" type="submit" name="Submit" value="删除">
<input type="hidden" name="oldmanager" value="<%=rs("username")%>">
<input type="hidden" name="oldpin" value="<%=rs("password")%>"></td>
</tr></form>