本文整理汇总了PHP中Events::getCurrentEvent方法的典型用法代码示例。如果您正苦于以下问题:PHP Events::getCurrentEvent方法的具体用法?PHP Events::getCurrentEvent怎么用?PHP Events::getCurrentEvent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Events
的用法示例。
在下文中一共展示了Events::getCurrentEvent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addUser
addUser();
break;
case 'get_profile':
getProfile();
break;
case 'save_profile':
saveProfile();
break;
case 'get_settings':
getSettings();
break;
case 'save_settings':
saveSettings();
break;
case 'get_current_event':
return Events::getCurrentEvent(true);
break;
case 'new':
newCalendarItem();
break;
case 'upload':
upload();
break;
case 'get_files':
getFiles();
break;
case 'remove_file':
removeFile();
break;
default:
die('no such action available');
示例2: elseif
} elseif ($_REQUEST['subcategory'] == 'class') {
$Smarty->translate('Classes');
}
Manager::LoadExtension("Races", $ClassConstructor);
Manager::LoadExtension("Classes", $ClassConstructor);
if (Text::IsNull($_REQUEST['subcategory'])) {
$Smarty->assign('Page', Page::Info('game', array('bodycss' => 'game-index', 'pagetitle' => $Smarty->GetConfigVars('Menu_Game') . ' - ')));
$Smarty->display('game');
} elseif (!Text::IsNull($_REQUEST['subcategory'])) {
if (Text::IsNull($_REQUEST['lastcategory'])) {
switch ($_REQUEST['subcategory']) {
case 'events':
Manager::LoadExtension('Events', $ClassConstructor);
$Smarty->translate('Events');
$Events = Events::getEvents();
$Smarty->assign('CurrentEvent', Events::getCurrentEvent($Events));
$Smarty->assign('Events', Events::sortByDate($Events));
$Smarty->assign('Page', Page::Info('game', array('bodycss' => 'page view-page', 'pagetitle' => $Smarty->GetConfigVars('Events_Page_Title') . ' - ')));
$Smarty->display('pages/game_events');
break;
case 'race':
$Smarty->assign('AllianceRaces', Races::GetAlliance());
$Smarty->assign('HordeRaces', Races::GetHorde());
$Smarty->assign('Page', Page::Info('game', array('bodycss' => 'game-race-index', 'pagetitle' => $Smarty->GetConfigVars('Game_Races') . ' - ' . $Smarty->GetConfigVars('Menu_Game') . ' - ')));
$Smarty->display('pages/game_races');
break;
case 'class':
$Smarty->translate('Classes');
$Smarty->assign('Classes', Classes::GetAll());
$Smarty->assign('Page', Page::Info('game', array('bodycss' => 'game-classes-index', 'pagetitle' => $Smarty->GetConfigVars('Game_Classes') . ' - ' . $Smarty->GetConfigVars('Menu_Game') . ' - ')));
$Smarty->display('pages/game_classes');
示例3: header
$bln_user = User::isUser();
$bln_admin = User::isAdmin();
$bln_superadmin = User::isSuperAdmin();
$obj_smarty->assign('name', $arr_user['firstname'] . ' ' . (!empty($arr_user['infix']) ? $arr_user['infix'] : '') . $arr_user['lastname']);
$obj_smarty->assign('user', $_SESSION['calendar-uid']['username']);
$obj_smarty->assign('user_id', $_SESSION['calendar-uid']['uid']);
$obj_smarty->assign('is_user', $bln_user);
$obj_smarty->assign('is_admin', $bln_admin);
$obj_smarty->assign('is_super_admin', $bln_superadmin);
$language = Settings::getLanguage($arr_user['user_id']);
$obj_smarty->assign('language', $language);
if (User::isAdmin()) {
$arr_users = User::getAdminUsers(true);
// users of this admin
$obj_smarty->assign('users', $arr_users);
$arr_current_event = Events::getCurrentEvent();
$obj_smarty->assign('current_events', $arr_current_event);
$arr_last_added_events = Events::getLastAddedEvents(5);
$obj_smarty->assign('last_added_events', $arr_last_added_events);
$obj_smarty->assign('active', 'admin');
$obj_smarty->display(FULLCAL_DIR . '/view/admin_panel.tpl');
} else {
header('location: ' . FULLCAL_URL);
exit;
}
} else {
if (ADMIN_CAN_LOGIN_FROM_ADMIN_URL === true && ALLOW_ACCESS_BY == 'free') {
$language = Settings::getLanguage();
$obj_smarty->assign('language', $language);
$obj_smarty->display(FULLCAL_DIR . '/login.html');
} else {