mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Updates to Access Controls, Bridges, and Call Block.
This commit is contained in:
@@ -87,11 +87,21 @@
|
||||
//handle the http post
|
||||
if (count($_POST)>0 && strlen($_POST["persistformvar"]) == 0) {
|
||||
|
||||
$msg = '';
|
||||
if ($action == "update") {
|
||||
//$call_block_uuid = check_str($_POST["call_block_uuid"]);
|
||||
}
|
||||
|
||||
//delete the call block
|
||||
if (permission_exists('call_block_delete')) {
|
||||
if ($_POST['action'] == 'delete' && is_uuid($call_block_uuid)) {
|
||||
//prepare
|
||||
$array[0]['checked'] = 'true';
|
||||
$array[0]['uuid'] = $call_block_uuid;
|
||||
//delete
|
||||
$obj = new call_block;
|
||||
$obj->delete($array);
|
||||
//redirect
|
||||
header('Location: call_block.php');
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
//validate the token
|
||||
$token = new token;
|
||||
if (!$token->validate($_SERVER['PHP_SELF'])) {
|
||||
@@ -101,6 +111,7 @@
|
||||
}
|
||||
|
||||
//check for all required data
|
||||
$msg = '';
|
||||
if (strlen($call_block_name) == 0) { $msg .= $text['label-provide-name']."<br>\n"; }
|
||||
if ($action == "add") {
|
||||
if (strlen($call_block_number) == 0) { $msg .= $text['label-provide-number']."<br>\n"; }
|
||||
@@ -255,8 +266,6 @@
|
||||
echo " }\n";
|
||||
echo "</script>";
|
||||
|
||||
// Show last 5-10 calls first, with add button
|
||||
|
||||
echo "<form method='post' name='frm' action=''>\n";
|
||||
echo "<table width='100%' border='0' cellpadding='0' cellspacing='0'>\n";
|
||||
echo "<tr>\n";
|
||||
@@ -267,17 +276,20 @@
|
||||
echo "<td align='left' width='30%' nowrap='nowrap'><b>".$text['label-edit-edit']."</b></td>\n";
|
||||
}
|
||||
echo "<td width='70%' align='right'>";
|
||||
echo " <input type='button' class='btn' name='' alt='".$text['button-back']."' onclick=\"window.location='call_block.php'\" value='".$text['button-back']."'>";
|
||||
echo " <input type='button' class='btn' style='margin-right: 15px;' name='' alt='".$text['button-back']."' onclick=\"window.location='call_block.php'\" value='".$text['button-back']."'>";
|
||||
if ($action == 'update' && permission_exists('call_block_delete')) {
|
||||
echo button::create(['type'=>'submit','label'=>$text['button-delete'],'icon'=>$_SESSION['theme']['button_icon_delete'],'name'=>'action','value'=>'delete','onclick'=>"if (confirm('".$text['confirm-delete']."')) { document.getElementById('frm').submit(); } else { this.blur(); return false; }",'style'=>'margin-right: 15px;']);
|
||||
}
|
||||
echo " <input type='submit' name='submit' class='btn' value='".$text['button-save']."'>\n";
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
echo "<tr>\n";
|
||||
echo "<td align='left' colspan='2'>\n";
|
||||
if ($action == "add") {
|
||||
echo $text['label-add-note']."<br /><br />\n";
|
||||
echo $text['label-add-note']."<br /><br />\n";
|
||||
}
|
||||
if ($action == "update") {
|
||||
echo $text['label-edit-note']."<br /><br />\n";
|
||||
echo $text['label-edit-note']."<br /><br />\n";
|
||||
}
|
||||
echo "</td>\n";
|
||||
echo "</tr>\n";
|
||||
|
||||
Reference in New Issue
Block a user