diff --git a/admin/addshift.php b/admin/addshift.php index 271e90fc..52089d59 100644 --- a/admin/addshift.php +++ b/admin/addshift.php @@ -42,7 +42,7 @@ include ("../db.inc.php"); /** * Authentication */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/assignsample.php b/admin/assignsample.php index e43abbe3..36f35929 100644 --- a/admin/assignsample.php +++ b/admin/assignsample.php @@ -43,7 +43,7 @@ include ("../db.inc.php"); /** * Authentication */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/assigntimeslots.php b/admin/assigntimeslots.php index ff191027..a0d8a877 100644 --- a/admin/assigntimeslots.php +++ b/admin/assigntimeslots.php @@ -43,7 +43,7 @@ include ("../db.inc.php"); /** * Authentication */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/availability.php b/admin/availability.php index 0808e9bf..d6a21d99 100644 --- a/admin/availability.php +++ b/admin/availability.php @@ -42,7 +42,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** diff --git a/admin/availabilitygroup.php b/admin/availabilitygroup.php index 2029f348..cc67f9f6 100644 --- a/admin/availabilitygroup.php +++ b/admin/availabilitygroup.php @@ -43,7 +43,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/bulkappointment.php b/admin/bulkappointment.php index e3afc406..26076971 100644 --- a/admin/bulkappointment.php +++ b/admin/bulkappointment.php @@ -47,7 +47,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * Operator functions diff --git a/admin/callhistory.php b/admin/callhistory.php index 102e3cca..6ac3d177 100644 --- a/admin/callhistory.php +++ b/admin/callhistory.php @@ -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")); diff --git a/admin/callrestrict.php b/admin/callrestrict.php index 2d6c591c..044a3d74 100644 --- a/admin/callrestrict.php +++ b/admin/callrestrict.php @@ -42,7 +42,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/casesbyoutcome.php b/admin/casesbyoutcome.php index cb3d5b48..048483f7 100644 --- a/admin/casesbyoutcome.php +++ b/admin/casesbyoutcome.php @@ -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 "

" . T_("Project") . ": {$rs['qd']}

"; - 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' ;"; diff --git a/admin/casestatus.php b/admin/casestatus.php index f44e201a..72bbee47 100644 --- a/admin/casestatus.php +++ b/admin/casestatus.php @@ -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 ("
"); + $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"),""); 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 " " . T_("Go back") . " "; ?> @@ -237,7 +242,7 @@ print "

" . T_("Questio display_questionnaire_chooser($questionnaire_id, false, "pull-left", "form-control"); if ($questionnaire_id){ print "

" . T_("Sample") . ":

"; - 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 "
"; diff --git a/admin/centreinfo.php b/admin/centreinfo.php index 9bc2929b..b0cab799 100644 --- a/admin/centreinfo.php +++ b/admin/centreinfo.php @@ -43,7 +43,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/dataoutput.php b/admin/dataoutput.php index 1ad770b3..07af58ba 100644 --- a/admin/dataoutput.php +++ b/admin/dataoutput.php @@ -47,7 +47,7 @@ include ("../db.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/displayappointments.php b/admin/displayappointments.php index 98c5adfb..2ae5a1df 100644 --- a/admin/displayappointments.php +++ b/admin/displayappointments.php @@ -1,4 +1,5 @@ -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 "

" . T_("The appointment has been deleted. Now you must modify the case outcome") . "

+ print "

" . T_("The appointment has been deleted. Now you must modify the case outcome") . "

" . T_("Modify case outcome") . "
"; } 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 ""; - if ($_GET['new'] =='new'){ - $start = $startdate; - $end = $enddate; - $rtz = $_GET['rtz']; - } - if (isset($_GET['appointment_id'])) { + print ""; + print ""; + + 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 ""; - print ""; + print "

"; - 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 "
"; - print "

"; - 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 "

". T_("ATTENTION! Keep in mind that you're setting 'Start' & 'End' appoinment times in RESPONDENT LOCAL TIME !!!") . "
"; + print ""; +//*end option + + print "

". T_("ATTENTION! Keep in mind that you're setting 'Start' & 'End' appoinment times in RESPONDENT LOCAL TIME !!!") . "
"; + date_default_timezone_set($rtz); - print " -

" . $rtz . "

+ + print " +

" . $rtz . "

"; - print "

+ print "

"; - print "

+ print "

"; - print "

"; + print "

"; $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 ""; - if ($_GET['new'] == 'new') { print "";} + display_chooser($ops,"require_operator_id","require_operator_id",false,false,false,true,false,true,"pull-left"); + + print " + + "; + + if (isset($_GET['new']) && $_GET['new'] == 'new') { + print ""; + } print "


- "; + "; - print "
"; + print "
+ +
"; - print ""; + print ""; print ""; } @@ -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 "

" . T_("All appointments (with times displayed in your time zone)") . "

"; - $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('', c.case_id, '') as case_id, CONCAT('  ') as link, CONCAT('  ') 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"),"  ",T_("Created by"),T_("Appointment with"),T_("Respondent"),T_("Current outcome"),T_("Operator who called"),"  "),"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"),"  ",T_("Created by"),T_("Appointment with"),T_("Respondent"),T_("Current outcome"),T_("Operator who called"),"  "),"tclass",false,false,"bs-table"); } else print "

" . T_("No future appointments") . "

"; print "

" . T_("Missed appointments (with times displayed in your time zone)") . "

"; - $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('', c.case_id, '') as case_id, CONCAT('  ') as link, CONCAT('  ') 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"),"  ",T_("Respondent"),"  "),"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"),"  ",T_("Respondent"),"  "),"tclass",false,false,"bs-table"); - } else print "

" . T_("No appointments missed") . "

"; + } else print "

" . T_("No missed appointments") . "

"; } xhtml_foot($js_foot); diff --git a/admin/extensionstatus.php b/admin/extensionstatus.php index 97022fba..baf4c0a5 100644 --- a/admin/extensionstatus.php +++ b/admin/extensionstatus.php @@ -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 "" . T_("Go back") . ""; + } + ?>
-

+

- - " maxlength="12" required value="" class="form-control"/> + + " maxlength="12" required value="" class="form-control"/>
- - "/>    + + "/>  " class="btn btn-default fa" /> 
-
- " /> -
+
+
+ +
+ + " /> - - " /> + + " />
" . T_("Unassign the operator from this extension to be able to delete it") . ""; } - print "
"; + print "
"; } else { @@ -241,8 +243,10 @@ else $rs = $db->GetAll($sql); + print "
"; + if ($msg != "") - print "

$msg

"; + print "

$msg


"; 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 "
"; + 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 "
"; + print "
"; } else - print "

" . T_("No extensions") . "

"; + print "

" . T_("No extensions") . "

"; - print "
" . T_("Add extension") . "
"; + print "" . T_("Add extension") . " +
"; } diff --git a/admin/import.php b/admin/import.php index 5cbc9581..3af3f959 100644 --- a/admin/import.php +++ b/admin/import.php @@ -11,7 +11,7 @@ include ("../config.inc.php"); /** * Authentication file */ -include ("auth-admin.php"); +require ("auth-admin.php"); /** * XHTML functions diff --git a/admin/index.php b/admin/index.php index 47d5c137..d5d318a3 100644 --- a/admin/index.php +++ b/admin/index.php @@ -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");