-
Notifications
You must be signed in to change notification settings - Fork 3
/
recordAccess.admin.php
98 lines (75 loc) · 2.82 KB
/
recordAccess.admin.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>records</title>
</head>
<body>
<?php require_once'inc/Header.php';?>
<link rel="stylesheet" href="css/jobService.css">
<link rel="stylesheet" href="css/jobService.css">
<div class='container'>
<div class='row'>
<div class="col-sm-3"></div>
<div class="col-sm-6">
<br><br>
<form method="POST" action="recordAccess.admin.php" style="border: none;">
<p class="form-group">
<label for="userID">NIC Number</label>
<input type="text" name="userID" class="form-control">
<label for="category">Record Category</label>
<select class="form-control" name="category">
<option></option>
<option value="01">01-Birth Cetificate</option>
<option value="02">02-Salary Reports</option>
<option value="03">03-Marriage Certificate</option>
<option value="04">04-Service Description</option>
<option value="05">05-Vacation Details</option>
<option value="06">06-Diploma Certificate</option>
<option value="07">07-Promotion Certificate</option>
<option value="08">08-Income details</option>
<option value="09">09-Childern's Birth Certificates</option>
<option value="10">10-Exam Certificate</option>
<option value="11">11-Transfer Letters</option>
<option value="12">12-Training Letters</option>
<option value="13">13-Loan Details</option>
</select>
</p>
<p><button name='upload'type="submit" class="btn btn-success">Search</button></p>
</form>
<?php
//echo $_SESSION['adminID'];
if(isset($_SESSION['adminID'])) {
if (isset($_POST['category']) && isset($_POST['userID'])){
$message='action failed';
$status='warning';
$userId=$_POST['userID'];
//$userId=$_SESSION['loginID'];
$category=$_POST['category'];
include_once('controller/recordAccess.ctrl.php');
$recordViewer=new recordViewer();
list($message,$status)=$recordViewer->viewRecords($userId,$category);
}
else{
$message='select the record category and ID Number ';
$status='info';
}
}
else{
$message='log in to the account<br><a href="adminLogin.php">Login Here</a> ';
$status='warning';
}
require_once 'inc/alert.view.php';
$alertView=new alert();
echo $alertView->showAlert($message,$status);
?>
</div>
<div class="col-sm-3"></div>
</div>
</div>
<?php
include_once('inc/Footer.php');
?>
</body>
</html>