Пример #1
0
/**
 * Return an array of replacement items
 * 
 * @return array An array with the key being the replacement string and the value being its value
 * @author Adam Zammit <*****@*****.**>
 * @since  2012-11-20
 */
function quexs_core_replace()
{
    $operator_id = get_operator_id();
    $case_id = get_case_id($operator_id);
    $respondent_id = get_respondent_id($case_id, $operator_id);
    $core = array();
    $core['CALLATTEMPTS'] = get_call_attempts($case_id);
    $on_appointment = is_on_appointment($case_id, $operator_id);
    $str = T_("Not on an appointment");
    if ($on_appointment) {
        $str = T_("On an appointment");
    }
    $core['ONAPPOINTMENT'] = $str;
    $core['PERIODOFDAY'] = get_period_of_day($respondent_id);
    $core['APPOINTMENTDATE'] = get_appointment_date($respondent_id);
    $core['APPOINTMENTTIME'] = get_appointment_time($respondent_id);
    $core['APPOINTMENTNUMBER'] = get_appointment_number($respondent_id);
    $core['PERCCOMPLETE'] = round(get_percent_complete($case_id), 0);
    $core['ENDINTERVIEWURL'] = get_end_interview_url();
    $core['STARTINTERVIEWURL'] = get_start_interview_url();
    return $core;
}
Пример #2
0
         // to activate the SAVEDID in the END URL
         $url = str_replace("{TOKEN}", $clienttoken, $url);
         // to activate the TOKEN in the END URL
         $url = str_replace("{SID}", $surveyid, $url);
         // to activate the SID in the END URL
         $url = str_replace("{LANG}", $clang->getlangcode(), $url);
         // to activate the LANG in the END URL
         //queXS Addition
         include_once "quexs.php";
         if ($interviewer) {
             $quexs_url = get_start_interview_url();
             $url = str_replace("{STARTINTERVIEWURL}", $quexs_url, $url);
             $end_url = get_end_interview_url();
             $url = str_replace("{ENDINTERVIEWURL}", $end_url, $url);
         } else {
             $url = get_end_interview_url($clienttoken);
             quexs_completed_by_respondent($surveyid, $clienttoken);
         }
         killSession();
         header("Location: {$url}");
     }
     if ($thissurvey['printanswers'] != 'Y') {
         killSession();
     }
     doHeader();
     echo $content;
 }
 echo templatereplace(file_get_contents("{$thistpl}/completed.pstpl"));
 echo "\n<br />\n";
 if (($LEMdebugLevel & LEM_DEBUG_TIMING) == LEM_DEBUG_TIMING) {
     echo LimeExpressionManager::GetDebugTimingMessage();