-
Notifications
You must be signed in to change notification settings - Fork 0
/
schedule.php
70 lines (56 loc) · 2.06 KB
/
schedule.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
<?php
require "header.php";
?>
<br><br>
<div class="container">
<h3 class="text-center"><br>Edit Schedule<br></h3>
<div class="col-md-6 offset-md-3">
<?php if(isset($_SESSION['user_id'])){
if($_SESSION['role']==2){
echo '<p class="text-white bg-dark text-center">Set the schedule for a specific date</p><br>';
if(isset($_GET['error5'])){
if($_GET['error5'] == "sqlerror1") { //douleuei bazw ta errors apo ta headers.. prp na bgalw to requiered
echo '<h5 class="bg-danger text-center">Error</h5>';
}
if($_GET['error5'] == "emptyfields") {
echo '<h5 class="bg-danger text-center">Error, Empty fields</h5>';
}
}
if(isset($_GET['schedule'])){
if($_GET['schedule'] == "success") {
echo '<h5 class="bg-success text-center">Schedule was successfully submited</h5>';
}
}
echo'
<div class="signup-form">
<form action="includes/schedule.inc.php" method="post">
<div class="form-group">
<label>Enter Date</label>
<input type="date" class="form-control" name="date" placeholder="Date" required="required">
</div>
<div class="form-group">
<label>Open Time</label>
<input type="time" class="form-control" name="opentime" required="required">
</div>
<div class="form-group">
<label>Close Time</label>
<input type="time" class="form-control" name="closetime" required="required">
</div>
<div class="form-group">
<button type="submit" name="schedule" class="btn btn-dark btn-lg btn-block">Submit Schedule</button>
</div>
</form>
<br><br>
</div>';
}
}
else {
echo '<p class="text-center"><br>You are have no permission<br><br></p>';
}
?>
</div>
</div>
<br><br>
<?php
require "footer.php";
?>