}
}
-foreach($pages as $name => $page){
- $page->execute($templates[$name]);
+if(isset($_GET['page'])){
+ $args = explode('/', $_GET['page']);
}
-if(isset($_GET['page']) && isset($templates[$_GET['page']])){
- $current = $_GET['page'];
+if(isset($args) && isset($templates[$args[0]])){
+ $current = $args[0];
+ array_shift($args);
} elseif(isset($templates['splash'])){
$current = 'splash';
+ $args = array();
} elseif(count($templates) > 0) {
$current = array_shift(array_keys($templates));
+ $args = array();
+}
+
+foreach($pages as $name => $page){
+ if($current == $name){
+ $page->execute($templates[$name], $args);
+ } else {
+ $page->execute($templates[$name], array());
+ }
}
$index = new Template_Index();
<?php
+/**
+ This class has magic.
+**/
+
class Page_Tickets extends Page {
- public function execute($template){
+ public function execute($template, $args){
+
+ $template->args = $args;
+
+
}
class Template_Committee extends Template {
-public function display(){
- ?><img src="/theme/committee.png"><?
-}
+ public function display(){
+ ?><div style="background: url(/theme/committee.png); width: 850px;
+ height: 500px; position: relative; overflow: hidden; padding-top: 140px;" id="comm1">
+ <div id="president">
+ <h2>President</h2>
+ <p>
+ <a href="mailto:president@homertonball.com">
+ Fiona Holman
+ </a>
+ </p>
+ <p>
+ <a href="mailto:president@homertonball.com">
+ <em>president@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="vice">
+ <h2>Vice President</h2>
+ <p>
+ <a href="mailto:vicepresident@homertonball.com">
+ Jessica Labhart
+ </a>
+ </p>
+ <p>
+ <a href="mailto:vicepresident@homertonball.com">
+ <em>vicepresident@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="treasurer">
+ <h2>Treasurer</h2>
+ <p>
+ <a href="mailto:treasurer@homertonball.com">
+ Alistair Fraser
+ </a>
+ </p>
+ <p>
+ <a href="mailto:treasurer@homertonball.com">
+ <em>treasurer@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="secretary">
+ <h2>Secretary</h2>
+ <p>
+ <a href="mailto:secretary@homertonball.com">
+ Vicki Chia
+ </a>
+ </p>
+ <p>
+ <a href="mailto:secretary@homertonball.com">
+ <em>secretary@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="security">
+ <h2>Security</h2>
+ <p>
+ <a href="mailto:security@homertonball.com">
+ Oscar Hausman
+ </a>
+ </p>
+ <p>
+ <a href="mailto:security@homertonball.com">
+ <em>security@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="marketing">
+ <h2>Marketing</h2>
+ <p>
+ <a href="mailto:marketing@homertonball.com">
+ Emily McCallum
+ </a>
+ </p>
+ <p>
+ <a href="mailto:marketing@homertonball.com">
+ <em>marketing@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="designer">
+ <h2>Designer</h2>
+ <p>
+ <a href="mailto:designer@homertonball.com">
+ Ben Wheawell
+ </a>
+ </p>
+ <p>
+ <a href="mailto:designer@homertonball.com">
+ <em>designer@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="food">
+ <h2>Food and Drinks</h2>
+ <p>
+ <a href="mailto:food@homertonball.com">
+ Sophia Sibthorpe
+ </a>
+ </p>
+ <p>
+ <a href="mailto:food@homertonball.com">
+ <em>food@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="person">
+ <h2>Personnel</h2>
+ <p>
+ <a href="mailto:personnel@hometonball.com">
+ Douglas Thomson
+ </a>
+ </p>
+ <p>
+ <a href="mailto:personnel@homertonball.com">
+ <em>personnel@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="sponsor">
+ <h2>Sponsorship</h2>
+ <p>
+ <a href="mailto:sponsorship@homertonball.com">
+ Asmita Singh
+ </a>
+ </p>
+ <p>
+ <a href="sponsorship.pdf">
+ <strong>Sponsorship Brochure</strong>
+ </a>
+ </p>
+ <p>
+ <a href="mailto:sponsorship@homertonball.com">
+ <em>sponsorship@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="safety">
+ <h2>Health and Safety</h2>
+ <p>
+ <a href="mailto:safety@homertonball.com">
+ Pete Teverson
+ </a>
+ </p>
+ <p>
+ <a href="mailto:safety@homertonball.com">
+ <em>safety@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ <div id="web">
+ <h2>Website</h2>
+ <p>
+ <a href="mailto:web@homertonball.com">
+ Richard Whitehouse
+ </a>
+ </p>
+ <p>
+ <a href="mailto:web@homertonball.com">
+ <em>web@homertonball.com</em>
+ </a>
+ </p>
+ </div>
+ </div><?
+ }
}
<html>
<head>
<title>Homerton May Ball</title>
- <link rel="stylesheet" href="theme/hmb.css">
+ <link rel="stylesheet" href="/theme/hmb.css">
<!--[if IE]>
- <link rel="stylesheet" href="theme/ie.css">
+ <link rel="stylesheet" href="/theme/ie.css">
<![endif]-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>
- <script src="flir/flir.js" type="text/javascript"></script>
+ <script src="/flir/flir.js" type="text/javascript"></script>
<script type="text/javascript">
$(function(){
FLIR.init();
</head>
<body>
<div id="logol">
- <a href="/" class="link_splash"><img src="theme/logopen.png"></a>
+ <a href="/" class="link_splash"><img src="/theme/logopen.png"></a>
</div>
<div id="navbar">
<ul>
</div>
<div id="main">
<div class="arrow" id="arrow-l" <?php if(!($this->keys[$this->current] > 0)){ ?> style="display: none;" <?php } ?>>
- <a href="<?php echo $this->numbers[$this->keys[$this->current] - 1]; ?>"><img src="theme/left.png"></a>
+ <a href="<?php echo $this->numbers[$this->keys[$this->current] - 1]; ?>"><img src="/theme/left.png"></a>
</div>
<div id="paneshow" style="left: <?php echo -1 * $this->keys[$this->current] * 850; ?>px;">
<div id="panebar">
</div>
<?php if($this->keys[$this->current] <= count($this->keys)){ ?>
<div class="arrow" id="arrow-r">
- <a href="<?php echo $this->numbers[$this->keys[$this->current] + 1]; ?>"><img src="theme/right.png"></a>
+ <a href="<?php echo $this->numbers[$this->keys[$this->current] + 1]; ?>"><img src="/theme/right.png"></a>
</div>
<?php } ?>
<div id="footer">
class Template_Tickets extends Template {
public function display(){
- ?><img src="/theme/tickets.png"><?
+ ?><a href="https://www.srcf.ucam.org/hmb/secure/"><img src="/theme/tickets.png"></a><?
}
}
}
ul#panes li.pane-r {
- background: #4a0d0e;
- background: rgba(74,13,14,0.75);
+ background: #781416;
}
font-family: Verdana, Arial, sans-serif;
}
+div#comm1 div {
+ float: left;
+ width: 220px;
+ text-align: center;
+ padding: 0px 20px;
+}
+
+div#comm1 div em, div#comm1 div strong {
+ display: none;
+}
+
+div#comm1 div h2 {
+ margin-bottom: 10px;
+}
+
+div#comm1 div p {
+ margin: 0;
+}
+
+div#comm1 div a:link, div#comm1 a:visited {
+ text-decoration: none;
+ color: white;
+}
+
+div#comm1 div a:hover, div#comm1 a:active {
+ text-decoration: underline;
+}