Exemple #1
0
/**
 * Place a frame on a page in XHTML valid form if possible, otherwise use IE6 iframes
 *
 * @param string $data The URL to display
 * @param string $id The id of the object
 * @param string $class The class of the object defaults to embeddedobject
 */
function xhtml_object($data, $id, $class = "embeddedobject")
{
    if (browser_ie()) {
        print '<iframe class="' . $class . '" id="' . $id . '" src="' . $data . '" frameBorder="0"><p>Error, try with Firefox</p></iframe>';
    } else {
        print '<object class="' . $class . '" id="' . $id . '" data="' . $data . '" standby="Loading panel..." type="application/xhtml+xml"><p>Error, try with Firefox</p></object>';
    }
}
/** 
 * Authentication
 */
require "auth-interviewer.php";
/**
 * XHTML functions
 */
include "functions/functions.xhtml.php";
/**
 * Operator functions
 */
include "functions/functions.operator.php";
$operator_id = get_operator_id();
$state = is_on_call($operator_id);
$js = array("js/popup.js");
if (browser_ie()) {
    $js[] = "js/window_ie6_interface2.js";
} else {
    $js[] = "js/window_interface2.js";
}
if (AUTO_LOGOUT_MINUTES !== false) {
    $js[] = "include/jquery/jquery-1.4.2.min.js";
    $js[] = "js/childnap.js";
}
xhtml_head(T_("Status"), false, array("include/bootstrap/css/bootstrap.min.css", "css/status_interface2.css"), $js);
$ca = get_call_attempt($operator_id, false);
if ($ca) {
    $respondent_id = get_respondent_id($ca);
    $case_id = get_case_id($operator_id);
    $fname = get_respondent_variable("firstName", $respondent_id);
    $lname = get_respondent_variable("lastName", $respondent_id);