1 2 3 4

12.7

员工培训系统

员工相关功能界面

员工主页代码

<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>员工系统</title>
</head>
<body>
<%
        String stuID=(String)request.getSession().getAttribute("ID");
        session.setAttribute("stuID", stuID);
        request.setAttribute("stuID", stuID);
        System.out.println(stuID);     
                  %>
<div id="addSubjectForm" align="center">
                <form action="SubjectAddServlet" method="post">
                <tr>
                <h1>员工系统</h1> 
                <ul>
                <li><a href="Stuservlet?method=show">查看个人信息 </a></li>
                <li><a href="Stuservlet?method=showupdate">修改个人信息 </a></li>
                <li><a href="Stuservlet?method=showgrade">查询个人成绩 </a></li>
                <li><a href="index.jsp">退出登录 </a></li>
                </ul>
                </form>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="dao.*"  %>
    <%@page import= "java.util.*" %>
    <%@page import="entity.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div id="stushowclass" align="center"><!--显示试题-->            
                      <%
                      List<Staff> list=(List<Staff>)request.getAttribute("list");    
                      if(list==null||list.size()<1){
                          response.setHeader("refresh","5;URL=manage.jsp");
                      %>
                      <font color="red" size="5"> 查询信息时出现错误,未能读出个人的信息<br> 五秒后将跳转到主页面 <br>
                如果没有跳转,请点击 <a href="manage.jsp">这里</a>!!! <br>
            </font>
                      <% }
                      else{%>
                          <table border="0" cellspacing="10" cellpadding="0">
                        <tr>
                        <td align="center" colspan="5">
                        <h1>个人信息</h1>
                        </td>
                        </tr>
                        <tr align="center">
                                <td><b>工号</b></td>
                                <td><b>姓名</b></td>
                                <td><b>性别</b></td>
                                <td><b>部门</b></td>
                                <td><b>职称</b></td>
                            </tr>
                       <%
                          for(Staff school:list){
                          
                  %>
                          <tr align="center">
                          
                          <td><%=school.getStuID() %></td>
                          <td><%=school.getStuname() %></td>
                          <td><%=school.getStusex()%></td>
                          
                          
                          
                          <td><%=school.getStuclass() %></td>
                          <td><%=school.getStutitle() %></td>
                  </tr>
                  
                  <%}
                      
                  %>
                 <tr align="center">
                  <font color="red" size="5"> <br>  <br>

                请点击 <a href="manage.jsp">这里回到主页面</a>!!! <br>

            </font>
                  </tr>
                 <%} %>


</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="dao.*"  %>
    <%@page import= "java.util.*" %>
    <%@page import="entity.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>学生信息</title>
</head>
<body>
<div id="stushowclass" align="center"><!--显示试题-->            
                      <%
                      List<Staff> list=(List<Staff>)request.getAttribute("list");    
                      if(list==null||list.size()<1){
                          response.setHeader("refresh",
                                "5;URL=student.jsp");
                      %>
                      <font color="red" size="5"> 查询信息时出现错误,未能读出个人的信息<br> 五秒后将跳转到主页面 <br>
                如果没有跳转,请点击 <a href="student.jsp">这里</a>!!! <br>
            </font>
                      <% }
                      else{%>
                          <table border="0" cellspacing="10" cellpadding="0">
                        <tr>
                        <td align="center" colspan="5">
                        <h1>个人信息</h1>
                        </td>
                        </tr>
                        <tr align="center">
                                <td><b>工号</b></td>
                                <td><b>姓名</b></td>
                                <td><b>性别</b></td>
                                <td><b>部门</b></td>
                                <td><b>职称</b></td>
                            </tr>
                       <%
                          for(Staff school:list){
                          
                  %>
                          <tr align="center">
                          
                          <td><%=school.getStuID() %></td>
                          <td><%=school.getStuname() %></td>
                          <td><%=school.getStusex()%></td>
                          
                          
                          
                          <td><%=school.getStuclass() %></td>
                          <td><%=school.getStutitle() %></td>
                  </tr>
                  
                  <%}
                      
                  %>
                 <tr align="center">
                  <font color="red" size="5"> <br>  <br>

                请点击 <a href="student.jsp">这里回到主页面</a>!!! <br>

            </font>
                  </tr>
                 <%} %>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="dao.*"  %>
    <%@page import= "java.util.*" %>
    <%@page import="entity.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div id="stushowclass" align="center"><!--显示试题-->            
                      <%
                      List<Staff> list=(List<Staff>)request.getAttribute("list");    
                      if(list==null||list.size()<1){
                          response.setHeader("refresh",
                                "5;URL=student.jsp");
                      %>
                      <font color="red" size="5"> 查询信息时出现错误,未能读出成绩的信息<br> 五秒后将跳转到主页面 <br>
                如果没有跳转,请点击 <a href="student.jsp">这里</a>!!! <br>
            </font>
                      <% }
                      else{%>
                          <table border="0" cellspacing="10" cellpadding="0">
                        <tr>
                        <td align="center" colspan="5">
                        <h1>个人信息</h1>
                        </td>
                        </tr>
                        <tr align="center">
                                <td><b>工号</b></td>
                                <td><b>姓名</b></td>
                                <td><b>科目</b></td>
                                <td><b>成绩</b></td>
                                
                            </tr>
                       <%
                          for(Staff school:list){
                          
                  %>
                          <tr align="center">
                          
                          <td><%=school.getStuID() %></td>
                          <td><%=school.getStuname() %></td>
                          <td><%=school.getCourse() %></td>
                          <td><%=school.getGrade() %></td>
                  </tr>
                  
                  <%}
                      
                  %>
                 <tr align="center">
                  <font color="red" size="5"> <br>  <br>

                请点击 <a href="student.jsp">这里回到主页面</a>!!! <br>

            </font>
                  </tr>
                 <%} %>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="dao.*"  %>
    <%@page import= "java.util.*" %>
    <%@page import="entity.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<%
        String stuID=(String)request.getSession().getAttribute("ID");
        System.out.println(stuID);     
                  %>
<div id="stushowclass" align="center"><!--显示试题-->            
                      <%
                      List<Staff> list=(List<Staff>)request.getAttribute("list");    
                      if(list==null||list.size()<1){
                          response.setHeader("refresh",
                                "5;URL=student.jsp");
                      %>
                      <font color="red" size="5"> 查询信息时出现错误,未能读出个人的信息<br> 五秒后将跳转到主页面 <br>
                如果没有跳转,请点击 <a href="student.jsp">这里</a>!!! <br>
            </font>
                      <% }
                      else{%>
                          <table border="0" cellspacing="10" cellpadding="0">
                        <tr>
                        <td align="center" colspan="5">
                        <h1>个人信息</h1>
                        </td>
                        </tr>
                        <tr align="center">
                                <td><b>工号</b></td>
                                <td><b>姓名</b></td>
                                <td><b>性别</b></td>
                                <td><b>部门</b></td>
                                <td><b>职称</b></td>
                            </tr>
                       <%
                          for(Staff school:list){                        
                  %>
                          <tr align="center">                       
                          <td><%=school.getStuID() %></td>
                          <td><%=school.getStuname() %></td>
                          <td><%=school.getStusex()%></td>
                          <td><%=school.getStuclass() %></td>
                          <td><%=school.getStutitle() %></td>
                  </tr>
                  
                  <%}
                      
                  %>
                 <tr align="center">
                  <font color="red" size="5"> <br>  <br>

                请点击 <a href="student.jsp">这里回到主页面</a>!!! <br>

            </font>
                  </tr>
                 
<form action="Stuservlet?method=update" method="post">
<tr>
<td>输入修改后的信息:</td>
</tr>
  
    <tr>
    <td>工号:</td>
    <td> 
     <%=stuID %>(八位工号,不允许修改)  
     </td> 
    </tr>
<tr>
    <td>姓名:</td>
    <td>
    <input type="text" name="stuname">
    
    </td>
</tr>



<tr>
    <td>性别:</td>
    <td>
     <input type="radio" name="stusex" value=""><input type="radio" name="stusex" value="" checked></td>
</tr>

<tr>
    <td>部门:</td>
    <td>
    <input type="text" name="stuclass">
    </td>
</tr>

<tr>
    <td>职称:</td>
    <td>
     <input type="text" name="stutitle">
    </td>
</tr>

<tr>
                      <td colspan="2"><div align="center">
                        <input type="submit" value="修改信息"> </tr>
                  </form>
                 <%} %>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="dao.*"  %>
    <%@page import= "java.util.*" %>
    <%@page import="entity.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div id="stushowclass" align="center"><!--显示试题-->            
                      <%
                      List<Staff> list=(List<Staff>)request.getAttribute("list");    
                      if(list==null||list.size()<1){
                          response.setHeader("refresh","5;URL=manage.jsp");
                      %>
                      <font color="red" size="5"> 查询信息时出现错误,未能读出个人的信息<br> 五秒后将跳转到主页面 <br>
                如果没有跳转,请点击 <a href="manage.jsp">这里</a>!!! <br>
            </font>
                      <% }
                      else{%>
                          <table border="0" cellspacing="10" cellpadding="0">
                        <tr>
                        <td align="center" colspan="5">
                        <h1>个人信息(点击工号进行修改该用户信息)</h1>
                        </td>
                        </tr>
                        <tr align="center">
                                <td><b>工号</b></td>
                                <td><b>姓名</b></td>
                                <td><b>性别</b></td>
                                <td><b>部门</b></td>
                                <td><b>职称</b></td>
                            </tr>
                       <%
                          for(Staff school:list){
                          
                  %>
                          <tr align="center">
                          
                          <td><a href="Manservlet?method=updateshowshowstu&ID=<%=school.getStuID()%>"><%=school.getStuID() %></td>
                          <td><%=school.getStuname() %></td>
                          <td><%=school.getStusex()%></td>
                        <td><%=school.getStuclass() %></td>
                          <td><%=school.getStutitle() %></td>
                  </tr>
                  
                  <%}
                      
                  %>
                 <tr align="center">
                  <font color="red" size="5"> <br>  <br>

                请点击 <a href="manage.jsp">这里回到主页面</a>!!! <br>

            </font>
                  </tr>
                 <%} %>
</body>
</html>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@page import="dao.*"  %>
    <%@page import= "java.util.*" %>
    <%@page import="entity.*" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
<div id="stushowclass" align="center"><!--显示试题-->            
                      <%
                      List<Staff> list=(List<Staff>)request.getAttribute("list");    
                      String ID=null;
                      if(list==null||list.size()<1){
                          response.setHeader("refresh","5;URL=manage.jsp");
                      %>
                      <font color="red" size="5"> 查询信息时出现错误,未能读出个人的信息<br> 五秒后将跳转到主页面 <br>
                如果没有跳转,请点击 <a href="manage.jsp">这里</a>!!! <br>
            </font>
                      <% }
                      else{%>
                          <table border="0" cellspacing="10" cellpadding="0">
                        <tr>
                        <td align="center" colspan="5">
                        <h1>个人信息(点击工号进行修改该用户信息)</h1>
                        </td>
                        </tr>
                        <tr align="center">
                                <td><b>工号</b></td>
                                <td><b>姓名</b></td>
                                <td><b>性别</b></td>
                                <td><b>部门</b></td>
                                <td><b>职称</b></td>
                            </tr>
                       <%
                          for(Staff school:list){
                          
                  %>
                          <tr align="center">
                          
                          <td><%=school.getStuID() %></td>
                          ID=school.getStuID();
                          session.setAttribute("ID", ID);//存储数据
                        request.setAttribute("ID", ID);
                          <td><%=school.getStuname() %></td>
                          <td><%=school.getStusex()%></td>
                        <td><%=school.getStuclass() %></td>
                          <td><%=school.getStutitle() %></td>
                  </tr>
                  
                  <%}
                      
                  %>
<form action="Manservlet?method=updatestu" method="post">
<tr>
<td>输入修改后的信息:</td>
</tr>                  
                  </tr>
                <tr>
                <td>工号:</td>
                <td> 
                 <%=ID %>
                 </td> 
                </tr>
                <tr>
                <td>姓名:</td>
                <td>
                <input type="text" name="name">
                </td>
                </tr>
            
                <tr>
                <td>性别:</td>
                <td>
                <input type="text" name="sex">
                </td>
                </tr>
            
                <tr>
                <td>部门:</td>
                <td>
                <input type="text" name="class1">
                </td>
                </tr>
                
                <tr>
                <td>职称:</td>
                <td>
                <input type="text" name="title">
                </td>
                </tr>
                
                
                
                
                <tr>
                      <td colspan="2"><div align="center">
                        <input type="submit" value="修改信息">    
                    </div>
                </td>
                  </tr>
                 <tr align="center">
                  <font color="red" size="5"> <br>  <br>

                请点击 <a href="manage.jsp">这里回到主页面</a>!!! <br>

            </font>
                  </tr>
                 <%} %>
</body>
</html>

 

posted @ 2020-12-07 22:37  小陈的太阳  阅读(112)  评论(0编辑  收藏  举报