fusionpbx/app/conference_controls/conference_control_detail_d...

43 lines
1.0 KiB
PHP

<?php
//includes
require_once "root.php";
require_once "resources/require.php";
//check permissions
require_once "resources/check_auth.php";
if (permission_exists('conference_control_detail_delete')) {
//access granted
}
else {
echo "access denied";
exit;
}
//add multi-lingual support
$language = new text;
$text = $language->get();
//delete the data
if (is_uuid($_GET["id"]) && is_uuid($_GET["conference_control_uuid"])) {
$conference_control_detail_uuid = $_GET["id"];
$conference_control_uuid = $_GET["conference_control_uuid"];
//delete conference_control_detail
$array['conference_control_details'][0]['conference_control_detail_uuid'] = $conference_control_detail_uuid;
$database = new database;
$database->app_name = 'conference_controls';
$database->app_uuid = 'e1ad84a2-79e1-450c-a5b1-7507a043e048';
$database->delete($array);
unset($array);
//set message
message::add($text['message-delete']);
}
//redirect the user
header('Location: conference_control_edit.php?id='.$conference_control_uuid);
?>