mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-22 19:06:37 +00:00
Streams: Database class integration.
This commit is contained in:
@@ -39,25 +39,30 @@
|
||||
$language = new text;
|
||||
$text = $language->get();
|
||||
|
||||
//delete the message
|
||||
message::add($text['message-delete']);
|
||||
//get id
|
||||
$stream_uuid = $_GET["id"];
|
||||
|
||||
//delete the data
|
||||
if (isset($_GET["id"]) && is_uuid($_GET["id"])) {
|
||||
if (is_uuid($stream_uuid)) {
|
||||
|
||||
//get the id
|
||||
$id = check_str($_GET["id"]);
|
||||
//build array
|
||||
$array['streams'][0]['stream_uuid'] = $stream_uuid;
|
||||
$array['streams'][0]['domain_uuid'] = $domain_uuid;
|
||||
|
||||
//delete stream
|
||||
$sql = "delete from v_streams ";
|
||||
$sql .= "where stream_uuid = '$id' ";
|
||||
$sql .= "and domain_uuid = '$domain_uuid' ";
|
||||
$prep_statement = $db->prepare(check_sql($sql));
|
||||
$prep_statement->execute();
|
||||
unset($sql);
|
||||
//execute delete
|
||||
$database = new database;
|
||||
$database->app_name = 'streams';
|
||||
$database->app_uuid = 'ffde6287-aa18-41fc-9a38-076d292e0a38';
|
||||
$database->delete($array);
|
||||
unset($array);
|
||||
|
||||
//set message
|
||||
message::add($text['message-delete']);
|
||||
|
||||
//redirect the user
|
||||
header('Location: streams.php');
|
||||
}
|
||||
|
||||
?>
|
||||
//redirect
|
||||
header('Location: streams.php');
|
||||
exit;
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user