Skip to content
html.php 2.03 KiB
Newer Older
Seblu's avatar
Seblu committed
<?php

function getHtml() {
  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">';
  dispHTMLHeader();
  dispHTMLBody();
  echo '</html>';
  }

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

  if (!isset($_GET['html']))
    $page = 'Home';
  elseif (array_key_exists($_GET['html'], $tab_pages))
    $page = $_GET['html'];
  else
    redirect("/");
  $tab_pages[$page]();
}

// display html header
function dispHTMLHeader() {
  echo '<head>';
  echo ' <title>EPTV</title>';
  echo ' <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />';
Seblu's avatar
Seblu committed
  echo ' <meta name="Author" content="Seblu" />';
  echo ' <meta name="Copyright" content="EPTV 2010" />';
  echo ' <meta name="Description" content="Le site web de l\'association EPTV" />';
Seblu's avatar
Seblu committed
  echo ' <link rel="icon" type="image/vnd.microsoft.icon" href="images/eptv.ico" />';
Seblu's avatar
Seblu committed
  echo ' <link rel="alternate" type="application/rss+xml"  href="?rss=News" title="Acutalit&eacute;s" />';
  echo ' <link rel="alternate" type="application/rss+xml"  href="?rss=Videos" title="Vid&eacute;os" />';
Seblu's avatar
Seblu committed
  echo ' <style type="text/css" media="screen" title="EPTV Default">';
Seblu's avatar
Seblu committed
  echo '  @import url(css/default.css);';
Seblu's avatar
Seblu committed
  echo ' </style>';
  include 'script.js';
  echo '</head>';
}

// display html body
function dispHTMLBody() {
  echo '<body>';
  echo '  <div id="main_header">';
  dispMenu();
  echo '  </div>';
  echo '  <div id="main_body">';
  dispSection();
  echo '   <div class="clr">&nbsp;</div>';
  echo '  </div>';
  echo '  <div id="main_footer">';
  dispFooter();
  echo '  </div>';
  echo '</body>';
}

?>