增加团队档案管理、删除等功能
This commit is contained in:
@@ -28,9 +28,8 @@
|
||||
<%
|
||||
boolean flag = false;
|
||||
request.setCharacterEncoding("utf-8");
|
||||
String viewport = request.getParameter("viewport");
|
||||
String add_admin = request.getParameter("add_admin");
|
||||
String empid = request.getParameter("empid");
|
||||
String edi_name = request.getParameter("edi_name");
|
||||
String empjob = request.getParameter("empjob");
|
||||
String empname = request.getParameter("empname");
|
||||
String empsex = request.getParameter("empsex");
|
||||
@@ -46,6 +45,7 @@
|
||||
String empadress = request.getParameter("empadress");
|
||||
String empResume = request.getParameter("empResume");
|
||||
String empremark = request.getParameter("empremark");
|
||||
int i = 1;
|
||||
%>
|
||||
<%
|
||||
String driver = "com.mysql.jdbc.Driver";
|
||||
@@ -56,11 +56,24 @@
|
||||
try {
|
||||
Connection conn = DriverManager.getConnection(url, use, password);
|
||||
PreparedStatement sql = conn.prepareStatement(
|
||||
"insert into adminstrator_record(AdminNo,AdminName,Adminsex,Adminjob)values(?,?,?,?)");
|
||||
sql.setString(1, adminNo);
|
||||
sql.setString(2, name);
|
||||
sql.setString(3, adminsex);
|
||||
sql.setString(4, adminjob);
|
||||
"INSERT INTO tb_docfile (empid,empjob,empname,empsex,empnation,empnative,empschool,empdept,empmajor,empbirthday,empQQ,empemail,empPhoneNum,empadress,empResume,empremark,edi_name) VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)");
|
||||
sql.setString(i++, empid);
|
||||
sql.setString(i++, empjob);
|
||||
sql.setString(i++, empname);
|
||||
sql.setString(i++, empsex);
|
||||
sql.setString(i++, empnation);
|
||||
sql.setString(i++, empnative);
|
||||
sql.setString(i++, empschool);
|
||||
sql.setString(i++, empdept);
|
||||
sql.setString(i++, empmajor);
|
||||
sql.setString(i++, empbirthday);
|
||||
sql.setString(i++, empQQ);
|
||||
sql.setString(i++, empemail);
|
||||
sql.setString(i++, empPhoneNum);
|
||||
sql.setString(i++, empadress);
|
||||
sql.setString(i++, empResume);
|
||||
sql.setString(i++, empremark);
|
||||
sql.setString(i++, edi_name);
|
||||
int rtn = sql.executeUpdate();
|
||||
if (rtn != 0) {
|
||||
flag = true;
|
||||
@@ -74,12 +87,34 @@
|
||||
<!-- 判断是否是插入成功 -->
|
||||
<%
|
||||
if (flag == true) {
|
||||
i = 0;
|
||||
%>
|
||||
<jsp:forward page="insert_success.jsp" />
|
||||
|
||||
<%
|
||||
} else if (flag == false) {
|
||||
out.println("插入失败,请将以下信息交给开发者处理");
|
||||
%>
|
||||
<jsp:forward page="insert_success.jsp" />
|
||||
<%-- <jsp:forward page="insert_success.jsp" /> --%>
|
||||
<%=i%>
|
||||
<br>
|
||||
<%=empid%><br>
|
||||
<%=empjob%>
|
||||
<%=empname%>
|
||||
<%=empsex%>
|
||||
<%=empnation%>
|
||||
<%=empnative%>
|
||||
<%=empschool%>
|
||||
<%=empdept%>
|
||||
<%=empmajor%>
|
||||
<%=empbirthday%>
|
||||
<%=empQQ%>
|
||||
<%=empemail%>
|
||||
<%=empPhoneNum%>
|
||||
<%=empadress%>
|
||||
<%=empResume%>
|
||||
<%=empremark%>
|
||||
<%=edi_name%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
|
||||
121
WebRoot/JSPhandle/docFile_update.jsp
Normal file
121
WebRoot/JSPhandle/docFile_update.jsp
Normal file
@@ -0,0 +1,121 @@
|
||||
<%@ page language="java" import="java.sql.*"
|
||||
contentType="text/html;charset=utf-8"%>
|
||||
<%
|
||||
String path = request.getContextPath();
|
||||
String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
|
||||
+ path + "/";
|
||||
%>
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
||||
<html>
|
||||
<head>
|
||||
<base href="<%=basePath%>">
|
||||
|
||||
<title>检验插入页面</title>
|
||||
<meta http-equiv="pragma" content="no-cache">
|
||||
<meta http-equiv="cache-control" content="no-cache">
|
||||
<meta http-equiv="expires" content="0">
|
||||
<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
|
||||
<meta http-equiv="description" content="This is my page">
|
||||
<!--
|
||||
<link rel="stylesheet" type="text/css" href="styles.css">
|
||||
-->
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<br>
|
||||
<%
|
||||
boolean flag = false;
|
||||
request.setCharacterEncoding("utf-8");
|
||||
String empid = request.getParameter("empid");
|
||||
String empjob = request.getParameter("empjob");
|
||||
String empname = request.getParameter("empname");
|
||||
String empsex = request.getParameter("empsex");
|
||||
String empnation = request.getParameter("empnation");
|
||||
String empnative = request.getParameter("empnative");
|
||||
String empschool = request.getParameter("empschool");
|
||||
String empdept = request.getParameter("empdept");
|
||||
String empmajor = request.getParameter("empmajor");
|
||||
String empbirthday = request.getParameter("empbirthday");
|
||||
String empQQ = request.getParameter("empQQ");
|
||||
String empemail = request.getParameter("empemail");
|
||||
String empPhoneNum = request.getParameter("empPhoneNum");
|
||||
String empadress = request.getParameter("empadress");
|
||||
String empResume = request.getParameter("empResume");
|
||||
String empremark = request.getParameter("empremark");
|
||||
int i = 1;
|
||||
%>
|
||||
<%
|
||||
String driver = "com.mysql.jdbc.Driver";
|
||||
String url = "jdbc:mysql://localhost:3306/db_school?useUnicode=true&characterEncoding=utf-8";
|
||||
String use = "root";
|
||||
String password = "";
|
||||
Class.forName(driver);
|
||||
try {
|
||||
Connection conn = DriverManager.getConnection(url, use, password);
|
||||
PreparedStatement sql = conn.prepareStatement(
|
||||
"UPDATE tb_docfile SET empjob=?,empname=?,empsex=?,empnation=?,empnative=?,empschool=?,empdept=?,empmajor=?,empbirthday=?,empQQ=?,empemail=?,empPhoneNum=?,empadress=?,empResume=?,empremark=? WHERE empid=?;");
|
||||
sql.setString(i++, empjob);
|
||||
sql.setString(i++, empname);
|
||||
sql.setString(i++, empsex);
|
||||
sql.setString(i++, empnation);
|
||||
sql.setString(i++, empnative);
|
||||
sql.setString(i++, empschool);
|
||||
sql.setString(i++, empdept);
|
||||
sql.setString(i++, empmajor);
|
||||
sql.setString(i++, empbirthday);
|
||||
sql.setString(i++, empQQ);
|
||||
sql.setString(i++, empemail);
|
||||
sql.setString(i++, empPhoneNum);
|
||||
sql.setString(i++, empadress);
|
||||
sql.setString(i++, empResume);
|
||||
sql.setString(i++, empremark);
|
||||
sql.setString(i++, empid);
|
||||
int rtn = sql.executeUpdate();
|
||||
if (rtn != 0) {
|
||||
flag = true;
|
||||
}
|
||||
sql.close();
|
||||
conn.close();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
%>
|
||||
<!-- 判断是否是插入成功 -->
|
||||
<%
|
||||
if (flag == true) {
|
||||
i = 0;
|
||||
%>
|
||||
<jsp:forward page="insert_success.jsp" />
|
||||
|
||||
<%
|
||||
} else if (flag == false) {
|
||||
out.println("插入失败,请将以下信息交给开发者处理");
|
||||
|
||||
%>
|
||||
<%-- <jsp:forward page="insert_success.jsp" /> --%>
|
||||
<br>
|
||||
<%=i%>
|
||||
<br>
|
||||
<%=empid%><br>
|
||||
<%=empjob%>
|
||||
<%=empname%>
|
||||
<%=empsex%>
|
||||
<%=empnation%>
|
||||
<%=empnative%>
|
||||
<%=empschool%>
|
||||
<%=empdept%>
|
||||
<%=empmajor%>
|
||||
<%=empbirthday%>
|
||||
<%=empQQ%>
|
||||
<%=empemail%>
|
||||
<%=empPhoneNum%>
|
||||
<%=empadress%>
|
||||
<%=empResume%>
|
||||
<%=empremark%>
|
||||
<%
|
||||
}
|
||||
%>
|
||||
</body>
|
||||
</html>
|
||||
@@ -36,25 +36,51 @@
|
||||
align="center">
|
||||
<h3 class="text-center">添加档案</h3>
|
||||
<form class="form-horizontal" role="form" id="add_docFile"
|
||||
name="add_docFile" action="JSPhandle/docFile_insert.jsp" method="post">
|
||||
<table class="table table-bordered">
|
||||
name="add_docFile" action="JSPhandle/docFile_insert.jsp"
|
||||
method="post">
|
||||
<table class="table table-bordered table-responsive">
|
||||
<tr>
|
||||
<td colspan="7"><b>个人档案</b>
|
||||
<button type="submit" class="btn btn-success pull-right btn-sm">提交</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<%
|
||||
String driverClass = "com.mysql.jdbc.Driver";
|
||||
String url = "jdbc:mysql://localhost:3306/db_school?useUnicode=true&characterEncoding=utf-8";
|
||||
String user = "root";
|
||||
String password = "";
|
||||
|
||||
try {
|
||||
Class.forName(driverClass);
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
PreparedStatement sql = null;
|
||||
conn = DriverManager.getConnection(url, user, password);
|
||||
Statement stmt = conn.createStatement();
|
||||
sql = conn.prepareStatement("SELECT count(empid) Num FROM tb_docfile;");
|
||||
rs = sql.executeQuery();
|
||||
while (rs.next()) {
|
||||
%>
|
||||
|
||||
<td>工号</td>
|
||||
<td><input class="form-control" type="text" name="empid"></td>
|
||||
<td><input class="form-control" type="text" name="empid"
|
||||
readonly value="<%=rs.getInt("Num") + 1%>"></td>
|
||||
|
||||
<%
|
||||
}
|
||||
sql.close();
|
||||
rs.close();
|
||||
conn.close();
|
||||
stmt.close();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
%>
|
||||
<td>职务</td>
|
||||
<td><select class="form-control" name="empjob">
|
||||
<%
|
||||
String driverClass = "com.mysql.jdbc.Driver";
|
||||
String url = "jdbc:mysql://localhost:3306/db_school?useUnicode=true&characterEncoding=utf-8";
|
||||
String user = "root";
|
||||
String password = "";
|
||||
|
||||
Class.forName(driverClass);
|
||||
try {
|
||||
Class.forName(driverClass);
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
PreparedStatement sql = null;
|
||||
@@ -75,9 +101,7 @@
|
||||
ex.printStackTrace();
|
||||
}
|
||||
%>
|
||||
<%
|
||||
|
||||
%>
|
||||
|
||||
</select></td>
|
||||
<td rowspan="5"><input type="file"></td>
|
||||
</tr>
|
||||
@@ -104,7 +128,8 @@
|
||||
<!--第四行-->
|
||||
<tr>
|
||||
<td>学校</td>
|
||||
<td><input class="form-control" type="text" name="empschool" value="广东财经大学"></td>
|
||||
<td><input class="form-control" type="text" name="empschool"
|
||||
value="广东财经大学"></td>
|
||||
<td>学院</td>
|
||||
<td><input class="form-control" type="text" name="empdept"></td>
|
||||
</tr>
|
||||
@@ -112,22 +137,27 @@
|
||||
<td>专业</td>
|
||||
<td><input class="form-control" type="text" name="empmajor"></td>
|
||||
<td>出生年月</td>
|
||||
<td><input class="form-control" type="text" name="empbirthday"></td>
|
||||
<td><input class="form-control" type="date"
|
||||
name="empbirthday"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"><b>社交信息</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QQ</td>
|
||||
<td colspan="0"><input class="form-control" type="text" name="empQQ"></td>
|
||||
<td colspan="0"><input class="form-control" type="text"
|
||||
name="empQQ"></td>
|
||||
<td>邮箱</td>
|
||||
<td colspan="2"><input class="form-control" type="text" name="empemail"></td>
|
||||
<td colspan="2"><input class="form-control" type="text"
|
||||
name="empemail"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>电话</td>
|
||||
<td colspan="0"><input class="form-control" type="text" name="empPhoneNum"></td>
|
||||
<td colspan="0"><input class="form-control" type="text"
|
||||
name="empPhoneNum"></td>
|
||||
<td>住址</td>
|
||||
<td colspan="2"><input class="form-control" type="text" name="empadress"></td>
|
||||
<td colspan="2"><input class="form-control" type="text"
|
||||
name="empadress"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"><b>简历</b></td>
|
||||
@@ -143,6 +173,7 @@
|
||||
<td colspan="7"><textarea class="form-control" cols="100%"
|
||||
rows="10" name="empremark"></textarea></td>
|
||||
</tr>
|
||||
<input type="hidden" name="edi_name" value="<%=user1%>" readonly>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
224
WebRoot/manage_docFile.jsp
Normal file
224
WebRoot/manage_docFile.jsp
Normal file
@@ -0,0 +1,224 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@page import="java.sql.Connection"%>
|
||||
<%@page import="java.sql.*"%>
|
||||
<%@page import="java.sql.DriverManager"%>
|
||||
<!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">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>学生管理</title>
|
||||
<link rel="stylesheet" href="css/manage.css" type="text/css">
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="css/footer.css" type="text/css">
|
||||
<script src="js/ie-emulation-modes-warning.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<%@ include file="/module/top.jsp"%>
|
||||
|
||||
<%@ include file="/module/limits_check.jsp"%>
|
||||
|
||||
<div class="container">
|
||||
<%
|
||||
if (session.getAttribute("actualuser") == null) {
|
||||
out.println("<script>alert('登录超时 (1440 秒未活动)或未登录,请重新登录。');window.location.href='index.html';</script>");
|
||||
return;
|
||||
}
|
||||
Object actualuser = session.getAttribute("actualuser");
|
||||
%>
|
||||
<div class="row">
|
||||
<%@ include file="module/sidebar.jsp"%>
|
||||
<div class="col-lg-1 col-md-1 hidden-xs"></div>
|
||||
|
||||
<div class="col-sm-12 col-lg-9 col-md-9 table-responsive"
|
||||
align="center">
|
||||
<h3 class="text-center">添加档案</h3>
|
||||
<form class="form-horizontal" role="form" id="add_docFile"
|
||||
name="add_docFile" action="JSPhandle/docFile_update.jsp"
|
||||
method="post">
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td colspan="7"><b>个人档案</b>
|
||||
<button type="submit" class="btn btn-danger pull-right btn-sm">修改</button></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<%
|
||||
try {
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
} catch (ClassNotFoundException e) {
|
||||
out.print("暂时无法访问");
|
||||
}
|
||||
try {
|
||||
Connection con;
|
||||
Statement sql;
|
||||
ResultSet rs;
|
||||
con = DriverManager.getConnection(
|
||||
"jdbc:mysql://localhost:3306/db_school?useUnicode=true&characterEncoding=utf-8", "root", "");
|
||||
sql = con.createStatement();
|
||||
String condition = null;
|
||||
condition = "SELECT empid FROM tb_docfile";
|
||||
rs = sql.executeQuery(condition);
|
||||
while (rs.next()) //输出查询结果
|
||||
{
|
||||
%>
|
||||
<td>工号</td>
|
||||
<td><input class="form-control" type="text" name="empid"
|
||||
readonly value="<%=rs.getInt("empid")%>" readonly></td>
|
||||
<%
|
||||
}
|
||||
con.close();
|
||||
sql.close();
|
||||
rs.close();
|
||||
} catch (
|
||||
|
||||
SQLException e1) {
|
||||
out.print("无法查询记录");
|
||||
}
|
||||
%>
|
||||
|
||||
<td>职务</td>
|
||||
<td><select class="form-control" name="empjob">
|
||||
<%
|
||||
String driverClass = "com.mysql.jdbc.Driver";
|
||||
String url = "jdbc:mysql://localhost:3306/db_school?useUnicode=true&characterEncoding=utf-8";
|
||||
String user = "root";
|
||||
String password = "";
|
||||
try {
|
||||
Class.forName(driverClass);
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
PreparedStatement sql = null;
|
||||
conn = DriverManager.getConnection(url, user, password);
|
||||
Statement stmt = conn.createStatement();
|
||||
sql = conn.prepareStatement("select AdminJob from administrator_job");
|
||||
rs = sql.executeQuery();
|
||||
while (rs.next()) {
|
||||
%>
|
||||
<option value="<%=rs.getString("AdminJob")%>"><%=rs.getString("AdminJob")%></option>
|
||||
<%
|
||||
}
|
||||
sql.close();
|
||||
rs.close();
|
||||
conn.close();
|
||||
stmt.close();
|
||||
} catch (Exception ex) {
|
||||
ex.printStackTrace();
|
||||
}
|
||||
%>
|
||||
|
||||
</select></td>
|
||||
<td rowspan="5"><input type="file"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<%
|
||||
Class.forName(driverClass);
|
||||
try {
|
||||
ResultSet rs = null;
|
||||
Connection conn = null;
|
||||
PreparedStatement sql = null;
|
||||
|
||||
conn = DriverManager.getConnection(url, user, password);
|
||||
Statement stmt = conn.createStatement();
|
||||
sql = conn.prepareStatement("SELECT * FROM tb_docfile where edi_name=?;");
|
||||
sql.setString(1, (String) user1);
|
||||
rs = sql.executeQuery();
|
||||
while (rs.next()) {
|
||||
%>
|
||||
<td>姓名</td>
|
||||
<td><input class="form-control" type="text" name="empname"
|
||||
value="<%=rs.getString("empname")%>"></td>
|
||||
<td>性别</td>
|
||||
<td><select class="form-control" name="empsex">
|
||||
<option>男</option>
|
||||
<option>女</option>
|
||||
</select></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<!--第二行-->
|
||||
<tr>
|
||||
<td>民族</td>
|
||||
<td><input class="form-control" type="text" name="empnation"
|
||||
value="<%=rs.getString("empnation")%>"></td>
|
||||
<td>籍贯</td>
|
||||
<td><input class="form-control" type="text" name="empnative"
|
||||
value="<%=rs.getString("empnative")%>"></td>
|
||||
</tr>
|
||||
<!--第三行-->
|
||||
|
||||
<!--第四行-->
|
||||
<tr>
|
||||
<td>学校</td>
|
||||
<td><input class="form-control" type="text" name="empschool"
|
||||
value="<%=rs.getString("empschool")%>"></td>
|
||||
<td>学院</td>
|
||||
<td><input class="form-control" type="text" name="empdept"
|
||||
value="<%=rs.getString("empdept")%>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>专业</td>
|
||||
<td><input class="form-control" type="text" name="empmajor"
|
||||
value="<%=rs.getString("empmajor")%>"></td>
|
||||
<td>出生年月</td>
|
||||
<td><input class="form-control" type="date"
|
||||
name="empbirthday" value="<%=rs.getDate("empbirthday")%>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"><b>社交信息</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QQ</td>
|
||||
<td colspan="0"><input class="form-control" type="text"
|
||||
name="empQQ" value="<%=rs.getString("empQQ")%>"></td>
|
||||
<td>邮箱</td>
|
||||
<td colspan="2"><input class="form-control" type="text"
|
||||
name="empemail" value="<%=rs.getString("empemail")%>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>电话</td>
|
||||
<td colspan="0"><input class="form-control" type="text"
|
||||
name="empPhoneNum" value="<%=rs.getString("empPhoneNum")%>"></td>
|
||||
<td>住址</td>
|
||||
<td colspan="2"><input class="form-control" type="text"
|
||||
name="empadress" value="<%=rs.getString("empadress")%>"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"><b>简历</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"><textarea class="form-control" cols="100%"
|
||||
rows="10" name="empResume"><%=rs.getString("empResume")%></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"><b>备注</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"><textarea class="form-control" cols="100%"
|
||||
rows="10" name="empremark"><%=rs.getString("empremark")%></textarea></td>
|
||||
</tr>
|
||||
<%
|
||||
}
|
||||
sql.close();
|
||||
rs.close();
|
||||
conn.close();
|
||||
stmt.close();
|
||||
} catch (
|
||||
|
||||
SQLException e1) {
|
||||
out.print("无法查询记录");
|
||||
}
|
||||
%>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Footer -->
|
||||
<%@ include file="module/footer.jsp"%>
|
||||
<!-- //Footer -->
|
||||
</div>
|
||||
<script src="js/jquery-1.11.2.min.js" type="text/javascript"></script>
|
||||
<script src="js/bootstrap.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -67,10 +67,10 @@
|
||||
<li><a href="x2_resource.jsp">信2资源站(维护中)</a></li>
|
||||
</ul>
|
||||
<ul class="nav nav-sidebar text-center">
|
||||
<h3>个人中心</h3>
|
||||
<h3>团队中心</h3>
|
||||
<li ><a href="add_docFile.jsp">添加个人档案</a></li>
|
||||
<li><a href="index.jsp">查看个人档案</a></li>
|
||||
<li><a href="x2_resource.jsp">删除个人档案</a></li>
|
||||
<li><a href="show_docFile.jsp">查看个人档案</a></li>
|
||||
<li><a href="manage_docFile.jsp">编辑个人档案</a></li>
|
||||
<li><a href="issue_page.jsp">发布信息</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
244
WebRoot/show_docFile.jsp
Normal file
244
WebRoot/show_docFile.jsp
Normal file
@@ -0,0 +1,244 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@page import="java.sql.Connection"%>
|
||||
<%@page import="java.sql.*"%>
|
||||
<%@page import="java.sql.DriverManager"%>
|
||||
<%-- <%@ page import="login.*" %> --%>
|
||||
<!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">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<title>学生管理</title>
|
||||
<link rel="stylesheet" href="css/manage.css" type="text/css">
|
||||
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
|
||||
<link rel="stylesheet" href="css/footer.css" type="text/css">
|
||||
<script src="js/ie-emulation-modes-warning.js"></script>
|
||||
<style type="text/css">
|
||||
/* .jumbotron{
|
||||
background:url(images/index3.jpg);
|
||||
background-repeat:no-repeat;
|
||||
height:100%;
|
||||
background-size:100% 100%;
|
||||
} */
|
||||
.zczi {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.zczi2 {
|
||||
float: left;
|
||||
}
|
||||
|
||||
.intro_img {
|
||||
white-space: nowrap
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<%-- <%
|
||||
java.text.SimpleDateFormat formatter = new java.text.SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
||||
java.util.Date currentTime = new java.util.Date();//得到当前系统时间
|
||||
|
||||
String str_date1 = formatter.format(currentTime); //将日期时间格式化
|
||||
String str_date2 = currentTime.toString(); //将Date型日期时间转换成字符串形式
|
||||
%> --%>
|
||||
<body onbeforeunload="window.location='JSPhandle/logout.jsp'">
|
||||
<%
|
||||
if (session.getAttribute("actualuser") == null) {
|
||||
out.println(
|
||||
"<script language=javascript>alert('登录超时 (1440 秒未活动)或未登录,请重新登录。');window.location.href='index.html'</script>");
|
||||
return;
|
||||
}
|
||||
Object user0 = session.getAttribute("actualuser");
|
||||
/* out.println("欢迎"+user0);//输出当前session用户 */
|
||||
%>
|
||||
<%@ include file="module/top.jsp"%>
|
||||
<div class="container">
|
||||
<h1 class="heading_title_text text-center">团队成员档案</h1>
|
||||
<div class="row">
|
||||
<%@ include file="module/sidebar.jsp"%>
|
||||
|
||||
<div class="col-lg-1 col-md-1 hidden-xs"></div>
|
||||
<div class="col-lg-9 col-md-9">
|
||||
<div class="panel panel-primary">
|
||||
<div class="panel-heading">所有个人档案记录</div>
|
||||
<div class="panel-body">
|
||||
<%
|
||||
try {
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
} catch (ClassNotFoundException e) {
|
||||
out.print("驱动异常");
|
||||
}
|
||||
try {
|
||||
Connection con;
|
||||
Statement sql;
|
||||
ResultSet rs;
|
||||
con = DriverManager.getConnection(
|
||||
"jdbc:mysql://localhost:3306/db_school?useUnicode=true&characterEncoding=utf-8", "root", "");
|
||||
sql = con.createStatement();
|
||||
String condition = null;
|
||||
condition = "SELECT empid,empname,empjob FROM tb_docfile";
|
||||
rs = sql.executeQuery(condition);
|
||||
//String k1=rs.getString(1);
|
||||
out.print("<table class='table table-striped table-responsive'>");
|
||||
out.print("<tr>");
|
||||
out.print("<th>姓名</th>");
|
||||
out.print("<th>岗位</th>");
|
||||
out.print("<th>");
|
||||
out.print("</tr>");
|
||||
while (rs.next()) //输出查询结果
|
||||
{
|
||||
|
||||
out.print("<tr>");
|
||||
out.println("<TD><div>" + rs.getString(2) + "</div></TD>");
|
||||
out.print("<TD><div>" + rs.getString(3) + "</div></TD>");
|
||||
out.print(
|
||||
"<TD><button type='button' class='btn btn-primary pull-right' data-toggle='modal' data-target='.xw"
|
||||
+ rs.getString(1) + "-example-modal-lg'>查看</button></TD>");
|
||||
out.print("</tr>");
|
||||
|
||||
}
|
||||
out.print("</table>");
|
||||
con.close();
|
||||
sql.close();
|
||||
rs.close();
|
||||
} catch (SQLException e1) {
|
||||
out.print("无法查询记录");
|
||||
}
|
||||
%>
|
||||
<%
|
||||
try {
|
||||
Class.forName("com.mysql.jdbc.Driver");
|
||||
} catch (ClassNotFoundException e) {
|
||||
out.print("暂时无法访问");
|
||||
}
|
||||
try {
|
||||
Connection con;
|
||||
Statement sql;
|
||||
ResultSet rs;
|
||||
con = DriverManager.getConnection(
|
||||
"jdbc:mysql://localhost:3306/db_school?useUnicode=true&characterEncoding=utf-8", "root", "");
|
||||
sql = con.createStatement();
|
||||
String condition = null;
|
||||
condition = "SELECT * FROM tb_docfile";
|
||||
rs = sql.executeQuery(condition);
|
||||
|
||||
while (rs.next()) //输出查询结果
|
||||
{
|
||||
%>
|
||||
<div
|
||||
class="modal fade xw<%=rs.getString("empid")%>-example-modal-lg"
|
||||
tabindex="-1" role="dialog" aria-labelledby="myLargeModalLabel">
|
||||
<div class="modal-dialog modal-lg" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal"
|
||||
aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class='modal-title' id='gridSystemModalLabel'><%=rs.getString("empjob")%></h4>
|
||||
</div>
|
||||
<div class='modal-body'>
|
||||
<table class="table table-bordered">
|
||||
<tr>
|
||||
<td colspan="7" class="info"><b>个人档案</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>工号</td>
|
||||
<td><%=rs.getString("empid")%></td>
|
||||
<td>职务</td>
|
||||
<td><%=rs.getString("empjob")%></td>
|
||||
<td rowspan="5"><%-- <img alt="image"
|
||||
src="img/<%=rs.getString("empname")%>.jpg"> --%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>姓名</td>
|
||||
<td><%=rs.getString("empname")%></td>
|
||||
<td>性别</td>
|
||||
<td><%=rs.getString("empsex")%></td>
|
||||
|
||||
|
||||
</tr>
|
||||
<!--第二行-->
|
||||
<tr>
|
||||
<td>民族</td>
|
||||
<td><%=rs.getString("empnation")%></td>
|
||||
<td>籍贯</td>
|
||||
<td><%=rs.getString("empnative")%></td>
|
||||
</tr>
|
||||
<!--第三行-->
|
||||
|
||||
<!--第四行-->
|
||||
<tr>
|
||||
<td>学校</td>
|
||||
<td><%=rs.getString("empschool")%></td>
|
||||
<td>学院</td>
|
||||
<td><%=rs.getString("empdept")%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>专业</td>
|
||||
<td><%=rs.getString("empmajor")%></td>
|
||||
<td>出生年月</td>
|
||||
<td><%=rs.getString("empbirthday")%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="info"><b>社交信息</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>QQ</td>
|
||||
<td colspan="0"><%=rs.getString("empQQ")%></td>
|
||||
<td>邮箱</td>
|
||||
<td colspan="2"><%=rs.getString("empemail")%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>电话</td>
|
||||
<td colspan="0"><%=rs.getString("empPhoneNum")%></td>
|
||||
<td>住址</td>
|
||||
<td colspan="2"><%=rs.getString("empadress")%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="info"><b>简历</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"><%=rs.getString("empResume")%></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7" class="info"><b>备注</b></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="7"><%=rs.getString("empremark")%></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-default "
|
||||
data-dismiss="modal">关闭</button>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%
|
||||
}
|
||||
con.close();
|
||||
sql.close();
|
||||
rs.close();
|
||||
} catch (
|
||||
|
||||
SQLException e1) {
|
||||
out.print("无法查询记录");
|
||||
}
|
||||
%>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<%@ include file="module/footer.jsp"%>
|
||||
</div>
|
||||
|
||||
<script src="js/jquery-1.11.2.min.js" type="text/javascript"></script>
|
||||
<script src="js/bootstrap.js" type="text/javascript"></script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user