Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
<?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" />';
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" />';
echo ' <link rel="icon" type="image/vnd.microsoft.icon" href="images/eptv.ico" />';
echo ' <link rel="alternate" type="application/rss+xml" href="?rss=News" title="Acutalités" />';
echo ' <link rel="alternate" type="application/rss+xml" href="?rss=Videos" title="Vidéos" />';
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 dispHTMLBody() {
echo '<body>';
echo ' <div id="main_header">';
dispMenu();
echo ' </div>';
echo ' <div id="main_body">';
dispSection();
echo ' <div class="clr"> </div>';
echo ' </div>';
echo ' <div id="main_footer">';
dispFooter();
echo ' </div>';
echo '</body>';
}
?>