📄 index.jsp
字号:
<%@ page contentType="text/html;charset=GBK"%>
<%@ page language="java" import="hymn.web.*,java.util.Vector"%>
<%@ page errorPage="../error.jsp" %>
<%
String str=request.getParameter("typeid");
Admin.chkLogin(session,str+"_manage");
Admin admin=new Admin();
Vector userlist = new Vector();
userlist = admin.loadalluser();
Admin userall= (Admin)userlist.elementAt(0);
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../images/style.css">
<title>无标题文档</title>
<SCRIPT language=javascript>
function Checkvalue(){
if(document.form2.mingcheng.value==""){
alert("用户名不可为空!");
document.form2.mingcheng.focus();
return false;
}
if(document.form2.mima.value==""){
alert("密码不可为空!");
document.form2.mima.focus();
return false;
}
return true;
}
</SCRIPT>
<script language=javascript>
function openwin(url){
window.open(url,"","toolbar=0,location=0,status=0,menubar=0,resizable=0,scrollbars=1,top=100,left=100");
}
</script>
</head>
<body>
<hr color="#006600">
<FONT SIZE="" COLOR="#6600FF">用户管理</FONT>
<form name="form2" method="post" action="add.jsp" onsubmit="return Checkvalue()">
<table width="80%" border="0" align="center" class="td6">
<tr>
<td>用户名:
<input name="mingcheng" type="text"></td>
<td>密码:
<input name="mima" type="text" id="mima"></td>
<td> </td>
</tr>
<tr>
<td class="td8">真实姓名:
<input name="xingming" type="text" id="xingming">
</td>
<td class="td8">类型:
<input name="leixing" type="radio" value="0" checked>
普通用户
<input type="radio" name="leixing" value="1">
超级用户</td>
<td width="19%" class="td8">
<INPUT TYPE="hidden" name="fcode">
<input type="submit" name="Submit" value="增加用户"></td>
</tr>
</table>
</form>
<table width="80%" border="1" align="center" cellpadding="0" cellspacing="0" class="td6">
<tr>
<td align=center bgcolor=#6699cc>用户名</td>
<td align=center bgcolor=#6699cc>密码</td>
<td align=center bgcolor=#6699cc>真实姓名</td>
<td align=center bgcolor=#6699cc>操作权限</td>
<td align=center bgcolor=#6699cc>用户类型</td>
<td align=center bgcolor=#6699cc>更改</td>
</tr>
<%
for(int i=0;i<userlist.size();i++){
userall=(Admin)userlist.elementAt(i);
%>
<form name=form3 action="edit.jsp" method="post">
<tr>
<td align=center><input type="text" name="username" value="<%=userall.getName()%>"></td>
<td align=center><input type="text" name="userpassword" value="<%=userall.getPwd()%>"></td>
<td align=center><input type="text" name="realname" value="<%=userall.getRealname()%>"></td>
<td align=center><a href=javascript:openwin('editpower.jsp?id=<%=userall.getId()%>')>权限管理</a></td>
<td align=center><%=userall.getUsertype()%></td>
<td align=center><INPUT TYPE="hidden" name="id" value="<%=userall.getId()%>"><INPUT TYPE="submit" value="更改"></td>
</tr>
</form>
<%
}
%>
</table>
<BR><BR>
注意:如果用户名为空,更改将删除该用户。
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -