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']);
|
||||
|
||||
$rs = $db->GetRow($sql);
|
||||
}
|
||||
} else $rs = array();
|
||||
|
||||
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'])){
|
||||
|
||||
//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) {
|
||||
if ($val == 3) $prph++;
|
||||
else if ($val == 5) $pcd++;
|
||||
|
||||
@@ -158,14 +158,14 @@ if (!empty($rs))
|
||||
</div><form method="get" action="?" class="form-inline ">
|
||||
<div class="modal-body">
|
||||
<?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
|
||||
FROM outcome as o, `call` as c
|
||||
WHERE c.call_id = '$call_id'";
|
||||
$rs2 = $db->GetAll($sql);
|
||||
translate_array($rs2,array("description"));
|
||||
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 class="modal-footer">
|
||||
<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
|
||||
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'>";
|
||||
foreach ($rs as $r)
|
||||
foreach ($rs as $g)
|
||||
{
|
||||
$checked = "";
|
||||
|
||||
//if ($allselected || $r['availability_group_id'] == $r['selected_group_id'])
|
||||
if ($r['availability_group_id'] == $r['selected_group_id'])
|
||||
//if ($allselected || $g['availability_group_id'] == $g['selected_group_id'])
|
||||
if ($g['availability_group_id'] == $g['selected_group_id'])
|
||||
$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>
|
||||
<input type="hidden" name="case_id" value="<?php echo $case_id;?>"/>
|
||||
|
||||
Reference in New Issue
Block a user