-
Notifications
You must be signed in to change notification settings - Fork 0
/
admindashboard.php
364 lines (318 loc) · 15.4 KB
/
admindashboard.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
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
<?php
session_start();
if(!empty($_SESSION['username']))
{
include('config.php');
$que=mysqli_query($con,"select count(*) from add_employee ");
$res=mysqli_fetch_array($que);
$quee=mysqli_query($con,"select count(*) from add_associate_employee ");
$ress=mysqli_fetch_array($quee);
$queee=mysqli_query($con,"select count(*) from lms_table ");
$resss=mysqli_fetch_array($queee);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<title>HRMS Admin Panel</title>
<link href="css_chart/bootstrap.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.0/jquery.min.js"></script>
<link href="http://themepixels.com/demo/webpage/chain/css/style.default.css" rel="stylesheet">
<link href="http://themepixels.com/demo/webpage/chain/css/morris.css" rel="stylesheet">
<link href="http://themepixels.com/demo/webpage/chain/css/select2.css" rel="stylesheet" />
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css">
<link href="css/stylechart.css" rel="stylesheet">
<link href="css/style.default.css" rel="stylesheet">
<link href="css/stylemanual.css" rel="stylesheet"> <!-- my css -->
<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!--[if lt IE 9]>
<script src="js/html5shiv.js"></script>
<script src="js/respond.min.js"></script>
<![endif]-->
<!--Load the AJAX API-->
<script type="text/javascript" src="https://www.google.com/jsapi"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script type="text/javascript">
/*
// Load the Visualization API and the piechart package.
google.load('visualization', '1', {'packages':['corechart']});
// Set a callback to run when the Google Visualization API is loaded.
google.setOnLoadCallback(drawChart);
function drawChart() {
var jsonData = $.ajax({
url: "getData.php",
dataType:"json",
async: false
}).responseText;
// Create our data table out of JSON data loaded from server.
var data = new google.visualization.DataTable(jsonData);
// Instantiate and draw our chart, passing in some options.
var chart = new google.visualization.ColumnChart(document.getElementById('chart_div'));
chart.draw(data, {width: 800, height: 350});
} */
</script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/prefixfree/1.0.7/prefixfree.min.js"></script>
</head>
<body>
<?php include ('employee_chart.php');?>
<?php include('include/header.php');?>
<section>
<?php include('include/sidebar.php');?>
<div class="mainpanel">
<div class="pageheader" >
<div class="media">
<div class="pageicon pull-left">
<a href="admindashboard.php"> <i style="color:white" class="fa fa-home"></i></a>
</div>
<div class="media-body mediabody1" >
<ul class="breadcrumb">
<li><a href="admindashboard.php"><i class="fa fa-home" aria-hidden="true"></i></a></li>
<li><a href="admindashboard.php">Dashboard</a></li>
</ul>
<h4>Dashboard</h4>
</div>
</div><!-- media -->
</div><!-- pageheader -->
<div class="contentpanel">
<!-- <div class="row">
<div class="col-sm-12" style="color:white;font-weight:bold;font-size:14px;background-color:#428BCA">
<h5 style="padding-top:5px; padding-bottom:5px">Overviews : </h5>
</div>
</div> -->
<div class="row">
<center><h4>Employee</h4></center>
<div class="col-lg-12">
<div class="panel panel-primary">
<div class='chart' id='p1'>
<canvas id='c1'></canvas>
</div>
<!-- <div id="chartContainer" style="height: 400px; width: 100%;"></div>-->
<!-- <div class="panel-heading">
<h3 class="panel-title color"><i class="fa fa-long-arrow-right"></i>Employee</h3>
</div>
<div class="panel-body">
<div id="morris-bar-chart"></div>
</div>-->
</div>
</div>
</div>
<div class="row row-stat">
<div class="col-md-6">
<div class="panel panel-success-alt noborder">
<div class="panel-heading noborder">
<div class="panel-icon"><a href="manage_employee.php"><i class="fa fa-users"></i></a></div>
<div class="media-body">
<h5 class="md-title nomargin">Total Employee</h5>
<h1 class="mt5"><?php echo $res['count(*)']; ?></h1>
</div><!-- media-body -->
<!-- <hr>
<div class="clearfix mt20">
<div class="pull-left">
<h5 class="md-title nomargin">Yesterday</h5>
<h4 class="nomargin">$29,009.17</h4>
</div>
<div class="pull-right">
<h5 class="md-title nomargin">This Week</h5>
<h4 class="nomargin">$99,103.67</h4>
</div>
</div> -->
</div><!-- panel-body -->
</div><!-- panel -->
</div><!-- col-md-4 -->
<div class="col-md-6">
<div class="panel panel-primary noborder">
<div class="panel-heading noborder">
<div class="panel-icon"><a href="manage-associate.php"><i class="fa fa-users"></i></a></div>
<div class="media-body">
<h5 class="md-title nomargin">Total Associate</h5>
<h1 class="mt5"><?php echo $ress['count(*)']; ?></h1>
</div><!-- media-body -->
<!-- <hr>
<div class="clearfix mt20">
<div class="pull-left">
<h5 class="md-title nomargin">Yesterday</h5>
<h4 class="nomargin">10,009</h4>
</div>
<div class="pull-right">
<h5 class="md-title nomargin">This Week</h5>
<h4 class="nomargin">178,222</h4>
</div>
</div>
-->
</div><!-- panel-body -->
</div><!-- panel -->
</div>
<!-- <div class="col-md-4">
<div class="panel panel-dark noborder">
<div class="panel-heading noborder">
<div class="panel-btns">
<a href="#" class="panel-close tooltips" data-toggle="tooltip" data-placement="left" title="Close Panel"><i class="fa fa-times"></i></a>
</div><!-- panel-btns -->
<!-- <div class="panel-icon"><a href="manage-lms.php"><i class="fa fa-lastfm"></a></i></div>
<div class="media-body">
<h5 class="md-title nomargin">Total Lead</h5>
<h1 class="mt5"><?php// echo $resss['count(*)']; ?></h1>
</div>-->
<!-- media-body -->
<!-- <hr>
<div class="clearfix mt20">
<div class="pull-left">
<h5 class="md-title nomargin">Yesterday</h5>
<h4 class="nomargin">144,009</h4>
</div>
<div class="pull-right">
<h5 class="md-title nomargin">This Week</h5>
<h4 class="nomargin">987,212</h4>
</div>
</div>
-->
<!-- </div>
</div>
</div> -->
</div><!-- row -->
</div><!-- contentpanel -->
</div><!-- mainpanel -->
</div><!-- mainwrapper -->
</section>
<!--<script type="text/javascript">
window.onload = function () {
var chart = new CanvasJS.Chart("chartContainer", {
title: {
text: "Employee"
},
data: [{
type: "column",
dataPoints: [
{ y: <?php if(!@$jan){echo "0";}else{echo $jan;} ?>, label: "January" },
{ y: <?php if(!@$feb){echo "0";}else{echo $feb;} ?>, label: "Febuary" },
{ y: <?php if(!@$mar){echo "0";}else{echo $mar;} ?>, label: "March" },
{ y: <?php if(!@$apr){echo "0";}else{echo $apr;} ?>, label: "April" },
{ y: <?php if(!@$may){echo "0";}else{echo $may;} ?>, label: "May" },
{ y: <?php if(!@$june){echo "0";}else{echo $june;} ?>, label: "June" },
{ y: <?php if(!@$july){echo "0";}else{echo $july;} ?>, label: "July" },
{ y: <?php if(!@$aug){echo "0";}else{echo $aug;} ?>, label: "August" },
{ y: <?php if(!@$sep){echo "0";}else{echo $sep;} ?>, label: "September" },
{ y: <?php if(!@$oct){echo "0";}else{echo $oct;} ?>, label: "October" },
{ y: <?php if(!@$nov){echo "0";}else{echo $nov;} ?>, label: "November" },
{ y: <?php if(!@$dec){echo "0";}else{echo $dec;} ?>, label: "December" },
]
}]
});
chart.render();
}
</script>-->
<script src='http://cdnjs.cloudflare.com/ajax/libs/Chart.js/0.2.0/Chart.min.js'></script>
<script>
var c1 = document.getElementById("c1");
var parent = document.getElementById("p1");
c1.width = parent.offsetWidth - 40;
c1.height = parent.offsetHeight - 40;
var data1 = {
labels : ["January","Feburary","March","April","May","June","July","August","September","October","November","December"],
datasets : [
{
fillColor : "rgba(255,255,255,.1)",
strokeColor : "rgba(255,255,255,1)",
pointColor : "#123",
pointStrokeColor : "rgba(255,255,255,1)",
data : [<?php if(!@$jan){echo "0";}else{echo $jan;} ?>,<?php if(!@$feb){echo "0";}else{echo $feb;} ?>,<?php if(!@$mar){echo "0";}else{echo $mar;} ?>,<?php if(!@$apr){echo "0";}else{echo $apr;} ?>,<?php if(!@$may){echo "0";}else{echo $may;} ?>,<?php if(!@$jun){echo "0";}else{echo $jun;} ?>,<?php if(!@$jul){echo "0";}else{echo $jul;} ?>,<?php if(!@$aug){echo "0";}else{echo $aug;} ?>,<?php if(!@$sep){echo "0";}else{echo $sep;} ?>,<?php if(!@$oct){echo "0";}else{echo $oct;} ?>,<?php if(!@$nov){echo "0";}else{echo $nov;} ?>,<?php if(!@$dec){echo "0";}else{echo $dec;} ?>]
}
]
}
var options1 = {
scaleFontColor : "rgba(255,255,255,1)",
scaleLineColor : "rgba(255,255,255,1)",
scaleGridLineColor : "transparent",
bezierCurve : false,
scaleOverride : true,
scaleSteps : 5,
scaleStepWidth : 10,
scaleStartValue : 0
}
new Chart(c1.getContext("2d")).Line(data1,options1)
</script>
<script src="js/jquery-1.11.1.min.js"></script>
<script src="js/jquery-migrate-1.2.1.min.js"></script>
<script src="js/bootstrap.min.js"></script>
<script src="js_chart/canvasjs.min.js"></script>
<!--<script src="js_chart/raphael.min.js"></script>
<script src="js_chart/morris.min.js"></script>-->
<script>
/* $(function() {
Morris.Bar({
element: 'morris-bar-chart',
data: [{
year: 'January',
percent: 10
}, {
year: 'Febuary',
percent: 20
}, {
year: 'March',
percent: 35
}, {
year: 'April',
percent: 45
}, {
year: 'May',
percent: 65
}, {
year: 'June',
percent: 75
}, {
year: 'July',
percent: 100
}, {
year: 'August',
percent: 60
}, {
year: 'September',
percent: 40
}, {
year: 'October',
percent: 20
}, {
year: 'November',
percent: 75
}, {
year: 'December',
percent: 40
}],
xkey: 'year',
ykeys: ['percent'],
labels: ['Employee'],
barRatio: 0.4,
xLabelAngle: 35,
hideHover: 'auto',
resize: true
});
}); */
</script>
<script src="js/modernizr.min.js"></script>
<script src="js/pace.min.js"></script>
<script src="js/retina.min.js"></script>
<script src="js/jquery.cookies.js"></script>
<script src="js/flot/jquery.flot.min.js"></script>
<script src="js/flot/jquery.flot.resize.min.js"></script>
<script src="js/flot/jquery.flot.spline.min.js"></script>
<script src="js/jquery.sparkline.min.js"></script>
<script src="js/morris.min.js"></script>
<script src="js/raphael-2.1.0.min.js"></script>
<script src="js/bootstrap-wizard.min.js"></script>
<script src="js/select2.min.js"></script>
<script src="js/custom.js"></script>
<script src="js/dashboard.js"></script>
</body>
</html>
<?php
}
else
{
header('location:index.php');
}
?>