forked from h5bp/html5-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
48 lines (39 loc) · 2.03 KB
/
index.php
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
39
40
41
42
43
44
45
46
47
48
<?php
require_once('inc/functions.php');
function mklist() {
$content = "<ul>";
for($i = 0; $i < 20; $i++)
{
$content .= "<li>$i</li>";
}
$content .= "</ul>";
return $content;
}
/* Configuration */
$pagetitle = 'Calendar';
$pagedescription = 'A Calendar Viewer';
$organisers = array();
$places = array();
$events = array();
$graph = loadGraph($organisers, $places, $events);
$content = "";
$content .= "<script>var availableDates = []</script>";
$content .= "<div class='box sidebox' id='calendar-search'><div class='header'>Search by date</div><div class='content'><a href='#' id='alldates' class='view-events homepage-only'>View full calendar</a></div></div>";
$content .= "<div class='box sidebox' id='department-search'><div class='header'>Search by department</div><div class='content'>".getOptionTree($organisers, 'org', 'All departments', 'getOrganisationTreeOptions', $graph)."</div></div>";
$content .= "<div class='box sidebox' id='location-search'><div class='header'>Search by location</div><div class='content'>".getOptionTree($places, 'place', 'All locations')."</div></div>";
$content .= "<div class='box mainbox' id='main'><div class='header'><h1>Events Calendar</h1><a id='view-all' class='view-events right'>View all events<img style='height:49px' src='img/chevron_large_right.png' alt='' /></a></div><div class='content'><b class='homepage-only'>Upcoming Events</b>".getEventListings($events)."<a href='#' class='view-events right homepage-only'>View all events</a><div id='bottom-link'> </div></div></div>";
$footerlinks[] = array("Link 1", "http://example.com");
$footerlinks[] = array("Link 2", "http://example.com");
$footerlinks[] = array("Link 3", "http://example.com");
$footerlinks[] = array("Link 4", "http://example.com");
/* End of configuration */
$footer = "<ul>";
$i = 0;
foreach($footerlinks as $link) {
$classstr = ($i == 0) ? " class='first'" : "";
$footer .= "<li$classstr><a href='".$link[1]."'>".$link[0]."</a></li>";
$i++;
}
$footer .= "</ul>";
renderPage($pagetitle, $pagedescription, '', $content, $footer);
?>