</div> </nav> <!-- League Info main --> <div class="container-fluid" id ="league_info_main"> <div class = "text-center"> <!--Current Standings--> <div class="col-lg-4 col-md-4 leadcol"> <div class="col_header"> <a href="#">STANDINGS</a> </div> <table class="table table-hover" id="standings"> <tbody id="standings_body"> <?php getStandings(); ?> </tbody> </table> </div> <!-- Upcoming Schedule --> <div class="col-lg-4 col-md-4 leadcol"> <table class="table table-hover" id="upcoming_schedule"> <div class="col_header"> <a href="#">UPCOMING SCHEDULE</a> </div> <tbody id="upcoming_schedule_body"> <?php getSchedule(); ?>
include 'config/config.php'; include 'classes/Database.php'; include 'classes/Utils.php'; $db = new Database(); // get all schools $getAllSchools = "SELECT school_id, name, (SELECT league_name FROM leagues WHERE league_id = league) AS league, division, class FROM schools WHERE league != 0 ORDER BY league, division"; $allSchools = $db->getData($getAllSchools); // get all area schools $getAreaSchools = "SELECT school_id, name FROM schools"; // WHERE area = 1 $areaSchools = $db->getData($getAreaSchools); // get all league names $getLeagues = "SELECT league_id, league_name, league_nick, layout FROM leagues"; $leagues = $db->getData($getLeagues); // get all of the standings $all_leagues = getStandings($allSchools); // the weeks of the basketball season $periods = [['2015-12-14', '2015-12-20'], ['2015-12-21', '2015-12-27'], ['2015-12-28', '2016-01-03'], ['2016-01-04', '2016-01-10'], ['2016-01-11', '2016-01-17'], ['2016-01-18', '2016-01-24'], ['2016-01-25', '2016-01-31'], ['2016-02-01', '2016-02-07'], ['2016-02-08', '2016-02-14'], ['2016-02-15', '2016-02-21'], ['2016-02-22', '2016-02-29']]; ?> <html> <?php include 'layouts/header.htm'; ?> <body> <div data-trb-thirdpartynav></div> <?php
function getStandingsAsTable($leagueID) { $standings = getStandings(null, $leagueID, "all"); //print_r($standings); $out = "<table class = \"standings\"><thead><tr><th scope=\"col\">Place</th><th>Points</th><th scope=\"col\">Team</th></tr></thead>"; $x = 1; foreach ($standings as $key => $value) { $out .= "<tr><td class = \"rowHead\">" . $x . "</td><TD>{$value}</TD><td>{$key}</td></tr>"; $x++; } $out .= "</table>"; return $out; }