-
Notifications
You must be signed in to change notification settings - Fork 0
/
M_2_Home.php
163 lines (133 loc) · 5.33 KB
/
M_2_Home.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
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<!-- <link rel="stylesheet" type="text/css" href="homeStyle.css"> -->
<link rel="stylesheet" type="text/css" href="HomeCSS.css">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=ITC+Benguiat&display=swap">
</head>
<body>
<div class="content">
<div class="header">
<h1>Online Police Verification System</h1>
<button class="logout-button" style="position: absolute; left : 90%;top:90%;" onclick="window.location.href = '/M-2/M-2_logOut.php';">Logout</button>
</div>
<div class="card-row">
<div class="card">
<div class="card-content">
<div class="card-icon">
<img src="" >
</div>
<h2><button style="background: none;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
/* text-decoration: underline; */
color: inherit;font-size : 25px" id="new-request-button" onclick="window.location.href = '/M-2/M_2_NewRequest.php'; ">New Request</button></h2>
<h3><?php
// include('/M-2/check_auth.php');
session_start();
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "opvs";
$instEmail = $_SESSION['user_email'];
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT COUNT(*) AS count FROM form_info WHERE status = 'institute' and institute_email = '$instEmail'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
echo $row["count"] ;
} else {
echo "No rows found.";
}?></h3>
</div>
</div>
<div class="card">
<div class="card-content">
<div class="card-icon">
<img src="" >
</div>
<h2><button style="background: none;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
/* text-decoration: underline; */
color: inherit;font-size : 25px" id="new-request-button" onclick="window.location.href = '/M-2/M_2_completedFiles.php'; ">Completed Files</button></h2>
<h3><?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "opvs";
$conn = new mysqli($servername, $username, $password, $dbname);
$instEmail = $_SESSION['user_email'];
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT COUNT(*) AS count FROM form_info WHERE status = 'requestor' and institute_email = '$instEmail'";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
echo $row["count"] ;
} else {
echo "No rows found.";
}?></h3>
</div>
</div>
</div>
<div class="card-row">
<div class="card">
<div class="card-content">
<div class="card-icon">
<img src="" >
</div>
<h2><button style="background: none;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
/* text-decoration: underline; */
color: inherit;font-size : 25px" id="new-request-button" onclick="window.location.href = '/M-2/M_2_pendingFiles.php'; ">Pending Files</button></h2>
<h3><?php
$servername = "localhost";
$username = "root";
$password = "";
$dbname = "opvs";
$instEmail = $_SESSION['user_email'];
$conn = new mysqli($servername, $username, $password, $dbname);
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
}
$sql = "SELECT COUNT(*) AS count FROM form_info WHERE (status = 'police' or status = 'SB' or status = 'officer') and institute_email = '$instEmail' ";
$result = $conn->query($sql);
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
echo $row["count"] ;
} else {
echo "No rows found.";
}?></h3>
</div>
</div>
<div class="card" >
<div class="card-content">
<div class="card-icon">
<img src="" >
</div>
<h2><button style="background: none;
border: none;
padding: 0;
font: inherit;
cursor: pointer;
/* text-decoration: underline; */
color: inherit;font-size : 25px" id="new-request-button" onclick="window.location.href = '/M-2/M-2_viewInfo.php'; ">Institute Info</button></h2>
</div>
</div>
</body>
</html>