Skip to content

Commit

Permalink
Update sms.php (#168)
Browse files Browse the repository at this point in the history
* Update sms.php

* Delete root.php

* Update sms_broadcast.php

* Update sms_broadcast_edit.php

* Update sms_broadcast_process.php

* Update sms_delete.php

* Update sms_edit.php

* Update sms_hook_common.php

* Update sms_broadcast_process.php

* Update sms_mdr.php

* Update sms_hook_bandwidth.php

* Update sms_hook_didww.php

* Update sms_hook_flowroute.php

* Update sms_hook_twilio.php

* Update sms_hook_thinq.php

* Update sms_hook_telnyx.php

* Update sms_hook_peerless.php

* Update sms_hook_plivo.php

* Update sms_hook_teli.php

* Update sms_hook_bandwidth.php

* Update sms_hook_didww.php

* Update sms_hook_flowroute.php

* Update sms_hook_telnyx.php

* Update sms_hook_thinq.php

* Update sms_hook_twilio.php
  • Loading branch information
alexdcrane committed Oct 13, 2022
1 parent 1c87594 commit e7f12aa
Show file tree
Hide file tree
Showing 18 changed files with 107 additions and 243 deletions.
8 changes: 6 additions & 2 deletions sms/hook/sms_hook_bandwidth.php
@@ -1,7 +1,10 @@
<?php

include "../root.php";
//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);

//includes files
require_once "resources/require.php";
require_once "../sms_hook_common.php";

Expand All @@ -24,4 +27,5 @@
error_log('ACCESS DENIED [SMS]: ' . print_r($_SERVER['REMOTE_ADDR'], true));
die("access denied");
}
?>

?>
8 changes: 6 additions & 2 deletions sms/hook/sms_hook_didww.php
@@ -1,7 +1,10 @@
<?php

include "../root.php";
//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);

//includes files
require_once "resources/require.php";
require_once "../sms_hook_common.php";

Expand All @@ -19,4 +22,5 @@
route_and_send_sms($sms_from, $sms_to_did_no, $sms_text);

die("no");
?>

?>
5 changes: 4 additions & 1 deletion sms/hook/sms_hook_flowroute.php
@@ -1,7 +1,10 @@
<?php

include "../root.php";
//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);

//includes files
require_once "resources/require.php";
require_once "../sms_hook_common.php";

Expand Down
6 changes: 5 additions & 1 deletion sms/hook/sms_hook_peerless.php
@@ -1,7 +1,10 @@
<?php

include "../root.php";
//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);

//includes files
require_once "resources/require.php";
require_once "../sms_hook_common.php";

Expand Down Expand Up @@ -40,4 +43,5 @@
error_log('ACCESS DENIED [SMS]: ' . print_r($_SERVER['REMOTE_ADDR'], true));
die("access denied");
//}

?>
8 changes: 6 additions & 2 deletions sms/hook/sms_hook_plivo.php
@@ -1,7 +1,10 @@
<?php

include "../root.php";
//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);

//includes files
require_once "resources/require.php";
require_once "../sms_hook_common.php";

Expand All @@ -18,4 +21,5 @@
error_log('ACCESS DENIED [SMS]: ' . print_r($_SERVER['REMOTE_ADDR'], true));
die("access denied");
}
?>

?>
8 changes: 6 additions & 2 deletions sms/hook/sms_hook_teli.php
@@ -1,7 +1,10 @@
<?php

include "../root.php";
//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);

//includes files
require_once "resources/require.php";
require_once "../sms_hook_common.php";

Expand All @@ -14,4 +17,5 @@
error_log('ACCESS DENIED [SMS]: ' . print_r($_SERVER['REMOTE_ADDR'], true));
die("access denied");
}
?>

?>
8 changes: 6 additions & 2 deletions sms/hook/sms_hook_telnyx.php
@@ -1,7 +1,10 @@
<?php

include "../root.php";
//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);

//includes files
require_once "resources/require.php";
require_once "../sms_hook_common.php";

Expand All @@ -20,4 +23,5 @@
error_log('ACCESS DENIED [SMS]: ' . print_r($_SERVER['REMOTE_ADDR'], true));
die("access denied");
}
?>

?>
6 changes: 5 additions & 1 deletion sms/hook/sms_hook_thinq.php
@@ -1,7 +1,10 @@
<?php

include "../root.php";
//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);

//includes files
require_once "resources/require.php";
require_once "../sms_hook_common.php";

Expand All @@ -18,4 +21,5 @@
error_log('ACCESS DENIED [SMS]: ' . print_r($_SERVER['REMOTE_ADDR'], true));
die("access denied");
}

?>
6 changes: 5 additions & 1 deletion sms/hook/sms_hook_twilio.php
@@ -1,7 +1,10 @@
<?php

include "../root.php";
//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);

//includes files
require_once "resources/require.php";
require_once "../sms_hook_common.php";

Expand All @@ -20,4 +23,5 @@
error_log('ACCESS DENIED [SMS]: ' . print_r($_SERVER['REMOTE_ADDR'], true));
die("access denied");
}

?>
205 changes: 0 additions & 205 deletions sms/root.php

This file was deleted.

12 changes: 9 additions & 3 deletions sms/sms.php
Expand Up @@ -23,9 +23,15 @@
Contributor(s):
Mark J Crane <markjcrane@fusionpbx.com>
*/
include "root.php";
require_once "resources/require.php";
require_once "resources/check_auth.php";

//set the include path
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
set_include_path(parse_ini_file($conf[0])['document.root']);

//includes files
require_once "resources/require.php";
require_once "resources/check_auth.php";

if (permission_exists('sms_view')) {
//access granted
}
Expand Down

0 comments on commit e7f12aa

Please sign in to comment.