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

📄 addadminstep2.jsp

📁 jsp开发的固定资产管理系统
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312" %>
<%@ include file="../incoming/Common.jsp"%>
<%@ include file="../Check.jsp"%>
<%
	String IsSucceed = "";	
%>
<%
try{	
	String username = new String(request.getParameter("username").getBytes("ISO8859_1"),"GBK");
	String password = new String(request.getParameter("password").getBytes("ISO8859_1"),"GBK");
	String effectivedate = new String(request.getParameter("effectivedate").getBytes("ISO8859_1"),"GBK");
	String expirydate = new String(request.getParameter("expirydate").getBytes("ISO8859_1"),"GBK");
	String groupname = new String(request.getParameter("groupname").getBytes("ISO8859_1"),"GBK");
	String fullname = new String(request.getParameter("fullname").getBytes("ISO8859_1"),"GBK");
	String deptname = new String(request.getParameter("deptname").getBytes("ISO8859_1"),"GBK");
	String username2 = (String)session.getValue("UserName");
	
	if(User.IsExist(username))
		{
			%>
			<script>
			alert("已存在该管理员.");
			window.history.back();
			</script>
	<%	} 
	else
		{
			IsSucceed = User.Add(username,password,effectivedate,expirydate,"Normal",fullname,deptname,groupname,username2);
		}
	}
	catch(Exception e){
		out.println("error:"+e.getMessage());
	}
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
<title><%=title%></title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen">
</head>
<body>
<%@ include file="UserHeader.jsp"%>
<table width="900" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr>
    <td width="120" valign="top" background="../images/in_left_bg.gif"><%@ include file="RootLeft.jsp"%></td>
    <td width="780" align="center" valign="top"><br><br><br><br>
   <a class="title2">
  <%
	if(IsSucceed.equals("1"))
		out.println("添加系统管理员成功!");
	else
	{
		out.println("添加系统管理员失败!");	
  %> 
              <br>
  <%		
		out.println("错误 : "+IsSucceed);	
	}	
  %>
      </a></p>	
	<form name="form2" method="post" action="RootMain.jsp">
      		<a class="title2"><input name="back" type="submit" id="back" value="返回" >
      		</a>	
    </form>
    </td>
  </tr>
</table>
<%@ include file="UserFooter.jsp"%>	
</body>
</html>

⌨️ 快捷键说明

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