forked from FreePBX-ContributedModules/endpointman
-
Notifications
You must be signed in to change notification settings - Fork 2
/
page.epm_templates.php
67 lines (57 loc) · 1.44 KB
/
page.epm_templates.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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<?php
global $active_modules;
if (!empty($active_modules[endpoint][rawname])) {
if (FreePBX::Endpointman()->configmod->get("disable_endpoint_warning") !== "1") {
include('page.epm_warning.php');
}
}
?>
<?PHP
/**
* Endpoint Manager FreePBX File
*
* @author Javier Pastor
* @license MPL / GPLv2 / LGPL
* @package Endpoint Manager
*/
if (!defined('FREEPBX_IS_AUTH')) { die('No direct script access allowed'); }
$epm = FreePBX::create()->Endpointman;
if ((! isset($_REQUEST['subpage'])) || ($_REQUEST['subpage'] == "")) {
$_REQUEST['subpage'] = "manager";
}
?>
<div class="container-fluid" id="epm_templates">
<h1><?php echo _("End Point Configuration Manager")?></h1>
<?php
foreach($epm->myShowPage() as $key => $page) {
if (strtolower($_REQUEST['subpage']) == $key)
{
?>
<h2><?php echo $page['name']; ?></h2>
<div class = "display">
<div class="row">
<div class="col-sm-12">
<div class="fpbx-container">
<div class="display <?php echo ($key == "editor") ? "full" : "no"?>-border">
<?php include($page['page']); ?>
</div>
</div>
</div>
</div>
</div>
<?php
}
}
?>
</div>
<?php
if ($_REQUEST['subpage'] == "editor") {
echo "<br /><br /><br />";
}
if (isset($_REQUEST['command']) && $_REQUEST['command'] == 'save_template') {
$epm->save_template($_REQUEST['id'],$_REQUEST['custom'],$_REQUEST);
if(empty($epm->error)) {
$epm->message['general'] = _('Saved');
}
}
?>