mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Fixes by Alex (thank you!)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -43,7 +43,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
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");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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
|
||||
@@ -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,24 @@ 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) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id)
|
||||
LEFT JOIN (questionnaire_sample_quota_row as qsqr) on (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 +211,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 +242,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
|
||||
|
||||
@@ -47,7 +47,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -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,53 @@ 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
|
||||
LEFT JOIN (questionnaire_sample_quota as qsq) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id)
|
||||
LEFT JOIN (questionnaire_sample_quota_row as qsqr) on (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 !=10
|
||||
AND (qsq.quota_reached IS NULL OR qsq.quota_reached != 1)
|
||||
AND (qsqr.quota_reached IS NULL OR qsqr.quota_reached != 1)
|
||||
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) on (s.import_id = qsq.sample_import_id and c.questionnaire_id = qsq.questionnaire_id)
|
||||
LEFT JOIN (questionnaire_sample_quota_row as qsqr) on (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 !=10
|
||||
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,8 +243,10 @@ 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))
|
||||
{
|
||||
@@ -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
|
||||
@@ -85,21 +85,21 @@ include ("../functions/functions.operator.php");
|
||||
|
||||
<ul class="nav navbar-nav pull-right">
|
||||
<li class=" ">
|
||||
<a href="../" class=" " target="_blanc" style="padding-top: 20px; ">
|
||||
<i class="fa fa-lg fa-users"></i><?php print T_("Operator panel");?>
|
||||
<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=" ">
|
||||
</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");?>
|
||||
<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">
|
||||
<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>
|
||||
|
||||
@@ -14,7 +14,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -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>";
|
||||
|
||||
@@ -42,7 +42,7 @@ include("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -563,7 +563,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,18 +580,22 @@ 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=\'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,
|
||||
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,
|
||||
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
|
||||
@@ -600,7 +604,7 @@ else
|
||||
FROM questionnaire";
|
||||
$rs = $db->GetAll($sql);
|
||||
|
||||
$columns = array("qid","description","status","enabledisable","outcomes","calls","casestatus","shifts","assample","dataout","modify","setoutcomes","inlime","prefill","deletee");
|
||||
$columns = array("qid","description","status","enabledisable","outcomes","calls","casestatus","shifts","assample","quotareport","dataout","modify","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
|
||||
|
||||
@@ -44,7 +44,7 @@ include ("../db.inc.php");
|
||||
/**
|
||||
* Authentication file
|
||||
*/
|
||||
include ("auth-admin.php");
|
||||
require ("auth-admin.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -305,7 +305,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)){
|
||||
print "<h3 class='form-inline pull-left'>   " . T_("Sample") . ": </h3>";
|
||||
@@ -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-3 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' >
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,18 @@ 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) on (si.sample_import_id = qsq.sample_import_id)
|
||||
LEFT JOIN (questionnaire_sample_quota_row as qsqr) on (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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
2
call.php
2
call.php
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
@@ -119,21 +119,19 @@ function display_outcomes($contacted,$ca,$case_id)
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<div class=\"form-group\" ><a href=\"?contacted=1\" class=\"btn btn-info\" style=\"margin-left: 15px; margin-right: 30px; min-width: 200px;\">".T_("CONTACTED")."</a>";
|
||||
print "<a href=\"?contacted=0\" class=\"btn btn-default\" style=\"margin-left: 30px; margin-right: 15px; min-width: 200px;\">".T_("NOT CONTACTED")."</a></div>";
|
||||
|
||||
if (isset ($_GET['contacted'])) $contacted = bigintval($_GET['contacted']);
|
||||
else if ($contacted) $contacted = bigintval($contacted);
|
||||
|
||||
if ($contacted || $contacted === 0 ){
|
||||
|
||||
$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,42,43,44,45)"; //don't show completed if not, hide max calls as the supposed to be automatic or admin
|
||||
if ($contacted === false)
|
||||
{
|
||||
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']);
|
||||
}
|
||||
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)";
|
||||
}
|
||||
}
|
||||
$rs = $db->GetAll($sql);
|
||||
@@ -147,8 +145,8 @@ 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 "<p><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></p>";
|
||||
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;
|
||||
@@ -300,7 +298,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.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)
|
||||
@@ -319,8 +317,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
|
||||
{
|
||||
@@ -346,9 +344,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>";
|
||||
@@ -419,7 +419,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>";
|
||||
@@ -435,13 +435,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";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -454,16 +454,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>";
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -481,7 +481,7 @@ switch($state)
|
||||
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");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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;
|
||||
|
||||
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,24 @@ 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) on (si.sample_import_id = qsq.sample_import_id)
|
||||
LEFT JOIN (questionnaire_sample_quota_row as qsqr) on (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);
|
||||
|
||||
|
||||
@@ -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>";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -38,7 +38,7 @@ include ("config.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* XHTML functions
|
||||
|
||||
@@ -48,7 +48,7 @@ include("functions/functions.operator.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
|
||||
@@ -200,7 +200,7 @@ else if (HEADER_EXPANDER_MANUAL)
|
||||
}
|
||||
|
||||
|
||||
xhtml_head(T_("Case"), $body, array("include/bootstrap/css/bootstrap.min.css","css/index_interface2.css","css/tabber_interface2.css","include/jquery-ui/jquery-ui.min.css") , $js);
|
||||
xhtml_head(T_("Case"), $body, array("include/bootstrap/css/bootstrap.min.css","include/bootstrap/css/bootstrap-theme.min.css","include/font-awesome/css/font-awesome.css","css/index_interface2.css","css/tabber_interface2.css","include/jquery-ui/jquery-ui.min.css"),$js,false,false, false,false,false);
|
||||
print $script;
|
||||
|
||||
$case_id = get_case_id($operator_id,true);
|
||||
@@ -217,212 +217,215 @@ $ref = $scr['referral'];
|
||||
|
||||
$availability = is_using_availability($case_id);
|
||||
?>
|
||||
<div id="casefunctions" class="col-sm-2">
|
||||
<ul id="casefunctions" class="header ">
|
||||
<li id="item_1"><a href="javascript:poptastic('call_interface2.php');"><?php echo T_("Outcome"); ?> <img src="css/images/play.jpg" /></a></li>
|
||||
<li id="item_2_e" class="item_2_full_height"><a href="javascript:poptastic('appointment.php');"><?php echo T_("Appointment"); ?><img src="css/images/plius.jpg" /></a></li>
|
||||
<?php if ($sc == 1) { ?>
|
||||
<li id='item_4_e' class="item_2_full_height"><a href="javascript:poptastic('email.php?interface2=true');"><?php echo T_("Email"); ?> <img src="css/images/plius.jpg" /></a></li>
|
||||
<?php } ?>
|
||||
<?php if ($ref == 1) { ?>
|
||||
<li id='item_5_e' class="item_2_full_height"><a href="javascript:poptastic('referral.php?interface2=true');"><?php echo T_("Referral"); ?> <img src="css/images/plius.jpg" /></a></li>
|
||||
<?php } ?>
|
||||
<li id="item_3_e" class="item_3_full_height"><a href="?endwork=endwork"><?php echo T_("End work"); ?> <img src="css/images/end.jpg" /></a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="container-fluid ">
|
||||
<div class="row ">
|
||||
|
||||
<div id="qstatus" class="header col-sm-4">
|
||||
<?php xhtml_object("status_interface2.php","main-qstatus");?>
|
||||
<?php if (HEADER_EXPANDER_MANUAL){ ?> <div class='headerexpand'><img id='headerexpandimage' src='./images/arrow-up-2.jpg' alt='<?php echo T_('Arrow for expanding or contracting'); ?>'/></div> <?php } ?>
|
||||
</div>
|
||||
<div id="casefunctions" class="col-sm-2 panel-body">
|
||||
|
||||
<a href="javascript:poptastic('call_interface2.php');" class="btn btn-default btn-block" style="border-radius:15px; color:blue"><strong><?php echo T_("Outcome"); ?> <i class="fa fa-lg fa-check-square-o fa-fw"></i></strong></a></br>
|
||||
<a href="javascript:poptastic('appointment.php');" class="btn btn-default btn-block " style="border-radius:15px; color:green"><strong><?php echo T_("Appointment"); ?> <i class="fa fa-lg fa-clock-o fa-fw"></i></strong></a></br>
|
||||
<?php if ($sc == 1) { ?>
|
||||
<a href="javascript:poptastic('email.php?interface2=true');" class="btn btn-default btn-block" style="border-radius:15px; color:blue"><strong><?php echo T_("Invitation Email"); ?> <i class="fa fa-lg fa-envelope-o fa-fw"></i></strong></a></br>
|
||||
<?php } ?>
|
||||
<?php if ($ref == 1) { ?>
|
||||
<a href="javascript:poptastic('referral.php?interface2=true');" class="btn btn-default btn-block" style="border-radius:15px; color:blue"><strong><?php echo T_("Referral"); ?> <i class="fa fa-lg fa-link fa-fw"></i></strong></a></br>
|
||||
<?php } ?>
|
||||
<a href="?endwork=endwork"; class="btn btn-default btn-block" style="border-radius:15px; color:red"><strong><?php echo T_("End work"); ?> <i class="fa fa-lg fa-ban fa-fw"></i></strong></a>
|
||||
|
||||
</div>
|
||||
|
||||
<div id="qstatus" class="col-sm-3 panel-body">
|
||||
<?php xhtml_object("status_interface2.php","main-qstatus", "col-sm-12" );?>
|
||||
</div>
|
||||
|
||||
<?php if (HEADER_EXPANDER_MANUAL){ ?><div class="headerexpand"><i id='headerexpandimage' class="fa fa-lg fa-toggle-down fa-fw" title='<?php echo T_('Arrow for expanding or contracting'); ?>'></i></div> <?php } ?>
|
||||
|
||||
<div id="calllist" class="col-sm-7">
|
||||
|
||||
<div class="tabber" id="tab-main">
|
||||
|
||||
<?php
|
||||
if (isset($appointment)) {} else {$appointment = "";}
|
||||
|
||||
if (TAB_CASENOTES) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'casenotes' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'casenotes' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Notes"); ?></h2>
|
||||
<div id="div-casenotes" class="tabberdiv"><?php xhtml_object("casenote.php","main-casenotes","col-sm-12");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if ($availability) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'availability' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'availability' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Availability"); ?></h2>
|
||||
<div id="div-casenotes" class="tabberdiv"><?php xhtml_object("availability.php","main-availability","col-sm-12");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (TAB_CONTACTDETAILS) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'contactdetails' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'contactdetails' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Contact details"); ?></h2>
|
||||
<div id="div-contactdetails" class="tabberdiv"><?php xhtml_object("contactdetails.php","main-contactdetails","col-sm-12");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (TAB_CALLLIST) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'calllist' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'calllist' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Call history"); ?></h2>
|
||||
<div id="div-calllist" class="tabberdiv"><?php xhtml_object("calllist.php","main-calllist","col-sm-12");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (TAB_SHIFTS) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'shifts' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'shifts' && $appointment))
|
||||
print "tabbertabdefault"; ?>" id="tab-shifts">
|
||||
<h2><?php echo T_("Shifts"); ?></h2>
|
||||
<div id="div-shifts" class="tabberdiv"><?php xhtml_object("shifts.php","main-shifts","col-sm-12");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (TAB_APPOINTMENTLIST) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'appointmentlist' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'appointmentlist' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Appointments"); ?></h2>
|
||||
<div id="div-appointmentlist" class="tabberdiv"><?php xhtml_object("appointmentlist.php","main-appointmentlist","col-sm-12");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (TAB_PERFORMANCE) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'performance' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'performance' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Performance"); ?></h2>
|
||||
<div id="div-performance" class="tabberdiv"><?php xhtml_object("performance.php","main-performance","col-sm-12");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (TAB_CALLHISTORY) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'callhistory' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'callhistory' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Work history"); ?></h2>
|
||||
<div id="div-callhistory" class="tabberdiv"><?php xhtml_object("callhistory.php","main-callhistory","col-sm-12");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (TAB_PROJECTINFO) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'projectinfo' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'projectinfo' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Project information"); ?></h2>
|
||||
<div id="div-projectinfo" class="tabberdiv"><?php xhtml_object("project_info.php","main-projectinfo","col-sm-12");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
<div id="calllist" class="header col-sm-6">
|
||||
<?php if (TAB_INFO) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'info' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'info' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Info"); ?></h2>
|
||||
<div id="div-info" class="tabberdiv"><?php xhtml_object("info.php","main-info","col-sm-12");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<div class="tabber" id="tab-main">
|
||||
|
||||
<?php if (TAB_CASENOTES) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'casenotes' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'casenotes' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Notes"); ?></h2>
|
||||
<div id="div-casenotes" class="tabberdiv"><?php xhtml_object("casenote.php","main-casenotes");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if ($availability) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'availability' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'availability' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Availability"); ?></h2>
|
||||
<div id="div-casenotes" class="tabberdiv"><?php xhtml_object("availability.php","main-casenotes");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (TAB_CONTACTDETAILS) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'contactdetails' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'contactdetails' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Contact details"); ?></h2>
|
||||
<div id="div-contactdetails" class="tabberdiv"><?php xhtml_object("contactdetails.php","main-contactdetails");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
<?php if (TAB_CALLLIST) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'calllist' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'calllist' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Call history"); ?></h2>
|
||||
<div id="div-calllist" class="tabberdiv"><?php xhtml_object("calllist.php","main-calllist");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
<?php if (TAB_SHIFTS) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'shifts' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'shifts' && $appointment))
|
||||
print "tabbertabdefault"; ?>" id="tab-shifts">
|
||||
<h2><?php echo T_("Shifts"); ?></h2>
|
||||
<div id="div-shifts" class="tabberdiv"><?php xhtml_object("shifts.php","main-shifts");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
<?php if (TAB_APPOINTMENTLIST) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'appointmentlist' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'appointmentlist' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Appointments"); ?></h2>
|
||||
<div id="div-appointmentlist" class="tabberdiv"><?php xhtml_object("appointmentlist.php","main-appointmentlist");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
<?php if (TAB_PERFORMANCE) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'performance' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'performance' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Performance"); ?></h2>
|
||||
<div id="div-performance" class="tabberdiv"><?php xhtml_object("performance.php","main-performance");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (TAB_CALLHISTORY) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'callhistory' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'callhistory' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Work history"); ?></h2>
|
||||
<div id="div-callhistory" class="tabberdiv"><?php xhtml_object("callhistory.php","main-callhistory");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
<?php if (TAB_PROJECTINFO) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'projectinfo' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'projectinfo' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Project information"); ?></h2>
|
||||
<div id="div-projectinfo" class="tabberdiv"><?php xhtml_object("project_info.php","main-projectinfo");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
<?php if (TAB_INFO) { ?>
|
||||
<div class="tabbertab <?php if ((DEFAULT_TAB == 'info' && !$appointment) || (DEFAULT_TAB_APPOINTMENT == 'info' && $appointment))
|
||||
print "tabbertabdefault"; ?>">
|
||||
<h2><?php echo T_("Info"); ?></h2>
|
||||
<div id="div-info" class="tabberdiv"><?php xhtml_object("info.php","main-info");?></div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="content" class="content ">
|
||||
<?php
|
||||
|
||||
$ca = get_call_attempt($operator_id,true);
|
||||
$call_id = get_call($operator_id);
|
||||
$appointment = false;
|
||||
if ($ca)
|
||||
{
|
||||
$appointment = is_on_appointment($ca);
|
||||
$respondent_id = get_respondent_id($ca);
|
||||
}
|
||||
|
||||
if (!$call_id)
|
||||
{
|
||||
if ($appointment)
|
||||
{
|
||||
//create a call on the appointment number
|
||||
$sql = "SELECT cp.*, a.respondent_id
|
||||
FROM contact_phone as cp, appointment as a
|
||||
WHERE cp.case_id = '$case_id'
|
||||
AND a.appointment_id = '$appointment'
|
||||
AND a.contact_phone_id = cp.contact_phone_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
//create a call on the first available number by priority
|
||||
$sql = "SELECT c. *
|
||||
FROM contact_phone AS c
|
||||
LEFT JOIN (
|
||||
SELECT contact_phone.contact_phone_id
|
||||
FROM contact_phone
|
||||
LEFT JOIN `call` ON ( call.contact_phone_id = contact_phone.contact_phone_id )
|
||||
LEFT JOIN outcome ON ( call.outcome_id = outcome.outcome_id )
|
||||
WHERE contact_phone.case_id = '$case_id'
|
||||
AND outcome.tryagain =0
|
||||
) AS l ON l.contact_phone_id = c.contact_phone_id
|
||||
LEFT JOIN
|
||||
(
|
||||
SELECT contact_phone_id
|
||||
FROM `call`
|
||||
WHERE call_attempt_id = '$ca'
|
||||
AND outcome_id NOT IN (15,18)
|
||||
) as ca on ca.contact_phone_id = c.contact_phone_id
|
||||
WHERE c.case_id = '$case_id'
|
||||
AND l.contact_phone_id IS NULL
|
||||
AND ca.contact_phone_id IS NULL
|
||||
order by c.priority ASC";
|
||||
|
||||
|
||||
}
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
$contact_phone_id = $rs['contact_phone_id'];
|
||||
|
||||
if (!isset($rs['respondent_id']))
|
||||
{
|
||||
$sql = "SELECT respondent_id
|
||||
FROM respondent
|
||||
WHERE case_id = $case_id";
|
||||
|
||||
$respondent_id = $db->GetOne($sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
$respondent_id = $rs['respondent_id'];
|
||||
}
|
||||
$call_id = get_call($operator_id,$respondent_id,$contact_phone_id,true);
|
||||
}
|
||||
}
|
||||
|
||||
<div class="row">
|
||||
|
||||
if (!is_respondent_selection($operator_id))
|
||||
$data = get_limesurvey_url($operator_id);
|
||||
else
|
||||
$data = get_respondentselection_url($operator_id,true,true); //use second interface
|
||||
<?php
|
||||
|
||||
xhtml_object($data,"main-content");
|
||||
$ca = get_call_attempt($operator_id,true);
|
||||
$call_id = get_call($operator_id);
|
||||
$appointment = false;
|
||||
if ($ca)
|
||||
{
|
||||
$appointment = is_on_appointment($ca);
|
||||
$respondent_id = get_respondent_id($ca);
|
||||
}
|
||||
|
||||
?>
|
||||
if (!$call_id)
|
||||
{
|
||||
if ($appointment)
|
||||
{
|
||||
//create a call on the appointment number
|
||||
$sql = "SELECT cp.*, a.respondent_id
|
||||
FROM contact_phone as cp, appointment as a
|
||||
WHERE cp.case_id = '$case_id'
|
||||
AND a.appointment_id = '$appointment'
|
||||
AND a.contact_phone_id = cp.contact_phone_id";
|
||||
}
|
||||
else
|
||||
{
|
||||
//create a call on the first available number by priority
|
||||
$sql = "SELECT c. *
|
||||
FROM contact_phone AS c
|
||||
LEFT JOIN (
|
||||
SELECT contact_phone.contact_phone_id
|
||||
FROM contact_phone
|
||||
LEFT JOIN `call` ON ( call.contact_phone_id = contact_phone.contact_phone_id )
|
||||
LEFT JOIN outcome ON ( call.outcome_id = outcome.outcome_id )
|
||||
WHERE contact_phone.case_id = '$case_id'
|
||||
AND outcome.tryagain =0
|
||||
) AS l ON l.contact_phone_id = c.contact_phone_id
|
||||
LEFT JOIN
|
||||
(
|
||||
SELECT contact_phone_id
|
||||
FROM `call`
|
||||
WHERE call_attempt_id = '$ca'
|
||||
AND outcome_id NOT IN (15,18)
|
||||
) as ca on ca.contact_phone_id = c.contact_phone_id
|
||||
WHERE c.case_id = '$case_id'
|
||||
AND l.contact_phone_id IS NULL
|
||||
AND ca.contact_phone_id IS NULL
|
||||
order by c.priority ASC";
|
||||
|
||||
|
||||
}
|
||||
$rs = $db->GetRow($sql);
|
||||
|
||||
if (!empty($rs))
|
||||
{
|
||||
$contact_phone_id = $rs['contact_phone_id'];
|
||||
|
||||
if (!isset($rs['respondent_id']))
|
||||
{
|
||||
$sql = "SELECT respondent_id
|
||||
FROM respondent
|
||||
WHERE case_id = $case_id";
|
||||
|
||||
$respondent_id = $db->GetOne($sql);
|
||||
}
|
||||
else
|
||||
{
|
||||
$respondent_id = $rs['respondent_id'];
|
||||
}
|
||||
$call_id = get_call($operator_id,$respondent_id,$contact_phone_id,true);
|
||||
}
|
||||
}
|
||||
|
||||
if (!is_respondent_selection($operator_id))
|
||||
$data = get_limesurvey_url($operator_id);
|
||||
else
|
||||
$data = get_respondentselection_url($operator_id,true,true); //use second interface
|
||||
|
||||
xhtml_object($data,"main-content", "embeddedobject content");
|
||||
|
||||
?>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
//if ($db->HasFailedTrans()){ print "<p>FAILED AT END of index</p>"; exit();}
|
||||
$db->CompleteTrans();
|
||||
|
||||
|
||||
2
info.php
2
info.php
@@ -52,7 +52,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
$js = false;
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
function headerexpand()
|
||||
{
|
||||
$(".header").css("height","38%");
|
||||
$(".content").css("height","60%");
|
||||
$(".content").css("top","40%");
|
||||
$(".headerexpand").css("top","35%");
|
||||
$(".content").css("height","63%");
|
||||
$(".content").css("top","37%");
|
||||
$(".box:not(.important)").css("display","");
|
||||
// $(".item_2_half_height").removeClass("item_2_half_height").addClass("item_2_full_height");
|
||||
$(".item_3_half_height").removeClass("item_3_half_height").addClass("item_3_full_height");
|
||||
|
||||
}
|
||||
|
||||
function headercontract()
|
||||
{
|
||||
$(".header").css("height","13%");
|
||||
$(".content").css("height","85%");
|
||||
$(".content").css("top","15%");
|
||||
$(".headerexpand").css("top","18%");
|
||||
$(".content").css("height","80%");
|
||||
$(".content").css("top","20%");
|
||||
$(".box:not(.important)").css("display","none");
|
||||
// $(".item_2_full_height").removeClass("item_2_full_height").addClass("item_2_half_height");
|
||||
$(".item_3_full_height").removeClass("item_3_full_height").addClass("item_3_half_height");
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -6,20 +6,20 @@ $(document).ready(function(){
|
||||
|
||||
function headerforcecontract()
|
||||
{
|
||||
$("#headerexpandimage").attr('src',"./images/arrow-down-2.jpg");
|
||||
$("#headerexpandimage").attr('class',"fa fa-lg fa-fw fa-toggle-down ");
|
||||
headercontract();
|
||||
}
|
||||
|
||||
function headertogglemanual()
|
||||
{
|
||||
if ($("#headerexpandimage").attr('src') == './images/arrow-up-2.jpg')
|
||||
if ($("#headerexpandimage").attr('class') == 'fa fa-lg fa-fw fa-toggle-up')
|
||||
{
|
||||
$("#headerexpandimage").attr('src',"./images/arrow-down-2.jpg");
|
||||
$("#headerexpandimage").attr('class',"fa fa-lg fa-fw fa-toggle-down");
|
||||
headercontract();
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#headerexpandimage").attr('src',"./images/arrow-up-2.jpg");
|
||||
$("#headerexpandimage").attr('class',"fa fa-lg fa-fw fa-toggle-up");
|
||||
headerexpand();
|
||||
}
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("functions/functions.xhtml.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
/**
|
||||
* Language functions
|
||||
@@ -77,8 +77,8 @@ $js = array();
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
$js = array("include/jquery/jquery-1.4.2.min.js","js/childnap.js");
|
||||
|
||||
$jsw = "js/window.js";
|
||||
if (browser_ie()) $jsw = "js/window_ie6.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[] = $jsw;
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -52,7 +52,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("functions/functions.xhtml.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
36
referral.php
36
referral.php
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
@@ -198,26 +198,26 @@ if (isset($_POST['submit']))
|
||||
|
||||
if ($db->CompleteTrans())
|
||||
{
|
||||
$msg = T_("Created referral case - you may now close this window");
|
||||
$msg = "<p class='alert alert-info'>" . T_("Created referral case - you may now close this window") . "</p>";
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = T_("Failed to create referral case - please check your input and try again");
|
||||
$msg = "<p class='alert alert-warning'>" . T_("Failed to create referral case - please check your input and try again") . "</p>";
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$msg = T_("You must supply a primary phone number");
|
||||
$msg = "<p class='alert alert-warning'>" . T_("You must supply a primary phone number") . "</p>";
|
||||
}
|
||||
}
|
||||
|
||||
$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_("Referral"),true,array("css/call.css"),array($js));
|
||||
xhtml_head(T_("Referral"),false,array("include/bootstrap/css/bootstrap.min.css"),array($js));
|
||||
|
||||
$sql = "SELECT q.referral
|
||||
FROM questionnaire as q, `case` as c
|
||||
@@ -228,13 +228,13 @@ $sc = $db->GetOne($sql);
|
||||
|
||||
if ($sc == 1)
|
||||
{
|
||||
print "<div class='status'>" . T_("Create referral") . "</div>";
|
||||
if (!empty($msg)) print "<p>$msg</p>";
|
||||
print "<form action='?' method='post'>";
|
||||
print "<div class='col-md-12 '><h3>" . T_("Create referral") . "</h3>";
|
||||
if (!empty($msg)) print $msg;
|
||||
print "<form action='?' method='post' class='form-horizontal'>";
|
||||
|
||||
//Create a list of sample records matching this current case
|
||||
|
||||
$sql = "SELECT sivr.var,t.description,sivr.type
|
||||
$sql = "SELECT sivr.var,t.description,sivr.type, sv.val
|
||||
FROM `sample_import_var_restrict` as sivr,`sample_var` as sv, `case` as c, `sample_var_type` as t
|
||||
WHERE c.case_id = '$case_id'
|
||||
AND sv.sample_id = c.sample_id
|
||||
@@ -246,25 +246,29 @@ if ($sc == 1)
|
||||
foreach ($rs as $r)
|
||||
{
|
||||
$var = $r['var'];
|
||||
print "<div><label for='v_$var'>";
|
||||
print "<label for='v_$var' class='control-label'>";
|
||||
|
||||
if ($r['type'] != 1)
|
||||
print T_($r['description']);
|
||||
else
|
||||
print $var;
|
||||
|
||||
print "</label><input type='text' name='v_$var' id='v_$var' ";
|
||||
print "</label><div><input type='text' name='v_$var' id='v_$var' class='form-control'";
|
||||
|
||||
if (isset($_POST['v_' . $var]))
|
||||
print "value='" . $_POST['v_' .$var] . "' ";
|
||||
|
||||
if ($r['type'] == 3) print "required";
|
||||
|
||||
print " /></div>";
|
||||
}
|
||||
|
||||
print "<div><label for='makecase'>" . T_("Call this new referral immediately after this case?") . "</label><input type='checkbox' name='makecase' id='makecase' checked='checked'/></div>";
|
||||
print "<br/><p><label for='makecase' class='control-label pull-left'>" . T_("Call this new referral immediately after this case?") . " </label> <input type='checkbox' name='makecase' id='makecase' checked='checked'/></p>";
|
||||
|
||||
print "<div><input type='submit' value='" . T_("Create referral") . "' name='submit' id='submit'/></div>";
|
||||
print "</form>";
|
||||
print "<input type='submit' value='" . T_("Create referral") . "' name='submit' id='submit' class='btn btn-primary'/>";
|
||||
print "<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>";
|
||||
|
||||
print "</form></div>";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ include ("config.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -37,7 +37,7 @@ include ("config.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -43,7 +43,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include_once ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -38,7 +38,7 @@ include_once("config.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
@@ -63,9 +63,9 @@ $state = is_on_call($operator_id);
|
||||
$js = array("js/popup.js");
|
||||
|
||||
if (browser_ie())
|
||||
$js[] = "js/window_ie6.js";
|
||||
$js[] = "js/window_ie6_interface2.js";
|
||||
else
|
||||
$js[] = "js/window.js";
|
||||
$js[] = "js/window_interface2.js";
|
||||
|
||||
if (AUTO_LOGOUT_MINUTES !== false)
|
||||
{
|
||||
@@ -178,9 +178,8 @@ if ($ca)
|
||||
|
||||
$apdate = $rs['time'];
|
||||
|
||||
|
||||
print "<div class='tobecoded statusbox'>" . T_("Appointment") . ": " . $apdate . "</div><div style='clear: both;'/>";
|
||||
//if (missed_appointment($ca)) print "<div class='tobecoded statusbutton'>" . T_("MISSED") . "</div>";
|
||||
if (missed_appointment($ca)) print "<div class='alert alert-warning'>" . T_("MISSED") . ": " . $apdate . "</div>";
|
||||
else print "<div class='alert alert-info'>" . T_("Appointment") . ": " . $apdate . "</div>";
|
||||
}
|
||||
|
||||
if ($call_id)
|
||||
@@ -215,18 +214,20 @@ if ($ca)
|
||||
//Display all available numbers for this case as a list of radio buttons
|
||||
//By default, the selected radio button should have a "call" started for it
|
||||
//When then next one clicked, it should bring up call screen if no outcome otherwise start new call
|
||||
print "<div>";
|
||||
//print "<div>";print "</div>";
|
||||
foreach($rs as $r)
|
||||
{
|
||||
print "<form method='post' action='?'><div class='text'>";
|
||||
print "<input onclick='this.form.submit();' type='radio' name='contactphone' value='{$r['contact_phone_id']}' id='contactphone{$r['contact_phone_id']}' {$r['checked']}/>";
|
||||
print "<label for='contactphone{$r['contact_phone_id']}'>{$r['phone']}";
|
||||
if ($r['checked']) print " <a href='callto:{$r['phone']}'>" . T_('Dial') . "</a>";
|
||||
if (!empty($r['description'])) print " - " . $r['description'];
|
||||
print "</label>";
|
||||
print "</div></form></br>";
|
||||
print "<form method='post' action='?'>
|
||||
<p>
|
||||
<input onclick='this.form.submit();' type='radio' name='contactphone' value='{$r['contact_phone_id']}' id='contactphone{$r['contact_phone_id']}' {$r['checked']}/> 
|
||||
<label for='contactphone{$r['contact_phone_id']}'>{$r['phone']}";
|
||||
if ($r['checked']) print " <a href='callto:{$r['phone']}' class='btn btn-primary btn-xs'><i class='fa fa-phone fa-fw'></i> " . T_('Dial') . "</a>";
|
||||
if (!empty($r['description'])) print " - " . $r['description'];
|
||||
print "</label>
|
||||
</p>
|
||||
</form>";
|
||||
}
|
||||
print "</div>";
|
||||
|
||||
}
|
||||
else
|
||||
print "<div class='text'>" . T_("No more numbers to call") . "</div>";
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -42,7 +42,7 @@ include ("db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -36,7 +36,7 @@ include_once("../db.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("../auth-interviewer.php");
|
||||
require ("../auth-interviewer.php");
|
||||
|
||||
include_once("../functions/functions.operator.php");
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ include_once("lang.inc.php");
|
||||
/**
|
||||
* Authentication
|
||||
*/
|
||||
include ("auth-interviewer.php");
|
||||
require ("auth-interviewer.php");
|
||||
|
||||
|
||||
/**
|
||||
@@ -46,7 +46,7 @@ include ("auth-interviewer.php");
|
||||
*/
|
||||
include_once("functions/functions.xhtml.php");
|
||||
|
||||
xhtml_head(T_("Standby"),false,array("include/bootstrap/css/bootstrap.min.css","css/index_interface2.css"), array(), false, 300);
|
||||
xhtml_head(T_("Standby"),false,array("include/bootstrap/css/bootstrap.min.css","include/bootstrap/css/bootstrap-theme.min.css","include/font-awesome/css/font-awesome.css","css/index_interface2.css"), array(), false, 300);
|
||||
|
||||
if (isset($_GET['auto']))
|
||||
{
|
||||
@@ -91,7 +91,7 @@ if (empty($rs))
|
||||
|
||||
else
|
||||
{
|
||||
print "<div class='col-sm-3'>";
|
||||
print "<div class='col-sm-4'>";
|
||||
print "<div class=' well' style='padding:2%;'><p>" . T_("Assigned questionnaires:") . "";
|
||||
|
||||
/* if (isset($_GET['auto'])) {
|
||||
@@ -191,13 +191,14 @@ else
|
||||
}
|
||||
|
||||
?>
|
||||
<div id="">
|
||||
<ul class="wait_wrapper">
|
||||
<?php if ($cases_count['count_samples'] > 0 or $new_samples['count_samples'] > 0){ ?>
|
||||
<li class="wait_li_1"><a href="index_interface2.php"><?php echo T_("Get a new case"); ?> <img src="css/images/play.jpg" /></a></li>
|
||||
<div class="col-sm-3 col-sm-offset-1" style="top: 150px;">
|
||||
|
||||
<?php if ((isset($cases_count['count_samples']) && $cases_count['count_samples'] > 0) or (isset($new_samples['count_samples']) && $new_samples['count_samples'] > 0)){ ?>
|
||||
<a href="index_interface2.php" class="btn btn-default btn-lg btn-block" style="border-radius:25px; color:blue"><?php echo T_("Get a new case"); ?> <i class="fa fa-lg fa-play fa-fw"></i></a>
|
||||
</br>
|
||||
<?php } ?>
|
||||
<li class="wait_li_2"><a href="endwork.php"><?php echo T_("End work"); ?> <img src="css/images/end.jpg" /></a></li>
|
||||
</ul>
|
||||
<a href="endwork.php" class="btn btn-default btn-lg btn-block" style="border-radius:25px; color:red;"><?php echo T_("End work"); ?> <i class="fa fa-lg fa-ban fa-fw "></i></a>
|
||||
|
||||
</div>
|
||||
<?php
|
||||
|
||||
|
||||
Reference in New Issue
Block a user