-
Notifications
You must be signed in to change notification settings - Fork 0
/
staffAdded.php
executable file
·67 lines (57 loc) · 2.05 KB
/
staffAdded.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
<?php
//files required by this page database connections, gatewaytables and functions
require_once 'utils/functions.php';
require_once 'classes/User.php';
require_once 'classes/DB.php';
require_once 'classes/UserTable.php';
//starts session
start_session();
//if the user is not logged in redirect to login_form
if (!is_logged_in())
{
header("Location: login_form.php");
}
//sets the session user in this session
$user = $_SESSION['user'];
//used by the toolbar to display the correct menu
$_SESSION['role'] = $user->getRole();
//if the user is not a customer redirect to home
if($_SESSION['role'] !="hr")
{
header("Location: login_form.php");
}
$newStaff = $_SESSION['newStaff'];
require 'utils/formFiller.php';
?>
<!DOCTYPE html>
<html>
<head>
<!--Meta Tags-->
<?php require 'utils/meta.php'; ?>
<!--sets the title to user name of the user logged in-->
<title><?php echo $newStaff->getUsername() . " account created"; ?></title>
<!--imports css styles see styles.php-->
<?php require 'utils/styles.php'; ?>
</head>
<!--class used to sed bg colour-->
<body class="logOn">
<!-- this is the nav bar loded-->
<div class="row">
<?php require 'functions/firstForm.php'; ?>
<?php require 'utils/toolbar.php'; ?>
</div>
<!--main content under nav-->
<div class="container center-all-content">
<div class ="row push">
<!--confirmation staff added message-->
<section class="col-lg-12">
<h1>A new staff member has been added</h1>
<h2><?php echo "UserName: " . $newStaff->getUsername() ?></h2>
<h2><?php echo"Account Type: " . $newStaff->getRole() ?></h2>
</section>
</div><!--close row-->
</div><!--close container-->
<!--imports footer-->
<?php require 'utils/footer.php'; ?>
</body>
</html>