From 38ea2c0c650e7c8a9327c2b9a0b6dbe1dd645715 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Mon, 19 Feb 2018 21:46:23 -0700 Subject: [PATCH] Create stream_delete.php --- app/streams/stream_delete.php | 53 +++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 app/streams/stream_delete.php diff --git a/app/streams/stream_delete.php b/app/streams/stream_delete.php new file mode 100644 index 0000000000..42d519d439 --- /dev/null +++ b/app/streams/stream_delete.php @@ -0,0 +1,53 @@ + + Portions created by the Initial Developer are Copyright (C) 2018 + the Initial Developer. All Rights Reserved. +*/ + +//includes + require_once "root.php"; + require_once "resources/require.php"; + +//add multi-lingual support + $language = new text; + $text = $language->get(); + +//delete the message + messages::add($text['message-delete']); + +//delete the data + if (isset($_GET["id"]) && is_uuid($_GET["id"]) && permission_exists('stream_delete')) { + + //get the id + $id = check_str($_GET["id"]); + + //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); + + //redirect the user + header('Location: streams.php'); + } + +?>