<?php require_once "config/config.inc"; $top_songs = Song::top(100); $top_albums = Album::top(100); $top_artists = Artist::top(100); ?> <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title> <?php print TITLE; ?> </title> <?php require_once "sections/links.php"; ?> </head> <body> <?php require_once "sections/menu.php"; ?> <section class="container"> <div class="row"> <div class="col-md-4"> <div class="belize-hole"> <p class="padded"> <h3 class="padded text-center"><span class="glyphicon glyphicon-music"></span> Top Songs</h3>
<?php $top_artist = Artist::top(); $top_artist = count($top_artist) != 0 ? $top_artist[0] : null; ?> <div class="pomegranate"> <div> <?php if (is_null($top_artist)) { ?> <p class="padded"> <span class="glyphicon glyphicon-music"></span> No Top Artist Available </p> <?php } else { ?> <p class="padded"> <span class="glyphicon glyphicon-user"></span> Top artist <span class="pull-right text-right"> <?php print (double) $top_artist->getAverage(); ?> / 10<br> <small><?php print (int) $top_artist->countRaters(); ?> rater<?php if ((int) $top_artist->countRaters() > 1) { print 's'; }