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

📄 processlogin.jsp

📁 07年做得人力资源管理系统
💻 JSP
字号:
<%@ page language="java" import="com.buat.hr.users.User,com.buat.hr.users.UserDao,java.util.ArrayList" pageEncoding="GB18030"%>
<%
	UserDao udao=new UserDao();
	User  user=null;
	String username=null;
	String pw=null;

	username=request.getParameter("username");
	pw=request.getParameter("pw");

    if(username.length() == 0 && pw.length() == 0){
 %>
           <SCRIPT LANGUAGE="JavaScript">
			   window.alert("用户名和密码都不能为空!") 
			   window.location.href("Login.jsp");    
           </script>
<%  
    }       
    if(username.length() == 0){
 %>
       <SCRIPT LANGUAGE="JavaScript">
			window.alert("用户名不能为空!") 
			window.location.href("Login.jsp");    
       </script>
<% 
    }
    if(pw.length() == 0){
 %>
           <SCRIPT LANGUAGE="JavaScript">
			   window.alert("密码不能为空!") 
			   window.location.href("Login.jsp");    
           </script>
<% 
    }
	user=new User(username,pw);
%>


<html>
  <head>
    <title></title>
  </head>
  
  <body background="../bg.jpg">
  	<center>
		<%
				user=udao.queryUser(username,user);
			//	System.out.println(user.getIsadmin());
				if(user.getMassage().equals("登录成功!!!")){
					session.setAttribute("userGrade",user);
		%>	
					<script type="text/javascript">
						window.alert("<%=user.getMassage()%>");
						window.location.href("../frame/Frame.jsp");
		    		</script>	
		<%	
				}else{
		%>
					<script type="text/javascript">
						window.alert("<%=user.getMassage()%>");
						window.location.href("Login.jsp");
		    		</script>	
		<%
				}
		%>

   	</center>	
  </body>
</html>

⌨️ 快捷键说明

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