<?php // $Id: timeSpentByDept.php,v 1.9 2006/02/06 19:58:23 eric_juden Exp $ include_once XHELP_JPGRAPH_PATH . '/jpgraph.php'; include_once XHELP_CLASS_PATH . '/report.php'; xhelpIncludeReportLangFile('timeSpentByDept'); global $xoopsDB, $paramVals; $startDate = date('m/d/y h:i:s A', mktime(0, 0, 0, date("m") - 1, date("d"), date("Y"))); $endDate = date('m/d/y') . " 12:00:00 AM"; // Cannot fill date values in class...have to fill these values later $paramVals = array('startDate' => isset($_REQUEST['startDate']) && $_REQUEST['startDate'] != '' ? $_REQUEST['startDate'] : $startDate, 'endDate' => isset($_REQUEST['endDate']) && $_REQUEST['endDate'] != '' ? $_REQUEST['endDate'] : $endDate); class xhelpTimeSpentByDeptReport extends xhelpReport { function xhelpTimeSpentByDeptReport() { $this->initVar('results', XOBJ_DTYPE_ARRAY, null, false); $this->initVar('hasResults', XOBJ_DTYPE_INT, 0, false); $this->initVar('hasGraph', XOBJ_DTYPE_INT, 1, false); } var $name = 'timeSpentByDept'; var $meta = array('name' => _XHELP_TSBD_NAME, 'author' => 'Eric Juden', 'authorEmail' => '*****@*****.**', 'description' => _XHELP_TSBD_DESC, 'version' => '1.0', 'dbFields' => array('department' => _XHELP_TSBD_DB1, 'TotalTime' => _XHELP_TSBD_DB2)); var $parameters = array(_XHELP_TSBD_PARAM1 => array('controltype' => XHELP_CONTROL_DATETIME, 'fieldname' => 'startDate', 'value' => '', 'values' => '', 'fieldlength' => 25, 'dbfield' => 'r.updateTime', 'dbaction' => '>'), _XHELP_TSBD_PARAM2 => array('controltype' => XHELP_CONTROL_DATETIME, 'fieldname' => 'endDate', 'value' => '', 'values' => '', 'fieldlength' => 25, 'dbfield' => 'r.updateTime', 'dbaction' => '<=')); /* function generateReport() { global $paramVals; if($this->getVar('hasResults') == 0){ $this->_setResults(); } $aResults = $this->getVar('results');
<?php // $Id: unresolvedTicketsByDept.php,v 1.6 2006/02/06 19:58:23 eric_juden Exp $ include_once XHELP_JPGRAPH_PATH . '/jpgraph.php'; include_once XHELP_CLASS_PATH . '/report.php'; xhelpIncludeReportLangFile('unresolvedTicketsByDept'); global $xoopsDB, $paramVals; $startDate = date('m/d/y h:i:s A', mktime(0, 0, 0, date("m") - 1, date("d"), date("Y"))); $endDate = date('m/d/y') . " 12:00:00 AM"; // Cannot fill date values in class...have to fill these values later $paramVals = array('startDate' => isset($_REQUEST['startDate']) && $_REQUEST['startDate'] != '' ? $_REQUEST['startDate'] : $startDate, 'endDate' => isset($_REQUEST['endDate']) && $_REQUEST['endDate'] != '' ? $_REQUEST['endDate'] : $endDate); class xhelpUnresolvedTicketsByDeptReport extends xhelpReport { function xhelpUnresolvedTicketsByDeptReport() { $this->initVar('results', XOBJ_DTYPE_ARRAY, null, false); $this->initVar('hasResults', XOBJ_DTYPE_INT, 0, false); $this->initVar('hasGraph', XOBJ_DTYPE_INT, 1, false); } var $name = 'unresolvedTicketsByDept'; var $meta = array('name' => _XHELP_UTBD_NAME, 'author' => 'Eric Juden', 'authorEmail' => '*****@*****.**', 'description' => _XHELP_UTBD_DESC, 'version' => '1.0', 'dbFields' => array('department' => _XHELP_UTBD_DB1, 'id' => _XHELP_UTBD_DB2, 'subject' => _XHELP_UTBD_DB3, 'status' => _XHELP_UTBD_DB4, 'totalTimeSpent' => _XHELP_UTBD_DB5, 'postTime' => _XHELP_UTBD_DB6)); var $parameters = array(_XHELP_UTBD_PARAM1 => array('controltype' => XHELP_CONTROL_DATETIME, 'fieldname' => 'startDate', 'value' => '', 'values' => '', 'fieldlength' => 25, 'dbfield' => 't.posted', 'dbaction' => '>'), _XHELP_UTBD_PARAM2 => array('controltype' => XHELP_CONTROL_DATETIME, 'fieldname' => 'endDate', 'value' => '', 'values' => '', 'fieldlength' => 25, 'dbfield' => 't.posted', 'dbaction' => '<=')); /* function generateReport() { global $paramVals; if($this->getVar('hasResults') == 0){ $this->_setResults(); } $aResults = $this->getVar('results');
<?php // $Id: staffRolesByDept.php,v 1.5 2006/02/06 19:58:23 eric_juden Exp $ include_once XHELP_CLASS_PATH . '/report.php'; xhelpIncludeReportLangFile('staffRolesByDept'); include_once XHELP_JPGRAPH_PATH . '/jpgraph.php'; include_once XHELP_CLASS_PATH . '/report.php'; global $xoopsDB; class xhelpStaffRolesByDeptReport extends xhelpReport { function xhelpStaffRolesByDeptReport() { $this->initVar('results', XOBJ_DTYPE_ARRAY, null, false); $this->initVar('hasResults', XOBJ_DTYPE_INT, 0, false); $this->initVar('hasGraph', XOBJ_DTYPE_INT, 0, false); } var $meta = array('name' => _XHELP_SRD_NAME, 'author' => 'Eric Juden', 'author_email' => '*****@*****.**', 'description' => _XHELP_SRD_DESC, 'version' => '1.0', 'dbFields' => array('Department' => _XHELP_SRD_DB3, 'Role' => _XHELP_SRD_DB2, 'name' => _XHELP_SRD_DB1)); /* function generateReport() { if($this->getVar('hasResults') == 0){ $this->_setResults(); } $aResults = $this->getVar('results'); if(empty($aResults)){ // If no records found $myReport = $this->generateReportNoData(); return $myReport; } // Print graph
<?php // $Id: departmentSummary.php,v 1.2 2006/02/06 19:58:21 eric_juden Exp $ include_once XHELP_JPGRAPH_PATH . '/jpgraph.php'; include_once XHELP_JPGRAPH_PATH . '/jpgraph_bar.php'; // aƱado para ver si funciona <====================18/03/2010 include_once XHELP_CLASS_PATH . '/report.php'; xhelpIncludeReportLangFile('departmentSummary'); global $xoopsDB, $paramVals; $startDate = date('m/d/y h:i:s A', mktime(0, 0, 0, date("m") - 1, date("d"), date("Y"))); $endDate = date('m/d/y') . " 12:00:00 AM"; $hDepartments =& xhelpGetHandler('department'); $crit = new Criteria('', ''); $crit->setSort('department'); $crit->setOrder('ASC'); $departments =& $hDepartments->getObjects($crit, true); $i = 0; $aDepts = array(); $aDepts[-999] = 'All'; foreach ($departments as $id => $dept) { if ($i == 0) { $deptid = $id; } $aDepts[$id] = $dept->getVar('department'); $i++; } // Cannot fill date values in class...have to fill these values later $paramVals = array('startDate' => isset($_REQUEST['startDate']) && $_REQUEST['startDate'] != '' ? $_REQUEST['startDate'] : $startDate, 'endDate' => isset($_REQUEST['endDate']) && $_REQUEST['endDate'] != '' ? $_REQUEST['endDate'] : $endDate, 'department' => array($aDepts, isset($_REQUEST['department']) ? $_REQUEST['department'] : '')); class xhelpDepartmentSummaryReport extends xhelpReport { function xhelpDepartmentSummaryReport()
<?php // $Id: ticketsByDept.php,v 1.8 2006/02/06 19:58:23 eric_juden Exp $ include_once XHELP_JPGRAPH_PATH . '/jpgraph.php'; include_once XHELP_CLASS_PATH . '/report.php'; xhelpIncludeReportLangFile('ticketsByDept'); global $xoopsDB, $paramVals; $startDate = date('m/d/y h:i:s A', mktime(0, 0, 0, date("m") - 1, date("d"), date("Y"))); $endDate = date('m/d/y') . " 12:00:00 AM"; // Cannot fill date values in class...have to fill these values later $paramVals = array('startDate' => isset($_REQUEST['startDate']) && $_REQUEST['startDate'] != '' ? $_REQUEST['startDate'] : $startDate, 'endDate' => isset($_REQUEST['endDate']) && $_REQUEST['endDate'] != '' ? $_REQUEST['endDate'] : $endDate); class xhelpTicketsByDeptReport extends xhelpReport { function xhelpTicketsByDeptReport() { $this->initVar('results', XOBJ_DTYPE_ARRAY, null, false); $this->initVar('hasResults', XOBJ_DTYPE_INT, 0, false); $this->initVar('hasGraph', XOBJ_DTYPE_INT, 1, false); } var $name = 'ticketsByDept'; var $meta = array('name' => _XHELP_TBD_NAME, 'author' => 'Eric Juden', 'authorEmail' => '*****@*****.**', 'description' => _XHELP_TBD_DESC, 'version' => '1.0', 'dbFields' => array('department' => _XHELP_TBD_DB1, 'TicketCount' => _XHELP_TBD_DB2)); var $parameters = array(_XHELP_TBD_PARAM1 => array('controltype' => XHELP_CONTROL_DATETIME, 'fieldname' => 'startDate', 'value' => '', 'values' => '', 'fieldlength' => 25, 'dbfield' => 't.posted', 'dbaction' => '>'), _XHELP_TBD_PARAM2 => array('controltype' => XHELP_CONTROL_DATETIME, 'fieldname' => 'endDate', 'value' => '', 'values' => '', 'fieldlength' => 25, 'dbfield' => 't.posted', 'dbaction' => '<=')); /* function generateReport() { global $paramVals; if($this->getVar('hasResults') == 0){ $this->_setResults(); } $aResults = $this->getVar('results');
<?php // $Id: timeSpentByStaff.php,v 1.6 2006/02/06 19:58:23 eric_juden Exp $ include_once XHELP_JPGRAPH_PATH . '/jpgraph.php'; include_once XHELP_CLASS_PATH . '/report.php'; xhelpIncludeReportLangFile('timeSpentByStaff'); global $xoopsDB, $paramVals; $startDate = date('m/d/y h:i:s A', mktime(0, 0, 0, date("m") - 1, date("d"), date("Y"))); $endDate = date('m/d/y') . " 12:00:00 AM"; // Cannot fill date values in class...have to fill these values later $paramVals = array('startDate' => isset($_REQUEST['startDate']) && $_REQUEST['startDate'] != '' ? $_REQUEST['startDate'] : $startDate, 'endDate' => isset($_REQUEST['endDate']) && $_REQUEST['endDate'] != '' ? $_REQUEST['endDate'] : $endDate); class xhelpTimeSpentByStaffReport extends xhelpReport { function xhelpTimeSpentByStaffReport() { $this->initVar('results', XOBJ_DTYPE_ARRAY, null, false); $this->initVar('hasResults', XOBJ_DTYPE_INT, 0, false); $this->initVar('hasGraph', XOBJ_DTYPE_INT, 1, false); } var $name = 'timeSpentByStaff'; var $meta = array('name' => _XHELP_TSBS_NAME, 'author' => 'Eric Juden', 'authorEmail' => '*****@*****.**', 'description' => _XHELP_TSBS_DESC, 'version' => '1.0', 'dbFields' => array('name' => _XHELP_TSBS_DB1, 'TotalTime' => _XHELP_TSBS_DB2)); var $parameters = array(_XHELP_TSBS_PARAM1 => array('controltype' => XHELP_CONTROL_DATETIME, 'fieldname' => 'startDate', 'value' => '', 'values' => '', 'fieldlength' => 25, 'dbfield' => 'r.updateTime', 'dbaction' => '>'), _XHELP_TSBS_PARAM2 => array('controltype' => XHELP_CONTROL_DATETIME, 'fieldname' => 'endDate', 'value' => '', 'values' => '', 'fieldlength' => 25, 'dbfield' => 'r.updateTime', 'dbaction' => '<=')); /* function generateReport() { global $paramVals; if($this->getVar('hasResults') == 0){ $this->_setResults(); } $aResults = $this->getVar('results');
<?php // $Id: staffInfo.php,v 1.8 2006/02/06 19:58:23 eric_juden Exp $ include_once XHELP_JPGRAPH_PATH . '/jpgraph.php'; include_once XHELP_JPGRAPH_PATH . '/jpgraph_bar.php'; include_once XHELP_CLASS_PATH . '/report.php'; xhelpIncludeReportLangFile('staffInfo'); global $xoopsDB; class xhelpStaffInfoReport extends xhelpReport { function xhelpStaffInfoReport() { $this->initVar('results', XOBJ_DTYPE_ARRAY, null, false); $this->initVar('hasResults', XOBJ_DTYPE_INT, 0, false); $this->initVar('hasGraph', XOBJ_DTYPE_INT, 1, false); /* if(phpversion() >= 5){ // Problems with JPGRAPH and php5 using bar graphs - Don't display for php5 $this->setVar('hasGraph', 0); } else { $this->setVar('hasGraph', 1); } */ } var $name = 'staffInfo'; var $meta = array('name' => _XHELP_STAFF_INFO_NAME, 'author' => 'Eric Juden', 'authorEmail' => '*****@*****.**', 'description' => _XHELP_STAFF_INFO_DESC, 'version' => '1.0', 'dbFields' => array('name' => 'Name', 'ticketsResponded' => 'Tickets Responded', 'callsClosed' => 'Calls Closed', 'avgResponseTime' => 'Average Response Time (in Minutes)')); var $parameters = array(); /* function generateReport() { if($this->getVar('hasResults') == 0){ $this->_setResults();