Beispiel #1
0
    $js[] = "js/childnap.js";
}
xhtml_head(T_("Respondent Selection") . " - " . T_("Project end"), true, array("include/bootstrap/css/bootstrap.min.css", "css/rs.css"), $js);
$case_id = get_case_id($operator_id);
$questionnaire_id = get_questionnaire_id($operator_id);
//display introduction text
$sql = "SELECT rs_project_end\r\n\tFROM questionnaire\r\n\tWHERE questionnaire_id = '{$questionnaire_id}'";
$r = $db->GetRow($sql);
if (!empty($r['rs_project_end'])) {
    print "<p class='rstext well'>" . template_replace($r['rs_project_end'], $operator_id, $case_id) . "</p>";
}
print "<p class='well'>";
if (!is_voip_enabled($operator_id) && AUTO_COMPLETE_OUTCOME) {
    end_call($operator_id, 10);
    print T_("Call automatically ended with outcome:") . "&ensp;<b>" . T_("Complete") . "</b>";
    //check for alternate interface
    if (ALTERNATE_INTERFACE && !is_voip_enabled($operator_id)) {
        print "&emsp;<a href=\"javascript:parent.location.href = 'index_interface2.php?endcase=endcase'\" class='btn btn-primary'>" . T_("End case") . "</a>";
    }
} else {
    print T_("End call with outcome:") . "&emsp;<a class='btn btn-primary' ";
    //check for alternate interface
    if (ALTERNATE_INTERFACE && !is_voip_enabled($operator_id)) {
        print "href=\"javascript:parent.location.href = 'index_interface2.php?outcome=10&amp;endcase=endcase'\">";
    } else {
        print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=10');\">";
    }
    print T_("Complete") . "</a>";
}
print "</p>";
xhtml_foot();
Beispiel #2
0
 $rs = $db->GetRow($sql);
 if (!empty($rs) && $rs['require_note'] == 1) {
     $rn = 1;
 } else {
     $rn = 0;
 }
 if (!isset($_GET['end']) && (empty($rs) || $rs['tryanother'] == 1)) {
     //an exclusion left join
     $sql = "SELECT c. *\r\n\t\t\t\t\tFROM contact_phone AS c\r\n\t\t\t\t\tLEFT JOIN (\r\n\t\t\t\t\t\tSELECT contact_phone.contact_phone_id\r\n\t\t\t\t\t\tFROM contact_phone\r\n\t\t\t\t\t\tLEFT JOIN `call` ON ( call.contact_phone_id = contact_phone.contact_phone_id )\r\n\t\t\t\t\t\tLEFT JOIN outcome ON ( call.outcome_id = outcome.outcome_id )\r\n\t\t\t\t\t\tWHERE contact_phone.case_id = '{$case_id}'\r\n\t\t\t\t\t\tAND outcome.tryagain =0\r\n\t\t\t\t\t\t) AS l ON l.contact_phone_id = c.contact_phone_id\r\n\t\t\t\t\tLEFT JOIN\r\n\t\t\t\t\t\t(\r\n\t\t\t\t\t\tSELECT contact_phone_id\r\n\t\t\t\t\t\tFROM `call`\r\n\t\t\t\t\t\tWHERE call_attempt_id = '{$call_attempt_id}'\r\n\t\t\t\t\t\tAND outcome_id != 18\r\n\t\t\t\t\t\t) as ca on ca.contact_phone_id = c.contact_phone_id\r\n\t\t\t\t\tWHERE c.case_id = '{$case_id}'\r\n\t\t\t\t\tAND l.contact_phone_id IS NULL\r\n\t\t\t\t\tAND ca.contact_phone_id IS NULL";
     //only select numbers that should be tried again and have not been tried in this attempt which are not the accidental hang up outcome
     //could be updated to take in to account the time delay and outcome
     $rs = $db->GetAll($sql);
     if (!empty($rs)) {
         //determine whether to begin calling based on extension status
         $es = 1;
         if (is_voip_enabled($operator_id)) {
             if (get_extension_status($operator_id)) {
                 $es = 1;
             } else {
                 $es = 0;
             }
         }
         if ($es) {
             print "<div>" . T_("Select phone number to dial:") . "</div>";
             print "<form action='?' method='post'><div><select id='contact_phone' name='contact_phone'>";
             foreach ($rs as $r) {
                 print "<option value='{$r['contact_phone_id']}'>{$r['phone']} - {$r['description']}</option>";
             }
             print "</select></div><div><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit' class='btn btn-primary'/></div></form>";
         } else {
             print "<div>" . T_("Your VoIP extension is not enabled. Please close this window and enable VoIP by clicking once on the red button that says 'VoIP Off'") . "</div>";
Beispiel #3
0
 * Language file
 */
include_once "lang.inc.php";
/** 
 * Authentication
 */
require "auth-interviewer.php";
/**
 * XHTML functions
 */
include_once "functions/functions.xhtml.php";
include_once "functions/functions.operator.php";
xhtml_head(T_("End of work"));
if (isset($_GET['auto'])) {
    print "<h1>" . T_("You have been automatically logged out of work due to inactivity") . "</h1>";
}
print "<h1>" . T_("Work has ended. That is it") . "</h1>";
if (ALLOW_OPERATOR_EXTENSION_SELECT && VOIP_ENABLED) {
    //unassign extension
    $operator_id = get_operator_id();
    if (get_case_id($operator_id) == false && is_voip_enabled($operator_id)) {
        $sql = "UPDATE `extension`\r\n            SET current_operator_id = NULL\r\n            WHERE current_operator_id = {$operator_id}";
        $rs = $db->Execute($sql);
        if ($rs) {
            print "<p>" . T_("You have been unassigned from your extension") . "</p>";
        }
    }
}
print "<p><a href='index.php'>" . T_("Go back to work") . "</a></p>";
print "<p><a href='include/limesurvey/admin/admin.php?action=logout'>" . T_("Logout") . "</a></p>";
xhtml_foot();