diff --git a/admin/auth-admin.php b/admin/auth-admin.php
index 660bfddf..f260abcb 100644
--- a/admin/auth-admin.php
+++ b/admin/auth-admin.php
@@ -39,18 +39,13 @@ include_once(dirname(__FILE__) . "/../config.inc.php");
*/
include_once(dirname(__FILE__) . "/../db.inc.php");
-
-//get session name from DB
-//
-$sql = "SELECT stg_value
- FROM " . LIME_PREFIX . "settings_global
- WHERE stg_name = 'SessionName'";
-
-session_name($db->GetOne($sql));
+session_name(LS_SESSION_NAME);
session_set_cookie_params(0,QUEXS_PATH);
-session_start();
+if ((defined('PHP_SESSION_ACTIVE') && session_status() !== PHP_SESSION_ACTIVE) || !session_id()) {
+ session_start();
+}
//check if the session exists or loginID not set
if (session_id() == "" || !isset($_SESSION['loginID']))
diff --git a/admin/clientquestionnaire.php b/admin/clientquestionnaire.php
index 3bf45b3c..5edaba09 100644
--- a/admin/clientquestionnaire.php
+++ b/admin/clientquestionnaire.php
@@ -140,18 +140,18 @@ if (isset($_POST['submit']))
}
/* delete client from quexs and lime tables*/ //requires data-toggle-confirmation to finalize
-if (isset($_POST['delete']) && isset($_POST['uid']))
+if (isset($_GET['delete']) && isset($_GET['uid']) && isset($_GET['uname']))
{
- $client_id = intval($_POST['delete']);
- $uid = intval($_POST['uid']);
- $uname = $_POST['uname'];
-
+ $client_id = intval($_GET['delete']);
+ $uid = intval($_GET['uid']);
+ $uname = $_GET['uname'];
+
global $db;
-
- $db->StartTrans();
-
+
if ($uid !=1){ //double protect superadmin from being deleted
-
+
+ $db->StartTrans();
+
$sql = "DELETE FROM " . LIME_PREFIX . "templates_rights WHERE `uid` = '$uid' AND `uid` != 1";
$db->Execute($sql);
@@ -164,20 +164,19 @@ if (isset($_POST['delete']) && isset($_POST['uid']))
$sql = "DELETE FROM " . LIME_PREFIX . "users WHERE `uid` = '$uid' AND `uid` != 1";
$db->Execute($sql);
+ $sql = "DELETE FROM `client_questionnaire` WHERE `client_id` = '$client_id' ";
+ $db->Execute($sql);
+
+ $sql = "DELETE FROM `client` WHERE `client_id` = '$client_id'";
+ $db->Execute($sql);
+
+ $db->CompleteTrans();
}
-
- $sql = "DELETE FROM `client_questionnaire` WHERE `client_id` = '$client_id' ";
- $db->Execute($sql);
-
- $sql = "DELETE FROM `client` WHERE `client_id` = '$client_id'";
- $db->Execute($sql);
-
- $db->CompleteTrans();
if ($db->CompleteTrans()) $msg = "
". T_("Client with username $uname deleted") . "
";
- else $msg = "". T_("ERROR deleting client with username $uname") . "
";
+ else $msg = "". T_("ERROR deleting client with username $uname") . "
";
- unset($_POST['delete'], $_POST['uid'], $_POST['uname'], $client_id, $username, $uid);
+ unset($_GET['delete'], $_GET['uid'], $_GET['uname'], $client_id, $username, $uid);
}
diff --git a/admin/clients.php b/admin/clients.php
index 3b481419..8c478e61 100644
--- a/admin/clients.php
+++ b/admin/clients.php
@@ -124,6 +124,9 @@ if (isset($_POST['client']) && !empty($_POST['client']))
}
}
else $a = T_("Username") . " " . $client . ". " . T_("is already in use");
+
+ $client =""; $firstname="";$lastname="";$email=""; $time_zone_name="";
+ unset($_POST['client'],$_POST['password'],$_POST['lastname'],$_POST['firstname'],$_POST['email'],$_POST['Time_zone_name']);
}
$header = T_("Add a client");
diff --git a/admin/questionnairelist.php b/admin/questionnairelist.php
index e0ac8ff1..18346f59 100644
--- a/admin/questionnairelist.php
+++ b/admin/questionnairelist.php
@@ -581,6 +581,7 @@ else
CONCAT(' ')
END as outcomes,
CONCAT(' ') as calls,
+ CONCAT(' ') as setoutcomes,
CASE WHEN enabled = 0 THEN
CONCAT(' ')
ELSE
@@ -604,7 +605,7 @@ else
FROM questionnaire";
$rs = $db->GetAll($sql);
- $columns = array("qid","description","status","enabledisable","outcomes","calls","casestatus","shifts","assample","quotareport","dataout","modify","inlime","prefill","deletee");
+ $columns = array("qid","description","status","enabledisable","outcomes","calls","casestatus","shifts","assample","quotareport","dataout","modify","setoutcomes","inlime","prefill","deletee");
xhtml_table($rs,$columns,false,"table-hover table-condensed ");
print "";
diff --git a/admin/set_outcomes.php b/admin/set_outcomes.php
index a136fea9..9f11402e 100644
--- a/admin/set_outcomes.php
+++ b/admin/set_outcomes.php
@@ -197,8 +197,14 @@ if (isset($_GET['qid'])) {
/* for default outcomes */
if (isset($_GET['default'])) {
- $sql = "SELECT o.*, ot.description as type,
- CONCAT(' ') as `delay`,
+ /* allow delay edit only to superadmins (currenlty admin) */
+ if ($_SESSION['user'] === "admin"){
+ $delay = "CONCAT(' ') ";
+ }
+ else {
+ $delay = "CONCAT('', o.default_delay_minutes ,' ')";
+ }
+ $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,
@@ -214,9 +220,6 @@ if (isset($_GET['default'])) {
$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"));
- /* allow delay edit only to superadmins (currenlty admin) */
- if ( $_SESSION['user'] != "admin"){ unset($row[4]); unset($hdr[4]); }
-
$hid = "default";
$value = "";
diff --git a/auth-interviewer.php b/auth-interviewer.php
index 37464d53..74089770 100644
--- a/auth-interviewer.php
+++ b/auth-interviewer.php
@@ -40,16 +40,13 @@ include_once("config.inc.php");
include_once("db.inc.php");
-//get session name from DB
-//
-$sql = "SELECT stg_value
- FROM " . LIME_PREFIX . "settings_global
- WHERE stg_name = 'SessionName'";
-
-session_name($db->GetOne($sql));
+session_name(LS_SESSION_NAME);
session_set_cookie_params(0,QUEXS_PATH);
-session_start();
+
+if ((defined('PHP_SESSION_ACTIVE') && session_status() !== PHP_SESSION_ACTIVE) || !session_id()) {
+ session_start();
+}
//check if the session exists or loginID not set
if (session_id() == "" || !isset($_SESSION['loginID']))
diff --git a/client/auth-client.php b/client/auth-client.php
index 4e69078e..8d9db67a 100644
--- a/client/auth-client.php
+++ b/client/auth-client.php
@@ -39,18 +39,13 @@ include_once(dirname(__FILE__)."/../config.inc.php");
*/
include_once(dirname(__FILE__)."/../db.inc.php");
-
-//get session name from DB
-//
-$sql = "SELECT stg_value
- FROM " . LIME_PREFIX . "settings_global
- WHERE stg_name = 'SessionName'";
-
-session_name($db->GetOne($sql));
+session_name(LS_SESSION_NAME);
session_set_cookie_params(0,QUEXS_PATH);
-session_start();
+if ((defined('PHP_SESSION_ACTIVE') && session_status() !== PHP_SESSION_ACTIVE) || !session_id()) {
+ session_start();
+}
//check if the session exists or loginID not set
if (session_id() == "" || !isset($_SESSION['loginID']))
diff --git a/client/index.php b/client/index.php
index aa4bc30a..63046aaf 100644
--- a/client/index.php
+++ b/client/index.php
@@ -78,10 +78,9 @@ if ($client_id)
print "" . T_("There are no questionnaires assigned to you") . "
";
else
{
- print "";
-
foreach($qs as $q)
{
+ print "
";
print "
{$q['description']} ";
$questionnaire_id = $q['questionnaire_id'];
@@ -116,22 +115,25 @@ if ($client_id)
if (!empty($rs))
{
translate_array($rs,array("des"));
- xhtml_table($rs,array("des","count"),array(T_("Outcome"),T_("Count")),"tclass",array("des" => "Complete"));
+ xhtml_table($rs,array("des","count"),array(T_("Outcome"),T_("Count")),"tclass",array("des" => "Complete"),array("count"));
}
else print "
" . T_("No outcomes recorded for this questionnaire") . "
";
- print "
" . T_("View summary results") . " ";
+ print "
" . T_("View summary results") . " ";
}
- if (isset($_GET['qsid'])) $qsid = intval($_GET['qsid']);
- $page = LIME_URL . "admin/admin.php?action=browse&sid=$qsid";
-?>
-
+ if (isset($_GET['qsid'])) {
+ $qsid = intval($_GET['qsid']);
+ $page = LIME_URL . "admin/admin.php?action=browse&sid=$qsid"; }
+ else $page ='';
-
+ if ($page){
+?>
+
ERROR: Please modify config.inc.php for ADODB_PATH to point to your ADODb installation";
-}
+//if (!(include_once(ADODB_PATH . 'session/adodb-session2.php')))
+//{
+// print "
ERROR: Please modify config.inc.php for ADODB_PATH to point to your ADODb installation
";
+//}
define('ADODB_OUTP',"outputDebug");
@@ -75,7 +75,7 @@ if (DEBUG == true) $db->debug = true;
$db->Execute("set names 'utf8'");
//store session in database (see sessions2 table)
-ADOdb_Session::config(DB_TYPE, DB_HOST, DB_USER, DB_PASS, DB_NAME, array('table' => LIME_PREFIX . 'sessions'));
+//ADOdb_Session::config(DB_TYPE, DB_HOST, DB_USER, DB_PASS, DB_NAME, array('table' => LIME_PREFIX . 'sessions'));
/**
diff --git a/include/limesurvey/admin/browse.php b/include/limesurvey/admin/browse.php
index eae4d6e1..1ca82d81 100644
--- a/include/limesurvey/admin/browse.php
+++ b/include/limesurvey/admin/browse.php
@@ -81,6 +81,7 @@ else //SURVEY MATCHING $surveyid DOESN'T EXIST
//OK. IF WE GOT THIS FAR, THEN THE SURVEY EXISTS AND IT IS ACTIVE, SO LETS GET TO WORK.
$surveyinfo=getSurveyInfo($surveyid);
+include_once("../quexs.php");
require_once(dirname(__FILE__).'/sessioncontrol.php');
// Set language for questions and labels to base language of this survey
@@ -787,7 +788,6 @@ elseif ($subaction == "all")
$quexsfilterstate = questionnaireSampleFilterstate();
//queXS Addition
- include_once("../quexs.php");
$browseoutput .= " ".T_("Questionnaire and Sample selection:")."
\n"
."\t".T_("All queXS questionnaires and samples associated with this instrument")." \n"
. get_questionnaire_sample_list($surveyid,$quexsfilterstate)
diff --git a/include/limesurvey/admin/preview.php b/include/limesurvey/admin/preview.php
index 5fc1a53f..d21aaaac 100644
--- a/include/limesurvey/admin/preview.php
+++ b/include/limesurvey/admin/preview.php
@@ -18,6 +18,7 @@
$LEMdebugLevel=0;
include_once("login_check.php");
+include_once("../quexs.php");
require_once(dirname(__FILE__).'/sessioncontrol.php');
if (!isset($surveyid)) {$surveyid=returnglobal('sid');}
diff --git a/include/limesurvey/admin/sessioncontrol.php b/include/limesurvey/admin/sessioncontrol.php
index 8c78d60b..12fe91b1 100644
--- a/include/limesurvey/admin/sessioncontrol.php
+++ b/include/limesurvey/admin/sessioncontrol.php
@@ -21,7 +21,8 @@
if (!isset($dbprefix) || isset($_REQUEST['dbprefix'])) {die("Cannot run this script directly");}
// Read the session name from the settings table
-$usresult = getGlobalSetting('SessionName');
+//$usresult = getGlobalSetting('SessionName');
+$usresult = LS_SESSION_NAME; //queXS Addition
if ($usresult)
{
@session_name($usresult);
diff --git a/include/limesurvey/config.php b/include/limesurvey/config.php
index 061b82cc..47646944 100644
--- a/include/limesurvey/config.php
+++ b/include/limesurvey/config.php
@@ -89,4 +89,3 @@ $siteadminemail = "quexs@acspri.org.au";
// 'manage_label' => 1);
//
-$sessionhandler = 'db';
diff --git a/include/limesurvey/group.php b/include/limesurvey/group.php
index 1a48a773..b4b2e12e 100644
--- a/include/limesurvey/group.php
+++ b/include/limesurvey/group.php
@@ -483,6 +483,7 @@ else
}
+ killSession();
header("Location: {$url}");
}
diff --git a/include/limesurvey/index.php b/include/limesurvey/index.php
index 72a81526..47be2be4 100644
--- a/include/limesurvey/index.php
+++ b/include/limesurvey/index.php
@@ -62,6 +62,7 @@ if (isset($_GET['loadall']) && $_GET['loadall'] == "reload" && isset($_GET['toke
//end queXS Addition
+
//LimeExpressionManager::SetSurveyId($surveyid); // must be called early - it clears internal cache if a new survey is being used
//DEFAULT SETTINGS FOR TEMPLATES
@@ -96,12 +97,12 @@ if ($surveyid)
// Session name is based:
// * on this specific limesurvey installation (Value SessionName in DB)
// * on the surveyid (from Get or Post param). If no surveyid is given we are on the public surveys portal
-$usquery = "SELECT stg_value FROM ".db_table_name("settings_global")." where stg_name='SessionName'";
-$usresult = db_execute_assoc($usquery,'',true); //Checked
+//$usquery = "SELECT stg_value FROM ".db_table_name("settings_global")." where stg_name='SessionName'";
+//$usresult = db_execute_assoc($usquery,'',true); //Checked
+$usresult = LS_SESSION_NAME; //queXS Addition
if ($usresult)
{
- $usrow = $usresult->FetchRow();
- $stg_SessionName=$usrow['stg_value'];
+ $stg_SessionName=$usresult;
if ($surveyid && $surveyexists)
{
@session_name($stg_SessionName.'-runtime-'.$surveyid);
@@ -116,6 +117,9 @@ else
session_name("LimeSurveyRuntime-$surveyid");
}
session_set_cookie_params(0,$relativeurl.'/');
+
+
+
if (!isset($_SESSION) || empty($_SESSION)) // the $_SESSION variable can be empty if register_globals is on
@session_start();
diff --git a/voip/auth-interviewer.php b/voip/auth-interviewer.php
index 4e69078e..8d9db67a 100644
--- a/voip/auth-interviewer.php
+++ b/voip/auth-interviewer.php
@@ -39,18 +39,13 @@ include_once(dirname(__FILE__)."/../config.inc.php");
*/
include_once(dirname(__FILE__)."/../db.inc.php");
-
-//get session name from DB
-//
-$sql = "SELECT stg_value
- FROM " . LIME_PREFIX . "settings_global
- WHERE stg_name = 'SessionName'";
-
-session_name($db->GetOne($sql));
+session_name(LS_SESSION_NAME);
session_set_cookie_params(0,QUEXS_PATH);
-session_start();
+if ((defined('PHP_SESSION_ACTIVE') && session_status() !== PHP_SESSION_ACTIVE) || !session_id()) {
+ session_start();
+}
//check if the session exists or loginID not set
if (session_id() == "" || !isset($_SESSION['loginID']))