diff --git a/rs_answeringmachine.php b/rs_answeringmachine.php index 23a5ecad..4150a5ea 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,52 @@ 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:") . "

+
"; + if (in_array(29,$outcomes)){ //preg_match('/29/',$outcomes) + print "

"; + else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=29');\">"; + print $des[2]['description'] . "

"; + } + + if (in_array(23,$outcomes) && $leavemessage){ //preg_match('/23/',$outcomes + print "

"; + else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=23');\">"; + print $des[0]['description'] . "

"; + } + + if (in_array(24,$outcomes)){ //preg_match('/24/',$outcomes + print "

"; + else print "href=\"javascript:parent.poptastic('call.php?defaultoutcome=24');\">"; + print $des[1]['description'] . "

"; + } + print "
"; + } + +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 2c778bc1..e859cfcc 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 * */ @@ -48,25 +48,34 @@ include ("functions/functions.xhtml.php"); /** * Language */ -include ("lang.inc.php"); +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 ("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..0db79427 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,40 @@ $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_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..7a2704eb 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,53 @@ $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();