--- /dev/null
+AuthType Ucam-WebAuth
+Require user rjw201 jel55 famh2 bw300
+
+RewriteEngine on
+RewriteRule (.*) index.php?page=$1 [QSA,L]
--- /dev/null
+<?php
+
+require_once 'template.php';
+require_once 'page.php';
+
+require_once 'template/index.php';
+
+$pages = array();
+$templates = array();
+
+$files = array('about','tickets','food','ents','committee','sponsorship','charity','workers');
+
+foreach($files as $page){
+ if(is_file('page/' . $page . '.php') && is_file('template/' . $page . '.php')){
+ require_once ('page/' . $page . '.php');
+ require_once ('template/' . $page . '.php');
+ $class = 'Page_' . $page;
+ $pages[$page] = new $class();
+
+ $class = 'Template_' . $page;
+ $templates[$page] = new $class();
+ }
+}
+
+foreach($pages as $name => $page){
+ $page->execute($templates[$name]);
+}
+
+if(isset($_GET['page']) && isset($templates[$_GET['page']])){
+ $current = $_GET['page'];
+} elseif(isset($templates['about'])){
+ $current = 'about';
+} elseif(count($templates) > 0) {
+ $current = array_shift(array_keys($templates));
+}
+
+$index = new Template_Index();
+
+$index->numbers = array_keys($templates);
+$index->keys = array_flip($index->numbers);
+$index->current = $current;
+$index->templates = $templates;
+
+$index->display();
+
--- /dev/null
+<?php
+
+class Page {
+
+ public function execute($template){
+
+ }
+
+
+}
--- /dev/null
+<?php
+
+class Page_About extends Page {
+
+ public function execute($template){
+
+ }
+
+
+}
--- /dev/null
+<?php
+
+class Page_Tickets extends Page {
+
+ public function execute($template){
+
+ }
+
+
+}
--- /dev/null
+<?php
+
+class Template {
+
+public function display(){
+
+}
+
+}
+
--- /dev/null
+<?php
+
+class Template_About extends Template {
+
+
+
+}
--- /dev/null
+<?php
+
+class Template_Index extends Template {
+
+public function Display(){
+
+// A little setup
+
+?>
+<!DOCTYPE html>
+<html>
+<head>
+ <title>Homerton May Ball</title>
+ <link rel="stylesheet" href="theme/hmb.css">
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
+ <script src="theme/hmb.js"></script>
+ <script>
+ hmb_setup(<?php echo $this->keys[$this->current]; ?>,<?php echo count($this->keys); ?>, {
+<?php
+ foreach($this->keys as $name => $i){
+
+ if($i != 0){ echo ",\r\n"; }
+
+ echo "\t\t" . $name . ': ' . $i;
+ }
+ ?>
+ });
+ </script>
+</head>
+<body>
+ <div id="wrapper">
+ <div id="logo">
+ <a href="/"><img src="theme/logo.png"></a>
+ </div>
+ <div id="navbar">
+ <ul>
+ <li class="l"><a class="link_about" href="/about">About</a></li>
+ <li class="l"><a class="link_tickets" href="/tickets">Tickets</a></li>
+ <li class="l"><a class="link_food" href="/food">Food & Drink</a></li>
+ <li class="l"><a href="/ents">Ents</a></li>
+ <li class="r"><a href="/workers">Workers</a></li>
+ <li class="r"><a href="/committee">Committee</a></li>
+ <li class="r"><a href="/sponsorship">Sponsorship</a></li>
+ <li class="r"><a href="/charity">Charity</a></li>
+ </ul>
+ </div>
+ <div id="main">
+ <div class="arrow" id="arrow-l" <?php if(!($this->keys[$this->current] > 0)){ ?> style="display: none;" <?php } ?>>
+ <a href="-1"><img src="theme/left.png"></a>
+ </div>
+ <ul id="panes" style="left: -<?php echo $this->keys[$this->current] * 80; ?>%;">
+ <?php
+ if(count($this->templates) == 0){
+ ?>
+ <li class="pane pane-r">
+
+ </li>
+ <?php
+ } else {
+ foreach($this->templates as $name => $template){
+ ?>
+ <li class="pane pane-<?php echo ($this->keys[$name] % 2) == 0 ? 'r' : 'p'; ?>" style="left: <?php echo ($this->keys[$name] * 80) + 10; ?>%;" id="pane-<?php echo $name; ?>">
+ <div class="content">
+ <?php $template->display(); ?>
+ </div>
+ </li>
+ <?php
+ }
+ }
+ ?>
+ </ul>
+ <div class="arrow" id="arrow-r">
+ <a href="<?php echo $this->numbers[$this->keys[$this->current] + 1]; ?>"><img src="theme/right.png"></a>
+ </div>
+ </div>
+ <div id="footer">
+ © 2010 Homerton May Ball Committee. All rights reserved.
+ </div>
+ </div>
+</body>
+</html>
+<?php
+
+}
+
+}
+
--- /dev/null
+<?php
+
+class Template_Tickets extends Template {
+
+
+
+}
--- /dev/null
+RewriteEngine off
--- /dev/null
+/** Homerton May Ball CSS File - Richard Whitehouse **/
+
+body {
+ margin: 0;
+ padding: 0;
+ background-image: url(background.png);
+ background-position: center center;
+ position: absolute;
+ width: 100%;
+ height: 100%;
+}
+
+div#wrapper {
+ overflow: hidden;
+ position: absolute;
+ top: 0;
+ bottom: 20px;
+ left: 0;
+ right: 0;
+}
+
+div#logo {
+ z-index: 20;
+ position: absolute;
+ left: 50%;
+ width: 100px;
+ top: 60px;
+ height: 40px;
+ margin-top: -64px;
+ margin-left: -60px;
+}
+
+div#logo img {
+ z-index: 30;
+ width: 200px;
+}
+
+div#navbar {
+ background: black;
+ width: 70%;
+ height: 40px;
+ position: absolute;
+ left: 15%;
+ right: 15%;
+ top: 104px;
+ z-index: 10;
+}
+
+div#navbar ul {
+ margin: 0;
+ padding: 0;
+ list-style: none;
+ height: 40px;
+}
+
+div#navbar ul li {
+ z-index: 50;
+ position: relative;
+ display: inline-block;
+ text-align: center;
+ line-height: 40px;
+ margin: 0 0.2em;
+}
+
+div#navbar ul li.l {
+ float: left;
+}
+
+div#navbar ul li.r {
+ float: right;
+}
+
+div#navbar ul li a:link, div#navbar ul li a:visited {
+ padding: 0.7em;
+ position: relative;
+ z-index: 50;
+ text-decoration: none;
+ color: white;
+}
+
+div#navbar ul li a:hover, div#navbar ul li a:active {
+ color: #4a0d0e;
+}
+
+div#main {
+ z-index: 0;
+ width: 100%;
+ position: absolute;
+ left: 0;
+ right: 0;
+ top: 124px;
+ bottom: 20px;
+}
+
+div.arrow {
+ position: absolute;
+ top: 0;
+ padding: 0 1em 0;
+ height: 100%;
+ width: 20px;
+ z-index: 20;
+}
+
+div.arrow img {
+ position: absolute;
+ top: 50%;
+ height: 40px;
+ margin-top: -20px;
+}
+
+div#arrow-l {
+ left: 10%;
+}
+
+div#arrow-r {
+ right: 10%;
+}
+
+ul#panes {
+ z-index: 1;
+ padding: 0;
+ margin: 0;
+ position: relative;
+ top: 0;
+ height: 100%;
+}
+
+ul#panes li.pane {
+ display: block;
+ width: 80%;
+ background: white;
+ height: 100%;
+ position: absolute;
+ z-index: 3;
+ padding: 1px;
+ overflow: hidden;
+}
+
+ul#panes li.pane-r {
+ background: #4a0d0e;
+ background: rgba(74,13,14,0.75);
+}
+
+
+ul#panes li.pane-p {
+ background: #593b63;
+ background: rgba(89,59,99,0.75);
+}
+
+div.content {
+ height: 100%;
+ overflow: auto;
+ padding: 20px;
+ color: white;
+}
+
+div#footer {
+ z-index: 10;
+ background: black;
+ width: 70%;
+ position: absolute;
+ left: 15%;
+ right: 15%;
+ bottom: 0;
+ height: 40px;
+ line-height: 40px;
+ font-size: 14px;
+ color: white;
+ text-align: center;
+ font-weight: black;
+ font-family: Verdana, Arial, sans-serif;
+}
--- /dev/null
+/** Homerton May Ball JavaScript File - Richard Whitehouse **/
+
+function hmb_setup(pane, panes, panemap){
+
+var current = pane;
+
+function update_hmb(){
+ $("#arrow-l,#arrow-r").hide();
+
+ var left = current * 80;
+ $("#panes").animate({ left: "-" + left + "%" }, function(){
+
+ if(current > 0){
+ $("#arrow-l").fadeIn('slow');
+ } else {
+ $("#arrow-l").hide();
+ }
+ if(current + 1 < panes){
+ $("#arrow-r").fadeIn('slow');
+ } else {
+ $("#arrow-r").hide();
+ }
+ });
+}
+
+$(function($){
+
+update_hmb();
+
+for(var p in panemap){
+
+ $(".link_" + p).click({pane: p}, function(ev){
+ current = panemap[ev.data.pane];
+ update_hmb();
+ return false;
+ });
+}
+
+$("#arrow-r").click(function(){
+
+ if((current + 1) < panes){
+ $("#arrow-l").hide();
+ $("#arrow-r").fadeOut(function(){
+ ++current;
+ update_hmb();
+ });
+ } else {
+ update_hmb();
+ }
+
+ return false;
+});
+
+$("#arrow-l").click(function(){
+
+ if(current > 0){
+ $("#arrow-r").hide();
+ $("#arrow-l").fadeOut(function(){
+ --current;
+ update_hmb();
+ });
+ } else {
+ update_hmb();
+ }
+
+ return false;
+});
+
+
+});
+
+
+}
+