www.gusucode.com > ASP毕业设计在线考试管理系统源码 > ASP毕业设计在线考试管理系统源码\code\admin\user_admin.asp

    <!--#include file="db.asp"-->
<%
sql="select * from user_info"
set rs=server.createobject("adodb.recordset")
rs.open sql,conn,3,2
%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>在线考试系统</title>
<script language="javascript">
function submitit(myform)
{

}

function saveit(myform)
{
  if (confirm("是否保存所有修改?"))
  {
    myform.action="edit_user.asp";
    myform.submit();
  }
}

function delit(myform)
{
  if (confirm("将删除此题库下的所有数据?"))
  {
    myform.action="del_user.asp";
    myform.submit();
  }
}
</script>
<link href="../Style.css" rel="stylesheet" type="text/css">
</head>

<body>

<table border="0" cellspacing="0"  bordercolor="#111111" width="100%" height="25">
  <tr>
    <td width="100%">当前位置:在线考试系统 -&gt; 用户管理
      <hr></td>
  </tr>
</table>
<table width="200" height="10" border="0">
  <tr>
    <td>&nbsp;</td>
  </tr>
</table>
<table width="100%" height="20" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#5A8BCE" id="AutoNumber3" style="border-collapse: collapse">
  <form method="POST" action="save_user.asp">
    <tr>
      <td width="120" bgcolor="#FFFFFF">
      <p align="center">用户名</td>
      <td bgcolor="#FFFFFF">
      <p align="left">
      <input name="Username" type="text"  class="smallInput" id="Username" size="20">
      (密码默认为:1234)
      <input name="Power" type="checkbox" id="Power" value="A">
      是否管理员      </td>
      <td width="59" bgcolor="#FFFFFF">
      <p align="center">
      <input border="0" value="添 加" name="I1" type="submit" class="smallInput"></td>
    </tr>
  </form>
</table>
<p><br>
</p>
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" bgcolor="#5A8BCE" >
 <form name="subject1" method="get" onSubmit="return submitit(this)">
    <tr bgcolor="#E6F7FF">
      <td width="30" align="center" height="20"> </td>
      <td width="60" align="center"><b>用户ID</b></td>
      <td align="left" bgcolor="#E6F7FF">&nbsp;<b>用户名</b></td>
	  <td width="80" align="center"><b>是否管理员</b></td>
    </tr>
    <%
  i=1
  do while not rs.eof
  %>
    <tr>
      <td align="center" bgcolor="#E6F7FF">
        <input type="checkbox" name="id" value="<%=rs("userid")%>"></td>
      <td align="center" bgcolor="#FFFFFF"><%=rs("userid")%> </td>
      <td align="left" bgcolor="#FFFFFF">&nbsp;
      <input name="Username" type="text"  class="smallInput" id="Username" value="<%=rs("Username")%>" size="20"></td>
	  <%if rs("powerid")="A" then%>
	  <td align="center" bgcolor="#FFFFFF">管理员</td>
	  <%else%>
	  <td align="center" bgcolor="#FFFFFF"></td>
	  <%end if%>
    </tr>
    <%
  i=i+1
  rs.movenext
  loop
  %>
    <caption>
    <p align="right">
    <input type="submit" value="删除所选项" name="del" onClick="delit(subject1)" class="smallInput">
    &nbsp;<input type="submit" value="保 存" name="button" onClick="saveit(subject1)" class="smallInput">
    </p>
    </caption>
  </form>
</table>

</body>

</html>