mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
Added transactions
This commit is contained in:
@@ -59,6 +59,8 @@ include("functions/functions.operator.php");
|
||||
*/
|
||||
include("functions/functions.input.php");
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$questionnaire_id = get_questionnaire_id($operator_id);
|
||||
$case_id = get_case_id($operator_id);
|
||||
@@ -67,6 +69,7 @@ if (!$case_id){
|
||||
xhtml_head(T_("Appointment error"));
|
||||
print("<div>" . T_("You have not been assigned a case therefore cannot create an appointment") . "</div>");
|
||||
xhtml_foot();
|
||||
$db->CompleteTrans();
|
||||
exit();
|
||||
}
|
||||
|
||||
@@ -99,8 +102,11 @@ if(isset($_POST['start']) && isset($_POST['end']) && isset($_POST['day']) && iss
|
||||
|
||||
make_appointment($respondent_id,$case_id,$contact_phone_id,$call_attempt_id,$day,$month,$year,$start,$end);
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
xhtml_head(T_("Appointment made"),true,false,false,"onload='top.close()'");
|
||||
xhtml_foot();
|
||||
exit();
|
||||
}
|
||||
|
||||
|
||||
@@ -218,6 +224,6 @@ else if(isset($_GET['respondent_id']))
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
?>
|
||||
|
||||
@@ -55,6 +55,8 @@ xhtml_head(T_("Call List"),true,array("css/table.css"),false,false,15);
|
||||
// display in respondent time so that the operator will be able to
|
||||
// quote verbatim to the respondent if necessary
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
$case_id = get_case_id(get_operator_id());
|
||||
|
||||
if ($case_id)
|
||||
@@ -80,5 +82,6 @@ else
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
$db->CompleteTrans();
|
||||
|
||||
?>
|
||||
|
||||
@@ -70,7 +70,9 @@ if (isset($_GET['add']))
|
||||
else
|
||||
{
|
||||
global $db;
|
||||
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$case_id = get_case_id($operator_id);
|
||||
|
||||
@@ -106,6 +108,8 @@ else
|
||||
}
|
||||
else
|
||||
print "<p>" . T_("No case") . "</p>";
|
||||
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
@@ -45,11 +45,12 @@ include ("functions/functions.xhtml.php");
|
||||
*/
|
||||
include("functions/functions.operator.php");
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
|
||||
if (isset($_GET['endwork']))
|
||||
{
|
||||
$db->StartTrans();
|
||||
|
||||
if (isset($_GET['note']))
|
||||
{
|
||||
@@ -72,7 +73,6 @@ if (isset($_GET['endwork']))
|
||||
|
||||
if (isset($_GET['endcase']))
|
||||
{
|
||||
$db->StartTrans();
|
||||
|
||||
if (isset($_GET['note']))
|
||||
{
|
||||
@@ -86,11 +86,8 @@ if (isset($_GET['endcase']))
|
||||
end_case($operator_id);
|
||||
|
||||
//if ($db->HasFailedTrans()) {print "<p>FAILED AT ENDCASE</p>"; exit();}
|
||||
$db->CompleteTrans();
|
||||
}
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
xhtml_head(T_("queXS"), true, array("css/index.css","css/tabber.css") , array("js/popup.js","js/tabber.js"));
|
||||
?>
|
||||
|
||||
|
||||
@@ -68,6 +68,8 @@ xhtml_head(T_("Respondent Selector"),true,array("css/table.css","css/respondent.
|
||||
|
||||
global $db;
|
||||
|
||||
$db->StartTrans();
|
||||
|
||||
$operator_id = get_operator_id();
|
||||
$call_attempt_id = get_call_attempt($operator_id);
|
||||
$case_id = get_case_id($operator_id);
|
||||
@@ -153,5 +155,5 @@ else
|
||||
|
||||
xhtml_foot();
|
||||
|
||||
|
||||
$db->CompleteTrans();
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user