Store in GIT
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
require("../../../inc/connect.php");
|
||||
require("../../../inc/session.php");
|
||||
|
||||
$stream = $_POST['id'];
|
||||
|
||||
//Check if user is allowed to delete
|
||||
$sql = "SELECT `id` FROM `stream` WHERE `dev_id`=$deviceid AND `id`=$stream";
|
||||
$query = ExecQuery($mysqli, $sql);
|
||||
|
||||
if($query->num_rows < 1)
|
||||
{
|
||||
error("streams", "You are not allowed to delete that stream");
|
||||
}
|
||||
|
||||
//Delete stream
|
||||
$sql = "DELETE FROM `stream` WHERE `id`=$stream";
|
||||
ExecQuery($mysqli, $sql);
|
||||
|
||||
success("streams", "The stream has been deleted");
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user