mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Fixes lp:1255359 Translation strings with single quotes break some SQL queries
This commit is contained in:
@@ -177,12 +177,12 @@ if ($questionnaire_id != false)
|
|||||||
print "<h1>" . T_("Samples selected for this questionnaire") . "</h1>";
|
print "<h1>" . T_("Samples selected for this questionnaire") . "</h1>";
|
||||||
|
|
||||||
$sql = "SELECT si.description as description,
|
$sql = "SELECT si.description as description,
|
||||||
CASE WHEN q.call_max = 0 THEN '" . T_("Unlimited") . "' ELSE q.call_max END as call_max,
|
CASE WHEN q.call_max = 0 THEN '" . TQ_("Unlimited") . "' ELSE q.call_max END as call_max,
|
||||||
CASE WHEN q.call_attempt_max = 0 THEN '" . T_("Unlimited") . "' ELSE q.call_attempt_max END AS call_attempt_max,
|
CASE WHEN q.call_attempt_max = 0 THEN '" . TQ_("Unlimited") . "' ELSE q.call_attempt_max END AS call_attempt_max,
|
||||||
CASE WHEN q.random_select = 0 THEN '" . T_("Sequential") . "' ELSE '". T_("Random") . "' END as random_select,
|
CASE WHEN q.random_select = 0 THEN '" . TQ_("Sequential") . "' ELSE '". TQ_("Random") . "' END as random_select,
|
||||||
CASE WHEN q.answering_machine_messages = 0 THEN '" . T_("Never") . "' ELSE q.answering_machine_messages END as answering_machine_messages,
|
CASE WHEN q.answering_machine_messages = 0 THEN '" . TQ_("Never") . "' ELSE q.answering_machine_messages END as answering_machine_messages,
|
||||||
CONCAT('<a href=\"?edit=edit&questionnaire_id=$questionnaire_id&rsid=', si.sample_import_id ,'\">" . T_("Edit") ."</a>') as edit,
|
CONCAT('<a href=\"?edit=edit&questionnaire_id=$questionnaire_id&rsid=', si.sample_import_id ,'\">" . TQ_("Edit") ."</a>') as edit,
|
||||||
CONCAT('<a href=\"?questionnaire_id=$questionnaire_id&rsid=', si.sample_import_id ,'\">" . T_("Click to unassign") ."</a>') as unassign
|
CONCAT('<a href=\"?questionnaire_id=$questionnaire_id&rsid=', si.sample_import_id ,'\">" . TQ_("Click to unassign") ."</a>') as unassign
|
||||||
FROM questionnaire_sample as q, sample_import as si
|
FROM questionnaire_sample as q, sample_import as si
|
||||||
WHERE q.sample_import_id = si.sample_import_id
|
WHERE q.sample_import_id = si.sample_import_id
|
||||||
AND q.questionnaire_id = '$questionnaire_id'";
|
AND q.questionnaire_id = '$questionnaire_id'";
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ else if (isset($_POST['availability_group']))
|
|||||||
|
|
||||||
//view groups
|
//view groups
|
||||||
$sql = "SELECT description,
|
$sql = "SELECT description,
|
||||||
CONCAT('<a href=\'availability.php?availability_group=', availability_group_id, '\'>". T_("Modify") . "</a>') as link
|
CONCAT('<a href=\'availability.php?availability_group=', availability_group_id, '\'>". TQ_("Modify") . "</a>') as link
|
||||||
FROM availability_group";
|
FROM availability_group";
|
||||||
|
|
||||||
$rs = $db->GetAll($sql);
|
$rs = $db->GetAll($sql);
|
||||||
|
|||||||
@@ -85,12 +85,12 @@ function case_status_report($questionnaire_id = false, $sample_id = false, $outc
|
|||||||
$sql = "SELECT CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id,
|
$sql = "SELECT CONCAT('<a href=\'supervisor.php?case_id=', c.case_id, '\'>', c.case_id, '</a>') as case_id,
|
||||||
o.description as outcomes,
|
o.description as outcomes,
|
||||||
si.description as samples,
|
si.description as samples,
|
||||||
CASE WHEN ca.end IS NULL THEN '" . T_("Now") . "'
|
CASE WHEN ca.end IS NULL THEN '" . TQ_("Now") . "'
|
||||||
WHEN TIME_TO_SEC(TIMEDIFF(ca.end,CONVERT_TZ(DATE_SUB(NOW(), INTERVAL co.default_delay_minutes MINUTE),'System','UTC'))) < 0 THEN '" . T_("Now") . "'
|
WHEN TIME_TO_SEC(TIMEDIFF(ca.end,CONVERT_TZ(DATE_SUB(NOW(), INTERVAL co.default_delay_minutes MINUTE),'System','UTC'))) < 0 THEN '" . TQ_("Now") . "'
|
||||||
ELSE ROUND(TIME_TO_SEC(TIMEDIFF(ca.end,CONVERT_TZ(DATE_SUB(NOW(), INTERVAL co.default_delay_minutes MINUTE),'System','UTC'))) / 60)
|
ELSE ROUND(TIME_TO_SEC(TIMEDIFF(ca.end,CONVERT_TZ(DATE_SUB(NOW(), INTERVAL co.default_delay_minutes MINUTE),'System','UTC'))) / 60)
|
||||||
END AS availableinmin,
|
END AS availableinmin,
|
||||||
CASE WHEN oq.operator_id IS NULL THEN CONCAT('". T_("Not assigned, select to assign") ." ','<input type=\"checkbox\" name=\"c', c.case_id, '\" value=\"', c.case_id, '\"/>')
|
CASE WHEN oq.operator_id IS NULL THEN CONCAT('". TQ_("Not assigned, select to assign") ." ','<input type=\"checkbox\" name=\"c', c.case_id, '\" value=\"', c.case_id, '\"/>')
|
||||||
ELSE CONCAT('<a href=\"?questionnaire_id=$questionnaire_id&sample_import_id=$sample_id&unassign=', cq.case_queue_id, '\"/>". T_("Assigned to") . ": ', oq.firstName, ' " . T_("Order") . ":', cq.sortorder , ' (". T_("Click to unassign") .")</a>')
|
ELSE CONCAT('<a href=\"?questionnaire_id=$questionnaire_id&sample_import_id=$sample_id&unassign=', cq.case_queue_id, '\"/>". TQ_("Assigned to") . ": ', oq.firstName, ' " . TQ_("Order") . ":', cq.sortorder , ' (". TQ_("Click to unassign") .")</a>')
|
||||||
END AS assignedoperator
|
END AS assignedoperator
|
||||||
FROM `case` as c
|
FROM `case` as c
|
||||||
JOIN questionnaire as q ON (q.questionnaire_id = c.questionnaire_id and q.enabled = 1)
|
JOIN questionnaire as q ON (q.questionnaire_id = c.questionnaire_id and q.enabled = 1)
|
||||||
|
|||||||
@@ -209,7 +209,7 @@ if (isset($_GET['appointment_id']) && isset($_GET['case_id']))
|
|||||||
array_unshift($ops,array('value'=>0,'description'=>T_("Any operator"),'selected'=>$selected));
|
array_unshift($ops,array('value'=>0,'description'=>T_("Any operator"),'selected'=>$selected));
|
||||||
display_chooser($ops,"require_operator_id","require_operator_id",false,false,false,false);
|
display_chooser($ops,"require_operator_id","require_operator_id",false,false,false,false);
|
||||||
print "<input type='hidden' value='$appointment_id' id='appointment_id' name='appointment_id'/>";
|
print "<input type='hidden' value='$appointment_id' id='appointment_id' name='appointment_id'/>";
|
||||||
print "<div><input type='submit' value='" . T_("Edit appointment") . "'/></div>";
|
print "<div><input type='submit' value='" . TQ_("Edit appointment") . "'/></div>";
|
||||||
|
|
||||||
print "</form></p>";
|
print "</form></p>";
|
||||||
print "<p><a href='?'>" . T_("Cancel edit") . "</a></p>";
|
print "<p><a href='?'>" . T_("Cancel edit") . "</a></p>";
|
||||||
@@ -226,7 +226,7 @@ else
|
|||||||
|
|
||||||
print "<h1>" . T_("Appointments") . "</h1><h2>" . T_("All appointments (with times displayed in your time zone)") . "</h2>";
|
print "<h1>" . T_("Appointments") . "</h1><h2>" . T_("All appointments (with times displayed in your time zone)") . "</h2>";
|
||||||
|
|
||||||
$sql = "SELECT q.description, CONVERT_TZ(a.start,'UTC',o.Time_zone_name) as start, CONVERT_TZ(a.end,'UTC',o.Time_zone_name) as end, r.firstName, r.lastName, IFNULL(ou.description,'" . T_("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=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '&delete=delete\'>". T_("Delete") . "</a>') as link, CONCAT('<a href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\'>". T_("Edit") . "</a>') as edit,IFNULL(ao.firstName,'" . T_("Any operator") . "') as witho
|
$sql = "SELECT q.description, CONVERT_TZ(a.start,'UTC',o.Time_zone_name) as start, CONVERT_TZ(a.end,'UTC',o.Time_zone_name) as end, r.firstName, r.lastName, 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=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '&delete=delete\'>". TQ_("Delete") . "</a>') as link, CONCAT('<a href=\'?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\'>". TQ_("Edit") . "</a>') as edit,IFNULL(ao.firstName,'" . TQ_("Any operator") . "') as witho
|
||||||
|
|
||||||
FROM appointment as a
|
FROM appointment as a
|
||||||
JOIN (`case` as c, respondent as r, questionnaire as q, operator as o, 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 o.operator_id = '$operator_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 o, 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 o.operator_id = '$operator_id' and a.call_attempt_id = cc.call_attempt_id and cc.operator_id = oo.operator_id)
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ include ("../functions/functions.xhtml.php");
|
|||||||
|
|
||||||
xhtml_head(T_("Display extension status"),true,array("../css/table.css"));
|
xhtml_head(T_("Display extension status"),true,array("../css/table.css"));
|
||||||
|
|
||||||
$sql= "SELECT o.firstName, o.extension, CASE o.voip_status WHEN 0 THEN '" . T_("VoIP Offline") . "' ELSE '" . T_("VoIP Online") . "' END as voip_status, CASE ca.state WHEN 0 THEN '" . T_("Not called") . "' WHEN 1 THEN '" . T_("Requesting call") . "' WHEN 2 THEN '" . T_("Ringing") . "' WHEN 3 THEN '" . T_("Answered") . "' WHEN 4 THEN '" . T_("Requires coding") . "' ELSE '" . T_("Done") . "' END as state, CONCAT('<a href=\'supervisor.php?case_id=', c.case_id , '\'>' , c.case_id, '</a>') as case_id, SEC_TO_TIME(TIMESTAMPDIFF(SECOND,cal.start,CONVERT_TZ(NOW(),'SYSTEM','UTC'))) as calltime, voip_status as vs
|
$sql= "SELECT o.firstName, o.extension, CASE o.voip_status WHEN 0 THEN '" . TQ_("VoIP Offline") . "' ELSE '" . TQ_("VoIP Online") . "' END as voip_status, CASE ca.state WHEN 0 THEN '" . TQ_("Not called") . "' WHEN 1 THEN '" . TQ_("Requesting call") . "' WHEN 2 THEN '" . TQ_("Ringing") . "' WHEN 3 THEN '" . TQ_("Answered") . "' WHEN 4 THEN '" . TQ_("Requires coding") . "' ELSE '" . TQ_("Done") . "' END as state, CONCAT('<a href=\'supervisor.php?case_id=', c.case_id , '\'>' , c.case_id, '</a>') as case_id, SEC_TO_TIME(TIMESTAMPDIFF(SECOND,cal.start,CONVERT_TZ(NOW(),'SYSTEM','UTC'))) as calltime, voip_status as vs
|
||||||
FROM operator as o
|
FROM operator as o
|
||||||
LEFT JOIN `case` as c ON (c.current_operator_id = o.operator_id)
|
LEFT JOIN `case` as c ON (c.current_operator_id = o.operator_id)
|
||||||
LEFT JOIN `call_attempt` as cal ON (cal.operator_id = o.operator_id AND cal.end IS NULL and cal.case_id = c.case_id)
|
LEFT JOIN `call_attempt` as cal ON (cal.operator_id = o.operator_id AND cal.end IS NULL and cal.case_id = c.case_id)
|
||||||
|
|||||||
@@ -233,20 +233,20 @@ if ($display)
|
|||||||
{
|
{
|
||||||
$sql = "SELECT
|
$sql = "SELECT
|
||||||
CONCAT(firstName, ' ', lastName) as name,
|
CONCAT(firstName, ' ', lastName) as name,
|
||||||
CONCAT('<a href=\'?winbat=winbat&operator_id=',operator_id,'\'>" . T_("Windows bat file") . "</a>') as winbat,
|
CONCAT('<a href=\'?winbat=winbat&operator_id=',operator_id,'\'>" . TQ_("Windows bat file") . "</a>') as winbat,
|
||||||
CONCAT('<a href=\'?sh=sh&operator_id=',operator_id,'\'>" . T_("*nix script file") . "</a>') as sh,
|
CONCAT('<a href=\'?sh=sh&operator_id=',operator_id,'\'>" . TQ_("*nix script file") . "</a>') as sh,
|
||||||
CASE WHEN enabled = 0 THEN
|
CASE WHEN enabled = 0 THEN
|
||||||
CONCAT('<a href=\'?enable=',operator_id,'\'>" . T_("Enable") . "</a>')
|
CONCAT('<a href=\'?enable=',operator_id,'\'>" . TQ_("Enable") . "</a>')
|
||||||
ELSE
|
ELSE
|
||||||
CONCAT('<a href=\'?disable=',operator_id,'\'>" . T_("Disable") . "</a>')
|
CONCAT('<a href=\'?disable=',operator_id,'\'>" . TQ_("Disable") . "</a>')
|
||||||
END
|
END
|
||||||
as enabledisable,
|
as enabledisable,
|
||||||
CASE WHEN voip = 0 THEN
|
CASE WHEN voip = 0 THEN
|
||||||
CONCAT('<a href=\'?voipenable=',operator_id,'\'>" . T_("Enable VoIP") . "</a>')
|
CONCAT('<a href=\'?voipenable=',operator_id,'\'>" . TQ_("Enable VoIP") . "</a>')
|
||||||
ELSE
|
ELSE
|
||||||
CONCAT('<a href=\'?voipdisable=',operator_id,'\'>" . T_("Disable VoIP") . "</a>')
|
CONCAT('<a href=\'?voipdisable=',operator_id,'\'>" . TQ_("Disable VoIP") . "</a>')
|
||||||
END as voipenabledisable,
|
END as voipenabledisable,
|
||||||
CONCAT('<a href=\'?edit=',operator_id,'\'>" . T_("Edit") . "</a>') as edit,
|
CONCAT('<a href=\'?edit=',operator_id,'\'>" . TQ_("Edit") . "</a>') as edit,
|
||||||
username
|
username
|
||||||
FROM operator";
|
FROM operator";
|
||||||
|
|
||||||
|
|||||||
@@ -85,7 +85,7 @@ if ($questionnaire_id)
|
|||||||
$shift_id = false;
|
$shift_id = false;
|
||||||
if (isset($_GET['shift_id'])) $shift_id = bigintval($_GET['shift_id']);
|
if (isset($_GET['shift_id'])) $shift_id = bigintval($_GET['shift_id']);
|
||||||
|
|
||||||
$sql = "SELECT s.shift_id as value,CONCAT(DATE_FORMAT(CONVERT_TZ(s.start,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT . "'),' " . T_("till") . " ',DATE_FORMAT(CONVERT_TZ(s.end,'UTC',o.Time_zone_name),'" . TIME_FORMAT . "')) as description,CASE WHEN s.shift_id = '$shift_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
$sql = "SELECT s.shift_id as value,CONCAT(DATE_FORMAT(CONVERT_TZ(s.start,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT . "'),' " . TQ_("till") . " ',DATE_FORMAT(CONVERT_TZ(s.end,'UTC',o.Time_zone_name),'" . TIME_FORMAT . "')) as description,CASE WHEN s.shift_id = '$shift_id' THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||||
FROM shift as s
|
FROM shift as s
|
||||||
LEFT JOIN (operator as o) on (o.operator_id = '$operator_id')
|
LEFT JOIN (operator as o) on (o.operator_id = '$operator_id')
|
||||||
WHERE s.questionnaire_id = '$questionnaire_id'
|
WHERE s.questionnaire_id = '$questionnaire_id'
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ if ($questionnaire_id != false)
|
|||||||
|
|
||||||
print "<p>" . T_("Sample status") . "</p>";
|
print "<p>" . T_("Sample status") . "</p>";
|
||||||
|
|
||||||
$sql = "SELECT CASE WHEN (c.sample_id is not null) = 1 THEN '" . T_("Drawn from sample") . "' ELSE '" . T_("Remain in sample") . "' END as drawn,
|
$sql = "SELECT CASE WHEN (c.sample_id is not null) = 1 THEN '" . TQ_("Drawn from sample") . "' ELSE '" . TQ_("Remain in sample") . "' END as drawn,
|
||||||
count(*) as count
|
count(*) as count
|
||||||
FROM sample as s
|
FROM sample as s
|
||||||
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = '$questionnaire_id' and qs.sample_import_id = s.import_id)
|
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = '$questionnaire_id' and qs.sample_import_id = s.import_id)
|
||||||
@@ -230,7 +230,7 @@ group by s.import_id";
|
|||||||
{
|
{
|
||||||
print "<p>" . T_("Sample status") . "</p>";
|
print "<p>" . T_("Sample status") . "</p>";
|
||||||
|
|
||||||
$sql = "SELECT CASE WHEN (c.sample_id is not null) = 1 THEN '" . T_("Drawn from sample") . "' ELSE '" . T_("Remain in sample") . "' END as drawn,
|
$sql = "SELECT CASE WHEN (c.sample_id is not null) = 1 THEN '" . TQ_("Drawn from sample") . "' ELSE '" . TQ_("Remain in sample") . "' END as drawn,
|
||||||
count(*) as count
|
count(*) as count
|
||||||
FROM sample as s
|
FROM sample as s
|
||||||
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = '$questionnaire_id' and qs.sample_import_id = s.import_id)
|
JOIN questionnaire_sample as qs ON (qs.questionnaire_id = '$questionnaire_id' and qs.sample_import_id = s.import_id)
|
||||||
@@ -273,7 +273,7 @@ group by s.import_id";
|
|||||||
print "<h2>" . T_("Shifts") . "</h2>";
|
print "<h2>" . T_("Shifts") . "</h2>";
|
||||||
|
|
||||||
$sql = "SELECT s.shift_id, CONCAT(DATE_FORMAT(CONVERT_TZ(s.start,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT ."'), ' - ', DATE_FORMAT(CONVERT_TZ(s.end,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT ."')) as description,
|
$sql = "SELECT s.shift_id, CONCAT(DATE_FORMAT(CONVERT_TZ(s.start,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT ."'), ' - ', DATE_FORMAT(CONVERT_TZ(s.end,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT ."')) as description,
|
||||||
CASE WHEN sr.shift_id IS NULL THEN CONCAT('<a href=\'shiftreport.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '&createnewreport=yes\'>" . T_("No shift reports: Add report") . "</a>') ELSE CONCAT('<a href=\'shiftreport.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '\'>" . T_("View shift reports") . "</a>') END AS link, c.completions as completions, CONCAT('<a href=\'operatorperformance.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '\'>" . T_("View operator performance") . "</a>') as operform
|
CASE WHEN sr.shift_id IS NULL THEN CONCAT('<a href=\'shiftreport.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '&createnewreport=yes\'>" . TQ_("No shift reports: Add report") . "</a>') ELSE CONCAT('<a href=\'shiftreport.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '\'>" . TQ_("View shift reports") . "</a>') END AS link, c.completions as completions, CONCAT('<a href=\'operatorperformance.php?questionnaire_id=$questionnaire_id&shift_id=', s.shift_id, '\'>" . TQ_("View operator performance") . "</a>') as operform
|
||||||
FROM `shift` as s
|
FROM `shift` as s
|
||||||
JOIN operator as o on (o.operator_id = '$admin_operator_id')
|
JOIN operator as o on (o.operator_id = '$admin_operator_id')
|
||||||
LEFT JOIN shift_report as sr on (sr.shift_id = s.shift_id)
|
LEFT JOIN shift_report as sr on (sr.shift_id = s.shift_id)
|
||||||
|
|||||||
@@ -382,7 +382,7 @@ else if (isset($_GET['delete']))
|
|||||||
print "<p>" . T_("Please confirm you wish to delete the questionnaire") . "</p>";
|
print "<p>" . T_("Please confirm you wish to delete the questionnaire") . "</p>";
|
||||||
|
|
||||||
print "<form method='post' action='?'>";
|
print "<form method='post' action='?'>";
|
||||||
print "<p><input type='submit' name='submit' value='" . T_("Delete this questionnaire") . "'/>";
|
print "<p><input type='submit' name='submit' value='" . TQ_("Delete this questionnaire") . "'/>";
|
||||||
print "<input type='hidden' name='questionnaire_id' value='$questionnaire_id'/></p>";
|
print "<input type='hidden' name='questionnaire_id' value='$questionnaire_id'/></p>";
|
||||||
print "</form>";
|
print "</form>";
|
||||||
}
|
}
|
||||||
@@ -394,13 +394,13 @@ else
|
|||||||
$sql = "SELECT
|
$sql = "SELECT
|
||||||
description,
|
description,
|
||||||
CASE WHEN enabled = 0 THEN
|
CASE WHEN enabled = 0 THEN
|
||||||
CONCAT('<a href=\'?enable=',questionnaire_id,'\'>" . T_("Enable") . "</a>')
|
CONCAT('<a href=\'?enable=',questionnaire_id,'\'>" . TQ_("Enable") . "</a>')
|
||||||
ELSE
|
ELSE
|
||||||
CONCAT('<a href=\'?disable=',questionnaire_id,'\'>" . T_("Disable") . "</a>')
|
CONCAT('<a href=\'?disable=',questionnaire_id,'\'>" . TQ_("Disable") . "</a>')
|
||||||
END
|
END
|
||||||
as enabledisable,
|
as enabledisable,
|
||||||
CONCAT('<a href=\'?modify=',questionnaire_id,'\'>" . T_("Modify"). "</a>') as modify,
|
CONCAT('<a href=\'?modify=',questionnaire_id,'\'>" . TQ_("Modify"). "</a>') as modify,
|
||||||
CONCAT('<a href=\'?delete=',questionnaire_id,'\'>" . T_("Delete"). "</a>') as deletee
|
CONCAT('<a href=\'?delete=',questionnaire_id,'\'>" . TQ_("Delete"). "</a>') as deletee
|
||||||
FROM questionnaire";
|
FROM questionnaire";
|
||||||
|
|
||||||
$rs = $db->GetAll($sql);
|
$rs = $db->GetAll($sql);
|
||||||
|
|||||||
@@ -282,7 +282,7 @@ if ($questionnaire_id)
|
|||||||
|
|
||||||
print "<form action='' method='post'>";
|
print "<form action='' method='post'>";
|
||||||
xhtml_table($report,array("strata","status","quota","sample","sampleused","sampleremain","completions","perc","priority","autoprioritise"),array(T_("Strata"),T_("Status"),T_("Quota"),T_("Sample"),T_("Sample Used"),T_("Sample Remaining"),T_("Completions"),T_("% Complete"),T_("Set priority"),T_("Auto prioritise")),"tclass",false,false);
|
xhtml_table($report,array("strata","status","quota","sample","sampleused","sampleremain","completions","perc","priority","autoprioritise"),array(T_("Strata"),T_("Status"),T_("Quota"),T_("Sample"),T_("Sample Used"),T_("Sample Remaining"),T_("Completions"),T_("% Complete"),T_("Set priority"),T_("Auto prioritise")),"tclass",false,false);
|
||||||
print "<p><input type='hidden' name='questionnaire_id' id='questionnaire_id' value='$questionnaire_id'/><input type='submit' id='submit' name='submit' value='" . T_("Update priorities") . "'/></p></form>";
|
print "<p><input type='hidden' name='questionnaire_id' id='questionnaire_id' value='$questionnaire_id'/><input type='submit' id='submit' name='submit' value='" . TQ_("Update priorities") . "'/></p></form>";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -211,11 +211,11 @@ if ($questionnaire_id != false)
|
|||||||
{
|
{
|
||||||
print "<form action='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' method='post'><p>" . T_("Copy quotas for this sample to (No error/duplicate checking): ");
|
print "<form action='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' method='post'><p>" . T_("Copy quotas for this sample to (No error/duplicate checking): ");
|
||||||
display_chooser($ss,"copy_sample_import_id","copy_sample_import_id",false,false,false,false);
|
display_chooser($ss,"copy_sample_import_id","copy_sample_import_id",false,false,false,false);
|
||||||
print "<input type='submit' id='submit' value='" . T_("Copy") . "'/></p></form>";
|
print "<input type='submit' id='submit' value='" . TQ_("Copy") . "'/></p></form>";
|
||||||
|
|
||||||
print "<form action='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' method='post'><p>" . T_("Copy quotas for this sample to (No error/duplicate checking) with adjusting: ");
|
print "<form action='?questionnaire_id=$questionnaire_id&sample_import_id=$sample_import_id' method='post'><p>" . T_("Copy quotas for this sample to (No error/duplicate checking) with adjusting: ");
|
||||||
display_chooser($ss,"copy_sample_import_id_with_adjustment","copy_sample_import_id_with_adjustment",false,false,false,false);
|
display_chooser($ss,"copy_sample_import_id_with_adjustment","copy_sample_import_id_with_adjustment",false,false,false,false);
|
||||||
print "<input type='submit' id='submit' value='" . T_("Copy adjustments") . "'/></p></form>";
|
print "<input type='submit' id='submit' value='" . TQ_("Copy adjustments") . "'/></p></form>";
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -260,14 +260,14 @@ if (isset($_GET['sampleenable']))
|
|||||||
|
|
||||||
$sql = "SELECT
|
$sql = "SELECT
|
||||||
CASE WHEN enabled = 0 THEN
|
CASE WHEN enabled = 0 THEN
|
||||||
CONCAT('<a href=\'?sampleenable=',sample_import_id,'\'>" . T_("Enable") . "</a>')
|
CONCAT('<a href=\'?sampleenable=',sample_import_id,'\'>" . TQ_("Enable") . "</a>')
|
||||||
ELSE
|
ELSE
|
||||||
CONCAT('<a href=\'?sampledisable=',sample_import_id,'\'>" . T_("Disable") . "</a>')
|
CONCAT('<a href=\'?sampledisable=',sample_import_id,'\'>" . TQ_("Disable") . "</a>')
|
||||||
END
|
END
|
||||||
as enabledisable,
|
as enabledisable,
|
||||||
CONCAT('<a href=\'?edit=',sample_import_id,'\'>" . T_("Deidentify") . "</a>') as did,
|
CONCAT('<a href=\'?edit=',sample_import_id,'\'>" . TQ_("Deidentify") . "</a>') as did,
|
||||||
CONCAT('<a href=\'?view=',sample_import_id,'\'>" . T_("Operator viewing permissions") . "</a>') as vp,
|
CONCAT('<a href=\'?view=',sample_import_id,'\'>" . TQ_("Operator viewing permissions") . "</a>') as vp,
|
||||||
CONCAT('<a href=\'?rename=',sample_import_id,'\'>" . T_("Rename") . "</a>') as rname,
|
CONCAT('<a href=\'?rename=',sample_import_id,'\'>" . TQ_("Rename") . "</a>') as rname,
|
||||||
description
|
description
|
||||||
FROM sample_import";
|
FROM sample_import";
|
||||||
|
|
||||||
|
|||||||
@@ -97,7 +97,7 @@ if ($sample_import_id != false)
|
|||||||
{
|
{
|
||||||
$search = $db->qstr($_GET['search']);
|
$search = $db->qstr($_GET['search']);
|
||||||
|
|
||||||
$sql = "SELECT sv.sample_id, CASE WHEN c.case_id IS NULL THEN CONCAT('<a href=\'?sample_import_id=$sample_import_id&sample_id=', sv.sample_id , '\'>" . T_("No cases yet assigned: Delete this sample record") . "</a>') ELSE CONCAT('<a href=\'supervisor.php?case_id=', c.case_id , '\'>" . T_("Assigned to questionnaire: ") . "', q.description, '</a>') END as link
|
$sql = "SELECT sv.sample_id, CASE WHEN c.case_id IS NULL THEN CONCAT('<a href=\'?sample_import_id=$sample_import_id&sample_id=', sv.sample_id , '\'>" . TQ_("No cases yet assigned: Delete this sample record") . "</a>') ELSE CONCAT('<a href=\'supervisor.php?case_id=', c.case_id , '\'>" . TQ_("Assigned to questionnaire: ") . "', q.description, '</a>') END as link
|
||||||
FROM sample_var AS sv
|
FROM sample_var AS sv
|
||||||
JOIN (sample as s) ON (s.import_id = '$sample_import_id' and sv.sample_id = s.sample_id)
|
JOIN (sample as s) ON (s.import_id = '$sample_import_id' and sv.sample_id = s.sample_id)
|
||||||
LEFT JOIN (`case` AS c, questionnaire AS q) ON ( c.sample_id = sv.sample_id AND q.questionnaire_id = c.questionnaire_id )
|
LEFT JOIN (`case` AS c, questionnaire AS q) ON ( c.sample_id = sv.sample_id AND q.questionnaire_id = c.questionnaire_id )
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ if ($questionnaire_id)
|
|||||||
|
|
||||||
//list current reports with a link to edit
|
//list current reports with a link to edit
|
||||||
$sql = "SELECT s.report,o.firstName,DATE_FORMAT(CONVERT_TZ(s.datetime,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT ."') as d,
|
$sql = "SELECT s.report,o.firstName,DATE_FORMAT(CONVERT_TZ(s.datetime,'UTC',o.Time_zone_name),'" . DATE_TIME_FORMAT ."') as d,
|
||||||
CONCAT('<a href=\'?questionnaire_id=$questionnaire_id&shift_id=$shift_id&shift_report_id=', s.shift_report_id, '\'>". T_("Edit") . "</a>') as link
|
CONCAT('<a href=\'?questionnaire_id=$questionnaire_id&shift_id=$shift_id&shift_report_id=', s.shift_report_id, '\'>". TQ_("Edit") . "</a>') as link
|
||||||
FROM shift_report as s, operator as o
|
FROM shift_report as s, operator as o
|
||||||
WHERE s.operator_id = o.operator_id
|
WHERE s.operator_id = o.operator_id
|
||||||
AND s.shift_id = '$shift_id'";
|
AND s.shift_id = '$shift_id'";
|
||||||
@@ -114,7 +114,7 @@ if ($questionnaire_id)
|
|||||||
print "<form action='?' method='get'><p><textarea name='report' id='report' rows='15' cols='80'></textarea></p>";
|
print "<form action='?' method='get'><p><textarea name='report' id='report' rows='15' cols='80'></textarea></p>";
|
||||||
print "<p><input type='hidden' name='questionnaire_id' id='questionnaire_id' value='$questionnaire_id'/>";
|
print "<p><input type='hidden' name='questionnaire_id' id='questionnaire_id' value='$questionnaire_id'/>";
|
||||||
print "<input type='hidden' name='shift_id' id='shift_id' value='$shift_id'/>";
|
print "<input type='hidden' name='shift_id' id='shift_id' value='$shift_id'/>";
|
||||||
print "<input type='submit' name='submit' id='submit' value='" . T_("Add report") . "'/>";
|
print "<input type='submit' name='submit' id='submit' value='" . TQ_("Add report") . "'/>";
|
||||||
print "</p></form>";
|
print "</p></form>";
|
||||||
}
|
}
|
||||||
else if (isset($_GET['report']))
|
else if (isset($_GET['report']))
|
||||||
@@ -160,7 +160,7 @@ if ($questionnaire_id)
|
|||||||
print "<p><input type='hidden' name='questionnaire_id' id='questionnaire_id' value='$questionnaire_id'/>";
|
print "<p><input type='hidden' name='questionnaire_id' id='questionnaire_id' value='$questionnaire_id'/>";
|
||||||
print "<input type='hidden' name='shift_id' id='shift_id' value='$shift_id'/>";
|
print "<input type='hidden' name='shift_id' id='shift_id' value='$shift_id'/>";
|
||||||
print "<input type='hidden' name='shift_report_id' id='shift_report_id' value='$shift_report_id'/>";
|
print "<input type='hidden' name='shift_report_id' id='shift_report_id' value='$shift_report_id'/>";
|
||||||
print "<input type='submit' name='submit' id='submit' value='" . T_("Modify report") . "'/>";
|
print "<input type='submit' name='submit' id='submit' value='" . TQ_("Modify report") . "'/>";
|
||||||
print "</p></form>";
|
print "</p></form>";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -237,7 +237,7 @@ if ($case_id != false)
|
|||||||
print "<h3>" . T_("Appointments")."</h3>";
|
print "<h3>" . T_("Appointments")."</h3>";
|
||||||
|
|
||||||
//View appointments
|
//View appointments
|
||||||
$sql = "SELECT q.description, CONVERT_TZ(a.start,'UTC',o.Time_zone_name) as start, CONVERT_TZ(a.end,'UTC',o.Time_zone_name) as end, r.firstName, r.lastName, IFNULL(ou.description,'" . T_("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=\'displayappointments.php?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '&delete=delete\'>". T_("Delete") . "</a>') as link, CONCAT('<a href=\'displayappointments.php?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\'>". T_("Edit") . "</a>') as edit
|
$sql = "SELECT q.description, CONVERT_TZ(a.start,'UTC',o.Time_zone_name) as start, CONVERT_TZ(a.end,'UTC',o.Time_zone_name) as end, r.firstName, r.lastName, 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=\'displayappointments.php?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '&delete=delete\'>". TQ_("Delete") . "</a>') as link, CONCAT('<a href=\'displayappointments.php?case_id=', c.case_id, '&appointment_id=', a.appointment_id, '\'>". TQ_("Edit") . "</a>') as edit
|
||||||
FROM appointment as a
|
FROM appointment as a
|
||||||
JOIN (`case` as c, respondent as r, questionnaire as q, operator as o, 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 o, 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)
|
||||||
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 (`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)
|
||||||
@@ -259,7 +259,7 @@ if ($case_id != false)
|
|||||||
|
|
||||||
|
|
||||||
//view calls and outcomes
|
//view calls and outcomes
|
||||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',r.Time_zone_name),'".DATE_TIME_FORMAT."') as start,CONVERT_TZ(c.end,'UTC',r.Time_zone_name) as end, op.firstName, op.lastName, o.description as des, CONCAT('<a href=\'?case_id=$case_id&call_id=', c.call_id, '\'>". T_("Edit") . "</a>') as link, cp.phone as phone
|
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',r.Time_zone_name),'".DATE_TIME_FORMAT."') as start,CONVERT_TZ(c.end,'UTC',r.Time_zone_name) as end, op.firstName, op.lastName, o.description as des, CONCAT('<a href=\'?case_id=$case_id&call_id=', c.call_id, '\'>". TQ_("Edit") . "</a>') as link, cp.phone as phone
|
||||||
FROM `call` as c
|
FROM `call` as c
|
||||||
JOIN (operator as op, outcome as o, respondent as r, contact_phone as cp) on (c.operator_id = op.operator_id and c.outcome_id = o.outcome_id and r.respondent_id = c.respondent_id and cp.contact_phone_id = c.contact_phone_id)
|
JOIN (operator as op, outcome as o, respondent as r, contact_phone as cp) on (c.operator_id = op.operator_id and c.outcome_id = o.outcome_id and r.respondent_id = c.respondent_id and cp.contact_phone_id = c.contact_phone_id)
|
||||||
WHERE c.case_id = '$case_id'
|
WHERE c.case_id = '$case_id'
|
||||||
@@ -277,7 +277,7 @@ if ($case_id != false)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//view notes
|
//view notes
|
||||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.datetime,'UTC',op.Time_zone_name),'".DATE_TIME_FORMAT."') as time, op.firstName, op.lastName, c.note as note, CONCAT('<a href=\'?case_id=$case_id&case_note_id=', c.case_note_id, '\'>". T_("Delete") . "</a>') as link
|
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.datetime,'UTC',op.Time_zone_name),'".DATE_TIME_FORMAT."') as time, op.firstName, op.lastName, c.note as note, CONCAT('<a href=\'?case_id=$case_id&case_note_id=', c.case_note_id, '\'>". TQ_("Delete") . "</a>') as link
|
||||||
FROM `case_note` as c
|
FROM `case_note` as c
|
||||||
JOIN (operator as op) on (c.operator_id = op.operator_id)
|
JOIN (operator as op) on (c.operator_id = op.operator_id)
|
||||||
WHERE c.case_id = '$case_id'
|
WHERE c.case_id = '$case_id'
|
||||||
|
|||||||
@@ -127,7 +127,7 @@ while (!is_process_killed($process_id)) //check if process killed every $sleepin
|
|||||||
//add note
|
//add note
|
||||||
|
|
||||||
$sql = "INSERT INTO case_note (case_id,operator_id,note,`datetime`)
|
$sql = "INSERT INTO case_note (case_id,operator_id,note,`datetime`)
|
||||||
VALUES ('{$r['case_id']}',1,'" . T_("System automatically closed case as not closed for more than 24 hours") ."', CONVERT_TZ(NOW(),'System','UTC'))";
|
VALUES ('{$r['case_id']}',1,'" . TQ_("System automatically closed case as not closed for more than 24 hours") ."', CONVERT_TZ(NOW(),'System','UTC'))";
|
||||||
|
|
||||||
$db->Execute($sql);
|
$db->Execute($sql);
|
||||||
|
|
||||||
@@ -165,7 +165,7 @@ while (!is_process_killed($process_id)) //check if process killed every $sleepin
|
|||||||
//add note
|
//add note
|
||||||
|
|
||||||
$sql = "INSERT INTO case_note (case_id,operator_id,note,`datetime`)
|
$sql = "INSERT INTO case_note (case_id,operator_id,note,`datetime`)
|
||||||
VALUES ('{$r['case_id']}',1,'" . T_("System automatically closed case as not closed for more than 24 hours") ."', CONVERT_TZ(NOW(),'System','UTC'))";
|
VALUES ('{$r['case_id']}',1,'" . TQ_("System automatically closed case as not closed for more than 24 hours") ."', CONVERT_TZ(NOW(),'System','UTC'))";
|
||||||
|
|
||||||
$db->Execute($sql);
|
$db->Execute($sql);
|
||||||
|
|
||||||
|
|||||||
@@ -67,7 +67,7 @@ $rs = "";
|
|||||||
|
|
||||||
if ($case_id)
|
if ($case_id)
|
||||||
{
|
{
|
||||||
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',r.Time_zone_name),'".DATE_TIME_FORMAT."') as start,DATE_FORMAT(CONVERT_TZ(c.end,'UTC',r.Time_zone_name),'".TIME_FORMAT."') as end, c.completed_call_id, IFNULL(ou.firstName,'" . T_("Not yet called") . "') as firstName, CONCAT(r.firstName, ' ', r.lastName) as respname, IFNULL(o.description,'" . T_("Not yet called") . "') as des, IFNULL(ao.firstName,'" . T_("Any operator") . "') as witho
|
$sql = "SELECT DATE_FORMAT(CONVERT_TZ(c.start,'UTC',r.Time_zone_name),'".DATE_TIME_FORMAT."') as start,DATE_FORMAT(CONVERT_TZ(c.end,'UTC',r.Time_zone_name),'".TIME_FORMAT."') as end, c.completed_call_id, IFNULL(ou.firstName,'" . TQ_("Not yet called") . "') as firstName, CONCAT(r.firstName, ' ', r.lastName) as respname, IFNULL(o.description,'" . TQ_("Not yet called") . "') as des, IFNULL(ao.firstName,'" . TQ_("Any operator") . "') as witho
|
||||||
FROM `appointment` as c
|
FROM `appointment` as c
|
||||||
JOIN respondent as r on (r.respondent_id = c.respondent_id)
|
JOIN respondent as r on (r.respondent_id = c.respondent_id)
|
||||||
LEFT JOIN (`call` as ca, outcome as o, operator as ou) on (ca.call_id = c.completed_call_id and ca.outcome_id = o.outcome_id and ou.operator_id = ca.operator_id)
|
LEFT JOIN (`call` as ca, outcome as o, operator as ou) on (ca.call_id = c.completed_call_id and ca.outcome_id = o.outcome_id and ou.operator_id = ca.operator_id)
|
||||||
|
|||||||
8
call.php
8
call.php
@@ -428,27 +428,27 @@ switch($state)
|
|||||||
print "<div><a href='?newstate=3'>" . T_("Call Answered") . "</a></div>";
|
print "<div><a href='?newstate=3'>" . T_("Call Answered") . "</a></div>";
|
||||||
print "<form action='?' method='post'>";
|
print "<form action='?' method='post'>";
|
||||||
display_outcomes(0,$call_attempt_id,$case_id);
|
display_outcomes(0,$call_attempt_id,$case_id);
|
||||||
print "<div><input type='submit' value='" . T_("Hangup") . "' name='submit' id='submit'/></div></form>";
|
print "<div><input type='submit' value='" . TQ_("Hangup") . "' name='submit' id='submit'/></div></form>";
|
||||||
break;
|
break;
|
||||||
case 2: //ringing
|
case 2: //ringing
|
||||||
print "<div class='status'>" . T_("Ringing") . "</div>";
|
print "<div class='status'>" . T_("Ringing") . "</div>";
|
||||||
print "<div><a href='?newstate=3'>" . T_("Call Answered") . "</a></div>";
|
print "<div><a href='?newstate=3'>" . T_("Call Answered") . "</a></div>";
|
||||||
print "<form action='?' method='post'>";
|
print "<form action='?' method='post'>";
|
||||||
display_outcomes(0,$call_attempt_id,$case_id);
|
display_outcomes(0,$call_attempt_id,$case_id);
|
||||||
print "<div><input type='submit' value='" . T_("Hangup") . "' name='submit' id='submit'/></div></form>";
|
print "<div><input type='submit' value='" . TQ_("Hangup") . "' name='submit' id='submit'/></div></form>";
|
||||||
break;
|
break;
|
||||||
case 3: //answered
|
case 3: //answered
|
||||||
print "<div class='status'>" . T_("Answered") . "</div>";
|
print "<div class='status'>" . T_("Answered") . "</div>";
|
||||||
print "<div><a href='?newstate=2'>" . T_("Not Answered") . "</a></div>";
|
print "<div><a href='?newstate=2'>" . T_("Not Answered") . "</a></div>";
|
||||||
print "<form action='?' method='post'>";
|
print "<form action='?' method='post'>";
|
||||||
display_outcomes(1,$call_attempt_id,$case_id);
|
display_outcomes(1,$call_attempt_id,$case_id);
|
||||||
print "<div><input type='submit' value='" . T_("Hangup") . "' name='submit' id='submit'/></div></form>";
|
print "<div><input type='submit' value='" . TQ_("Hangup") . "' name='submit' id='submit'/></div></form>";
|
||||||
break;
|
break;
|
||||||
case 4: //requires coding
|
case 4: //requires coding
|
||||||
print "<div class='status'>" . T_("Requires coding") . "</div>";
|
print "<div class='status'>" . T_("Requires coding") . "</div>";
|
||||||
print "<form action='?' method='post'>";
|
print "<form action='?' method='post'>";
|
||||||
display_outcomes(false,$call_attempt_id,$case_id);
|
display_outcomes(false,$call_attempt_id,$case_id);
|
||||||
print "<div><input type='submit' value='" . T_("Assign outcome") . "' name='submit' id='submit'/></div></form>";
|
print "<div><input type='submit' value='" . TQ_("Assign outcome") . "' name='submit' id='submit'/></div></form>";
|
||||||
break;
|
break;
|
||||||
case 5: //done -- shouldn't come here as should be coded + done
|
case 5: //done -- shouldn't come here as should be coded + done
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -467,7 +467,7 @@ switch($state)
|
|||||||
print "<div class='status'>" . T_("Requires coding") . "</div>";
|
print "<div class='status'>" . T_("Requires coding") . "</div>";
|
||||||
print "<form action='?' method='post'>";
|
print "<form action='?' method='post'>";
|
||||||
display_outcomes(false,$call_attempt_id,$case_id);
|
display_outcomes(false,$call_attempt_id,$case_id);
|
||||||
print "<div><input type='submit' value='" . T_("Assign outcome") . "' name='submit' id='submit'/></div></form>";
|
print "<div><input type='submit' value='" . TQ_("Assign outcome") . "' name='submit' id='submit'/></div></form>";
|
||||||
break;
|
break;
|
||||||
case 5: //done -- shouldn't come here as should be coded + done
|
case 5: //done -- shouldn't come here as should be coded + done
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -238,7 +238,7 @@ if (isset($_POST['firstname']))
|
|||||||
//Add a note that sent
|
//Add a note that sent
|
||||||
|
|
||||||
$sql = "INSERT INTO `case_note` (case_id,operator_id,note,datetime)
|
$sql = "INSERT INTO `case_note` (case_id,operator_id,note,datetime)
|
||||||
VALUES ($case_id,$operator_id,'" . T_("Self completion invitation sent via email to") . ": " . $_POST['email'] . "',CONVERT_TZ(NOW(),'System','UTC'))";
|
VALUES ($case_id,$operator_id,'" . TQ_("Self completion invitation sent via email to") . ": " . $_POST['email'] . "',CONVERT_TZ(NOW(),'System','UTC'))";
|
||||||
|
|
||||||
$db->Execute($sql);
|
$db->Execute($sql);
|
||||||
|
|
||||||
@@ -339,9 +339,9 @@ if ($sc == 1)
|
|||||||
print "<div><label for='email'>" . T_("Email") . "</label><input type='text' value='{$rs['email']}' name='email' id='email'/></div>";
|
print "<div><label for='email'>" . T_("Email") . "</label><input type='text' value='{$rs['email']}' name='email' id='email'/></div>";
|
||||||
if (!isset($_GET['interface2']))
|
if (!isset($_GET['interface2']))
|
||||||
{
|
{
|
||||||
print "<div><input type='submit' value='" . T_("Send invitation") . "' name='submit' id='submit'/></div>";
|
print "<div><input type='submit' value='" . TQ_("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><input type='submit' value='" . TQ_("Send invitation and Hang up") . "' name='submith' id='submith'/></div></form>";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|||||||
13
lang.inc.php
13
lang.inc.php
@@ -48,6 +48,19 @@ function translate_array(&$a,$b)
|
|||||||
if (isset($row[$el])) $row[$el] = T_($row[$el]);
|
if (isset($row[$el])) $row[$el] = T_($row[$el]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Translate then quote a string to make it ready
|
||||||
|
* for database insertion
|
||||||
|
*
|
||||||
|
* @param string $msg The message to translate and quote
|
||||||
|
* @return string The translated message quoted
|
||||||
|
*/
|
||||||
|
function TQ_($msg)
|
||||||
|
{
|
||||||
|
$msg = T_($msg);
|
||||||
|
$msg = str_replace(array('\\',"\0"),array('\\\\',"\\\0"),$msg);
|
||||||
|
return str_replace("'","\\'",$msg);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
$locale = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
|
$locale = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
|
||||||
|
|||||||
@@ -174,15 +174,15 @@ if (AUTO_DIAL_SECONDS !== false)
|
|||||||
if ($contact_phone_id !== false)
|
if ($contact_phone_id !== false)
|
||||||
{
|
{
|
||||||
//got a number to dial so initiate the countdown to begin dialing
|
//got a number to dial so initiate the countdown to begin dialing
|
||||||
$texttodisplay = T_("Will dial in");
|
$texttodisplay = TQ_("Will dial in");
|
||||||
$endtexttodisplay = T_("Dialling now");
|
$endtexttodisplay = TQ_("Dialling now");
|
||||||
$jsfunctocall = "document.location.href = 'nocallavailable.php?contact_phone=" . $contact_phone_id . "';";
|
$jsfunctocall = "document.location.href = 'nocallavailable.php?contact_phone=" . $contact_phone_id . "';";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//no more numbers to dial so initiate the countdown to end the case
|
//no more numbers to dial so initiate the countdown to end the case
|
||||||
$texttodisplay = T_("Will end case in");
|
$texttodisplay = TQ_("Will end case in");
|
||||||
$endtexttodisplay = T_("Ending case now");
|
$endtexttodisplay = TQ_("Ending case now");
|
||||||
$jsfunctocall = "openParent('endcase=endcase');";
|
$jsfunctocall = "openParent('endcase=endcase');";
|
||||||
}
|
}
|
||||||
print "<div id='timer'></div>";
|
print "<div id='timer'></div>";
|
||||||
@@ -200,7 +200,7 @@ if (AUTO_DIAL_SECONDS !== false)
|
|||||||
" . $jsfunctocall . "
|
" . $jsfunctocall . "
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
document.getElementById('timer').innerHTML='". $texttodisplay ." ' + count + ' " . T_("seconds") . "';
|
document.getElementById('timer').innerHTML='". $texttodisplay ." ' + count + ' " . TQ_("seconds") . "';
|
||||||
}
|
}
|
||||||
|
|
||||||
window.onload = function()
|
window.onload = function()
|
||||||
|
|||||||
@@ -77,7 +77,7 @@ $operator_id = get_operator_id();
|
|||||||
|
|
||||||
//you have not been assigned to a questionnaire
|
//you have not been assigned to a questionnaire
|
||||||
|
|
||||||
$sql = "SELECT oq.questionnaire_id, q.description, CASE WHEN q.enabled = 1 THEN '" . T_("Enabled") . "' ELSE '" . T_("Disabled") . "' END as enabled
|
$sql = "SELECT oq.questionnaire_id, q.description, CASE WHEN q.enabled = 1 THEN '" . TQ_("Enabled") . "' ELSE '" . TQ_("Disabled") . "' END as enabled
|
||||||
FROM operator_questionnaire as oq, questionnaire as q
|
FROM operator_questionnaire as oq, questionnaire as q
|
||||||
WHERE oq.operator_id = '$operator_id'
|
WHERE oq.operator_id = '$operator_id'
|
||||||
AND q.questionnaire_id = oq.questionnaire_id";
|
AND q.questionnaire_id = oq.questionnaire_id";
|
||||||
|
|||||||
@@ -91,7 +91,7 @@ if (isset($_GET['respondent_id']) && $_GET['respondent_id'] == 0)
|
|||||||
?>
|
?>
|
||||||
<form method="post" action="?">
|
<form method="post" action="?">
|
||||||
<?php display_respondent_form(false,$case_id); ?>
|
<?php display_respondent_form(false,$case_id); ?>
|
||||||
<div><input type='submit' name='submit' id='submit' value='<?php echo T_("Add respondent"); ?>'/></div>
|
<div><input type='submit' name='submit' id='submit' value='<?php echo TQ_("Add respondent"); ?>'/></div>
|
||||||
</form>
|
</form>
|
||||||
<div><a href="?"><?php echo T_("Go back"); ?></a></div>
|
<div><a href="?"><?php echo T_("Go back"); ?></a></div>
|
||||||
|
|
||||||
|
|||||||
@@ -76,10 +76,10 @@ if ($chatenabled && operator_chat_enabled($operator_id))
|
|||||||
|
|
||||||
//javascript to activate connection for this user
|
//javascript to activate connection for this user
|
||||||
print "<script type='text/javascript'>";
|
print "<script type='text/javascript'>";
|
||||||
print "var SUPERVISOR_NAME = '" . T_("Supervisor") . "';";
|
print "var SUPERVISOR_NAME = '" . TQ_("Supervisor") . "';";
|
||||||
print "var MY_NAME = '" . T_("Me") . "';";
|
print "var MY_NAME = '" . TQ_("Me") . "';";
|
||||||
print "var SUPERVISOR_XMPP = '$supervisor_xmpp';";
|
print "var SUPERVISOR_XMPP = '$supervisor_xmpp';";
|
||||||
print "var PRESENCE_MESSAGE = '" . T_("Case id") . ": $case_id';";
|
print "var PRESENCE_MESSAGE = '" . TQ_("Case id") . ": $case_id';";
|
||||||
print "var conn = new Strophe.Connection('$bosh_service');";
|
print "var conn = new Strophe.Connection('$bosh_service');";
|
||||||
print "conn.connect('" . get_operator_variable("chat_user",$operator_id) ."', '" . get_operator_variable("chat_password",$operator_id) . "', OnConnectionStatus);";
|
print "conn.connect('" . get_operator_variable("chat_user",$operator_id) ."', '" . get_operator_variable("chat_password",$operator_id) . "', OnConnectionStatus);";
|
||||||
print "</script>";
|
print "</script>";
|
||||||
@@ -87,7 +87,7 @@ if ($chatenabled && operator_chat_enabled($operator_id))
|
|||||||
print "<div style='display:none' id='statusavailable'>" . T_("Supervisor is available") . "</div>";
|
print "<div style='display:none' id='statusavailable'>" . T_("Supervisor is available") . "</div>";
|
||||||
print "<div id='statusunavailable'>" . T_("Supervisor not available") . "</div>";
|
print "<div id='statusunavailable'>" . T_("Supervisor not available") . "</div>";
|
||||||
|
|
||||||
print "<div id='chatbox'><label for='chattext'>" . T_("Message") . ":</label><input type='text' id='chattext'/> <input type='submit' id='chatclick' value='" . T_("Send") . "'/></div>";
|
print "<div id='chatbox'><label for='chattext'>" . T_("Message") . ":</label><input type='text' id='chattext'/> <input type='submit' id='chatclick' value='" . TQ_("Send") . "'/></div>";
|
||||||
|
|
||||||
//table for chat messages
|
//table for chat messages
|
||||||
print "<table class='tclass' id='chattable'><tbody><tr><th>" . T_("From") . "</th><th>" . T_("Message") . "</th></tr></tbody></table>";
|
print "<table class='tclass' id='chattable'><tbody><tr><th>" . T_("From") . "</th><th>" . T_("Message") . "</th></tr></tbody></table>";
|
||||||
|
|||||||
Reference in New Issue
Block a user