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

📄 adduser.jsp

📁 jsp学习源码 jsp学习源码 jsp学习源码 jsp学习源码 jsp学习源码 jsp学习源码 jsp学习源码 jsp学习源码 jsp学习源码
💻 JSP
📖 第 1 页 / 共 2 页
字号:
<%@ page contentType="text/html; charset=GBK"%>
<%@ page language="java" import="java.util.*,popten.web.*,popten.util.*" %>
<%@ page errorPage="error.jsp" %>
<%Admin admin = new Admin();
Vector adminList = admin.adminAll();
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GBK">
<link rel="stylesheet" type="text/css" href="../style/style.css">
<title>添加管理员</title>
</head>

<body>
<%if(request.getParameter("act")!=null && request.getParameter("act").equals("add")){
Admin.chkLogin1(session);%>
<!--添加管理员开始-->
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" height="80%">
  <tr>
    <td width="100%" align="center">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="600" bgcolor="#f2f8ff">
      <tr>
        <td width="15" class="td4">
        <img border="0" src="../img/null.gif" width="2" height="2"></td>
        <td width="565" class="td5" align="center">
        <img border="0" src="../img/null.gif" width="2" height="2"><b>添加管理员</b></td>
        <td width="20" class="td6">
        <img border="0" src="../img/jiao3.gif" width="20" height="20"></td>
      </tr>
      <tr>
        <td width="100%" colspan="3" class="td7" align="center" height="200">
        <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%" bordercolor="#DEEEFF">
          <tr>
            <td width="19%" align="center">序号</td>
            <td width="27%" align="center">用户名</td>
            <td width="21%" align="center">级别</td>
            <td width="33%" align="center">注册时间</td>
          </tr>
           <%for(int i=1;i<adminList.size();i++){
	Admin adminall= (Admin)adminList.elementAt(i);
	%>
          <tr>
            <td width="19%" align="center"><%=adminall.getuser_id()%> </td>
            <td width="27%" align="center"><%=adminall.getname()%> </td>
            <td width="21%" align="center"><%if(adminall.getclas().equals("1")){out.print("网站管理员");}else if(adminall.getclas().equals("2")){out.print("目录管理员");}else if(adminall.getclas().equals("3")){out.print("资料管理员");}else{out.print("账号已冻结");}%> </td>
            <td width="33%" align="center"><font color=#808080><%=adminall.getdat()%></font> </td>
          </tr>
          <%}%>
        </table>
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%">
          <tr>
            <td width="100%" align="center"><br><form name="form1" method="post" action="adduserok.jsp">
                序号: <input type="int" name="user_id" size="20"><br><br>
              级别:<input type="radio" value="2" name="clas" class="button">目录管理员
              <input type="radio" name="clas" value="3" class="button">资料管理员<input type="radio" name="clas" value="0" checked class="button">锁定<br>
              <p><input type="hidden" value="提交" name="add">
              <input border="0" src="../img/button-ok.gif" name="Submit" type="image" class="button" width="64" height="21">&nbsp;
              <img src="../img/button-back.gif" name="Submit" class="button" onclick="javascript:history.go(-1)" width="64" height="21">
              </p>
            </form>
            </td>
          </tr>
        </table>
        </td>
      </tr>
      <tr>
        <td width="15">
        <img border="0" src="../img/jao5.gif" width="15" height="15"></td>
        <td width="565" class="td8">
        <img border="0" src="../img/null.gif" width="2" height="2"></td>
        <td width="20" class="td9">
        <img border="0" src="../img/null.gif" width="2" height="2"></td>
      </tr>
    </table>
    </td>
  </tr>
</table>
<!--添加管理员结束-->
<%}
else if(request.getParameter("act")!=null && request.getParameter("act").equals("edit")){
GetSession sess001 = new GetSession();
Admin user001 = sess001.getAdminSession(session); %>
<!--修改用户信息开始-->
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse"  width="100%"  height="80%">
  <tr>
    <td width="100%" align="center"><table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="560" bgcolor="#f2f8ff">
  <tr>
    <td width="15" class="td4">
    <img border="0" src="../img/null.gif" width="2" height="2"></td>
    <td width="525" class="td5" align="center">
    <img border="0" src="../img/null.gif" width="2" height="2"><b>修改注册信息</b></td>
    <td width="20" class="td6">
    <img border="0" src="../img/jiao3.gif" width="20" height="20"></td>
  </tr>
  <tr>
    <td width="100%"  colspan="3" class="td7" align="center"><br><form name="form1" method="post" action="adduserok.jsp">
          <table width="341" border="0" style="border-collapse: collapse" bordercolor="#111111" cellpadding="0" cellspacing="0">
            <tr>
              <td width="30" height="32">
              <img border="0" src="../img/user.gif" width="24" height="24"></td>
              <td width="97">用户名:</td>
              <td width="214"><%=user001.getname()%><input name="name" type="hidden" value="<%=user001.getname()%>"></td>
            </tr>
            <tr>
              <td width="30" height="32">
              <img border="0" src="../img/password.gif" width="24" height="24"></td>
              <td width="97">密 码: </td>
              <td width="214">
              <input name="password" type="password" id="password" size="20"></td>
            </tr>
            <tr>
              <td width="30" height="32">
              <img border="0" src="../img/password.gif" width="24" height="24"></td>
              <td width="97">确认密码: </td>
              <td width="214">
              <input name="repassword" type="password" id="repassword" size="20"></td>
            </tr>
            <tr>
              <td width="30" height="32">
              <img border="0" src="../img/sex.gif" width="24" height="24"></td>
              <td width="97">性 别:</td>
              <td width="214"><input name="sex" type="radio" value="帅哥" checked class="button" <%if(user001.getsex().equals("帅哥")){out.print("checked");}%>>
                帅哥 <input type="radio" name="sex" value="美女" class="button" <%if(user001.getsex().equals("美女")){out.print("checked");}%>>
                美女</td>
            </tr>
            <tr>
              <td width="30" height="32">
              <img border="0" src="../img/quesion.gif" width="24" height="24"></td>
              <td width="97">忘记密码问题:</td>
              <td width="214">
              <input name="question" type="text" id="question" size="30" value="<%=user001.getquestion()%>"></td>
            </tr>
            <tr>
              <td width="30" height="32">
              <img border="0" src="../img/answer.gif" width="24" height="24"></td>
              <td width="97">忘记密码答案: </td>
              <td width="214">
              <input name="answer" type="text" id="answer" size="30"></td>
            </tr>
            <tr>
              <td width="30" height="32">
              <img border="0" src="../img/email.gif" width="24" height="24"></td>
              <td width="97">email:</td>
              <td width="214">
              <input name="email" type="text" id="email" size="30" value="<%=user001.getemail()%>"></td>
            </tr>
            <tr>
              <td width="30" height="32">
              <img border="0" src="../img/qq.gif" width="24" height="24"></td>
              <td width="97">QQ:</td>
              <td width="214"><input name="qq" type="text" id="qq" size="30" value="<%=user001.getqq()%>"></td>
            </tr>
            <tr>
              <td width="30" height="32">
              <img border="0" src="../img/phone.gif" width="24" height="24"></td>
              <td width="97">电 话:</td>
              <td width="214"><p>
                  <input name="phone" type="text" id="phone" size="30" value="<%=user001.getphone()%>">
                  <br>
                </p></td>
            </tr>
          </table>
          <p>
            <input type="hidden" name="edit" value="提交">
            <input border="0" src="../img/button-ok.gif" name="Submit" type="image" class="button" width="64" height="21">&nbsp;
              <img src="../img/button-back.gif" name="Submit" class="button" onclick="javascript:history.go(-1)" width="64" height="21">
			<br>
 			</p>
          </form>
</td></tr>
  <tr>
    <td width="15">
    <img border="0" src="../img/jao5.gif" width="15" height="15"></td>
    <td width="525" class="td8">
    <img border="0" src="../img/null.gif" width="2" height="2"></td>
    <td width="20" class="td9">
    <img border="0" src="../img/null.gif" width="2" height="2"></td>
  </tr>
</table></td>
  </tr>
</table>
<!--修改用户信息结束-->
<%}
else if(request.getParameter("act")!=null && request.getParameter("act").equals("del")){
Admin.chkLogin1(session); %>
<!--删除管理员开始-->
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="100%" height="80%">
  <tr>
    <td width="100%" align="center">
    <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="600" bgcolor="#f2f8ff">
      <tr>
        <td width="15" class="td4">
        <img border="0" src="../img/null.gif" width="2" height="2"></td>
        <td width="565" class="td5" align="center">
        <img border="0" src="../img/null.gif" width="2" height="2"><b>添加管理员</b></td>
        <td width="20" class="td6">
        <img border="0" src="../img/jiao3.gif" width="20" height="20"></td>
      </tr>
      <tr>
        <td width="100%" colspan="3" class="td7" align="center" height="200">
        <table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%" bordercolor="#DEEEFF">
          <tr>
            <td width="19%" align="center">序号</td>
            <td width="27%" align="center">用户名</td>
            <td width="21%" align="center">级别</td>
            <td width="33%" align="center">注册时间</td>
          </tr>
           <%for(int i=1;i<adminList.size();i++){
	Admin adminall= (Admin)adminList.elementAt(i);
	%>
          <tr>
            <td width="19%" align="center"><%=adminall.getuser_id()%> </td>
            <td width="27%" align="center"><%=adminall.getname()%> </td>
            <td width="21%" align="center"><%if(adminall.getclas().equals("1")){out.print("网站管理员");}else if(adminall.getclas().equals("2")){out.print("目录管理员");}else if(adminall.getclas().equals("3")){out.print("资料管理员");}else{out.print("账号已冻结");}%> </td>
            <td width="33%" align="center"><font color=#808080><%=adminall.getdat()%></font> </td>
          </tr>
          <%}%>
        </table>
        <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" width="98%">
          <tr>
            <td width="100%" align="center"><br><form name="form1" method="post" action="adduserok.jsp">
                序号: <input type="int" name="user_id" size="20"><br><br>
                <input type="hidden" value="提交" name="del">
              <input border="0" src="../img/button-ok.gif" name="Submit" type="image" class="button" width="64" height="21">&nbsp;
              <img src="../img/button-back.gif" name="Submit" class="button" onclick="javascript:history.go(-1)" width="64" height="21">

⌨️ 快捷键说明

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