added rewrite script

This commit is contained in:
Kasper Rynning-Tønnesen
2014-10-10 16:44:25 +02:00
parent 1e6d5a5810
commit 7d3a80c214
2 changed files with 8 additions and 3 deletions

View File

@@ -63,8 +63,8 @@ if(isset($_REQUEST['thisUrl'])){
echo $newPlaying[0]["id"];
}
else if(isset($_GET['v'])){ //add
$video = htmlspecialchars($_GET['v']);
$name = htmlspecialchars($_GET['n']);
$video = htmlspecialchars($_GET['v']);
$name = htmlspecialchars($_GET['n']);
if(!in_array($video, $data["songs"]))
{
//$arrayAdd = array("id" => array("id" => $video, "title" => $name, "votes" => array()));
@@ -154,6 +154,11 @@ else if(isset($_GET['skip'])){ //skip song request
echo json_encode($data);
}
function addSong($name, $id, $title)
{
}
function nextSong(){
global $data;
array_push($data[0], $data[0][0]);