From 273fb168b68b85373f448c0527b71c4f0b64a8fa Mon Sep 17 00:00:00 2001 From: Alex Date: Sun, 6 Dec 2015 03:00:49 +0300 Subject: [PATCH 1/3] filter outcomes on rs panels; 1st iteration: merge rs_ x_interface2 files to rs_ files, removed merged _intreface2 files --- rs_answeringmachine.php | 74 ++++++++++++++------- rs_answeringmachine_interface2.php | 102 ----------------------------- rs_business.php | 37 +++++++---- rs_business_interface2.php | 73 --------------------- rs_callback.php | 53 +++++++++------ rs_callback_interface2.php | 101 ---------------------------- rs_project_end.php | 48 +++++++------- rs_project_end_interface2.php | 96 --------------------------- rs_project_intro.php | 69 +++++++++++++------ rs_project_intro_interface2.php | 98 --------------------------- rs_quota_end.php | 27 ++++---- 11 files changed, 191 insertions(+), 587 deletions(-) delete mode 100644 rs_answeringmachine_interface2.php delete mode 100644 rs_business_interface2.php delete mode 100644 rs_callback_interface2.php delete mode 100644 rs_project_end_interface2.php delete mode 100644 rs_project_intro_interface2.php 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(); From 0fea57f29a31eda4b1130ad02ae16fbea497bb77 Mon Sep 17 00:00:00 2001 From: Alex Date: Mon, 7 Dec 2015 00:48:24 +0300 Subject: [PATCH 2/3] merged rs_intro.php and rs_intro_interface2.php; removed references to rs_intro_interface2.php; removed rs_intro_interface2.php; bootstrapified rs_intro.php --- functions/functions.operator.php | 20 ++--- rs_answeringmachine.php | 20 ++--- rs_business.php | 13 +-- rs_callback.php | 12 +-- rs_intro.php | 147 ++++++++++++++++++------------- rs_intro_interface2.php | 144 ------------------------------ rs_project_intro.php | 19 ++-- 7 files changed, 116 insertions(+), 259 deletions(-) delete mode 100644 rs_intro_interface2.php diff --git a/functions/functions.operator.php b/functions/functions.operator.php index 40acf1de..3b64cd30 100644 --- a/functions/functions.operator.php +++ b/functions/functions.operator.php @@ -1307,20 +1307,12 @@ function get_respondentselection_url($operator_id,$escape = true,$interface2 = f 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) + { + if (!$escape) $url = str_replace("&","&",$url); else $url = get_limesurvey_url($operator_id); + } + else $url = 'rs_intro.php'; } } diff --git a/rs_answeringmachine.php b/rs_answeringmachine.php index 4150a5ea..3f4f659b 100644 --- a/rs_answeringmachine.php +++ b/rs_answeringmachine.php @@ -78,17 +78,13 @@ if ($leavemessage) $r = $db->GetRow($sql); - if (!empty($r['rs_answeringmachine'])) 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 "
- "; + "; if ($questionnaire_id){ $outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q WHERE q.questionnaire_id = $questionnaire_id");// @@ -99,22 +95,22 @@ print "
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'] . "

"; diff --git a/rs_business.php b/rs_business.php index e859cfcc..cfe5831d 100644 --- a/rs_business.php +++ b/rs_business.php @@ -57,19 +57,14 @@ if (AUTO_LOGOUT_MINUTES !== false) $js[] = "js/childnap.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 "

" . 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:") . "

- + "; diff --git a/rs_callback.php b/rs_callback.php index 0db79427..4c796d08 100644 --- a/rs_callback.php +++ b/rs_callback.php @@ -77,16 +77,12 @@ $sql = "SELECT rs_callback WHERE questionnaire_id = '$questionnaire_id'"; $r = $db->GetRow($sql); -if (!empty($r['rs_callback'])) print "

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

"; +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") . "

"; print "
- "; + "; //filter displayed outcomes if ($questionnaire_id){ @@ -96,7 +92,7 @@ print "
if (in_array(8,$outcomes)){ $des = $db->GetAll("SELECT description FROM outcome WHERE outcome_id = 8"); print ""; @@ -104,7 +100,7 @@ print ""; print "
"; 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_intro.php b/rs_project_intro.php index 7a2704eb..2d70c166 100644 --- a/rs_project_intro.php +++ b/rs_project_intro.php @@ -73,15 +73,10 @@ $sql = "SELECT rs_project_intro $r = $db->GetRow($sql); -if (!empty($r['rs_project_intro'])) 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 @@ -92,31 +87,31 @@ print "
translate_array($des,array("description")); print ""; } - print ""; + print ""; print "
"; From 80a04fb84bb71e54271d424043f4c188880c15e3 Mon Sep 17 00:00:00 2001 From: Alex Date: Wed, 9 Dec 2015 23:36:07 +0300 Subject: [PATCH 3/3] embedded "add custom outcome" and "delete custom outcome" feature for admin only custom outcomes "delete" enabled starting from id=100, so DB update (in CHANGELOG) is not required but RECOMMENDED --- CHANGELOG | 3 + admin/set_outcomes.php | 173 +++++++++++++++++++++++++++++------------ 2 files changed, 125 insertions(+), 51 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 93dc3425..4ec7d0f5 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 . "
"; + ?>
- - -
+ + + +
-
- +
+
-
- +
+ + + +
+
+
-