mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
main url fix
This commit is contained in:
@@ -25,7 +25,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<script type="text/javascript" src="static/swfobject.js"></script>
|
<script type="text/javascript" src="static/swfobject.js"></script>
|
||||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
|
||||||
<script type="text/javascript" scr="main.js"></script>
|
<script type="text/javascript" scr="./main.js"></script>
|
||||||
<script>
|
<script>
|
||||||
$(document).ready(function(){ })
|
$(document).ready(function(){ })
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
45
save.php
45
save.php
@@ -1,21 +1,26 @@
|
|||||||
<?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
|
||||||
$file = file_get_contents('videos.json');
|
|
||||||
|
if($data[0] == $string)
|
||||||
$data = json_decode($file);
|
{
|
||||||
|
array_push($data, $string);
|
||||||
unset($file);//prevent memory leaks for large json.
|
array_shift($data);
|
||||||
|
}
|
||||||
//insert data here
|
|
||||||
|
file_put_contents("videos.json", json_encode($data));
|
||||||
if($data[0] == $string)
|
unset($data);
|
||||||
|
|
||||||
|
}else
|
||||||
|
{
|
||||||
|
echo "You're a bad boy";
|
||||||
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
BIN
static/zöff.png
BIN
static/zöff.png
Binary file not shown.
|
Before Width: | Height: | Size: 26 KiB |
Reference in New Issue
Block a user