-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin_page.php
134 lines (125 loc) · 6.13 KB
/
admin_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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
<?php
session_start();
include_once __DIR__ .'/static/public/CSRF-Protector-PHP/libs/csrf/csrfprotector.php';
//Initialise CSRFGuard library
csrfProtector::init();
include dirname(__FILE__).'/loggedUserData.php';
if(!isset($logged_user)){
header('location: ../index.php'); // Redirecting To Home Page
}
?>
<!DOCTYPE html>
<html>
<head>
<title>ADMIN</title>
<?php include ("head.php"); ?>
<script type="text/javascript" src="static/appspecific/js/permitNavLinks.js"></script>
<script type="text/javascript" src="static/appspecific/js/alarms.js"></script>
<!-- http://davidstutz.de/bootstrap-multiselect/#configuration-options-selectAllText -->
<link rel="stylesheet" href="static/public/css/bootstrap-multiselect.css">
<script type="text/javascript" src="static/public/js/bootstrap-multiselect.js"></script>
<!-- <link rel="stylesheet" href="static/public/css/jquery.multiselect.css">
<script type="text/javascript" src="static/public/js/jquery.multiselect.js"></script> -->
<style type="text/css">
#adminNavItag {
aria-hidden: true;
font-size: 32px;
color: blue;
}
</style>
</head>
<body>
<?php include ("hiddenInputs.php"); ?>
<!-- Top container -->
<?php include ("navLinks.php"); ?>
<div class="container-fluid p-5">
<div class="card bg-light col col-sm-6">
<h5 class="card-header">TIMER UPDATES</h5>
<div class="card-body">
<!-- <h5 class="row pb-5">Update Timers for Alarm pop-up, Fire Panel Health check frequency</h5> -->
<div class="row pb-5">
<div class="card" style="background-color: #D4E6F1;">
<div class="card-body">
Alarm Pop-up Timer in Seconds (minimum 60):
<input id="popupTimer" type="number" value=60 style="width:50px;">
<button id="popupTimerBtn" class="btn btn-primary btn-sm mr-2">Update</button>
</div>
</div>
</div>
<div class="row">
<div class="card" style="background-color: #D4E6F1;">
<div class="card-body">
HealthCheck Frequency in Seconds (minimum 6):
<input id="healthTimer" type="number" value=6 style="width:50px;">
<button id="healthTimerBtn" class="btn btn-primary btn-sm mr-2">Update</button>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="container-fluid p-5">
<div class="card border-primary bg-light col col-sm-6">
<h5 class="card-header">ROLE-PERMISSION</h5>
<div class="card-body">
<!-- <h5 class="card-title">Role-Table Access Permissions</h5> -->
<form id="rolepermissionform" class="form-horizontal">
<div class="row">
<div class="col-md-4">
<div class="form-group">
<label for="form_role" class="pb-0 mb-0">Select Role</label>
<select id="roleSelect" name="form_role" class="form-control" required="required" data-error="Select Role!">
<option id="r_opt_0" value="">Select</option>
</select>
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-4">
<div class="form-group">
<label for="form_entity" class="pb-0 mb-0">Select Table(s)</label>
<select id="entitySelect" name="form_entity" class="form-control" required="required" data-error="Select Table!" multiple>
<!-- <option id="e_opt_0" value="">Select</option> -->
<!-- <option id="e_opt_-1" value="SelectAll">Select All</option> -->
</select>
<div class="help-block with-errors"></div>
</div>
</div>
<div class="col-md-4">
<div class="form-check-inline">
<label class="form-check-label mr-4" for="readChkBox">Read:</label>
<input type="checkbox" class="form-check-input" id="readChkBox" name="form_Read" value = "R" style="width:3vw; height:3vh;">
</div>
<div class="form-check-inline">
<label class="form-check-label mr-2" for="updateChkBox">Update:</label>
<input type="checkbox" class="form-check-input" id="updateChkBox" name="form_Update" value = "U" style="width:3vw; height:3vh;">
</div>
<div class="form-check-inline">
<label class="form-check-label mr-3" for="createChkBox">Create:</label>
<input type="checkbox" class="form-check-input" id="createChkBox" name="form_Create" value = "C" style="width:3vw; height:3vh;">
</div>
</div>
</div>
<div class="btn-group">
<button id="addPermissionBtn" class="btn btn-primary btn-sm mr-2" type="submit" name="updateBtn" value="Update">Add Permission</button>
<button id="deletePermissionBtn" class="btn btn-warning btn-sm mr-2" type="submit" name="deleteBtn" value="Delete">Remove Permission</button>
</div>
</form>
</div>
</div>
</div>
<?php include ("footer.php"); ?>
<script>
function resetAdminUserForm() {
document.getElementById("add_edit_AdminUserForm").reset();
$("#editAdminUserInput").val('');
$("input[name='adminUserID']").attr("readonly", false).css('background-color', '#FFFFFF');
}
//setInterval("my_function();", 50000000000000000000000000000000000000000);
function my_function() {
window.location = location.href;
}
</script>
<script type="text/javascript" src="static/appspecific/js/openNavLinks.js"></script>
<script type="text/javascript" src="static/appspecific/js/admin.js"></script>
</body>
</html>