mirror of
https://github.com/ACSPRI/queXS
synced 2024-04-02 12:12:16 +00:00
fix PHP Notices: Undefined variable:, Undefined index:, Undefined offset:
This commit is contained in:
@@ -180,7 +180,7 @@ if (isset($_GET['edit']) || isset($_GET['addext']))
|
|||||||
WHERE extension_id = " . intval($_GET['edit']);
|
WHERE extension_id = " . intval($_GET['edit']);
|
||||||
|
|
||||||
$rs = $db->GetRow($sql);
|
$rs = $db->GetRow($sql);
|
||||||
}
|
} else $rs = array();
|
||||||
|
|
||||||
print "<a href='?' class='btn btn-default pull-left'>" . T_("Go back") . "</a>";
|
print "<a href='?' class='btn btn-default pull-left'>" . T_("Go back") . "</a>";
|
||||||
?>
|
?>
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ if (isset($_POST['ed']))
|
|||||||
if (isset($_POST['type'])){
|
if (isset($_POST['type'])){
|
||||||
|
|
||||||
//check that we have correct var types and quantity
|
//check that we have correct var types and quantity
|
||||||
$prph = 0; $pcd = 0; $st = 0; $fn = 0; $eml =0;
|
$prph = 0; $pcd = 0; $st = 0; $fn = 0; $eml =0; $ln =0;
|
||||||
foreach($_POST['type'] as $key => $val) {
|
foreach($_POST['type'] as $key => $val) {
|
||||||
if ($val == 3) $prph++;
|
if ($val == 3) $prph++;
|
||||||
else if ($val == 5) $pcd++;
|
else if ($val == 5) $pcd++;
|
||||||
|
|||||||
@@ -158,14 +158,14 @@ if (!empty($rs))
|
|||||||
</div><form method="get" action="?" class="form-inline ">
|
</div><form method="get" action="?" class="form-inline ">
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<?php
|
<?php
|
||||||
$call_id = bigintval($_GET['call_id']);
|
if (isset($_GET['call_id'])){ $call_id = bigintval($_GET['call_id']);
|
||||||
$sql = "SELECT o.outcome_id as value,description, CASE WHEN o.outcome_id = c.outcome_id THEN 'selected=\'selected\'' ELSE '' END AS selected
|
$sql = "SELECT o.outcome_id as value,description, CASE WHEN o.outcome_id = c.outcome_id THEN 'selected=\'selected\'' ELSE '' END AS selected
|
||||||
FROM outcome as o, `call` as c
|
FROM outcome as o, `call` as c
|
||||||
WHERE c.call_id = '$call_id'";
|
WHERE c.call_id = '$call_id'";
|
||||||
$rs2 = $db->GetAll($sql);
|
$rs2 = $db->GetAll($sql);
|
||||||
translate_array($rs2,array("description"));
|
translate_array($rs2,array("description"));
|
||||||
display_chooser($rs2, "set_outcome_id", "set_outcome_id",true,false,false,false); ?>
|
display_chooser($rs2, "set_outcome_id", "set_outcome_id",true,false,false,false); ?>
|
||||||
<input type="hidden" name="call_id" value="<?php echo $call_id;?>"/><input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
|
<input type="hidden" name="call_id" value="<?php echo $call_id;?>"/><input type="hidden" name="case_id" value="<?php echo $case_id;?>"/> <?php } ?>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo T_("Cancel"); ?></button>
|
<button type="button" class="btn btn-default" data-dismiss="modal"><?php echo T_("Cancel"); ?></button>
|
||||||
@@ -506,15 +506,15 @@ if ($case_id != false)
|
|||||||
//Display all availability groups as checkboxes
|
//Display all availability groups as checkboxes
|
||||||
print "<form action='?' method='get' class='form-horizontal '>";
|
print "<form action='?' method='get' class='form-horizontal '>";
|
||||||
print "<h5 class=''>" . T_("Select groups to limit availability (Selecting none means always available)") . "</h5><div class='col-sm-6'>";
|
print "<h5 class=''>" . T_("Select groups to limit availability (Selecting none means always available)") . "</h5><div class='col-sm-6'>";
|
||||||
foreach ($rs as $r)
|
foreach ($rs as $g)
|
||||||
{
|
{
|
||||||
$checked = "";
|
$checked = "";
|
||||||
|
|
||||||
//if ($allselected || $r['availability_group_id'] == $r['selected_group_id'])
|
//if ($allselected || $g['availability_group_id'] == $g['selected_group_id'])
|
||||||
if ($r['availability_group_id'] == $r['selected_group_id'])
|
if ($g['availability_group_id'] == $g['selected_group_id'])
|
||||||
$checked = "checked='checked'";
|
$checked = "checked='checked'";
|
||||||
|
|
||||||
print " <input type='checkbox' name='ag{$r['availability_group_id']}' id='ag{$r['availability_group_id']}' value='{$r['availability_group_id']}' $checked />  <label class='control-label' for='ag{$r['availability_group_id']}'>{$r['description']}</label></br>";
|
print " <input type='checkbox' name='ag{$g['availability_group_id']}' id='ag{$g['availability_group_id']}' value='{$g['availability_group_id']}' $checked />  <label class='control-label' for='ag{$g['availability_group_id']}'>{$g['description']}</label></br>";
|
||||||
}
|
}
|
||||||
?> </div>
|
?> </div>
|
||||||
<input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
|
<input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ $sql = "SELECT oq.questionnaire_id, q.description
|
|||||||
AND q.questionnaire_id = oq.questionnaire_id";
|
AND q.questionnaire_id = oq.questionnaire_id";
|
||||||
|
|
||||||
$rs = $db->GetAll($sql);
|
$rs = $db->GetAll($sql);
|
||||||
|
$cases_count = array(); $new_samples = array();
|
||||||
if (empty($rs))
|
if (empty($rs))
|
||||||
|
|
||||||
print "<div class='error well' style='margin:2%; color:red; font-size:1.5em;'><b>" . T_("ERROR: No questionnaires assigned to you") . "</b></div>";
|
print "<div class='error well' style='margin:2%; color:red; font-size:1.5em;'><b>" . T_("ERROR: No questionnaires assigned to you") . "</b></div>";
|
||||||
@@ -187,7 +187,7 @@ else
|
|||||||
?>
|
?>
|
||||||
<div id="">
|
<div id="">
|
||||||
<ul class="wait_wrapper">
|
<ul class="wait_wrapper">
|
||||||
<?php if ($cases_count['count_samples'] != 0 or $new_samples['count_samples'] != 0){ ?>
|
<?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>
|
<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>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li class="wait_li_2"><a href="endwork.php"><?php echo T_("End work"); ?> <img src="css/images/end.jpg" /></a></li>
|
<li class="wait_li_2"><a href="endwork.php"><?php echo T_("End work"); ?> <img src="css/images/end.jpg" /></a></li>
|
||||||
|
|||||||
Reference in New Issue
Block a user