<?php

  include("html_functions.php");



  ################## PAGE INITIALIZATION #########################

  $lgid=$_SESSION['lgid'];

  $lgpath=$_SESSION['lgpath'];

  $date=new DateTime($_SESSION['lgdate']);

  $lgyear=$date->format("Y");

  

  ini_set("memory_limit","64M");



  ##### Get Report Settings #####
  $yr=$_GET['year'];
  

  include($_SESSION['adminpath']."/dbopen.php");

  # Title Bar

  $title='Trade Partners';
  if (is_numeric($yr)) {$title.=" $yr";}


  page_head($title,$_SESSION['lgpath'],"","","https://d3js.org/d3.v5.min.js");

  echo " <div id='topbar'>\n";

  main_titlebar($lgid,$_SESSION['lgpath'],$title,$team_id);

  nav_toolbar('front_office',"Front Office");

  echo " </div>   <!-- END topbar DIV -->\n";

  echo " <div id='contentpane'>\n";

  echo "<div id='chart'></div>\n";

  ################## START OF PAGE CONTENT #########################

  include($_SESSION['adminpath']."/dbopen.php");

  
  mysqli_close($db);



  ################## END OF PAGE #########################

  echo " </div>   <!-- END contentpane DIV -->\n";

	echo "<script>\n";
  include("./tradePartners.js");
  echo "</script>\n";
  page_foot($_SESSION['lgpath']);

?>

