public function renderSidebar() { if ($this->shouldNotDisplay()) { return; } startbox(); $event = Events::nextEvent(); if ($event['seatingPlan']) { echo '<p>The seating plan is now live! Pay, then choose your seat!</p><div style = "text-align: center">'; echo '<a href = "seatingplan.php?event=' . $event['id'] . '"><img src = "resources/images/seatingPlan.png" alt = "seating plan" /></a></div>'; } if (empty($event)) { echo '<p>No events planned!</p>'; } else { $diff = strtotime($event['dateIso']) - time(); $days = $diff /= 86400; $days = floor($days); echo '<p><a href = "viewEvent.php?id=' . $event['id'] . '">' . $event['name'] . '</a> starts in <strong>' . $days . '</strong> ' . Inflector::quantify('day', $days) . '. </p>'; } stopbox('Countdown!'); }
<?php require_once 'includes/widgets/header.php'; require_once 'includes/widgets/sidebar.php'; require_once 'includes/classes/Events.php'; require_once 'includes/classes/Galleries.php'; $nextEvent = Events::nextEvent(); $tpl->assign('nextEvent', $nextEvent); $tpl->assign('signups', getSignupStatistics(Events::getSignupsForEvent($nextEvent['id']))); $tpl->display('home.tpl'); require_once 'includes/widgets/footer.php';