/** * Setup for dashboard for my account */ function setup_myaccount_dashboard() { add_dashboard_widget('myaccount', 'account_dashboard_messages', 'Messages', 'account_dashboard_messages'); add_dashboard_widget('myaccount', 'account_dashboard_user_content', 'Your Content', 'account_dashboard_user_content'); add_dashboard_widget('myaccount', 'account_dashboard_recent_video_comments', 'Recent Video Comments', 'account_dashboard_recent_video_comments', 'account_dashboard_recent_video_comments_callback'); /* Handle form submission here */ if (confirm_config_form_submission()) { $place = mysql_clean(post('place')); $id = mysql_clean(post('id')); $importance = mysql_clean(post('importance')); if ($place and $id and $importance) { $dashboard = get_dashboard($place); if ($dashboard[$importance] and $dashboard[$importance][$id]) { $widget = $dashboard[$importance][$id]; __call_widget_options_callback($widget); redirect_to(queryString('', array('configure'))); exit('Redirecting ...'); } } } }
} elseif ($p == "faq2") { require_once realpath(__DIR__ . '/../includes/pages/guest_faq2.php'); $title = credits_title(); $content = guest_credits(); } elseif ($p == "imprint") { require_once realpath(__DIR__ . '/../includes/pages/guest_imprint.php'); $title = credits_title(); $content = guest_credits(); } elseif ($p == "privacy") { require_once realpath(__DIR__ . '/../includes/pages/guest_privacy.php'); $title = credits_title(); $content = guest_credits(); } elseif ($p === "dashboard") { require_once realpath(__DIR__ . '/../includes/pages/dashboard.php'); $title = getDashboardTitle(); $content = get_dashboard(); } elseif ($p == "api_key") { require_once realpath(__DIR__ . '/../includes/controller/api_key.php'); $content = getAPIKey(); } 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 { // Sonst zur Loginseite leiten redirect(page_link_to("login"));