-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEmployee.php
More file actions
43 lines (37 loc) · 1.45 KB
/
Employee.php
File metadata and controls
43 lines (37 loc) · 1.45 KB
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
<?php
const PAGE_TYPE = "Employee";
const NO_BACK = true;
require "Head.php";
$staff = Session::getLoggedInUser();
if ($_GET["action"] == "edit")
(new Employee($_GET))->sync();
echo "
<h1>Employee Dashboard</h1>
<a class='btn btn-primary mb-3' href='PersonalSchedule.php'>View My Schedule</a>
<a class='btn btn-primary mb-3' href='AvailabilityForm.php'>Submit Availability</a>
<a class='btn btn-primary mb-3' href='TemporaryAvailabilityForm.php'>Submit Temporary Availability</a>
<a class='btn btn-primary mb-3' href='CompletedSchedule.php'>View Completed Schedule</a>
";
(new Modal)
->title("Edit Information")
->contents("
<div class='form-group'>
<label for='FirstName'>First Name</label>
<input name='FirstName' type='text' class='form-control' id='FirstName' value='{$staff->getFirstName()}'>
</div>
<div class='form-group'>
<label for='LastName'>Last Name</label>
<input name='LastName' type='text' class='form-control' id='LastName' value='{$staff->getLastName()}'>
</div>
<div class='form-group'>
<label for='Password'>Password</label>
<input name='Password' type='password' class='form-control' id='Password' value='{$staff->getPassword()}'>
</div>
<input type='hidden' name='action' value='edit'>
<input type='hidden' name=StaffID value='{$staff->getStaffID()}'>
")
->buttonClass("primary")
->buttonOtherClass("mb-3")
->buttonText("Edit Information")
->echo();
require "Foot.php";