Compare commits

..

No commits in common. 'main' and 'b_branch' have entirely different histories.

@ -0,0 +1,3 @@
111
123
456

@ -0,0 +1,2 @@
# recruit

@ -1 +0,0 @@
Subproject commit 495661ee0f0688985eec8f3c1099260d0e6558ec

@ -0,0 +1,3 @@
# 默认忽略的文件
/shelf/
/workspace.xml

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="com.codeverse.userSettings.MarscodeWorkspaceAppSettingsState">
<option name="progress" value="1.0" />
</component>
</project>

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CompilerConfiguration">
<annotationProcessing>
<profile name="Maven default annotation processors profile" enabled="true">
<sourceOutputDir name="target/generated-sources/annotations" />
<sourceTestOutputDir name="target/generated-test-sources/test-annotations" />
<outputRelativeToContentRoot value="true" />
<module name="recruit" />
</profile>
</annotationProcessing>
</component>
</project>

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Encoding">
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
</component>
</project>

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="RemoteRepositoriesConfiguration">
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Central Repository" />
<option name="url" value="http://maven.aliyun.com/nexus/content/repositories/central/" />
</remote-repository>
<remote-repository>
<option name="id" value="central" />
<option name="name" value="Maven Central repository" />
<option name="url" value="https://repo1.maven.org/maven2" />
</remote-repository>
<remote-repository>
<option name="id" value="jboss.community" />
<option name="name" value="JBoss Community repository" />
<option name="url" value="https://repository.jboss.org/nexus/content/repositories/public/" />
</remote-repository>
</component>
</project>

@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="MavenProjectsManager">
<option name="originalFiles">
<list>
<option value="$PROJECT_DIR$/pom.xml" />
</list>
</option>
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="openjdk-23" project-jdk-type="JavaSDK" />
</project>

@ -0,0 +1,124 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Palette2">
<group name="Swing">
<item class="com.intellij.uiDesigner.HSpacer" tooltip-text="Horizontal Spacer" icon="/com/intellij/uiDesigner/icons/hspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="1" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="com.intellij.uiDesigner.VSpacer" tooltip-text="Vertical Spacer" icon="/com/intellij/uiDesigner/icons/vspacer.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="1" anchor="0" fill="2" />
</item>
<item class="javax.swing.JPanel" icon="/com/intellij/uiDesigner/icons/panel.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3" />
</item>
<item class="javax.swing.JScrollPane" icon="/com/intellij/uiDesigner/icons/scrollPane.svg" removable="false" auto-create-binding="false" can-attach-label="true">
<default-constraints vsize-policy="7" hsize-policy="7" anchor="0" fill="3" />
</item>
<item class="javax.swing.JButton" icon="/com/intellij/uiDesigner/icons/button.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="0" fill="1" />
<initial-values>
<property name="text" value="Button" />
</initial-values>
</item>
<item class="javax.swing.JRadioButton" icon="/com/intellij/uiDesigner/icons/radioButton.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="RadioButton" />
</initial-values>
</item>
<item class="javax.swing.JCheckBox" icon="/com/intellij/uiDesigner/icons/checkBox.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="3" anchor="8" fill="0" />
<initial-values>
<property name="text" value="CheckBox" />
</initial-values>
</item>
<item class="javax.swing.JLabel" icon="/com/intellij/uiDesigner/icons/label.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="8" fill="0" />
<initial-values>
<property name="text" value="Label" />
</initial-values>
</item>
<item class="javax.swing.JTextField" icon="/com/intellij/uiDesigner/icons/textField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JPasswordField" icon="/com/intellij/uiDesigner/icons/passwordField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JFormattedTextField" icon="/com/intellij/uiDesigner/icons/formattedTextField.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1">
<preferred-size width="150" height="-1" />
</default-constraints>
</item>
<item class="javax.swing.JTextArea" icon="/com/intellij/uiDesigner/icons/textArea.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTextPane" icon="/com/intellij/uiDesigner/icons/textPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JEditorPane" icon="/com/intellij/uiDesigner/icons/editorPane.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JComboBox" icon="/com/intellij/uiDesigner/icons/comboBox.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="2" anchor="8" fill="1" />
</item>
<item class="javax.swing.JTable" icon="/com/intellij/uiDesigner/icons/table.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JList" icon="/com/intellij/uiDesigner/icons/list.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="2" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTree" icon="/com/intellij/uiDesigner/icons/tree.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3">
<preferred-size width="150" height="50" />
</default-constraints>
</item>
<item class="javax.swing.JTabbedPane" icon="/com/intellij/uiDesigner/icons/tabbedPane.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSplitPane" icon="/com/intellij/uiDesigner/icons/splitPane.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="3" hsize-policy="3" anchor="0" fill="3">
<preferred-size width="200" height="200" />
</default-constraints>
</item>
<item class="javax.swing.JSpinner" icon="/com/intellij/uiDesigner/icons/spinner.svg" removable="false" auto-create-binding="true" can-attach-label="true">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSlider" icon="/com/intellij/uiDesigner/icons/slider.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="8" fill="1" />
</item>
<item class="javax.swing.JSeparator" icon="/com/intellij/uiDesigner/icons/separator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="6" anchor="0" fill="3" />
</item>
<item class="javax.swing.JProgressBar" icon="/com/intellij/uiDesigner/icons/progressbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1" />
</item>
<item class="javax.swing.JToolBar" icon="/com/intellij/uiDesigner/icons/toolbar.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="6" anchor="0" fill="1">
<preferred-size width="-1" height="20" />
</default-constraints>
</item>
<item class="javax.swing.JToolBar$Separator" icon="/com/intellij/uiDesigner/icons/toolbarSeparator.svg" removable="false" auto-create-binding="false" can-attach-label="false">
<default-constraints vsize-policy="0" hsize-policy="0" anchor="0" fill="1" />
</item>
<item class="javax.swing.JScrollBar" icon="/com/intellij/uiDesigner/icons/scrollbar.svg" removable="false" auto-create-binding="true" can-attach-label="false">
<default-constraints vsize-policy="6" hsize-policy="0" anchor="0" fill="2" />
</item>
</group>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/.." vcs="Git" />
</component>
</project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 122 KiB

@ -32,11 +32,6 @@
<artifactId>fastjson</artifactId>
<version>1.2.28</version>
</dependency>
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.19.0</version>
</dependency>
</dependencies>
<build>
<finalName>recruit</finalName>

@ -4,6 +4,7 @@
<head>
<title>entreprise profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/recruit/css/entrepriseProfile.css">
<script src="/recruit/js/entrepriseProfile.js"></script>
<script>
window.onload = function () {

@ -7,6 +7,7 @@
<title>logSign</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/recruit/css/logSign.css">
<script>
function logSignSwitch() {
document.getElementById("log").style.display = "none";

@ -7,6 +7,7 @@
<title>mainPage</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/recruit/css/mainPage.css">
<script src="/recruit/js/mainPage.js"></script>
<script>
const account = '<%=session.getAttribute("account")%>';

@ -4,6 +4,7 @@
<head>
<title>manager to use</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/recruit/css/manage.css">
<script src="/recruit/js/manage.js"></script>
<script>
window.onload = function () {

@ -7,6 +7,7 @@
<title>recruitDetails</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/recruit/css/recruitDetails.css">
<script src="/recruit/js/recruitDetails.js"></script>
<script>
window.onload = function () {

@ -4,6 +4,7 @@
<head>
<title>entreprise profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/recruit/css/recruitManageForEntreprise.css">
<script src="/recruit/js/recruitManageForEntreprise.js"></script>
</head>
<body>

@ -7,6 +7,7 @@
<title>search</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" href="/recruit/css/search.css">
<script src="/recruit/js/search.js"></script>
<script>
window.onload = function () {

@ -4,6 +4,8 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>student profile</title>
<link rel="stylesheet" type="text/css" href="/recruit/css/studentProfile.css">
<script src="/recruit/js/studentProfile.js"></script>
<script>
window.onload = function () {
@ -71,10 +73,10 @@
<div id="show" style="display: none;">
<% com.example.bean.StudentProfileBean studentProfileBean=(com.example.bean.StudentProfileBean)
session.getAttribute("studentProfileBean"); if(studentProfileBean !=null) { %>
姓名:<span id="nameShow"><%= studentProfileBean.getName() %></span><br>
年龄:<span id="ageShow"><%= studentProfileBean.getAge() %></span><br>
现居:<span id="locationShow"><%= studentProfileBean.getLocation() %></span><br>
兴趣:<span id="interestShow"><%= studentProfileBean.getInterest() %></span><br>
姓名:<p id="nameShow"><%= studentProfileBean.getName() %></p>
年龄:<p id="ageShow"><%= studentProfileBean.getAge() %></p>
现居:<p id="locationShow"><%= studentProfileBean.getLocation() %></p>
兴趣:<p id="interestShow"><%= studentProfileBean.getInterest() %></p>
<input type="button" value="修改" onclick="modify()" id="modifyButton">
<p id="hiddenAccount" style="display: none"><%= studentProfileBean.getStudenID() %></p>
<% } %>

@ -4,4 +4,4 @@
<web-app>
<display-name>Archetype Created Web Application</display-name>
</web-app>
</web-app>

@ -0,0 +1,120 @@
/* entrepriseProfile.css */
/* 设置全局字体及基础样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f8ff; /* 浅蓝色背景 */
color: #333;
}
/* 主容器样式 */
.container {
width: 80%;
max-width: 800px;
margin: 50px auto;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
background-color: white;
}
/* 表单标签样式 */
label {
display: block;
margin-top: 15px;
font-weight: bold;
color: #004080; /* 深蓝色 */
font-size: 14px;
}
/* 输入框样式 */
input[type="text"] {
width: 100%;
padding: 10px;
margin-top: 5px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
font-size: 14px;
}
/* 按钮样式 - 圆角矩形 */
input[type="button"] {
width: 100%;
padding: 12px;
margin-top: 20px;
background-color: #007bff; /* 蓝色背景 */
color: white;
border: none;
border-radius: 8px; /* 圆角 */
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
box-sizing: border-box;
}
input[type="button"]:hover {
background-color: #0056b3; /* 鼠标悬停时加深蓝色 */
}
/* 显示区域样式 */
#show {
display: none;
padding: 20px;
border-radius: 8px;
background-color: #f9f9f9;
border: 1px solid #e0e0e0;
}
#show p {
margin: 10px 0;
font-size: 14px;
line-height: 1.5;
}
#show label {
color: #004080;
font-weight: bold;
}
/* 新建表单样式 */
#new {
display: none;
padding: 20px;
border-radius: 8px;
background-color: #f9f9f9;
border: 1px solid #e0e0e0;
}
/* 修改按钮样式 */
#modifyButton {
width: 100%;
padding: 12px;
margin-top: 15px;
background-color: #28a745; /* 绿色背景 */
color: white;
border: none;
border-radius: 8px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
#modifyButton:hover {
background-color: #218838; /* 鼠标悬停时加深绿色 */
}
/* 响应式设计 */
@media (max-width: 600px) {
.container {
width: 95%;
margin: 20px auto;
padding: 15px;
}
input[type="text"], input[type="button"] {
font-size: 16px; /* 移动端适当增大字体 */
}
}

@ -0,0 +1,64 @@
/* 设置全局字体及基础样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;
background-color: #f0f8ff; /* 浅蓝色背景 */
color: #333;
}
/* 登录/注册区域容器 */
#log, #sign, #logged, #modify {
width: 300px;
margin: 50px auto;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
background-color: white;
}
/* 表单标签样式 */
label {
display: block;
margin-top: 10px;
font-weight: bold;
color: #004080; /* 深蓝色 */
}
/* 输入框样式 */
input[type="text"], input[type="password"] {
width: calc(100% - 20px);
padding: 8px;
margin-top: 5px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
}
/* 按钮样式 */
input[type="button"] {
width: 100%;
padding: 10px;
margin-top: 15px;
background-color: #007bff; /* 蓝色背景 */
color: white;
border: none;
border-radius: 8px; /* 圆角 */
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
input[type="button"]:hover {
background-color: #0056b3; /* 鼠标悬停时加深蓝色 */
}
/* 单选按钮样式 */
input[type="radio"] {
margin-right: 5px;
}
/* 已登录状态信息样式 */
#logged p {
margin: 5px 0;
}

@ -0,0 +1,106 @@
/* mainPage.css */
/* 设置全局字体及基础样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f0f8ff; /* 浅蓝色背景 */
color: #333;
}
/* 页面标题样式 */
h2 {
color: #004080; /* 深蓝色 */
text-align: center;
margin-bottom: 30px;
}
/* 导航链接样式 */
a {
display: inline-block;
margin: 10px 15px;
padding: 10px 15px;
background-color: #007bff; /* 蓝色背景 */
color: white;
text-decoration: none;
border-radius: 8px; /* 圆角 */
transition: background-color 0.3s ease;
font-size: 16px;
}
a:hover {
background-color: #0056b3; /* 鼠标悬停时加深蓝色 */
}
/* 表格样式 */
table {
width: 100%;
border-collapse: collapse;
margin: 20px auto;
background-color: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/* 表头样式 */
thead th {
background-color: #007bff; /* 蓝色背景 */
color: white;
padding: 12px;
text-align: center;
font-weight: bold;
}
/* 表格行样式 */
tbody tr:nth-child(even) {
background-color: #f8f9fa;
}
tbody tr:hover {
background-color: #e9ecef;
}
/* 表格单元格样式 */
td {
padding: 12px;
text-align: center;
border-bottom: 1px solid #dee2e6;
}
/* 隐藏输入框样式 */
#hiddenAccountStatus, #hiddenAccountAuthorization {
display: none;
}
/* 已登录状态显示区域样式 */
#loggedArea {
margin: 20px 0;
padding: 15px;
border-radius: 8px;
background-color: #e9f7fe;
border: 1px solid #b3e0ff;
}
/* 响应式设计 */
@media (max-width: 600px) {
body {
padding: 10px;
}
a {
display: block;
margin: 10px 0;
padding: 12px;
font-size: 16px;
}
table {
font-size: 14px;
}
thead th, td {
padding: 8px;
}
}

@ -0,0 +1,109 @@
/* manage.css */
/* 设置全局字体及基础样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f0f8ff; /* 浅蓝色背景 */
color: #333;
}
/* 主容器样式 */
.container {
max-width: 1200px;
margin: 0 auto;
padding: 20px;
background-color: white;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
/* 按钮样式 - 圆角矩形 */
input[type="button"] {
padding: 10px 20px;
margin: 10px 5px;
background-color: #007bff; /* 蓝色背景 */
color: white;
border: none;
border-radius: 8px; /* 圆角 */
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
box-sizing: border-box;
}
input[type="button"]:hover {
background-color: #0056b3; /* 鼠标悬停时加深蓝色 */
}
/* 表格样式 */
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background-color: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 表头样式 */
thead th {
background-color: #007bff; /* 蓝色背景 */
color: white;
padding: 12px;
text-align: center;
font-weight: bold;
}
/* 表格行样式 */
tbody tr:nth-child(even) {
background-color: #f8f9fa;
}
tbody tr:hover {
background-color: #e9ecef;
}
/* 表格单元格样式 */
td {
padding: 12px;
text-align: center;
border-bottom: 1px solid #dee2e6;
}
/* 表格标题样式 */
h2 {
color: #004080; /* 深蓝色 */
text-align: center;
margin-top: 30px;
margin-bottom: 20px;
}
/* 查询按钮区域 */
#accountManage, #recruitManage {
margin: 20px 0;
}
/* 响应式设计 */
@media (max-width: 768px) {
.container {
padding: 15px;
margin: 10px;
}
table {
font-size: 14px;
}
thead th, td {
padding: 8px;
}
input[type="button"] {
width: 100%;
margin: 5px 0;
padding: 12px;
}
}

@ -0,0 +1,110 @@
/* recruitDetails.css */
/* 设置全局字体及基础样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f0f8ff; /* 浅蓝色背景 */
color: #333;
}
/* 主容器样式 */
.container {
max-width: 800px;
margin: 50px auto;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
background-color: white;
}
/* 表单区域样式 */
#new {
display: none;
padding: 20px;
border-radius: 8px;
background-color: #f9f9f9;
border: 1px solid #e0e0e0;
}
/* 显示区域样式 */
#show {
display: none;
padding: 20px;
border-radius: 8px;
background-color: #f9f9f9;
border: 1px solid #e0e0e0;
}
/* 表单标签样式 */
label {
display: block;
margin-top: 15px;
font-weight: bold;
color: #004080; /* 深蓝色 */
font-size: 14px;
}
/* 输入框样式 */
input[type="text"] {
width: 100%;
padding: 10px;
margin-top: 5px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
font-size: 14px;
}
/* 按钮样式 - 圆角矩形 */
input[type="button"] {
width: 100%;
padding: 12px;
margin-top: 20px;
background-color: #007bff; /* 蓝色背景 */
color: white;
border: none;
border-radius: 8px; /* 圆角 */
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
box-sizing: border-box;
}
input[type="button"]:hover {
background-color: #0056b3; /* 鼠标悬停时加深蓝色 */
}
/* 显示信息样式 */
#show p {
margin: 10px 0;
font-size: 14px;
line-height: 1.5;
padding: 8px;
background-color: white;
border-radius: 5px;
border-left: 4px solid #007bff;
}
/* 隐藏元素样式 */
#hiddenId {
display: none;
}
/* 响应式设计 */
@media (max-width: 600px) {
.container {
width: 95%;
margin: 20px auto;
padding: 15px;
}
input[type="text"], input[type="button"] {
font-size: 16px; /* 移动端适当增大字体 */
}
label {
font-size: 16px;
}
}

@ -0,0 +1,83 @@
/* recruitManageForEntreprise.css */
/* 设置全局字体及基础样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f0f8ff; /* 浅蓝色背景 */
color: #333;
}
/* 主容器样式 */
#recruitManage {
max-width: 1000px;
margin: 50px auto;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
background-color: white;
}
/* 表格样式 */
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background-color: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 表头样式 */
thead th {
background-color: #007bff; /* 蓝色背景 */
color: white;
padding: 12px;
text-align: center;
font-weight: bold;
font-size: 16px;
}
/* 表格行样式 */
tbody tr:nth-child(even) {
background-color: #f8f9fa;
}
tbody tr:hover {
background-color: #e9ecef;
}
/* 表格单元格样式 */
td {
padding: 12px;
text-align: center;
border-bottom: 1px solid #dee2e6;
font-size: 14px;
}
/* 隐藏的账户信息样式 */
#account {
display: none;
}
/* 响应式设计 */
@media (max-width: 768px) {
body {
padding: 10px;
}
#recruitManage {
margin: 20px;
padding: 15px;
}
table {
font-size: 14px;
}
thead th, td {
padding: 8px;
}
}

@ -0,0 +1,163 @@
/* search.css */
/* 设置全局字体及基础样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f0f8ff; /* 浅蓝色背景 */
color: #333;
}
/* 主容器样式 */
div {
max-width: 800px;
margin: 50px auto;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
background-color: white;
}
/* 搜索表单区域样式 */
form {
margin-bottom: 30px;
padding: 20px;
border-radius: 8px;
background-color: #f9f9f9;
border: 1px solid #e0e0e0;
}
/* 表单标签样式 */
label {
display: block;
margin-top: 10px;
font-weight: bold;
color: #004080; /* 深蓝色 */
font-size: 14px;
}
/* 输入框样式 */
input[type="text"] {
width: calc(100% - 20px);
padding: 10px;
margin-top: 5px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
font-size: 14px;
}
/* 按钮样式 - 圆角矩形 */
input[type="button"] {
width: 100%;
padding: 12px;
margin-top: 15px;
background-color: #007bff; /* 蓝色背景 */
color: white;
border: none;
border-radius: 8px; /* 圆角 */
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
box-sizing: border-box;
}
input[type="button"]:hover {
background-color: #0056b3; /* 鼠标悬停时加深蓝色 */
}
/* 新建招聘链接样式 */
a#new {
display: none;
width: 100%;
padding: 12px;
margin: 10px 0;
background-color: #28a745; /* 绿色背景 */
color: white;
text-align: center;
text-decoration: none;
border-radius: 8px;
font-size: 16px;
transition: background-color 0.3s ease;
}
a#new:hover {
background-color: #218838; /* 鼠标悬停时加深绿色 */
}
/* 结果表格区域样式 */
#resultTable {
display: none;
padding: 20px;
border-radius: 8px;
background-color: #f9f9f9;
border: 1px solid #e0e0e0;
}
/* 表格样式 */
table {
width: 100%;
border-collapse: collapse;
margin: 20px 0;
background-color: white;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
/* 表头样式 */
thead th {
background-color: #007bff; /* 蓝色背景 */
color: white;
padding: 12px;
text-align: center;
font-weight: bold;
font-size: 16px;
}
/* 表格行样式 */
tbody tr:nth-child(even) {
background-color: #f8f9fa;
}
tbody tr:hover {
background-color: #e9ecef;
}
/* 表格单元格样式 */
td {
padding: 12px;
text-align: center;
border-bottom: 1px solid #dee2e6;
font-size: 14px;
}
/* 响应式设计 */
@media (max-width: 768px) {
body {
padding: 10px;
}
div {
margin: 20px;
padding: 15px;
}
form {
padding: 15px;
}
input[type="text"], input[type="button"], a#new {
font-size: 16px; /* 移动端适当增大字体 */
}
label {
font-size: 16px;
}
thead th, td {
padding: 8px;
font-size: 14px;
}
}

@ -0,0 +1,104 @@
/* studentProfile.css */
/* 设置全局字体及基础样式 */
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 20px;
background-color: #f0f8ff; /* 浅蓝色背景 */
color: #333;
}
/* 主容器样式 - 与logSign.css保持一致 */
#show, #new, #notLog, #notExist {
width: 400px;
margin: 50px auto;
padding: 20px;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
background-color: white;
}
/* 显示区域样式 */
#show {
display: none;
}
/* 表单标签样式 */
label {
display: block;
margin-top: 10px;
font-weight: bold;
color: #004080; /* 深蓝色 */
font-size: 14px;
}
/* 输入框样式 */
input[type="text"] {
width: calc(100% - 20px);
padding: 8px;
margin-top: 5px;
border: 1px solid #ccc;
border-radius: 5px;
box-sizing: border-box;
font-size: 14px;
}
/* 按钮样式 - 圆角矩形与logSign.css一致 */
input[type="button"] {
width: 100%;
padding: 10px;
margin-top: 15px;
background-color: #007bff; /* 蓝色背景 */
color: white;
border: none;
border-radius: 8px; /* 圆角 */
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease;
}
input[type="button"]:hover {
background-color: #0056b3; /* 鼠标悬停时加深蓝色 */
}
/* 显示信息样式 */
#show p {
margin: 8px 0;
padding: 8px;
background-color: #f8f9fa;
border-radius: 5px;
border-left: 4px solid #007bff;
}
/* 隐藏元素样式 */
#hiddenAccount {
display: none;
}
/* 错误提示样式 */
#notLog h3, #notExist h3 {
color: #dc3545; /* 红色错误提示 */
text-align: center;
}
/* 响应式设计 */
@media (max-width: 768px) {
body {
padding: 10px;
}
#show, #new, #notLog, #notExist {
width: 90%;
margin: 20px auto;
padding: 15px;
}
input[type="text"], input[type="button"] {
font-size: 16px; /* 移动端适当增大字体 */
}
label {
font-size: 16px;
}
}

@ -1,4 +1,3 @@
jdbcDriver=com.mysql.jdbc.Driver
jdbcUri=jdbc:mysql://localhost:3306/recruit_db?useSSL=false&characterEncoding=utf8
jdbcUri=jdbc:mysql://localhost:3306/recruit?useSSL=false&characterEncoding=utf8
jdbcUser=root
jdbcPassword=12345678

@ -1,3 +0,0 @@
artifactId=recruit
groupId=com.example
version=1.0-SNAPSHOT

@ -1,19 +0,0 @@
com\example\dao\RecruitDAO.class
com\example\servlet\LogSignServlet.class
com\example\servlet\MainPageServlet.class
com\example\bean\RecruitBean.class
com\example\servlet\ManageServlet.class
com\example\servlet\ProfileServlet.class
com\example\servlet\RecruitServlet.class
com\example\dao\StudentProfileDAO.class
com\example\servlet\SearchServlet.class
com\example\dao\LogSignDAO.class
com\example\utility\Connect.class
com\example\bean\StudentProfileBean.class
com\example\utility\HttpGetJson.class
com\example\servlet\EntrepriseManage.class
com\example\utility\SaltMD5Util.class
com\example\bean\EntrepriseProfileBean.class
com\example\bean\LogSignBean.class
com\example\dao\EntrepriseProfileDAO.class
com\example\listener\SessionListener.class

@ -1,13 +1,14 @@
F:\Programme\recruit\recruit\src\main\java\com\example\bean\EntrepriseProfileBean.java
F:\Programme\recruit\recruit\src\main\java\com\example\bean\LogSignBean.java
F:\Programme\recruit\recruit\src\main\java\com\example\bean\accountBean.java
F:\Programme\recruit\recruit\src\main\java\com\example\bean\ApplicationBean.java
F:\Programme\recruit\recruit\src\main\java\com\example\bean\entrepriseProfileBean.java
F:\Programme\recruit\recruit\src\main\java\com\example\bean\RecruitBean.java
F:\Programme\recruit\recruit\src\main\java\com\example\bean\StudentProfileBean.java
F:\Programme\recruit\recruit\src\main\java\com\example\dao\EntrepriseProfileDAO.java
F:\Programme\recruit\recruit\src\main\java\com\example\bean\studentProfileBean.java
F:\Programme\recruit\recruit\src\main\java\com\example\dao\ApplicationDAO.java
F:\Programme\recruit\recruit\src\main\java\com\example\dao\entrepriseProfileDAO.java
F:\Programme\recruit\recruit\src\main\java\com\example\dao\LogSignDAO.java
F:\Programme\recruit\recruit\src\main\java\com\example\dao\RecruitDAO.java
F:\Programme\recruit\recruit\src\main\java\com\example\dao\StudentProfileDAO.java
F:\Programme\recruit\recruit\src\main\java\com\example\listener\SessionListener.java
F:\Programme\recruit\recruit\src\main\java\com\example\servlet\EntrepriseManage.java
F:\Programme\recruit\recruit\src\main\java\com\example\dao\studentProfileDAO.java
F:\Programme\recruit\recruit\src\main\java\com\example\servlet\ApplicationManageServlet.java
F:\Programme\recruit\recruit\src\main\java\com\example\servlet\LogSignServlet.java
F:\Programme\recruit\recruit\src\main\java\com\example\servlet\MainPageServlet.java
F:\Programme\recruit\recruit\src\main\java\com\example\servlet\ManageServlet.java
@ -15,5 +16,3 @@ F:\Programme\recruit\recruit\src\main\java\com\example\servlet\ProfileServlet.ja
F:\Programme\recruit\recruit\src\main\java\com\example\servlet\RecruitServlet.java
F:\Programme\recruit\recruit\src\main\java\com\example\servlet\SearchServlet.java
F:\Programme\recruit\recruit\src\main\java\com\example\utility\Connect.java
F:\Programme\recruit\recruit\src\main\java\com\example\utility\HttpGetJson.java
F:\Programme\recruit\recruit\src\main\java\com\example\utility\SaltMD5Util.java

Binary file not shown.

@ -1,4 +0,0 @@
jdbcDriver=com.mysql.jdbc.Driver
jdbcUri=jdbc:mysql://localhost:3306/recruit_db?useSSL=false&characterEncoding=utf8
jdbcUser=root
jdbcPassword=12345678

@ -1,85 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" buffer="32kb" autoFlush="true" %>
<html>
<head>
<title>entreprise profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/recruit/js/entrepriseProfile.js"></script>
<script>
window.onload = function () {
const account = '<%=session.getAttribute("account")%>';
const accountID = '<%=session.getAttribute("accountID")%>';
const accountAuthorization = '<%=session.getAttribute("accountAuthorization")%>';
const accountStatus = '<%=session.getAttribute("accountStatus")%>';
const studentProfileBean = '<%=session.getAttribute("studentProfileBean")%>';
const isStudentProfileExisted = '<%=session.getAttribute("isStudentProfileExisted")%>';
const entrepriseProfileBean = '<%=session.getAttribute("entrepriseProfileBean")%>';
const isEntrepriseProfileExisted = '<%=session.getAttribute("isEntrepriseProfileExisted")%>';
const companyName = '<%=session.getAttribute("companyName")%>';
const contactEmail = '<%=session.getAttribute("contactEmail")%>';
const recruitPageStatus = '<%=session.getAttribute("recruitPageStatus")%>';
console.log("account " + account);
console.log("accountID " + accountID);
console.log("accountAuthorization " + accountAuthorization);
console.log("accountStatus " + accountStatus);
console.log("studentProfileBean " + studentProfileBean);
console.log("isStudentProfileExisted " + isStudentProfileExisted);
console.log("entrepriseProfileBean " + entrepriseProfileBean);
console.log("isEntrepriseProfileExisted " + isEntrepriseProfileExisted);
console.log("companyName " + companyName);
console.log("contactEmail " + contactEmail);
console.log("recruitPageStatus " + recruitPageStatus);
if (accountAuthorization != 'null' && accountAuthorization != 'superManager' && accountStatus == "1") {
if (isEntrepriseProfileExisted == "true") {
document.getElementById("show").style.display = "block";
}
else {
document.getElementById("new").style.display = "block";
let hiddeMethod = document.getElementById("method")
hiddeMethod.value = "create";
}
}
else if (isEntrepriseProfileExisted == "true" && accountAuthorization == 'superManager') {
document.getElementById("show").style.display = "block";
document.getElementById("modifyButton").style.display = "none";
}
else if (isEntrepriseProfileExisted == "notExist" && accountAuthorization == 'superManager')
document.getElementById("notExist").style.display = "block";
else;
}
function modify() {
document.getElementById("show").style.display = "none";
document.getElementById("new").style.display = "block";
document.getElementById("nameNew").value = document.getElementById("nameShow").innerText;
document.getElementById("overviewNew").value = document.getElementById("overviewShow").innerText;
document.getElementById("contactEmailNew").value = document.getElementById("contactEmailShow").innerText;
let hiddeMethod = document.getElementById("method")
hiddeMethod.value = "update";
}
</script>
</script>
</head>
<body>
<div id="show" style="display: none">
<% com.example.bean.EntrepriseProfileBean entrepriseProfileBean=(com.example.bean.EntrepriseProfileBean)
session.getAttribute("entrepriseProfileBean"); if(entrepriseProfileBean !=null) {
session.setAttribute("companyName",entrepriseProfileBean.getName());
session.setAttribute("contactEmail",entrepriseProfileBean.getContactEmail()); %>
名称:<p id="nameShow"><%= entrepriseProfileBean.getName() %></p>
概述:<p id="overviewShow"><%= entrepriseProfileBean.getOverview() %></p>
联系邮箱:<p id="contactEmailShow"><%= entrepriseProfileBean.getContactEmail() %></p>
<% } %>
<input type="button" value="修改" onclick="modify()" id="modifyButton">
</div><!--这是已创建企业资料后显示的部分-->
<div id="new" style="display: none;">
<label for="nameNew">名称:</label><input type="text" id="nameNew" autocomplete="off"><br>
<label for="overviewNew">概述:</label><input type="text" id="overviewNew" autocomplete="off"><br>
<label for="contactEmailNew">联系邮箱:</label><input type="text" id="contactEmailNew" autocomplete="off"><br>
<input type="hidden" id="method"><br>
<input type="button" value="提交" onclick="profileSend()">
<!--这是未创建企业资料要提交的表单-->
</div>
</body>
</html>

@ -1,91 +0,0 @@
<div%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" buffer="32kb" autoFlush="true"
%>
<!DOCTYPE html>
<html>
<head>
<title>logSign</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script>
function logSignSwitch() {
document.getElementById("log").style.display = "none";
document.getElementById("sign").style.display = "block";
}
window.onload = function () {
const account = '<%=session.getAttribute("account")%>';
const accountID = '<%=session.getAttribute("accountID")%>';
const accountAuthorization = '<%=session.getAttribute("accountAuthorization")%>';
const accountStatus = '<%=session.getAttribute("accountStatus")%>';
const studentProfileBean = '<%=session.getAttribute("studentProfileBean")%>';
const isStudentProfileExisted = '<%=session.getAttribute("isStudentProfileExisted")%>';
const entrepriseProfileBean = '<%=session.getAttribute("entrepriseProfileBean")%>';
const isEntrepriseProfileExisted = '<%=session.getAttribute("isEntrepriseProfileExisted")%>';
const companyName = '<%=session.getAttribute("companyName")%>';
const contactEmail = '<%=session.getAttribute("contactEmail")%>';
const recruitPageStatus = '<%=session.getAttribute("recruitPageStatus")%>';
console.log("account " + account);
console.log("accountID " + accountID);
console.log("accountAuthorization " + accountAuthorization);
console.log("accountStatus " + accountStatus);
console.log("studentProfileBean " + studentProfileBean);
console.log("isStudentProfileExisted " + isStudentProfileExisted);
console.log("entrepriseProfileBean " + entrepriseProfileBean);
console.log("isEntrepriseProfileExisted " + isEntrepriseProfileExisted);
console.log("companyName " + companyName);
console.log("contactEmail " + contactEmail);
console.log("recruitPageStatus " + recruitPageStatus);
if (accountAuthorization != 'null' && accountStatus == "1") {
document.getElementById("log").style.display = "none";
document.getElementById("logged").style.display = "block";
document.getElementById("accountLogged").innerText = account;
document.getElementById("authorizationLogged").innerText = accountAuthorization;
}
else
document.getElementById("log").style.display = "block";
}
</script>
<script src="/recruit/js/logSign.js"></script>
</head>
<body>
<div id="log" style="display:none">
<form>
<label for="accountLog">用户名:</lable>
<input type="text" id="accountLog" autocomplete="off">
<br>
<label for="passwordLog">密码:</lable>
<input type="password" id="passwordLog" autocomplete="off">
<br>
<input type="button" id="submitLog" value="登录" onclick="logSend()">
</form>
<input type="button" id="switch" value="注册" onclick="logSignSwitch()">
</div><!--这是登录的部分-->
<div id="sign" style="display:none">
<form>
<label for="accountSign">用户名:</lable>
<input type="text" id="accountSign" autocomplete="off">
<label for="passwordSign">密码:</lable>
<input type="password" id="passwordSign" autocomplete="off">
账户类型:
<input type="radio" name="authorization" value="student">学生
<input type="radio" name="authorization" value="entreprise">企业
<input type="button" id="submitSign" value="确认" onclick="signSend()">
</form>
</div><!--这是注册的部分-->
<div id="logged" style="display: none">
<p>你已登录</p>
<p>账号:</p>
<p id="accountLogged"></p>
<p>身份:</p>
<p id="authorizationLogged"></p><br>
<input type="button" id="modifyPasswordButton" value="修改密码" onclick="switchModifyBetweenLogged()">
<input type="button" id="deregistration" value="退出" onclick="deregistration()">
</div><!--这是已登录后显示的账号信息部分-->
<div id="modify" style="display: none">
<label for="passwordModifyBox">新密码:</lable><input type="text" id="passwordModifyBox" autocomplete="off">
<input type="button" value="确认" onclick="modifyPassword()">
</div>
</body>
</html>

@ -1,64 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" buffer="32kb" autoFlush="true" %>
<!DOCTYPE html>
<html>
<head>
<title>mainPage</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/recruit/js/mainPage.js"></script>
<script>
const account = '<%=session.getAttribute("account")%>';
const accountID = '<%=session.getAttribute("accountID")%>';
const accountAuthorization = '<%=session.getAttribute("accountAuthorization")%>';
const accountStatus = '<%=session.getAttribute("accountStatus")%>';
const studentProfileBean = '<%=session.getAttribute("studentProfileBean")%>';
const isStudentProfileExisted = '<%=session.getAttribute("isStudentProfileExisted")%>';
const entrepriseProfileBean = '<%=session.getAttribute("entrepriseProfileBean")%>';
const isEntrepriseProfileExisted = '<%=session.getAttribute("isEntrepriseProfileExisted")%>';
const companyName = '<%=session.getAttribute("companyName")%>';
const contactEmail = '<%=session.getAttribute("contactEmail")%>';
const recruitPageStatus = '<%=session.getAttribute("recruitPageStatus")%>';
const objectAccount = '<%=session.getAttribute("objectAccount")%>';
console.log("account " + account);
console.log("accountID " + accountID);
console.log("accountAuthorization " + accountAuthorization);
console.log("accountStatus " + accountStatus);
console.log("studentProfileBean " + studentProfileBean);
console.log("isStudentProfileExisted " + isStudentProfileExisted);
console.log("entrepriseProfileBean " + entrepriseProfileBean);
console.log("isEntrepriseProfileExisted " + isEntrepriseProfileExisted);
console.log("companyName " + companyName);
console.log("contactEmail " + contactEmail);
console.log("recruitPageStatus " + recruitPageStatus);
console.log("objectAccount " + objectAccount);
</script>
</head>
<body>
<input type="text" id="hiddenAccountStatus" style="display: none" value="<%=session.getAttribute("accountStatus")%>">
<input type="text" id="hiddenAccountAuthorization" style="display: none" value="<%=session.getAttribute("accountAuthorization")%>">
<a href="/recruit/logSign">登录/注册</a>
<br>
<a href="/recruit/search">搜索</a>
<br>
<a href="/recruit/profile" id="profileAccess">账户资料</a>
<a href="/recruit/manage" id="manageAccess" style="display:none">管理</a>
<a href="/recruit/entrepriseManage" id="entrepriseManageAccess" style="display:none">发布招聘项管理</a>
<h2>当前热门</h2>
<table>
<thead>
<tr>
<th>岗位</th>
<th>地区</th>
<th>工资</th>
<th>公司</th>
</tr>
</thead>
<tbody id="recruitTable">
</tbody>
</table>
</body>
</html>

@ -1,70 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" buffer="32kb" autoFlush="true" %>
<html>
<head>
<title>manager to use</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/recruit/js/manage.js"></script>
<script>
window.onload = function () {
const account = '<%=session.getAttribute("account")%>';
const accountID = '<%=session.getAttribute("accountID")%>';
const accountAuthorization = '<%=session.getAttribute("accountAuthorization")%>';
const accountStatus = '<%=session.getAttribute("accountStatus")%>';
const studentProfileBean = '<%=session.getAttribute("studentProfileBean")%>';
const isStudentProfileExisted = '<%=session.getAttribute("isStudentProfileExisted")%>';
const entrepriseProfileBean = '<%=session.getAttribute("entrepriseProfileBean")%>';
const isEntrepriseProfileExisted = '<%=session.getAttribute("isEntrepriseProfileExisted")%>';
const companyName = '<%=session.getAttribute("companyName")%>';
const contactEmail = '<%=session.getAttribute("contactEmail")%>';
const recruitPageStatus = '<%=session.getAttribute("recruitPageStatus")%>';
console.log("account " + account);
console.log("accountID " + accountID);
console.log("accountAuthorization " + accountAuthorization);
console.log("accountStatus " + accountStatus);
console.log("studentProfileBean " + studentProfileBean);
console.log("isStudentProfileExisted " + isStudentProfileExisted);
console.log("entrepriseProfileBean " + entrepriseProfileBean);
console.log("isEntrepriseProfileExisted " + isEntrepriseProfileExisted);
console.log("companyName " + companyName);
console.log("contactEmail " + contactEmail);
console.log("recruitPageStatus " + recruitPageStatus);
}
</script>
</head>
<body>
<input type="button" id="trigger" value="查询信息" onclick="ImplicitSend()">
<div id="accountManage">
<table border="1">
<thead>
<tr>
<th>账号</th>
<th>id</th>
<th>身份</th>
<th>状态</th>
</tr>
</thead>
<tbody id="accountTable">
</tbody>
</table>
</div>
<br>
<div id="recruitManage">
<table border="1">
<thead>
<tr>
<th>岗位</th>
<th>id</th>
<th>公司名</th>
<th>公司ID</th>
</tr>
</thead>
<tbody id="recruitTable">
</tbody>
</table>
</div>
<span id="manageId" style="display: none"><%=session.getAttribute("accountID")%></span>
</body>
</html>

@ -1,81 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" buffer="32kb" autoFlush="true" %>
<!DOCTYPE html>
<html>
<head>
<title>recruitDetails</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/recruit/js/recruitDetails.js"></script>
<script>
window.onload = function () {
const account = '<%=session.getAttribute("account")%>';
const accountID = '<%=session.getAttribute("accountID")%>';
const accountAuthorization = '<%=session.getAttribute("accountAuthorization")%>';
const accountStatus = '<%=session.getAttribute("accountStatus")%>';
const studentProfileBean = '<%=session.getAttribute("studentProfileBean")%>';
const isStudentProfileExisted = '<%=session.getAttribute("isStudentProfileExisted")%>';
const entrepriseProfileBean = '<%=session.getAttribute("entrepriseProfileBean")%>';
const isEntrepriseProfileExisted = '<%=session.getAttribute("isEntrepriseProfileExisted")%>';
const companyName = '<%=session.getAttribute("companyName")%>';
const contactEmail = '<%=session.getAttribute("contactEmail")%>';
const recruitPageStatus = '<%=session.getAttribute("recruitPageStatus")%>';
console.log("account " + account);
console.log("accountID " + accountID);
console.log("accountAuthorization " + accountAuthorization);
console.log("accountStatus " + accountStatus);
console.log("studentProfileBean " + studentProfileBean);
console.log("isStudentProfileExisted " + isStudentProfileExisted);
console.log("entrepriseProfileBean " + entrepriseProfileBean);
console.log("isEntrepriseProfileExisted " + isEntrepriseProfileExisted);
console.log("companyName " + companyName);
console.log("contactEmail " + contactEmail);
console.log("recruitPageStatus " + recruitPageStatus);
if (recruitPageStatus == "show") {
document.getElementById("show").style.display = "block";
if (accountAuthorization == "superManager" || accountAuthorization == "entreprise")
document.getElementById("deleteButton").style.display = "block";
}
if (recruitPageStatus == "new")
document.getElementById("new").style.display = "block";
}
</script>
</head>
<body>
<div id="new" style="display:none">
<form>
<label for="name">岗位名称:</label><input type="text" id="name" autocomplete="off"><br>
<label for="content">工作内容:</label><input type="text" id="content" autocomplete="off"><br>
<label for="location">工作地点:</label><input type="text" id="location" autocomplete="off"><br>
<label for="salary">薪资:</label><input type="text" id="salary" autocomplete="off"><br>
<label for="companyName">公司名称:</label><input type="text" id="companyName" autocomplete="off"><br>
<label for="contactEmail">联系邮箱:</label><input type="text" id="contactEmail" autocomplete="off"><br>
<input type="text" id="account" value="<%= session.getAttribute("account") %>" style="display:none"><br>
<input type="button" id="createButton" value="创建" onclick="recruitSend()">
<% if(session.getAttribute("companyName")!=null&&session.getAttribute("contactEmail")!=null) { %>
<script>
document.getElementById("companyName").value = '<%=session.getAttribute("companyName")%>';
document.getElementById("contactEmail").value = '<%=session.getAttribute("contactEmail")%>';
</script>
<% } %>
</form>
</div>
<div id="show" style="display:none">
<% com.example.bean.RecruitBean recruitBean=(com.example.bean.RecruitBean)
request.getAttribute("recruitBean"); if(recruitBean !=null) { %>
<p>岗位名称:<%= recruitBean.getName() %></p>
<p>工作内容:<%= recruitBean.getContent() %></p>
<p>工作地点:<%= recruitBean.getLocation() %></p>
<p>薪资:<%= recruitBean.getSalary() %></p>
<p>公司名称:<%= recruitBean.getCompany() %></p>
<p>联系邮箱:<%= recruitBean.getContactEmail() %></p>
<p id="hiddenId" style="display: none"><%= recruitBean.getId() %></p>
<% } %>
<input type="button" id="deleteButton" value="删除" onclick="deleteRecruit()" style="display: none">
</div>
<!--这是点开招聘项后显示的招聘信息详情虽然只多了一个content板块。。。-->
</body>
</html>

@ -1,25 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" buffer="32kb" autoFlush="true" %>
<html>
<head>
<title>entreprise profile</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/recruit/js/recruitManageForEntreprise.js"></script>
</head>
<body>
<div id="recruitManage">
<table border="1">
<thead>
<tr>
<th>岗位</th>
<th>id</th>
<th>公司名</th>
</tr>
</thead>
<tbody id="recruitTable">
</tbody>
</table>
</div>
<span id="account" style="display: none"><%=session.getAttribute("account")%></span>
</body>
</html>

@ -1,65 +0,0 @@
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" buffer="32kb" autoFlush="true" %>
<!DOCTYPE html>
<html>
<head>
<title>search</title>
<meta charset="utf-8">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/recruit/js/search.js"></script>
<script>
window.onload = function () {
const account = '<%=session.getAttribute("account")%>';
const accountID = '<%=session.getAttribute("accountID")%>';
const accountAuthorization = '<%=session.getAttribute("accountAuthorization")%>';
const accountStatus = '<%=session.getAttribute("accountStatus")%>';
const studentProfileBean = '<%=session.getAttribute("studentProfileBean")%>';
const isStudentProfileExisted = '<%=session.getAttribute("isStudentProfileExisted")%>';
const entrepriseProfileBean = '<%=session.getAttribute("entrepriseProfileBean")%>';
const isEntrepriseProfileExisted = '<%=session.getAttribute("isEntrepriseProfileExisted")%>';
const companyName = '<%=session.getAttribute("companyName")%>';
const contactEmail = '<%=session.getAttribute("contactEmail")%>';
const recruitPageStatus = '<%=session.getAttribute("recruitPageStatus")%>';
console.log("account " + account);
console.log("accountID " + accountID);
console.log("accountAuthorization " + accountAuthorization);
console.log("accountStatus " + accountStatus);
console.log("studentProfileBean " + studentProfileBean);
console.log("isStudentProfileExisted " + isStudentProfileExisted);
console.log("entrepriseProfileBean " + entrepriseProfileBean);
console.log("isEntrepriseProfileExisted " + isEntrepriseProfileExisted);
console.log("companyName " + companyName);
console.log("contactEmail " + contactEmail);
console.log("recruitPageStatus " + recruitPageStatus);
if (accountAuthorization == "entreprise" && accountStatus == "1")
document.getElementById("new").style.display = "block";
}</script>
</head>
<body>
<div>
<a href="/recruit/details" id="new" style="display: none">new</a>
<form onsubmit="return false;">
<lable for="searchBox">search:</lable>
<input type="text" id="searchBox" name="searchBox" autocomplete="off">
<input type="button" value="confirm" onclick="keySend()">
</form>
</div>
<div id="resultTable" style="display:none">
<table border="1">
<thead>
<tr>
<th>岗位</th>
<th>地区</th>
<th>工资</th>
<th>公司</th>
</tr>
</thead>
<tbody id="show">
</tbody>
</table>
</div><!--这里是搜索后由javascript动态生成的招聘项板块先不管这个我之后根据你们的设计风格来修改它-->
</body>
</html>

@ -1,101 +0,0 @@
<div%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" buffer="32kb" autoFlush="true"
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script src="/recruit/js/studentProfile.js"></script>
<script>
window.onload = function () {
const account = '<%=session.getAttribute("account")%>';
const accountID = '<%=session.getAttribute("accountID")%>';
const accountAuthorization = '<%=session.getAttribute("accountAuthorization")%>';
const accountStatus = '<%=session.getAttribute("accountStatus")%>';
const studentProfileBean = '<%=session.getAttribute("studentProfileBean")%>';
const isStudentProfileExisted = '<%=session.getAttribute("isStudentProfileExisted")%>';
const entrepriseProfileBean = '<%=session.getAttribute("entrepriseProfileBean")%>';
const isEntrepriseProfileExisted = '<%=session.getAttribute("isEntrepriseProfileExisted")%>';
const companyName = '<%=session.getAttribute("companyName")%>';
const contactEmail = '<%=session.getAttribute("contactEmail")%>';
const recruitPageStatus = '<%=session.getAttribute("recruitPageStatus")%>';
const objectAccount = '<%=session.getAttribute("objectAccount")%>';
console.log("account " + account);
console.log("accountID " + accountID);
console.log("accountAuthorization " + accountAuthorization);
console.log("accountStatus " + accountStatus);
console.log("studentProfileBean " + studentProfileBean);
console.log("isStudentProfileExisted " + isStudentProfileExisted);
console.log("entrepriseProfileBean " + entrepriseProfileBean);
console.log("isEntrepriseProfileExisted " + isEntrepriseProfileExisted);
console.log("companyName " + companyName);
console.log("contactEmail " + contactEmail);
console.log("recruitPageStatus " + recruitPageStatus);
console.log("objectAccount " + objectAccount);
if (accountAuthorization != 'null' && accountAuthorization != 'superManager' && accountStatus == "1") {
if (isStudentProfileExisted == "true")
document.getElementById("show").style.display = "block";
else {
document.getElementById("new").style.display = "block";
let hiddeMethod = document.getElementById("method")
hiddeMethod.value = "create";
}
}
else if (isStudentProfileExisted == "true" && accountAuthorization == 'superManager') {
document.getElementById("show").style.display = "block";
document.getElementById("modifyButton").style.display = "none";
document.getElementById("deleteButton").style.display = "block";
}
else if (isStudentProfileExisted == "notExist" && accountAuthorization == 'superManager') {
document.getElementById("notExist").style.display = "block";
document.getElementById("show").style.display = "block";
document.getElementById("deleteButton").style.display = "block";
}
else
document.getElementById("notLog").style.display = "block";
}
function modify() {
document.getElementById("show").style.display = "none";
document.getElementById("new").style.display = "block";
document.getElementById("nameNew").value = document.getElementById("nameShow").innerText;
document.getElementById("ageNew").value = document.getElementById("ageShow").innerText;
document.getElementById("locationNew").value = document.getElementById("locationShow").innerText;
document.getElementById("interestNew").value = document.getElementById("interestShow").innerText;
let hiddeMethod = document.getElementById("method")
hiddeMethod.value = "update";
}
</script>
</head>
<body>
<div id="show" style="display: none;">
<% com.example.bean.StudentProfileBean studentProfileBean=(com.example.bean.StudentProfileBean)
session.getAttribute("studentProfileBean"); if(studentProfileBean !=null) { %>
姓名:<span id="nameShow"><%= studentProfileBean.getName() %></span><br>
年龄:<span id="ageShow"><%= studentProfileBean.getAge() %></span><br>
现居:<span id="locationShow"><%= studentProfileBean.getLocation() %></span><br>
兴趣:<span id="interestShow"><%= studentProfileBean.getInterest() %></span><br>
<input type="button" value="修改" onclick="modify()" id="modifyButton">
<p id="hiddenAccount" style="display: none"><%= studentProfileBean.getStudenID() %></p>
<% } %>
<input type="button" id="deleteButton" value="删除" onclick="deleteAccount()" style="display: none"> <!--删除账号本身-->
</div><!--这是已创建个人资料后显示的部分-->
<div id="new" style="display: none;">
<label for="nameNew">姓名:</label><input type="text" id="nameNew" autocomplete="off"><br>
<label for="ageNew">年龄:</label><input type="text" id="ageNew" autocomplete="off"><br>
<label for="locationNew">现居:</label><input type="text" id="locationNew" autocomplete="off"><br>
<label for="interestNew">兴趣:</label><input type="text" id="interestNew" autocomplete="off"><br>
<input type="hidden" id="method"><br>
<input type="button" value="提交" onclick="profileSend()">
</div><!--这是未创建个人资料要提交的表单-->
<div id="notLog" style="display:none">
<h3>你未登录</h3>
</div>
<div id="notExist" style="display:none">
<h3>不存在</h3>
<input type="button" id="deleteButton" value="删除" onclick="deleteAccount()" style="display: none"> <!--删除账号本身-->
<p id="hiddenAccount" style="display: none"><%= session.getAttribute("objectAccount") %></p>
</div>
</body>
</html>

@ -1,7 +0,0 @@
<!DOCTYPE web-app PUBLIC
"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
"http://java.sun.com/dtd/web-app_2_3.dtd" >
<web-app>
<display-name>Archetype Created Web Application</display-name>
</web-app>

@ -1,36 +0,0 @@
function createXMLHttpRequest() {
let xmlHttpRequest;
if (window.XMLHttpRequest) { // 非IE浏览器
xmlHttpRequest = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE浏览器
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttpRequest;
}
function profileSend() {
let profileNew = JSON.stringify({
name: document.getElementById("nameNew").value,
overview: document.getElementById("overviewNew").value,
contactEmail: document.getElementById("contactEmailNew").value,
method: document.getElementById("method").value,
});
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/profile", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let entrepriseProfileResponse = xmlHttpRequest.responseText;
let alertText = JSON.parse(entrepriseProfileResponse).status;
console.log(alertText);
window.alert(alertText);
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
console.log(profileNew);
xmlHttpRequest.send(profileNew);
}

@ -1,110 +0,0 @@
function createXMLHttpRequest() {
let xmlHttpRequest;
if (window.XMLHttpRequest) { // 非IE浏览器
xmlHttpRequest = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE浏览器
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttpRequest;
}
function logSend() {
if (!document.getElementById("accountLog").value || !document.getElementById("passwordLog").value) {
alert("重新输入");
return;
}
let log = JSON.stringify({
account: document.getElementById("accountLog").value,
password: document.getElementById("passwordLog").value,
authorization: null
});
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/logSign", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let logSignResponse = xmlHttpRequest.responseText;
let alertText = JSON.parse(logSignResponse).status;
window.alert(alertText);
window.location.reload(true);
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
console.log(log);
xmlHttpRequest.send(log);
}
function signSend() {
let radios = document.getElementsByName('authorization');
let authorization;
if ((!radios[0].checked && !radios[1].checked) ||
!document.getElementById("accountSign").value || !document.getElementById("passwordSign").value) {
alert("重新输入");
return;
}
if (radios[0].checked)
authorization = radios[0].value;
else
authorization = radios[1].value;
let sign = JSON.stringify({
account: document.getElementById("accountSign").value,
password: document.getElementById("passwordSign").value,
authorization: authorization
});
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/logSign", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let logSignResponse = xmlHttpRequest.responseText;
let alertText = JSON.parse(logSignResponse).status;
window.alert(alertText);
window.location.href = "/recruit/logSign";
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
console.log(sign);
xmlHttpRequest.send(sign);
}
function deregistration() {
let deregistrationJson = JSON.stringify({ status: "0" });
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/logSign", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.send(deregistrationJson);
window.location.href = "/recruit/main";
}
function modifyPassword() {
let modifyPasswordJson = JSON.stringify({ newPassword: document.getElementById("passwordModifyBox").value });
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/logSign", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let logSignResponse = xmlHttpRequest.responseText;
let alertText = JSON.parse(logSignResponse).status;
window.alert(alertText);
window.location.href = "/recruit/main";
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
console.log(modifyPasswordJson);
xmlHttpRequest.send(modifyPasswordJson);
}
function switchModifyBetweenLogged() {
document.getElementById("logged").style.display = "none";
document.getElementById("modify").style.display = "block";
}

@ -1,74 +0,0 @@
function createXMLHttpRequest() {
let xmlHttpRequest;
if (window.XMLHttpRequest) { // 非IE浏览器
xmlHttpRequest = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE浏览器
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttpRequest;
}
function ImplicitSend(accountHiddenStatus) {
let accountStatus = JSON.stringify({
method: "recommand",
accountStatus: accountHiddenStatus
});
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/details", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let result = xmlHttpRequest.responseText;
console.log(result);
updateJsp(result);
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
xmlHttpRequest.send(accountStatus);
}
window.onload = function () {
const hiddenAccountStatus = document.getElementById("hiddenAccountStatus").value;
const hiddenAccountAuthorization = document.getElementById("hiddenAccountAuthorization").value;
ImplicitSend(hiddenAccountAuthorization);
if (hiddenAccountAuthorization == "superManager" && hiddenAccountStatus == "1") {
document.getElementById("profileAccess").style.display = "none";
document.getElementById("manageAccess").style.display = "block";
}
if (hiddenAccountAuthorization == "entreprise" && hiddenAccountStatus == "1") {
document.getElementById("entrepriseManageAccess").style.display = "block";
document.getElementById("manageAccess").style.display = "none";
}
}
function updateJsp(result) {
let recruitResult = JSON.parse(result);
if (recruitResult != null) {
const container = document.querySelector('#recruitTable');
container.innerHTML = ""; //清空旧结果
for (let item of recruitResult) {
const tr = document.createElement('tr');
const td1 = document.createElement('td');
const td2 = document.createElement('td');
const td3 = document.createElement('td');
const td4 = document.createElement('td');
const a = document.createElement('a');
let uri = "/recruit/details?id=" + item.id;
a.href = uri;
a.textContent = item.name;
td2.textContent = item.location;
td3.textContent = item.salary;
td4.textContent = item.company;
td1.appendChild(a);
tr.appendChild(td1);
tr.appendChild(td2);
tr.appendChild(td3);
tr.appendChild(td4);
container.appendChild(tr);
}
}
}

@ -1,82 +0,0 @@
function createXMLHttpRequest() {
let xmlHttpRequest;
if (window.XMLHttpRequest) { // 非IE浏览器
xmlHttpRequest = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE浏览器
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttpRequest;
}
function ImplicitSend() {
document.getElementById("trigger").style.display="none";
let manageId = document.getElementById("manageId").value;
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/manage", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let result = xmlHttpRequest.responseText;
updateJsp(result);
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
xmlHttpRequest.send(manageId); //只是为了触发doPost所以没有用json的形式
}
function updateJsp(result) {
let accountResult = JSON.parse(result).accountJson;
let recruitResult = JSON.parse(result).recruitJson;
if (accountResult != null) {
const container = document.querySelector('#accountTable');
container.innerHTML = ""; //清空旧结果
for (let item of accountResult) {
const tr = document.createElement('tr');
const td1 = document.createElement('td');
const td2 = document.createElement('td');
const td3 = document.createElement('td');
const td4 = document.createElement('td');
const a = document.createElement('a');
let uri = "/recruit/profile?account=" + item.account + "&authorization=" + item.authorization;
a.href = uri;
a.textContent = item.account;
td2.textContent = item.id;
td3.textContent = item.authorization;
td4.textContent = item.status;
td1.appendChild(a);
tr.appendChild(td1);
tr.appendChild(td2);
tr.appendChild(td3);
tr.appendChild(td4);
container.appendChild(tr);
}
}
if (recruitResult != null) {
const container = document.querySelector('#recruitTable');
container.innerHTML = ""; //清空旧结果
for (let item of recruitResult) {
const tr = document.createElement('tr');
const td1 = document.createElement('td');
const td2 = document.createElement('td');
const td3 = document.createElement('td');
const td4 = document.createElement('td');
const a = document.createElement('a');
let uri = "/recruit/details?id=" + item.id;
a.href = uri;
a.textContent = item.name;
td2.textContent = item.id;
td3.textContent = item.company;
td4.textContent = item.companyID;
td1.appendChild(a);
tr.appendChild(td1);
tr.appendChild(td2);
tr.appendChild(td3);
tr.appendChild(td4);
container.appendChild(tr);
}
}
}

@ -1,69 +0,0 @@
function createXMLHttpRequest() {
let xmlHttpRequest;
if (window.XMLHttpRequest) { // 非IE浏览器
xmlHttpRequest = new XMLHttpRequest();
} else if (window.ActiveXObject) { // IE浏览器
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttpRequest;
}
function recruitSend() {
if (!document.getElementById("name").value || !document.getElementById("content").value
|| !document.getElementById("location").value || !document.getElementById("salary").value
|| !document.getElementById("companyName").value|| !document.getElementById("contactEmail").value) {
alert("重新输入");
return;
}
let recruitNew = JSON.stringify({
name: document.getElementById("name").value,
content: document.getElementById("content").value,
location: document.getElementById("location").value,
salary: document.getElementById("salary").value,
company: document.getElementById("companyName").value,
companyID: document.getElementById("account").value,
contactEmail: document.getElementById("contactEmail").value
});
//没有输入类型验证
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/details", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let recruitResponse = xmlHttpRequest.responseText;
let alertText = JSON.parse(recruitResponse).status;
window.alert(alertText);
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
xmlHttpRequest.send(recruitNew);
}
function deleteRecruit()
{
let deleteJson = JSON.stringify({
method:"delete",
id:document.getElementById("hiddenId").innerText
});
console.log(deleteJson);
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/details", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let deleteResponse = xmlHttpRequest.responseText;
let alertText = JSON.parse(deleteResponse).status;
window.alert(alertText);
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
xmlHttpRequest.send(deleteJson);
}
//参考 https://blog.csdn.net/c_staunch/article/details/80968051

@ -1,56 +0,0 @@
function createXMLHttpRequest() {
let xmlHttpRequest;
if (window.XMLHttpRequest) { // 非IE浏览器
xmlHttpRequest = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE浏览器
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttpRequest;
}
window.onload = function () {
let implicitJson = JSON.stringify({
method: "entrepriseManage",
account: document.getElementById("account").innerText
});
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/details", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let result = xmlHttpRequest.responseText;
updateJsp(result);
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
xmlHttpRequest.send(implicitJson);
}
function updateJsp(result) {
let recruitResult = JSON.parse(result);
if (recruitResult != null) {
const container = document.querySelector('#recruitTable');
container.innerHTML = ""; //清空旧结果
for (let item of recruitResult) {
const tr = document.createElement('tr');
const td1 = document.createElement('td');
const td2 = document.createElement('td');
const td3 = document.createElement('td');
const a = document.createElement('a');
let uri = "/recruit/details?id=" + item.id;
a.href = uri;
a.textContent = item.name;
td2.textContent = item.id;
td3.textContent = item.company;
td1.appendChild(a);
tr.appendChild(td1);
tr.appendChild(td2);
tr.appendChild(td3);
container.appendChild(tr);
}
}
}

@ -1,64 +0,0 @@
function createXMLHttpRequest() {
let xmlHttpRequest;
if (window.XMLHttpRequest) { // 非IE浏览器
xmlHttpRequest = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE浏览器
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttpRequest;
}
function keySend() {
if (!document.getElementById("searchBox").value) {
alert("重新输入");
return;
}
let searchKey = JSON.stringify({ searchKey: document.getElementById("searchBox").value });
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/search", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let searchResponse = xmlHttpRequest.responseText;
updateJsp(searchResponse);
document.getElementById("resultTable").style.display="block";
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
xmlHttpRequest.send(searchKey);
}
function updateJsp(searchResponse) {
let searchUpdate = JSON.parse(searchResponse);
console.log(searchUpdate);
const container = document.querySelector('#show');
container.innerHTML = ""; //清空旧结果
for (let item of searchUpdate) {
const tr = document.createElement('tr');
const a = document.createElement('a');
const td1 = document.createElement('td');
const td2 = document.createElement('td');
const td3 = document.createElement('td');
const td4 = document.createElement('td');
let uri = "/recruit/details?id=" + item.id;
a.href = uri;
a.onclick = "hitsAdd()";
a.textContent = item.name;
td2.textContent = item.location;
td3.textContent = item.salary;
td4.textContent = item.company;
td1.appendChild(a);
tr.appendChild(td1);
tr.appendChild(td2);
tr.appendChild(td3);
tr.appendChild(td4);
container.appendChild(tr);
}
}
//参考文章 https://blog.csdn.net/weixin_34718952/article/details/148485765,
// https://www.zhihu.com/question/588007022

@ -1,60 +0,0 @@
function createXMLHttpRequest() {
let xmlHttpRequest;
if (window.XMLHttpRequest) { // 非IE浏览器
xmlHttpRequest = new XMLHttpRequest();
}
else if (window.ActiveXObject) { // IE浏览器
xmlHttpRequest = new ActiveXObject("Microsoft.XMLHTTP");
}
return xmlHttpRequest;
}
function profileSend() {
let profileNew = JSON.stringify({
name: document.getElementById("nameNew").value,
age: document.getElementById("ageNew").value,
location: document.getElementById("locationNew").value,
interest: document.getElementById("interestNew").value,
method: document.getElementById("method").value,
});
console.log(profileNew);
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/profile", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let studentProfileResponse = xmlHttpRequest.responseText;
let alertText = JSON.parse(studentProfileResponse).status;
window.alert(alertText);
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
xmlHttpRequest.send(profileNew);
}
function deleteAccount()
{
let deleteJson = JSON.stringify({
method:"delete",
account:document.getElementById("hiddenAccount").innerText
});
console.log(deleteJson);
let xmlHttpRequest = createXMLHttpRequest();
xmlHttpRequest.open("POST", "/recruit/logSign", true);
xmlHttpRequest.setRequestHeader("Content-Type", "application/json; charset=UTF-8");
xmlHttpRequest.onreadystatechange = function () {
if (xmlHttpRequest.readyState === XMLHttpRequest.DONE) {
if (xmlHttpRequest.status === 200) {
let deleteResponse = xmlHttpRequest.responseText;
let alertText = JSON.parse(deleteResponse).status;
window.alert(alertText);
} else {
console.error('Server response error:', xmlHttpRequest.statusText);
}
}
};
xmlHttpRequest.send(deleteJson);
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save