📄 adduser.jsp
字号:
</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("look")){ %>
<!--查看管理员开始-->
<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="10%" align="center">序号</td>
<td width="27%" align="center">用户名</td>
<td width="21%" align="center">级别</td>
<td width="10%" align="center">资料数</td>
<td width="32%" align="center">注册时间</td>
</tr>
<%for(int i=0;i<adminList.size();i++){
Admin adminall= (Admin)adminList.elementAt(i);
%>
<tr onmouseover="this.bgColor='#deeeff';" onmouseout="this.bgColor='#f2f8ff';">
<td width="10%" align="center"><%=adminall.getuser_id()%> </td>
<td width="27%" align="center"><a href="adduser.jsp?act=view&i=<%=i%>"><%=adminall.getname()%></a> </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="10%" align="center"><%=adminall.getnews_coun()%></td>
<td width="32%" align="center"><font color=#808080><%=adminall.getdat()%></font> </td>
</tr>
<%}%>
</table><p><a href="right.jsp"><img src="../img/button-back.gif" name="Submit" class="button" width="64" height="21"></a></p>
</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("view")){
Admin adminall= (Admin)adminList.elementAt(Integer.parseInt(request.getParameter("i")));%>
<!--查看管理员详细信息开始-->
<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"><%=adminall.getname()%></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"><%=adminall.getsex()%></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"><%=adminall.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"><%=adminall.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"><%=adminall.getphone()%></td>
</tr>
</table>
<p><a href="right.jsp">
<img src="../img/button-back.gif" name="Submit" class="button" width="64" height="21"></a><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("forget1")){
%>
<!--忘记管理员密码1开始-->
<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="form" method="post" action="adduser.jsp">
<p>用户名:<input type="text" name="name" size="20"></p>
<p> <input type="hidden" value="forget2" name="act">
<input border="0" src="../img/button-ok.gif" name="Submit" type="image" class="button" width="64" height="21"> <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>
<!--忘记管理员密码1结束-->
<%}
else if(request.getParameter("act")!=null && request.getParameter("act").equals("forget2")){
Admin.forgetAdmin(request);
GetSession sess001 = new GetSession();
Admin user001 = sess001.getAdminSession(session);
String question=user001.getquestion();
String answer=user001.getanswer();
String name=user001.getname();
if(request.getParameter("Submit")!=null){
if(answer.equals(MD5.toMD5(request.getParameter("answer")))){
response.sendRedirect("main.jsp");
}
else throw new Exception("<li>你输入的答案不正确,请返回从新输入!");
}
else{
%>
<!--忘记管理员密码1开始-->
<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="form" method="post" action="adduser.jsp">
<p>忘记密码问题:<%=question%><br>
用户名:<input type="text" name="answer" size="20"></p>
<p> <input type="hidden" value="forget2" name="act"><input type="hidden" value="提交" name="Submit"><input type="hidden" name="name" value="<%=name%>">
<input border="0" src="../img/button-ok.gif" name="Submit" type="image" class="button" width="64" height="21"> <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>
<!--忘记管理员密码1结束-->
<%}}
else{throw new Exception();}%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -