Esempio n. 1
0
<?php

require_once 'includes/classes/EventsChecker.php';
$organizer = Session::getUser()->getData('organization');
$ll = new HtmlLinksCollection('Super Menu v2.1');
$ll->setDefaultIcon('go-next.png');
$ll->addIfPriv('MODERATE_ORGANIZERS', 'listOrganizers.php', 'Organizers', 'system-users.png');
$menuOrganizer = $ll->addChildCollection('Organizers');
$menuOrganizer->add('listOrganizers.php', 'List Organizers', 'edit-find.png');
$menuOrganizer->addIfPriv('CREATE_ORGANIZER', 'formHandler.php?formClazz=FormNewOrganizer', 'Create organizer', 'create.png');
$countJoinRequests = getCountJoinRequests();
$joinRequestsNotification = $countJoinRequests == 0 ? null : '<strong>(' . $countJoinRequests . ')</strong>';
$menuOrganizer->addIfPriv('JOIN_REQUESTS', 'joinRequests.php', 'Join requests ' . $joinRequestsNotification);
$ll->addIfPriv('MODERATE_VENUES', 'listVenues.php', 'Venues', 'go-home.png');
$menuVenues = $ll->addChildCollection('Venues');
$menuVenues->addIf(!empty($organizer), 'viewOrganizer.php?id=' . $organizer, 'My venues', 'edit-find.png');
$menuVenues->add('listVenues.php', 'List venues', 'edit-find.png');
$menuVenues->add('formHandler.php?formClazz=FormNewVenue', 'Create venue', 'create.png');
$ll->addIfPriv('MODERATE_EVENTS', 'eventsList.php', 'Events', 'office-calendar.png');
$menuEvents = $ll->addChildCollection('Events');
$menuEvents->addIf(!empty($organizer), 'viewOrganizer.php?id=' . $organizer, 'My events', 'edit-find.png');
$menuEvents->add('eventsList.php', 'List events', 'edit-find.png');
$menuEvents->add('formHandler.php?formClazz=FormNewEvent', 'Create event', 'create.png');
$ll->addIfPriv('SYSTEM_MENU', null, 'System', 'emblem-system.png');
$menuSystem = $ll->addChildCollection('System');
$issuesChecker = new EventsChecker();
$issuesChecker->checkAllEvents();
$eventIssuesNotification = $issuesChecker->getCount();
$eventIssuesNotification = empty($eventIssuesNotification) ? null : '<strong>(' . $eventIssuesNotification . ')</strong>';
$menuSystem->addIfPriv('SITE_CHECKS', 'siteChecks.php', 'Site checks ' . $eventIssuesNotification);
$menuSystem->addIfPriv('SCHEDULER_VIEW', 'listSchedulerTasks.php', 'Scheduler', 'time.png');
Esempio n. 2
0
<?php

require_once 'includes/widgets/header.php';
$id = fromRequestRequireInt('id');
$venue = fetchVenue($id);
$tpl->assign('organizersAtVenue', fetchOrganizersFromVenueId($id));
$tpl->assign('eventsAtVenue', fetchEventsFromVenueId($id));
$tpl->assign('venue', $venue);
$tpl->display('viewVenue.tpl');
startSidebar();
require_once 'includes/widgets/infoboxListFilter.php';
if (Session::isLoggedIn()) {
    $organizer = Session::getUser()->getData('organization');
    if (Session::hasPriv('EDIT_VENUE') || $organizer == $venue['organizer']) {
        $menu = new HtmlLinksCollection('Venue admin');
        $menu->add('formHandler.php?formClazz=FormEditVenue&amp;formEditVenue-id=' . $venue['id'], 'Edit');
        $tpl->assign('linkCollection', $menu);
        $tpl->display('linkCollection.tpl');
    }
}
require_once 'includes/widgets/footer.php';
Esempio n. 3
0
echo 'Registered: ' . issetor($user['registered']) . '<br />';
echo 'Email: ' . issetor($user['email']) . '<br />';
if (!empty($user['organizerId'])) {
    echo 'Organizer: <a href = "viewOrganizer.php?id=' . $user['organizerId'] . '">' . $user['organizerTitle'] . '</a>';
}
if (Session::getUser()->hasPriv('USER_EMAIL_LOG')) {
    $sql = 'SELECT l.id, l.sent, l.subject FROM email_log l WHERE l.emailAddress = :emailAddress ORDER BY l.sent DESC LIMIT 10';
    $stmt = DatabaseFactory::getInstance()->prepare($sql);
    $stmt->bindValue(':emailAddress', $user['email']);
    $stmt->execute();
    $tpl->assign('loggedEmails', $stmt->fetchAll());
    $tpl->display('viewUser.tpl');
}
startSidebar();
if (Session::getUser()->hasPriv('EDIT_USERS')) {
    $menu = new HtmlLinksCollection('User management');
    $menu->add('listUsers.php', 'List Users');
    $menu->add('formHandler.php?formClazz=FormEditUser&amp;formEditUser-uid=' . $user['id'], 'Edit user');
    $menu->add('formHandler.php?formClazz=FormDeleteUser&formDeleteUser-uid=' . $user['id'], 'Delete user');
    $menu->add('formHandler.php?formClazz=FormPrivsUser&formPrivsUser-uid=' . $user['id'], 'User privileges');
    if (empty($user['email'])) {
        $menu->add(null, 'Send email - no email address for this user');
    } else {
        $menu->add('formHandler.php?formClazz=FormSendEmailToUser&formSendEmailToUser-uid=' . $user['id'], 'Send email');
        $menuEmail = $menu->addChildCollection('Send email');
        $menuEmail->add('formHandler.php?formClazz=FormSendEmailToUser&formSendEmailToUser-uid=' . $user['id'] . '&template=addYourRecentEvents', 'Template: Nag to add recent events');
    }
    $tpl->assign('linkCollection', $menu);
    $tpl->display('linkCollection.tpl');
}
require_once 'includes/widgets/footer.php';