320 lines
9.7 KiB
PHP
320 lines
9.7 KiB
PHP
|
<link rel="stylesheet" href="css/AdminLTE.min.css">
|
||
|
<link rel="stylesheet" href="css/ionicons.min.css">
|
||
|
|
||
|
<?php
|
||
|
include ('techsyn_header.php');
|
||
|
?>
|
||
|
<?php if($_SESSION['RoleId']==7){echo "<script>window.location.replace('emp_details.php')</script>";}?>
|
||
|
|
||
|
<!-- Main Content Container for side bar and body-->
|
||
|
<div class="main-container ace-save-state" id="main-container">
|
||
|
<script type="text/javascript">
|
||
|
try{ace.settings.loadState('main-container')}catch(e){}
|
||
|
</script>
|
||
|
<?php include('techsyn_sidebar.php'); ?>
|
||
|
|
||
|
<!--breadcrumb-->
|
||
|
<?php
|
||
|
|
||
|
?>
|
||
|
|
||
|
<div class="main-content">
|
||
|
<div class="main-content-inner">
|
||
|
<div class="breadcrumbs ace-save-state" id="breadcrumbs">
|
||
|
<ul class="breadcrumb">
|
||
|
<li><i class="ace-icon fa fa-home home-icon"></i> <a href="#">Home</a>
|
||
|
</li>
|
||
|
<li class="active">Dashboard</li>
|
||
|
|
||
|
</ul>
|
||
|
|
||
|
|
||
|
</div>
|
||
|
<!-- End of breadcrumb -->
|
||
|
<div class="page-content">
|
||
|
<div class="row">
|
||
|
<div class="col-lg-3 col-xs-6">
|
||
|
<!-- small box -->
|
||
|
<div class="small-box bg-aqua">
|
||
|
<div class="inner">
|
||
|
<h3><?php echo getTodayOpdCount()?></h3>
|
||
|
|
||
|
<p>OPDs Today</p>
|
||
|
</div>
|
||
|
<div class="icon">
|
||
|
<i class="ace-icon fa fa-ambulance"></i>
|
||
|
</div>
|
||
|
<a href="appointment_list.php?pagekey=23" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- ./col -->
|
||
|
<div class="col-lg-3 col-xs-6">
|
||
|
<!-- small box -->
|
||
|
<div class="small-box bg-red">
|
||
|
<div class="inner">
|
||
|
<h3><?php echo getTodayInjuryCount()?></h3>
|
||
|
|
||
|
<p>Injuries Today</p>
|
||
|
</div>
|
||
|
<div class="icon">
|
||
|
<i class="ace-icon fa fa-ambulance"></i>
|
||
|
</div>
|
||
|
<a href='appointment_list.php?pagekey=23' class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- ./col -->
|
||
|
<div class="col-lg-3 col-xs-6">
|
||
|
<!-- small box -->
|
||
|
<div class="small-box bg-yellow">
|
||
|
<div class="inner">
|
||
|
<h3><?php echo getRecentPatients()?></h3>
|
||
|
|
||
|
<p>Recent Patient Visit</p>
|
||
|
</div>
|
||
|
<div class="icon">
|
||
|
<i class="ace-icon glyphicon glyphicon-user"></i>
|
||
|
</div>
|
||
|
<a href="appointment_list.php?pagekey=23" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- ./col -->
|
||
|
<div class="col-lg-3 col-xs-6">
|
||
|
<!-- small box -->
|
||
|
<div class="small-box bg-blue">
|
||
|
<div class="inner">
|
||
|
<h3><?php echo getTodayCheckupCount()?></h3>
|
||
|
|
||
|
<p>Checkups Today</p>
|
||
|
</div>
|
||
|
<div class="icon">
|
||
|
<i class="ace-icon fa fa-flask"></i>
|
||
|
</div>
|
||
|
<a href="checkup_list.php?pagekey=25" class="small-box-footer">More info <i class="fa fa-arrow-circle-right"></i></a>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- ./col -->
|
||
|
</div>
|
||
|
<div class="row">
|
||
|
<div class="col-md-6">
|
||
|
<div class="panel panel-default">
|
||
|
<div class="panel-heading">Panel Heading</div>
|
||
|
<div class="panel-body">
|
||
|
<table class="table table-hover">
|
||
|
<tr>
|
||
|
<th>ID</th>
|
||
|
<th>User</th>
|
||
|
<th>Date</th>
|
||
|
<th>Status</th>
|
||
|
<th>Reason</th>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>183</td>
|
||
|
<td>John Doe</td>
|
||
|
<td>11-7-2014</td>
|
||
|
<td><span class="label label-success">Approved</span></td>
|
||
|
<td>Bacon ipsum dolor sit amet salami venison chicken flank fatback doner.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>219</td>
|
||
|
<td>Alexander Pierce</td>
|
||
|
<td>11-7-2014</td>
|
||
|
<td><span class="label label-warning">Pending</span></td>
|
||
|
<td>Bacon ipsum dolor sit amet salami venison chicken flank fatback doner.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>657</td>
|
||
|
<td>Bob Doe</td>
|
||
|
<td>11-7-2014</td>
|
||
|
<td><span class="label label-primary">Approved</span></td>
|
||
|
<td>Bacon ipsum dolor sit amet salami venison chicken flank fatback doner.</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>175</td>
|
||
|
<td>Mike Doe</td>
|
||
|
<td>11-7-2014</td>
|
||
|
<td><span class="label label-danger">Denied</span></td>
|
||
|
<td>Bacon ipsum dolor sit amet salami venison chicken flank fatback doner.</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
|
||
|
</div>
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- /.page-content -->
|
||
|
</div>
|
||
|
</div>
|
||
|
<!-- /.main-content -->
|
||
|
</div>
|
||
|
<?php include('techsyn_footer.php'); ?>
|
||
|
<script type="text/javascript">
|
||
|
jQuery(function($) {
|
||
|
$('.easy-pie-chart.percentage').each(function(){
|
||
|
var $box = $(this).closest('.infobox');
|
||
|
var barColor = $(this).data('color') || (!$box.hasClass('infobox-dark') ? $box.css('color') : 'rgba(255,255,255,0.95)');
|
||
|
var trackColor = barColor == 'rgba(255,255,255,0.95)' ? 'rgba(255,255,255,0.25)' : '#E2E2E2';
|
||
|
var size = parseInt($(this).data('size')) || 50;
|
||
|
$(this).easyPieChart({
|
||
|
barColor: barColor,
|
||
|
trackColor: trackColor,
|
||
|
scaleColor: false,
|
||
|
lineCap: 'butt',
|
||
|
lineWidth: parseInt(size/10),
|
||
|
animate: ace.vars['old_ie'] ? false : 1000,
|
||
|
size: size
|
||
|
});
|
||
|
})
|
||
|
|
||
|
$('.sparkline').each(function(){
|
||
|
var $box = $(this).closest('.infobox');
|
||
|
var barColor = !$box.hasClass('infobox-dark') ? $box.css('color') : '#FFF';
|
||
|
$(this).sparkline('html',
|
||
|
{
|
||
|
tagValuesAttribute:'data-values',
|
||
|
type: 'bar',
|
||
|
barColor: barColor ,
|
||
|
chartRangeMin:$(this).data('min') || 0
|
||
|
});
|
||
|
});
|
||
|
|
||
|
|
||
|
//flot chart resize plugin, somehow manipulates default browser resize event to optimize it!
|
||
|
//but sometimes it brings up errors with normal resize event handlers
|
||
|
$.resize.throttleWindow = false;
|
||
|
|
||
|
var placeholder = $('#piechart-placeholder').css({'width':'98%' , 'min-height':'300px'});
|
||
|
function drawPieChart(placeholder, data, position) {
|
||
|
$.plot(placeholder, data, {
|
||
|
series: {
|
||
|
pie: {
|
||
|
show: true,
|
||
|
tilt:0.8,
|
||
|
highlight: {
|
||
|
opacity: 0.25
|
||
|
},
|
||
|
stroke: {
|
||
|
color: '#fff',
|
||
|
width: 2
|
||
|
},
|
||
|
startAngle: 2
|
||
|
}
|
||
|
},
|
||
|
legend: {
|
||
|
show: true,
|
||
|
position: position || "ne",
|
||
|
labelBoxBorderColor: null,
|
||
|
margin:[-30,15]
|
||
|
}
|
||
|
,
|
||
|
grid: {
|
||
|
hoverable: true,
|
||
|
clickable: true
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
var data = Array();
|
||
|
|
||
|
$(document).ready(function() {
|
||
|
|
||
|
loadChartData(30);
|
||
|
|
||
|
|
||
|
});
|
||
|
|
||
|
function loadChartData(days){
|
||
|
$.ajax({
|
||
|
type: "GET",
|
||
|
url: "select_mostused_item.php?days="+days,
|
||
|
cache: false,
|
||
|
dataType: "json",
|
||
|
success: function(returnData) {
|
||
|
console.log(returnData);
|
||
|
data=returnData;
|
||
|
drawPieChart(placeholder, data);
|
||
|
|
||
|
/**
|
||
|
we saved the drawing function and the data to redraw with different position later when switching to RTL mode dynamically
|
||
|
so that's not needed actually.
|
||
|
*/
|
||
|
placeholder.data('chart', data);
|
||
|
placeholder.data('draw', drawPieChart);
|
||
|
|
||
|
},
|
||
|
error: function(returnData) {
|
||
|
console.log('error'+returnData);
|
||
|
}
|
||
|
})
|
||
|
}
|
||
|
//pie chart tooltip example
|
||
|
var $tooltip = $("<div class='tooltip top in'><div class='tooltip-inner'></div></div>").hide().appendTo('body');
|
||
|
var previousPoint = null;
|
||
|
|
||
|
placeholder.on('plothover', function (event, pos, item) {
|
||
|
if(item) {
|
||
|
if (previousPoint != item.seriesIndex) {
|
||
|
previousPoint = item.seriesIndex;
|
||
|
var tip = item.series['label'] + " : " + item.series['percent'].toFixed(2)+'%';
|
||
|
$tooltip.show().children(0).text(tip);
|
||
|
}
|
||
|
$tooltip.css({top:pos.pageY + 10, left:pos.pageX + 10});
|
||
|
} else {
|
||
|
$tooltip.hide();
|
||
|
previousPoint = null;
|
||
|
}
|
||
|
|
||
|
});
|
||
|
|
||
|
/* var data = [
|
||
|
{ label: "social networks", data: 38.7, color: "#68BC31"},
|
||
|
{ label: "search engines", data: 24.5, color: "#2091CF"},
|
||
|
{ label: "ad campaigns", data: 8.2, color: "#AF4E96"},
|
||
|
{ label: "direct traffic", data: 18.6, color: "#DA5430"},
|
||
|
{ label: "other", data: 10, color: "#FEE074"}
|
||
|
]*/
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
/////////////////////////////////////
|
||
|
$(document).one('ajaxloadstart.page', function(e) {
|
||
|
$tooltip.remove();
|
||
|
});
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
var d1 = [];
|
||
|
for (var i = 0; i < Math.PI * 2; i += 0.5) {
|
||
|
d1.push([i, Math.sin(i)]);
|
||
|
}
|
||
|
|
||
|
var d2 = [];
|
||
|
for (var i = 0; i < Math.PI * 2; i += 0.5) {
|
||
|
d2.push([i, Math.cos(i)]);
|
||
|
}
|
||
|
|
||
|
var d3 = [];
|
||
|
for (var i = 0; i < Math.PI * 2; i += 0.2) {
|
||
|
d3.push([i, Math.tan(i)]);
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
//Android's default browser somehow is confused when tapping on label which will lead to dragging the task
|
||
|
//so disable dragging when clicking on label
|
||
|
var agent = navigator.userAgent.toLowerCase();
|
||
|
if(ace.vars['touch'] && ace.vars['android']) {
|
||
|
$('#tasks').on('touchstart', function(e){
|
||
|
var li = $(e.target).closest('#tasks li');
|
||
|
if(li.length == 0)return;
|
||
|
var label = li.find('label.inline').get(0);
|
||
|
if(label == e.target || $.contains(label, e.target)) e.stopImmediatePropagation() ;
|
||
|
});
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
})
|
||
|
</script>
|