-
Notifications
You must be signed in to change notification settings - Fork 10
/
page.ringgroups.php
42 lines (38 loc) · 1.03 KB
/
page.ringgroups.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<?php /* $Id$ */
if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); }
$rg = \FreePBX::create()->Ringgroups;
$request = $_REQUEST;
$tabindex = 0;
$dispnum = 'ringgroups'; //used for switch on config.php
$usagehtml = '';
$heading = _("Ring Groups");
$border = 'no';
switch($_GET['view']??''){
case "form":
$border = 'full';
if($request['extdisplay'] != ''){
$heading .= ": Edit ".ltrim((string) $request['extdisplay'],'GRP-');
$usagehtml = FreePBX::View()->destinationUsage(ringgroups_getdest(ltrim((string) $extdisplay,'GRP-')));
}else{
$heading .= ": Add";
}
$content = load_view(__DIR__.'/views/form.php', ['request' => $request]);
break;
default:
$content = load_view(__DIR__.'/views/rggrid.php');
break;
}
?>
<div class="container-fluid">
<h1><?php echo $heading ?></h1>
<?php echo $usagehtml?>
<div class="row">
<div class="col-sm-12">
<div class="fpbx-container">
<div class="display <?php echo $border?>-border">
<?php echo $content ?>
</div>
</div>
</div>
</div>
</div>