mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
good
This commit is contained in:
38
delete.php
38
delete.php
@@ -1,20 +1,20 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
if(isset($_POST['thisUrl']))
|
if(isset($_POST['thisUrl']))
|
||||||
|
{
|
||||||
{
|
$string = $_POST['thisUrl'];
|
||||||
|
$file = file_get_contents('videos.json');
|
||||||
$string = $_POST['thisUrl'];
|
$data = json_decode($file);
|
||||||
|
unset($file);//prevent memory leaks for large json.
|
||||||
|
//insert data here
|
||||||
|
if($data[0] == $string)
|
||||||
$file = file_get_contents('videos.json');
|
{
|
||||||
|
array_shift($data);
|
||||||
$data = json_decode($file);
|
}
|
||||||
|
file_put_contents("videos.json", json_encode($data));
|
||||||
unset($file);//prevent memory leaks for large json.
|
unset($data);
|
||||||
|
}else
|
||||||
//insert data here
|
{
|
||||||
|
echo "You're a bad boy";
|
||||||
if($data[0] == $string)
|
}
|
||||||
?>
|
?>
|
||||||
@@ -67,6 +67,7 @@
|
|||||||
|
|
||||||
success: function() {
|
success: function() {
|
||||||
console.log("saved");
|
console.log("saved");
|
||||||
|
console.log(response);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -76,6 +77,7 @@
|
|||||||
async: false
|
async: false
|
||||||
}).responseText;
|
}).responseText;
|
||||||
var url = $.parseJSON(response);
|
var url = $.parseJSON(response);
|
||||||
|
console.log(url[0]);
|
||||||
response = url[0];
|
response = url[0];
|
||||||
|
|
||||||
ytplayer.loadVideoById(response);
|
ytplayer.loadVideoById(response);
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
["eTwQ4kACymM","y6DHE_5drbM","A8P01EjBQxY","dMrmfub2TBw","BSAUJIRqAF4","mG6pm1WZ2uc"]
|
["XU_9yi6xvRs", "mG6pm1WZ2uc"]
|
||||||
Reference in New Issue
Block a user