if (!check_perms("users_mod")) { error(404); } //$Limit = isset($_GET['limit']) ? intval($_GET['limit']) : 100; //$Limit = in_array($Limit, array(100, 250, 500)) ? $Limit : 100; $Limit = 100; $Category = isset($_GET['category']) ? ($_GET['category']) : 'weekly'; $Category = in_array($Category, array('all_time', 'weekly', 'hyped')) ? $Category : 'weekly'; $View = isset($_GET['view']) ? ($_GET['view']) : 'tiles'; $View = in_array($View, array('tiles', 'list')) ? $View : 'tiles'; switch ($Category) { case 'all_time': $Artists = Top10::get_top_artists($Limit); break; case 'weekly': $Artists = json_decode(LastFM::get_weekly_artists($Limit), true)['artists']['artist']; break; case 'hyped': $Artists = json_decode(LastFM::get_hyped_artists($Limit), true)['artists']['artist']; break; default: break; } View::show_header("Top Artists", "jquery.imagesloaded,jquery.wookmark,top10", "tiles"); ?>