diff --git a/index.php b/index.php
index 35e89f7c..acdcb0e6 100755
--- a/index.php
+++ b/index.php
@@ -1,11 +1,6 @@
-
@@ -13,7 +8,7 @@
Zöff
@@ -39,11 +34,11 @@
-
-
-
-
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/iscroll.js b/js/iscroll.js
similarity index 100%
rename from iscroll.js
rename to js/iscroll.js
diff --git a/list.js b/js/list.js
similarity index 97%
rename from list.js
rename to js/list.js
index f4d36eed..03f48142 100644
--- a/list.js
+++ b/js/list.js
@@ -10,7 +10,7 @@ function updateList()
{
console.log("updating list");
list = $.ajax({ type: "GET",
- url: "change.php",
+ url: "php/change.php",
async: false
}).responseText;
list = $.parseJSON(list);
@@ -68,7 +68,7 @@ function updateList()
function vote(id, vote){
console.log($.ajax({
type: "GET",
- url: "change.php",
+ url: "php/change.php",
async: false,
data: "vote="+vote+"&id="+id,
success: function() {
@@ -86,7 +86,7 @@ function vote(id, vote){
function skip(){
console.log($.ajax({
type: "GET",
- url: "change.php",
+ url: "php/change.php",
async: false,
data: "skip",
success: function() {
diff --git a/search.js b/js/search.js
similarity index 98%
rename from search.js
rename to js/search.js
index d07bfdae..9c784971 100755
--- a/search.js
+++ b/js/search.js
@@ -67,7 +67,7 @@ $(document).ready(function()
function submit(id,title){
console.log($.ajax({
type: "GET",
- url: "change.php",
+ url: "php/change.php",
async: false,
data: "v="+id+"&n="+title,
success: function() {
diff --git a/visualize.js b/js/visualize.js
similarity index 100%
rename from visualize.js
rename to js/visualize.js
diff --git a/youtube.js b/js/youtube.js
similarity index 97%
rename from youtube.js
rename to js/youtube.js
index baff3a3d..0deae4fc 100644
--- a/youtube.js
+++ b/js/youtube.js
@@ -36,7 +36,7 @@ $(document).ready(function()
diffVideo = false;
interval = false;
response = $.ajax({ type: "GET",
- url: "change.php",
+ url: "php/change.php",
async: false
}).responseText;
//console.log(response);
@@ -45,7 +45,7 @@ $(document).ready(function()
console.log(first);
$.ajax({
type: 'get',
- url: 'timedifference.php',
+ url: 'php/timedifference.php',
data: "abcde",
async: false,
success: function(data) {
@@ -128,7 +128,7 @@ function checkEnd()
console.log("sjekker om brukeren spolte");
$.ajax({
type: 'get',
- url: 'timedifference.php',
+ url: 'php/timedifference.php',
data: "abcde",
async: false,
success: function(data) {
@@ -151,7 +151,7 @@ function startNextSong()
setTimeout(function(){
response = $.ajax({
type: "POST",
- url: "change.php",
+ url: "php/change.php",
async: false,
data: "thisUrl="+response+"&act=save",
@@ -187,7 +187,7 @@ function getTime()
$.ajax({
type: 'get',
- url: 'timedifference.php',
+ url: 'php/timedifference.php',
data: "abcde",
async: false,
success: function(data) {
@@ -225,7 +225,7 @@ function getTime()
beginning = true;
$.ajax({
type: "POST",
- url: "change.php",
+ url: "php/change.php",
async: false,
data: "thisUrl=123abcprompeprompe&act=save",
success: function(data)
@@ -243,7 +243,7 @@ function getTime()
function getTitle()
{
$.ajax({ type: "GET",
- url: "timedifference.php",
+ url: "php/timedifference.php",
async: false,
success: function(data) {
viewers = $.parseJSON(data);
@@ -261,7 +261,7 @@ function errorHandler(newState)
setTimeout(function(){
response = $.ajax({
type: "POST",
- url: "change.php",
+ url: "php/change.php",
async: false,
data: "thisUrl="+response+"&act=delete",
diff --git a/lists/tritoen.json b/lists/tritoen.json
index 0f855a7c..3e7fe9b9 100755
--- a/lists/tritoen.json
+++ b/lists/tritoen.json
@@ -1 +1 @@
-{"nowPlaying":{"Sb3XfrCtjVU":{"id":"Sb3XfrCtjVU","title":"The Notorious BIG ft. Ja Rule - Old Thing Back (Matoma Remix)","votes":0,"added":1412940931,"guids":[]}},"songs":{"b24ALjuvR3M":{"id":"b24ALjuvR3M","title":"Philter - Revolver (OFFICIAL MUSIC VIDEO)","votes":1,"added":1412941390,"guids":["MTYwMjcx"]},"jEgX64n3T7g":{"id":"jEgX64n3T7g","title":"Massive Attack - Paradise Circus","votes":1,"added":1412942005,"guids":["MTYwMjcx"]},"u7K72X4eo_s":{"id":"u7K72X4eo_s","title":"Massive Attack - Teardrop","votes":1,"added":1412942256,"guids":["MTYwMjcx"]},"V40EjCjP3VU":{"id":"V40EjCjP3VU","title":"Philter - The Seven Seas","votes":0,"added":1412941171,"guids":[]}},"conf":{"startTime":1412942005,"views":1,"skips":[]}}
\ No newline at end of file
+{"nowPlaying":{"Sb1XfrCtjVU":{"id":"Sb3XfrCtjVU","title":"The Notorious BIG ft. Ja Rule - Old Thing Back (Matoma Remix)","votes":0,"added":1412940931,"guids":[]}},"songs":{"b24ALjuvR3M":{"id":"b24ALjuvR3M","title":"Philter - Revolver (OFFICIAL MUSIC VIDEO)","votes":1,"added":1412941390,"guids":["MTYwMjcx"]},"jEgX64n3T7g":{"id":"jEgX64n3T7g","title":"Massive Attack - Paradise Circus","votes":1,"added":1412942005,"guids":["MTYwMjcx"]},"u7K72X4eo_s":{"id":"u7K72X4eo_s","title":"Massive Attack - Teardrop","votes":1,"added":1412942256,"guids":["MTYwMjcx"]},"V40EjCjP3VU":{"id":"V40EjCjP3VU","title":"Philter - The Seven Seas","votes":0,"added":1412941171,"guids":[]}},"conf":{"startTime":1412942005,"views":1,"skips":[]}}
\ No newline at end of file
diff --git a/admin.php b/php/admin.php
similarity index 80%
rename from admin.php
rename to php/admin.php
index aceeb86e..1ddfbd7c 100755
--- a/admin.php
+++ b/php/admin.php
@@ -1,11 +1,6 @@
-
Zöff
-
-
-
-
-
+
diff --git a/change.php b/php/change.php
similarity index 99%
rename from change.php
rename to php/change.php
index ad56f6f0..4c3910ea 100644
--- a/change.php
+++ b/php/change.php
@@ -11,7 +11,8 @@ if(isset($_REQUEST['test'])){
$list = explode("/", htmlspecialchars(strtolower($_SERVER["REQUEST_URI"])));
if($list[1]==""||!isset($list[1])||count($list)<=1)$list="videos";
else $list=$list[1];
-$list="lists/".$list.".json";
+
+$list="../lists/".$list.".json";
$array = array("nowPlaying" => array(), "songs" => array(), "conf" => array("startTime" => time(), "views" => 0, "skips" => array()));
$f = @fopen($list,"x");
if($f){ fwrite($f,$array); fclose($f); }
@@ -169,4 +170,4 @@ function nextSong(){
$data[5]=array();
$data[1][0] = time();
}
-?>
\ No newline at end of file
+?>
diff --git a/php/convert_lists.php b/php/convert_lists.php
new file mode 100755
index 00000000..c2ab167b
--- /dev/null
+++ b/php/convert_lists.php
@@ -0,0 +1,30 @@
+
\ No newline at end of file
diff --git a/php/header.php b/php/header.php
new file mode 100755
index 00000000..cdf1087f
--- /dev/null
+++ b/php/header.php
@@ -0,0 +1,6 @@
+
Zöff
+
+
+
+
+
\ No newline at end of file
diff --git a/php/index.html b/php/index.html
new file mode 100755
index 00000000..e69de29b
diff --git a/nochan.php b/php/nochan.php
similarity index 100%
rename from nochan.php
rename to php/nochan.php
diff --git a/timedifference.php b/php/timedifference.php
similarity index 94%
rename from timedifference.php
rename to php/timedifference.php
index 4fa292cc..2815278b 100644
--- a/timedifference.php
+++ b/php/timedifference.php
@@ -2,7 +2,7 @@
$list = explode("/", htmlspecialchars(strtolower($_SERVER["REQUEST_URI"])));
if($list[1]==""||!isset($list[1])||count($list)<=1)$list="videos";
else $list=$list[1];
- $list="lists/".$list.".json";
+ $list="..lists/".$list.".json";
$data = json_decode(file_get_contents($list), true);
$songs = $data["nowPlaying"];
$id = array_values($songs);
diff --git a/videos.php b/php/videos.php
similarity index 82%
rename from videos.php
rename to php/videos.php
index 6220e7b8..63044cfa 100755
--- a/videos.php
+++ b/php/videos.php
@@ -1,7 +1,7 @@