mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 19:53:56 +00:00
Update device_delete.php
This commit is contained in:
@@ -17,21 +17,25 @@
|
||||
|
||||
The Initial Developer of the Original Code is
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
Copyright (C) 2008-2012 All Rights Reserved.
|
||||
Copyright (C) 2008-2016 All Rights Reserved.
|
||||
|
||||
Contributor(s):
|
||||
Mark J Crane <markjcrane@fusionpbx.com>
|
||||
*/
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
if (permission_exists('device_delete')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//includes
|
||||
require_once "root.php";
|
||||
require_once "resources/require.php";
|
||||
require_once "resources/check_auth.php";
|
||||
|
||||
//check permissions
|
||||
if (permission_exists('device_delete')) {
|
||||
//access granted
|
||||
}
|
||||
else {
|
||||
echo "access denied";
|
||||
exit;
|
||||
}
|
||||
|
||||
//add multi-lingual support
|
||||
$language = new text;
|
||||
@@ -71,11 +75,15 @@ else {
|
||||
}
|
||||
|
||||
//write the provision files
|
||||
require_once "app/provision/provision_write.php";
|
||||
if (strlen($_SESSION['provision']['path']['text']) > 0) {
|
||||
$prov = new provision;
|
||||
$prov->domain_uuid = $domain_uuid;
|
||||
$response = $prov->write();
|
||||
}
|
||||
|
||||
//set the message and redirect the user
|
||||
$_SESSION["message"] = $text['message-delete'];
|
||||
header("Location: devices.php");
|
||||
return;
|
||||
|
||||
?>
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user