* @copyright Deakin University 2007,2008
* @package queXS
* @subpackage user
* @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility
* @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2
*
*/
/**
* Configuration file
*/
include ("config.inc.php");
/**
* Database file
*/
include ("db.inc.php");
/**
* XHTML functions
*/
include ("functions/functions.xhtml.php");
/**
* Operator functions
*/
include("functions/functions.operator.php");
$operator_id = get_operator_id();
if ($operator_id == false)
{
xhtml_head(T_("Status"));
print "
" . T_("No operator") . "
";
xhtml_foot();
die();
}
$state = is_on_call($operator_id);
$btext = false;
if ($state == 4 && AUTO_POPUP)
$btext = "onload=\"poptastic('call.php')\"";
$js = array("js/popupkeep.js");
if (AUTO_LOGOUT_MINUTES !== false)
{
$js[] = "include/jquery-ui/js/jquery-1.4.2.min.js";
$js[] = "js/childnap.js";
}
xhtml_head(T_("Status"),true,array("css/status.css"),$js,$btext,60);
print "" . get_operator_time($operator_id,DATE_TIME_FORMAT) ."
";
//need to determine VoIP status by confirming with the VoIP server if this operator is online
//Then confirm whether or not they are on a call (or use the database table, call to determine)
if (is_voip_enabled($operator_id))
{
$ext = get_extension($operator_id);
$exta = $ext;
//Get just the start of the extension for auto dial out
$exts = explode('/', $ext, 2);
if (isset($exts[1]))
$exta = $exts[1];
$extp = get_extension_password($operator_id);
if (get_extension_status($operator_id))
print "";
else
print "";
}
else
print "" . T_("No VoIP") . "
";
if (!$state || $state == 5)
{
print("" . T_("No call") . "
");
}
else if ($state == 4)
{
print("" . T_("To be coded") . "
");
}
else if ($state == 1)
{
print("" . T_("Requesting") . "
");
}
else if ($state == 2)
{
print("" . T_("Ringing") . "
");
}
else if ($state == 3)
{
print("" . T_("Answered") . "
");
}
$ca = get_call_attempt($operator_id,false);
if ($ca)
{
print "" . get_respondent_time(get_respondent_id($ca),TIME_FORMAT) ."
";
if (is_on_appointment($ca)) print "" . T_("APPT") . "
";
if (missed_appointment($ca)) print "" . T_("MISSED") . "
";
}
else
print "" . T_("No case") . "
";
xhtml_foot();
?>