-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommon_header.php
More file actions
120 lines (120 loc) · 5.81 KB
/
common_header.php
File metadata and controls
120 lines (120 loc) · 5.81 KB
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
<div class="row row-cols-1 row-cols-lg-4">
<div class="col">
<div class="card radius-10 overflow-hidden bg-gradient-cosmic">
<div class="card-body">
<div class="d-flex align-items-center">
<div>
<p class="mb-0 text-white">Total Candidates</p>
<h5 class="mb-0 text-white">
<?php
include 'connection.php';
$stmt = $mysqli->prepare("Select COUNT(*) as total from candidate where createdby=? order by id");
$stmt->bind_param('s',$_SESSION['username']);
$stmt->execute();
$result = $stmt->get_result();
if ($mysqli->affected_rows > 0) {
while ($row_fetch = $result->fetch_assoc()) {
echo $row_fetch['total'];
}
}
?>
</h5>
</div>
<div class="ms-auto text-white"><i class='bx bx-user font-30'></i>
</div>
</div>
<div class="progress bg-white-2 radius-10 mt-4" style="height:4.5px;">
<div class="progress-bar bg-white" role="progressbar" style="width: 46%"></div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card radius-10 overflow-hidden bg-gradient-burning">
<div class="card-body">
<div class="d-flex align-items-center">
<div>
<p class="mb-0 text-white">Total Positions</p>
<h5 class="mb-0 text-white">
<?php
include 'connection.php';
$stmt = $mysqli->prepare("Select COUNT(*) as total1 from positions where createdby=? order by id");
$stmt->bind_param('s',$_SESSION['username']);
$stmt->execute();
$result = $stmt->get_result();
if ($mysqli->affected_rows > 0) {
while ($row_fetch1 = $result->fetch_assoc()) {
echo $row_fetch1['total1'];
}
}
?>
</h5>
</div>
<div class="ms-auto text-white"><i class='bx bx-chair font-30'></i>
</div>
</div>
<div class="progress bg-white-2 radius-10 mt-4" style="height:4.5px;">
<div class="progress-bar bg-white" role="progressbar" style="width: 72%"></div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card radius-10 overflow-hidden bg-gradient-Ohhappiness">
<div class="card-body">
<div class="d-flex align-items-center">
<div>
<p class="mb-0 text-white">Total Users</p>
<h5 class="mb-0 text-white">
<?php
include 'connection.php';
$stmt = $mysqli->prepare("Select COUNT(*) as total2 from users where user_role = 'voter';");
$stmt->execute();
$result = $stmt->get_result();
if ($mysqli->affected_rows > 0) {
while ($row_fetch2 = $result->fetch_assoc()) {
echo $row_fetch2['total2'];
}
}
?>
</h5>
</div>
<div class="ms-auto text-white"><i class='bx bx-street-view font-30'></i>
</div>
</div>
<div class="progress bg-white-2 radius-10 mt-4" style="height:4.5px;">
<div class="progress-bar bg-white" role="progressbar" style="width: 68%"></div>
</div>
</div>
</div>
</div>
<div class="col">
<div class="card radius-10 overflow-hidden bg-gradient-moonlit">
<div class="card-body">
<div class="d-flex align-items-center">
<div>
<p class="mb-0 text-white">Total Admin</p>
<h5 class="mb-0 text-white">
<?php
include 'connection.php';
$stmt = $mysqli->prepare("Select COUNT(*) as total3 from users where user_role = 'admin';");
$stmt->execute();
$result = $stmt->get_result();
if ($mysqli->affected_rows > 0) {
while ($row_fetch3 = $result->fetch_assoc()) {
echo $row_fetch3['total3'];
}
}
?>
</h5>
</div>
<div class="ms-auto text-white"><i class='bx bx-happy font-30'></i>
</div>
</div>
<div class="progress bg-white-2 radius-10 mt-4" style="height:4.5px;">
<div class="progress-bar bg-white" role="progressbar" style="width: 66%"></div>
</div>
</div>
</div>
</div>
</div><!--end row-->