forked from nisiya/MaristIDCP
-
Notifications
You must be signed in to change notification settings - Fork 0
/
delete_employer_confirm.php
53 lines (53 loc) · 2.12 KB
/
delete_employer_confirm.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
<!--Confirmation to delete a student's course-->
<?php
$title = "IDCP - Delete Employer";
$page = 'idcp_settings';
$page_name = 'delete_employer';
require('includes/header.php');
$emp_name = $_SESSION['EMP_NAME'];
require( 'includes/connect_db_c9.php' );
require('includes/delete_helpers.php');
require('includes/student_helpers.php');
//Regular user cannot access this page
if($user_role == "User"){
$page = 'home.php';
header("Location: $page");
}
if ($_SERVER[ 'REQUEST_METHOD' ] == 'POST') {
$emp_name = $_SESSION['EMP_NAME'];
$result = delete_employer($dbc, $emp_name);
$page = 'employer_search.php';
header("Location: $page");
}
?>
<!-- Page Content -->
<div id="page-content-wrapper">
<div class="container-fluid">
<div class="dropdown">
<div class="page-header">
<h3><p>Are you sure you want to remove <?php echo $_SESSION['EMP_NAME']; ?> from the database?</p></h3>
</div>
<form action ="delete_employer_confirm.php" method="POST" data-toggle="validator" id="delete_employer">
<div class="form-group">
<div class = "butspan" style = "width: 300px;">
<button type="submit" class="btn btn-primary btn-block" style = "margin-right: 50px;">Yes</button>
<button type="button" class="btn btn-primary btn-block" style = "margin-right: 50px;" onclick="location.href='edit_employer.php';">No</button>
</div>
</div>
</form>
<br>
<button class="btn btn-default btn-sm" onclick="location.href='edit_employer.php';">Back</button>
</div>
</div>
<!-- /#page-content-wrapper -->
</div>
<!--Footer-->
<?php require('includes/footer.php'); ?>
</div>
<!-- /#wrapper -->
<!-- jQuery -->
<script src="js/jquery.js"></script>
<!-- Bootstrap Core JavaScript -->
<script src="js/bootstrap.min.js"></script>
</body>
</html>