function admin_log() { if (isset($_POST['keyword'])) { $filter = $_POST['keyword']; $log_entries_source = LogEntries_filter($_POST['keyword']); } else { $filter = ""; $log_entries_source = LogEntries(); } $log_entries = array(); foreach ($log_entries_source as $log_entry) { $log_entry['date'] = date("d.m.Y H:i", $log_entry['timestamp']); $log_entries[] = $log_entry; } return page_with_title(admin_log_title(), array(msg(), form(array(form_text('keyword', _("Search"), $filter), form_submit(_("Search"), "Go"))), table(array('date' => "Time", 'nick' => "Angel", 'message' => "Log Entry"), $log_entries))); }
} elseif ($p == "admin_import") { $title = admin_import_title(); $content = admin_import(); } elseif ($p == "admin_shifts") { $title = admin_shifts_title(); $content = admin_shifts(); } elseif ($p == "admin_export_users") { require_once realpath(__DIR__ . '/../includes/controller/export_users_controller.php'); if (isset($_REQUEST['type'])) { $type = $_REQUEST['type']; } else { $ype = 'csv'; } users_export_controller($type); } elseif ($p == "admin_log") { $title = admin_log_title(); $content = admin_log(); } elseif ($p == "credits") { require_once realpath(__DIR__ . '/../includes/pages/guest_credits.php'); $title = credits_title(); $content = guest_credits(); } else { require_once realpath(__DIR__ . '/../includes/pages/guest_start.php'); $content = guest_start(); } } else { // Wenn schon eingeloggt, keine-Berechtigung-Seite anzeigen if (isset($user)) { $title = _("No Access"); $content = _("You don't have permission to view this page. You probably have to sign in or register in order to gain access!"); } else {
function make_navigation() { global $p, $privileges; $menu = array(); $pages = array("news" => news_title(), "user_meetings" => meetings_title(), "user_shifts" => shifts_title(), "angeltypes" => angeltypes_title(), "user_questions" => questions_title()); foreach ($pages as $page => $title) { if (in_array($page, $privileges)) { $menu[] = toolbar_item_link(page_link_to($page), '', $title, $page == $p); } } $admin_menu = array(); $admin_pages = array("admin_arrive" => admin_arrive_title(), "admin_active" => admin_active_title(), "admin_user" => admin_user_title(), "admin_free" => admin_free_title(), "admin_questions" => admin_questions_title(), "shifttypes" => shifttypes_title(), "admin_shifts" => admin_shifts_title(), "admin_rooms" => admin_rooms_title(), "admin_groups" => admin_groups_title(), "admin_import" => admin_import_title(), "admin_log" => admin_log_title()); foreach ($admin_pages as $page => $title) { if (in_array($page, $privileges)) { $admin_menu[] = toolbar_item_link(page_link_to($page), '', $title, $page == $p); } } if (count($admin_menu) > 0) { $menu[] = toolbar_dropdown('', _("Admin"), $admin_menu); } return toolbar($menu); }