diff --git a/admin/overallreport.php b/admin/overallreport.php new file mode 100644 index 00000000..4988ffa8 --- /dev/null +++ b/admin/overallreport.php @@ -0,0 +1,154 @@ + +$(document).ready(function() { var startDateTextBox = $('#start'); var endDateTextBox = $('#end'); + $.timepicker.datetimeRange( + startDateTextBox,endDateTextBox,{ + numberOfMonths: 2, + dateFormat: 'yy-mm-dd', + timeFormat: 'HH:mm:ss', + showSecond: false, + regional: '$locale', + hourMin: 0, + hourMax: 23, + stepMinute: 5, + hourGrid: 2, + minuteGrid: 10, + });});"; + +print "
"; + +print "
+
"; +print "
+
"; + +?> + +
+ + data-toggle="toggle" data-on="" data-off="" data-width="200" /> +
+ +"; + +print "
"; + + +//generate report +if (isset($_GET['start'])) { + + $report = get_stats_by_time($start,$end,isset($_GET['rtype'])); + + print "
"; + xhtml_table($report,array("firstName","description","completions","totalcalls","time","callt","CPH","CALLSPH","effectiveness"),array(T_("Operator"),T_("Questionnaire"),T_("Completions"),T_("Calls"),T_("Total time"),T_("Call time"),T_("Completions p/h"),T_("Calls p/h"),T_("Effectiveness")),"tclass",false,false,"bs-table"); + print "
"; + +?> + + $value) { - $rsplit[] = $value; - $freport[] = $value; if ($value[$group] != $initial) { $initial = $value[$group]; $rtotal = get_stats_total($rsplit); - $rtotal[1]['firstName'] = $rsplit[0]['firstName']; - $rtotal[1]['description'] = $rsplit[0]['description']; + $rtotal = end($rtotal); + if ($byoperator) { + $rtotal['firstName'] = $rsplit[0]['firstName']; + } else { + $rtotal['description'] = $rsplit[0]['description']; + } $rsplit = array(); - $freport[] = $rtotal[1]; + $freport[] = $rtotal; } + $rsplit[] = $value; + $freport[] = $value; } + $rtotal = get_stats_total($rsplit); + $rtotal = end($rtotal); + if ($byoperator) { + $rtotal['firstName'] = $rsplit[0]['firstName']; + } else { + $rtotal['description'] = $rsplit[0]['description']; + } + $freport[] = $rtotal; - $freport[] = $overalltotal[1]; + $overalltotal = end($overalltotal); + + if ($byoperator) { + $overalltotal['firstName'] = T_("Total"); + } else { + $overalltotal['description'] = T_("Total"); + } + + $freport[] = $overalltotal; return $freport; }