-
Notifications
You must be signed in to change notification settings - Fork 110
/
config.php
executable file
·57 lines (45 loc) · 1.27 KB
/
config.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
<?php
/**
* Endpoint Manager config File
*
* @author Andrew Nagy
* @license MPL / GPLv2 / LGPL
* @package Provisioner
*/
// Check for safe mode
if( ini_get('safe_mode') ){
die(_('Turn Off Safe Mode'));
}
if(PHP_VERSION < '5.1.0') {
die(_('PHP Version MUST be greater than'). ' 5.1.0!');
}
include 'includes/functions.inc';
$debug = NULL;
$endpoint = new endpointmanager();
if(!file_exists($amp_conf['AMPWEBROOT'].'/admin/assets/endpointman/images/add.png')) {
echo "WARNING: Assets Missing! ^^Please click the Orange \"Apply Configuration Changes\" Bar";
}
if(!file_exists(PHONE_MODULES_PATH."temp/")) {
mkdir(PHONE_MODULES_PATH."temp/", 0764, TRUE);
}
if(!is_writeable(LOCAL_PATH)) {
chmod(LOCAL_PATH, 0764);
}
if(!is_writeable(PHONE_MODULES_PATH)) {
chmod(PHONE_MODULES_PATH, 0764);
$iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator(PHONE_MODULES_PATH), RecursiveIteratorIterator::SELF_FIRST);
foreach($iterator as $item) {
chmod($item, 0764);
}
}
if($amp_conf['AMPENGINE'] != 'asterisk') {
die(_("Sorry, Only Asterisk is supported currently"));
}
if (isset($_REQUEST['page'])) {
$page = $_REQUEST['page'];
} else {
$page = "";
}
if($global_cfg['debug']) {
$debug .= "Request Variables: \n".print_r($_REQUEST, TRUE);
}