-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
280 lines (253 loc) · 9.41 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
<?php
session_start(); // 세션오픈
//db연결
$connect = mysqli_connect("", "", "","");
$query = "SELECT * FROM hospital ORDER BY id DESC";
$result = mysqli_query($connect, $query);
?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<script type="text/javascript" src="https://www.gstatic.com/charts/loader.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Main Page</title>
<link rel="stylesheet" type="text/css" href="./css/finalmain.css">
<link href="https://fonts.googleapis.com/earlyaccess/nanumgothic.css" rel="stylesheet">
</style>
</head>
<body>
<header>
<h1><a href="index.php">
<?php
echo "<img src='./img/signal.png' alt='home' id='img1'>";
?>
응급 구조 통합 플랫폼</a></h1>
<div id="menu">
<ul>
<li><a href="#top">병원</a></li>
<li><a href="#top">구급대</a></li>
<li><a href="#hospitalinfo">병원 정보</a></li>
<li><a href="#Data1">교통</a></li>
<li><a href="#Data2">화재</a></li>
</ul>
</div>
</header>
<section>
<div class="split left" id="hospital">
<div class="centered">
<?php
echo "<img src='./img/iconfinder_126-man-doctor.png' alt='hospital' id='hospital'>";
?>
<h2>병원 전용</h2>
<p>병원의 총 병상 수,잔여 병상 수, 진료 가능 과목을 입력하고 환자 발생 시 상해 정보를 확인할 수 있습니다.</p>
<a href="hospitalinfo.php"><button class="button"><span>병원 정보 입력 </span></button></a>
<a href="loginpai.php"><button class="button"><span>환자 상해 확인 </span></button></a>
</div>
</div>
<div class="split right" id="rescue">
<div class="centered">
<?php
echo "<img src='./img/iconfinder_156-woman.png' alt='rescue' id='rescue'>";
?>
<h2>구급대 전용</h2>
<p>환자 발생 시 상해 정보를 입력하고 내비게이션을 통해 환자에게 적합한 최단거리의 병원을 선택할 수 있습니다.</p>
<a href="navi.php"><button class="button"><span>Navigation </span></button></a>
<a href="paientInfo.php" id="hospitalinfo"><button class="button"><span>환자 정보 입력 </span></button></a>
</div>
</div>
</section>
<div class="section2"><br>
<h2 style="text-align: center; font-family: 나눔고딕 Extra Bold;"><병원 정보 확인></h2><br>
<table id="info">
<tr>
<th>번호</th>
<th>병원 이름</th>
<th>남은 병상 수</th>
<th>총 병상 수</th>
<th>진료 가능 목록</th>
<th>출발 시간</th>
</tr>
<?php
while($row=mysqli_fetch_array($result))
{
?>
<tr><a id="Data1"></a>
<td><?php echo $row["id"]; ?></td>
<td><?php echo $row["hospital_name"]; ?></td>
<td><?php echo $row["remaining_bed"]; ?></td>
<td><?php echo $row["total_bed"]; ?></td>
<td><?php echo $row["department"]; ?></td>
<td><?php echo $row["date"]; ?></td>
</tr>
<?php
}
?>
</table>
</div>
<footer>
<script type="text/javascript">
google.charts.load("current", {packages:["corechart"]});
google.charts.setOnLoadCallback(drawChart1);
function drawChart1() {
var data = google.visualization.arrayToDataTable([
['week', 'percent per week'],
['Mon', 5],
['Tue', 8],
['Wed', 6],
['Thu', 5],
['Fri', 4],
['Sat', 3],
['Sun', 3]
]);
var options = {
title: '요일별',
pieHole: 0.3,
};
var chart = new google.visualization.PieChart(document.getElementById('donutchart1'));
chart.draw(data, options);
}
google.charts.load("current", {packages:["corechart"]});
google.charts.setOnLoadCallback(drawChart2);
function drawChart2(){
var data = google.visualization.arrayToDataTable([
['Dong', 'percent per Dong'],
['가리봉', 2],
['고척', 2],
['구로', 9],
['개봉', 9],
['궁', 1],
['신도림', 1],
['오류', 9],
['천왕', 1]
]);
var options = {
title: '구로시 동별',
pieHole: 0.3,
};
var chart = new google.visualization.PieChart(document.getElementById('donutchart2'));
chart.draw(data, options);
}
google.charts.load("current", {packages:["corechart"]});
google.charts.setOnLoadCallback(drawChart3);
function drawChart3(){
var data = google.visualization.arrayToDataTable([
['Time', 'percent per time period'],
['0~3AM', 6],
['3~6AM', 4],
['6~9AM', 4],
['9~12AM', 3],
['12~15PM', 1],
['15~18PM', 6],
['18~21PM', 6],
['21~24PM', 4]
]);
var options = {
title: '시간',
pieHole: 0.3,
};
var chart = new google.visualization.PieChart(document.getElementById('donutchart3'));
chart.draw(data, options);
}
$(window).resize(function(){
drawChart1();
drawChart2();
drawChart3()
});
</script>
<h2 style="text-align:center;">교통 사고 통계 chart (2016~2018)</h2>
<div class="row" >
<div class="column">
<div id="donutchart1" class="chart"></div>
</div>
<div class="column">
<div id="donutchart2" class="chart"></div>
</div>
<div class="column">
<div id="donutchart3" class="chart"></div>
</div>
</div>
<script type="text/javascript">
google.charts.load("current", {packages:["corechart"]});
google.charts.setOnLoadCallback(drawChart4);
function drawChart4() {
var data = google.visualization.arrayToDataTable([
['day','number'],
['Mon', 114],
['Tue', 118],
['Wed', 121],
['Thu', 97],
['Fri', 103],
['Sat', 103],
['Sun', 114]
]);
var options = {
title: '요일별',
pieHole: 0.3,
};
var chart = new google.visualization.PieChart(document.getElementById('donutchart4'));
chart.draw(data, options);
}
google.charts.setOnLoadCallback(drawChart5);
function drawChart5() {
var data = google.visualization.arrayToDataTable([
['Dong','number'],
['GaRiBong', 54],
['Gae-Bong', 112],
['Go-Chuck', 90],
['Gu-Ro', 331],
['Gung', 35],
['SinDoRim', 49],
['Oh-Ryu', 63],
['On-Su', 16],
['Chun-Wang', 11],
['Hang', 8]
]);
var options = {
title: '구로시 동별',
pieHole: 0.3,
};
var chart = new google.visualization.PieChart(document.getElementById('donutchart5'));
chart.draw(data, options);
}
google.charts.setOnLoadCallback(drawChart6);
function drawChart6() {
var data = google.visualization.arrayToDataTable([
['Time','percent per time period'],
['0~3AM', 87],
['3~6AM', 48],
['6~9AM', 54],
['9~12AM', 118],
['12~15PM', 125],
['15~18PM', 120],
['18~21PM', 134],
['21~24PM', 95]
]);
var options = {
title: '시간',
pieHole: 0.3,
};
var chart = new google.visualization.PieChart(document.getElementById('donutchart6'));
chart.draw(data, options);
}
$(window).resize(function(){
drawChart4();
drawChart5();
drawChart6();
});
</script>
<h2 style="text-align: center; margin-top: 3%;">화재 사고 통계 chart (2016~2018)</h2>
<div class="row" id="Data2">
<div class="column">
<div id="donutchart4" class="chart"></div>
</div>
<div class="column">
<div id="donutchart5" class="chart"></div>
</div>
<div class="column">
<div id="donutchart6" class="chart"></div>
</div>
</div>
</footer>
</body>
</html>