This repository has been archived by the owner on Aug 28, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
load_schedule_page.php
101 lines (83 loc) · 2 KB
/
load_schedule_page.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
<?php
//Include database Connection Script
include 'db_connection.php';
//div1
//SELECT all schedules created. order by newest on top.
//make drop down menu. value = schedule id, name/text = date of schedule.
$sql_created_schedules =
"
SELECT ID, date
FROM `".$db."`.`schedule`
ORDER BY ID DESC
LIMIT 20
";
$result_created_schedule = $link->query($sql_created_schedules);
//CHOOSE SCHEDULE
echo
'
<div id="schedule_page_content_1">
<select name="select-choice-schedule_ID" id="select-choice-schedule_ID" onchange="update_displayed_schedule(this.value)">
<option value="">Select Schedule:</option>
';
//fill in the select
while ($row = $result_created_schedule->fetch_assoc())
{
$cs_ID = $row['ID'];
$cs_date = $row['date'];
echo
'<option value="'.$cs_ID.'">'.$cs_date.'</option>';
}
echo
'
</select>
</div>
';
//CHOOSE STATION
echo
'
<div id="schedule_page_content_2">
<select name="select-choice-station_ID" id="select-choice-station_ID" onchange="update_displayed_schedule_station()">
<option value="">Select Station:</option>
';
$sql_stations =
"
SELECT *
FROM `".$db."`.`schedule_station`
";
$result_stations = $link->query($sql_stations);
//fill in the select
while ($row = $result_stations->fetch_assoc())
{
$staion_ID = $row['ID'];
$station_name = $row['name'];
echo
'<option value="'.$staion_ID.'">'.$station_name.'</option>';
}
echo '
</select>
</div>
';
//CHOOSE SHIFT
echo
'
<div id="schedule_page_content_3">
<select name="select-choice-shift_ID" id="select-choice-shift_ID" onchange="update_displayed_schedule_shift()">
<option value="">Select Shift:</option>
<option value="0">Day</option>
<option value="1">Night</option>
</select>
</div>
';
//div2.
//will be placeholder for all the schedule information that is retrieved.
//get_schedule.php [schedule_id]
//this script will simply just print all the users names from
//schedule_saved where schedule_id = [schedule_id]
echo
'
<div id="schedule_page_content_4">
</div>
';
//Include database Termination Script
include 'db_disconnect.php';
?>