diff --git a/php/nochan.php b/php/nochan.php index e2602328..2e5d7e8f 100755 --- a/php/nochan.php +++ b/php/nochan.php @@ -11,11 +11,13 @@ $all_channels = array(); $time = 60*60*24*4; //4 dager $to = 60*60*24*2; $i = 0; +$v = 0; $tooMany = false; $dir = "./lists"; chdir($dir); array_multisort(array_map('filemtime', ($fil = glob("*.json"))), SORT_DESC, $fil); +$viewers = array(); foreach($fil as $files){ if(strpos($files, '.json') !== FALSE){ @@ -33,6 +35,7 @@ foreach($fil as $files){ $data = json_decode($file, TRUE); if(!array_key_exists("frontpage", $data['conf']) || $data['conf']['frontpage'] == "true" && $i <= 8){ //If it is true, the channelname will be shown on the frontpage array_push($channels, ucfirst(str_replace(".json", "", $files))); + array_push($viewers, sizeof($data["conf"]["views"])); } } $i++; @@ -41,6 +44,8 @@ foreach($fil as $files){ } } +print_r($viewers[$v]); + ?>
Active Channels
- ".htmlspecialchars($channel)."";} ?> + ".htmlspecialchars($channel).""; $v++;} ?>