This repository has been archived by the owner on Jun 11, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmindash.php
229 lines (184 loc) · 6.52 KB
/
admindash.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
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
<?php
session_start();
ob_clean();
?>
<!DOCTYPE html>
<html>
<header>
<!--Import Google Icon Font-->
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<!--Import materialize.css-->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css">
<link rel='stylesheet prefetch' href='https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.3/css/materialize.min.css'>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js"></script>
<!--Let browser know website is optimized for mobile-->
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
<style>
body {
display: flex;
min-height: 100vh;
flex-direction: column;
}
main {
flex: 1 0 auto;
}
</style>
</header>
<main>
<nav class="cyan">
<div class="nav-wrapper">
<a href="#" class="brand-logo center">e-Bonafide</a>
<ul id="nav-mobile" class="hide-on-small-only right ">
Welcome, <?php echo $_SESSION['uname'];?>
</ul>
</div>
</nav>
<form>
<div class="container">
<br>
<h4>Admin | Dashboard</h4>
<hr>
<br>
<div class="row">
<div class="card small red lighten-4 col m4 s12">
<div class="card-content ">
<span class="card-title activator grey-text text-darken-4">Instituitions<i class="material-icons right">more_vert</i></span>
<br><h5> <?php
//$fac = sprintf("SELECT COUNT(DISTINCT staffid) FROM overallfaculty");
// Perform Query
//$result =mysqli_query($conn,$fac);
//$rows = mysqli_fetch_array($result);
echo "Total Count ".$rows[0];
?></h5>
</div>
<div class="card-reveal">
<span class="card-title grey-text text-darken-4">Card Title<i class="material-icons right">close</i></span>
<p><?php
$stu= sprintf("SELECT staffid,firstname FROM overallfaculty");
// Perform Query
//echo $fac;
$res =mysqli_query($conn,$stu);
echo "<table class='highlight responsive-table'><thead><tr><th>Staff ID</th><th>Faculty Name</th></tr></thead><tbody>";
while($row = mysqli_fetch_array($res)){
echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";
}
echo "</tbody></table>";
?></p>
</div>
</div>
<div class="card small yellow lighten-4 col m4 s12 ">
<div class="card-content ">
<span class="card-title activator grey-text text-darken-4">Campuses<i class="material-icons right">more_vert</i></span>
<br><h5><?php
$course= sprintf("SELECT COUNT(DISTINCT courseid) FROM course");
// Perform Query
//echo $fac;
//$r =mysqli_query($conn,$course);
//$q = mysqli_fetch_array($r);
echo "Total Count ".$q[0];
?>
</h5>
</div>
<div class="card-reveal">
<span class="card-title grey-text text-darken-4">Card Title<i class="material-icons right">close</i></span>
<p><?php
$stu= sprintf("SELECT courseid,coursename FROM course");
// Perform Query
//echo $fac;
//$res =mysqli_query($conn,$stu);
echo "<table class='highlight responsive-table'><thead><tr><th>Student ID</th><th>Student Name</th></tr></thead><tbody>";
//while($row = mysqli_fetch_array($res)){
//echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";
//}
echo "</tbody></table>";
?></p>
</div>
</div>
<div class="card small green lighten-4 col m4 s12 ">
<div class="card-content ">
<span class="card-title activator grey-text text-darken-4">Students<i class="material-icons right">more_vert</i></span>
<br><h5><?php
// $stu= sprintf("SELECT COUNT(DISTINCT studentid) FROM overallstudent");
// Perform Query
//echo $fac;
//$res =mysqli_query($conn,$stu);
//$row = mysqli_fetch_array($res);
echo "Total Count ".$row[0];
?></h5>
</div>
<div class="card-reveal">
<span class="card-title grey-text text-darken-4">Students<i class="material-icons right">close</i></span>
<p><?php
// $stu= sprintf("SELECT studentid,firstname FROM overallstudent");
// Perform Query
//echo $fac;
//$res =mysqli_query($conn,$stu);
echo "<table class='highlight responsive-table'><thead><tr><th>Student ID</th><th>Student Name</th></tr></thead><tbody>";
//while($row = mysqli_fetch_array($res)){
//echo "<tr><td>".$row[0]."</td><td>".$row[1]."</td></tr>";}
//echo "</tbody></table>";
?></p>
</div>
</div>
</div>
</div>
</form>
</main>
<main>
<main>
<div class="container">
<form></form>
<center>
<div class="row">
<a class="waves-effect waves-light btn"><i class="material-icons left">cloud</i>button</a>
<h6> | </h6>
<a class="waves-effect waves-light btn"><i class="material-icons right">cloud</i>button</a>
</div>
</center>
</div>
</main>
<!--Import jQuery before materialize.js-->
<script type="text/javascript" src="https://code.jquery.com/jquery-3.2.1.min.js"></script>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.100.1/js/materialize.min.js"></script>
<script>
$('.button-collapse').sideNav({
menuWidth: 300, // Default is 300
edge: 'right', // Choose the horizontal origin
closeOnClick: true, // Closes side-nav on <a> clicks, useful for Angular/Meteor
draggable: true, // Choose whether you can drag to open on touch screens,
onOpen: function(el) { /* Do Stuff*/ }, // A function to be called when sideNav is opened
onClose: function(el) { /* Do Stuff*/ }, // A function to be called when sideNav is closed
}
);
$(document).ready(function() {
$('select').material_select();
});
$(document).ready(function() {
Materialize.updateTextFields();
});
</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.0.272/jspdf.debug.js"></script>
<script src='https://code.jquery.com/jquery-2.1.3.min.js'></script>
<script type="text/javascript">
var globalVariable={
regNo: '<?php
echo $_SESSION['uname'];?>'
};
</script>
<script type="text/javascript">
function clicked() {
doc.save('bonafide.pdf',true );
location.reload(true);
}
function preview(){
preview_container = document.getElementById('previewframe');
preview_container.attr('src', doc.output('datauristring'));
}
</script>
<script type="text/javascript" src="bonafide.js"></script>
<footer class="page-footer cyan">
<center><a class="waves-effect waves-light btn light-blue" href="logout.php" id="download" name="logout">Log Out</a></center>
<br>
</footer>
</html>