Пример #1
0
function user_meetings()
{
    global $DISPLAY_NEWS, $privileges, $user;
    $html = '<div class="col-md-12"><h1>' . meetings_title() . '</h1>' . msg();
    if (isset($_REQUEST['page']) && preg_match("/^[0-9]{1,}\$/", $_REQUEST['page'])) {
        $page = $_REQUEST['page'];
    } else {
        $page = 0;
    }
    $news = sql_select("SELECT * FROM `News` WHERE `Treffen`=1 ORDER BY `Datum` DESC LIMIT " . sql_escape($page * $DISPLAY_NEWS) . ", " . sql_escape($DISPLAY_NEWS));
    foreach ($news as $entry) {
        $html .= display_news($entry);
    }
    $dis_rows = ceil(sql_num_query("SELECT * FROM `News`") / $DISPLAY_NEWS);
    $html .= '<div class="text-center">' . '<ul class="pagination">';
    for ($i = 0; $i < $dis_rows; $i++) {
        if (isset($_REQUEST['page']) && $i == $_REQUEST['page']) {
            $html .= '<li class="active">';
        } elseif (!isset($_REQUEST['page']) && $i == 0) {
            $html .= '<li class="active">';
        } else {
            $html .= '<li>';
        }
        $html .= '<a href="' . page_link_to("user_meetings") . '&page=' . $i . '">' . ($i + 1) . '</a></li>';
    }
    $html .= '</ul></div></div>';
    return $html;
}
Пример #2
0
     list($title, $content) = users_controller();
 } elseif ($p == "user_angeltypes") {
     list($title, $content) = user_angeltypes_controller();
 } elseif ($p == "user_driver_licenses") {
     list($title, $content) = user_driver_licenses_controller();
 } elseif ($p == "shifttypes") {
     list($title, $content) = shifttypes_controller();
 } elseif ($p == "news") {
     $title = news_title();
     $content = user_news();
 } elseif ($p == "news_comments") {
     require_once realpath(__DIR__ . '/../includes/pages/user_news.php');
     $title = user_news_comments_title();
     $content = user_news_comments();
 } elseif ($p == "user_meetings") {
     $title = meetings_title();
     $content = user_meetings();
 } elseif ($p == "user_myshifts") {
     $title = myshifts_title();
     $content = user_myshifts();
 } elseif ($p == "user_shifts") {
     $title = shifts_title();
     $content = user_shifts();
 } elseif ($p == "user_messages") {
     $title = messages_title();
     $content = user_messages();
 } elseif ($p == "user_questions") {
     $title = questions_title();
     $content = user_questions();
 } elseif ($p == "user_settings") {
     $title = settings_title();
Пример #3
0
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);
}