view index.php @ 0:8019b357cc03

Initial import.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 04 Dec 2012 19:07:18 +0200
parents
children 50216ed31d78
line wrap: on
line source

<?php
require "mconfig.inc.php";
require "msite.inc.php";
require "mcommon.inc.php";

// Switch to https first, if needed
if (!stCheckHTTPS())
{
  header("Location: https://".$_SERVER["SERVER_NAME"].$_SERVER["REQUEST_URI"]);
  exit;
}

if (isset($_SERVER["REQUEST_URI"]) &&
  array_key_exists($_SERVER["REQUEST_URI"], $securePages))
{
  header("Cache-Control: private");
  header("Cache-Control: must-revalidate");
  header("Cache-Control: ".($securePages[$_SERVER["REQUEST_URI"]] ? "no-store" : "no-cache"));
}

printPageHeader($pageTitle,
  " <meta http-equiv=\"Pragma\" content=\"no-cache\" />");

if (!stConnectSQLDB())
{
  printPageFooter();
  exit;
}

?>
<div id="headerbox">
 <div id="header">
  <a href="news"><img src="img/fapsm.png" alt="Finnish Amiga Party 2012" class="logo" /></a>
  <div id="date">30.11. - 2.12.2012<br />Helsinki, Finland<br />@ old location<br />Entry 15 EUR + prod</div>
 </div>
 <div id="menu">
  <a href="news">News</a>
  <a href="compos">Compos</a>
  <a href="event">Event</a>
  <a href="attendees">Attendees</a>
<?
if (0 && chkSetting("allowVoting"))
echo "  <a href=\"vote\">Vote</a>\n";
?>
 </div>
</div>

<div id="maincontent">
<div>
<?
$pageName = isset($_GET["p"]) ? $_GET["p"] : "news";
$pageFilename = basename($pageName).".inc.php";
if (file_exists($pageFilename))
  include($pageFilename);
?>
</div>
</div>
<?
printPageFooter();
?>