renamed some files and fixed broken link

This commit is contained in:
Nicolas A. Tonne
2014-10-10 21:10:31 +02:00
parent a666f718c2
commit 99f95a76a4
3 changed files with 4 additions and 34 deletions

View File

@@ -20,7 +20,7 @@
<div class="playlist" >
<div id="buttons" class="result">
<a href="admin.php" title="Channel settings" ><img src="/static/settings2.png" class="skip middle" alt="Settings"/></a>
<a href="php/admin.php" title="Channel settings" ><img src="/static/settings2.png" class="skip middle" alt="Settings"/></a>
<img src="/static/skip.png" class="skip" alt="Skip" title="Skip" onclick="skip();">
</div>
<div id="playlist">

View File

@@ -1,30 +0,0 @@
<?php
if(isset($_GET["pass"]) && $_GET["pass"]=="bæsj"){
include("change.php");
$dir = scandir('../lists');
$channels = array();
foreach($dir as $file){
if(strpos($file, '.json') !== FALSE){
$name='./lists/'.$file;
$data = json_decode(file_get_contents($name));
unlink($name);
checkFile($name); //should create a new file with correct stuff, in change
processList($data);
}
}
}else{
echo("kek");
}
function processList($list, $name){
foreach($list as $item){
//get id and title
addSong($name, $id, $title); //in change
}
}
?>

View File

@@ -4,11 +4,11 @@
</head>
<body>
<?php
$files = scandir('oldFiles/');
$files = scandir('../oldFiles/');
foreach($files as $list) {
if($list != "." && $list != "..")
{
$file = file_get_contents("oldFiles/".$list);
$file = file_get_contents("../oldFiles/".$list);
$data = json_decode($file);
if(count($data) > 0)
{
@@ -27,7 +27,7 @@
array_shift($data[0]);
array_shift($data[3]);
}
file_put_contents("oldFiles/".$list, json_encode($array));
file_put_contents("../oldFiles/".$list, json_encode($array));
echo $list."\n";
}
}