Esempio n. 1
0
 /**
  *
  **/
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     $GLOBALS['perm']->check('autor');
     $layout = $GLOBALS['template_factory']->open('layouts/base');
     $this->set_layout($layout);
     Navigation::activateItem('/links/settings/oauth');
     PageLayout::setTabNavigation('/links/settings');
     PageLayout::setTitle(_('Applikationen'));
     $this->store = new OAuthConsumer();
     $this->types = array('website' => _('Website'), 'program' => _('Herkömmliches Desktopprogramm'), 'app' => _('Mobile App'));
 }
Esempio n. 2
0
 /**
  * Callback function being called before an action is executed.
  */
 function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     if (Request::isXhr()) {
         $this->set_layout(null);
         $this->set_content_type('text/html;Charset=windows-1252');
     }
     Navigation::activateItem('/start');
     PageLayout::setTabNavigation(NULL);
     // disable display of tabs
     PageLayout::setHelpKeyword("Basis.Startseite");
     // set keyword for new help
     PageLayout::setTitle(_('Startseite'));
 }
Esempio n. 3
0
 /**
  * common tasks for all actions
  */
 public function before_filter(&$action, &$args)
 {
     $this->with_session = true;
     parent::before_filter($action, $args);
     // Siteinfo-Class is defined in models/siteinfo.php
     $this->si = new Siteinfo();
     $this->populate_ids($args);
     $this->add_navigation($action);
     if (is_object($GLOBALS['perm']) && $GLOBALS['perm']->have_perm('root')) {
         $this->setupSidebar();
     } else {
         $action = 'show';
     }
     PageLayout::setTitle(_('Impressum'));
     PageLayout::setTabNavigation('/footer/siteinfo');
 }
Esempio n. 4
0
function first_decision($userid) {
    $vis_cmd = Request::option('vis_cmd');
    $vis_state = Request::option('vis_state');
    $user_language = getUserLanguagePath($userid);

    if ($vis_cmd == "apply" && ($vis_state == "global" || $vis_state == "yes" || $vis_state == "no")) {
        $query = "UPDATE auth_user_md5 SET visible = ? WHERE user_id = ?";
        $statement = DBManager::get()->prepare($query);
        $statement->execute(array($vis_state, $userid));
        return;
    }

    $query = "SELECT visible FROM auth_user_md5 WHERE user_id = ?";
    $statement = DBManager::get()->prepare($query);
    $statement->execute(array($userid));
    $visiblity = $statement->fetchColumn();

    if ($visiblity != 'unknown') {
        return;
    }

    PageLayout::setTitle(_('Bitte wählen Sie Ihren Sichtbarkeitsstatus aus!'));
    PageLayout::setTabNavigation(NULL);

    // avoid recursion when loading the header
    $GLOBALS['USER_VISIBILITY_CHECK'] = false;

    $template = $GLOBALS['template_factory']->open("../locale/$user_language/LC_HELP/visibility_decision.php");
    $template->set_layout('layouts/base_without_infobox');

    echo $template->render();
    page_close();
    die;
}
Esempio n. 5
0
closeObject();
include 'lib/seminar_open.php';
// initialise Stud.IP-Session
// if new start page is in use, redirect there (if logged in)
if ($auth->is_authenticated() && $user->id != 'nobody') {
    header('Location: ' . URLHelper::getURL('dispatch.php/start'));
    die;
}
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * *   L O G I N - P A G E   ( N O B O D Y - U S E R )   * *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
PageLayout::setHelpKeyword("Basis.Startseite");
// set keyword for new help
PageLayout::setTitle(_("Startseite"));
Navigation::activateItem('/start');
PageLayout::setTabNavigation(NULL);
// disable display of tabs
// Start of Output
include 'lib/include/html_head.inc.php';
// Output of html head
include 'lib/include/header.php';
$index_nobody_template = $GLOBALS['template_factory']->open('index_nobody');
$index_nobody_template->set_attributes(array('num_active_courses' => count_table_rows('seminare'), 'num_registered_users' => count_table_rows('auth_user_md5'), 'num_online_users' => get_users_online_count(10)));
if (Request::get('logout')) {
    $index_nobody_template->set_attribute('logout', true);
}
echo '<div><div class="index_container">';
echo $index_nobody_template->render();
$layout = $GLOBALS['template_factory']->open('shared/index_box');
// Prüfen, ob PortalPlugins vorhanden sind.
$portalplugins = PluginEngine::getPlugins('PortalPlugin');