本文整理汇总了PHP中Events::nextEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP Events::nextEvent方法的具体用法?PHP Events::nextEvent怎么用?PHP Events::nextEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Events
的用法示例。
在下文中一共展示了Events::nextEvent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: renderSidebar
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!');
}
示例2: getSignupStatistics
<?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';