diff --git a/CHANGELOG b/CHANGELOG index 4f2371b0..13415e33 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -63,6 +63,9 @@ ALTER TABLE `outcome` ADD `default` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' COM /* -- define and set mandatory(constant) outcome_id's --*/ UPDATE `outcome` SET `permanent` = '1' WHERE `outcome`.`outcome_id` IN (1,2,3,7,9,10,14,17,18,19) ; +/* -- set AUTO_INCREMENT to 100 @ `outcome` to reserve some id's -- */ +ALTER TABLE `outcome` AUTO_INCREMENT = 100; + /* -- add `outcomes` parameter , define default list of outcome_ID's to be enabled for new questionnaries --*/ ALTER TABLE `questionnaire` ADD `outcomes` VARCHAR(256) NULL DEFAULT '1,2,3,7,9,10,14,17,18,19' COMMENT 'Comma-separated string of outcomes defined for the questionnaire' AFTER `enabled`; diff --git a/admin/set_outcomes.php b/admin/set_outcomes.php index 9f11402e..cbbc847d 100644 --- a/admin/set_outcomes.php +++ b/admin/set_outcomes.php @@ -45,11 +45,12 @@ $js_foot = array( "../js/custom.js" ); -global $db; - +global $db; if (isset($_POST['default']) && isset($_POST['save'])){ + $db->StartTrans(); + $sql = "UPDATE `outcome` as o SET `default` = 0 WHERE o.permanent != 1"; @@ -66,25 +67,27 @@ if (isset($_POST['default']) && isset($_POST['save'])){ SET `default` = 1 WHERE o.permanent != 1 AND o.outcome_id IN ($sel)"; - - $db->Execute($sql); + $db->Execute($sql); } if(!empty($_POST['delay']) && $_SESSION['user'] === "admin" ){ - - foreach($_POST['delay'] as $n => $val) - { - $sql = "UPDATE `outcome`SET default_delay_minutes = $val WHERE outcome_id = $n"; - $db->Execute($sql); - } + foreach($_POST['delay'] as $n => $val) { + $db->Execute("UPDATE `outcome`SET default_delay_minutes = $val WHERE outcome_id = $n"); + } + } + if(!empty($_POST['delete']) && $_SESSION['user'] === "admin" ){ + foreach($_POST['delete'] as $n => $val) { + $db->Execute("DELETE FROM `outcome` WHERE outcome_id = $n AND outcome_id >= 100"); + } } - $_GET['default'] = $_POST['default']; + if($db->CompleteTrans()) $msg_ok = T_("Default outcomes updated"); else $msg_err = T_("Default outcomes NOT updated"); + $_GET['default'] = $_POST['default']; unset($_POST['default']); unset($_POST['save']); } -if (isset($_POST['qid']) && isset($_POST['save'])){ +if (isset($_POST['qid']) && $_POST['qid'] > 0 && isset($_POST['save'])){ //get id's for 'permanent' outcomes $sql = "SELECT o.outcome_id @@ -112,39 +115,98 @@ if (isset($_POST['qid']) && isset($_POST['save'])){ $sql = "UPDATE questionnaire SET outcomes = '$sel' WHERE questionnaire_id = $qid"; - - $db->Execute($sql); + if ($db->Execute($sql)) $msg_ok = T_("Questionnaire outcomes saved"); else $msg_err = T_("Error:") . " " . T("Questionnaire outcomes not saved"); $_GET['qid'] = $_POST['qid']; - unset($_POST['qid']); unset($_POST['save']); } +if ($_SESSION['user'] === "admin" && isset($_POST['addoutcome']) && isset($_POST['save'])){ + if (isset($_POST['description']) && !empty($_POST['description']) && intval($_POST['outcome_type_id']) > 0 ) { + $desc = $_POST['description']; + $outcome_type_id = intval($_POST['outcome_type_id']); + if (isset($_POST['default_delay_minutes'])) $ddm = $_POST['default_delay_minutes']; else $ddm = 0; + if (isset($_POST['contacted'])) $contacted = 1; else $contacted = 0; + if (isset($_POST['tryanother'])) $tryanother = 1; else $tryanother = 0; + if (isset($_POST['tryagain'])) $tryagain = 1; else $tryagain = 0; + if (isset($_POST['eligible'])) $eligible = 1; else $eligible = 0; + if (isset($_POST['require_note'])) $require_note = 1; else $require_note = 0; + if (isset($_POST['calc'])) $calc = $_POST['calc']; else $calc = ""; + if (isset($_POST['aapor_id'])) $aapor_id = $_POST['aapor_id']; else $aapor_id = ""; + if (isset($_POST['default_o'])) $def = 1; else $def = 0; + if (isset($_POST['permanent'])) $perm = 1; else $perm = 0; + + $sql = "INSERT INTO `outcome` VALUES ('NULL','$aapor_id','$desc','$ddm','$outcome_type_id','$tryanother','$contacted','$tryagain','$eligible','$require_note','$calc','$def','$perm')"; + if ($db->Execute($sql)) { + $msg_ok = T_("Custom outcome") . " " . $desc . " " . T_("saved"); + } + else $msg_err = T_("Error:") . " " . T_("New outcome not saved"); + } + else { + if (empty($_POST['description'])) $ms = T_("Description"); + if ($_POST['outcome_type_id'] <= 0) $ms = T_("Outcome type"); + $msg_err = T_("Error:") . " " . $ms . " " . T_("is not set"); + $_GET['addoutcome'] = $_POST['addoutcome']; + } + + if (isset($_POST['h']) && isset($_POST['v'])) {$h = $_POST['h']; $_GET[$h] = $_POST['v'];} + unset($_POST['addoutcome']); + unset($_POST['save']); +} /*select outcomes list*/ -if (isset($_GET['default'])) { $title = T_("Set default outcomes"); } -else if (isset($_GET['qid'])){ $title = T_("Set questionnaire outcomes"); $qid = intval($_GET['qid']); } +if (isset($_GET['default'])) $title = T_("Set default outcomes"); +else if (isset($_GET['qid'])) $title = T_("Set questionnaire outcomes"); +else if (isset($_GET['addoutcome'])) $title = T_("ADD custom outcome"); else die(); xhtml_head($title,true,$css,$js_head); + +/* to add customm outcome*/ +if ($_SESSION['user'] === "admin" && isset($_GET['addoutcome'])){ + + $rs[] = ["description" => "", "value" => ""]; + $sql = "SELECT outcome_type_id as value,description FROM `outcome_type`"; + $ot = $db->GetAll($sql); translate_array($ot, array("description")); + $select = display_chooser($ot,"outcome_type_id","outcome_type_id",true,false,false,true,false,false); + $rs[] = ["description" => "", "value" => "{$select}"]; + $rs[] = ["description" => "", "value" => ""]; + $rs[] = ["description" => "", "value" => ""]; + $rs[] = ["description" => "", "value" => ""]; + $rs[] = ["description" => "", "value" => ""]; + $rs[] = ["description" => "", "value" => ""]; + $rs[] = ["description" => "", "value" => ""]; + $rs[] = ["description" => "", "value" => ""]; + $rs[] = ["description" => "", "value" => ""]; + $rs[] = ["description" => "", "value" => ""]; + $rs[] = ["description" => "", "value" => ""]; + + $hid = "addoutcome"; $value = "newoutcome"; $h = $_GET['h']; $v = $_GET['v']; + $row = array("description","value"); + $hdr = array(T_("Description"),T_("Value")); + $sbtn = T_("Save custom Outcome"); + $class = "table-hover table-condensed"; +} + /* for questionnire outcomes */ if (isset($_GET['qid'])) { + $qid = intval($_GET['qid']); if($qid == 0) $qid = false; - print "

" . T_("Questionnaire") . ": 

"; + print "

" . T_("Questionnaire") . ": 

"; $sql = "SELECT questionnaire_id as value,description, CASE WHEN questionnaire_id = '$qid' THEN 'selected=\'selected\'' ELSE '' END AS selected FROM questionnaire WHERE enabled = 1"; - display_chooser($db->GetAll($sql),"questionnaire","qid", true,false,true,true,false,true,"form-inline pull-left "); + display_chooser($db->GetAll($sql),"questionnaire","qid",true,false,true,true,false,true,"form-inline"); + print "
"; - - if ($qid != false) + if ($qid != 0) { $qd = $db->GetRow("SELECT outcomes, self_complete, referral FROM `questionnaire` WHERE questionnaire_id = $qid"); @@ -164,13 +226,11 @@ if (isset($_GET['qid'])) { $do[] = $val; } } - $qoutc = implode($do,","); $sql = "UPDATE questionnaire SET outcomes = '$qoutc' WHERE questionnaire_id = $qid"; - $db->Execute($sql); } @@ -186,11 +246,12 @@ if (isset($_GET['qid'])) { ORDER BY `o`.`outcome_id` ASC"; $rs = $db->GetAll($sql); - + $hid = "qid"; $value = $qid; $h = "qid"; $v = $qid; $row = array("outcome_id","description","type","select"); - $hdr = array(T_("Outcome ID"),T_("Description"),T_("Outcome type"),T_("Select")); - $hid = "qid"; - $value = "$qid"; + $hdr = array(T_("Outcome ID"),T_("Description"),T_("Outcome type"),T_("Select")." ?"); + $abtn = T_("Add custom Outcome"); + $sbtn = T_("Save questionnaire outcomes"); + $class = "tclass"; } } @@ -199,29 +260,33 @@ if (isset($_GET['default'])) { /* allow delay edit only to superadmins (currenlty admin) */ if ($_SESSION['user'] === "admin"){ - $delay = "CONCAT('') "; + $delay = "CONCAT('') "; + $delete = "CASE WHEN o.outcome_id >= 100 THEN CONCAT('') ELSE '' END as `delete`,"; } else { $delay = "CONCAT('', o.default_delay_minutes ,' ')"; + $delete = ""; } - $sql = "SELECT o.*, ot.description as type, $delay as `delay`, - CONCAT('

" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '

') as tryanother, - CONCAT('

" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '

') as tryagain, - CONCAT('

" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '

') as contacted, - CONCAT('

" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '

') as eligible, - CONCAT('

" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '

') as require_note, - CONCAT('') as `select` + $sql = "SELECT o.*, ot.description as type, $delay as `delay`, $delete + CONCAT('

".T_("Yes")."' ELSE 'default\">".T_("No")."' END , '

') as tryanother, + CONCAT('

" . T_("Yes")."' ELSE 'default\">".T_("No")."' END , '

') as tryagain, + CONCAT('

" . T_("Yes")."' ELSE 'default\">".T_("No")."' END , '

') as contacted, + CONCAT('

".T_("Yes")."' ELSE 'default\">".T_("No")."' END , '

') as eligible, + CONCAT('

".T_("Yes")."' ELSE 'default\">".T_("No")."' END , '

') as require_note, + CONCAT('') as `select` from `outcome` as o, `outcome_type` as ot - WHERE o.outcome_type_id = ot.outcome_type_id + WHERE o.outcome_type_id = ot.outcome_type_id ORDER BY `o`.`outcome_id` ASC"; $rs = $db->GetAll($sql); $row = array("outcome_id","description","select","type","delay","contacted","tryanother","tryagain","eligible","require_note"); - $hdr = array(T_("Outcome ID"),T_("Description"),T_("Default"),T_("Outcome type"),T_("Delay, min"),T_("Contacted"),T_("Try another"),T_("Try again"),T_("Eligible"),T_("Require note")); - - $hid = "default"; - $value = ""; + $hdr = array(T_("Outcome ID"),T_("Description"),T_("Set default")." ?",T_("Outcome type"),T_("Delay, min"),T_("Contacted")." ?",T_("Try another")." ?",T_("Try again")." ?",T_("Eligible")." ?",T_("Require note")." ?"); + if ($_SESSION['user'] === "admin"){ $row[] = "delete"; $hdr[] = T_("Delete")." ?";} + $hid = "default"; $value = ""; $h = "default"; $v = ""; + $abtn = T_("Add custom Outcome"); + $sbtn = T_("Update default outcomes"); + $class = "tclass"; } @@ -237,31 +302,38 @@ if (isset($rs) && !empty($rs)){ } } } - + + if (isset($msg_ok)) print "
" . $msg_ok . "
"; + if (isset($msg_err)) print "
" . $msg_err . "
"; + ?>
- - -
+ + + +
-
- +
+
-
- +
+ + + +
+
+
-

".T_("CONTACTED").""; - print "".T_("NOT CONTACTED")."
"; - - if (isset ($_GET['contacted'])) $contacted = bigintval($_GET['contacted']); - } - if ($contacted == 1 || $contacted === 0){ + if ($contacted === false) $ctd = ""; + else + { + $contacted = bigintval($contacted); + $ctd = "AND contacted = '$contacted'"; + } - $sql = "SELECT outcome_id,description,contacted + $sql = "SELECT outcome_id,description FROM outcome WHERE outcome_type_id != '5' - AND contacted = '$contacted' + $ctd AND outcome_id IN ($outcomes) AND outcome_id NOT IN(10,32,42,43,44,45)"; //don't show completed if not, Lime_Quota_full if not, hide max calls as they supposed to be automatic or admin-privileged - } } } $rs = $db->GetAll($sql); - print "
"; + print "
"; if (!empty($rs)) { - $do = false; - $lime_sid = get_limesurvey_id(get_operator_id()); //Check to see if we have sent an email on this call and set the default outcome @@ -152,22 +148,21 @@ function display_outcomes($contacted,$ca,$case_id) WHERE t.sent = '$ca' AND c.case_id = $case_id AND t.token = c.token"; + $do = $db->GetOne($sql); if (isset($_GET['defaultoutcome'])) $do = bigintval($_GET['defaultoutcome']); foreach($rs as $r) { if ($do == $r['outcome_id']) $selected = "checked='checked'"; else $selected = ""; - if (isset($r['contacted']) && $r['contacted'] == 1) $highlight = ""; else $highlight = "style='color:black;'"; - print "
"; + print "
"; } - - $_POST['confirm'] = true; //check that outcome selected } print "
"; + + } -if (browser_ie()) $js = "js/window_ie6.js"; else $js = "js/window.js"; //display the respondents phone numbers as a drop down list for this call @@ -179,15 +174,6 @@ $operator_id = get_operator_id(); if (isset($_POST['submit'])) { - if (is_voip_enabled($operator_id)) - { //prepare common voip functions - include("functions/functions.voip.php"); - $v = new voip(); - $v->connect(VOIP_SERVER); - } - - $btext = "onload='openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'"; // set default, change on conditions - if (isset($_POST['contact_phone'])) { $contact_phone_id = bigintval($_POST['contact_phone']); @@ -197,28 +183,56 @@ if (isset($_POST['submit'])) if ($call_id) { if (is_voip_enabled($operator_id)) + { + include("functions/functions.voip.php"); + $v = new voip(); + $v->connect(VOIP_SERVER); $v->dial(get_extension($operator_id),get_call_number($call_id)); + } + + $btext = "onload='openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'"; + + $js = "js/window.js"; + if (browser_ie()) $js = "js/window_ie6.js"; + xhtml_head(T_("Call"),true,array("css/call.css"),array($js),$btext,false,false,false,false); } - else exit(); } - else + else if (isset($_POST['outcome'])) { - //hang up the call first - if (is_voip_enabled($operator_id)) - $v->hangup(get_extension($operator_id)); - - //disable recording - $newtext = T_("Start REC"); - $btext = "onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'"; - - if (isset($_POST['outcome'])){ //process with outcome $outcome_id = bigintval($_POST['outcome']); end_call($operator_id,$outcome_id); - + if (is_voip_enabled($operator_id)) + { + include("functions/functions.voip.php"); + $v = new voip(); + $v->connect(VOIP_SERVER); + $v->hangup(get_extension($operator_id)); } - } + //disable recording + $newtext = T_("Start REC"); - xhtml_head(T_("Call"),true,array("css/call.css"),array($js),$btext,false,false,false,false); + $js = "js/window.js"; + if (browser_ie()) $js = "js/window_ie6.js"; + + xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'",false,false,false,false); + } + else + { + //if no outcome selected, just hang up the call + if (is_voip_enabled($operator_id)) + { + include("functions/functions.voip.php"); + $v = new voip(); + $v->connect(VOIP_SERVER); + $v->hangup(get_extension($operator_id)); + } + //disable recording + $newtext = T_("Start REC"); + $js = "js/window.js"; + if (browser_ie()) $js = "js/window_ie6.js"; + xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"onload='toggleRec(\"$newtext\",\"record.php?start=start\",\"offline\"); openParentObject(\"main-content\",\"" . get_respondentselection_url($operator_id) . "\"); parent.closePopup();'",false,false,false,false); + + } print "

"; //for XHTML xhtml_foot(); @@ -244,19 +258,12 @@ if (isset($_GET['newstate'])) $db->Execute($sql); } +$js = "js/window.js"; +if (browser_ie()) $js = "js/window_ie6.js"; -xhtml_head(T_("Set outcome"),true,array("css/call.css"),array($js,"include/jquery/jquery-1.4.2.min.js"),false,false,false,false,false); +xhtml_head(T_("Call"),true,array("css/call.css"),array($js,"include/jquery/jquery-1.4.2.min.js"),false,false,false,false,false); $state = is_on_call($operator_id); - -function print_endcase($trigger = ""){ - print "

" . T_("End case") . "

"; -} - -function print_endwork($trigger = ""){ - print "

" . T_("End work") . "

"; -} - switch($state) { case false: //no call made @@ -273,8 +280,8 @@ switch($state) { //end the case if (!isset($_GET['end'])) print "
" . T_("End work") . "
"; - print_endcase("openParent"); - print_endwork("openParent"); + print "

" . T_("End case") . "

"; + print "

" . T_("End work") . "

"; } else { @@ -300,11 +307,9 @@ switch($state) print "
" . T_("Press the call button to dial the number for this appointment:") . "
"; - print "
-

" . T_("Number to call:") . " {$r['phone']} - {$r['description']}

- -
-
"; + print "
"; + print "

" . T_("Number to call:") . " {$r['phone']} - {$r['description']}

"; + print "
"; } else print "
" . 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'") . "
"; @@ -322,11 +327,12 @@ switch($state) LIMIT 1"; $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)) //dial another number only when available and not ending { + $rn = 0; + if (!empty($rs) && $rs['require_note'] == 1) $rn = 1; + //an exclusion left join $sql = "SELECT c. * FROM contact_phone AS c @@ -374,7 +380,7 @@ switch($state) { print ""; } - print "
"; + print "
"; } else print "
" . 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'") . "
"; @@ -386,36 +392,39 @@ switch($state) if ($rn) // a note is required to be entered { - print "

"; + print "




"; //give focus on load print ''; //put these lower on the screen so they don't get "automatically" clicked - print_endcase("openParentNote"); - print_endwork("openParentNote"); + print "

" . T_("End case") . "

"; + print "

" . T_("End work") . "

"; } else { - print_endcase("openParent"); - print_endwork("openParent"); + print "

" . T_("End case") . "

"; + print "

" . T_("End work") . "
"; + print "





"; print ''; - print_endcase("openParentNote"); - print_endwork("openParentNote"); + print "

" . T_("End case") . "

"; + print "

" . T_("End work") . "

"; } else { - if (!isset($_GET['end'])) print "
" . T_("The last call completed this call attempt") . "
"; - print_endcase("openParent"); - print_endwork("openParent"); + if (!isset($_GET['end'])) print "
" . T_("The last call completed this call attempt") . "
"; + print "

" . T_("End case") . "

"; + print "

" . T_("End work") . "

"; } } } @@ -442,16 +451,14 @@ switch($state) print "
"; break; case 4: //requires coding - // print "
" . T_("Requires coding") . "
"; - print "
"; + print "
" . T_("Requires coding") . "
"; + print ""; display_outcomes(false,$call_attempt_id,$case_id); - if (isset($_POST['confirm'])){ - print "
"; - } + print "
"; break; case 5: //done -- shouldn't come here as should be coded + done default: - print "
" . T_("Error: Close window") . "
"; + print "
" . T_("Error: Close window") . "
"; break; } diff --git a/functions/functions.operator.php b/functions/functions.operator.php index 6aa06819..5d32763b 100644 --- a/functions/functions.operator.php +++ b/functions/functions.operator.php @@ -1318,22 +1318,21 @@ function get_respondentselection_url($operator_id,$escape = true,$interface2 = f { $sid = get_limesurvey_id($operator_id,true); //true for RS if ($sid != false && !empty($sid) && $sid != 'NULL') + { $url = LIME_URL . "index.php?interviewer=interviewer" . $amp . "loadall=reload" . $amp . "sid=$sid" . $amp . "token=$call_id" . $amp . "lang=" . DEFAULT_LOCALE; + } else - { - if (is_respondent_selection($operator_id) === false) - { - $url = get_limesurvey_url($operator_id); - if (!$escape) - $url = str_replace("&","&",$url); - } - else - { - if ($interface2) - $url = 'rs_intro_interface2.php'; - else - $url = 'rs_intro.php'; - } + { + if (is_respondent_selection($operator_id) === false) + { + $url = get_limesurvey_url($operator_id); + if (!$escape) + $url = str_replace("&","&",$url); + } + else + { + $url = 'rs_intro.php'; + } } } diff --git a/rs_answeringmachine.php b/rs_answeringmachine.php index 23a5ecad..3f4f659b 100644 --- a/rs_answeringmachine.php +++ b/rs_answeringmachine.php @@ -20,11 +20,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * - * @author Adam Zammit - * @copyright Deakin University 2007,2008 + * @author Adam Zammit + * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 * @package queXS * @subpackage user - * @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility + * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 * */ @@ -62,13 +62,13 @@ $leavemessage = leave_message($case_id); $js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} +if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js"; -xhtml_head(T_("Respondent Selection - Answering machine"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"),$js); + +xhtml_head(T_("Respondent Selection") . " - " . T_("Answering machine"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"),$js);//,"include/jquery-ui/jquery-ui.min.css" + +print "
"; if ($leavemessage) { //display answering machine text @@ -78,24 +78,48 @@ if ($leavemessage) $r = $db->GetRow($sql); - print "

" . template_replace($r['rs_answeringmachine'],$operator_id,$case_id) . "

"; + if (!empty($r['rs_answeringmachine'])) print "
" . template_replace($r['rs_answeringmachine'],$operator_id,$case_id) . "
"; } else - print "

" . T_("Do not leave a message, please hang up") . "

"; + print "

" . T_("Do not leave a message, please hang up") . "

"; + +print "
+ "; + + if ($questionnaire_id){ + $outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q WHERE q.questionnaire_id = $questionnaire_id");// + $outcomes = explode(",",$outcomes); + + $des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id IN (23,24,29)"); + translate_array($des,array("description")); + + print "

" . T_("End call with outcome:") . "

+ "; + } + +print "
"; -?> -

- -

- -

-

- - * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 - * @package queXS - * @subpackage user - * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) - * @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"); - -/** - * Authentication - */ -require ("auth-interviewer.php"); - - -/** - * XHTML - */ -include ("functions/functions.xhtml.php"); - -/** - * Operator functions - */ -include ("functions/functions.operator.php"); - -$operator_id = get_operator_id(); -$case_id = get_case_id($operator_id); -$questionnaire_id = get_questionnaire_id($operator_id); -$leavemessage = leave_message($case_id); - -$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); - -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} - -xhtml_head(T_("Respondent Selection - Answering machine"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"),$js); - -if ($leavemessage) -{ - //display answering machine text - $sql = "SELECT rs_answeringmachine - FROM questionnaire - WHERE questionnaire_id = '$questionnaire_id'"; - - $r = $db->GetRow($sql); - - print "

" . template_replace($r['rs_answeringmachine'],$operator_id,$case_id) . "

"; -} -else - print "

" . T_("Do not leave a message, please hang up") . "

"; - -?> -

- -

- -

-

- diff --git a/rs_business.php b/rs_business.php index 5dc0a140..cfe5831d 100644 --- a/rs_business.php +++ b/rs_business.php @@ -20,11 +20,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * - * @author Adam Zammit - * @copyright Deakin University 2007,2008 + * @author Adam Zammit + * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 * @package queXS * @subpackage user - * @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility + * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 * */ @@ -52,21 +52,25 @@ include_once ("lang.inc.php"); $js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} +if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js"; -xhtml_head(T_("Respondent Selection - Business answers"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js); +xhtml_head(T_("Respondent Selection") . " - " . T_("Business answers"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js); +print "

" . T_("Sorry to bother you, I have called the wrong number") . "

"; -?> -

+print "
+ "; + + $des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id = 16"); + print "

" . T_("End call with outcome:") . "

+ "; + +print "
"; -

-

- - * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 - * @package queXS - * @subpackage user - * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) - * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 - * - */ - -/** - * Configuration file - */ -include ("config.inc.php"); - -/** - * Authentication - */ -require ("auth-interviewer.php"); - - -/** - * XHTML - */ -include ("functions/functions.xhtml.php"); - -/** - * Language - */ -include_once ("lang.inc.php"); - -$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); - -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} - - -xhtml_head(T_("Respondent Selection - Business answers"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js); - - -?> -

- -

-

- diff --git a/rs_callback.php b/rs_callback.php index 9d0b94ae..4c796d08 100644 --- a/rs_callback.php +++ b/rs_callback.php @@ -20,11 +20,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * - * @author Adam Zammit - * @copyright Deakin University 2007,2008 + * @author Adam Zammit + * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 * @package queXS * @subpackage user - * @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility + * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 * */ @@ -62,14 +62,10 @@ include ("functions/functions.limesurvey.php"); $js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} +if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js"; - -xhtml_head(T_("Respondent Selection - Call back"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js ); +xhtml_head(T_("Respondent Selection") . " - " . T_("Call back"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js ); $operator_id = get_operator_id(); $case_id = get_case_id($operator_id); @@ -79,23 +75,36 @@ $questionnaire_id = get_questionnaire_id($operator_id); $sql = "SELECT rs_callback FROM questionnaire WHERE questionnaire_id = '$questionnaire_id'"; - $r = $db->GetRow($sql); -print "

" . template_replace($r['rs_callback'],$operator_id,$case_id) . "

"; -print "

" . T_("You are: ") . round(limesurvey_percent_complete($case_id),1) . T_("% complete") . "

"; +if (!empty($r['rs_callback'])) print "
" . template_replace($r['rs_callback'],$operator_id,$case_id) . "
"; +print "

" . T_("Survey is") . " " . round(limesurvey_percent_complete($case_id),1) . " % " . T_("complete") . "

"; -//display outcomes +print "
+ "; + + //filter displayed outcomes + if ($questionnaire_id){ + $outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q WHERE q.questionnaire_id = $questionnaire_id");// + $outcomes = explode(",",$outcomes); + + if (in_array(8,$outcomes)){ + $des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id = 8"); + print ""; + } + } + + print ""; + +print "
"; -?> - -

-

-

- diff --git a/rs_callback_interface2.php b/rs_callback_interface2.php deleted file mode 100644 index cef29f86..00000000 --- a/rs_callback_interface2.php +++ /dev/null @@ -1,101 +0,0 @@ - - * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 - * @package queXS - * @subpackage user - * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) - * @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"); - -/** - * Authentication - */ -require ("auth-interviewer.php"); - - -/** - * XHTML functions - */ -include ("functions/functions.xhtml.php"); - -/** - * Operator functions - */ -include ("functions/functions.operator.php"); - -/** - * Limesurvey functions - */ -include ("functions/functions.limesurvey.php"); - -$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); - -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} - - - -xhtml_head(T_("Respondent Selection - Call back"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js ); - -$operator_id = get_operator_id(); -$case_id = get_case_id($operator_id); -$questionnaire_id = get_questionnaire_id($operator_id); - -//display introduction text -$sql = "SELECT rs_callback - FROM questionnaire - WHERE questionnaire_id = '$questionnaire_id'"; - -$r = $db->GetRow($sql); - -print "

" . template_replace($r['rs_callback'],$operator_id,$case_id) . "

"; -print "

" . T_("You are: ") . round(limesurvey_percent_complete($case_id),1) . T_("% complete") . "

"; - - -//display outcomes - -?> - -

-

-

- diff --git a/rs_intro.php b/rs_intro.php index c74c68f8..e2179dd8 100644 --- a/rs_intro.php +++ b/rs_intro.php @@ -20,11 +20,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * - * @author Adam Zammit - * @copyright Deakin University 2007,2008 + * @author Adam Zammit + * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 * @package queXS * @subpackage user - * @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility + * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 * */ @@ -62,74 +62,101 @@ include ("functions/functions.limesurvey.php"); $js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} - - -xhtml_head(T_("Respondent Selection - Introduction"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js); - -//display introduction text - +if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js"; $operator_id = get_operator_id(); $case_id = get_case_id($operator_id); $questionnaire_id = get_questionnaire_id($operator_id); -//display introduction text -$sql = "SELECT rs_intro,rs_project_intro,rs_callback - FROM questionnaire - WHERE questionnaire_id = '$questionnaire_id'"; +if($questionnaire_id && $operator_id){ -$r = $db->GetRow($sql); + xhtml_head(T_("Respondent Selection") . " - " . T_("Introduction"),false,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js);// "include/bootstrap/css/bootstrap-theme.min.css", -print "

". template_replace($r['rs_intro'],$operator_id,$case_id) . "

"; + //display outcomes + $outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q WHERE q.questionnaire_id = $questionnaire_id");// + $outcomes = explode(",",$outcomes); + $des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id IN (1,2,3,6,8,16,17,18,30,31)"); + translate_array($des,array("description")); -//display outcomes + print "
+

" . T_("End call with outcome:") . "

"; + print "
" . T_("Not Contacted") . "
+
"; + + print ""; + print "
"; + + print "

" . T_("Respondent Selection") . " - " . T_("Introduction") . "

"; + //display introduction text + $sql = "SELECT rs_intro,rs_project_intro,rs_callback + FROM questionnaire + WHERE questionnaire_id = '$questionnaire_id'"; + + $r = $db->GetRow($sql); + if (!empty($r['rs_intro'])) print "
" . template_replace($r['rs_intro'],$operator_id,$case_id) . "
"; + print "
"; + + // display continue + print "
"; + print "

" . T_("Yes - Continue") . "

"; + print "
"; -if (limesurvey_percent_complete($case_id) == false) -{ - if(empty($r['rs_project_intro'])) - { - //If nothing is specified as a project introduction, skip straight to questionnaire - ?> -

- -

- -

- -

- -

-

-

-

-

-

-

-

-

- - * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 - * @package queXS - * @subpackage user - * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) - * @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"); - -/** - * Authentication - */ -require ("auth-interviewer.php"); - - -/** - * XHTML functions - */ -include ("functions/functions.xhtml.php"); - -/** - * Operator functions - */ -include ("functions/functions.operator.php"); - -/** - * Limesurvey functions - */ -include ("functions/functions.limesurvey.php"); - -$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); - -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} - - -xhtml_head(T_("Respondent Selection - Introduction"),false,array("include/bootstrap/css/bootstrap.min.css","css/rs.css","css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js); - -$operator_id = get_operator_id(); -$case_id = get_case_id($operator_id); -$questionnaire_id = get_questionnaire_id($operator_id); - -//display outcomes -?> -
-

-
    -

-
    -

    -

    -

- -
-GetRow($sql); -print "
"; -print "

". template_replace($r['rs_intro'],$operator_id,$case_id) . "

"; -print "
"; - -// display continue -print "
"; -if (limesurvey_percent_complete($case_id) == false) -{ - if(empty($r['rs_project_intro'])) - { - //If nothing is specified as a project introduction, skip straight to questionnaire - ?> -

- -

- -

- -

- "; - -xhtml_foot(); - - -?> diff --git a/rs_project_end.php b/rs_project_end.php index 49264e19..4f6c6c0c 100644 --- a/rs_project_end.php +++ b/rs_project_end.php @@ -20,11 +20,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * - * @author Adam Zammit - * @copyright Deakin University 2007,2008 + * @author Adam Zammit + * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 * @package queXS * @subpackage user - * @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility + * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 * */ @@ -34,7 +34,6 @@ */ include ("config.inc.php"); - /** * Database file */ @@ -58,23 +57,12 @@ include ("functions/functions.operator.php"); $operator_id = get_operator_id(); -//check for alternate interface -if (ALTERNATE_INTERFACE && !is_voip_enabled($operator_id)) -{ - include_once("rs_project_end_interface2.php"); - die(); -} - $js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} +if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js"; - -xhtml_head(T_("Respondent Selection - Project end"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $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); @@ -86,19 +74,33 @@ $sql = "SELECT rs_project_end $r = $db->GetRow($sql); -print "

" . template_replace($r['rs_project_end'],$operator_id,$case_id) . "

"; +if (!empty($r['rs_project_end'])) print "

" . template_replace($r['rs_project_end'],$operator_id,$case_id) . "

"; + +print "

"; if (!is_voip_enabled($operator_id) && AUTO_COMPLETE_OUTCOME) { end_call($operator_id,10); - print "

" . T_("Call automatically ended with outcome: Complete") . "

"; + + print T_("Call automatically ended with outcome:") . " " . T_("Complete") . ""; + //check for alternate interface + if (ALTERNATE_INTERFACE && !is_voip_enabled($operator_id)) + print " " . T_("End case") . ""; } else -{ - ?> -

- "; + else + print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=10');\">"; + + print T_("Complete") . ""; } + +print "

"; + xhtml_foot(); ?> diff --git a/rs_project_end_interface2.php b/rs_project_end_interface2.php deleted file mode 100644 index fdc2d303..00000000 --- a/rs_project_end_interface2.php +++ /dev/null @@ -1,96 +0,0 @@ - - * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 - * @package queXS - * @subpackage user - * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) - * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 - * - */ - -/** - * Configuration file - */ -include_once ("config.inc.php"); - -/** - * Database file - */ -include_once ("db.inc.php"); - -/** - * Authentication - */ -require ("auth-interviewer.php"); - - -/** - * XHTML functions - */ -include_once ("functions/functions.xhtml.php"); - -/** - * Operator functions - */ -include_once ("functions/functions.operator.php"); - - -$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); - -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} - - - -xhtml_head(T_("Respondent Selection - Project end"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js); - -$operator_id = get_operator_id(); -$case_id = get_case_id($operator_id); -$questionnaire_id = get_questionnaire_id($operator_id); - -//display introduction text -$sql = "SELECT rs_project_end - FROM questionnaire - WHERE questionnaire_id = '$questionnaire_id'"; - -$r = $db->GetRow($sql); - -print "

" . template_replace($r['rs_project_end'],$operator_id,$case_id) . "

"; - -if (!is_voip_enabled($operator_id) && AUTO_COMPLETE_OUTCOME) -{ - end_call($operator_id,10); - print "

" . T_("Call automatically ended with outcome: Complete - End case") . "

"; -} -else -{ - ?> -

- diff --git a/rs_project_intro.php b/rs_project_intro.php index 33044e8c..2d70c166 100644 --- a/rs_project_intro.php +++ b/rs_project_intro.php @@ -20,11 +20,11 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA * * - * @author Adam Zammit - * @copyright Deakin University 2007,2008 + * @author Adam Zammit + * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 * @package queXS * @subpackage user - * @link http://www.deakin.edu.au/dcarf/ queXS was writen for DCARF - Deakin Computer Assisted Research Facility + * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) * @license http://opensource.org/licenses/gpl-2.0.php The GNU General Public License (GPL) Version 2 * */ @@ -57,12 +57,10 @@ include ("functions/functions.operator.php"); $js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} +if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js"; -xhtml_head(T_("Respondent Selection - Project Introduction"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js); + +xhtml_head(T_("Respondent Selection") . " - " . T_("Project Introduction"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js); //,"include/jquery-ui/jquery-ui.min.css" $operator_id = get_operator_id(); $case_id = get_case_id($operator_id); @@ -75,24 +73,48 @@ $sql = "SELECT rs_project_intro $r = $db->GetRow($sql); -print "

" . template_replace($r['rs_project_intro'],$operator_id,$case_id) . "

"; +if (!empty($r['rs_project_intro'])) print "
" . template_replace($r['rs_project_intro'],$operator_id,$case_id) . "
"; +print "
+ "; + + if ($questionnaire_id){ + //filter displayed outcomes + $outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q WHERE q.questionnaire_id = $questionnaire_id");// + $outcomes = explode(",",$outcomes); + + $des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id IN (8,17,30)"); + translate_array($des,array("description")); + + print ""; + } + print ""; +print "
"; -

- -

-

-

- -

- - diff --git a/rs_project_intro_interface2.php b/rs_project_intro_interface2.php deleted file mode 100644 index cfebbf90..00000000 --- a/rs_project_intro_interface2.php +++ /dev/null @@ -1,98 +0,0 @@ - - * @copyright Australian Consortium for Social and Political Research Inc 2007,2008 - * @package queXS - * @subpackage user - * @link http://www.acspri.org.au/ queXS was writen for Australian Consortium for Social and Political Research Incorporated (ACSPRI) - * @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"); - -/** - * Authentication - */ -require ("auth-interviewer.php"); - - -/** - * XHTML functions - */ -include ("functions/functions.xhtml.php"); - -/** - * Operator functions - */ -include ("functions/functions.operator.php"); - -$js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); - -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} - -xhtml_head(T_("Respondent Selection - Project Introduction"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js); - -$operator_id = get_operator_id(); -$case_id = get_case_id($operator_id); -$questionnaire_id = get_questionnaire_id($operator_id); - -//display introduction text -$sql = "SELECT rs_project_intro - FROM questionnaire - WHERE questionnaire_id = '$questionnaire_id'"; - -$r = $db->GetRow($sql); - -print "

" . template_replace($r['rs_project_intro'],$operator_id,$case_id) . "

"; - - -//display outcomes - -?> - -

- -

-

-

- -

- - diff --git a/rs_quota_end.php b/rs_quota_end.php index 2dce2432..22e80176 100644 --- a/rs_quota_end.php +++ b/rs_quota_end.php @@ -57,33 +57,28 @@ include ("functions/functions.operator.php"); $js = array("js/popup.js","include/jquery/jquery-1.4.2.min.js","include/jquery-ui/jquery-ui.min.js"); -if (AUTO_LOGOUT_MINUTES !== false) -{ - $js[] = "js/childnap.js"; -} +if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.js"; -xhtml_head(T_("Respondent Selection - Project Quota End"),true,array("css/rs.css","include/jquery-ui/jquery-ui.min.css"), $js); +xhtml_head(T_("Respondent Selection") . " - " . T_("Project Quota End"),true,array("include/bootstrap/css/bootstrap.min.css","css/rs.css"), $js); $operator_id = get_operator_id(); $case_id = get_case_id($operator_id); $questionnaire_id = get_questionnaire_id($operator_id); -print "

" . template_replace($_GET['message'],$operator_id,$case_id) . "

"; +if (isset($_GET['message'])) print "

" . template_replace($_GET['message'],$operator_id,$case_id) . "

"; +$des = $db->GetOne("SELECT description FROM outcome WHERE outcome_id = 32"); + +print "

" . T_("End call with outcome:") . " -

-"; else -{ -?> -

-"; + +print T_($des[0]['description']) . "

"; + xhtml_foot();