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

📄 check.jsp

📁 用jsp和Oracle写的人事管理系统
💻 JSP
字号:
<%@ page contentType="text/html;charset=gb2312"%> 
<%@ include file="JSP/OPENDB.jsp"%>
<%! 
String replacenull(String a){ 
	if(a==null){
return "&nbsp;"; 
	}else{
return a; 
	}
} 
String selected(String a,String b){ 
	if(a.equals(b)){
return "selected"; 
	}else{
return ""; 
	}
} 
%> 
<%
String oabusyname = (String) session.getValue("oabusyname"); 
String oabusyusername = (String) session.getValue("oabusyusername"); 
String oabusyuserdept = (String) session.getValue("oabusyuserdept"); 
String oabusyuserlevel = (String) session.getValue("oabusyuserlevel"); 
if((oabusyusername==null)|(oabusyusername=="")){
response.sendRedirect("login.jsp"); 
}
//打开数据库,读出权限
String cook_allow_edit_all_checkinf;
String sql1="select allow_edit_all_checkinf from scott.userinf where username='"+oabusyusername+"'"; 
ResultSet rs=stmt.executeQuery(sql1); 
if(rs.next())
{
cook_allow_edit_all_checkinf=rs.getString("allow_edit_all_checkinf");
}else{
cook_allow_edit_all_checkinf="";
}

%>
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<meta name="ProgId" content="FrontPage.Editor.Document">
<link rel="stylesheet" href="css/css.css">
<script language="javascript1.2" src="js/openwin.js"></script>
<title>人事管理系统</title>
</head>
<body bgcolor="#eeeeee" topmargin="5" leftmargin="5">
 <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tr>
      <td height=68>
        <table border="0" cellpadding="0" cellspacing="0" width="100%" height="68">
          <tr>
           
<center>
<table>
<tr>
<td>
<b>考核管理</b>&nbsp;&nbsp;
</td>
<%String firstdept;
request.setCharacterEncoding("GB2312");
if(request.getParameter("userdept")!=null){
firstdept=request.getParameter("userdept");
          }else{
firstdept="技术部";
		  }
%>
<%String  adminvalue="yes";
{
%>

<form action="check.jsp" method=get name="form1">
<td>
<select name="userdept" size=1 onChange="document.form1.submit();">
<%
//打开数据库读出部门
String sql="select DISTINCT userdept from scott.userinf"; 
rs=stmt.executeQuery(sql); 
while(rs.next())
	{
%>
<option value="<%=rs.getString("userdept")%>" <%=selected(rs.getString("userdept"),firstdept)%>><%=rs.getString("userdept")%></option>
<%
}
%>
</select>
</td>
</form>

<form action="check.jsp" method=get name="form2">
<td>
<input type="hidden" name="userdept" value="<%=firstdept%>">
<select name="username" size=1>
<%String username;
if(request.getParameter("username")!=null){
username=request.getParameter("username");
          }else{
username="ss";
		  }
%>
<% sql="select name,username from scott.userinf where userdept='"+firstdept+"' and userlevel<>'总管' and forbid='no'"; 
 rs=stmt.executeQuery(sql); 

while(rs.next()){
%>
<option value="<%=rs.getString("username")%>"><%=rs.getString("name")%></option>
<%
	}

%>
</select>

</tr>
</table>
</center>
</td>
            
          </tr>
        </table>
      </td>
    </tr>
    <tr>
      <td valign=top>
        <table border="0" cellpadding="0" cellspacing="0" width="100%">
          <tr>
            <td background="images/j4.gif" width=18 height=280></td>
            <td valign=top height=280>
<%String name;
//打开数据库读出姓名
sql="select name from scott.userinf where username='"+username+"'"; 
 rs=stmt.executeQuery(sql); 
if(rs.next()){
name=rs.getString("name");
}else{
name="";
}
%>
<br>
<center><b><%=name%>的考核记录</b></center>
<br>
<%
//打开数据库,读出考核数据库
sql="select * from  scott.checkinf where username='"+username+"'"; 
 rs=stmt.executeQuery(sql); 
while(rs.next()){

%>
<center>
  <table border="0" cellpadding="0" cellspacing="0" width="95%">
    <tr>
      <td width="15%" style="border-left: 2 solid #000000; border-top: 2 solid #000000; border-bottom: 1 solid #000000" align="center"><b>姓名</b></td>
      <td colspan="3" width="85%" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-top: 2 solid #000000; border-bottom: 1 solid #000000"><%=name%> 
      </td>
    </tr>
    <tr>
      <td width="15%" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000" align="center"><b>考核名称</b></td>
      <td width="35%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=replacenull(rs.getString("checkname"))%> 
      </td>
      <td width="15%" style="border-left: 1 solid #000000; border-bottom: 1 solid #000000" align="center"><b>考核时间</b></td>
      <td width="35%" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=replacenull(rs.getString("checkdate"))%>
      </td>
    </tr>
    <tr>
      <td style="border-left: 2 solid #000000; border-bottom: 1 solid #000000" width="15%" align="center"><b>考核类型</b></td>
      <td style="border-left: 1 solid #000000; border-bottom: 1 solid #000000"><%=replacenull(rs.getString("checksort"))%>
      </td>
      <td style="border-left: 1 solid #000000; border-bottom: 1 solid #000000" width="15%" align="center"><b>考核方式</b></td>
      <td style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=replacenull(rs.getString("checktype"))%> 
      </td>
    </tr>
    <tr>
      <td style="border-left: 2 solid #000000; border-bottom: 1 solid #000000" width="15%" align="center"><b>考核评语</b></td>
      <td colspan="3" width="85%" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=replacenull(rs.getString("checkcommment"))%> 
      </td>
    </tr>
    <tr>
      <td style="border-left: 2 solid #000000; border-bottom: 1 solid #000000" width="15%" align="center"><b>考核结果</b></td>
      <td colspan="3" width="85%" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=replacenull(rs.getString("checkresult"))%> 
      </td>
    </tr>
    <tr>
      <td width="15%" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000" align="center"><b>备注</b></td>
      <td colspan="3" width="85%" style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 1 solid #000000"><%=replacenull(rs.getString("remark"))%> 
      </td>
    </tr>
    
    <tr>
      <td style="border-left: 2 solid #000000; border-bottom: 2 solid #000000" width="15%" align="center"><b> 记录时间
       </b></td>
      <td style="border-left: 1 solid #000000; border-bottom: 2 solid #000000"><%=replacenull(rs.getString("updatename"))%> 
      </td>
      <td style="border-left: 1 solid #000000; border-bottom: 2 solid #000000" width="15%" align="center"><b>更改时间</b></td>
      <td style="border-left: 1 solid #000000; border-right: 2 solid #000000; border-bottom: 2 solid #000000"><%=replacenull(rs.getString("updatedate"))%>
      </td>
    </tr>
  </table>
  <table border="0" cellpadding="0" cellspacing="0" width="95%">
<td>
<center>
<input type="submit" name="submit" value="查询"></center>
</td>
</form>
<form method="post" action="addcheck.jsp">
<td>
<input type="hidden" name="userdept" value="<%=firstdept%>">
<input type="hidden" name="username" value="<%=username%>">
<center><input type="submit" value="增加"></center>
</td>
</form>
    <tr><form method="post" action="editcheck.jsp">
      <td align=right><input type="submit" value="编辑">
<input type="hidden" name="userdept" value="<%=firstdept%>">
<input type="hidden" name="username" value="<%=username%>">
<input type="hidden" name="id" value=<%=replacenull(rs.getString("id"))%>>
</td>
        </form>
    </tr>
  </table>
<hr size=1 color=red width="95%">
<br>
</center>
<%
}
%>

 </td>
            <td background="images/j5.gif" width=18 height=280></td>
          </tr>
        </table>
    </tr>
    <tr>
      <td height=19>
        <table border="0" cellpadding="0" cellspacing="0" width="100%" height="19">
          <tr>
            
          </tr>
        </table>
      </td>
    </tr>
	 <%
}
%>
  </table>
<center>
<a href="system.jsp">返回</a>
</center>
<%@ include file="foot.jsp"%>
</body>
</html>










⌨️ 快捷键说明

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