private function getIssuesList()
 {
     global $db;
     $sql = 'SELECT e.id, e.title, o.title AS organizerTitle, e.* FROM events e LEFT JOIN organizers o ON e.organizer = o.id WHERE e.dateFinish > now() ';
     $result = $db->query($sql);
     $events = $result->fetchAll();
     $checker = new EventsChecker($events);
     $checker->checkAllEvents();
     $events = $checker->getEventsList();
     return $events;
 }
Exemple #2
0
<?php

require_once 'includes/common.php';
define('TITLE', 'Site Checks');
require_once 'includes/widgets/header.php';
require_once 'includes/classes/EventsChecker.php';
if (!Session::getUser()->hasPriv('SITE_CHECKS')) {
    throw new PermissionException();
}
$checker = new EventsChecker();
$checker->checkAllEvents();
$events = $checker->getEventsList();
$tpl->assign('listEventsWithIssues', $events);
$tpl->display('eventsWithIssues.tpl');
$sql = 'SELECT o.id, o.title, o.websiteUrl, o.lastChecked, count(u.id) assUserCount, o.assumedStale FROM organizers o LEFT JOIN users u ON u.organization = o.id AND u.email IS NOT NULL LEFT JOIN events e ON o.id = e.organizer AND e.dateFinish > now() WHERE e.id IS null GROUP BY o.id ORDER BY o.title';
$result = $db->query($sql);
$orgies = $result->fetchAll();
$tpl->assign('listOrganizers', $orgies);
$tpl->display('organizersWithNoEvents.tpl');
startSidebar();
require_once 'includes/widgets/adminBox.php';
require_once 'includes/widgets/footer.php';
Exemple #3
0
$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');
$menuSystem->addIfPriv('USERLIST', 'listUsers.php', 'Users', 'system-users.png');
$menuSystem->addIfPriv('GROUPLIST', 'listGroups.php', 'Groups', 'system-users.png');
$menuSystem->addIfPriv('NEWSLIST', 'listNews.php', 'News', 'news.png');
$newLogNotification = getCountUnreadLogs();
$newLogNotification = empty($newLogNotification) ? null : '<strong>(' . $newLogNotification . ')</strong>';
$menuSystem->add('listLogs.php', 'Logs ' . $newLogNotification, 'log.png');
$ll->addIfPriv('ADMIN_GOOGLE_ACCOUNTS', null, 'External');
$menuExternalLinks = $ll->addChildCollection('External');
$menuExternalLinks->add('http://mail.lanlist.org', 'lanlist.org Gmail', 'gmail.png');
$menuExternalLinks->add('http://google.com/a/lanlist.org', 'lanlist.org Google Admin', 'google.png');
$tpl->assign('linkCollection', $ll);