mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
updateв to main rev511
This commit is contained in:
25
CHANGELOG
25
CHANGELOG
@@ -1,6 +1,5 @@
|
||||
queXS 1.14.0 - Changes since 1.13.1
|
||||
|
||||
|
||||
Changes for session authentication:
|
||||
|
||||
queXS now uses the Limesurvey session based authentication system to authenticate all users.
|
||||
@@ -29,23 +28,23 @@ These queries will:
|
||||
2. Make all other users regular users, and assign them the password "password"
|
||||
3. Make all clients regular clients, and assign them the password "password"
|
||||
|
||||
Once you have run these - please go to the operator management page and update passwords for all users.
|
||||
Once you have run these - please go to the operator management page and update passwords for all users AND reassign any extensions.
|
||||
|
||||
/* Make the first user the admin user - with default password of: password */
|
||||
INSERT INTO `lime_users` (`users_name`, `password`, `full_name`, `parent_id`, `lang`, `superadmin`)
|
||||
SELECT username, '0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438', firstName, 0, 'auto', 1
|
||||
SELECT username, 0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438, firstName, 0, 'auto', 1
|
||||
FROM operator
|
||||
WHERE operator_id = 1;
|
||||
|
||||
/* Make all other users operators - with default password of: password */
|
||||
INSERT INTO `lime_users` (`users_name`, `password`, `full_name`, `parent_id`, `lang`, `superadmin`)
|
||||
SELECT username, '0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438', firstName, 1, 'auto', 0
|
||||
SELECT username, 0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438, firstName, 1, 'auto', 0
|
||||
FROM operator
|
||||
WHERE operator_id != 1;
|
||||
|
||||
/* Make all clients - with default password of: password */
|
||||
INSERT INTO `lime_users` (`users_name`, `password`, `full_name`, `parent_id`, `lang`, `superadmin`)
|
||||
SELECT username, '0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438', firstName, 1, 'auto', 0
|
||||
SELECT username, 0x35653838343839386461323830343731353164306535366638646336323932373733363033643064366161626264643632613131656637323164313534326438, firstName, 1, 'auto', 0
|
||||
FROM client
|
||||
WHERE 1;
|
||||
|
||||
@@ -54,6 +53,22 @@ DROP TABLE `sessions2`;
|
||||
|
||||
/* Add sort order feature to questionnaire sample table */
|
||||
ALTER TABLE `questionnaire_sample` ADD `sort_order` INT( 11 ) NOT NULL DEFAULT '0';
|
||||
UPDATE `questionnaire_sample` SET sort_order = sample_import_id;
|
||||
|
||||
/* Add default outcomes feature */
|
||||
|
||||
/* -- add `default` and `permanent` parameters for outcomes -- */
|
||||
ALTER TABLE `outcome` ADD `default` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Used as default for questionnaire outcomes' AFTER `calc`, ADD `permanent` TINYINT(1) UNSIGNED NOT NULL COMMENT 'Permanent outcome, used for all questionnaires, not possible to de-select' AFTER `default`;
|
||||
|
||||
/* -- 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) ;
|
||||
|
||||
/* -- 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`;
|
||||
|
||||
/* -- enable all outcomes for existing questionnaires -- */
|
||||
UPDATE `questionnaire` SET `outcomes` = '1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,40,41,42,43,44,45' ;
|
||||
|
||||
|
||||
!!-- IMPORTANT --!!
|
||||
If you had more than 1 sample assigned to a questionaire before "samplesort" update, you'll need to have different sort_order values (llike 0,1,2 e.t.c.)for each sample per questionnaire to make "samplesort" feature work.
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -43,7 +43,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -149,7 +149,8 @@ if (isset($_GET['questionnaire_id']) && isset($_GET['sample']) && isset($_GET['
|
||||
|
||||
foreach($rs as $r)
|
||||
{
|
||||
add_case($r['sample_id'],$questionnaire_id,"NULL",$testing,41, true);
|
||||
set_time_limit(30);
|
||||
add_case($r['sample_id'],$questionnaire_id,"NULL",$testing,41, true);
|
||||
}
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
@@ -43,7 +43,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -39,16 +39,13 @@ include_once(dirname(__FILE__) . "/../config.inc.php");
|
||||
*/
|
||||
include_once(dirname(__FILE__) . "/../db.inc.php");
|
||||
|
||||
session_name(LS_SESSION_NAME);
|
||||
|
||||
//get session name from DB
|
||||
//
|
||||
$sql = "SELECT stg_value
|
||||
FROM " . LIME_PREFIX . "settings_global
|
||||
WHERE stg_name = 'SessionName'";
|
||||
session_set_cookie_params(0,QUEXS_PATH);
|
||||
|
||||
session_name($db->GetOne($sql));
|
||||
|
||||
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']))
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,7 +43,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -47,7 +47,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Operator functions
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -82,7 +82,7 @@ if ($operator_id)
|
||||
{
|
||||
if (isset($_GET['questionnaire_id'])) $qid = $_GET['questionnaire_id'];
|
||||
if (isset($_GET['sample_import_id'])) $sid = $_GET['sample_import_id'];
|
||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".DATE_FORMAT."') as start_date, DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as start_time, DATE_FORMAT(CONVERT_TZ(c.end,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as end, o.description as descr, (CONCAT(r.firstName,' ',r.lastName)) as firstName, opp.firstName as opname,
|
||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".DATE_FORMAT."') as start_date, DATE_FORMAT(CONVERT_TZ(c.start,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as start_time, DATE_FORMAT(CONVERT_TZ(c.end,'UTC',op.Time_zone_name),'".TIME_FORMAT."') as end, o.description as descr, (CONCAT(r.firstName,' ',r.lastName)) as firstName, CONCAT(opp.firstName, ' ', opp.lastName) as opname,
|
||||
(SELECT GROUP_CONCAT(cn1.note SEPARATOR '</br>¶ ' ) FROM `case_note` as cn1 WHERE c.case_id = cn1.case_id GROUP BY cn1.case_id)as casenotes,";
|
||||
|
||||
if (isset($_GET['csv'])) $sql .= " c.case_id ";
|
||||
@@ -133,7 +133,7 @@ if ($operator_id)
|
||||
|
||||
while ($r = $rs->FetchRow())
|
||||
{
|
||||
translate_array($r,array("des"));
|
||||
translate_array($r,array("descr"));
|
||||
echo $r['start_date'] . "," .$r['start_time'] . "," . $r['end'] . "," . $r['case_id'] . "," . $r['qd'] . "," . $r['spl'] . "," . $r['cpi'] . "," . $r['opname'] . "," . $r['descr'] . "," . $r['casenotes'] . "," . $r['firstName'] . "\n";
|
||||
}
|
||||
|
||||
@@ -151,7 +151,7 @@ if ($operator_id)
|
||||
}
|
||||
else
|
||||
{
|
||||
translate_array($rs,array("des"));
|
||||
translate_array($rs,array("descr"));
|
||||
|
||||
$datacol = array("start_date", "start_time","end","case_id","qd","spl","cpi","opname","descr","casenotes","firstName");
|
||||
$headers = array(T_("Date"), T_("Start time"), T_("End time"),T_("Case ID"),T_("Questionnaire"),T_("Sample"),T_("Phone number"),T_("Operator"),T_("Outcome"),T_("Case notes"),T_("Respondent"));
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -75,7 +75,8 @@ if ($operator_id)
|
||||
|
||||
if (!empty($rs)){
|
||||
print "<h2 class=' '>" . T_("Project") . ": <span class='text-primary'>{$rs['qd']}</span></h2>";
|
||||
if($sample_import_id=intval($_GET['sample_import_id'])){
|
||||
if( isset($_GET['sample_import_id'])){
|
||||
$sample_import_id=intval($_GET['sample_import_id']);
|
||||
$sql = "SELECT si.description as sd
|
||||
FROM `sample_import` as si
|
||||
WHERE si.sample_import_id = '$sample_import_id' ;";
|
||||
@@ -85,7 +86,8 @@ if ($operator_id)
|
||||
}
|
||||
else{$sid = " ";};
|
||||
|
||||
if($oper_id= intval($_GET['oper_id'])){
|
||||
if( isset($_GET['oper_id'])){
|
||||
$oper_id= intval($_GET['oper_id']);
|
||||
$sql = "SELECT CONCAT(op.firstname, op.lastname) as opname
|
||||
FROM `operator` as op
|
||||
WHERE op.operator_id = '$oper_id' ;";
|
||||
|
||||
@@ -15,7 +15,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -110,19 +110,23 @@ function case_status_report($questionnaire_id = false, $sample_id = false, $outc
|
||||
LEFT JOIN outcome as co ON (co.outcome_id = ca.outcome_id)
|
||||
LEFT JOIN case_queue as cq ON (cq.case_id = c.case_id)
|
||||
LEFT JOIN operator as oq ON (cq.operator_id = oq.operator_id)
|
||||
LEFT JOIN (questionnaire_sample_quota as qsq, questionnaire_sample_quota_row as qsqr) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id and s.import_id = qsqr.sample_import_id and c.questionnaire_id = qsqr.questionnaire_id)
|
||||
WHERE c.current_operator_id IS NULL $q $o
|
||||
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 )
|
||||
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
||||
ORDER BY c.case_id ASC";
|
||||
|
||||
// print $sql;
|
||||
|
||||
print ("<form method=\"post\" action=\"?questionnaire_id=$questionnaire_id&sample_import_id=$sample_id\">");
|
||||
|
||||
$rs2 = $db->GetAll($sql);
|
||||
translate_array($rs2,array("outcomes"));
|
||||
|
||||
$datacol = array('case_id','samples','timezone','time','nrattempts','nrcalls','outcomes','availableinmin','assignedoperator','ordr','flag');
|
||||
$headers = array(T_("Case id"),T_("Sample"),T_("Timezone"),T_("Time NOW"),T_("Call attempts"),T_("Calls"),T_("Outcome"),T_("Available in"),T_("Assigned to"),T_("Order"),"<i class='fa fa-check-square-o fa-lg'></i>");
|
||||
|
||||
if (isset($_GET['sample_import_id'])){ unset($datacol[1]); unset($headers[1]); }
|
||||
|
||||
xhtml_table($db->GetAll($sql),$datacol,$headers,"tclass",false,false,"bs-table");
|
||||
xhtml_table($rs2,$datacol,$headers,"tclass",false,false,"bs-table");
|
||||
|
||||
$sql = "SELECT operator_id as value,CONCAT(firstName,' ', lastName) as description, '' selected
|
||||
FROM operator
|
||||
@@ -206,7 +210,7 @@ if (isset($_GET['unassign']))
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
xhtml_head(T_("Case status and assignment"),true,$css,$js_head);//array("../css/table.css"),array("../js/window.js")
|
||||
xhtml_head(T_("Case status and assignment"),true,$css,$js_head);
|
||||
echo "<a href='' onclick='history.back();return false;' class='btn btn-default pull-left' ><i class='fa fa-chevron-left text-primary'></i> " . T_("Go back") . "</a>
|
||||
<i class='fa fa-question-circle fa-3x text-primary pull-right btn' data-toggle='modal' data-target='.inform'></i>";
|
||||
?>
|
||||
@@ -237,7 +241,7 @@ print "<div class='form-group '><h3 class=' col-sm-2 text-right'>" . T_("Questio
|
||||
display_questionnaire_chooser($questionnaire_id, false, "pull-left", "form-control");
|
||||
if ($questionnaire_id){
|
||||
print "<h3 class=' col-sm-2 text-right'>" . T_("Sample") . ":</h3>";
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false, "pull-left", "form-control");
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false, "pull-left", "form-control", true);
|
||||
print "</div>
|
||||
<div class='clearfix'></div>";
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -42,13 +42,15 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
include ("../functions/functions.xhtml.php");
|
||||
|
||||
$msg = "";
|
||||
|
||||
/**
|
||||
* Return if an client has already been assigned to this questionnaire
|
||||
*
|
||||
@@ -78,78 +80,124 @@ function vq($client_id,$questionnaire_id)
|
||||
*
|
||||
* @param int $client_id Client id
|
||||
* @param int $questionnaire_id Questionnaire id
|
||||
* @param int $lime_sid Lime survey ID
|
||||
* @param int $uid Lime user ID
|
||||
*
|
||||
*/
|
||||
function vqi($client_id,$questionnaire_id)
|
||||
function vqi($client_id,$questionnaire_id,$lime_sid,$uid)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
$sql = "INSERT INTO
|
||||
client_questionnaire (client_id,questionnaire_id)
|
||||
VALUES('$client_id','$questionnaire_id')";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Unassign an client from a questionnaire
|
||||
*
|
||||
* @param int $client_id Client id
|
||||
* @param int $questionnaire_id Questionnaire id
|
||||
*
|
||||
*/
|
||||
function vqd($client_id,$questionnaire_id)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$sql = "DELETE FROM
|
||||
client_questionnaire
|
||||
WHERE client_id = '$client_id' and questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
/* Add client questionnaire permissions to view Lime results + statistics and quotas, //preserve superadmin permissions */
|
||||
if ($uid != 1 && empty($db->GetAll("SELECT * FROM " . LIME_PREFIX . "survey_permissions WHERE `sid` = '$lime_sid' AND `uid` = '$uid'")))
|
||||
{
|
||||
$sql = "INSERT INTO " . LIME_PREFIX . "survey_permissions (`sid`,`uid`,`permission`,`create_p`,`read_p`,`update_p`,`delete_p`,`import_p`,`export_p`)
|
||||
VALUES ($lime_sid,$uid,'survey',0,1,0,0,0,0),($lime_sid,$uid,'statistics',0,1,0,0,0,0),($lime_sid,$uid,'quotas',0,1,0,0,0,0)";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
|
||||
if (isset($_POST['submit']))
|
||||
{
|
||||
$db->StartTrans();
|
||||
|
||||
$sql = "DELETE
|
||||
FROM client_questionnaire
|
||||
WHERE questionnaire_id IN (
|
||||
SELECT questionnaire_id
|
||||
FROM questionnaire
|
||||
WHERE enabled = 1)";
|
||||
|
||||
|
||||
/* Unassign a client from a questionnaire , remove survey_permissions*/
|
||||
$sql = "DELETE FROM client_questionnaire
|
||||
WHERE questionnaire_id IN ( SELECT questionnaire_id FROM questionnaire WHERE enabled = 1)";
|
||||
$db->Execute($sql);
|
||||
/*Currently disabled -> need to decide how to manage permissions set earlier*/
|
||||
/* $questionnaires = $db->GetAll("SELECT lime_sid FROM questionnaire WHERE enabled = 1");
|
||||
|
||||
$clients = $db->GetAll("SELECT uid FROM client, " . LIME_PREFIX . "users WHERE `users_name` = `username`");
|
||||
|
||||
foreach($questionnaires as $q){
|
||||
foreach($clients as $v){
|
||||
$sql = "DELETE FROM " . LIME_PREFIX . "survey_permissions WHERE `uid` = {$v['uid']} AND `sid`={$q['lime_sid']} AND `uid` != 1";
|
||||
$db->Execute($sql);
|
||||
}
|
||||
} */
|
||||
/* - end - */
|
||||
|
||||
foreach ($_POST as $g => $v)
|
||||
{
|
||||
$a = explode("_",$g);
|
||||
if ($a[0] == "cb")
|
||||
vqi($a[2],$a[1]);
|
||||
vqi($a[2],$a[1],$a[3],$a[4]);
|
||||
}
|
||||
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
/* delete client from quexs and lime tables*/ //requires data-toggle-confirmation to finalize
|
||||
if (isset($_GET['delete']) && isset($_GET['uid']) && isset($_GET['uname']))
|
||||
{
|
||||
$client_id = intval($_GET['delete']);
|
||||
$uid = intval($_GET['uid']);
|
||||
$uname = $_GET['uname'];
|
||||
|
||||
$sql = "SELECT questionnaire_id,description
|
||||
global $db;
|
||||
|
||||
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);
|
||||
|
||||
$sql = "DELETE FROM " . LIME_PREFIX . "survey_permissions WHERE `uid` = '$uid' AND `uid` != 1";
|
||||
$db->Execute($sql);
|
||||
|
||||
$sql = "DELETE FROM " . LIME_PREFIX . "user_in_groups WHERE `uid` = '$uid' AND `uid` != 1";
|
||||
$db->Execute($sql);
|
||||
|
||||
$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();
|
||||
}
|
||||
|
||||
if ($db->CompleteTrans()) $msg = "<p class='alert alert-info'>". T_("Client with username $uname deleted") . "</p>";
|
||||
else $msg = "<p class='alert alert-warning'>". T_("ERROR deleting client with username $uname") . "</p>";
|
||||
|
||||
unset($_GET['delete'], $_GET['uid'], $_GET['uname'], $client_id, $username, $uid);
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT questionnaire_id,description, lime_sid
|
||||
FROM questionnaire
|
||||
WHERE enabled = 1
|
||||
ORDER by questionnaire_id ASC";
|
||||
|
||||
$questionnaires = $db->GetAll($sql);
|
||||
|
||||
$sql = "SELECT client_id, CONCAT(firstName,' ', lastName ) as description, username
|
||||
FROM client
|
||||
$sql = "SELECT client_id, CONCAT(firstName,' ', lastName ) as description, username, uid
|
||||
FROM client, " . LIME_PREFIX . "users
|
||||
WHERE `users_name` = `username`
|
||||
ORDER by client_id ASC";
|
||||
|
||||
$clients = $db->GetAll($sql);
|
||||
|
||||
|
||||
xhtml_head(T_("Assign clients to questionnaires"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/iCheck/skins/square/blue.css","../css/custom.css"),array("../include/jquery/jquery.min.js","../include/iCheck/icheck.min.js"));
|
||||
xhtml_head(T_("Clients and questionnaires"),true,array("../include/bootstrap/css/bootstrap.min.css","../include/font-awesome/css/font-awesome.css","../include/iCheck/skins/square/blue.css","../css/custom.css"),array("../include/jquery/jquery.min.js","../include/iCheck/icheck.min.js"));
|
||||
|
||||
if (!empty($msg)) print $msg;
|
||||
|
||||
?>
|
||||
|
||||
@@ -243,7 +291,9 @@ print "<form action=\"\" method=\"post\" class=''><table class='table-bordered t
|
||||
print "<tr><th> " . T_("Username") . " </th><th> " . T_("Client") . " </th>";
|
||||
foreach($questionnaires as $q)
|
||||
{
|
||||
print "<th><a href=\"javascript:checkQid({$q['questionnaire_id']})\">{$q['description']}</a></th>";
|
||||
print "<th><a href=\"".LIME_URL."admin/admin.php?sid={$q['lime_sid']}&action=surveysecurity\" title=\"". T_("NOTICE! Please, check your user righs to edit client permissions or contact your superviser.") ."\"class=\"btn btn-default btn-sm btn-lime\" >" . T_("Questionnaire permissions") . "</a>
|
||||
</br> <a href=\"javascript:checkQid({$q['questionnaire_id']})\">{$q['description']}</a>
|
||||
</th>";
|
||||
}
|
||||
print "</tr></thead>";
|
||||
|
||||
@@ -251,20 +301,24 @@ print "</tr></thead>";
|
||||
foreach($clients as $v)
|
||||
{
|
||||
print "<tr class=''>
|
||||
<th> {$v['username']} </th>
|
||||
<th> {$v['username']} <div class=\"pull-right\">
|
||||
<a href=\"?delete={$v['client_id']}&uid={$v['uid']}&uname={$v['username']}\" ><i class='fa fa-fw fa-trash-o fa-lg text-danger' data-toggle='tooltip' title=\"" . T_("Delete") . " {$v['username']} ?\"></i></a> 
|
||||
<a href=\"clients.php?edit={$v['client_id']}\" ><i class='fa fa-fw fa-edit fa-lg' data-toggle='tooltip' title=\"" . T_("Edit") . " {$v['username']}\"></i></a> </div></th>
|
||||
<th> <a href=\"javascript:checkVid({$v['client_id']})\">{$v['description']}</a> </th>";
|
||||
|
||||
foreach($questionnaires as $q)
|
||||
{
|
||||
$checked = "";
|
||||
if (vq($v['client_id'],$q['questionnaire_id'])) $checked="checked=\"checked\"";
|
||||
print "<td class='text-center'><input type=\"checkbox\" name=\"cb_{$q['questionnaire_id']}_{$v['client_id']}\" id=\"cb_{$q['questionnaire_id']}_{$v['client_id']}\" $checked></input></td>";
|
||||
|
||||
if (vq($v['client_id'],$q['questionnaire_id'])) $checked="checked=\"checked\""; else $checked = "";
|
||||
print "<td class='text-center'> 
|
||||
<input type=\"checkbox\" name=\"cb_{$q['questionnaire_id']}_{$v['client_id']}_{$q['lime_sid']}_{$v['uid']}\" id=\"cb_{$q['questionnaire_id']}_{$v['client_id']}\" $checked/> </td>";
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
}
|
||||
|
||||
|
||||
print "</table><input type=\"submit\" class='btn btn-default fa' name=\"submit\" value=\"" . T_("Assign clients to questionnaires") . "\"/></form>";
|
||||
print "</table><input type=\"submit\" class='btn btn-primary' name=\"submit\" value=\"" . T_("Assign clients to questionnaires") . "\"/></form>";
|
||||
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -45,7 +45,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -57,7 +57,9 @@ global $db;
|
||||
|
||||
$a = false;
|
||||
|
||||
if (isset($_POST['client']))
|
||||
$client =""; $firstname="";$lastname="";$email=""; $time_zone_name="";
|
||||
|
||||
if (isset($_POST['client']) && !empty($_POST['client']))
|
||||
{
|
||||
$client = $db->qstr($_POST['client'],get_magic_quotes_gpc());
|
||||
$firstname = $db->qstr($_POST['firstname'],get_magic_quotes_gpc());
|
||||
@@ -65,46 +67,107 @@ if (isset($_POST['client']))
|
||||
$lastname = $db->qstr($_POST['lastname'],get_magic_quotes_gpc());
|
||||
$time_zone_name = $db->qstr($_POST['Time_zone_name'],get_magic_quotes_gpc());
|
||||
|
||||
if (!empty($_POST['client']))
|
||||
{
|
||||
$sql = "INSERT INTO client
|
||||
(`client_id` ,`username` ,`firstName` ,`lastName`, `Time_zone_name`)
|
||||
VALUES (NULL , $client, $firstname , $lastname, $time_zone_name);";
|
||||
/* check if there'a record with this username*/
|
||||
$sql = "SELECT `username`,`client_id` from client WHERE `username` LIKE $client";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
if ($db->Execute($sql))
|
||||
{
|
||||
include_once("../include/limesurvey/admin/classes/core/sha256.php");
|
||||
|
||||
//Insert into lime_users
|
||||
$sql = "INSERT INTO " . LIME_PREFIX . "users (`users_name`,`password`,`full_name`,`parent_id`,`superadmin`,`email`,`lang`)
|
||||
VALUES ($client, '" . SHA256::hashing($_POST['password']) . "',$firstname,1,0,$email,'auto')";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
if (isset($_GET['edit']) && $_GET['edit'] >0 ) {
|
||||
|
||||
$clid = intval($_GET['edit']);
|
||||
$uid = intval($_POST['uid']);
|
||||
}
|
||||
|
||||
|
||||
$a = T_("Added: $client");
|
||||
if (empty($rs) || count($rs)==1 && $rs[0]['client_id'] == $clid){
|
||||
|
||||
// update client
|
||||
if (isset($_GET['edit']) && $_GET['edit'] >0 ) {
|
||||
|
||||
$sql = "UPDATE `client` SET `username`= $client,`firstName` = $firstname,`lastName` = $lastname,`Time_zone_name` = $time_zone_name
|
||||
WHERE `client_id` = $clid ";
|
||||
|
||||
if ($db->Execute($sql))
|
||||
{
|
||||
$sql = "UPDATE " . LIME_PREFIX . "users SET `users_name` = $client, `full_name` = $firstname, `email` = $email";
|
||||
|
||||
/* rewrite 'password' only if not blank in edit mode */
|
||||
if (isset($_GET['edit']) && $_GET['edit'] >0 && isset($_POST['password']) && !empty($_POST['password'])) {
|
||||
|
||||
include_once("../include/limesurvey/admin/classes/core/sha256.php");
|
||||
$sql .=",`password` = '" . SHA256::hashing($_POST['password']) . "'";
|
||||
}
|
||||
|
||||
$sql .= "WHERE `uid` = $uid";
|
||||
|
||||
if ($db->Execute($sql)) $a = T_("Updated") . ": " . $client; else $a = T_("Update error");
|
||||
}
|
||||
else
|
||||
$a = T_("Could not update") . " " . $client;
|
||||
}
|
||||
else
|
||||
$a = T_("Could not add") . " " . $client . ". " . T_("There may already be a client of this name");
|
||||
else { //save as a new client
|
||||
|
||||
$sql = "INSERT INTO client (`client_id` ,`username` ,`firstName` ,`lastName`, `Time_zone_name`)
|
||||
VALUES (NULL , $client, $firstname , $lastname, $time_zone_name);";
|
||||
|
||||
if ($db->Execute($sql)) {
|
||||
|
||||
include_once("../include/limesurvey/admin/classes/core/sha256.php");
|
||||
|
||||
//Insert into lime_users
|
||||
$sql = "INSERT INTO " . LIME_PREFIX . "users (`users_name`,`password`,`full_name`,`parent_id`,`superadmin`,`email`,`lang`)
|
||||
VALUES ($client, '" . SHA256::hashing($_POST['password']) . "', $firstname ,1,0,$email,'auto')";
|
||||
|
||||
if ($db->Execute($sql)) $a = T_("Added") . ": " . $client; else $a = T_("Error adding client");
|
||||
}
|
||||
else
|
||||
$a = T_("Could not add") . " " . $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");
|
||||
$sbut = T_("Add new client");
|
||||
$req = "required";
|
||||
|
||||
if (isset($_GET['edit']) && $_GET['edit'] >0 ) {
|
||||
|
||||
$header = T_("Edit client data");
|
||||
|
||||
$clid = intval($_GET['edit']);
|
||||
|
||||
$sql = "SELECT client.*, u.email, u.uid from client, " . LIME_PREFIX . "users as u WHERE client_id=$clid and u.users_name=username";
|
||||
|
||||
$cdata = $db->GetRow($sql);
|
||||
|
||||
if (!$cdata) {
|
||||
unset($_GET['edit']);
|
||||
die(T_("NO such client"));
|
||||
}
|
||||
else{
|
||||
$uid = $cdata['uid'];
|
||||
$client = $cdata['username'];
|
||||
$firstname= $cdata['firstName'];
|
||||
$lastname= $cdata['lastName'];
|
||||
$email= $cdata['email'];
|
||||
$time_zone_name = $cdata['Time_zone_name'];
|
||||
$sbut = T_("Update client data");
|
||||
$req = "";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Add a client"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"));
|
||||
xhtml_head($header,true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"));
|
||||
|
||||
$sql = "SELECT Time_zone_name as value, Time_zone_name as description
|
||||
FROM timezone_template";
|
||||
$tzs = $db->GetAll($sql);
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
|
||||
if ($a)
|
||||
{
|
||||
?>
|
||||
if ($a) { ?>
|
||||
<div class='alert alert-info'><?php echo $a; ?></div>
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
<?php } ?>
|
||||
|
||||
<script type="text/javascript">
|
||||
//Password generator
|
||||
@@ -145,38 +208,52 @@ function generate() {
|
||||
|
||||
|
||||
<div class="well">
|
||||
<p><?php echo T_("Adding a client here will allow them to access project information in the client subdirectory. You can assign a client to a particular project using the"); ?> <a href="clientquestionnaire.php"><?php echo T_("Assign client to Questionnaire"); ?></a> <?php echo T_("tool."); ?></p>
|
||||
<p><?php echo T_("Adding a client here will allow them to access project information in the client subdirectory.");
|
||||
|
||||
if (isset($_GET['edit']) && $_GET['edit'] >0 ){
|
||||
echo " " . T_("You can assign a client to a particular project with"). " "; ?> <a href="clientquestionnaire.php" class="btn btn-default"><?php echo T_("Assign client to Questionnaire") . "</a>";
|
||||
} ?>
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<form enctype="multipart/form-data" action="" method="post" class="form-horizontal" name="addclient" >
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3"><?php echo T_("Enter the username of a client to add:"); ?></label>
|
||||
<input name="client" type="text" class="form-control pull-left" required size="40" />
|
||||
<label class="control-label col-lg-3"><?php echo T_("Username"); ?>:</label>
|
||||
<input name="client" type="text" class="form-control" required size="40" value="<?php echo $client;?>"/>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3"><?php echo T_("Enter the password of a client to add:"); ?></label>
|
||||
<input name="password" type="text" class="form-control pull-left" size="40" required />
|
||||
<label class="control-label col-lg-3"><?php echo T_("Password"); ?>:</label>
|
||||
<input name="password" type="text" class="form-control pull-left" size="40" <?php echo $req;?> placeholder="<?php if (isset($_GET['edit']) && $_GET['edit'] >0 ) echo T_("Leave this blank to keep current password");?>"/>
|
||||
<div class="form-inline">  
|
||||
<input type="button" onclick="generate();" value="<?php echo T_("Generate");?>" class="btn btn-default fa" /> <?php echo T_("Password with");?> 
|
||||
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" /> <?php echo T_("characters");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3"><?php echo T_("Enter the first name of a client to add:"); ?></label>
|
||||
<input name="firstname" type="text" class="form-control pull-left" size="40" />
|
||||
<label class="control-label col-lg-3"><?php echo T_("First name"); ?> :</label>
|
||||
<input name="firstname" type="text" class="form-control" size="40" value="<?php echo $firstname;?>"/>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3"><?php echo T_("Enter the surname of a client to add:"); ?></label>
|
||||
<input name="lastname" type="text" class="form-control pull-left" size="40"/>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Email") . ": ";?></label>
|
||||
<input name="email" type="text" class="form-control pull-left"/>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3"><a href='timezonetemplate.php'><?php echo T_("Enter the Time Zone of a client to add:"); echo "</a></label>";
|
||||
display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,false,array("value",get_setting("DEFAULT_TIME_ZONE")),true,"pull-left"); ?>
|
||||
<label class="control-label col-lg-3"><?php echo T_("Surname"); ?>:</label>
|
||||
<input name="lastname" type="text" class="form-control" size="40"value="<?php echo $lastname;?>"/>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Email"); ?>:</label>
|
||||
<input name="email" type="text" class="form-control" size="40" value="<?php echo $email;?>"/>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-lg-3"><a href='timezonetemplate.php'><?php echo T_("Timezone"); echo ":</a></label><div size=\"40\">";
|
||||
if (isset($_GET['edit']) && $_GET['edit'] >0) $dtz = $time_zone_name; else $dtz = get_setting("DEFAULT_TIME_ZONE");
|
||||
display_chooser($tzs,"Time_zone_name","Time_zone_name",false,false,false,false,array("value", $dtz),true,"pull-left"); ?> </div>
|
||||
</div>
|
||||
<?php if (isset($_GET['edit']) && $_GET['edit'] >0 ) { ?>
|
||||
<input name="uid" type="hidden" value="<?php echo $uid;?>"/>
|
||||
<?php } ?>
|
||||
|
||||
<div class="form-group">
|
||||
<a href="clientquestionnaire.php" style="" class="btn btn-default col-lg-1 col-lg-offset-1"><?php echo T_("Cancel"); ?></a>
|
||||
<input type="submit" value="<?php echo $sbut; ?>" style="width:336px;" class="btn btn-primary col-lg-offset-1"/>
|
||||
</div>
|
||||
<input type="submit" value="<?php echo T_("Add a client"); ?>" class="btn btn-primary col-sm-offset-3 col-sm-3"/>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
|
||||
@@ -47,7 +47,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -149,6 +149,7 @@ if (isset($_GET['key']) || isset($_GET['sample']))
|
||||
}
|
||||
if (isset($_GET['sample']))
|
||||
{
|
||||
$l['description'] = T_($l['description']);
|
||||
echo "," . str_replace(","," ",$l['description']) . "," .$l['callattempts']."," .$l['calls']."," .$l['casenotes'].",".$l['interviewtimec'].",".$l['interviewtimel'].",".$l['lastnumber'].",".$l['lastcallstart'].",".$l['operatoru'].",".$l['shiftr'].",". $l['aapor_id'];
|
||||
}
|
||||
echo "\n";
|
||||
@@ -201,7 +202,7 @@ xhtml_head(T_("Data output"),true,array("../include/bootstrap/css/bootstrap.min.
|
||||
print "<div class='form-group clearfix'><h3 class='col-sm-4 text-right'>" . T_("Please select a questionnaire") . ": </h3>";
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
display_questionnaire_chooser($questionnaire_id,false,"form-inline col-sm-3 pull-left", "form-control");
|
||||
display_questionnaire_chooser($questionnaire_id,false,"form-inline col-lg-4 pull-left", "form-control");
|
||||
|
||||
if ($questionnaire_id)
|
||||
{
|
||||
@@ -217,7 +218,7 @@ if ($questionnaire_id)
|
||||
print "<div class='form-group clearfix'><h3 class='col-sm-4 text-right'>" . T_("Please select a sample") . ": </h3>";
|
||||
$sample_import_id = false;
|
||||
if (isset($_GET['sample_import_id'])) $sample_import_id = bigintval($_GET['sample_import_id']);
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false,"form-inline col-sm-3 pull-left", "form-control");
|
||||
display_sample_chooser($questionnaire_id,$sample_import_id,false,"form-inline col-lg-4 pull-left", "form-control");
|
||||
|
||||
if ($sample_import_id)
|
||||
{
|
||||
@@ -231,7 +232,7 @@ if ($questionnaire_id)
|
||||
//download a key file linking the caseid to the sample
|
||||
print "<div class='form-group '><h3 class='col-sm-4 text-right'>" . T_("Download key file: select sample var") . ": </h3>";
|
||||
|
||||
display_chooser($rs,"sample_var","sample_var",true,"questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id",true,true,false,true,"form-inline col-sm-3 pull-left");
|
||||
display_chooser($rs,"sample_var","sample_var",true,"questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id",true,true,false,true,"form-inline col-lg-4 pull-left");
|
||||
|
||||
print "</div><div class=' col-sm-4'>";
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php /**
|
||||
<?php
|
||||
/**
|
||||
* Display appointments
|
||||
*/
|
||||
|
||||
@@ -15,7 +16,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -58,19 +59,27 @@ $js_foot = array(
|
||||
"../js/bootstrap-confirmation.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
|
||||
//create new or update appointment
|
||||
if (isset($_GET['start']) && isset($_GET['end']) && isset($_GET['update']))
|
||||
{
|
||||
$start = $db->qstr($_GET['start']);
|
||||
$end = $db->qstr($_GET['end']);
|
||||
$contact_phone_id = bigintval($_GET['contact_phone_id']);
|
||||
$case_id = bigintval($_GET['case_id']);
|
||||
$respondent_id = bigintval($_GET['respondent_id']);
|
||||
$require_operator_id = "NULL";
|
||||
if ($_GET['require_operator_id'] > 1) $require_operator_id = bigintval($_GET['require_operator_id']);
|
||||
|
||||
if ($_GET['new'] == 'create'){
|
||||
$case_id = bigintval($_GET['case_id']);
|
||||
//* add new number to db
|
||||
if ( isset($_GET['addphonenumber']) && !empty($_GET['addphonenumber'])){
|
||||
add_contact_phone($case_id,$_GET['addphonenumber']);
|
||||
$contact_phone_id = $db->Insert_ID();
|
||||
}
|
||||
else {
|
||||
$contact_phone_id = bigintval($_GET['contact_phone_id']);
|
||||
}
|
||||
|
||||
if (isset($_GET['new']) && $_GET['new'] == 'create'){
|
||||
$operator_id = get_operator_id();
|
||||
if ($operator_id == false) die();
|
||||
$sql = "SELECT Time_zone_name FROM respondent WHERE respondent_id = '$respondent_id'";
|
||||
@@ -104,14 +113,15 @@ if (isset($_GET['start']) && isset($_GET['end']) && isset($_GET['update']))
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
unset ($_GET['start'],$_GET['end'],$_GET['appointment_id'],$_GET['case_id'],$_GET['new'],$_GET['update']);
|
||||
unset ($_GET['start'],$_GET['end'],$_GET['new'],$_GET['update'],$_GET['appointment_id'],$_GET['case_id'],$_GET['addphonenumber']); //
|
||||
}
|
||||
|
||||
|
||||
if ( (isset($_GET['appointment_id']) && isset($_GET['case_id'])) ||(isset($_GET['new']) && isset($_GET['case_id'])))
|
||||
{
|
||||
$appointment_id = bigintval($_GET['appointment_id']);
|
||||
$case_id = bigintval($_GET['case_id']);
|
||||
if (isset($_GET['appointment_id'])) $appointment_id = bigintval($_GET['appointment_id']); else $appointment_id = "";
|
||||
if (isset($_GET['case_id'])) $case_id = bigintval($_GET['case_id']);
|
||||
$require_operator_id = "NULL";
|
||||
|
||||
if (isset($_GET['delete']))
|
||||
{
|
||||
@@ -121,27 +131,61 @@ if ( (isset($_GET['appointment_id']) && isset($_GET['case_id'])) ||(isset($_GET[
|
||||
|
||||
xhtml_head(T_("Now modify case outcome"),true,$css,$js_head);
|
||||
|
||||
print "<div class='col-sm-6'><p class='well'>" . T_("The appointment has been deleted. Now you must modify the case outcome") . "</p>
|
||||
print "<div class='col-lg-6'><p class='well'>" . T_("The appointment has been deleted. Now you must modify the case outcome") . "</p>
|
||||
<a href='supervisor.php?case_id=$case_id' class='btn btn-default'>" . T_("Modify case outcome") . "</a></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
//Display an edit form
|
||||
$lang = DEFAULT_LOCALE ;
|
||||
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'SYSTEM',r.Time_zone_name) as startdate,
|
||||
CONVERT_TZ(DATE_ADD(NOW(), INTERVAL 10 YEAR),'SYSTEM',r.Time_zone_name) as enddate,
|
||||
r.respondent_id, ca.contact_phone_id
|
||||
FROM `case` as c, `respondent` as r, `call` as ca
|
||||
WHERE c.case_id = '$case_id'
|
||||
AND r.case_id = c.case_id
|
||||
AND c.last_call_id = ca.call_id";
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if ($_GET['new'] == 'new'){$title = T_("Create NEW appointment");} else{$title = T_("Edit appointment"); $subtitle = "ID " . $appointment_id;}
|
||||
$startdate = $rs['startdate'];
|
||||
$enddate = $rs['enddate'];
|
||||
$respondent_id = $rs['respondent_id'];
|
||||
if (!isset($contact_phone_id)) $contact_phone_id = $rs['contact_phone_id'];
|
||||
|
||||
if (isset($_GET['new']) && $_GET['new'] == 'new'){
|
||||
$title = T_("Create NEW appointment");
|
||||
$subtitle ="";
|
||||
$start = $startdate;
|
||||
$end = $enddate;
|
||||
$rtz = $_GET['rtz'];
|
||||
}
|
||||
|
||||
if (isset($_GET['appointment_id'])) {
|
||||
$title = T_("Edit appointment");
|
||||
$subtitle = "ID " . $appointment_id;
|
||||
|
||||
$sql = "SELECT a.contact_phone_id,a.call_attempt_id, CONVERT_TZ(a.start,'UTC',r.Time_zone_name) as `start`, CONVERT_TZ(a.end,'UTC',r.Time_zone_name) as `end`, a.respondent_id, a.require_operator_id, r.Time_zone_name as rtz
|
||||
FROM `appointment` as a, respondent as r
|
||||
WHERE a.appointment_id = '$appointment_id'
|
||||
AND a.case_id = '$case_id'
|
||||
AND r.respondent_id = a.respondent_id";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (!empty($rs)){
|
||||
$respondent_id = $rs['respondent_id'];
|
||||
$contact_phone_id = $rs['contact_phone_id'];
|
||||
$require_operator_id = $rs['require_operator_id'];
|
||||
$start = $rs['start'];
|
||||
$end = $rs['end'];
|
||||
$rtz = $rs['rtz'];
|
||||
}
|
||||
else die(T_("ERROR in DB records, Check tables 'appointment' and 'respondent' and Time zone settings"));
|
||||
}
|
||||
|
||||
//Display an edit form
|
||||
xhtml_head($title,true,$css,$js_head,false,false,false,$subtitle);
|
||||
|
||||
$lang = DEFAULT_LOCALE;
|
||||
|
||||
$sql = "SELECT CONVERT_TZ(NOW(),'SYSTEM',r.Time_zone_name) as startdate, CONVERT_TZ(DATE_ADD(NOW(), INTERVAL 10 YEAR),'SYSTEM',r.Time_zone_name) as enddate
|
||||
FROM `case` as c, `respondent` as r
|
||||
WHERE c.case_id = '$case_id' AND r.case_id = c.case_id";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
$startdate = $rs['startdate'];
|
||||
$enddate = $rs['enddate'];
|
||||
|
||||
print "<script type='text/javascript'>
|
||||
$(document).ready(function() { var startDateTextBox = $('#start'); var endDateTextBox = $('#end');
|
||||
$.timepicker.datetimeRange(
|
||||
@@ -157,60 +201,55 @@ if ( (isset($_GET['appointment_id']) && isset($_GET['case_id'])) ||(isset($_GET[
|
||||
stepMinute: 5,
|
||||
hourGrid: 2,
|
||||
minuteGrid: 10,
|
||||
minDate: '$startdate',
|
||||
maxDate: '$enddate'
|
||||
minDate: '$startdate',
|
||||
maxDate: '$enddate'
|
||||
});});</script>";
|
||||
|
||||
if ($_GET['new'] =='new'){
|
||||
$start = $startdate;
|
||||
$end = $enddate;
|
||||
$rtz = $_GET['rtz'];
|
||||
}
|
||||
if (isset($_GET['appointment_id'])) {
|
||||
print "<form action='?' method='get' class='form-horizontal form-group'>";
|
||||
print "<label class='pull-left text-right control-label col-lg-2' for='respondent_id'>" . T_("Respondent") . "</label>";
|
||||
|
||||
display_chooser($db->GetAll("SELECT respondent_id as value, CONCAT(firstName,' ',lastName) as description,
|
||||
CASE when respondent_id = '$respondent_id' THEN 'selected=\'selected\'' ELSE '' END as selected
|
||||
FROM respondent
|
||||
WHERE case_id = '$case_id'"),"respondent_id","respondent_id",false,false,false,true,false,true,"pull-left");
|
||||
|
||||
$sql = "SELECT a.contact_phone_id,a.call_attempt_id, CONVERT_TZ(a.start,'UTC',r.Time_zone_name) as `start`, CONVERT_TZ(a.end,'UTC',r.Time_zone_name) as `end`, a.respondent_id, a.require_operator_id, r.Time_zone_name as rtz
|
||||
FROM `appointment` as a, respondent as r
|
||||
WHERE a.appointment_id = '$appointment_id'
|
||||
AND a.case_id = '$case_id'
|
||||
AND r.respondent_id = a.respondent_id";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (!empty($rs)){
|
||||
$respondent_id = $rs['respondent_id'];
|
||||
$contact_phone_id = $rs['contact_phone_id'];
|
||||
$require_operator_id = $rs['require_operator_id'];
|
||||
$start = $rs['start'];
|
||||
$end = $rs['end'];
|
||||
$rtz = $rs['rtz'];
|
||||
}
|
||||
}
|
||||
print "<form action='?' method='get' class='form-horizontal'>";
|
||||
print "<label class='pull-left text-right control-label col-sm-2' for='respondent_id'>" . T_("Respondent") . "</label>";
|
||||
print "<br/><br/><label for='contact_phone_id' class='pull-left text-right control-label col-lg-2'>" . T_("Contact phone") . "</label>";
|
||||
|
||||
display_chooser($db->GetAll("SELECT respondent_id as value, CONCAT(firstName,' ',lastName) as description,
|
||||
CASE when respondent_id = '$respondent_id' THEN 'selected=\'selected\'' ELSE '' END as selected
|
||||
FROM respondent
|
||||
WHERE case_id = '$case_id'"),"respondent_id","respondent_id",false,false,false,true,false,true,"pull-left");
|
||||
$sql = "SELECT contact_phone_id as value, phone as description,
|
||||
CASE when contact_phone_id = '$contact_phone_id' THEN 'selected=\'selected\'' ELSE '' END as selected
|
||||
FROM contact_phone
|
||||
WHERE case_id = '$case_id'";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
//* added option to add new number
|
||||
print "<div class=\"pull-left\"><select class=\"form-control\" id='contact_phone_id' name='contact_phone_id'
|
||||
onchange=\"if($(this).val()=='add'){ $('#addPhone').show(); } else{ $('#addPhone').hide(); } \">";
|
||||
foreach($rs as $l)
|
||||
{
|
||||
print "<option value='{$l['value']}' {$l['selected']} >{$l['description']}</option>";
|
||||
}
|
||||
print "<option value='add'>" . T_("Add new phone number") . "</option></select></div>";
|
||||
|
||||
print "<br/><br/><label for='contact_phone_id' class='pull-left text-right control-label col-sm-2'>" . T_("Contact phone") . "</label>";
|
||||
display_chooser($db->GetAll("SELECT contact_phone_id as value, phone as description,
|
||||
CASE when contact_phone_id = '$contact_phone_id' THEN 'selected=\'selected\'' ELSE '' END as selected
|
||||
FROM contact_phone
|
||||
WHERE case_id = '$case_id'"),
|
||||
"contact_phone_id","contact_phone_id",false,false,false,true,false,true,"pull-left");
|
||||
|
||||
print "<div class='clearfix'></div></br><div class='alert alert-info col-sm-6 '>". T_("ATTENTION! Keep in mind that you're setting 'Start' & 'End' appoinment times in RESPONDENT LOCAL TIME !!!") . "</div><div class='clearfix'></div>";
|
||||
print "<div class='col-lg-4' id='addPhone' style='display:none'>
|
||||
<div class='col-lg-6' id=''>
|
||||
<input type=\"tel\" maxlength=\"10\" pattern=\"[0-9]{10}\" class='form-control col-lg-2 ' name='addphonenumber' />
|
||||
</div>
|
||||
</div>";
|
||||
//*end option
|
||||
|
||||
print "<div class='clearfix'></div></br><div class='alert alert-info col-lg-6 '>". T_("ATTENTION! Keep in mind that you're setting 'Start' & 'End' appoinment times in RESPONDENT LOCAL TIME !!!") . "</div><div class='clearfix'></div>";
|
||||
|
||||
date_default_timezone_set($rtz);
|
||||
print "<label class='text-right col-sm-2 control-label'>" . T_("Respondent TimeZone") . ":</label>
|
||||
<h4 class='col-sm-2 text-danger text-uppercase fa-lg'>" . $rtz . "</h4>
|
||||
|
||||
print "<label class='text-right col-lg-2 control-label'>" . T_("Respondent TimeZone") . ":</label>
|
||||
<h4 class='col-lg-2 text-danger text-uppercase fa-lg'>" . $rtz . "</h4>
|
||||
<label class=''>" . T_("Respondent Time") . ": <b class='fa fa-2x '>" . date("H:i:s") . "</b></label>";
|
||||
|
||||
print "<br/><br/><label class='pull-left text-right control-label col-sm-2' for='start'>" . T_("Start time") . "</label>
|
||||
print "<br/><br/><label class='pull-left text-right control-label col-lg-2' for='start'>" . T_("Start time") . "</label>
|
||||
<div class='pull-left'><input class='form-control' type='text' value='$start' id='start' name='start'/></div>";
|
||||
print "<br/><br/><label class='pull-left text-right control-label col-sm-2' for='end'>" . T_("End time") . "</label>
|
||||
print "<br/><br/><label class='pull-left text-right control-label col-lg-2' for='end'>" . T_("End time") . "</label>
|
||||
<div class='pull-left'><input class='form-control' type='text' value='$end' id='end' name='end'/></div>";
|
||||
print "<br/><br/><label class='pull-left text-right control-label col-sm-2' for='require_operator_id'>" . T_("Appointment with") . "</label>";
|
||||
print "<br/><br/><label class='pull-left text-right control-label col-lg-2' for='require_operator_id'>" . T_("Appointment with") . "</label>";
|
||||
$ops = $db->GetAll("SELECT o.operator_id as value,
|
||||
CONCAT(o.firstName, ' ', o.lastName) as description,
|
||||
CASE WHEN o.operator_id = '$require_operator_id' THEN 'selected=\'selected\'' ELSE '' END as selected
|
||||
@@ -225,17 +264,25 @@ if ( (isset($_GET['appointment_id']) && isset($_GET['case_id'])) ||(isset($_GET[
|
||||
}
|
||||
}
|
||||
array_unshift($ops,array('value'=>0,'description'=>T_("Any operator"),'selected'=>$selected));
|
||||
display_chooser($ops,"require_operator_id","require_operator_id",false,false,false,true,false,true,"pull-left");
|
||||
print "<input type='hidden' value='$appointment_id' id='appointment_id' name='appointment_id'/><input type='hidden' value='update' id='update' name='update'/>";
|
||||
|
||||
if ($_GET['new'] == 'new') { print "<input type='hidden' value='create' id='new' name='new'/><input type='hidden' value='$case_id' id='case_id' name='case_id'/>";}
|
||||
display_chooser($ops,"require_operator_id","require_operator_id",false,false,false,true,false,true,"pull-left");
|
||||
|
||||
print " <input type='hidden' value='$appointment_id' id='appointment_id' name='appointment_id'/>
|
||||
<input type='hidden' value='update' id='update' name='update'/>
|
||||
<input type='hidden' value='$case_id' id='case_id' name='case_id'/>";
|
||||
|
||||
if (isset($_GET['new']) && $_GET['new'] == 'new') {
|
||||
print "<input type='hidden' value='create' id='new' name='new'/>";
|
||||
}
|
||||
|
||||
print "<div class='clearfix'></div><br/><br/>
|
||||
<div class='col-sm-2'><a href='' onclick='history.back();return false;' class='btn btn-default pull-left'><i class='fa fa-ban fa-lg'></i> " . T_("Cancel edit") . "</a></div>";
|
||||
<div class='col-lg-2'><a href='?' class='btn btn-default pull-left'><i class='fa fa-ban fa-lg'></i> " . T_("Cancel edit") . "</a></div>";
|
||||
|
||||
print "<div class='col-sm-2'><button type='submit' class='btn btn-primary btn-block'><i class='fa fa-floppy-o fa-lg'></i> " . T_("Save changes") . "</button></div>";
|
||||
print "<div class='col-lg-2'>
|
||||
<button type='submit' class='btn btn-primary btn-block'><i class='fa fa-floppy-o fa-lg'></i> " . T_("Save changes") . "</button>
|
||||
</div>";
|
||||
|
||||
print "<div class='col-sm-2'><a href='' class='btn btn-default pull-right' toggle='confirmation' data-placement='left' data-href='?delete=delete&appointment_id=$appointment_id&case_id=$case_id' ><i class='fa fa-trash fa-lg text-danger'></i> " . T_("Delete this appointment") . "</a></div>";
|
||||
print "<div class='col-lg-2'><a href='' class='btn btn-default pull-right' toggle='confirmation' data-placement='left' data-href='?delete=delete&appointment_id=$appointment_id&case_id=$case_id' ><i class='fa fa-trash fa-lg text-danger'></i> " . T_("Delete this appointment") . "</a></div>";
|
||||
|
||||
print "</form>";
|
||||
}
|
||||
@@ -243,45 +290,51 @@ if ( (isset($_GET['appointment_id']) && isset($_GET['case_id'])) ||(isset($_GET[
|
||||
else {
|
||||
$operator_id = get_operator_id();
|
||||
$subtitle = T_("Appointments");
|
||||
xhtml_head(T_("Display Appointments"),true,$css,$js_head,false,30); //array("../css/table.css")
|
||||
xhtml_head(T_("Display Appointments"),true,$css,$js_head,false,30);
|
||||
print "<h3>" . T_("All appointments (with times displayed in your time zone)") . "</h3>";
|
||||
|
||||
$sql = "SELECT q.description, CONVERT_TZ(a.start,'UTC',@@session.time_zone) as start, CONVERT_TZ(a.end,'UTC',@@session.time_zone) as end,CONCAT(r.firstName, ' ', r.lastName) as resp, IFNULL(ou.description,'" . TQ_("Not yet called") . "') as outcome, oo.firstName as makerName, ooo.firstName as callerName,
|
||||
$sql = "SELECT q.description, si.description as smpl, CONVERT_TZ(a.start,'UTC',@@session.time_zone) as start, CONVERT_TZ(a.end,'UTC',@@session.time_zone) as end,CONCAT(r.firstName, ' ', r.lastName) as resp, IFNULL(ou.description,'" . TQ_("Not yet called") . "') as outcome, oo.firstName as makerName, ooo.firstName as callerName,
|
||||
CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id,
|
||||
CONCAT(' <a href=\'\'><i class=\'fa fa-trash-o fa-lg text-danger\' toggle=\'confirmation\' data-placement=\'left\' data-href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '&delete=delete\' ></i></a> ') as link,
|
||||
CONCAT(' <a href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\'><i class=\'fa fa-pencil-square-o fa-lg\' ></i></a> ') as edit,IFNULL(ao.firstName,'" . TQ_("Any operator") . "') as witho
|
||||
FROM appointment as a
|
||||
JOIN (`case` as c, respondent as r, questionnaire as q, operator as oo, call_attempt as cc) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id)
|
||||
JOIN (`case` as c, respondent as r, questionnaire as q, operator as oo, call_attempt as cc, `sample` as s, sample_import as si) on (c.sample_id = s.sample_id and a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id and si.sample_import_id = s.import_id)
|
||||
LEFT JOIN (`call` as ca, outcome as ou, operator as ooo) ON (ca.call_id = a.completed_call_id and ou.outcome_id = ca.outcome_id and ca.operator_id = ooo.operator_id)
|
||||
LEFT JOIN operator AS ao ON ao.operator_id = a.require_operator_id
|
||||
WHERE a.end >= CONVERT_TZ(NOW(),'System','UTC') AND c.current_outcome_id !=10
|
||||
ORDER BY a.start ASC";
|
||||
LEFT JOIN (questionnaire_sample_quota as qsq, questionnaire_sample_quota_row as qsqr) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id and s.import_id = qsqr.sample_import_id and c.questionnaire_id = qsqr.questionnaire_id)
|
||||
WHERE q.enabled=1 AND si.enabled=1 AND a.end >= CONVERT_TZ(NOW(),'System','UTC') AND c.current_outcome_id IN (19,20,21,22)
|
||||
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1)
|
||||
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
||||
GROUP BY c.case_id ORDER BY a.start ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
if (!empty($rs)) {
|
||||
translate_array($rs,array("outcome"));
|
||||
xhtml_table($rs,array("description","case_id","start","end","edit","makerName","witho","resp","outcome","callerName","link"),array(T_("Questionnaire"),T_("Case ID"),T_("Start"),T_("End")," <i class='fa fa-pencil-square-o fa-lg' data-toggle='tooltip' title='" . T_("Edit") . "'></i> ",T_("Created by"),T_("Appointment with"),T_("Respondent"),T_("Current outcome"),T_("Operator who called")," <i class='fa fa-trash-o fa-lg' data-toggle='tooltip' title='" . T_("Delete") . "'></i> "),"tclass",false,false,"bs-table");
|
||||
xhtml_table($rs,array("description","smpl","case_id","start","end","edit","makerName","witho","resp","outcome","callerName","link"),array(T_("Questionnaire"),T_("Sample"),T_("Case ID"),T_("Start"),T_("End")," <i class='fa fa-pencil-square-o fa-lg' data-toggle='tooltip' title='" . T_("Edit") . "'></i> ",T_("Created by"),T_("Appointment with"),T_("Respondent"),T_("Current outcome"),T_("Operator who called")," <i class='fa fa-trash-o fa-lg' data-toggle='tooltip' title='" . T_("Delete") . "'></i> "),"tclass",false,false,"bs-table");
|
||||
|
||||
} else print "<h4 class='well text-info'>" . T_("No future appointments") . "</h4>";
|
||||
|
||||
print "<h3 style='color:red'>" . T_("Missed appointments (with times displayed in your time zone)") . "</h3>";
|
||||
|
||||
$sql = "SELECT q.description, CONVERT_TZ(a.start,'UTC',@@session.time_zone) as start, CONVERT_TZ(a.end,'UTC',@@session.time_zone) as end, CONCAT(r.firstName, ' ', r.lastName) as resp,
|
||||
$sql = "SELECT q.description, si.description as smpl, CONVERT_TZ(a.start,'UTC',@@session.time_zone) as start, CONVERT_TZ(a.end,'UTC',@@session.time_zone) as end, CONCAT(r.firstName, ' ', r.lastName) as resp,
|
||||
CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id,
|
||||
CONCAT(' <a href=\'\'><i class=\'fa fa-trash-o fa-lg text-danger\' toggle=\'confirmation\' data-placement=\'left\' data-href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '&delete=delete\' ></i></a> ') as link,
|
||||
CONCAT(' <a href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\'><i class=\'fa fa-pencil-square-o fa-lg\' ></i></a> ') as edit
|
||||
FROM appointment as a
|
||||
JOIN (`case` as c, respondent as r, questionnaire as q, `sample` as s, sample_import as si) on (a.case_id = c.case_id and a.respondent_id = r.respondent_id and q.questionnaire_id = c.questionnaire_id and s.sample_id = c.sample_id and s.import_id= si.sample_import_id)
|
||||
LEFT JOIN (`call` as ca) ON (ca.call_id = a.completed_call_id)
|
||||
WHERE q.enabled=1 AND si.enabled = 1 AND a.end < CONVERT_TZ(NOW(),'System','UTC') AND a.completed_call_id IS NULL AND c.current_outcome_id !=10
|
||||
LEFT JOIN (questionnaire_sample_quota as qsq, questionnaire_sample_quota_row as qsqr) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id and s.import_id = qsqr.sample_import_id and c.questionnaire_id = qsqr.questionnaire_id)
|
||||
WHERE q.enabled=1 AND si.enabled=1 AND a.end < CONVERT_TZ(NOW(),'System','UTC') AND a.completed_call_id IS NULL AND c.current_outcome_id IN (19,20,21,22)
|
||||
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 )
|
||||
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
||||
GROUP BY c.case_id
|
||||
ORDER BY a.start ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
if (!empty($rs)) {
|
||||
xhtml_table($rs,array("description","case_id","start","end","edit","resp","link"),array(T_("Questionnaire"),T_("Case ID"),T_("Start"),T_("End")," <i class='fa fa-pencil-square-o fa-lg' data-toggle='tooltip' title='" . T_("Edit") . "'></i> ",T_("Respondent")," <i class='fa fa-trash-o fa-lg' data-toggle='tooltip' title='" . T_("Delete") . "'></i> "),"tclass",false,false,"bs-table");
|
||||
xhtml_table($rs,array("description","smpl","case_id","start","end","edit","resp","link"),array(T_("Questionnaire"),T_("Sample"),T_("Case ID"),T_("Start"),T_("End")," <i class='fa fa-pencil-square-o fa-lg' data-toggle='tooltip' title='" . T_("Edit") . "'></i> ",T_("Respondent")," <i class='fa fa-trash-o fa-lg' data-toggle='tooltip' title='" . T_("Delete") . "'></i> "),"tclass",false,false,"bs-table");
|
||||
|
||||
} else print "<h4 class='well text-info'>" . T_("No appointments missed") . "</h4>";
|
||||
} else print "<h4 class='well text-info'>" . T_("No missed appointments") . "</h4>";
|
||||
|
||||
}
|
||||
xhtml_foot($js_foot);
|
||||
|
||||
@@ -41,7 +41,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -185,41 +185,43 @@ if (isset($_GET['edit']) || isset($_GET['addext']))
|
||||
WHERE extension_id = " . intval($_GET['edit']);
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
} else $rs = array();
|
||||
|
||||
print "<a href='?' class='btn btn-default pull-left'>" . T_("Go back") . "</a>";
|
||||
}
|
||||
|
||||
?>
|
||||
<div class="panel-body ">
|
||||
<h3 class="col-sm-offset-3"><?php if (isset($_GET['edit']))echo T_("Edit extension"); else echo T_("Add an extension");?></h3>
|
||||
<h3 class="col-lg-offset-3"><?php if (isset($_GET['edit']))echo T_("Edit extension"); else echo T_("Add an extension");?></h3>
|
||||
<form enctype="multipart/form-data" action="?" method="post" name="editext" class="form-horizontal">
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3"><?php echo T_("Extension name: ");?></label>
|
||||
<input name="extension" type="text" placeholder="<?php echo T_("such as SIP/1000");?>" maxlength="12" required value="<?php echo $rs['extension'];?>" class="form-control"/>
|
||||
<label class="control-label col-lg-3"><?php echo T_("Extension name: ");?></label>
|
||||
<input name="extension" type="text" placeholder="<?php echo T_("such as SIP/1000");?>" maxlength="12" required value="<?php if (isset($_GET['edit']))echo $rs['extension'];?>" class="form-control"/>
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<label class="control-label col-sm-3"><?php echo T_("Extension password: ");?></label>
|
||||
<input name="password" type="text" required pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" style="width:20em;" maxlength="50" value="<?php echo $rs['password'];?>" class="form-control pull-left" placeholder="<?php echo T_("Enter New Password");?>"/>  <?php echo T_(" or ");?> 
|
||||
<label class="control-label col-lg-3"><?php echo T_("Extension password: ");?></label>
|
||||
<input name="password" type="text" required pattern="(?=.*\d)(?=.*[a-z])(?=.*[A-Z]).{8,}" style="width:20em;" maxlength="50" value="<?php if (isset($_GET['edit'])) echo $rs['password'];?>" class="form-control pull-left" placeholder="<?php echo T_("Enter New Password");?>"/>  <?php echo T_(" or ");?> 
|
||||
<input type="button" onclick="generate();" value="<?php echo T_("Generate");?>" class="btn btn-default fa" /> <?php echo T_("New password");?> 
|
||||
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" /> <?php echo T_("characters long");?>
|
||||
</div>
|
||||
|
||||
<div class=" col-sm-offset-3 ">
|
||||
<input type="submit" class="btn btn-primary " value="<?php if (isset($_GET['edit'])) echo T_("Save changes"); else echo T_("Add extension"); ?>" />
|
||||
</div>
|
||||
<div class="form-group form-inline">
|
||||
<div class='col-lg-3'>
|
||||
<a href='?' class='btn btn-default'><?php echo T_("Cancel") ;?></a>
|
||||
</div>
|
||||
|
||||
<input type="submit" class="btn btn-primary pull-left" value="<?php if (isset($_GET['edit'])) echo T_("Save changes"); else echo T_("Add extension"); ?>" />
|
||||
|
||||
<?php if (isset($_GET['edit'])){?>
|
||||
|
||||
<input name="extensionid" type="hidden" value="<?php echo intval($_GET['edit']);?>"/>
|
||||
|
||||
<?php if (empty($rs['current_operator_id'])) { ?>
|
||||
|
||||
<input type="submit" name="delete" class="btn btn-danger " data-toggle="confirmation" value="<?php echo T_("Delete extension"); ?>" />
|
||||
|
||||
<input type="submit" name="delete" class="btn btn-danger col-lg-offset-2 pull-left" data-toggle="confirmation" value="<?php echo T_("Delete extension"); ?>" />
|
||||
|
||||
<?php } else
|
||||
print "</br></br><b class='well text-danger'>" . T_("Unassign the operator from this extension to be able to delete it") . "</b>";
|
||||
}
|
||||
|
||||
print "</form></div>";
|
||||
print "</div></form></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -241,12 +243,14 @@ else
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
print "<div class='panel-body'>";
|
||||
|
||||
if ($msg != "")
|
||||
print "<p>$msg</p>";
|
||||
print "<p class='alert alert-warning'>$msg</p></br>";
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
$sql = "SELECT o.operator_id as value, o.firstName as description
|
||||
$sql = "SELECT o.operator_id as value, CONCAT(o.firstName,' ',o.lastname) as description
|
||||
FROM `operator` as o
|
||||
LEFT JOIN `extension` as e ON (e.current_operator_id = o.operator_id)
|
||||
WHERE e.extension_id IS NULL";
|
||||
@@ -258,14 +262,15 @@ else
|
||||
if ($rs[$i]['assignment'] == "list")
|
||||
$rs[$i]['assignment'] = display_chooser($ers,"operator_id_" . $rs[$i]["extension_id"],"operator_id_" . $rs[$i]["extension_id"],true,"extension_id=".$rs[$i]["extension_id"],true,false,false,false);
|
||||
}
|
||||
print "<div class='panel-body'>";
|
||||
|
||||
xhtml_table($rs,array("extension","firstName","assignment","status","case_id","state","calltime"),array(T_("Extension"),T_("Operator"),T_("Assignment"),T_("VoIP Status"),T_("Case ID"),T_("Call state"),T_("Time on call")),"tclass",array("vs" => "1"));
|
||||
print "</div>";
|
||||
print "</br>";
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No extensions") . "</p>";
|
||||
print "<p class='alert alert-warning'>" . T_("No extensions") . "</p>";
|
||||
|
||||
print "<div class='col-sm-3'><a href='?addext=addext' class='btn btn-default '>" . T_("Add extension") . "</a></div>";
|
||||
print "<a href='?addext=addext' class='btn btn-primary '>" . T_("Add extension") . "</a>
|
||||
</div>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ include ("../config.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -41,7 +41,7 @@ include ("../config.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/*
|
||||
* XHTML file
|
||||
@@ -84,12 +84,22 @@ include ("../functions/functions.operator.php");
|
||||
</div >
|
||||
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class="dropdown pull-right user-data">
|
||||
<li class=" ">
|
||||
<a href="../index.php" class=" " target="_blanc" style="padding-top: 20px; ">
|
||||
<i class="fa fa-sign-in fa-lg fa-fw "></i><?php print T_("Operator panel");?>
|
||||
</a>
|
||||
</li>
|
||||
<li class=" ">
|
||||
<a href="../client/index.php" class=" " target="_blanc" style="padding-top: 20px; ">
|
||||
<i class="fa fa-user-secret fa-lg fa-fw "></i><?php print T_("Client panel");?>
|
||||
</a>
|
||||
</li>
|
||||
<li class="dropdown pull-right user-data">
|
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown" style=" min-width: 160px;">
|
||||
<i class="fa fa-user fa fa-fw "></i><?php print T_("Logged as:") . " " . $username ;?>
|
||||
<i class="fa fa-user fa-fw "></i><?php print T_("Logged as:") . " " . $username ;?>
|
||||
</a>
|
||||
<!--- User menu // not connected to pages so not working yet // could be hidden -->
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<ul class="dropdown-menu" role="menu">
|
||||
<li><a href="?g=5&page=operatorlist.php?edit=<?php print get_operator_id(); ?>"><i class="fa fa-cogs fa-fw "></i> <?php print T_("Settings"); ?></a></li>
|
||||
<!--- <li><a href="../screenloc.php"><i class="fa fa-lock fa-fw "></i> <?php print T_("Lock Screen"); ?></a></li> -->
|
||||
<li><a href="../include/limesurvey/admin/admin.php?action=logout"><i class="fa fa-sign-out fa-fw "></i> <?php print T_("Logout"); ?> </a></li>
|
||||
@@ -112,6 +122,7 @@ include ("../functions/functions.operator.php");
|
||||
<li><a href="?g=1&page=<?php echo LIME_URL ;?>admin/admin.php?action=newsurvey"><i class="fa fa-file-text-o lime fa-fw"></i><?php print T_("Create an instrument in Limesurvey") ;?></a></li>
|
||||
<li><a href="?g=1&page=new.php"><i class="fa fa-plus-circle fa-fw"></i><?php print T_("Create a new questionnaire") ;?></a></li>
|
||||
<li><a href="?g=1&page=questionnairelist.php"><i class="fa fa-list fa-fw"></i><?php print T_("Questionnaire management") ;?></a></li>
|
||||
<li><a href="?g=1&page=set_outcomes.php?qid=0"><i class="fa fa-list-ol fa-fw"></i><?php print T_("Set questionnaire outcomes") ;?></a></li>
|
||||
<li><a href="?g=1&page=<?php echo LIME_URL ;?>admin/admin.php"><i class="fa fa-lemon-o lime fa-fw"></i><?php print T_("Administer instruments with Limesurvey") ;?></a></li>
|
||||
<li><a href="?g=1&page=questionnaireprefill.php"><i class="fa fa-thumb-tack fa-fw"></i><?php print T_("Pre-fill questionnaire") ;?></a></li>
|
||||
</ul>
|
||||
@@ -163,7 +174,7 @@ include ("../functions/functions.operator.php");
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-user-secret fa-fw"></i><span><?php print T_("Clients") ;?></span></a>
|
||||
<ul style="<?php if ($g == 7) echo "display:block";?>">
|
||||
<li><a href="?g=7&page=clients.php"><i class="fa fa-lg fa-user-plus fa-fw"></i><?php print T_("Add clients to the system") ;?></a></li>
|
||||
<li><a href="?g=7&page=clientquestionnaire.php"><i class="fa fa-link fa-fw"></i><?php print T_("Assign clients to questionnaires") ;?></a></li>
|
||||
<li><a href="?g=7&page=clientquestionnaire.php"><i class="fa fa-link fa-fw"></i><?php print T_("Manage clients") ;?></a></li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-briefcase"></i><span><?php print T_("Supervisor functions") ;?></span></a>
|
||||
@@ -175,8 +186,9 @@ include ("../functions/functions.operator.php");
|
||||
</li>
|
||||
<li class="has_sub"><a href="" class=""><i class="fa fa-lg fa-gear"></i><span><?php print T_("System settings") ;?></span></a>
|
||||
<ul style="<?php if ($g == 9) echo "display:block";?>">
|
||||
<li><a href="?g=9&page=set_outcomes.php?default"><i class="fa fa-list-ol fa-fw"></i><?php print T_("Set default outcomes") ;?></a></li>
|
||||
<li><a href="?g=9&page=timezonetemplate.php"><i class="fa fa-globe fa-fw"></i><?php print T_("Set default timezone list") ;?></a></li>
|
||||
<li><a href="?g=9&page=availabilitygroup.php"><i class="fa fa-clock-o fa-fw"></i><?php print T_("Manage Time slots") ;?></a></li>
|
||||
<li><a href="?g=9&page=availabilitygroup.php"><i class="fa fa-clock-o fa-fw"></i><?php print T_("Manage Time slots") ;?></a></li>
|
||||
<li><a href="?g=9&page=shifttemplate.php"><i class="fa fa-calendar fa-fw"></i><?php print T_("Set default shift times") ;?></a></li>
|
||||
<li><a href="?g=9&page=callrestrict.php"><i class="fa fa-clock-o fa-fw"></i><?php print T_("Set call restriction times") ;?></a></li>
|
||||
<li><a href="?g=9&page=centreinfo.php"><i class="fa fa-university fa-fw"></i><?php print T_("Set centre information") ;?></a></li>
|
||||
|
||||
@@ -14,7 +14,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -42,7 +42,7 @@ $js_foot = array(
|
||||
"../js/new.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
global $db;
|
||||
global $db; $cl=""; $name=""; $message="";
|
||||
|
||||
xhtml_head(T_("Create a new questionnaire"),true,$css,$js_head);
|
||||
|
||||
@@ -81,8 +81,24 @@ if (isset($_POST['import_file']))
|
||||
$lime_rs_sid = bigintval($_POST['selectrs']);
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO questionnaire (questionnaire_id,description,lime_sid,restrict_appointments_shifts,restrict_work_shifts,respondent_selection,rs_intro,rs_project_intro,rs_project_end,rs_callback,rs_answeringmachine,testing,lime_rs_sid,info,self_complete,referral)
|
||||
VALUES (NULL,$name,'$lime_sid','$ras','$rws','$rs',$rs_intro,$rs_project_intro,$rs_project_end,$rs_callback,$rs_answeringmachine,'$testing',$lime_rs_sid,$info,$respsc,$referral)";
|
||||
//** get default coma-separated outcomes list and use it for new questionnaire as initial set
|
||||
$sql = "SELECT o.outcome_id
|
||||
FROM `outcome` as o
|
||||
WHERE o.default = 1;";
|
||||
$def = $db->GetAll($sql);
|
||||
|
||||
for ($i=0; $i < count($def); $i++){
|
||||
foreach($def[$i] as $key => $val){
|
||||
$do[] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
$do = implode($do,",");
|
||||
|
||||
//** - end
|
||||
|
||||
$sql = "INSERT INTO questionnaire (questionnaire_id,description,lime_sid,restrict_appointments_shifts,restrict_work_shifts,respondent_selection,rs_intro,rs_project_intro,rs_project_end,rs_callback,rs_answeringmachine,testing,lime_rs_sid,info,self_complete,referral,outcomes)
|
||||
VALUES (NULL,$name,'$lime_sid','$ras','$rws','$rs',$rs_intro,$rs_project_intro,$rs_project_end,$rs_callback,$rs_answeringmachine,'$testing',$lime_rs_sid,$info,$respsc,$referral,'$do')";
|
||||
|
||||
$rs = $db->Execute($sql);
|
||||
|
||||
@@ -101,12 +117,12 @@ if (isset($_POST['import_file']))
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
$cl = info;
|
||||
$cl = "info";
|
||||
$message = T_("Successfully inserted") . " " . T_("with ID") . "  $qid, </h4><h4>" . T_("linked to survey") . "  $lime_sid ";
|
||||
|
||||
}
|
||||
else{
|
||||
$cl = danger;
|
||||
$cl = "danger";
|
||||
$message = T_("Error: Failed to insert questionnaire");
|
||||
}
|
||||
|
||||
@@ -252,7 +268,19 @@ if (!empty($surveys)){?>
|
||||
if ($handle = opendir(dirname(__FILE__)."/../include/limesurvey/templates")) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if ($entry != "." && $entry != ".." && is_dir(dirname(__FILE__)."/../include/limesurvey/templates/" . $entry)){
|
||||
echo "<option value=\"$entry\">$entry</option>";
|
||||
$default = "";
|
||||
if ($entry == 'skeletonquest') $default = "selected=\"selected\"";
|
||||
echo "<option value=\"$entry\" $default>$entry</option>";
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
if ($handle = opendir(dirname(__FILE__)."/../include/limesurvey/upload/templates")) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if ($entry != "." && $entry != ".." && is_dir(dirname(__FILE__)."/../include/limesurvey/upload/templates/" . $entry)){
|
||||
$default = "";
|
||||
if ($entry == 'skeletonquest') $default = "selected=\"selected\"";
|
||||
echo "<option value=\"$entry\" $default>$entry</option>";
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
|
||||
@@ -42,7 +42,7 @@ include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -195,7 +195,7 @@ function generate() {
|
||||
}
|
||||
</script>
|
||||
|
||||
<div class="form-group clearfix"><div class="col-sm-3"><a href='?' class="btn btn-default"><?php echo T_("Go back") ;?></a></div><div class="col-sm-6">
|
||||
<div class="form-group clearfix"><div class="col-lg-3"><a href='?' class="btn btn-default"><?php echo T_("Go back") ;?></a></div><div class="col-lg-6">
|
||||
<?php
|
||||
print "<h3>" . T_("Operator") . ": " . $rs['username'] . "</h3>";
|
||||
echo "</div></div>";
|
||||
@@ -213,78 +213,92 @@ function generate() {
|
||||
?>
|
||||
<form action="?" method="post" class="form-horizontal panel-body" name="operform">
|
||||
<div class="form-group">
|
||||
<label for="username" class="col-sm-3 control-label"><?php echo T_("Username") . ": "; ?></label>
|
||||
<div class="col-sm-3"><input type='text' name='username' class="form-control" value="<?php echo $rs['username'];?>"/></div>
|
||||
<label for="username" class="col-lg-3 control-label"><?php echo T_("Username") . ": "; ?></label>
|
||||
<div class="col-lg-3"><input type='text' name='username' class="form-control" value="<?php echo $rs['username'];?>"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="password" class="col-sm-3 control-label"><?php echo T_("Password") . ": "; ?></label>
|
||||
<div class="col-sm-3"><input type='text' name='password' class="form-control" placeholder="<?php echo T_("leave blank to keep existing password");?>"/></div>
|
||||
<div class="col-sm-6 form-inline"> 
|
||||
<label for="password" class="col-lg-3 control-label"><?php echo T_("Password") . ": "; ?></label>
|
||||
<div class="col-lg-3"><input type='text' name='password' class="form-control" placeholder="<?php echo T_("leave blank to keep existing password");?>"/></div>
|
||||
<div class="col-lg-6 form-inline"> 
|
||||
<input type="button" onclick="generate();" value="<?php echo T_("Generate");?>" class="btn btn-default"/> <?php echo T_("Password with");?> 
|
||||
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" /> <?php echo T_("characters");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="firstName" class="col-sm-3 control-label"><?php echo T_("First name") . ": "; ?></label>
|
||||
<div class="col-sm-3"><input type='text' name='firstName' class="form-control" value="<?php echo $rs['firstName'];?>"/></div>
|
||||
<label for="firstName" class="col-lg-3 control-label"><?php echo T_("First name") . ": "; ?></label>
|
||||
<div class="col-lg-3"><input type='text' name='firstName' class="form-control" value="<?php echo $rs['firstName'];?>"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="lastName" class="col-sm-3 control-label"><?php echo T_("Last name") . ": "; ?></label>
|
||||
<div class="col-sm-3"><input type='text' name='lastName' class="form-control" value="<?php echo $rs['lastName'];?>"/></div>
|
||||
<label for="lastName" class="col-lg-3 control-label"><?php echo T_("Last name") . ": "; ?></label>
|
||||
<div class="col-lg-3"><input type='text' name='lastName' class="form-control" value="<?php echo $rs['lastName'];?>"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="email" class="col-sm-3 control-label"><?php echo T_("Email") . ": "; ?></label>
|
||||
<div class="col-sm-3"><input type='text' name='email' class="form-control" value="<?php echo $rs['email'];?>"/></div>
|
||||
<label for="email" class="col-lg-3 control-label"><?php echo T_("Email") . ": "; ?></label>
|
||||
<div class="col-lg-3"><input type='text' name='email' class="form-control" value="<?php echo $rs['email'];?>"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="timezone" class="col-sm-3 control-label"><?php echo T_("Timezone") . ": ";?></label>
|
||||
<div class="col-sm-3"><?php display_chooser($tz,"timezone","timezone",false,false,false,true,array("value",$rs['Time_zone_name']),true,"form-inline"); ?></div>
|
||||
<div class="col-sm-6 form-inline">
|
||||
<label for="timezone" class="col-lg-3 control-label"><?php echo T_("Timezone") . ": ";?></label>
|
||||
<div class="col-lg-3"><?php display_chooser($tz,"timezone","timezone",false,false,false,true,array("value",$rs['Time_zone_name']),true,"form-inline"); ?></div>
|
||||
<div class="col-lg-6 form-inline">
|
||||
<?php echo T_("Edit") . " ";?>
|
||||
<a href='timezonetemplate.php' class="btn btn-default"><?php echo T_("TimeZones list");?></a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="extension_id" class="col-sm-3 control-label"><?php echo T_("Extension") . ": "; ?></label>
|
||||
<div class="col-sm-3"><?php echo display_chooser($ers,"extension_id","extension_id",true,false,false,true,false,true,"form-inline"); ?> </div>
|
||||
<div class="col-sm-6 form-inline">
|
||||
<?php echo T_("Edit") . " ";?>
|
||||
<a href='extensionstatus.php' class="btn btn-default"><?php echo T_("Extensions");?></a>
|
||||
|
||||
<?php if (FREEPBX_PATH != false) { ?>
|
||||
<div class="form-group">
|
||||
<label for="voip" class="col-lg-3 control-label"><?php echo T_("Uses VoIP") . "? ";?></label>
|
||||
<div class="col-lg-3"><input name="voip" type="checkbox" onchange="if(this.checked==true){show(this,'usesvoip');} else{ hide(this,'usesvoip');}" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php if ($rs['voip'] == 1) echo "checked=\"checked\"";?> value="1" /></div>
|
||||
</div>
|
||||
<div id="usesvoip" style="display:none" >
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Extension") . ": ";?></label>
|
||||
|
||||
<?php if (!empty($ers) ){ ?>
|
||||
<div class="col-lg-3"><?php display_chooser($ers,"extension_id","extension_id",true,false,false,true,false,true,"form-inline");?></div>
|
||||
<div class="col-lg-6 form-inline"> <?php echo T_("Edit") . " "; }
|
||||
else{ ?> <div class="col-lg-6 form-inline"> <?php echo T_("Add") . " "; }?>
|
||||
<a href='extensionstatus.php' class="btn btn-default fa"><?php echo T_("Extensions");?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="voip" class="col-sm-3 control-label"><?php echo T_("Uses VoIP") . "? ";?></label>
|
||||
<div class="col-sm-3"><input type="checkbox" name="voip" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php if ($rs['voip'] == 1) echo "checked=\"checked\"";?> value="1" /></div>
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Uses chat") . "? ";?></label>
|
||||
<div class="col-lg-3"><input name="chat_enable" type="checkbox" onchange="if(this.checked==true){show(this,'jabdata');} else{ hide(this,'jabdata');}" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php if ($rs['chat_enable'] == 1) echo "checked=\"checked\"";?> value="1"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="chat_user" class="col-sm-3 control-label"><?php echo T_("Jabber/XMPP chat user") . ": "; ?></label>
|
||||
<div class="col-sm-3"><input type='text' name='chat_user' class="form-control" value="<?php echo $rs['chat_user'];?>"/></div>
|
||||
|
||||
<div id="jabdata" style="display:none" >
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Jabber/XMPP chat user") . ": ";?></label>
|
||||
<div class="col-lg-3"><input name="chat_user" type="text" class="form-control" value="<?php echo $rs['chat_user'];?>"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Jabber/XMPP chat password") . ": ";?></label>
|
||||
<div class="col-lg-3"><input name="chat_password" type="text" class="form-control" value="<?php echo $rs['chat_password'];?>"/></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chat_password" class="col-sm-3 control-label"><?php echo T_("Jabber/XMPP chat password") . ": "; ?></label>
|
||||
<div class="col-sm-3"><input type='text' name='chat_password' class="form-control" value="<?php echo $rs['chat_password'];?>"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="admin" class="col-sm-3 control-label"><?php echo T_("Is the operator a system administrator?");?></label>
|
||||
<div class="col-sm-3"><input name="admin" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-offstyle="primary" data-onstyle="danger" <?php if ($rs['superadmin'] || ($rs['parent_id'] == 0)) echo " checked=\"checked\" "; if ($rs['parent_id'] == 0) echo " disabled=\"disabled\" "; ?> value="1"/></div>
|
||||
<label for="admin" class="col-lg-3 control-label"><?php echo T_("Is the operator a system administrator?");?></label>
|
||||
<div class="col-lg-3"><input name="admin" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-offstyle="primary" data-onstyle="danger" <?php if ($rs['superadmin'] || ($rs['parent_id'] == 0)) echo " checked=\"checked\" "; if ($rs['parent_id'] == 0) echo " disabled=\"disabled\" "; ?> value="1"/></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label for="chat_enable" class="col-sm-3 control-label"><?php echo T_("Uses chat") . "? ";?></label>
|
||||
<div class="col-sm-3"><input type="checkbox" name="chat_enable" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php if ($rs['chat_enable'] == 1) echo "checked=\"checked\"";?> value="1"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="enabled" class="col-sm-3 control-label"><?php echo T_("Enabled") . "? ";?></label>
|
||||
<div class="col-sm-3"><input type="checkbox" name="enabled" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php if ($rs['enabled'] == 1) echo "checked=\"checked\"";?> value="1" /></div>
|
||||
<label for="enabled" class="col-lg-3 control-label"><?php echo T_("Enabled") . "? ";?></label>
|
||||
<div class="col-lg-3"><input type="checkbox" name="enabled" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" <?php if ($rs['enabled'] == 1) echo "checked=\"checked\"";?> value="1" /></div>
|
||||
</div>
|
||||
<div><input type='hidden' name='operator_id' value='<?php echo $operator_id;?>'/></div>
|
||||
<div><input type='hidden' name='existing_username' value="<?php echo $rs['username'];?>"/></div>
|
||||
|
||||
<div class="form-group"><div class="col-sm-3 col-sm-offset-3"><input type="submit" name="submit" class="btn btn-primary btn-block" value="<?php echo T_("Update operator");?>"/></div></div>
|
||||
<div class="form-group"><div class="col-lg-3 col-lg-offset-3"><input type="submit" name="submit" class="btn btn-primary btn-block" value="<?php echo T_("Update operator");?>"/></div></div>
|
||||
</form>
|
||||
|
||||
|
||||
<?php
|
||||
xhtml_foot();
|
||||
xhtml_foot(array("../js/new.js"));
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -402,11 +416,11 @@ if ($display)
|
||||
$titles[] = T_("Win file");//Windows VoIP
|
||||
$titles[] = T_("*nix flle");//*nix VoIP
|
||||
}
|
||||
echo "<div class='col-sm-9'><div class='panel-body'>";
|
||||
echo "<div class='col-lg-9'><div class='panel-body'>";
|
||||
xhtml_table($rs,$columns,$titles);
|
||||
echo "</div></div>";
|
||||
|
||||
echo "<div class='form-group col-sm-3'>
|
||||
echo "<div class='form-group col-lg-3'>
|
||||
<div class='panel-body'><a href='operators.php?add=add' class='btn btn-default btn-block'><i class='fa fa-lg fa-user-plus'></i> " . T_("Add an operator") . "</a></div>
|
||||
<div class='panel-body'><a href='extensionstatus.php' class='btn btn-default btn-block'><i class='fa fa-lg fa-whatsapp'></i> " . T_("Extensions") . "</a></div>
|
||||
<div class='panel-body'><a href='operatorquestionnaire.php' class='btn btn-default btn-block'><i class='fa fa-lg fa-link'></i> " . T_("Assign to questionnaire") . "</a></div>
|
||||
|
||||
@@ -41,7 +41,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -96,15 +96,11 @@ if (isset($_POST['operator']) && isset($_POST['adduser']))
|
||||
$extensionp = "'$extensionnp'";
|
||||
|
||||
}
|
||||
$supervisor = 0;
|
||||
$temporary = 0;
|
||||
|
||||
$admin = 0;
|
||||
$refusal = 0;
|
||||
$voip = 0;
|
||||
$chat = 0;
|
||||
if (isset($_POST['supervisor']) && $_POST['supervisor'] == "on") $supervisor = 1;
|
||||
if (isset($_POST['refusal']) && $_POST['refusal'] == "on") $refusal = 1;
|
||||
if (isset($_POST['temporary']) && $_POST['temporary'] == "on") $temporary = 1;
|
||||
|
||||
if (isset($_POST['admin']) && $_POST['admin'] == "on") $admin = 1;
|
||||
if (isset($_POST['voip']) && $_POST['voip'] == "on") $voip = 1;
|
||||
if (isset($_POST['chat_enable']) && $_POST['chat_enable'] == "on") $chat = 1;
|
||||
@@ -149,26 +145,18 @@ if (isset($_POST['operator']) && isset($_POST['adduser']))
|
||||
|
||||
$a = "<div class='alert alert-info'><h3>" . T_("Added operator :") . " " . $operator . "</h3>";
|
||||
|
||||
if (FREEPBX_PATH !== false)
|
||||
if (FREEPBX_PATH !== false)
|
||||
$a .= "<br/><a href='/voip/admin/'>" . T_("FreePBX needs to be reloaded for the new VoIP extension to take effect") . "</a>";
|
||||
|
||||
print "</div>";
|
||||
$a .= "</div>";
|
||||
|
||||
// set default skills = 1 and 5 for all new operators
|
||||
|
||||
if ($temporary)
|
||||
{
|
||||
$db->Execute(" INSERT INTO operator_skill (operator_id,outcome_type_id)
|
||||
VALUES ('$oid','1')");
|
||||
$db->Execute(" INSERT INTO operator_skill (operator_id,outcome_type_id)
|
||||
VALUES ('$oid','5')"); //and appointment
|
||||
}
|
||||
|
||||
if ($supervisor)
|
||||
$db->Execute(" INSERT INTO operator_skill (operator_id,outcome_type_id)
|
||||
VALUES ('$oid','2')");
|
||||
|
||||
if ($refusal)
|
||||
$db->Execute(" INSERT INTO operator_skill (operator_id,outcome_type_id)
|
||||
VALUES ('$oid','3')");
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -242,84 +230,87 @@ function generate() {
|
||||
|
||||
<form enctype="multipart/form-data" action="" method="post" class="form-horizontal panel-body" name="operform">
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Username") . ": ";?></label>
|
||||
<div class="col-sm-3"><input name="operator" type="text" class="form-control" required /></div>
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Username") . ": ";?></label>
|
||||
<div class="col-lg-3"><input name="operator" type="text" class="form-control" required /></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Password") . ": ";?></label>
|
||||
<div class="col-sm-3"><input name="password" id="password" type="text" class="form-control" required /></div>
|
||||
<div class="col-sm-6 form-inline"> 
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Password") . ": ";?></label>
|
||||
<div class="col-lg-3"><input name="password" id="password" type="text" class="form-control" required /></div>
|
||||
<div class="col-lg-6 form-inline"> 
|
||||
<input type="button" onclick="generate();" value="<?php echo T_("Generate");?>" class="btn btn-default fa" /> <?php echo T_("Password with");?> 
|
||||
<input type="number" name="number" value="25" min="8" max="50" style="width:5em;" class="form-control" /> <?php echo T_("characters");?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("First name") . ": ";?></label>
|
||||
<div class="col-sm-3"><input name="firstname" type="text" class="form-control" required/></div>
|
||||
<label class="col-lg-3 control-label"><?php echo T_("First name") . ": ";?></label>
|
||||
<div class="col-lg-3"><input name="firstname" type="text" class="form-control" required/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Last name") . ": ";?></label>
|
||||
<div class="col-sm-3"><input name="lastname" type="text" class="form-control"/></div>
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Last name") . ": ";?></label>
|
||||
<div class="col-lg-3"><input name="lastname" type="text" class="form-control"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Email") . ": ";?></label>
|
||||
<div class="col-sm-3"><input name="email" type="text" class="form-control"/></div>
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Email") . ": ";?></label>
|
||||
<div class="col-lg-3"><input name="email" type="text" class="form-control"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Timezone") . ": ";?></label>
|
||||
<div class="col-sm-3"><?php display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,true,array("value",get_setting("DEFAULT_TIME_ZONE")),true,"form-inline");?></div>
|
||||
<div class="col-sm-6 form-inline">
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Timezone") . ": ";?></label>
|
||||
<div class="col-lg-3"><?php display_chooser($rs,"Time_zone_name","Time_zone_name",false,false,false,true,array("value",get_setting("DEFAULT_TIME_ZONE")),true,"form-inline");?></div>
|
||||
<div class="col-lg-6 form-inline">
|
||||
<?php echo T_("Edit") . " ";?>
|
||||
<a href='timezonetemplate.php' class="btn btn-default fa"><?php echo T_("TimeZones list");?></a>
|
||||
</div>
|
||||
</div>
|
||||
<?php if (FREEPBX_PATH == false) { ?>
|
||||
<?php if (VOIP_ENABLED != false) { ?>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Extension") . ": ";?></label>
|
||||
<div class="col-sm-3"><?php display_chooser($ers,"extension_id","extension_id",true,false,false,true,false,true,"form-inline");?></div>
|
||||
<div class="col-sm-6 form-inline">
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Uses VoIP") . "? ";?></label>
|
||||
<div class="col-lg-3"><input name="voip" type="checkbox" onchange="if(this.checked==true){show(this,'usesvoip');} else{ hide(this,'usesvoip');}" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" /></div><!-- checked="checked" -->
|
||||
</div>
|
||||
<div id="usesvoip" style="display:none" >
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Extension") . ": ";?></label>
|
||||
<div class="col-lg-3"><?php display_chooser($ers,"extension_id","extension_id",true,false,false,true,false,true,"form-inline");?></div>
|
||||
<div class="col-lg-6 form-inline">
|
||||
<?php echo T_("Edit") . " ";?>
|
||||
<a href='extensionstatus.php' class="btn btn-default fa"><?php echo T_("Extensions");?></a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Uses VoIP") . "? ";?></label>
|
||||
<div class="col-sm-3"><input name="voip" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" checked="checked"/></div>
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Uses chat") . "? ";?></label>
|
||||
<div class="col-lg-3"><input name="chat_enable" type="checkbox" onchange="if(this.checked==true){show(this,'jabdata');} else{ hide(this,'jabdata');}" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" /></div>
|
||||
</div>
|
||||
|
||||
<div id="jabdata" style="display:none" >
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Jabber/XMPP chat user") . ": ";?></label>
|
||||
<div class="col-lg-3"><input name="chat_user" type="text" class="form-control"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Jabber/XMPP chat password") . ": ";?></label>
|
||||
<div class="col-lg-3"><input name="chat_password" type="text" class="form-control"/></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Jabber/XMPP chat user") . ": ";?></label>
|
||||
<div class="col-sm-3"><input name="chat_user" type="text" class="form-control"/></div>
|
||||
<label class="col-lg-3 control-label"><?php echo T_("Is the operator a system administrator?");?></label>
|
||||
<div class="col-lg-3"><input name="admin" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-onstyle="danger"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Jabber/XMPP chat password") . ": ";?></label>
|
||||
<div class="col-sm-3"><input name="chat_password" type="text" class="form-control"/></div>
|
||||
|
||||
<br/>
|
||||
<div class="form-group form-inline">
|
||||
<div class='col-lg-3'>
|
||||
<a href='operatorlist.php' class='btn btn-default col-lg-6'><?php echo T_("Cancel") ;?></a>
|
||||
</div>
|
||||
|
||||
<div class="col-lg-3">
|
||||
<input type="submit" name="adduser" class="btn btn-primary btn-block" value="<?php echo T_("Add an operator"); ?>" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Uses chat") . "? ";?></label>
|
||||
<div class="col-sm-3"><input name="chat_enable" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" /></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Is the operator a system administrator?");?></label>
|
||||
<div class="col-sm-3"><input name="admin" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-offstyle="primary" data-onstyle="danger"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Is the operator a normal interviewer?");?></label>
|
||||
<div class="col-sm-3"><input name="temporary" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-offstyle="danger" checked="checked"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Is the operator a supervisor?");?></label>
|
||||
<div class="col-sm-3"><input name="supervisor" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-onstyle="danger" data-offstyle="primary"/></div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="col-sm-3 control-label"><?php echo T_("Is the operator a refusal converter?");?></label>
|
||||
<div class="col-sm-3"><input name="refusal" type="checkbox" data-toggle="toggle" data-on="<?php echo T_("Yes"); ?>" data-off="<?php echo T_("No"); ?>" data-onstyle="danger" data-offstyle="primary"/></div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"><div class="col-sm-3 col-sm-offset-3"><input type="submit" name="adduser" class="btn btn-primary btn-block" value="<?php echo T_("Add an operator"); ?>" /></div></div>
|
||||
</form>
|
||||
|
||||
<?php
|
||||
xhtml_foot();
|
||||
xhtml_foot(array("../js/new.js"));
|
||||
?>
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php /**
|
||||
<?php
|
||||
/**
|
||||
* Display outcomes by questionnaire
|
||||
*/
|
||||
|
||||
@@ -15,7 +16,7 @@ include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -67,7 +68,7 @@ $js_foot = array(
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
xhtml_head(T_("Questionnaire Outcomes"),true,$css,$js_head);//array("../css/table.css"),array("../js/window.js")
|
||||
xhtml_head(T_("Questionnaire Outcomes"),true,$css,$js_head);
|
||||
|
||||
|
||||
print "<h3 class='col-sm-4 pull-left text-right'>" . T_("Select a questionnaire") . "</h3>";
|
||||
@@ -84,7 +85,7 @@ if ($questionnaire_id != false)
|
||||
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = '$questionnaire_id' and qs.sample_import_id = s.import_id)
|
||||
LEFT JOIN `case` as c ON (c.questionnaire_id = qs.questionnaire_id and c.sample_id = s.sample_id)
|
||||
GROUP BY (c.sample_id is not null)";
|
||||
if ($db->GetAll($sql)) xhtml_table($db->GetAll($sql),array("drawn","count"),array(T_("Status"),T_("Number")), "table-hover table table-condensed", false, array("count"));
|
||||
if ($db->GetAll($sql)) xhtml_table($db->GetAll($sql),array("drawn","count"),array(T_("Status"),T_("Number")), "tclass", false, array("count"));
|
||||
else print "<div class='alert text-danger'>" . T_("No samples assigned") . ". </div>";
|
||||
print "</div>";
|
||||
|
||||
@@ -143,7 +144,7 @@ group by s.import_id";
|
||||
$a = $db->GetAssoc($sql);
|
||||
$a = aapor_clean($a);
|
||||
|
||||
print "<table class='col-sm-10'><thead><tr><th class='col-sm-8'>" . T_("Outcome") . "</th><th>" . T_("Rate") . "</th></tr></thead>"; // table-hover table table-condensed
|
||||
print "<table class='col-sm-10'><thead><tr><th class='col-sm-8'>" . T_("Outcome") . "</th><th>" . T_("Rate") . "</th></tr></thead>";
|
||||
print "<tr><td>" . T_("Response Rate 1") . "</td><td>" . round(aapor_rr1($a),2) . "</td></tr>";
|
||||
print "<tr><td>" . T_("Refusal Rate 1") . "</td><td>" . round(aapor_ref1($a),2) . "</td></tr>";
|
||||
print "<tr><td>" . T_("Cooperation Rate 1") . "</td><td>" . round(aapor_coop1($a),2) . "</td></tr>";
|
||||
@@ -153,7 +154,7 @@ group by s.import_id";
|
||||
$sql = "SELECT count(case_id) FROM `case` WHERE `case`.questionnaire_id = '$questionnaire_id'";
|
||||
$cases = $db->GetOne($sql);
|
||||
|
||||
$sql = "SELECT CONCAT('<a href=\'casesbyoutcome.php?questionnaire_id=$questionnaire_id&outcome_id=', o.outcome_id, '\'>', o.description, '</a>') as des, o.outcome_id, count( c.case_id ) as count, ROUND((count( c.case_id ) / $cases) * 100,2) as perc
|
||||
$sql = "SELECT CONCAT(' <a href=\'casesbyoutcome.php?questionnaire_id=$questionnaire_id&outcome_id=', o.outcome_id, '\'><b>', '=>' ,'</b></a> ')as link, o.description as des, o.outcome_id, count(c.case_id) as count, ROUND((count( c.case_id ) / $cases) * 100,2) as perc
|
||||
FROM `case` AS c, `outcome` AS o
|
||||
WHERE c.questionnaire_id = '$questionnaire_id'
|
||||
AND c.current_outcome_id = o.outcome_id
|
||||
@@ -165,7 +166,7 @@ group by s.import_id";
|
||||
{ print "<div class='col-sm-8'><div class='panel panel-body'>";
|
||||
//print "<h4>" . T_("Total cases for questionnaire") . " = <b>$cases</b></h4>";
|
||||
translate_array($rs,array("des"));
|
||||
xhtml_table($rs,array("des","count","perc"),array(T_("Outcome"),T_("Count")," " . T_("%")),"tclass",false,array("count","perc"));//array("des" => "Complete")
|
||||
xhtml_table($rs,array("outcome_id","des","link","count","perc"),array(T_("ID"),T_("Outcome"),"",T_("Count")," " . T_("%")),"tclass",false,array("count","perc"));//array("des" => "Complete")
|
||||
print "</div></div>";
|
||||
|
||||
$sample_import_id = false;
|
||||
@@ -202,7 +203,7 @@ group by s.import_id";
|
||||
print "<div class='col-sm-8'><div class='panel panel-body'>"; //<p>" . T_("Outcomes") . "</p>";
|
||||
|
||||
|
||||
$sql = "SELECT CONCAT('<a href=\'casesbyoutcome.php?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&outcome_id=', o.outcome_id, '\'>', o.description, '</a>') as des, o.outcome_id, count( c.case_id ) as count,ROUND(count(c.case_id) / (SELECT count(case_id) FROM `case` JOIN sample ON (`case`.sample_id = sample.sample_id AND sample.import_id = '$sample_import_id') WHERE questionnaire_id = '$questionnaire_id' ) * 100,2) as perc
|
||||
$sql = "SELECT CONCAT(' <a href=\'casesbyoutcome.php?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id&outcome_id=', o.outcome_id, '\'><b>', '=>' ,'</b></a> ')as link, o.description as des, o.outcome_id, count( c.case_id ) as count, ROUND(count(c.case_id) / (SELECT count(case_id) FROM `case` JOIN sample ON (`case`.sample_id = sample.sample_id AND sample.import_id = '$sample_import_id') WHERE questionnaire_id = '$questionnaire_id' ) * 100,2) as perc
|
||||
|
||||
FROM `case` AS c, `outcome` AS o, sample as s
|
||||
WHERE c.questionnaire_id = '$questionnaire_id'
|
||||
@@ -216,7 +217,7 @@ group by s.import_id";
|
||||
if (!empty($rs))
|
||||
{
|
||||
translate_array($rs,array("des"));
|
||||
xhtml_table($rs,array("des","count","perc"),array(T_("Outcome"),T_("Count"),T_("%")),"tclass",array("des" => "Complete"),array("count","perc"));
|
||||
xhtml_table($rs,array("outcome_id","des","link","count","perc"),array(T_("ID"),T_("Outcome"),"",T_("Count")," " . T_("%")),"tclass",array("des" => "Complete"),array("count","perc"));
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No outcomes recorded for this sample") . "</p>";
|
||||
|
||||
@@ -39,11 +39,6 @@ include (dirname(__FILE__) . "/../config.inc.php");
|
||||
*/
|
||||
include (dirname(__FILE__) . "/../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Process
|
||||
*/
|
||||
|
||||
@@ -42,7 +42,7 @@ include("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -430,6 +430,16 @@ if (isset($_GET['modify']))
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
if ($handle = opendir(dirname(__FILE__)."/../include/limesurvey/upload/templates")) {
|
||||
while (false !== ($entry = readdir($handle))) {
|
||||
if ($entry != "." && $entry != ".." && is_dir(dirname(__FILE__)."/../include/limesurvey/upload/templates/" . $entry)){
|
||||
echo "<option value=\"$entry\" ";
|
||||
if ($rs['lime_template'] == $entry) echo " selected=\"selected\" ";
|
||||
echo ">$entry</option>";
|
||||
}
|
||||
}
|
||||
closedir($handle);
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
@@ -563,7 +573,7 @@ else
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-calendar fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'addshift.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Shifts") . " \n" . TQ_("questionnaire") . " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-calendar fa-2x\'></i></a>')
|
||||
CONCAT('<a href=\'addshift.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Shifts") . " " . TQ_("questionnaire") . " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-calendar fa-2x\'></i></a>')
|
||||
END as shifts,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-square-o fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
@@ -580,17 +590,23 @@ else
|
||||
ELSE
|
||||
CONCAT('<a href=\'outcomes.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Outcomes for questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-bar-chart fa-2x\'></i></a>')
|
||||
END as outcomes,
|
||||
CONCAT('<a href=\'callhistory.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Call history"). " \n" . TQ_("questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-phone fa-2x\'></i></a>') as calls,
|
||||
CONCAT('<a href=\'callhistory.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Call history"). " " . TQ_("questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-phone fa-2x\'></i></a>') as calls,
|
||||
CONCAT('<a href=\'set_outcomes.php?qid=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Set outcomes"). " \n" . TQ_("questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-list-ol fa-2x\'></i></a>') as setoutcomes,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-download fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'dataoutput.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Data output"). " \n" . TQ_("questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-download fa-2x\'></i></a>')
|
||||
CONCAT('<a href=\'dataoutput.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Data output"). " " . TQ_("questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-download fa-2x\'></i></a>')
|
||||
END as dataout,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-book fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'assignsample.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . TQ_("Assigned samples"). "\' data-toggle=\'tooltip\'><i class=\'fa fa-book fa-2x\'></i></a>')
|
||||
END as assample,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-filter fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
CONCAT('<a href=\'quotareport.php?questionnaire_id=',questionnaire_id,'\' class=\'btn\' title=\'" . T_("Quota report"). " " . TQ_("questionnaire"). " ',questionnaire_id,'\' data-toggle=\'tooltip\'><i class=\'fa fa-filter fa-2x\'></i></a>')
|
||||
END as quotareport,
|
||||
CASE WHEN enabled = 0 THEN
|
||||
CONCAT('<i class=\'btn fa fa-question-circle fa-2x\' style=\'color:lightgrey;\'></i>')
|
||||
ELSE
|
||||
@@ -599,7 +615,7 @@ else
|
||||
FROM questionnaire";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
$columns = array("qid","description","status","enabledisable","outcomes","calls","casestatus","shifts","assample","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 "</div>";
|
||||
|
||||
@@ -43,7 +43,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -101,7 +101,9 @@ if (isset($_GET['questionnaire_id']) && isset($_GET['questionnaire_prefill_id'])
|
||||
$questionnaire_id = false;
|
||||
if (isset($_GET['questionnaire_id'])) $questionnaire_id = bigintval($_GET['questionnaire_id']);
|
||||
|
||||
xhtml_head(T_("Pre fill questionnaire: Set values for questionnaire to prefill"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js"));
|
||||
$subtitle = T_("Set values for questionnaire to prefill");
|
||||
|
||||
xhtml_head(T_("Prefill questionnaire:"),true,array("../include/bootstrap/css/bootstrap.min.css","../css/custom.css"),array("../js/window.js"), false, false, false, $subtitle);
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Select a questionnaire") . ": </h3>";
|
||||
|
||||
$sql = "SELECT questionnaire_id as value,description,
|
||||
@@ -182,14 +184,16 @@ if ($questionnaire_id != false)
|
||||
AND sivr.sample_import_id = qs.sample_import_id";
|
||||
?>
|
||||
<form action="" method="get" class="form-inline form-group">
|
||||
<label for="value"><?php echo T_("The value to pre fill"); ?>: </label><input type="text" name="value" id="value" size="50" class="form-control"/>
|
||||
<label for="svar"> <?php echo T_("or: Select pre fill from sample list"); ?> </label>
|
||||
<p><label for="value"><?php echo T_("The value to pre fill"); ?>: </label><input type="text" name="value" id="value" size="50" class="form-control"/></p>
|
||||
<p><label for="svar"><?php echo T_("or: Select pre fill from sample list"); ?> </label>
|
||||
<?php //display a list of possible sample variables for this questionnaire
|
||||
display_chooser($db->GetAll($sql),"svar","svar",true,false,false,true,false,true,"form-group");
|
||||
display_chooser($db->GetAll($sql),"svar","svar",true,false,false,false,false,true,"form-group");
|
||||
?>
|
||||
</p>
|
||||
<input type="hidden" name="questionnaire_id" value="<?php print($questionnaire_id); ?>"/>
|
||||
<input type="hidden" name="sgqa" value="<?php print($sgqa); ?>"/>
|
||||
<input type="submit" name="add_prefill" class="btn btn-primary fa" value="<?php print(T_("Add pre fill")); ?>"/>
|
||||
</br>
|
||||
<p><input type="submit" name="add_prefill" class="btn btn-primary fa" value="<?php print(T_("Add pre fill")); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -129,7 +129,8 @@ if ($questionnaire_id != false)
|
||||
$sql = "SELECT s.sample_import_id as value,s.description, CASE WHEN s.sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM sample_import as s, questionnaire_sample as q
|
||||
WHERE q.questionnaire_id = $questionnaire_id
|
||||
AND q.sample_import_id = s.sample_import_id";
|
||||
AND q.sample_import_id = s.sample_import_id
|
||||
AND s.enabled = 1";
|
||||
$s = $db->GetAll($sql);
|
||||
if (!empty($s)){
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -238,25 +238,36 @@ if ($questionnaire_id)
|
||||
{
|
||||
//limesurvey quotas for this question
|
||||
$quotas = (get_limesurvey_quota_info($r['id']));
|
||||
$sqlq = array();
|
||||
$cob = array();
|
||||
|
||||
foreach ($quotas as $q)
|
||||
$sqlq[] = "s." . $q['fieldname'] . " = '" . $q['value'] . "'";
|
||||
foreach ($quotas as $qr)
|
||||
{
|
||||
$sqlq = array();
|
||||
foreach($qr as $qid => $q)
|
||||
{
|
||||
$sqlq[] = "s." . $q['fieldname'] . " = '" . $q['value'] . "'";
|
||||
}
|
||||
$cob[] = "( " . implode(' OR ', $sqlq) . " )";
|
||||
}
|
||||
|
||||
if (!empty($cob))
|
||||
{
|
||||
|
||||
$sql = "SELECT COUNT(id) as count
|
||||
FROM ".LIME_PREFIX."survey_{$r['sid']} as s
|
||||
JOIN `case` as c ON (c.questionnaire_id = '$questionnaire_id')
|
||||
JOIN `sample` as sam ON (c.sample_id = sam.sample_id AND sam.import_id = '$sample_import_id')
|
||||
WHERE ".implode(' AND ',$sqlq)." "."
|
||||
AND submitdate IS NOT NULL
|
||||
AND s.token = c.token";
|
||||
$sql = "SELECT COUNT(id) as count
|
||||
FROM ".LIME_PREFIX."survey_{$r['sid']} as s
|
||||
JOIN `case` as c ON (c.questionnaire_id = '$questionnaire_id')
|
||||
JOIN `sample` as sam ON (c.sample_id = sam.sample_id AND sam.import_id = '$sample_import_id')
|
||||
WHERE ".implode(' AND ',$cob)." "."
|
||||
AND submitdate IS NOT NULL
|
||||
AND s.token = c.token";
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
$completions = $rs['count'];
|
||||
$perc = ROUND(($completions / $r['qlimit']) * 100,2);
|
||||
|
||||
$report[] = array("strata" => "<a href='" . LIME_URL . "/admin/admin.php?action=quotas&sid={$r['sid']}"a_id={$r['id']}&subaction=quota_editquota'>" . $r['name'] . "</a>", "quota" => $r['qlimit'], "completions" => $completions, "perc" => $perc);
|
||||
$completions = $rs['count'];
|
||||
$perc = ROUND(($completions / $r['qlimit']) * 100,2);
|
||||
|
||||
$report[] = array("strata" => "<a href='" . LIME_URL . "/admin/admin.php?action=quotas&sid={$r['sid']}"a_id={$r['id']}&subaction=quota_editquota'>" . $r['name'] . "</a>", "quota" => $r['qlimit'], "completions" => $completions, "perc" => $perc);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -284,7 +295,7 @@ if ($questionnaire_id)
|
||||
|
||||
$sql = "SELECT count(*) as count
|
||||
FROM `case` as c, sample as s
|
||||
WHERE c.current_outcome_id = 10
|
||||
WHERE c.current_outcome_id IN (10,40)
|
||||
AND s.import_id = '$sample_import_id'
|
||||
AND s.sample_id = c.sample_id
|
||||
AND c.questionnaire_id = '$questionnaire_id'";
|
||||
|
||||
@@ -44,7 +44,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -305,10 +305,11 @@ if ($questionnaire_id != false)
|
||||
$sql = "SELECT s.sample_import_id as value,s.description, CASE WHEN s.sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM sample_import as s, questionnaire_sample as q
|
||||
WHERE q.questionnaire_id = $questionnaire_id
|
||||
AND q.sample_import_id = s.sample_import_id";
|
||||
AND q.sample_import_id = s.sample_import_id
|
||||
AND s.enabled = 1";
|
||||
$s = $db->GetAll($sql);
|
||||
if (!empty($s)){
|
||||
print "<h3 class='form-inline pull-left'>   " . T_("Sample") . ": </h3>";
|
||||
print "<h3 class='form-inline pull-left'> " . T_("Sample") . ": </h3>";
|
||||
|
||||
display_chooser($s,"sample","sample_import_id",true,"questionnaire_id=$questionnaire_id",true,true,false,true,"pull-left");
|
||||
} else {
|
||||
@@ -317,9 +318,6 @@ if ($questionnaire_id != false)
|
||||
|
||||
print "<div class='col-sm-2 pull-right'><a href='quotareport.php?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' class='btn btn-info btn-block'><i class='fa fa-filter fa-lg'></i> " . T_("To quota report") . "</a></div>";
|
||||
|
||||
print "<div class='clearfix'></div>";
|
||||
|
||||
|
||||
if ($sample_import_id != false)
|
||||
{
|
||||
if (isset($_POST['import_quota']))
|
||||
@@ -387,8 +385,9 @@ if ($questionnaire_id != false)
|
||||
|
||||
if ($qsqri != false)
|
||||
{
|
||||
print "<h2 class='col-sm-2'><a href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' class='btn btn-default'><i class='fa fa-arrow-up fa-lg text-primary'></i> " . T_("To Row quotas") . "</a></h2>";
|
||||
print "<h2>" . T_("Quota") . ": $qsqrid</h2>";
|
||||
print "<div class='col-lg-2 pull-right'><a href='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' class='btn btn-default'><i class='fa fa-arrow-up fa-lg text-primary'></i> " . T_("To Row quotas") . "</a></div>";
|
||||
print "<div class='clearfix form-group'></div>";
|
||||
print "<h2 class='col-lg-offset-4'>" . T_("Quota") . ": $qsqrid</h2>";
|
||||
|
||||
?>
|
||||
<div class='panel-body' >
|
||||
@@ -578,7 +577,7 @@ if ($questionnaire_id != false)
|
||||
|
||||
if (empty($r))
|
||||
{
|
||||
print "<p class='well text-info'>" . T_("Currently no row quotas") . "</p>";
|
||||
print "<p class='well text-info col-lg-12'>" . T_("Currently no row quotas") . "</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -121,8 +121,6 @@ function sample_call_attempt_report($questionnaire_id = false, $sample_id = fals
|
||||
|
||||
$outcomes = $db->GetAssoc($sql);
|
||||
|
||||
translate_array($outcomes,array("description"));
|
||||
|
||||
$rep = array("callattempts","sample");
|
||||
$rept = array(T_("Call attempts made"),T_("Number of cases"));
|
||||
$totals = array("sample");
|
||||
@@ -132,7 +130,7 @@ function sample_call_attempt_report($questionnaire_id = false, $sample_id = fals
|
||||
foreach($outcomes as $key => $val)
|
||||
{
|
||||
$rep[] = $key;
|
||||
$rept[] = $val;
|
||||
$rept[] = T_($val);
|
||||
$outcomesfilled[$key] = 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -298,16 +298,14 @@ if (isset($_GET['edit']) )
|
||||
$sql = "SELECT type, description
|
||||
FROM sample_var_type";
|
||||
$rd = $db->GetAll($sql);
|
||||
$selected = "selected=\"selected\"";
|
||||
|
||||
$sql = "SELECT sir.var_id,
|
||||
CONCAT('<input type=\"text\" onInput=\"$(this).attr(\'name\',\'var[',sir.var_id,']\');\" value=\"' ,sir.var, '\" required class=\"form-control\" style=\"min-width: 300px;\" $dis />') as var,
|
||||
CONCAT ('<select name=\"type[',sir.var_id,']\" class=\"form-control\" $dis >
|
||||
<option value=\"' ,svt.type, '\" $selected>' ,svt.description, '</option>";
|
||||
|
||||
CONCAT ('<select name=\"type[',sir.var_id,']\" class=\"form-control\" $dis >";
|
||||
foreach($rd as $r)
|
||||
{
|
||||
$sql .= "<option value=\"{$r['type']}\">" . T_($r['description']) . "</option>";
|
||||
}
|
||||
{
|
||||
$sql .= "<option value=\"{$r['type']}\"', CASE WHEN ( svt.type = {$r['type']}) THEN 'selected=\"selected\"' ELSE '' END , ' >" . T_($r['description']) . "</option>";
|
||||
}
|
||||
$sql .= "</select>') as type, sv.val,
|
||||
CONCAT('<input type=\'checkbox\' ', CASE WHEN (sir.restrict IS NULL || sir.restrict = 0) THEN 'checked=\"checked\"' ELSE '' END ,' name=\"see[]\" value=\'',sir.var_id,'\' data-toggle=\"toggle\" data-size=\"small\" data-style=\"center-block\" data-on=" . TQ_("Yes") . " data-off=" . TQ_("No") . " data-width=\"70\"/>') as see,
|
||||
CONCAT('<input type=\'checkbox\' name=\"del[',sir.var_id,']\" value=\'',sir.var_id,'\' $dis data-toggle=\"toggle\" data-size=\"small\" data-style=\"center-block\" data-on=" . TQ_("Yes") . " data-off=" . TQ_("No") . " data-width=\"70\" data-onstyle=\'danger \'/>') as del,
|
||||
|
||||
@@ -44,7 +44,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -107,12 +107,12 @@ xhtml_head(T_("Search the sample"),true,$css,$js_head);
|
||||
echo "<a href='' onclick='history.back();return false;' class='btn btn-default pull-left' ><i class='fa fa-chevron-left text-primary'></i> " . T_("Go back") . "</a>";
|
||||
|
||||
$sql = "SELECT sample_import_id as value,description, CASE WHEN sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM sample_import";
|
||||
FROM sample_import ORDER BY description ASC";
|
||||
$r = $db->GetAll($sql);
|
||||
|
||||
if(!empty($r))
|
||||
|
||||
print "<div class=' form-inline form-group col-md-6'><h4 class='control-label form-group col-sm-6 text-right'>" . T_("Select sample ") . " </h4>";
|
||||
print "<div class=' form-inline form-group col-md-10'><h4 class='control-label form-group col-md-4 text-right'>" . T_("Select sample ") . "</h4>";
|
||||
display_chooser($r,"sample_import_id","sample_import_id",true,false,true,false);
|
||||
|
||||
print "</div>";
|
||||
|
||||
277
admin/set_outcomes.php
Normal file
277
admin/set_outcomes.php
Normal file
@@ -0,0 +1,277 @@
|
||||
<?php
|
||||
/*
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
* Configuration file
|
||||
*/
|
||||
require(dirname(__FILE__).'/../config.inc.php');
|
||||
|
||||
/**
|
||||
* Database
|
||||
*/
|
||||
require(dirname(__FILE__).'/../db.inc.php');
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
*/
|
||||
require(dirname(__FILE__).'/../functions/functions.xhtml.php');
|
||||
|
||||
|
||||
$css = array(
|
||||
"../include/bootstrap/css/bootstrap.min.css",
|
||||
"../include/bootstrap/css/bootstrap-theme.min.css",
|
||||
"../include/font-awesome/css/font-awesome.css",
|
||||
"../include/bootstrap-toggle/css/bootstrap-toggle.min.css",
|
||||
"../css/custom.css"
|
||||
);
|
||||
$js_head = array(
|
||||
"../include/jquery/jquery.min.js",
|
||||
"../include/bootstrap/js/bootstrap.min.js",
|
||||
"../include/bootstrap-toggle/js/bootstrap-toggle.min.js",
|
||||
);
|
||||
$js_foot = array(
|
||||
"../js/window.js",
|
||||
"../js/bootstrap-confirmation.js",
|
||||
"../js/custom.js"
|
||||
);
|
||||
|
||||
global $db;
|
||||
|
||||
|
||||
if (isset($_POST['default']) && isset($_POST['save'])){
|
||||
|
||||
$sql = "UPDATE `outcome` as o
|
||||
SET `default` = 0
|
||||
WHERE o.permanent != 1";
|
||||
$db->Execute($sql);
|
||||
|
||||
if(!empty($_POST['select']) ){
|
||||
foreach($_POST['select'] as $n => $val)
|
||||
{
|
||||
$sel[] = $val;
|
||||
}
|
||||
$sel=implode($sel,",");
|
||||
|
||||
$sql = "UPDATE `outcome` as o
|
||||
SET `default` = 1
|
||||
WHERE o.permanent != 1
|
||||
AND o.outcome_id IN ($sel)";
|
||||
|
||||
$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);
|
||||
}
|
||||
}
|
||||
|
||||
$_GET['default'] = $_POST['default'];
|
||||
|
||||
unset($_POST['default']);
|
||||
unset($_POST['save']);
|
||||
}
|
||||
|
||||
if (isset($_POST['qid']) && isset($_POST['save'])){
|
||||
|
||||
//get id's for 'permanent' outcomes
|
||||
$sql = "SELECT o.outcome_id
|
||||
FROM `outcome` as o
|
||||
WHERE o.permanent = 1
|
||||
AND o.default = 1;";
|
||||
$def = $db->GetAll($sql);
|
||||
|
||||
for ($i=0; $i < count($def); $i++){
|
||||
foreach($def[$i] as $key => $val){
|
||||
$sel[] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
if(!empty($_POST['select']) ){
|
||||
//add selected outcomes
|
||||
foreach($_POST['select'] as $n => $val){
|
||||
$sel[] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
$sel=implode($sel,",");
|
||||
|
||||
$qid = intval($_POST['qid']);
|
||||
$sql = "UPDATE questionnaire
|
||||
SET outcomes = '$sel'
|
||||
WHERE questionnaire_id = $qid";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
$_GET['qid'] = $_POST['qid'];
|
||||
|
||||
unset($_POST['qid']);
|
||||
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']); }
|
||||
else die();
|
||||
|
||||
xhtml_head($title,true,$css,$js_head);
|
||||
|
||||
/* for questionnire outcomes */
|
||||
if (isset($_GET['qid'])) {
|
||||
|
||||
if($qid == 0) $qid = false;
|
||||
|
||||
print "<h3 class='form-inline pull-left'>" . T_("Questionnaire") . ": </h3>";
|
||||
|
||||
$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 ");
|
||||
|
||||
|
||||
if ($qid != false)
|
||||
{
|
||||
$qd = $db->GetRow("SELECT outcomes, self_complete, referral FROM `questionnaire` WHERE questionnaire_id = $qid");
|
||||
|
||||
$qoutc = $qd['outcomes'];
|
||||
$sc = $qd['self_complete'];
|
||||
$ref = $qd['referral'];
|
||||
|
||||
if (empty($qoutc)) { // update q.outcomes with default list
|
||||
|
||||
$sql = "SELECT o.outcome_id
|
||||
FROM `outcome` as o
|
||||
WHERE o.default = 1;";
|
||||
$def = $db->GetAll($sql);
|
||||
|
||||
for ($i=0; $i < count($def); $i++){
|
||||
foreach($def[$i] as $key => $val){
|
||||
$do[] = $val;
|
||||
}
|
||||
}
|
||||
|
||||
$qoutc = implode($do,",");
|
||||
|
||||
$sql = "UPDATE questionnaire
|
||||
SET outcomes = '$qoutc'
|
||||
WHERE questionnaire_id = $qid";
|
||||
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
$sql = "SELECT o.*, ot.description as type,
|
||||
CONCAT('<input type=\'checkbox\'',
|
||||
CASE WHEN ((o.outcome_id = 40 AND $sc = 1) OR (o.outcome_id = 41 AND $ref = 1)) THEN 'checked=\"checked\" data-onstyle=\"success\"' ELSE '' END ,'',
|
||||
CASE WHEN ((o.outcome_id = 40 AND $sc != 1) OR (o.outcome_id = 41 AND $ref != 1)) THEN 'disabled=\"disabled\"' ELSE '' END ,'',
|
||||
CASE WHEN o.outcome_id NOT IN (40,41) AND o.outcome_id IN ($qoutc) THEN 'checked=\"checked\"' ELSE '' END ,'',
|
||||
CASE WHEN o.outcome_id NOT IN (40,41) AND o.permanent = 1 THEN 'disabled=\"disabled\" data-onstyle=\"success\"' ELSE '' END ,'
|
||||
name=\"select[]\" value=\'',o.outcome_id,'\' data-toggle=\"toggle\" data-size=\"small\" data-style=\"center-block\" data-on=" . TQ_("Yes") . " data-off=" . TQ_("No") . " data-width=\"70\"/>') as `select`
|
||||
from `outcome` as o, `outcome_type` as ot
|
||||
WHERE o.outcome_type_id = ot.outcome_type_id
|
||||
ORDER BY `o`.`outcome_id` ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
$row = array("outcome_id","description","type","select");
|
||||
$hdr = array(T_("Outcome ID"),T_("Description"),T_("Outcome type"),T_("Select"));
|
||||
$hid = "qid";
|
||||
$value = "$qid";
|
||||
}
|
||||
}
|
||||
|
||||
/* for default outcomes */
|
||||
if (isset($_GET['default'])) {
|
||||
|
||||
/* allow delay edit only to superadmins (currenlty admin) */
|
||||
if ($_SESSION['user'] === "admin"){
|
||||
$delay = "CONCAT('<input type=\'number\' name=\"delay[', o.outcome_id ,']\" class=\'form-control text-right\' style=\'width:7em;\' max=50000 min=0 required value=\'', o.default_delay_minutes ,'\' />') ";
|
||||
}
|
||||
else {
|
||||
$delay = "CONCAT('<span class=\'pull-right\' >', o.default_delay_minutes ,' </span>')";
|
||||
}
|
||||
$sql = "SELECT o.*, ot.description as type, $delay as `delay`,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.tryanother = 1 THEN 'primary\">" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '</span></h4>') as tryanother,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.tryagain = 1 THEN 'primary\">" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '</span></h4>') as tryagain,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.contacted = 1 THEN 'primary\">" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '</span></h4>') as contacted,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.eligible = 1 THEN 'primary\">" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '</span></h4>') as eligible,
|
||||
CONCAT('<h4> <span class=\"label label-', CASE WHEN o.require_note = 1 THEN 'primary\">" . T_("Yes") . "' ELSE 'default\">" . T_("No") . "' END , '</span></h4>') as require_note,
|
||||
CONCAT('<input type=\'checkbox\' ', CASE WHEN o.default = 1 THEN 'checked=\"checked\"' ELSE '' END ,' ', CASE WHEN o.permanent = 1 THEN 'disabled=\"disabled\" data-onstyle=\"success\"' ELSE '' END ,' name=\"select[]\" value=\'',o.outcome_id,'\' data-toggle=\"toggle\" data-size=\"small\" data-style=\"center-block\" data-on=" . TQ_("Yes") . " data-off=" . TQ_("No") . " data-width=\"70\" />') as `select`
|
||||
from `outcome` as o, `outcome_type` as ot
|
||||
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 = "";
|
||||
|
||||
}
|
||||
|
||||
|
||||
if (isset($rs) && !empty($rs)){
|
||||
|
||||
translate_array($rs, array("description","type"));
|
||||
|
||||
for ($i = 0; $i < count($rs); $i++){
|
||||
foreach ($rs[$i] as $key => $val){
|
||||
if ($key == "type"){
|
||||
$rs[$i]['type'] = preg_replace("#\s*\(.+#m", '', $val); // cut description in bracets for 'outcome_type'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
<form enctype="multipart/form-data" action="?" method="post" class="form-horizontal col-lg-12" >
|
||||
|
||||
<?php xhtml_table($rs,$row,$hdr); ?>
|
||||
|
||||
<input type='hidden' name='<?php echo $hid; ?>' value='<?php echo $value;?>' /> </br>
|
||||
|
||||
<div class="row form-group">
|
||||
<div class="col-sm-4 ">
|
||||
<a href="questionnairelist.php" class="btn btn-default pull-right" ><i class="fa fa-list text-primary"></i> <?php echo T_("Cancel");?></a>
|
||||
</div>
|
||||
<div class="col-sm-4 ">
|
||||
<button type="submit" class="btn btn-primary pull-right btn-lg" name="save" ><i class="fa fa-check-square-o fa-lg"></i> <?php echo T_("Save selection"); ?></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
<?php
|
||||
|
||||
}
|
||||
/* else {
|
||||
|
||||
if (isset($_GET['default'])) { ?>
|
||||
<div class="well text-danger col-sm-4"><p><?php echo T_("ERROR: Check tables 'outcome' and 'outcome_type' in DB"); ?></p></div>
|
||||
<?php }
|
||||
|
||||
if (isset($_GET['qid']) ) { ?>
|
||||
<div class="well text-danger col-sm-4"><p><?php echo T_("ERROR: Check tables 'outcome' and 'questionnaire' in DB"); ?></p></div>
|
||||
<?php }
|
||||
|
||||
} */
|
||||
|
||||
xhtml_foot($js_foot);
|
||||
|
||||
?>
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -16,7 +16,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -122,7 +122,7 @@ if (isset($_GET['case_note_id']))
|
||||
$db->Execute($sql);
|
||||
}
|
||||
|
||||
xhtml_head(T_("Assign outcomes to cases"),true,$css,$js_head);//array("../css/table.css"),array("../js/window.js")
|
||||
xhtml_head(T_("Assign outcomes to cases"),true,$css,$js_head);
|
||||
|
||||
?>
|
||||
|
||||
@@ -137,13 +137,17 @@ xhtml_head(T_("Assign outcomes to cases"),true,$css,$js_head);//array("../css/ta
|
||||
<?php
|
||||
$sql = "SELECT c.case_id as value, c.case_id as description, CASE WHEN c.case_id = '$case_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM `case` AS c, `outcome` AS o, `questionnaire` AS q, `sample` AS s, `sample_import` AS si
|
||||
LEFT JOIN (questionnaire_sample_quota as qsq, questionnaire_sample_quota_row as qsqr) on (si.sample_import_id = qsq.sample_import_id and si.sample_import_id = qsqr.sample_import_id)
|
||||
WHERE c.current_outcome_id = o.outcome_id
|
||||
AND q.questionnaire_id = c.questionnaire_id
|
||||
AND s.sample_id = c.sample_id
|
||||
AND s.import_id = si.sample_import_id
|
||||
AND q.enabled = 1
|
||||
AND si.enabled =1
|
||||
AND o.outcome_type_id =2";
|
||||
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 )
|
||||
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
||||
AND o.outcome_type_id =2
|
||||
ORDER BY c.case_id ASC";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Process
|
||||
|
||||
@@ -39,11 +39,6 @@ include (dirname(__FILE__) . "/../config.inc.php");
|
||||
*/
|
||||
include (dirname(__FILE__) . "/../db.inc.php");
|
||||
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Process
|
||||
*/
|
||||
|
||||
@@ -43,7 +43,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* Process
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -69,10 +69,12 @@ $db->StartTrans();
|
||||
$operator_id = get_operator_id();
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
$case_id = get_case_id($operator_id);
|
||||
$call_attempt_id = get_call_attempt($operator_id, false);
|
||||
if (isset($_GET['respondent_id']))$respondent_id = bigintval($_GET['respondent_id']); else $respondent_id = get_respondent_id($call_attempt_id);
|
||||
|
||||
if (!$case_id){
|
||||
xhtml_head(T_("Appointment error"));
|
||||
print("<div>" . T_("You have not been assigned a case therefore cannot create an appointment") . "</div>");
|
||||
print("<div class='alert alert-danger'>" . T_("You have not been assigned a case therefore cannot create an appointment") . "</div>");
|
||||
xhtml_foot();
|
||||
$db->CompleteTrans();
|
||||
exit();
|
||||
@@ -123,28 +125,27 @@ if (AUTO_LOGOUT_MINUTES !== false)
|
||||
$js[] = "include/jquery/jquery-1.4.2.min.js";
|
||||
$js[] = "js/childnap.js";
|
||||
}
|
||||
xhtml_head(T_("Create appointment"),false,array("include/bootstrap/css/bootstrap.min.css", "css/respondent.css"),$js);//"include/clockpicker/dist/bootstrap-clockpicker.min.css",
|
||||
xhtml_head(T_("Create appointment"),false,array("include/bootstrap/css/bootstrap.min.css"),$js);
|
||||
|
||||
//select a respondent from a list or create a new one
|
||||
print "<h4>" . T_("Respondent") . ":";
|
||||
$sr = display_respondent_list($case_id,isset($_GET['respondent_id'])?bigintval($_GET['respondent_id']):false,true);
|
||||
if (isset($_GET['respondent_id'])) $respondent_id = bigintval($_GET['respondent_id']);
|
||||
display_respondent_list($case_id,isset($respondent_id)?$respondent_id:false,true);
|
||||
print "</h4>";
|
||||
if ($sr != false) $_GET['respondent_id'] = $sr;
|
||||
|
||||
if(isset($_GET['respondent_id']) && $_GET['respondent_id'] == 0)
|
||||
{
|
||||
//ability to create a new one
|
||||
?>
|
||||
<p><?php echo T_("Create new respondent:"); ?></p>
|
||||
<h4><?php echo T_("Create new respondent:"); ?></h4>
|
||||
<form id="addRespondent" method="post" action="">
|
||||
<?php display_respondent_form(); ?>
|
||||
<p><input type="submit" value="<?php echo T_("Add this respondent"); ?>"/></p>
|
||||
<p><input type="submit" class="btn btn-primary" value="<?php echo T_("Add this respondent"); ?>"/></p>
|
||||
</form>
|
||||
<?php
|
||||
}
|
||||
else if(isset($_GET['respondent_id']))
|
||||
else if($respondent_id)
|
||||
{
|
||||
$respondent_id = bigintval($_GET['respondent_id']);
|
||||
|
||||
$sql = "SELECT TIME(CONVERT_TZ(NOW(),'System',r.Time_zone_name)) as tme, r.Time_zone_name as tzn FROM `respondent` as r WHERE r.respondent_id = $respondent_id";
|
||||
$ct = $db->GetRow($sql);
|
||||
@@ -160,6 +161,8 @@ else if(isset($_GET['respondent_id']))
|
||||
display_calendar($respondent_id,$questionnaire_id,$year,$month,$day);
|
||||
|
||||
display_time($questionnaire_id,$respondent_id,$day,$month,$year,isset($_GET['start'])?$_GET['start']:false,isset($_GET['end'])?$_GET['end']:false);
|
||||
|
||||
print "</div>";
|
||||
|
||||
if (isset($_GET['end']) && isset($_GET['start']))
|
||||
{
|
||||
@@ -242,7 +245,7 @@ else if(isset($_GET['respondent_id']))
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
print "<br/><div class='col-md-12'><a class='btn btn-warning pull-left' href='?'>".T_("Clear")."</a><a class='btn btn-default pull-right' href='javascript:parent.closePopup();'>".T_("Cancel")."</a></div><div class='clearfix'></div>";
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -40,15 +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(LS_SESSION_NAME);
|
||||
|
||||
session_name($db->GetOne($sql));
|
||||
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']))
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
28
call.php
28
call.php
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
@@ -107,32 +107,32 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
AND call_attempt_id = '$ca'";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
$outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q JOIN `case` as c ON (c.questionnaire_id =q.questionnaire_id) WHERE c.case_id = $case_id");
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
//we have an appointment made ... only select appointment ID's
|
||||
$sql = "SELECT outcome_id,description
|
||||
FROM outcome
|
||||
WHERE outcome_type_id = '5'";
|
||||
WHERE outcome_type_id = '5'
|
||||
AND outcome_id IN ($outcomes)";
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($contacted === false)
|
||||
{
|
||||
$sql = "SELECT outcome_id,description
|
||||
FROM outcome
|
||||
WHERE outcome_id != 10"; //don't show completed if not
|
||||
}
|
||||
if ($contacted === false) $ctd = "";
|
||||
else
|
||||
{
|
||||
$contacted = bigintval($contacted);
|
||||
|
||||
$sql = "SELECT outcome_id,description
|
||||
FROM outcome
|
||||
WHERE contacted = '$contacted'
|
||||
AND outcome_id != 10"; //don't show completed if not
|
||||
$ctd = "AND contacted = '$contacted'";
|
||||
}
|
||||
|
||||
|
||||
$sql = "SELECT outcome_id,description
|
||||
FROM outcome
|
||||
WHERE outcome_type_id != '5'
|
||||
$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);
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -106,13 +106,16 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
AND call_attempt_id = '$ca'";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
|
||||
$outcomes = $db->GetOne("SELECT q.outcomes FROM `questionnaire` as q JOIN `case` as c ON (c.questionnaire_id =q.questionnaire_id) WHERE c.case_id = $case_id");
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
//we have an appointment made ... only select appointment ID's
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE outcome_id = '19'"; //outcome_type_id = '5'
|
||||
WHERE outcome_type_id = '5'
|
||||
AND outcome_id IN ($outcomes)";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -121,30 +124,21 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
print "<div class=\"form-group\" ><a href=\"?contacted=1\" class=\"btn btn-info\" style=\"margin-left: 15px; margin-right: 30px; min-width: 150px;\">".T_("CONTACTED")."</a>";
|
||||
print "<a href=\"?contacted=0\" class=\"btn btn-default\" style=\"margin-left: 30px; margin-right: 15px; min-width: 150px;\">".T_("NOT CONTACTED")."</a></div>";
|
||||
|
||||
if (isset ($_GET['contacted'])){
|
||||
|
||||
$contacted = bigintval($_GET['contacted']);
|
||||
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE contacted = '$contacted'
|
||||
AND outcome_id NOT IN(5,10,19,21,40,41,42,43,44,45)";
|
||||
}
|
||||
if (isset ($_GET['contacted'])) $contacted = bigintval($_GET['contacted']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$contacted = bigintval($contacted);
|
||||
else $contacted = bigintval($contacted);
|
||||
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE contacted = '$contacted'
|
||||
AND outcome_id NOT IN(5,10,19,21,40,41,42,43,44,45)";
|
||||
}
|
||||
$sql = "SELECT outcome_id,description,contacted
|
||||
FROM outcome
|
||||
WHERE contacted = '$contacted'
|
||||
AND outcome_type_id != '5'
|
||||
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 "<div>";
|
||||
print "<div class=\"panel-body\">";
|
||||
if (!empty($rs))
|
||||
{
|
||||
$do = false;
|
||||
@@ -153,15 +147,13 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
foreach($rs as $r)
|
||||
{
|
||||
if ($do == $r['outcome_id']) $selected = "checked='checked'"; else $selected = "";
|
||||
if (isset($r['contacted']) && $r['contacted'] == 1) $highlight = "text-primary"; else $highlight = "text-default";
|
||||
print "<li><label class='$highlight'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' $selected style='float:left'/> " . T_($r['description']) . "</label></li>";
|
||||
if (isset($r['contacted']) && $r['contacted'] == 1) $highlight = ""; else $highlight = "style='color:black;'";
|
||||
print "<a><label $highlight class='btn-link'><input type='radio' class='radio' name='outcome' id='outcome-{$r['outcome_id']}' value='{$r['outcome_id']}' $selected style='float:left'/> " . T_($r['description']) . "</label></a><br/>";
|
||||
}
|
||||
|
||||
$_POST['confirm'] = true;
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -277,7 +269,7 @@ if (isset($_POST['submit']))
|
||||
$newtext = T_("Start REC");
|
||||
$js = "js/window_interface2.js";
|
||||
if (browser_ie()) $js = "js/window_ie6_interface2.js";
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"parent.closePopup();'");
|
||||
xhtml_head(T_("Call"),true,array("css/call.css"),array($js),"onload='parent.closePopup();'");
|
||||
|
||||
}
|
||||
|
||||
@@ -308,7 +300,7 @@ if (isset($_GET['newstate']))
|
||||
|
||||
if (browser_ie()) $js = "js/window_ie6_interface2.js"; else $js = "js/window_interface2.js";
|
||||
|
||||
xhtml_head(T_("Set outcome"),true,array("include/bootstrap/css/bootstrap.min.css"/* ,"css/call.css" */),array($js,"include/jquery/jquery-1.4.2.min.js"));
|
||||
xhtml_head(T_("Set outcome"),true,array("include/bootstrap/css/bootstrap.min.css"),array($js,"include/jquery/jquery-1.4.2.min.js"));
|
||||
|
||||
$state = is_on_call($operator_id);
|
||||
switch($state)
|
||||
@@ -327,8 +319,8 @@ switch($state)
|
||||
{
|
||||
//end the case
|
||||
if (!isset($_GET['end'])) print "<div>" . T_("End work") . "</div>";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -354,9 +346,11 @@ switch($state)
|
||||
|
||||
print "<div>" . T_("Press the call button to dial the number for this appointment:") . "</div>";
|
||||
|
||||
print "<form action='?' method='post'><div>";
|
||||
print "<p>" . T_("Number to call:") . " {$r['phone']} - {$r['description']}</p>";
|
||||
print "</div><div><input type='hidden' id='contact_phone' name='contact_phone' value='{$r['contact_phone_id']}'/><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit'/></div></form>";
|
||||
print "<form action='?' method='post'>
|
||||
<div><p>" . T_("Number to call:") . " {$r['phone']} - {$r['description']}</p></div>
|
||||
<input type='hidden' id='contact_phone' name='contact_phone' value='{$r['contact_phone_id']}'/>
|
||||
<div><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit' class='btn btn-primary'/></div>
|
||||
</form>";
|
||||
}
|
||||
else
|
||||
print "<div>" . 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'") . "</div>";
|
||||
@@ -427,7 +421,7 @@ switch($state)
|
||||
{
|
||||
print "<option value='{$r['contact_phone_id']}'>{$r['phone']} - {$r['description']}</option>";
|
||||
}
|
||||
print "</select></div><div><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit'/></div></form>";
|
||||
print "</select></div><div><input type='submit' value=\"" . T_("Call") . "\" name='submit' id='submit' class='btn btn-primary'/></div></form>";
|
||||
}
|
||||
else
|
||||
print "<div>" . 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'") . "</div>";
|
||||
@@ -443,13 +437,13 @@ switch($state)
|
||||
//give focus on load
|
||||
print '<script type="text/javascript">$(document).ready(function(){$("#note").focus();});</script>';
|
||||
//put these lower on the screen so they don't get "automatically" clicked
|
||||
print "<p><a href='javascript:openParentNote(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")'>" . T_("End work") . "</a></p";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -462,16 +456,16 @@ switch($state)
|
||||
|
||||
if ($rn) // a note is required to be entered
|
||||
{
|
||||
print "<div><label for='note'>" . T_("Enter a reason for this outcome before completing this case:") . "</label><input type='text' id='note' name='note' size='48'/><br/><br/><br/><br/></div>";
|
||||
print "<div><label for='note' class='control-label'>" . T_("Enter a reason for this outcome before completing this case:") . "</label><textarea type='text' id='note' name='note' class='form-control' rows='3'></textarea><br/></div>";
|
||||
print '<script type="text/javascript">$(document).ready(function(){$("#note").focus();});</script>';
|
||||
print "<p><a href='javascript:openParentNote(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p></p>";
|
||||
print "<p><a href='javascript:openParentNote(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!isset($_GET['end'])) print "<div>" . T_("The last call completed this call attempt") . "</div>";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")'>" . T_("End case") . "</a></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")'>" . T_("End work") . "</a></p>";
|
||||
if (!isset($_GET['end'])) print "<div class='alert alert-info'>" . T_("The last call completed this call attempt") . "</div>";
|
||||
print "<p><a href='javascript:openParent(\"endcase=endcase\")' class='btn btn-primary'>" . T_("End case") . "</a></p></p>";
|
||||
print "<p><a href='javascript:openParent(\"endwork=endwork\")' class='btn btn-info'>" . T_("End work") . "</a></p>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -484,12 +478,12 @@ switch($state)
|
||||
print "<form action='?' method='post'><div class=\"form-group\">";
|
||||
display_outcomes(false,$call_attempt_id,$case_id);
|
||||
if (isset($_POST['confirm'])){
|
||||
print "</div><input type='submit' class=\"btn btn-primary\" value=\"" . T_("Assign outcome") . "\" name='submit' id='submit'/></form>";
|
||||
print "</div><input type='submit' class=\"btn btn-primary btn-lg\" style=\"margin-left: 15px; margin-right: 30px; min-width: 150px;\" value=\"" . T_("Assign outcome") . "\" name='submit' id='submit'/></form>";
|
||||
}
|
||||
break;
|
||||
case 5: //done -- shouldn't come here as should be coded + done
|
||||
default:
|
||||
print "<div class='status'>" . T_("Error: Close window") . "</div>";
|
||||
print "<div class='alert alert-danger'>" . T_("Error: Close window") . "</div>";
|
||||
break;
|
||||
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -39,16 +39,13 @@ include_once(dirname(__FILE__)."/../config.inc.php");
|
||||
*/
|
||||
include_once(dirname(__FILE__)."/../db.inc.php");
|
||||
|
||||
session_name(LS_SESSION_NAME);
|
||||
|
||||
//get session name from DB
|
||||
//
|
||||
$sql = "SELECT stg_value
|
||||
FROM " . LIME_PREFIX . "settings_global
|
||||
WHERE stg_name = 'SessionName'";
|
||||
session_set_cookie_params(0,QUEXS_PATH);
|
||||
|
||||
session_name($db->GetOne($sql));
|
||||
|
||||
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']))
|
||||
|
||||
@@ -1,13 +0,0 @@
|
||||
tr.odd {
|
||||
background-color: #eeeeee;
|
||||
}
|
||||
.tclass th {
|
||||
text-align:left;
|
||||
border: 1px solid #aaa;
|
||||
}
|
||||
.tclass td {
|
||||
border: 1px solid #aaa;
|
||||
}
|
||||
.highlight {
|
||||
background-color: #cccccc;
|
||||
}
|
||||
@@ -41,7 +41,7 @@ include_once(dirname(__FILE__).'/../db.inc.php');
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-client.php");
|
||||
require ("auth-client.php");
|
||||
|
||||
|
||||
/**
|
||||
@@ -62,11 +62,11 @@ include ("../functions/functions.client.php");
|
||||
|
||||
$client_id = get_client_id();
|
||||
|
||||
xhtml_head(T_("Questionnaire Outcomes"),true,array("css/table.css"));
|
||||
xhtml_head(T_("Questionnaire Outcomes"),true,array("../include/bootstrap/css/bootstrap.min.css", "../css/custom.css"));
|
||||
|
||||
if ($client_id)
|
||||
{
|
||||
$sql = "SELECT q.questionnaire_id,q.description
|
||||
$sql = "SELECT q.questionnaire_id,q.description,q.lime_sid
|
||||
FROM questionnaire as q, client_questionnaire as cq
|
||||
WHERE cq.questionnaire_id = q.questionnaire_id
|
||||
AND q.enabled = 1
|
||||
@@ -75,14 +75,16 @@ if ($client_id)
|
||||
$qs = $db->GetAll($sql);
|
||||
|
||||
if (empty($qs))
|
||||
print "<p>" . T_("There are no questionnaires assigned to you") . "</p>";
|
||||
print "<p class='alert alert-info'>" . T_("There are no questionnaires assigned to you") . "</p>";
|
||||
else
|
||||
{
|
||||
foreach($qs as $q)
|
||||
{
|
||||
print "<h2>{$q['description']}</h2>";
|
||||
print "<div class='col-lg-2'>";
|
||||
print "<div class=' '><h2>{$q['description']}</h2>";
|
||||
|
||||
$questionnaire_id = $q['questionnaire_id'];
|
||||
$qsid=$q['lime_sid'];
|
||||
|
||||
$sql = "SELECT o.calc, count( c.case_id )
|
||||
FROM `case` AS c, `outcome` AS o
|
||||
@@ -91,15 +93,15 @@ if ($client_id)
|
||||
GROUP BY o.calc";
|
||||
|
||||
$a = $db->GetAssoc($sql);
|
||||
|
||||
$a = aapor_clean($a);
|
||||
|
||||
|
||||
print "<table><tr><th>" . T_("Outcome") . "</th><th>" . T_("Rate") . "</th></tr>";
|
||||
print "<table class='table-hover table-condensed tclass'><thead class=\"highlight\"><tr><th>" . T_("Outcome") . "</th><th>" . T_("Rate") . "</th></tr></thead>";
|
||||
print "<tr><td>" . T_("Response Rate 1") . "</td><td>" . round(aapor_rr1($a),2) . "</td></tr>";
|
||||
print "<tr><td>" . T_("Refusal Rate 1") . "</td><td>" . round(aapor_ref1($a),2) . "</td></tr>";
|
||||
print "<tr><td>" . T_("Cooperation Rate 1") . "</td><td>" . round(aapor_coop1($a),2) . "</td></tr>";
|
||||
print "<tr><td>" . T_("Contact Rate 1") . "</td><td>" . round(aapor_con1($a),2) . "</td></tr>";
|
||||
print "</table>";
|
||||
print "</table></br>";
|
||||
|
||||
|
||||
$sql = "SELECT o.description as des, o.outcome_id, count( c.case_id ) as count
|
||||
@@ -113,22 +115,30 @@ 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 "<p>" . T_("No outcomes recorded for this questionnaire") . "</p>";
|
||||
else print "<p class='alert alert-info'>" . T_("No outcomes recorded for this questionnaire") . "</p>";
|
||||
|
||||
print "</br><a href=\"?qsid=$qsid\" class=\"btn btn-default btn-block btn-lime\">" . T_("View summary results") . "</a></div></div>";
|
||||
}
|
||||
|
||||
if (isset($_GET['qsid'])) {
|
||||
$qsid = intval($_GET['qsid']);
|
||||
$page = LIME_URL . "admin/admin.php?action=browse&sid=$qsid"; }
|
||||
else $page ='';
|
||||
|
||||
if ($page){
|
||||
?>
|
||||
<div class="col-lg-10 pull-right" id=" " style="height:820px;">
|
||||
<?php xhtml_object($page,' ',"full"); ?>
|
||||
</div>
|
||||
<?php
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("You are not a valid client") . "</p>";
|
||||
|
||||
|
||||
print "<p class='alert alert-danger'>" . T_("You are not a valid client") . "</p>";
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
@@ -281,6 +281,11 @@ if (!defined('LDB_TYPE')) define('LDB_TYPE', DB_TYPE);
|
||||
if (!defined('COMPANY_NAME')) define ('COMPANY_NAME', 'queXS ');
|
||||
if (!defined('ADMIN_PANEL_NAME')) define ('ADMIN_PANEL_NAME',' Administration Panel');
|
||||
|
||||
/**
|
||||
* Session name
|
||||
* - If changed must also be changed in the lime_settings_global table
|
||||
*/
|
||||
if (!defined('LS_SESSION_NAME')) define ('LS_SESSION_NAME', 'ls28629164789259281352');
|
||||
|
||||
/**
|
||||
* Debugging
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
@@ -65,7 +65,9 @@ include("functions/functions.operator.php");
|
||||
*/
|
||||
include("functions/functions.input.php");
|
||||
|
||||
$js = array("js/window.js");
|
||||
if (isset($_GET['interface2'])) { if (browser_ie()) $jsw = "js/window_ie6_interface2.js"; else $jsw = "js/window_interface2.js"; }
|
||||
else { if (browser_ie()) $jsw = "js/window_ie6.js"; else $jsw = "js/window.js"; }
|
||||
$js = array($jsw);
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
|
||||
@@ -74,4 +74,8 @@ text-shadow: 1px 2px 1px #ababab;
|
||||
.h1, .h2, .h3, h1, h2, h3 {
|
||||
margin-bottom: 0.4em;
|
||||
margin-top: 0.25em;
|
||||
}
|
||||
.full {
|
||||
width:100%;
|
||||
height:100%;
|
||||
}
|
||||
@@ -1,9 +1,3 @@
|
||||
/** RESET **/
|
||||
* {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
|
||||
html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, code, del, dfn, img, q, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td {
|
||||
margin: 0;
|
||||
@@ -16,6 +10,11 @@ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pr
|
||||
vertical-align: baseline;
|
||||
}
|
||||
|
||||
body {
|
||||
text-align: justify;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear:both;
|
||||
font-size:0;
|
||||
@@ -23,303 +22,12 @@ html, body, div, span, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pr
|
||||
overflow:hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
background: #FFFFFF;
|
||||
text-align: justify;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
}
|
||||
|
||||
|
||||
#wrapper_e {
|
||||
}
|
||||
.full_height_wrapper{
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
text-align: justify;
|
||||
height:285px;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
min-width:1024px;
|
||||
}
|
||||
.half_height_wrapper{
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
text-align: justify;
|
||||
height:94px;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
min-width:1024px;
|
||||
}
|
||||
|
||||
#top_page {
|
||||
}
|
||||
#top_page_in_e {
|
||||
}
|
||||
|
||||
.full_height_top_page{
|
||||
height: 207px;
|
||||
}
|
||||
.half_height_top_page{
|
||||
height: 56px;
|
||||
}
|
||||
|
||||
.full_height{
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
background: #FFF;
|
||||
text-align: justify;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
height: 271px;
|
||||
padding-top:14px;
|
||||
}
|
||||
.half_height{
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
background: #FFF;
|
||||
text-align: justify;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
height: 80px;
|
||||
padding-top:14px;
|
||||
}
|
||||
|
||||
|
||||
#header_line {
|
||||
margin: 16px 0px 0px 12px;
|
||||
padding: 0;
|
||||
text-align: justify;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
|
||||
#menu_left_e {
|
||||
}
|
||||
.menu_full_height {
|
||||
padding: 0;
|
||||
height: 137px;
|
||||
width:145px;
|
||||
display:block;
|
||||
float:left;
|
||||
padding:9px 22px 0px 44px;
|
||||
padding-left:44px;
|
||||
padding-top:9px;
|
||||
list-style:none;
|
||||
}
|
||||
|
||||
.menu_half_height {
|
||||
padding: 0;
|
||||
height: 47px;
|
||||
list-style:none;
|
||||
width:145px;
|
||||
display:block;
|
||||
float:left;
|
||||
padding:9px 22px 0px 44px;
|
||||
padding-left:44px;
|
||||
padding-top:9px;
|
||||
}
|
||||
|
||||
#menu_left li {
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
#item_1 a{
|
||||
background: url(images/btn_field.jpg) no-repeat left top;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
color:#9f9f9f;
|
||||
text-decoration:none;
|
||||
padding:8px 0px 0px 18px;
|
||||
border:none;
|
||||
}
|
||||
|
||||
#item_1 a:hover{
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
text-decoration:none;
|
||||
color:#49b848;
|
||||
}
|
||||
|
||||
#item_2_e a{
|
||||
}
|
||||
|
||||
.item_2_full_height a{
|
||||
background: url(images/btn_field.jpg) no-repeat left top;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 36px;
|
||||
text-decoration:none;
|
||||
color:#9f9f9f;
|
||||
padding:8px 0px 0px 18px;
|
||||
border:none;
|
||||
}
|
||||
.item_2_half_height a{
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 1px;
|
||||
text-decoration:none;
|
||||
color:#b8b8ba;
|
||||
display:none;
|
||||
}
|
||||
.item_2_full_height a:hover{
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 36px;
|
||||
text-decoration:none;
|
||||
color:#05b0f7;
|
||||
background: url(images/btn_field.jpg) no-repeat left top;
|
||||
}
|
||||
|
||||
#item_2_e a:hover{
|
||||
}
|
||||
.item_2_half_height {
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 1px;
|
||||
display:none;
|
||||
}
|
||||
|
||||
#item_3_e a{
|
||||
}
|
||||
.item_3_half_height {
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 1px;
|
||||
display:none;
|
||||
}
|
||||
.item_3_full_height a{
|
||||
background: url(images/btn_field.jpg) no-repeat left top;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 36px;
|
||||
text-decoration:none;
|
||||
color:#9f9f9f;
|
||||
padding:8px 0px 0px 18px;
|
||||
border:none;
|
||||
}
|
||||
.item_3_half_height a{
|
||||
}
|
||||
.item_3_full_height a:hover{
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 36px;
|
||||
text-decoration:none;
|
||||
color:#ff3506;
|
||||
}
|
||||
|
||||
#item_3_e a:hover{
|
||||
}
|
||||
|
||||
#info_e {
|
||||
}
|
||||
|
||||
.info_full_height{
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
background: #CCC;
|
||||
border: 1px solid #e9e9eb;
|
||||
text-align: justify;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
display:block;
|
||||
float:left;
|
||||
height: 137px;
|
||||
width:214px;
|
||||
padding-right:115px;
|
||||
}
|
||||
.info_half_height{
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
background: #CCC;
|
||||
border: 1px solid #e9e9eb;
|
||||
text-align: justify;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
display:block;
|
||||
float:left;
|
||||
height: 56px;
|
||||
width:214px;
|
||||
padding-right:115px;
|
||||
}
|
||||
|
||||
|
||||
|
||||
a:active {
|
||||
/* border: 4px inset;*/
|
||||
}
|
||||
|
||||
|
||||
#arrow_up_e {
|
||||
}
|
||||
|
||||
.arrow_up_full_height {
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
background: #EEE;
|
||||
background: url(images/arrow_up.png) no-repeat left top;
|
||||
text-align: justify;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
height: 20px;
|
||||
width:20px;
|
||||
position:absolute;
|
||||
left:480px;
|
||||
top:270px;
|
||||
}
|
||||
|
||||
.arrow_up_half_height {
|
||||
display:none;
|
||||
}
|
||||
|
||||
#arrow_down_e {
|
||||
}
|
||||
|
||||
.arrow_down_full_height {
|
||||
display:none;
|
||||
}
|
||||
.arrow_down_half_height {
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
background: #EEE;
|
||||
background: url(images/arrow_down.jpg) no-repeat left top;
|
||||
text-align: justify;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
height: 20px;
|
||||
width:20px;
|
||||
left:480px;
|
||||
top:80px;
|
||||
position:absolute;
|
||||
}
|
||||
|
||||
#bottom_page {
|
||||
margin: 0px;
|
||||
padding: 0;
|
||||
background: #CCC;
|
||||
text-align: justify;
|
||||
font-family: Tahoma, Arial, Helvetica, sans-serif;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
|
||||
.headerexpand {
|
||||
position: absolute;
|
||||
height: 20px;
|
||||
bottom: 0px;
|
||||
right: 20%;
|
||||
}
|
||||
#headerexpandimage {
|
||||
height: 15px;
|
||||
left: 41%;
|
||||
}
|
||||
|
||||
.box {
|
||||
margin: 18px;
|
||||
}
|
||||
@@ -329,160 +37,19 @@ a:active {
|
||||
.offline {
|
||||
background: #FF0000;
|
||||
}
|
||||
a {
|
||||
/*padding: 3px 0.5em;
|
||||
margin-left: 3px;
|
||||
border: 1px solid #778;
|
||||
background: #DDE;
|
||||
text-decoration: none;
|
||||
color: black;*/
|
||||
}
|
||||
a:active {
|
||||
/* border: 4px inset;*/
|
||||
}
|
||||
|
||||
.header {
|
||||
position : absolute;
|
||||
width : 50%;
|
||||
height : 30%;
|
||||
top : 30%;
|
||||
right : 0;
|
||||
bottom : auto;
|
||||
left : 0;
|
||||
/*max-height:136px;*/
|
||||
}
|
||||
#calllist {
|
||||
position : absolute;
|
||||
width : 50%;
|
||||
height : 28%;
|
||||
top : 2%;
|
||||
left : 48%;
|
||||
right : 1%;
|
||||
/*max-height:180px;*/
|
||||
bottom : auto;
|
||||
}
|
||||
#qstatus {
|
||||
position : absolute;
|
||||
width : 30%;
|
||||
height : 30%;
|
||||
top : 2%;
|
||||
right : 2%;
|
||||
left: 17%;
|
||||
bottom : auto;
|
||||
/*max-height:38%;*/
|
||||
}
|
||||
#casefunctions {
|
||||
position : absolute;
|
||||
width : 12%;
|
||||
height : 30%;
|
||||
top : 0;
|
||||
right : 0;
|
||||
left: 0;
|
||||
font-size:18px;
|
||||
padding:1%;
|
||||
|
||||
bottom : auto;
|
||||
}
|
||||
#casefunctions li {
|
||||
list-style:none;
|
||||
}
|
||||
#content {
|
||||
position : absolute;
|
||||
top : 31%;
|
||||
left : 0.5%;
|
||||
right :0.5%;
|
||||
bottom : auto;
|
||||
width : 99%;
|
||||
height : 69%;
|
||||
}
|
||||
|
||||
.embeddedobject {
|
||||
width:100%;
|
||||
height:100%;
|
||||
position:absolute;
|
||||
}
|
||||
#main-qstatus {
|
||||
width:95%;
|
||||
/*max-height:116px;*/
|
||||
position:absolute;
|
||||
left:3%;
|
||||
top:1%;
|
||||
height:90%;
|
||||
border: 2px solid #e9e9eb;
|
||||
border-radius: 15px;
|
||||
-moz-border-radius: 15px;
|
||||
|
||||
}
|
||||
|
||||
#main-casenotes{
|
||||
height:85%;
|
||||
}
|
||||
#main-contactdetails{
|
||||
/*height:85%;*/
|
||||
}
|
||||
#main-calllist{
|
||||
/*height:85%;*/
|
||||
}
|
||||
#main-appointmentlist{
|
||||
height:85%;
|
||||
}
|
||||
#main-projectinfo{
|
||||
height:85%;
|
||||
}
|
||||
|
||||
.wait_wrapper{
|
||||
margin: 0 auto;
|
||||
position:absolute;
|
||||
top:40%;
|
||||
height:60%;
|
||||
width:260px;
|
||||
left:40%;
|
||||
list-style:none;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.wait_li_1 a{
|
||||
background: url(images/btn_field.jpg) no-repeat left top;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
color:#9f9f9f;
|
||||
text-decoration:none;
|
||||
padding:8px 0px 0px 18px;
|
||||
border:none;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.wait_li_1 a:hover{
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
text-decoration:none;
|
||||
color:#49b848;
|
||||
}
|
||||
.wait_li_2 a{
|
||||
background: url(images/btn_field.jpg) no-repeat left top;
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
color:#9f9f9f;
|
||||
text-decoration:none;
|
||||
padding:8px 0px 0px 18px;
|
||||
border:none;
|
||||
}
|
||||
|
||||
.wait_li_2 a:hover{
|
||||
list-style: none;
|
||||
display: inline;
|
||||
float: left;
|
||||
width: 220px;
|
||||
height: 40px;
|
||||
text-decoration:none;
|
||||
color:#ff3506;
|
||||
}
|
||||
|
||||
@@ -84,7 +84,7 @@ ul.tabbernav li.tabberactive a:hover
|
||||
Add style only after the tabber interface is set up (.tabberlive)
|
||||
--------------------------------------------------*/
|
||||
.tabberlive .tabbertab {
|
||||
position:absolute;
|
||||
/*position:absolute;*/
|
||||
border: 2px solid #e9e9eb;
|
||||
border-bottom-left-radius: 15px;
|
||||
-moz-border-radius-bottomleft: 15px;
|
||||
|
||||
@@ -1055,6 +1055,8 @@ CREATE TABLE `outcome` (
|
||||
`eligible` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'If the respondent is eligible to participate',
|
||||
`require_note` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Whether to require a note to be entered',
|
||||
`calc` char(2) COLLATE utf8_unicode_ci NOT NULL,
|
||||
`default` TINYINT(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT 'Used as default for questionnaire outcomes',
|
||||
`permanent` TINYINT(1) UNSIGNED NOT NULL COMMENT 'Permanent outcome, used for all questionnaires, not possible to de-select',
|
||||
PRIMARY KEY (`outcome_id`),
|
||||
KEY `calc` (`calc`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
@@ -1063,45 +1065,45 @@ CREATE TABLE `outcome` (
|
||||
-- Dumping data for table `outcome`
|
||||
--
|
||||
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(1, '3.11', 'Not attempted or worked', 0, 1, 1, 0, 1, 0, 0, 'UH');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(2, '3.13', 'No answer', 180, 1, 1, 0, 1, 1, 0, 'UH');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(3, '3.16', 'Technical phone problems', 180, 1, 1, 0, 1, 0, 0, 'UH');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(4, '2.34', 'Other, Referred to Supervisor (Eligible)', 0, 2, 0, 1, 1, 1, 1, 'O');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(5, '3.91', 'Other, Referred to Supervisor (Unknown eligibility)', 0, 2, 0, 0, 1, 0, 1, 'UO');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(6, '2.111a', 'Soft Refusal, Other', 10080, 3, 0, 1, 1, 1, 1, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(7, '2.111b', 'Hard Refusal, Other', 10080, 3, 0, 1, 1, 1, 1, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(8, '2.112a', 'Soft Refusal, Respondent', 10080, 3, 0, 1, 1, 1, 1, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(9, '2.112b', 'Hard Refusal, Respondent', 10080, 3, 0, 1, 1, 1, 1, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(10, '1.1', 'Complete', 0, 4, 0, 1, 1, 1, 0, 'I');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(11, '2.112', 'Known respondent refusal', 0, 4, 0, 1, 1, 1, 0, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(12, '2.111', 'Household-level refusal', 0, 4, 0, 1, 1, 1, 0, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(13, '2.112c', 'Broken appointment (Implicit refusal)', 10080, 3, 1, 0, 1, 1, 0, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(14, '4.32', 'Disconnected number', 0, 4, 1, 0, 0, 0, 0, '');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(15, '4.20', 'Fax/data line', 0, 4, 1, 1, 0, 0, 0, '');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(16, '4.51', 'Business, government office, other organization', 0, 4, 1, 1, 0, 0, 0, '');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(17, '4.70', 'No eligible respondent', 0, 4, 1, 1, 0, 0, 0, '');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(18, '2.35a', 'Accidental hang up or temporary phone problem', 0, 1, 1, 1, 1, 1, 0, 'O');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(19, '2.12a', 'Definite Appointment - Respondent', 0, 5, 0, 1, 1, 1, 0, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(20, '2.12b', 'Definite Appointment - Other', 0, 5, 0, 1, 1, 1, 0, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(21, '2.13a', 'Unspecified Appointment - Respondent', 0, 5, 0, 1, 1, 1, 0, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(22, '2.13b', 'Unspecified Appointment - Other', 0, 5, 0, 1, 1, 1, 0, 'R');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(23, '2.221', 'Household answering machine - Message left', 180, 1, 1, 1, 1, 1, 0, 'NC');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(24, '2.222', 'Household answering machine - No message left', 180, 1, 1, 1, 1, 1, 0, 'NC');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(25, '2.31', 'Respondent Dead', 0, 4, 0, 1, 0, 1, 0, 'O');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(26, '2.32', 'Physically or mentally unable/incompetent', 0, 4, 0, 1, 0, 1, 0, 'O');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(27, '2.331', 'Household level language problem', 0, 4, 1, 1, 0, 1, 0, 'O');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(28, '2.332', 'Respondent language problem', 0, 4, 0, 1, 0, 1, 0, 'O');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(29, '3.14', 'Answering machine - Not a household', 0, 4, 1, 1, 0, 0, 0, 'UH');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(30, '4.10', 'Out of sample', 0, 4, 0, 1, 0, 0, 0, '');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(31, '2.20', 'Non contact', 180, 1, 1, 1, 1, 1, 0, 'NC');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(32, '4.80', 'Quota filled', 0, 4, 0, 1, 0, 0, 0, '');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(33, '2.36', 'Miscellaneous - Unavailable for a week', 10080, 1, 0, 1, 1, 1, 0, 'O');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(40, '1.1', 'Self completed online', 0, 4, 0, 1, 1, 1, 0, 'I');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(41, '2.36', 'Self completion email invitation sent', 10080, 1, 0, 1, 1, 1, 0, 'O');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(42, '3.90', 'Max call attempts reached (Unknown eligibility)', 0, 1, 0, 1, 1, 0, 0, 'UH');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(43, '3.90', 'Max calls reached (Unknown eligibility)', 0, 1, 0, 1, 1, 0, 0, 'UH');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(44, '2.30', 'Max call attempts reached (Eligible)', 0, 1, 0, 1, 1, 1, 0, 'O');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`) VALUES(45, '2.30', 'Max calls reached (Eligible)', 0, 1, 0, 1, 1, 1, 0, 'O');
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (1,'3.11','Not attempted or worked',0,1,1,0,1,0,0,'UH',1,1);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (2,'3.13','No answer',180,1,1,0,1,1,0,'UH',1,1);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (3,'3.16','Technical phone problems',180,1,1,0,1,0,0,'UH',1,1);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (4,'2.34','Other, Referred to Supervisor (Eligible)',0,2,0,1,1,1,1,'O',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (5,'3.91','Other, Referred to Supervisor (Unknown eligibility)',0,2,0,0,1,0,1,'UO',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (6,'2.111a','Soft Refusal, Other',10080,3,0,1,1,1,1,'R',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (7,'2.111b','Hard Refusal, Other',10080,3,0,1,1,1,1,'R',1,1);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (8,'2.112a','Soft Refusal, Respondent',10080,3,0,1,1,1,1,'R',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (9,'2.112b','Hard Refusal, Respondent',10080,3,0,1,1,1,1,'R',1,1);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (10,'1.1','Complete',0,4,0,1,1,1,0,'I',1,1);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (11,'2.112','Known respondent refusal',0,4,0,1,1,1,0,'R',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (12,'2.111','Household-level refusal',0,4,0,1,1,1,0,'R',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (13,'2.112c','Broken appointment (Implicit refusal)',10080,3,1,0,1,1,0,'R',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (14,'4.32','Disconnected number',0,4,1,0,0,0,0,'',1,1);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (15,'4.20','Fax/data line',0,4,1,1,0,0,0,'',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (16,'4.51','Business, government office, other organization',0,4,1,1,0,0,0,'',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (17,'4.70','No eligible respondent',0,4,1,1,0,0,0,'',1,1);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (18,'2.35a','Accidental hang up or temporary phone problem',0,1,1,1,1,1,0,'O',1,1);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (19,'2.12a','Definite Appointment - Respondent',0,5,0,1,1,1,0,'R',1,1);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (20,'2.12b','Definite Appointment - Other',0,5,0,1,1,1,0,'R',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (21,'2.13a','Unspecified Appointment - Respondent',0,5,0,1,1,1,0,'R',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (22,'2.13b','Unspecified Appointment - Other',0,5,0,1,1,1,0,'R',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (23,'2.221','Household answering machine - Message left',180,1,1,1,1,1,0,'NC',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (24,'2.222','Household answering machine - No message left',180,1,1,1,1,1,0,'NC',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (25,'2.31','Respondent Dead',0,4,0,1,0,1,0,'O',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (26,'2.32','Physically or mentally unable/incompetent',0,4,0,1,0,1,0,'O',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (27,'2.331','Household level language problem',0,4,1,1,0,1,0,'O',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (28,'2.332','Respondent language problem',0,4,0,1,0,1,0,'O',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (29,'3.14','Answering machine - Not a household',0,4,1,1,0,0,0,'UH',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (30,'4.10','Out of sample',0,4,0,1,0,0,0,'',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (31,'2.20','Non contact',180,1,1,1,1,1,0,'NC',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (32,'4.80','Quota filled',0,4,0,1,0,0,0,'',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (33,'2.36','Miscellaneous - Unavailable for a week',10080,1,0,1,1,1,0,'O',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (40,'1.1','Self completed online',0,4,0,1,1,1,0,'I',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (41,'2.36','Self completion email invitation sent',10080,1,0,1,1,1,0,'O',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (42,'3.90','Max call attempts reached (Unknown eligibility)',0,1,0,1,1,0,0,'UH',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (43,'3.90','Max calls reached (Unknown eligibility)',0,1,0,1,1,0,0,'UH',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (44,'2.30','Max call attempts reached (Eligible)',0,1,0,1,1,1,0,'O',1,0);
|
||||
INSERT INTO `outcome` (`outcome_id`, `aapor_id`, `description`, `default_delay_minutes`, `outcome_type_id`, `tryanother`, `contacted`, `tryagain`, `eligible`, `require_note`, `calc`, `default`, `permanent`) VALUES (45,'2.30','Max calls reached (Eligible)',0,1,0,1,1,1,0,'O',1,0);
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@@ -1219,6 +1221,7 @@ CREATE TABLE `questionnaire` (
|
||||
`lime_template` varchar(128) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Limesurvey template for respondent self completion',
|
||||
`lime_endurl` varchar(256) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Forwarding end URL for respondent self completion',
|
||||
`enabled` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`outcomes` varchar(256) COLLATE utf8_unicode_ci NULL DEFAULT '1,2,3,7,9,10,14,17,18,19' COMMENT 'Comma-separated string of outcomes defined for the questionnaire',
|
||||
PRIMARY KEY (`questionnaire_id`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
||||
|
||||
|
||||
10
db.inc.php
10
db.inc.php
@@ -47,10 +47,10 @@ if (!(include_once(ADODB_PATH . 'adodb.inc.php')))
|
||||
/**
|
||||
* Include ADODB session handling functions
|
||||
*/
|
||||
if (!(include_once(ADODB_PATH . 'session/adodb-session2.php')))
|
||||
{
|
||||
print "<p>ERROR: Please modify config.inc.php for ADODB_PATH to point to your ADODb installation</p>";
|
||||
}
|
||||
//if (!(include_once(ADODB_PATH . 'session/adodb-session2.php')))
|
||||
//{
|
||||
// print "<p>ERROR: Please modify config.inc.php for ADODB_PATH to point to your ADODb installation</p>";
|
||||
//}
|
||||
|
||||
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'));
|
||||
|
||||
|
||||
/**
|
||||
|
||||
50
email.php
50
email.php
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
@@ -72,7 +72,7 @@ $operator_id = get_operator_id();
|
||||
|
||||
$msg = "";
|
||||
|
||||
if (isset($_POST['firstname']))
|
||||
if (isset($_POST['email']) && ((isset($_POST['firstname']) && !empty($_POST['firstname'])) || (isset($_POST['lastname']) && !empty($_POST['lastname']))))
|
||||
{
|
||||
//validate email address
|
||||
if (validate_email($_POST['email']))
|
||||
@@ -278,21 +278,23 @@ if (isset($_POST['firstname']))
|
||||
}
|
||||
//disable recording
|
||||
$newtext = T_("Start REC");
|
||||
$js = "js/window.js";
|
||||
if (browser_ie()) $js = "js/window_ie6.js";
|
||||
|
||||
if (isset($_GET['interface2'])) { if (browser_ie()) $js = "js/window_ie6_interface2.js"; else $js = "js/window_interface2.js";}
|
||||
else { if (browser_ie()) $js = "js/window_ie6.js"; else $js = "js/window.js"; }
|
||||
|
||||
if (isset($_GET['interface2']))
|
||||
{
|
||||
xhtml_head(T_("Email"),true,array("css/call.css"),array($js),"onload='openParent(\"endcase=endcase\");'");
|
||||
xhtml_head(T_("Invitation Email"),true,array("css/call.css"),array($js),"onload='openParent(\"endcase=endcase\");'");
|
||||
}
|
||||
else
|
||||
{
|
||||
xhtml_head(T_("Email"),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();'");
|
||||
xhtml_head(T_("Invitation Email"),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();'");
|
||||
}
|
||||
|
||||
}
|
||||
else if (isset($_POST['submit']))
|
||||
{
|
||||
xhtml_head(T_("Email"),true,array("css/call.css"),false,"onload='parent.closePopup();'");
|
||||
xhtml_head(T_("Invitation Email"),true,array("css/call.css"),false,"onload='parent.closePopup();'");
|
||||
}
|
||||
xhtml_foot();
|
||||
die();
|
||||
@@ -310,10 +312,10 @@ if (isset($_POST['firstname']))
|
||||
|
||||
$case_id = get_case_id($operator_id);
|
||||
|
||||
$js = "js/window.js";
|
||||
if (browser_ie()) $js = "js/window_ie6.js";
|
||||
if (isset($_GET['interface2'])) { if (browser_ie()) $js = "js/window_ie6_interface2.js"; else $js = "js/window_interface2.js"; }
|
||||
else { if (browser_ie()) $js = "js/window_ie6.js"; else $js = "js/window.js"; }
|
||||
|
||||
xhtml_head(T_("Email"),true,array("css/call.css"),array($js));
|
||||
xhtml_head(T_("Invitation Email"),true,array("include/bootstrap/css/bootstrap.min.css"),array($js));
|
||||
|
||||
$sql = "SELECT q.self_complete
|
||||
FROM questionnaire as q, `case` as c
|
||||
@@ -333,22 +335,30 @@ if ($sc == 1)
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
print "<div class='status'>" . T_("Email respondent for self completion") . "</div>";
|
||||
if (!empty($msg)) print "<p>$msg</p>";
|
||||
print "<h4>" . T_("Email respondent for self completion") . "</h4>";
|
||||
if (!empty($msg)) print "<p class='alert alert-warning'>$msg</p>";
|
||||
print "<form action='?";
|
||||
if (isset($_GET['interface2']))
|
||||
{
|
||||
print "interface2=true";
|
||||
}
|
||||
print "' method='post'>";
|
||||
print "<div><label for='firstname'>" . T_("First name") . "</label><input type='text' value='{$rs['firstname']}' name='firstname' id='firstname'/></div>";
|
||||
print "<div><label for='lastname'>" . T_("Last name") . "</label><input type='text' value='{$rs['lastname']}' name='lastname' id='lastname'/></div>";
|
||||
print "<div><label for='email'>" . T_("Email") . "</label><input type='text' value='{$rs['email']}' name='email' id='email'/></div>";
|
||||
if (!isset($_GET['interface2']))
|
||||
{
|
||||
print "<div><input type='submit' value=\"" . T_("Send invitation") . "\" name='submit' id='submit'/></div>";
|
||||
print "' method='post' class='form-horizontal col-md-12'>";
|
||||
|
||||
print "<div class='form-group '><label for='firstname' class='control-label'>" . T_("First name") . "</label>
|
||||
<input type='text' value='{$rs['firstname']}' name='firstname' id='firstname' class='form-control'/>
|
||||
</div>";
|
||||
print "<div class='form-group '><label for='lastname' class='control-label'>" . T_("Last name") . "</label>
|
||||
<input type='text' value='{$rs['lastname']}' name='lastname' id='lastname' class='form-control'/>
|
||||
</div>";
|
||||
print "<div class='form-group '><label for='email' class='control-label'>" . T_("Email") . "</label>
|
||||
<input type='email' value='{$rs['email']}' name='email' id='email' class='form-control' required />
|
||||
</div>";
|
||||
if (!isset($_GET['interface2'])) {
|
||||
print "<div class='form-group '><input type='submit' class='btn btn-primary' value=\"" . T_("Send invitation") . "\" name='submit' id='submit'/></div>";
|
||||
}
|
||||
print "<div><input type='submit' value=\"" . T_("Send invitation and Hang up") . "\" name='submith' id='submith'/></div></form>";
|
||||
print "<div class='form-group '><input type='submit' class='btn btn-primary' value=\"" . T_("Send invitation and Hang up") . "\" name='submith' id='submith'/>
|
||||
<div class='col-md-6 pull-right'><a class='btn btn-default pull-right' href='javascript:parent.closePopup();'>".T_("Cancel")."</a></div><div class='clearfix'></div>
|
||||
</div></form>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -39,7 +39,7 @@ include_once("lang.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include_once("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -190,26 +190,20 @@ function display_respondent_list($case_id,$respondent_id = false,$first = false)
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
if (count($rs) >1 ){
|
||||
print "<div><p>" . T_("Select a respondent") . ":
|
||||
<select id='respondent_id' name='respondent_id' onchange=\"LinkUp('respondent_id')\"><option>" . T_("None") . "</option>";
|
||||
print "<div><p><b>" . T_("Select a respondent") . "</b>:
|
||||
<select id='respondent_id' name='respondent_id' onchange=\"LinkUp('respondent_id')\">";//<option>" . T_("None") . "</option>
|
||||
if (!empty($rs))
|
||||
{
|
||||
foreach($rs as $r)
|
||||
{
|
||||
$rid = $r['respondent_id'];
|
||||
if ($respondent_id == false && $first == true)
|
||||
{
|
||||
$first = false;
|
||||
$selected = "selected='selected'";
|
||||
$respondent_id = $rid;
|
||||
}
|
||||
else $selected = "";
|
||||
|
||||
if ($rid == $respondent_id) $selected="selected='selected'";
|
||||
print "<option value='?respondent_id=$rid' $selected>{$r['firstName']} {$r['lastName']}</option>";
|
||||
if ($respondent_id == $r['respondent_id']) $selected="selected='selected'"; else $selected = "";
|
||||
print "<option value='?respondent_id={$r['respondent_id']}' $selected>{$r['firstName']} {$r['lastName']}</option>";
|
||||
}
|
||||
if($respondent_id ==0) print "<option value='?respondent_id=0' selected='selected' class='addresp'>" . T_("Add respondent") . "</option>";
|
||||
}
|
||||
print "<option value='?respondent_id=0' class='addresp'>" . T_("Add respondent") . "</option></select></p></div>";
|
||||
if($respondent_id !=0) print "<option value='?respondent_id=0' class='addresp'>" . T_("Add respondent") . "</option>";
|
||||
|
||||
print "</select></p></div>";
|
||||
}
|
||||
else { echo " <b>",$rs[0]['firstName']," ",$rs[0]['lastName'],"</b>"; $respondent_id =$rs[0]['respondent_id'];}
|
||||
|
||||
@@ -258,13 +252,14 @@ function display_respondent_form($respondent_id = false,$case_id = false)
|
||||
|
||||
$rs = $db->Execute($sql);
|
||||
|
||||
print "<div><label for='firstName'>" . T_("First name:") . "</label><input type=\"text\" id='firstName' name=\"firstName\" value=\"$fn\"/></div>
|
||||
<div><label for='lastName'>" . T_("Last name:") . " </label><input type=\"text\" id='lastName' name=\"lastName\" value=\"$ln\"/></div>";
|
||||
|
||||
print "<p><label for='firstName'>" . T_("First name:") . "</label><input type=\"text\" class=\"form-control\" id='firstName' name=\"firstName\" value=\"$fn\"/></p>
|
||||
<p><label for='lastName'>" . T_("Last name:") . " </label><input type=\"text\" class=\"form-control\" id='lastName' name=\"lastName\" value=\"$ln\"/></p>";
|
||||
|
||||
/**
|
||||
* Display the current respondent zone in a drop down box with other zones from timezone_template
|
||||
*/
|
||||
print "<div><label>" . T_("Time Zone:") . " ".$rs->GetMenu('Time_zone_name',$rzone,false)."</label></div>";
|
||||
print "<p><label>" . T_("Time Zone:") . "</label> ". $rs->GetMenu('Time_zone_name',$rzone,false,false,0,'class="form-control"'). "</p>";
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -111,19 +111,23 @@ function display_shift_chooser($questionnaire_id, $shift_id = false, $divclass=f
|
||||
* @param int|bool $sample_import_id The sample import id or false if none selected
|
||||
* @param bool $disabled Display disabled samples? (default is true)
|
||||
*/
|
||||
function display_sample_chooser($questionnaire_id, $sample_import_id = false, $disabled = true, $divclass=false, $selectclass=false)
|
||||
function display_sample_chooser($questionnaire_id, $sample_import_id = false, $disabled = true, $divclass=false, $selectclass=false, $quota_reached=false)
|
||||
{
|
||||
global $db;
|
||||
|
||||
$s = "";
|
||||
if (!$disabled) $s = " AND si.enabled = 1 "; else $s = "";
|
||||
|
||||
if (!$disabled)
|
||||
$s = " AND si.enabled = 1 ";
|
||||
if ($quota_reached){
|
||||
$qr = " LEFT JOIN (questionnaire_sample_quota as qsq, questionnaire_sample_quota_row as qsqr) on (si.sample_import_id = qsq.sample_import_id and si.sample_import_id = qsqr.sample_import_id)";
|
||||
$qrq = " AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1 )
|
||||
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)";
|
||||
}
|
||||
else { $qr = ""; $qrq = ""; }
|
||||
|
||||
$sql = "SELECT s.sample_import_id,si.description,CASE WHEN s.sample_import_id = '$sample_import_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||
FROM questionnaire_sample as s, sample_import as si
|
||||
FROM questionnaire_sample as s, sample_import as si $qr
|
||||
WHERE s.questionnaire_id = '$questionnaire_id'
|
||||
AND s.sample_import_id = si.sample_import_id $s";
|
||||
AND s.sample_import_id = si.sample_import_id $s $qrq";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
|
||||
@@ -441,57 +441,74 @@ function get_limesurvey_quota_info($lime_quota_id)
|
||||
|
||||
$ret = array();
|
||||
|
||||
$sql = "SELECT q.*,s.language
|
||||
$sql = "SELECT q.qid
|
||||
FROM ".LIME_PREFIX."quota_members as q, ".LIME_PREFIX."surveys as s
|
||||
WHERE q.quota_id='$lime_quota_id'
|
||||
AND s.sid = q.sid";
|
||||
AND s.sid = q.sid
|
||||
GROUP BY q.qid";
|
||||
|
||||
$rs = $db->GetAll($sql);
|
||||
$rsq = $db->GetAll($sql);
|
||||
|
||||
foreach($rs as $quota_entry)
|
||||
foreach ($rsq as $q)
|
||||
{
|
||||
$lime_qid = $quota_entry['qid'];
|
||||
$surveyid = $quota_entry['sid'];
|
||||
$language = $quota_entry['language'];
|
||||
$qid = $q['qid'];
|
||||
|
||||
$sql = "SELECT type, title,gid
|
||||
FROM ".LIME_PREFIX."questions
|
||||
WHERE qid='$lime_qid'
|
||||
AND language='$language'";
|
||||
|
||||
$qtype = $db->GetRow($sql);
|
||||
$sql = "SELECT q.*,s.language
|
||||
FROM ".LIME_PREFIX."quota_members as q, ".LIME_PREFIX."surveys as s
|
||||
WHERE q.quota_id='$lime_quota_id'
|
||||
AND s.sid = q.sid
|
||||
AND q.qid = $qid";
|
||||
|
||||
$fieldnames = "0";
|
||||
|
||||
if ($qtype['type'] == "I" || $qtype['type'] == "G" || $qtype['type'] == "Y")
|
||||
{
|
||||
$fieldnames= ($surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid']);
|
||||
$value = $quota_entry['code'];
|
||||
}
|
||||
|
||||
if($qtype['type'] == "L" || $qtype['type'] == "O" || $qtype['type'] =="!")
|
||||
{
|
||||
$fieldnames=( $surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid']);
|
||||
$value = $quota_entry['code'];
|
||||
}
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
if($qtype['type'] == "M")
|
||||
{
|
||||
$fieldnames=( $surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid'].$quota_entry['code']);
|
||||
$value = "Y";
|
||||
}
|
||||
|
||||
if($qtype['type'] == "A" || $qtype['type'] == "B")
|
||||
{
|
||||
$temp = explode('-',$quota_entry['code']);
|
||||
$fieldnames=( $surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid'].$temp[0]);
|
||||
$value = $temp[1];
|
||||
}
|
||||
|
||||
$r2 = array();
|
||||
|
||||
$ret[] = array('code' => $quota_entry['code'], 'value' => $value, 'qid' => $quota_entry['qid'], 'fieldname' => $fieldnames);
|
||||
foreach($rs as $quota_entry)
|
||||
{
|
||||
$lime_qid = $quota_entry['qid'];
|
||||
$surveyid = $quota_entry['sid'];
|
||||
$language = $quota_entry['language'];
|
||||
|
||||
$sql = "SELECT type, title,gid
|
||||
FROM ".LIME_PREFIX."questions
|
||||
WHERE qid='$lime_qid'
|
||||
AND language='$language'";
|
||||
|
||||
$qtype = $db->GetRow($sql);
|
||||
|
||||
$fieldnames = "0";
|
||||
|
||||
if ($qtype['type'] == "I" || $qtype['type'] == "G" || $qtype['type'] == "Y")
|
||||
{
|
||||
$fieldnames= ($surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid']);
|
||||
$value = $quota_entry['code'];
|
||||
}
|
||||
|
||||
if($qtype['type'] == "L" || $qtype['type'] == "O" || $qtype['type'] =="!")
|
||||
{
|
||||
$fieldnames=( $surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid']);
|
||||
$value = $quota_entry['code'];
|
||||
}
|
||||
|
||||
if($qtype['type'] == "M")
|
||||
{
|
||||
$fieldnames=( $surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid'].$quota_entry['code']);
|
||||
$value = "Y";
|
||||
}
|
||||
|
||||
if($qtype['type'] == "A" || $qtype['type'] == "B")
|
||||
{
|
||||
$temp = explode('-',$quota_entry['code']);
|
||||
$fieldnames=( $surveyid.'X'.$qtype['gid'].'X'.$quota_entry['qid'].$temp[0]);
|
||||
$value = $temp[1];
|
||||
}
|
||||
|
||||
|
||||
$r2[] = array('code' => $quota_entry['code'], 'value' => $value, 'qid' => $quota_entry['qid'], 'fieldname' => $fieldnames);
|
||||
}
|
||||
|
||||
$ret[$qid] = $r2;
|
||||
}
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,9 +57,9 @@ function sRandomChars($length = 15,$pattern="23456789abcdefghijkmnpqrstuvwxyz")
|
||||
for($i=0;$i<$length;$i++)
|
||||
{
|
||||
if(isset($key))
|
||||
$key .= $pattern{rand(0,$patternlength)};
|
||||
$key .= $pattern{mt_rand(0,$patternlength)};
|
||||
else
|
||||
$key = $pattern{rand(0,$patternlength)};
|
||||
$key = $pattern{mt_rand(0,$patternlength)};
|
||||
}
|
||||
return $key;
|
||||
}
|
||||
@@ -354,8 +354,19 @@ function add_case($sample_id,$questionnaire_id,$operator_id = "NULL",$testing =
|
||||
{
|
||||
global $db;
|
||||
|
||||
$ttries = 0;
|
||||
|
||||
do {
|
||||
$token = sRandomChars();
|
||||
|
||||
$sql = "SELECT count(*) as c
|
||||
FROM `case`
|
||||
WHERE token = '$token'";
|
||||
|
||||
$ttries++;
|
||||
} while ($db->GetOne($sql) > 0 && $ttries < 10);
|
||||
|
||||
|
||||
$sql = "INSERT INTO `case` (case_id, sample_id, questionnaire_id, last_call_id, current_operator_id, current_call_id, current_outcome_id,token)
|
||||
VALUES (NULL, $sample_id, $questionnaire_id, NULL, $operator_id, NULL, '$current_outcome_id','$token')";
|
||||
|
||||
@@ -442,34 +453,34 @@ function add_case($sample_id,$questionnaire_id,$operator_id = "NULL",$testing =
|
||||
|
||||
if ($lime_sid)
|
||||
{
|
||||
$lfirstname = '';
|
||||
$llastname = '';
|
||||
$lemail = '';
|
||||
$lfirstname = "''";
|
||||
$llastname = "''";
|
||||
$lemail = "''";
|
||||
|
||||
if ($addlimeattributes)
|
||||
{
|
||||
$lfirstname = $db->GetOne("SELECT sv.val
|
||||
$lfirstname = $db->qstr($db->GetOne("SELECT sv.val
|
||||
FROM sample_var as sv, sample_import_var_restrict as s
|
||||
WHERE sv.var_id = s.var_id
|
||||
AND sv.sample_id = '$sample_id'
|
||||
AND s.type = '6'");
|
||||
AND s.type = '6'"));
|
||||
|
||||
$llastname = $db->GetOne("SELECT sv.val
|
||||
$llastname = $db->qstr($db->GetOne("SELECT sv.val
|
||||
FROM sample_var as sv, sample_import_var_restrict as s
|
||||
WHERE sv.var_id = s.var_id
|
||||
AND sv.sample_id = '$sample_id'
|
||||
AND s.type = '7'");
|
||||
AND s.type = '7'"));
|
||||
|
||||
$lemail = $db->GetOne("SELECT sv.val
|
||||
$lemail = $db->qstr($db->GetOne("SELECT sv.val
|
||||
FROM sample_var as sv, sample_import_var_restrict as s
|
||||
WHERE sv.var_id = s.var_id
|
||||
AND sv.sample_id = '$sample_id'
|
||||
AND s.type = '8'");
|
||||
AND s.type = '8'"));
|
||||
|
||||
}
|
||||
|
||||
$sql = "INSERT INTO ".LIME_PREFIX."tokens_$lime_sid (tid,firstname,lastname,email,token,language,sent,completed,mpid)
|
||||
VALUES (NULL,'$lfirstname','$llastname','$lemail','$token','".DEFAULT_LOCALE."','N','N',NULL)";
|
||||
VALUES (NULL,$lfirstname,$llastname,$lemail,'$token','".DEFAULT_LOCALE."','N','N',NULL)";
|
||||
|
||||
$db->Execute($sql);
|
||||
|
||||
@@ -485,7 +496,6 @@ function add_case($sample_id,$questionnaire_id,$operator_id = "NULL",$testing =
|
||||
WHERE sid = '$lime_sid'";
|
||||
|
||||
$names = $db->GetOne($sql);
|
||||
|
||||
$attdescriptiondata=explode("\n",$names);
|
||||
$atts=array();
|
||||
|
||||
@@ -503,8 +513,10 @@ function add_case($sample_id,$questionnaire_id,$operator_id = "NULL",$testing =
|
||||
AND sv.sample_id = '$sample_id'
|
||||
AND s.var LIKE '$val'");
|
||||
|
||||
$lval = $db->qstr($lval);
|
||||
|
||||
$sql = "UPDATE " . LIME_PREFIX . "tokens_$lime_sid
|
||||
SET $key = '$lval'
|
||||
SET $key = $lval
|
||||
WHERE tid = '$tid'";
|
||||
|
||||
$db->Execute($sql);
|
||||
@@ -715,6 +727,7 @@ function get_case_id($operator_id, $create = false)
|
||||
}
|
||||
$r2 = $db->GetRow($sql);
|
||||
|
||||
|
||||
if (empty($r2))
|
||||
{
|
||||
|
||||
|
||||
@@ -135,14 +135,15 @@ function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight
|
||||
foreach ($fields as $e)
|
||||
{
|
||||
print "<td>";
|
||||
if (isset($row[$e])) print $row[$e];
|
||||
print "</td>";
|
||||
if ($total && in_array($e,$total))
|
||||
{
|
||||
if (!isset($tot[$e]))
|
||||
$tot[$e] = 0;
|
||||
$tot[$e] += $row[$e];
|
||||
if (isset($row[$e])) {
|
||||
if ($total && in_array($e,$total)) {
|
||||
if (!isset($tot[$e])) $tot[$e] = 0;
|
||||
$tot[$e] += $row[$e];
|
||||
print "<span class=\"pull-right\">" . $row[$e] . "</span>";
|
||||
}
|
||||
else print $row[$e];
|
||||
}
|
||||
print "</td>";
|
||||
}
|
||||
print "</tr>";
|
||||
}
|
||||
@@ -151,7 +152,7 @@ function xhtml_table($content,$fields,$head = false,$class = "tclass",$highlight
|
||||
print "</tbody><tfoot><tr>";
|
||||
foreach ($fields as $e)
|
||||
{
|
||||
print "<td><b>";
|
||||
print "<td><b class=\"pull-right\">";
|
||||
if (in_array($e,$total))
|
||||
print $tot[$e];
|
||||
print "</b></td>";
|
||||
|
||||
1
include/bootstrap-toggle/js/bootstrap-toggle.min.js.map
Normal file
1
include/bootstrap-toggle/js/bootstrap-toggle.min.js.map
Normal file
@@ -0,0 +1 @@
|
||||
{"version":3,"file":"bootstrap-toggle.min.js","sources":["bootstrap-toggle.js"],"names":["$","Plugin","option","this","each","$this","data","options","Toggle","element","$element","extend","defaults","render","VERSION","DEFAULTS","on","off","onstyle","offstyle","size","style","width","height","prototype","attr","_onstyle","_offstyle","$toggleOn","html","addClass","$toggleOff","$toggleHandle","$toggleGroup","append","$toggle","prop","wrap","parent","Math","max","outerWidth","outerHeight","css","update","trigger","toggle","silent","removeClass","enable","removeAttr","disable","change","proxy","destroy","remove","removeData","unwrap","old","fn","bootstrapToggle","Constructor","noConflict","document","e","$checkbox","find","preventDefault","jQuery"],"mappings":";;;;;;;CASE,SAAUA,GACV,YAoID,SAASC,GAAOC,GACf,MAAOC,MAAKC,KAAK,WAChB,GAAIC,GAAUL,EAAEG,MACZG,EAAUD,EAAMC,KAAK,aACrBC,EAA2B,gBAAVL,IAAsBA,CAEtCI,IAAMD,EAAMC,KAAK,YAAcA,EAAO,GAAIE,GAAOL,KAAMI,IACvC,gBAAVL,IAAsBI,EAAKJ,IAASI,EAAKJ,OAtItD,GAAIM,GAAS,SAAUC,EAASF,GAC/BJ,KAAKO,SAAYV,EAAES,GACnBN,KAAKI,QAAYP,EAAEW,UAAWR,KAAKS,WAAYL,GAC/CJ,KAAKU,SAGNL,GAAOM,QAAW,QAElBN,EAAOO,UACNC,GAAI,KACJC,IAAK,MACLC,QAAS,UACTC,SAAU,UACVC,KAAM,SACNC,MAAO,GACPC,MAAO,KACPC,OAAQ,MAGTf,EAAOgB,UAAUZ,SAAW,WAC3B,OACCI,GAAIb,KAAKO,SAASe,KAAK,YAAcjB,EAAOO,SAASC,GACrDC,IAAKd,KAAKO,SAASe,KAAK,aAAejB,EAAOO,SAASE,IACvDC,QAASf,KAAKO,SAASe,KAAK,iBAAmBjB,EAAOO,SAASG,QAC/DC,SAAUhB,KAAKO,SAASe,KAAK,kBAAoBjB,EAAOO,SAASI,SACjEC,KAAMjB,KAAKO,SAASe,KAAK,cAAgBjB,EAAOO,SAASK,KACzDC,MAAOlB,KAAKO,SAASe,KAAK,eAAiBjB,EAAOO,SAASM,MAC3DC,MAAOnB,KAAKO,SAASe,KAAK,eAAiBjB,EAAOO,SAASO,MAC3DC,OAAQpB,KAAKO,SAASe,KAAK,gBAAkBjB,EAAOO,SAASQ,SAI/Df,EAAOgB,UAAUX,OAAS,WACzBV,KAAKuB,SAAW,OAASvB,KAAKI,QAAQW,QACtCf,KAAKwB,UAAY,OAASxB,KAAKI,QAAQY,QACvC,IAAIC,GAA6B,UAAtBjB,KAAKI,QAAQa,KAAmB,SAClB,UAAtBjB,KAAKI,QAAQa,KAAmB,SACV,SAAtBjB,KAAKI,QAAQa,KAAkB,SAC/B,GACCQ,EAAY5B,EAAE,uBAAuB6B,KAAK1B,KAAKI,QAAQS,IACzDc,SAAS3B,KAAKuB,SAAW,IAAMN,GAC7BW,EAAa/B,EAAE,uBAAuB6B,KAAK1B,KAAKI,QAAQU,KAC1Da,SAAS3B,KAAKwB,UAAY,IAAMP,EAAO,WACrCY,EAAgBhC,EAAE,gDACpB8B,SAASV,GACPa,EAAejC,EAAE,8BACnBkC,OAAON,EAAWG,EAAYC,GAC5BG,EAAUnC,EAAE,iDACd8B,SAAU3B,KAAKO,SAAS0B,KAAK,WAAajC,KAAKuB,SAAWvB,KAAKwB,UAAU,QACzEG,SAASV,GAAMU,SAAS3B,KAAKI,QAAQc,MAEvClB,MAAKO,SAAS2B,KAAKF,GACnBnC,EAAEW,OAAOR,MACRgC,QAAShC,KAAKO,SAAS4B,SACvBV,UAAWA,EACXG,WAAYA,EACZE,aAAcA,IAEf9B,KAAKgC,QAAQD,OAAOD,EAEpB,IAAIX,GAAQnB,KAAKI,QAAQe,OAASiB,KAAKC,IAAIZ,EAAUa,aAAcV,EAAWU,cAAeT,EAAcS,aAAa,EACpHlB,EAASpB,KAAKI,QAAQgB,QAAUgB,KAAKC,IAAIZ,EAAUc,cAAeX,EAAWW,cACjFd,GAAUE,SAAS,aACnBC,EAAWD,SAAS,cACpB3B,KAAKgC,QAAQQ,KAAMrB,MAAOA,EAAOC,OAAQA,IACrCpB,KAAKI,QAAQgB,SAChBK,EAAUe,IAAI,cAAef,EAAUL,SAAW,MAClDQ,EAAWY,IAAI,cAAeZ,EAAWR,SAAW,OAErDpB,KAAKyC,QAAO,GACZzC,KAAK0C,SAAQ,IAGdrC,EAAOgB,UAAUsB,OAAS,WACrB3C,KAAKO,SAAS0B,KAAK,WAAYjC,KAAKc,MACnCd,KAAKa,MAGXR,EAAOgB,UAAUR,GAAK,SAAU+B,GAC/B,MAAI5C,MAAKO,SAAS0B,KAAK,aAAoB,GAC3CjC,KAAKgC,QAAQa,YAAY7C,KAAKwB,UAAY,QAAQG,SAAS3B,KAAKuB,UAChEvB,KAAKO,SAAS0B,KAAK,WAAW,QACzBW,GAAQ5C,KAAK0C,aAGnBrC,EAAOgB,UAAUP,IAAM,SAAU8B,GAChC,MAAI5C,MAAKO,SAAS0B,KAAK,aAAoB,GAC3CjC,KAAKgC,QAAQa,YAAY7C,KAAKuB,UAAUI,SAAS3B,KAAKwB,UAAY,QAClExB,KAAKO,SAAS0B,KAAK,WAAW,QACzBW,GAAQ5C,KAAK0C,aAGnBrC,EAAOgB,UAAUyB,OAAS,WACzB9C,KAAKgC,QAAQe,WAAW,YACxB/C,KAAKO,SAAS0B,KAAK,YAAY,IAGhC5B,EAAOgB,UAAU2B,QAAU,WAC1BhD,KAAKgC,QAAQV,KAAK,WAAY,YAC9BtB,KAAKO,SAAS0B,KAAK,YAAY,IAGhC5B,EAAOgB,UAAUoB,OAAS,SAAUG,GAC/B5C,KAAKO,SAAS0B,KAAK,YAAajC,KAAKgD,UACpChD,KAAK8C,SACN9C,KAAKO,SAAS0B,KAAK,WAAYjC,KAAKa,GAAG+B,GACtC5C,KAAKc,IAAI8B,IAGfvC,EAAOgB,UAAUqB,QAAU,SAAUE,GACpC5C,KAAKO,SAASO,IAAI,oBACb8B,GAAQ5C,KAAKO,SAAS0C,SAC3BjD,KAAKO,SAASM,GAAG,mBAAoBhB,EAAEqD,MAAM,WAC5ClD,KAAKyC,UACHzC,QAGJK,EAAOgB,UAAU8B,QAAU,WAC1BnD,KAAKO,SAASO,IAAI,oBAClBd,KAAK8B,aAAasB,SAClBpD,KAAKO,SAAS8C,WAAW,aACzBrD,KAAKO,SAAS+C,SAiBf,IAAIC,GAAM1D,EAAE2D,GAAGC,eAEf5D,GAAE2D,GAAGC,gBAA8B3D,EACnCD,EAAE2D,GAAGC,gBAAgBC,YAAcrD,EAKnCR,EAAE2D,GAAGb,OAAOgB,WAAa,WAExB,MADA9D,GAAE2D,GAAGC,gBAAkBF,EAChBvD,MAMRH,EAAE,WACDA,EAAE,6CAA6C4D,oBAGhD5D,EAAE+D,UAAU/C,GAAG,kBAAmB,2BAA4B,SAASgD,GACtE,GAAIC,GAAYjE,EAAEG,MAAM+D,KAAK,uBAC7BD,GAAUL,gBAAgB,UAC1BI,EAAEG,oBAGFC"}
|
||||
@@ -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:")."<select id='quexsfilterinc' name='quexsfilterinc' onchange='javascript:document.getElementById(\"limit\").value=\"\";submit();'>\n"
|
||||
."\t<option value='all' >".T_("All queXS questionnaires and samples associated with this instrument")."</option>\n"
|
||||
. get_questionnaire_sample_list($surveyid,$quexsfilterstate)
|
||||
|
||||
@@ -671,7 +671,7 @@ for ($i=0; $i<$fieldcount; $i++)
|
||||
}
|
||||
elseif (substr($fieldinfo,0,10)=="attribute_")
|
||||
{
|
||||
if ($type == "csv") {$firstline .= CSVEscape($fieldinfo)."$separator";}
|
||||
if ($type == "csv") {$firstline .= "\"".$attributeFieldAndNames[$fieldinfo] ."\"$separator";}
|
||||
else {$firstline .= $attributeFieldAndNames[$fieldinfo]."$separator";}
|
||||
}
|
||||
elseif ($fieldinfo == "id")
|
||||
@@ -838,7 +838,7 @@ if ($answers == "short") //Nice and easy. Just dump the data straight
|
||||
$rowcounter=0;
|
||||
while ($drow = $dresult->FetchRow())
|
||||
{
|
||||
$drow=array_map('strip_tags_full',$drow);
|
||||
$drow=array_map('strip_tags_full',$drow); if (isset($drow['caseoutcome'])) $drow['caseoutcome'] = T_($drow['caseoutcome']);
|
||||
if($convertyto1 == "Y")
|
||||
//Converts "Y" to "1" in export
|
||||
{
|
||||
|
||||
@@ -155,9 +155,9 @@ if(!isset($_SESSION['loginID']) && $action != "forgotpass" && ($action != "logou
|
||||
$loginsummary = '
|
||||
|
||||
<form class="form-signin" name="forgotpassword" id="forgotpassword" method="post" action="'.$homeurl.'/admin.php" >
|
||||
<h2>'.$clang->gT('You have to enter user name and email.').'</h2><p><br /> <br />
|
||||
<label for="user">'.$clang->gT('Username').'</label><input name="user" id="user" class="form-control" placeholder="User name" required autofocus type="text" size="60" maxlength="60" value="" />
|
||||
<label for="email">'.$clang->gT('Email').'</label><input name="email" id="email" class="form-control" placeholder="Email" required type="text" size="60" maxlength="60" value="" /></p>
|
||||
<h2>'.$clang->gT('You have to enter user name and email.').'</h2><br/>
|
||||
<p><label for="user">'.$clang->gT('Username').'</label><input name="user" id="user" class="form-control" placeholder="'.$clang->gT('Username').'" required autofocus type="text" size="60" maxlength="60" value="" /></p>
|
||||
<p><label for="email">'.$clang->gT('Email').'</label><input name="email" id="email" class="form-control" placeholder="'.$clang->gT('Email').'" required type="text" size="60" maxlength="60" value="" /></p>
|
||||
<input type="hidden" name="action" value="forgotpass" />
|
||||
<p><button class="action btn btn-lg btn-primary btn-block" type="submit">'.$clang->gT('Check Data').'</button></p>
|
||||
<p><a href="'.$scriptname.'">'.$clang->gT('Main Admin Screen').'</a></p>
|
||||
@@ -208,18 +208,18 @@ if(!isset($_SESSION['loginID']) && $action != "forgotpass" && ($action != "logou
|
||||
{
|
||||
if (!isset($logoutsummary))
|
||||
{
|
||||
$loginsummary = "<form name='loginform' id='loginform' class='form-signin' method='post' action='$homeurl/admin.php' ><h2>".$clang->gT("You have to login first.")."</h2><p><br /> <br />";
|
||||
$loginsummary = "<form name='loginform' id='loginform' class='form-signin' method='post' action='$homeurl/admin.php' ><h2>".$clang->gT("You have to login first.")."</h2><br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
$loginsummary = "<form name='loginform' id='loginform' class='form-signin' method='post' action='$homeurl/admin.php' ><br /><strong>".$logoutsummary."</strong><br /> <br />";
|
||||
$loginsummary = "<form name='loginform' id='loginform' class='form-signin' method='post' action='$homeurl/admin.php' ><br /><strong>".$logoutsummary."</strong><br /><br />";
|
||||
}
|
||||
|
||||
$loginsummary .= "<label for='user'>".$clang->gT("Username")."</label>
|
||||
<input class='form-control' placeholder='User name' required autofocus name='user' id='user' type='text' size='40' maxlength='40' value='' />
|
||||
<label for='password'>".$clang->gT("Password")."</label>
|
||||
<input name='password' id='password' class='form-control' placeholder='Password' required type='password' size='40' maxlength='40' />
|
||||
<label for='loginlang'>".$clang->gT("Language")."</label>
|
||||
$loginsummary .= "<p><label for='user'>".$clang->gT("Username")."</label>
|
||||
<input class='form-control' placeholder='".$clang->gT("Username")."' required autofocus name='user' id='user' type='text' size='40' maxlength='40' value='' /></p>
|
||||
<p><label for='password'>".$clang->gT("Password")."</label>
|
||||
<input name='password' id='password' class='form-control' placeholder='".$clang->gT("Password")."' required type='password' size='40' maxlength='40' /></p>
|
||||
<p><label for='loginlang'>".$clang->gT("Language")."</label>
|
||||
<select id='loginlang' class='form-control' name='loginlang'>\n";
|
||||
$loginsummary .='<option value="default" selected="selected">'.$clang->gT('Default').'</option>';
|
||||
$lan=array();
|
||||
@@ -233,10 +233,10 @@ if(!isset($_SESSION['loginID']) && $action != "forgotpass" && ($action != "logou
|
||||
//The following conditional statements select the browser language in the language drop down box and echoes the other options.
|
||||
$loginsummary .= "\t\t\t\t<option value='$langkey'>".$languagekind['nativedescription']." - ".$languagekind['description']."</option>\n";
|
||||
}
|
||||
$loginsummary .= "\t\t\t</select>\n
|
||||
<p><input type='hidden' name='action' value='login' />
|
||||
$loginsummary .= "\t\t\t</select></p>\n
|
||||
<input type='hidden' name='action' value='login' />
|
||||
<input type='hidden' name='refererargs' value='".$refererargs."' />
|
||||
<button class='action btn btn-lg btn-primary btn-block' type='submit'>".$clang->gT("Login")."</button>";
|
||||
<p><button class='action btn btn-lg btn-primary btn-block' type='submit'>".$clang->gT("Login")."</button></p>";
|
||||
}
|
||||
else{
|
||||
$loginsummary .= "<p>".sprintf($clang->gT("You have exceeded you maximum login attempts. Please wait %d minutes before trying again"),($timeOutTime/60))."<br /></p>";
|
||||
@@ -244,9 +244,9 @@ if(!isset($_SESSION['loginID']) && $action != "forgotpass" && ($action != "logou
|
||||
|
||||
if ($display_user_password_in_email === true)
|
||||
{
|
||||
$loginsummary .= "<p><a href='$scriptname?action=forgotpassword'>".$clang->gT("Forgot Your Password?")."</a><br /> \n";
|
||||
$loginsummary .= "<a href='$scriptname?action=forgotpassword'>".$clang->gT("Forgot Your Password?")."</a><br /> \n";
|
||||
}
|
||||
$loginsummary .= " </form><br /><p>";
|
||||
$loginsummary .= " </form><br />";
|
||||
$loginsummary .= " <script type='text/javascript'>\n";
|
||||
$loginsummary .= " document.getElementById('user').focus();\n";
|
||||
$loginsummary .= " </script>\n";
|
||||
|
||||
@@ -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');}
|
||||
|
||||
@@ -8,7 +8,7 @@ $(document).ready(function(){
|
||||
|
||||
function templatechange()
|
||||
{
|
||||
standardtemplates=['quexs','basic','bluengrey','business_grey','citronade','clear_logo','default','eirenicon','limespired','mint_idea','sherpa','vallendar'];
|
||||
standardtemplates=['skeletonquest','quexs','basic','bluengrey','business_grey','citronade','clear_logo','default','eirenicon','limespired','mint_idea','sherpa','vallendar'];
|
||||
if (in_array(this.value,standardtemplates))
|
||||
{
|
||||
$("#preview").attr('src',standardtemplaterooturl+'/'+this.value+'/preview.png');
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -31,7 +31,7 @@ p {
|
||||
background: #121a28;
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
margin-bottom:400px;
|
||||
margin-bottom:20px;
|
||||
clear:left;
|
||||
}
|
||||
|
||||
|
||||
@@ -139,7 +139,7 @@ if (!isset($_SESSION['loginID']))
|
||||
if ($result)
|
||||
{
|
||||
// wrong or unknown username
|
||||
$loginsummary .= "<p>".$clang->gT("Incorrect username and/or password!")."<br />";
|
||||
$loginsummary .= "<p>".$clang->gT("Incorrect username and/or password!")."</p><br />";
|
||||
if ($intNthAttempt+1>=$maxLoginAttempt)
|
||||
$loginsummary .= sprintf($clang->gT("You have exceeded you maximum login attempts. Please wait %d minutes before trying again"),($timeOutTime/60))."<br />";
|
||||
$loginsummary .= "<br /><a href='$scriptname'>".$clang->gT("Continue")."</a><br /> \n";
|
||||
|
||||
@@ -318,7 +318,7 @@ function getqtypelist($SelectedCode = "T", $ReturnType = "selector")
|
||||
*/
|
||||
function isStandardTemplate($sTemplateName)
|
||||
{
|
||||
return in_array($sTemplateName,array('quexs',
|
||||
return in_array($sTemplateName,array('skeletonquest','quexs',
|
||||
'basic',
|
||||
'bluengrey',
|
||||
'business_grey',
|
||||
|
||||
@@ -67,8 +67,7 @@ $debug = 0; // Set this to 1 if you are looking f
|
||||
// LimeSurvey developers: Set this to 3 to circumvent the restriction to remove the installation directory and full access to standard templates
|
||||
// or to change the password. If you set it to 3 then PHP STRICT warnings will be shown additionally.
|
||||
|
||||
$defaultlang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
|
||||
if (empty($defaultlang)) $defaultlang = DEFAULT_LOCALE;
|
||||
$defaultlang = isset($_SERVER["HTTP_ACCEPT_LANGUAGE"]) ? substr($_SERVER["HTTP_ACCEPT_LANGUAGE"],0,2) : DEFAULT_LOCALE;
|
||||
|
||||
$defaulttemplate = "quexs";
|
||||
$siteadminemail = "quexs@acspri.org.au";
|
||||
@@ -89,4 +88,3 @@ $siteadminemail = "quexs@acspri.org.au";
|
||||
// 'manage_label' => 1);
|
||||
//
|
||||
|
||||
$sessionhandler = 'db';
|
||||
|
||||
@@ -483,6 +483,7 @@ else
|
||||
}
|
||||
|
||||
|
||||
killSession();
|
||||
header("Location: {$url}");
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
|
||||
|
||||
BIN
include/limesurvey/templates/quexs/print_img_checkbox.png
Normal file
BIN
include/limesurvey/templates/quexs/print_img_checkbox.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 105 B |
BIN
include/limesurvey/templates/quexs/print_img_radio.png
Normal file
BIN
include/limesurvey/templates/quexs/print_img_radio.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 170 B |
46
include/limesurvey/templates/skeletonquest/Copyright
Normal file
46
include/limesurvey/templates/skeletonquest/Copyright
Normal file
@@ -0,0 +1,46 @@
|
||||
Copyright (C) 2013 Denis Chenu http://www.sondages.pro
|
||||
SkeletonQuest is distributed under MIT License
|
||||
SkeletonQuest is distributed under GPL License v3
|
||||
|
||||
GPL
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
MIT
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
--------------------------------------------------------------------
|
||||
Credits
|
||||
--------------------------------------------------------------------
|
||||
Skeleton V1.1, Copyright 2011, Dave Gamache, http://www.getskeleton.com under open-source MIT license
|
||||
Inspiration by Spip-dist http://www.spip.net/ , Collectif SPIP distributed under GPL licence
|
||||
Inspiration by THE CSS NINJA http://cssn.in/ja/023, Ryan Seddon
|
||||
Inspiration by Bootstrap http://getbootstrap.com/ under Apache License.
|
||||
Inspiration by jquery mobile http://jquerymobile.com/ under Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
Tango Icon Project http://tango.freedesktop.org/ distributed under Public Domain
|
||||
675
include/limesurvey/templates/skeletonquest/Copyright-GPL
Normal file
675
include/limesurvey/templates/skeletonquest/Copyright-GPL
Normal file
@@ -0,0 +1,675 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
|
||||
23
include/limesurvey/templates/skeletonquest/Copyright-MIT
Normal file
23
include/limesurvey/templates/skeletonquest/Copyright-MIT
Normal file
@@ -0,0 +1,23 @@
|
||||
SkeletonQuest is distributed under MIT License (MIT)
|
||||
|
||||
Copyright (c) 2013 Denis Chenu
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
18
include/limesurvey/templates/skeletonquest/README
Normal file
18
include/limesurvey/templates/skeletonquest/README
Normal file
@@ -0,0 +1,18 @@
|
||||
Copyright (C) 2010-2013 Denis Chenu http://www.sondages.pro
|
||||
SkeletonQuest is distributed under MIT License
|
||||
SkeletonQuest is distributed under GPL License v3
|
||||
|
||||
SkeletonQuest is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
See Copyright for licence detail
|
||||
|
||||
Copyright (C) 2010-2013 Denis Chenu for http://sondages.pro distributed under GPL 3 licence
|
||||
Inspiration by Skeleton V1.1, Copyright 2011, Dave Gamache, http://www.getskeleton.com under open-source MIT license
|
||||
Inspiration by Spip-dist http://www.spip.net/ , Collectif SPIP distributed under GPL licence
|
||||
Inspiration by THE CSS NINJA http://cssn.in/ja/023, Ryan Seddon
|
||||
Inspiration by jquery mobile http://jquerymobile.com/ under Dual licensed under the MIT or GPL Version 2 licenses.
|
||||
|
||||
If this template give you satisfaction, please leave a link to http://www.sondages.pro
|
||||
@@ -0,0 +1,4 @@
|
||||
<div id="assessment" class="note">
|
||||
<h2>{ASSESSMENT_HEADING}</h2>
|
||||
{ASSESSMENTS}
|
||||
</div>
|
||||
@@ -0,0 +1,7 @@
|
||||
<div id="clearall" class="note">
|
||||
<ul class="info">
|
||||
<li class="answercleared">{ANSWERSCLEARED}</li>
|
||||
<li class="restart">{RESTART}</li>
|
||||
<li class="closewindow">{CLOSEWINDOW}</li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -0,0 +1,4 @@
|
||||
<div id="completed" class="note">
|
||||
<p class="text">{COMPLETED}</p>
|
||||
<p class="url">{URL}</p>
|
||||
</div>
|
||||
@@ -0,0 +1 @@
|
||||
</div><!-- endgroup -->
|
||||
16
include/limesurvey/templates/skeletonquest/endpage.pstpl
Normal file
16
include/limesurvey/templates/skeletonquest/endpage.pstpl
Normal file
@@ -0,0 +1,16 @@
|
||||
</div><!--endcontent-->
|
||||
<div id="footer">
|
||||
<ul id="credits">
|
||||
<li class="first">
|
||||
<a href="http://www.limesurvey.org/" title="LimeSurvey Website">Powered by LimeSurvey</a>
|
||||
</li>
|
||||
<li>
|
||||
</li>
|
||||
<li class="last">
|
||||
Template © 2012 <a href="http://www.sondages.pro" title="Vos enquêtes sur internet">Sondages Pro</a> distributed under <a href="http://www.gnu.org/licenses/gpl.txt">GPL licence</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div><!-- end container-->
|
||||
<script type="text/javascript" src="{TEMPLATEURL}sortable-question.js"></script>
|
||||
<script type="text/javascript" src="{TEMPLATEURL}template.js"></script>
|
||||
BIN
include/limesurvey/templates/skeletonquest/error.png
Normal file
BIN
include/limesurvey/templates/skeletonquest/error.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 564 B |
BIN
include/limesurvey/templates/skeletonquest/exclamation.png
Normal file
BIN
include/limesurvey/templates/skeletonquest/exclamation.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 701 B |
BIN
include/limesurvey/templates/skeletonquest/favicon.ico
Normal file
BIN
include/limesurvey/templates/skeletonquest/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
674
include/limesurvey/templates/skeletonquest/gpl-3.0.txt
Normal file
674
include/limesurvey/templates/skeletonquest/gpl-3.0.txt
Normal file
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -0,0 +1 @@
|
||||
<div class="groupdescription text">{GROUPDESCRIPTION}</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user