<?php

function getSection() {
  echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">';
  echo '<html xmlns="http://www.w3.org/1999/xhtml">';
  dispHeader();
  dispBody();
  echo '</html>';
  }

// Display a section
function dispSection() {
  $tab_section = array();
  $tab_section["Home"] = dispHome;
//$tab_section["Webcam"] = dispWebcam;
//$tab_section["Player"] = dispPlayer;
  $tab_section["News"] = dispNews;
  $tab_section["Videos"] = dispVideos;
  $tab_section["Members"] = dispMembers;
  $tab_section["Fans"] = dispFans;
  $tab_section["Contacts"] = dispContacts;
  $tab_section["AdminHome"] = dispAdminHome;
  $tab_section["Connection"] = dispConnection;

  if ($_GET['section'] && array_key_exists($_GET['section'], $tab_section))
    $section = $_GET['section'];
  else
    $section = "Home";
  $tab_section[$section]();
}

// display html header
function dispHeader() {
  echo '<head>';
  echo '<title>EPTV</title>';
  echo '<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
  echo '<link rel="icon" type="image/vnd.microsoft.icon" href="images/eptv.ico" />';
  echo '<style type="text/css" media="screen" title="EPTV Default">';
  echo '@import url(css/default.css);';
  echo '</style>';
  include 'script.js';
  echo '</head>';
}

// display html body
function dispBody() {
  echo '<body>';
  echo '<basefont face="lucida" />';
  echo '<div id="main_container">';
  echo '<div id="main_header_home">';
  dispMenu();
  echo '</div>';
  dispSection();
  echo '</div>';
  echo '<div id="main_footer">';
  echo '<div id="foot_menu">';
  echo '<ul>';
  echo '<li><a href="http://www.epita.fr" title="Site Epita">EPITA</a></li>';
  echo '<li><a href="http://www.epitech.net" title="Site Epitech">EPITECH</a></li>';
  echo '</ul>';
  echo '</div>';
  echo '<div id="ft_img_left"></div>';
  echo '<div id="ft_img_mid"></div>';
  echo '<div id="ft_img_right"></div>';
  echo '<p class="copyrights"><br>&copy; 2010 EPTV<br /><br /><br /></p>';
  echo '</div>';
  echo '</body>';
}

?>
