MyHospital01
index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>首页</title>
<style type="text/css">
#yuan{
margin-left: 350px;
margin-top: 50px;
}
#content {
height: 270px;
width: 900px;
position: fixed;
/*background-color: red;*/
left: 50%;
top: 50%;
transform: translate(-50%,-50%);
}
div{
border-radius: 5%;
width: 250px;
height: 260px;
display: inline-block;
}
#div1{
background-color: lightskyblue;
opacity: 0.85;
}
.div1_1{
/*position: relative;*/
margin-left: 80px;
margin-top: 40px;
}
#div2{
position: relative;
margin-left: 50px;
background-color: burlywood;
opacity: 0.85;
}
#div3{
position: relative;
margin-left: 50px;
background-color: darkgreen;
opacity: 0.85;
}
.span1{
margin-left: -10px;
/*margin-top: 50px;*/
/*position: relative;*/
font-family: "楷体";
font-size: 35px;
color: white;
}
.span2{
height: 25px;
width: 100px;
background-color: green;
border-bottom-left-radius: 11px;
border-top-left-radius: 11px;
border-bottom-right-radius: 11px;
border-top-right-radius: 11px;
text-align: center;
line-height: 25px;
font-size: 15px;
/*position: relative;*/
margin-left: -5px;
margin-top: 40px;
box-shadow: 3px 3px 4px 0px;
/*color: white;*/
}
</style>
</head>
<body style="background: url(img/首页背景图片.jpg);">
<div id="yuan">
<img src="img/院标.png"/>
</div>
<div id="content">
<div id="div1">
<div class="div1_1">
<img src="img/患者.png"/> <br />
<span class="span1">患者版</span><br />
<a href="patient.html" target="_blank"><div class="span2"><font color="white"><b>点击进入</b></font></div></a>
</div>
</div>
<div id="div2">
<div class="div1_1">
<img src="img/学术.png"/> <br />
<span class="span1">学术版</span><br />
<a href="学术版.html" target="_blank"><div class="span2"><font color="white"><b>点击进入</b></font></div></a>
</div>
</div>
<div id="div3">
<div class="div1_1">
<img src="img/员工.png"/> <br />
<span class="span1">员工版</span><br />
<a href="员工版登陆.html" target="_blank"><div class="span2"><font color="white"><b>点击进入</b></font></div></a>
</div>
</div>
</div>
</body>
</html>
`
patient.html
<head>
<meta charset="UTF-8">
<title>患者版首页</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}
#div1 {
background-color: green;
height: 30px;
}
#sp1 {
padding-left: 70%;
}
a {
text-decoration: none;
}
.a {
padding-left: 15px;
}
.b {
color: white;
}
#div2 {
padding: 5px 24%;
}
.one {
color: black;
font-size: 20px;
}
#div4 {
margin-top: 20px;
padding-left: 19.5%;
}
li {
float: left;
list-style: none;
}
#ul1 li {
width: 300px;
height: 207px;
margin: 5px;
}
.ico {
width: 300px;
height: 130px;
position: absolute;
padding-left: 110px;
padding-top: 55px;
}
.c {
padding-left: 110px;
padding-top: 130px;
color: white;
}
#div5 {
margin-top: 270px;
padding-left: 19%;
height: 600px;
}
.img1 {
width: 397px;
height: 267px;
}
#ul2 li {
margin: 10px;
}
.ul3 li {
width: 377px;
height: 70px;
float: initial;
}
#tupian{
width:100%;
height: 695px;
}
.ellipsis {
color: black;
}
.div5_2 {
box-shadow: 0px 0px 30px 2px #888888;
}
#div6 {
padding: 20px 20%;
}
#div7 {
background-color: #383838;
padding: 15px 20%;
}
.p {
color: white;
}
.div {
margin: 30px;
height: 50px;
width: 50px;
border: 2px white solid;
float: right;
position: relative;
top: -65px;
left: 50px;
}
#d {
border-color: red;
}
.lunboyuan {
margin: 20px;
height: 20px;
width: 20px;
border-radius: 50%;
border: 2px white solid;
float: left;
position: relative;
top: -120px;
left:790px;
}
#lunbo_xuanzhong {
border-color: red;
}
#dikuang{
height: 395px;
width: 1250px;
}
#dikuang_you{
float: right;
height: 367px;
width: 710px;
margin-top: -371px;
margin-right: 29px;
}
.dikuang_you_xuan{
width: 130px;
height: 40px;
border: 1px solid darkgray;
float: left;
margin: 5px;
border-radius: 5%;
text-align: center;
line-height: 40px;
font-family: "楷体";
font-size: 20px;
font-weight:bold;
margin-bottom: 27px;
}
.dikuang_you_xuan:hover{
border: 1px solid dodgerblue;
color:dodgerblue;
}
#loginSuccess{
display: none;
margin-left: 90%;
margin-top: -23px;
color: white;
}
</style>
</head>
<body>
<div id="div1">
<div id="div1_1" style="height: 5px;">
</div>
<span id="sp1">
<a href="patient.html"><font class="b">患者版</font></a>
</span>
<span id="sp2" class="a">
<a href="学术版.html"><font class="b">学术版</font></a>
</span>
<span id="sp3" class="a">
<a href="员工版登陆.html"><font class="b">员工版</font></a>
</span>
<span id="" class="a">
<a href="" id="demo" onclick="demo()"><font class="b">个人中心</font></a>
</span>
<span id="login" class="">
<span id="sp4" class="a">
<a href="login.html"><font class="b">登录</font></a>
</span>
<span id="sp5" class="a">
<a href="register.html"><font class="b">注册</font></a>
</span>
</span>
<span id="loginSuccess" class="a">
</span>
</div>
<div id="div2">
<table border="0px">
<tr>
<td width="140px"> <img src="img/患者第一页/aa2.png" /></td>
<td width="120px">
<a href="guahao.html" class="one">预约挂号</a>
</td>
<td width="120px">
<a href="doctorShow.html" class="one">医生介绍</a>
</td>
<td width="120px">
<a href="departmentShow.html" class="one">科室导航</a>
</td>
<td width="120px">
<a href="医院公告.html" class="one">医院公告</a>
</td>
<td width="120px">
<a href="shop.html" class="one">药品商城</a>
</td>
<td>
<form action="AllQueryServlet" method="get"><input type="text" name="sname" id="" value="" placeholder="科室名称/医生名"/> <input type="submit" value="搜索"/></form>
</td>
</tr>
</table>
</div>
<div id="lunbojia">
<img src="img/上1.jpg" id="tupian"/>
</div>
<div class="lunboyuan"id="lunbo_xuanzhong"></div>
<div class="lunboyuan"></div>
<div class="lunboyuan"></div>
<div id="div4">
<ul id="ul1">
<li style="background-color: #56A5AA;">
<a href="门诊出诊.html" target="_blank">
<div class="ico"><img src="img/患者第一页/s5a210cd9912ba.png"></div>
<h3 class="c">门诊出诊表</h3>
</a>
</li>
<li style="background-color: #E5CA8F;">
<a href="就医须知.html" target="_blank">
<div class="ico"><img src="img/患者第一页/s5a3387ca565d2.png"></div>
<h3 class="c">就医须知</h3>
</a>
</li>
<li style="background-color: white;">
<a href="位置.html" target="_blank">
<div class="ico"><img src="img/患者第一页/s5a210cfd381b9.png"></div>
<h3 class="c" style="color: black;">医院位置</h3>
</a>
</li>
<li style="background-color: green;">
<a href="专科疾病.html" target="_blank">
<div class="ico"><img src="img/患者第一页/s5a3387ca565d2.png"></div>
<h3 class="c">专科专病</h3>
</a>
</li>
</ul>
</div>
<div id="div5">
<ul id="ul2">
<li>
<div id="" class="div5_1">
<a href="#"><img src="img/患者第一页/s5d06f9797fdde_1606_908_100_0.jpg" class="img1" /></a>
</div>
<div id="" class="div5_2">
<h3> 医院公告</h3>
<ul class="ul3">
<li>
<a target="_blank" href="医院公告.html" class="ellipsis">2019年睿E基金中标项目公示</a>
</li>
<li>
<a target="_blank" href="医院公告.html" class="ellipsis">2019 年北京协和医院内分泌科骨质疏松症健康系列讲座 </a>
</li>
<li>
<a target="_blank" href="医院公告.html" class="ellipsis">第3届北京协和下丘脑-垂体-性腺疾病高峰论坛暨第2届中国老年保健协会抗衰老专业委员会会议通知</a>
</li>
</ul>
</div>
</li>
<li>
<div id="" class="div5_1">
<a href="#"><img src="img/患者第一页/s5d06f8ae94f53_1428_809_193_0.jpg" class="img1" /></a>
</div>
<div id="" class="div5_2">
<h3> 重大新闻</h3>
<ul class="ul3">
<li>
<a target="_blank" href="重大新闻.html" class="ellipsis">95后护士救人的东单,凭什么成为最安全路口? </a>
</li>
<li>
<a target="_blank" href="重大新闻.html" class="ellipsis">国家卫生健康委党组对我院领导班子作出调整</a>
</li>
<li>
<a target="_blank" href="重大新闻.html" class="ellipsis">北京协和医院举办第五批“组团式”援藏医疗队欢送会</a>
</li>
</ul>
</div>
</li>
<li>
<div id="" class="div5_1">
<a href="#"><img src="img/患者第一页/s5d06f9797fdde_1606_908_100_0.jpg" class="img1" /></a>
</div>
<div id="" class="div5_2">
<h3> 协和医生说</h3>
<ul class="ul3">
<li>
<a target="_blank" href="健康科普.html" class="ellipsis">咳痰总不好,是结核了么?协和医生给你全面解析肺结核的防治 </a>
</li>
<li>
<a target="_blank" href="健康科普.html" class="ellipsis">腰痛这种仅次于感冒的第二大常见病症应该怎么处理? </a>
</li>
<li>
<a target="_blank" href="健康科普.html" class="ellipsis">幽门螺杆菌,该不该“赶尽杀绝”? </a>
</li>
</ul>
</div>
</li>
</ul>
</div>
<div id="div6">
<h2 class="title_h2">科室导航</h2>
<div id="dikuang">
<div id="">
<div id="content" style="display: inline;">
<img src="img/a1.jpg" id="zuoxialun_img" style="height: 367px;width: 493px;" />
</div>
<div id="" class="zuoxialun"></div>
<div id="" class="zuoxialun"></div>
<div id="" class="zuoxialun"></div>
<div id="" class="zuoxialun"></div>
<div id="" class="zuoxialun"></div>
<div id="" class="zuoxialun"></div>
</div>
<div id="dikuang_you">
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=消化内科">消化内科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=肾内科">肾内科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=血液内科">血液内科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=风湿免疫科">风湿免疫科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=感染内科">感染内科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=皮肤科">皮肤科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=急诊科">急诊科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=中医科">中医科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=临床营养科">临床营养科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=骨科">骨科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=心外科">心外科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=胸外科">胸外科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=泌尿外科">泌尿外科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=神经外科">神经外科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=肝脏外科">肝脏外科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=麻醉科">麻醉科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=妇产科">妇产科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=眼科">眼科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=口腔科">口腔科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=输血科">输血科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=核医学科">核医学科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=消化内科">放射治疗科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=放射科">放射科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=检验科">检验科</a></div>
<div class="dikuang_you_xuan"><a href="ReadDepartmentServlet?DEPARTMENT_NAME=病理科">病理科</a></div>
</div>
</div>
</div>
<div id="div7">
<div class="left">
<div class="siteMap">
<p class="p">关于我们</p>
</div>
<p class="p"><span>地 址:</span><span><b>(东单院区)北京市东城区帅府园一号,100730;</b><b>(西单院区)北京市西城区大木仓胡同41号,100032</b></span></p>
<p class="p">服务热线: 010-69156114</p>
</div>
</div>
</body>
<script type="text/javascript">
var imgs = [
"img/上1.jpg",
"img/上2.jpg",
"img/上3.jpg",
]
var intervals;
var index = 1;
var divs = document.getElementsByClassName("lunboyuan");
function turnImg(){
if(index > 2 ){
index = 0
}
tupian.src = imgs[index];
for(var j = 0 ; j < divs.length ;j++){
divs[j].style.borderColor="white";
}
//红圈 随动
divs[index].style.borderColor="red";
index++;
}
intervals = setInterval("turnImg()",2000);
//点击 切换
for(var i = 0 ; i < divs.length ;i++){
(function(a){
divs[a].onclick = function(){
clearInterval(intervals);
for(var j = 0 ; j < divs.length ;j++){
divs[j].style.borderColor="white";
}
divs[a].style.borderColor="red";
index = a;
tupian.src = imgs[index];
intervals = setInterval("turnImg()",2000);
}
})(i);
}
function getParam(obj){
var url = window.location.href;
var index = url.indexOf("?");
var lines = url.substr(index+1);
var arr = lines.split("&");
for(var i = 0;i<arr.length ; i++){
var arr1 = arr[i].split("=");
if(arr1[0]==obj){
return arr1[1];
}
}
return null;
}
function demo(){
document.getElementById("demo").href="HomePageServlet?userName="+getParam("userName");
}
</script>
``` 管理员页.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!-- JSTL
core 核心标签库
-->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!-- 标签库 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
body{
margin: 0px;
padding: 0px;
}
#yuan{
margin-left: 150px;
margin-top: 30px;
position: absolute;
}
#body{
height:860px;
/* Safari 5.1 - 6.0 */
background: -webkit-linear-gradient(#BBF5E9, white);
background: -moz-linear-gradient(#BBF5E9, white);
background: -o-linear-gradient(#BBF5E9, white);
background: -webkit-gradient(linear, 0 0, 0 100%, from(#BBF5E9), to(white));
background: linear-gradient(#BBF5E9, white); /* Opera 11.1 - 12.0 */
/* Firefox 3.6 - 15 */
}
#dakuang{
width: 1700px;
height: 600px;
}
#div1{
margin-left: 150px;
width: 220px;
height: 480px;
}
.div1_1{
height: 100px;
width: 100%;
text-align: center;
line-height: 100px;
font-family: "楷体";
font-size: 30px;
font-weight:bold;
}
.div1_1:hover{
background-color: #008000;
color: white;
opacity: 0.65;
}
#div2 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
/* display: none; */
float: right;
margin-top: -480px;
}
#xiabiao {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
margin-right: -419px;
}
#div3 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
display: none;
float: right;
margin-top: -480px;
}
#xiabiao2 {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
margin-right: -419px;
}
#div4 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
/*background-color: yellow;*/
display: none;
float: right;
margin-top: -480px;
}
#xiabiao3 {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
margin-right: -419px;
}
#div4 input{
width:800px;
height:40px;
}
#div5 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
/*background-color: yellow;*/
display: none;
float: right;
margin-top: -480px;
}
#xiabiao4 {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
margin-right: -419px;
}
#div5 input{
width:800px;
height:200px;
}
#div6 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
/*background-color: yellow;*/
display: none;
float: right;
margin-top: -480px;
}
#xiabiao5 {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
margin-right: -419px;
}
#div7 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
/*background-color: yellow;*/
display: none;
float: right;
margin-top: -480px;
}
#xiabiao6 {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
margin-right: -419px;
}
#div7 input{
width:800px;
height:40px;
}
#div8 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
/*background-color: yellow;*/
display: none;
float: right;
margin-top: -480px;
}
#xiabiao7 {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
margin-right: -419px;
}
#div8 input{
width:800px;
height:200px;
}
#text_div{
margin-left: 150px;
}
#text{
width: 600px;
height: 50px;
/*border: 1px solid;*/
align-content: center;
text-align: center;
font-family: "楷体";
font-size: 30px;
}
#textarea_div{
height: 580px;
width: 1500px;
/*border: 1px solid darkgray;*/
margin-top: 30px;
}
#textarea{
height: 550px;
width: 950px;
}
#submit{
margin-left: 400px;
}
a {
text-decoration: none;
color:black;
}
td{
text-align: center;
vertical-align: middle;
}
textarea{
resize: none;
width: 800px;
height: 100px;
}
</style>
</head>
<body>
<div id="body">
<div id="yuan">
<img src="img/院标.png"/>
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<hr>
<br />
<br />
<br />
<div id="dakuang">
<div id="div1">
<div id="d1" class="div1_1">管 理 药 品</div>
<div id="d2" class="div1_1">发 布 公 告</div>
<div id="d3" class="div1_1">管 理 医 师</div>
<div id="d4" class="div1_1">管 理 科 室</div>
<div id="d5" class="div1_1">挂 号 订 单</div>
<div id="d6" class="div1_1">增 加 医 师</div>
<div id="d7" class="div1_1">增 加 科 室</div>
<div id="" class="div1_1"><a href="index.html">退 出 登 录</a></div>
</div>
<div id="div2">
<div id="xiabiao">
</div>
</div>
<div id="div3">
<div id="xiabiao2">
<form action="NoticeServlet" method="post">
<div id="text_div">
<input type="text" name="noticeHead" id="text" value="" />
</div>
<div id="textarea_div">
<textarea id="textarea" name="noticeContent" rows="" cols=""></textarea>
</div>
<br />
<input type="submit" name="submit" id="submit" value="提交" />
</form>
</div>
</div>
<div id="div4">
<div id="xiabiao3">
<%request.getAttribute("list"); %>
<c:forEach items="${list}" var="n4">
<form action="GuanLiDoctorServlet?DOCTOR_ID=${n4.DOCTOR_ID}" method="post">
<table border="1px" cellspacing="0">
<tr style="display:none;">
<th>ID:</th>
<td><input type="text" name="DOCTOR_ID" value="${n4.DOCTOR_ID}" /></td>
</tr>
<tr >
<th>姓名:</th>
<td><input type="text" name="DOCTOR_NAME" value="${n4.DOCTOR_NAME}" /></td>
</tr>
<tr>
<th>密码:</th>
<td><input type="text" name="PASSWORD" value="${n4.PASSWORD}" /></td>
</tr>
<tr>
<th>科室名:</th>
<td><input type="text" name="DEPARTMENT_NAME" value="${n4.DEPARTMENT_NAME}" /></td>
</tr>
<tr>
<th>职称:</th>
<td><textarea name="JOB_TITLE" style="height:50px">${n4.JOB_TITLE}</textarea>
<%-- <input type="text" name="JOB_TITLE" value="${n4.JOB_TITLE}" /> --%></td>
</tr>
<tr>
<th>擅长:</th>
<td><textarea name="GOOD_JOB" style="height:50px">${n4.GOOD_JOB}</textarea>
</td>
</tr>
<tr>
<th>简介:</th>
<td><textarea name="JOB_SYNOPSIS" style="height:100px">${n4.JOB_SYNOPSIS}</textarea>
</td>
</tr>
<tr>
<th>详情:</th>
<td><textarea name="INTRODUCTION" style="height:200px">${n4.INTRODUCTION}</textarea>
</td>
</tr>
</table>
<br />
<input type="submit" value="修改" name="update" style="width: 50px;"/>
<input type="submit" value="删除" name="delete" style="width: 50px;"/>
<br /><br /><br /><br />
</form>
</c:forEach>
</div>
</div>
<div id="div5">
<div id="xiabiao4">
<%request.getAttribute("list"); %>
<c:forEach items="${list2}" var="n5">
<form action="GuanLiDepartmentServlet?DEPARTMENT_ID=${n5.DEPARTMENT_ID}" method="post">
<table border="1px" cellspacing="0">
<tr style="display:none;">
<th>ID:</th>
<td><input type="text" name="DEPARTMENT_ID" value="${n5.DEPARTMENT_ID}" /></td>
</tr>
<tr>
<th>科室名:</th>
<td><textarea name="DEPARTMENT_NAME" style="height:20px" disabled="true">${n5.DEPARTMENT_NAME}</textarea>
</td>
</tr>
<tr>
<th>科室简介</th>
<td><textarea name="DEPARTMENT_SYNOPSIS" style="height:150px">${n5.DEPARTMENT_SYNOPSIS}</textarea>
</td>
</tr>
<tr>
<th>科室公告标题</th>
<td><textarea name="DEPARTMENT_NOTICE_HEAD" style="height:30px">${n5.DEPARTMENT_NOTICE_HEAD}</textarea>
</td>
</tr>
<tr>
<th>科室公告内容:</th>
<td><textarea name="DEPARTMENT_NOTICE_CONTENT" style="height:300px">${n5.DEPARTMENT_NOTICE_CONTENT}</textarea>
</td>
</tr>
</table>
<br />
<input type="submit" value="修改" name="update" style="width: 50px;height: 50px;"/>
<input type="submit" value="删除" name="delete" style="width: 50px;height: 50px;"/>
<br /><br /><br /><br />
</form>
</c:forEach>
</div>
</div>
<div id="div6">
<div id="xiabiao5">
<%request.getAttribute("list1"); %>
<c:forEach items="${list1 }" var="n6">
<table border="1px" cellspacing="0" cellpadding="10px" width="300px" height="400px">
<tr>
<th>编号:</th>
<td>${n6.GUAHAO_ID}</td>
</tr>
<tr>
<th>姓名:</th>
<td>${n6.PATIENT_NAME}</td>
</tr>
<tr>
<th>部门号:</th>
<td>${n6.DEPARTMENT_NAME}</td>
</tr>
<tr>
<th>医生姓名:</th>
<td>${n6.DOCTOR_NAME}</td>
</tr>
<tr>
<th>时间:</th>
<td>${n6.WORK_TIME}</td>
</tr>
<tr>
<th>性别:</th>
<td>${n6.SEX}</td>
</tr>
<tr>
<th>金额:</th>
<td>${n6.MONEY}</td>
</tr>
</table><br /><br /><br>
</c:forEach>
</div>
</div>
<div id="div7">
<div id="xiabiao4">
<form action="AddDoctorServlet" method="post">
<table border="1px" cellspacing="0" cellpadding="0px" width="800px" height="600px">
<tr>
<th>ID:</th>
<td><input type="text" name="DOCTOR_ID" value="" /></td>
</tr>
<tr >
<th>姓名:</th>
<td><input type="text" name="DOCTOR_NAME" value="" /></td>
</tr>
<tr>
<th>密码:</th>
<td><input type="text" name="PASSWORD" value="" /></td>
</tr>
<tr>
<th>科室名:</th>
<td><input type="text" name="DEPARTMENT_NAME" value="" /></td>
</tr>
<tr>
<th>职称:</th>
<td><textarea name="JOB_TITLE" style="height:150px"></textarea>
</td>
</tr>
<tr>
<th>擅长:</th>
<td><textarea name="GOOD_JOB" style="height:150px"></textarea>
</td>
</tr>
<tr>
<th>简介:</th>
<td><textarea name="JOB_SYNOPSIS" style="height:150px"></textarea>
</td>
</tr>
<tr>
<th>详情:</th>
<td><textarea name="INTRODUCTION" style="height:150px"></textarea>
</td>
</tr>
</table>
<br />
<input type="submit" value="添加" name="add" style="width: 50px;"/>
<br /><br />
</form>
</div>
</div>
<div id="div8">
<div id="xiabiao4">
<form action="AddDepartmentServlet" method="post">
<table border="1px" cellspacing="0" cellpadding="0px" width="300px" height="50px">
<tr style="display:none;">
<th>ID:</th>
<td><input type="text" name="DEPARTMENT_ID" value="" /></td>
</tr>
<tr>
<th>科室名:</th>
<td><input type="text" name="DEPARTMENT_NAME" value="" /></td>
</tr>
<tr>
<th>科室简介</th>
<td><textarea name="DEPARTMENT_SYNOPSIS" style="height:150px"></textarea>
</td>
</tr>
<tr>
<th>科室公告标题</th>
<td><input type="text" name="DEPARTMENT_NOTICE_HEAD" value="" /></td>
</tr>
<tr>
<th>科室公告内容:</th>
<td><textarea name="DEPARTMENT_NOTICE_CONTENT" style="height:300px"></textarea>
</td>
</tr>
</table>
<br />
<input type="submit" value="添加" name="add" style="width: 50px;height: 50px;"/>
<br /><br />
</form>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
document.getElementById("d1").onclick = function() {
document.getElementById("div2").style.display = "block";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="none";
document.getElementById("div5").style.display="none";
document.getElementById("div6").style.display="none";
document.getElementById("div7").style.display="none";
document.getElementById("div8").style.display="none";
}
document.getElementById("d2").onclick=function(){
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="block";
document.getElementById("div4").style.display="none";
document.getElementById("div5").style.display="none";
document.getElementById("div6").style.display="none";
document.getElementById("div7").style.display="none";
document.getElementById("div8").style.display="none";
}
document.getElementById("d3").onclick=function(){
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="block";
document.getElementById("div5").style.display="none";
document.getElementById("div6").style.display="none";
document.getElementById("div7").style.display="none";
document.getElementById("div8").style.display="none";
}
document.getElementById("d4").onclick=function(){
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="none";
document.getElementById("div5").style.display="block";
document.getElementById("div6").style.display="none";
document.getElementById("div7").style.display="none";
document.getElementById("div8").style.display="none";
}
document.getElementById("d5").onclick=function(){
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="none";
document.getElementById("div5").style.display="none";
document.getElementById("div6").style.display="block";
document.getElementById("div7").style.display="none";
document.getElementById("div8").style.display="none";
}
document.getElementById("d6").onclick=function(){
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="none";
document.getElementById("div5").style.display="none";
document.getElementById("div6").style.display="none";
document.getElementById("div7").style.display="block";
document.getElementById("div8").style.display="none";
}
document.getElementById("d7").onclick=function(){
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="none";
document.getElementById("div5").style.display="none";
document.getElementById("div6").style.display="none";
document.getElementById("div7").style.display="none";
document.getElementById("div8").style.display="block";
}
</script>
</html>
弹出的购物车.html
<%@ include file="loginControl.jsp" %>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript">
var url=decodeURI(window.location.href).split("=");
alert(url[1]);
$(function(){
$("input").val(url[1]);
});
$(function(){
$.ajax({
type:"post",
url:"BookShowServlet",
dataType:"json",
success:function(data){
var line = "<tr><td>药品名称</td><td>药品价格</td><td>药品数量</td><td>小计</td></tr>";
var books = getMsg(data.list);
for(var i = 0 ; i<books.length;i++){
line += "<tr>";
line += "<td>"+books[i].drugs_name+"</td>"
line += "<td>"+books[i].drugs_price+"</td>"
line += "<td>"+books[i].drugs_num+"</td>"
line += "<td>"+((books[i].drugs_price)*(books[i].drugs_num))+"</td>"
line += "</tr>";
}
/* json each遍历
a 数组 a 索引 JSONArray
a 对象 a K JSONObject
b 当前对象
*/
/* $.each(data,function(a,b){
alert(a);
alert(b);
}) */
$("table").html(line);
}
})
})
</script>
<body>
<input type="text" value="55"/>
<table border="1px" >购物车55
</table>
</body>
</html>
个人主页.jsp
<%@ page language="java" contentType="text/html; charset=UTF-8"
pageEncoding="UTF-8"%>
<!-- JSTL
core 核心标签库
-->
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%> <!-- 标签库 -->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>个人中心</title>
<style type="text/css">
body {
margin: 0px;
padding: 0px;
}
#yuan {
margin-left: 150px;
margin-top: 30px;
position: absolute;
}
#body {
height: 860px;
/* Safari 5.1 - 6.0 */
background: -webkit-linear-gradient(#BBF5E9, white);
background: -moz-linear-gradient(#BBF5E9, white);
background: -o-linear-gradient(#BBF5E9, white);
background: -webkit-gradient(linear, 0 0, 0 100%, from(#BBF5E9), to(white));
background: linear-gradient(#BBF5E9, white);
/* Opera 11.1 - 12.0 */
/* Firefox 3.6 - 15 */
}
#dakuang {
width: 1700px;
height: 700px;
/*border: 1px solid darkgreen;*/
}
#div1 {
margin-left: 150px;
width: 220px;
height: 480px;
}
.div1_1 {
height: 100px;
width: 100%;
text-align: center;
line-height: 100px;
font-family: "楷体";
font-size: 30px;
font-weight: bold;
}
.div1_1:hover {
background-color: #008000;
color: white;
opacity: 0.65;
}
#div2 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
/*background-color: yellow;*/
display: none;
float: right;
margin-top: -480px;
}
#xiabiao {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
/* padding: 330px; */
margin-right: -419px;
}
#div3 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
display: none;
float: right;
margin-top: -480px;
}
#xiabiao2 {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
margin-right: -419px;
}
#div4 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
/*background-color: yellow;*/
display: none;
float: right;
margin-top: -480px;
}
#xiabiao3 {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
margin-right: -419px;
}
#div5 {
/*border: 1px solid darkgreen;*/
height: 700px;
width: 1200px;
/*background-color: yellow;*/
display: none;
float: right;
margin-top: -480px;
}
#xiabiao4 {
background: url(img/下标图.png) no-repeat;
background-size: 700px, 0px;
background-position: right bottom;
margin-right: -419px;
}
a {
text-decoration: none;
color:black;
}
td{
text-align: center;
vertical-align: middle;
}
</style>
</head>
<body>
<div id="body">
<div id="yuan">
<img src="img/院标.png" />
</div>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<hr>
<br />
<br />
<br />
<div id="dakuang">
<div id="div1">
<div id="d1" class="div1_1">挂 号 订 单</div>
<div id="d2" class="div1_1">药 品 订 单</div>
<div id="d3" class="div1_1">个 人 信 息</div>
<div id="d4" class="div1_1">修 改 信 息</div>
<div id="d5" class="div1_1"><a href="patient.html">退 出 登 录</a></div>
</div>
<div id="div2">
<div id="xiabiao">
<%-- ${requestScope.list } EL表达式 忽略null
request.getAttribute("list")
var n 遍历的当前对象
${n.gId} --%>
<%request.getAttribute("list1"); %>
<c:forEach items="${list1 }" var="n">
<table border="1px" cellspacing="0" cellpadding="10px" width="300px" height="50px">
<tr>
<th>编号:</th>
<td>${n.GUAHAO_ID}</td>
</tr>
<tr>
<th>姓名:</th>
<td>${n.PATIENT_NAME}</td>
</tr>
<tr>
<th>部门号:</th>
<td>${n.DEPARTMENT_NAME}</td>
</tr>
<tr>
<th>医生姓名:</th>
<td>${n.DOCTOR_NAME}</td>
</tr>
<tr>
<th>时间:</th>
<td>${n.WORK_TIME}</td>
</tr>
<tr>
<th>性别:</th>
<td>${n.SEX}</td>
</tr>
<tr>
<th>金额:</th>
<td>${n.MONEY}</td>
</tr>
</table><br /><br /><br />
</c:forEach>
</div>
</div>
<div id="div3">
<div id="xiabiao2">
<%request.getAttribute("list"); %>
<c:forEach items="${list}" var="n2">
</c:forEach>
</div>
</div>
<div id="div4">
<div id="xiabiao3">
<%request.getAttribute("list"); %>
<c:forEach items="${list}" var="n3">
<table border="1px" cellspacing="0" cellpadding="10px" width="300px" height="50px">
<tr>
<th>姓名:</th>
<td>${n3.PATIENT_NAME}</td>
</tr>
<tr>
<th>账号:</th>
<td>${n3.account}</td>
</tr>
<tr>
<th>密码:</th>
<td>${n3.userPwd}</td>
</tr>
<tr>
<th>性别:</th>
<td>${n3.sex}</td>
</tr>
<tr>
<th>年龄:</th>
<td>${n3.age}</td>
</tr>
<tr>
<th>电话:</th>
<td>${n3.telphone}</td>
</tr>
<tr>
<th>邮箱:</th>
<td>${n3.mail}</td>
</tr>
</table>
</c:forEach>
</div>
</div>
<div id="div5">
<div id="xiabiao4">
<%request.getAttribute("list"); %>
<c:forEach items="${list}" var="n4">
<form action="PatientUpdateServlet" method="get">
<table border="1px" cellspacing="0" cellpadding="10px" width="300px" height="500px">
<tr>
<th>姓名:</th>
<td><input type="text" name="PATIENT_NAME" value="${n4.PATIENT_NAME}" disabled="true"/></td>
</tr>
<tr style="display:none;">
<th>账号:</th>
<td><input type="text" name="userName" value="${n4.account}" /></td>
</tr>
<tr>
<th>密码:</th>
<td><input type="text" name="userPwd" value="${n4.userPwd}" /></td>
</tr>
<tr>
<th>性别:</th>
<td><input type="text" name="sex" value="${n4.sex}" /></td>
</tr>
<tr>
<th>年龄:</th>
<td><input type="text" name="age" value="${n4.age}" /></td>
</tr>
<tr>
<th>电话:</th>
<td><input type="text" name="telphone" value="${n4.telphone}" /></td>
</tr>
<tr>
<th>邮箱:</th>
<td><input type="text" name="mail" value="${n4.mail}" /></td>
</tr>
</table>
<br />
<input type="submit" value="修改" />
</form>
</c:forEach>
</div>
</div>
</div>
</div>
</body>
<script type="text/javascript">
document.getElementById("d1").onclick = function() {
document.getElementById("div2").style.display = "block";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="none";
document.getElementById("div5").style.display="none";
}
document.getElementById("d2").onclick=function(){
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="block";
document.getElementById("div4").style.display="none";
document.getElementById("div5").style.display="none";
}
document.getElementById("d3").onclick=function(){
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="block";
document.getElementById("div5").style.display="none";
}
document.getElementById("d4").onclick=function(){
document.getElementById("div2").style.display="none";
document.getElementById("div3").style.display="none";
document.getElementById("div4").style.display="none";
document.getElementById("div5").style.display="block";
}
</script>
</html>