mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
30 lines
610 B
PHP
Executable File
30 lines
610 B
PHP
Executable File
<?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
|
|
}
|
|
}
|
|
|
|
|
|
?>
|