📄 chang.jsp
字号:
<%@ page contentType="text/html;charset=gb2312"%>
<%@ include file="JSP/OPENDB.jsp"%>
<%
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_jobchanginf;
String sql1="select allow_edit_all_jobchanginf from scott.userinf where username='"+oabusyusername+"'";
ResultSet rs=stmt.executeQuery(sql1);
if(rs.next())
{
cook_allow_edit_all_jobchanginf=rs.getString("allow_edit_all_jobchanginf");
}else{
cook_allow_edit_all_jobchanginf="";
}
%>
<%!
String replacenull(String a){
if(a==null){
return " ";
}else{
return a;
}
}
String selected(String a,String b){
if(a.equals(b)){
return "selected";
}else{
return "";
}
}
%>
<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>
</td>
<%String firstdept;
request.setCharacterEncoding("GB2312");
if(request.getParameter("userdept")!=null){
firstdept=request.getParameter("userdept");
}else{
firstdept="技术部";
}
String adminvalue="yes";
{
%>
<form action="chang.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="chang.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 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.changjob 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("oldjob"))%>
</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("changjob"))%>
</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("changdate"))%>
</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("changfile"))%>
</td>
</tr>
<tr>
<td width="15%" style="border-left: 2 solid #000000; border-bottom: 1 solid #000000" align="center"><b>变动原因<br>
备注</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("changreason"))%>
</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("updateusername"))%>
</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%">
<tr>
<center>
<form>
<td>
<input type="submit" name="submit" value="查询">
</td>
</form>
</center>
<form method="post" action="addchang.jsp">
<td>
<input type="hidden" name="userdept" value="<%=firstdept%>">
<input type="hidden" name="username" value="<%=username%>">
<input type="submit" value="增加">
</td>
</form>
</tr>
</table>
<hr size=1 color=red width="95%">
<br>
</center>
<%
}
%>
</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 + -