mirror of
https://github.com/KevinMidboe/zoff.git
synced 2025-10-29 18:00:23 +00:00
Added listremoval to nochan.php
This commit is contained in:
@@ -9,9 +9,20 @@ $dir = scandir('./lists');
|
|||||||
$channels = array();
|
$channels = array();
|
||||||
$all_channels = array();
|
$all_channels = array();
|
||||||
$time = 60*60*24*4; //4 dager
|
$time = 60*60*24*4; //4 dager
|
||||||
|
$to = 0;
|
||||||
foreach($dir as $files){
|
foreach($dir as $files){
|
||||||
if(strpos($files, '.json') !== FALSE){
|
if(strpos($files, '.json') !== FALSE){
|
||||||
if(time() - filemtime('./lists/'.$files) < $time){
|
$time_lasted = time() - filemtime('./lists/'.$files);
|
||||||
|
if($time_lasted > $time)
|
||||||
|
{
|
||||||
|
clearstatcache();
|
||||||
|
$size = filesize('./lists/'.$files);
|
||||||
|
if($size < 100){
|
||||||
|
unlink("./lists/".$files);
|
||||||
|
$size;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if($time_lasted < $time){
|
||||||
array_push($channels, ucfirst(str_replace(".json", "", $files)));
|
array_push($channels, ucfirst(str_replace(".json", "", $files)));
|
||||||
}
|
}
|
||||||
array_push($all_channels, ucfirst(str_replace(".json", "", $files)));
|
array_push($all_channels, ucfirst(str_replace(".json", "", $files)));
|
||||||
|
|||||||
Reference in New Issue
Block a user