/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { parent::initSubNavigation(); $navigation = new Navigation(_('Login'), 'index.php?again=yes'); $navigation->setDescription(_('für registrierte NutzerInnen')); $this->addSubNavigation('login', $navigation); if (in_array('CAS', $GLOBALS['STUDIP_AUTH_PLUGIN'])) { $navigation = new Navigation(_('Login'), 'index.php?again=yes&sso=cas'); $navigation->setDescription(_('für Single Sign On mit CAS')); $this->addSubNavigation('login_cas', $navigation); } if (in_array('Shib', $GLOBALS['STUDIP_AUTH_PLUGIN'])) { $navigation = new Navigation(_('Shibboleth Login'), 'index.php?again=yes&sso=shib'); $navigation->setDescription(_('für Single Sign On mit Shibboleth')); $this->addSubNavigation('login_shib', $navigation); } if (get_config('ENABLE_SELF_REGISTRATION')) { $navigation = new Navigation(_('Registrieren'), 'register1.php'); $navigation->setDescription(_('um NutzerIn zu werden')); $this->addSubNavigation('register', $navigation); } if (Config::get()->ENABLE_FREE_ACCESS) { $navigation = new Navigation(_('Freier Zugang'), 'dispatch.php/public_courses'); $navigation->setDescription(_('ohne Registrierung')); $this->addSubNavigation('browse', $navigation); } $navigation = new Navigation(_('Hilfe'), format_help_url('Basis.Allgemeines')); $navigation->setDescription(_('zu Bedienung und Funktionsumfang')); $this->addSubNavigation('help', $navigation); }
echo _("Aktionen"); ?> :</b> <br> </td> </tr> <tr> <td align="center" width="1%" valign="top"> <?php echo Icon::create('info', 'info')->asImg(); ?> </td> <td width="99%" align="left"> <a href="<?php echo $help_url = format_help_url("Basis.EinrichtungenVerwaltenGruppen"); ?> " target="_blank"> <?php echo _("Bedienungshinweise in der Hilfe"); ?> </a> </td> </tr> <? if (!LockRules::Check($range_id, 'groups')) :?> <tr> <td align="center" width="1%" valign="top"> <?php echo Icon::create('community+add', 'info')->asImg(); ?> </td>
/** * Initialize default page layout. This should only be called once * from phplib_local.inc.php. Don't use this otherwise. */ public static function initialize() { // set favicon self::addHeadElement('link', array('rel' => 'apple-touch-icon', 'href' => Assets::image_path('touch-icon-ipad3.png'), 'size' => '144x144')); self::addHeadElement('link', array('rel' => 'apple-touch-icon', 'href' => Assets::image_path('touch-icon-iphone4.png'), 'size' => '114x114')); self::addHeadElement('link', array('rel' => 'apple-touch-icon', 'href' => Assets::image_path('touch-icon-ipad.png'), 'size' => '72x72')); self::addHeadElement('link', array('rel' => 'apple-touch-icon', 'href' => Assets::image_path('touch-icon-iphone.png'))); self::addHeadElement('link', array('rel' => 'shortcut icon', 'href' => Assets::image_path('favicon.png'))); // set initial width for mobile devices self::addHeadElement('meta', array('name' => 'viewport', 'content' => 'width=device-width, initial-scale=1.0')); // include ie-specific CSS self::addComment('[if IE]>' . Assets::stylesheet('ie.css', array('media' => 'screen,print')) . '<![endif]'); self::addHeadElement('link', array('rel' => 'help', 'href' => format_help_url('Basis.VerschiedenesFormat'), 'class' => 'text-format', 'title' => _('Hilfe zur Textformatierung'))); self::setSqueezePackages("base"); if (Config::get()->WYSIWYG) { self::addSqueezePackage("wysiwyg"); } self::addScript("mathjax/MathJax.js?config=TeX-AMS_HTML,default"); }
/** * Initialize the subnavigation of this item. This method * is called once before the first item is added or removed. */ public function initSubNavigation() { global $perm, $auth; $username = $auth->auth['uname']; parent::initSubNavigation(); if (!$perm->have_perm('user')) { return; } $sem_create_perm = in_array(get_config('SEM_CREATE_PERM'), array('root', 'admin', 'dozent')) ? get_config('SEM_CREATE_PERM') : 'dozent'; // my courses if ($perm->have_perm('root')) { $navigation = new Navigation(_('Veranstaltungsübersicht'), 'dispatch.php/search/courses'); } else { if ($perm->have_perm('admin')) { $navigation = new Navigation(_('Veranstaltungen an meinen Einrichtungen'), 'dispatch.php/my_courses'); } else { $navigation = new Navigation(_('Meine Veranstaltungen'), 'dispatch.php/my_courses'); if (!$perm->have_perm('dozent')) { $navigation->addSubNavigation('browse', new Navigation(_('Veranstaltung hinzufügen'), 'dispatch.php/search/courses')); if ($perm->have_perm('autor') && get_config('STUDYGROUPS_ENABLE')) { $navigation->addSubNavigation('new_studygroup', new Navigation(_('Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1')); } } else { if ($perm->have_perm($sem_create_perm)) { $navigation->addSubNavigation('new_course', new Navigation(_('Neue Veranstaltung anlegen'), 'dispatch.php/course/wizard')); } if (get_config('STUDYGROUPS_ENABLE')) { $navigation->addSubNavigation('new_studygroup', new Navigation(_('Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1')); } } } } $this->addSubNavigation('my_courses', $navigation); // course administration if ($perm->have_perm('admin')) { $navigation = new Navigation(_('Verwaltung von Veranstaltungen'), 'dispatch.php/my_courses'); if ($perm->have_perm($sem_create_perm)) { $navigation->addSubNavigation('new_course', new Navigation(_('Neue Veranstaltung anlegen'), 'dispatch.php/course/wizard')); } if (get_config('STUDYGROUPS_ENABLE')) { $navigation->addSubNavigation('new_studygroup', new Navigation(_('Studiengruppe anlegen'), 'dispatch.php/course/wizard?studygroup=1')); } $this->addSubNavigation('admin_course', $navigation); } // insitute administration if ($perm->have_perm('admin')) { $navigation = new Navigation(_('Verwaltung von Einrichtungen'), 'dispatch.php/institute/basicdata/index?list=TRUE'); $this->addSubNavigation('admin_inst', $navigation); } // user administration if ($perm->have_perm('root')) { $navigation = new Navigation(_('Verwaltung globaler Einstellungen'), 'admin_range_tree.php'); $this->addSubNavigation('admin_user', $navigation); } else { if ($perm->have_perm('admin') && !get_config('RESTRICTED_USER_MANAGEMENT')) { $navigation = new Navigation(_('Globale Benutzerverwaltung'), 'dispatch.php/admin/user/'); $this->addSubNavigation('admin_user', $navigation); } } // plugin and role administration if ($perm->have_perm('root')) { $navigation = new Navigation(_('Verwaltung von Plugins'), 'dispatch.php/admin/plugin'); $navigation->addSubNavigation('admin_roles', new Navigation(_('Verwaltung von Rollen'), 'dispatch.php/admin/role')); $this->addSubNavigation('admin_plugins', $navigation); } // administration of ressources if ($perm->have_perm('admin')) { if (get_config('RESOURCES_ENABLE')) { $navigation = new Navigation(_('Verwaltung von Ressourcen')); $navigation->addSubNavigation('hierarchy', new Navigation(_('Struktur'), 'resources.php#a', array('view' => 'resources'))); if ($perm->have_perm('admin') && get_config('RESOURCES_ALLOW_ROOM_REQUESTS')) { if (getGlobalPerms($GLOBALS['user']->id) !== 'admin') { $resList = new ResourcesUserRoomsList($GLOBALS['user']->id, false, false); $show_roomplanning = $resList->roomsExist(); } else { $show_roomplanning = true; } if ($show_roomplanning) { $navigation->addSubNavigation('start_planning', new Navigation(_('Raumplanung'), 'resources.php?cancel_edit_request_x=1', array('view' => 'requests_start'))); } } if (getGlobalPerms($GLOBALS['user']->id) == 'admin') { $navigation->addSubNavigation('edit_types', new Navigation(_('Anpassen'), 'resources.php', array('view' => 'edit_types'))); } $this->addSubNavigation('ressources', $navigation); } } // messaging $navigation = new Navigation(_('Nachrichten')); $navigation->addSubNavigation('in', new Navigation(_('Posteingang'), 'dispatch.php/messages/overview')); $navigation->addSubNavigation('out', new Navigation(_('Gesendet'), 'dispatch.php/messages/sent')); $this->addSubNavigation('messaging', $navigation); // community $navigation = new Navigation(_('Community')); $navigation->addSubNavigation('online', new Navigation(_('Wer ist online?'), 'dispatch.php/online')); $navigation->addSubNavigation('contacts', new Navigation(_('Meine Kontakte'), 'dispatch.php/contact')); // study groups if (get_config('STUDYGROUPS_ENABLE')) { $navigation->addSubNavigation('browse', new Navigation(_('Studiengruppen'), 'dispatch.php/studygroup/browse')); } // ranking if (get_config('SCORE_ENABLE')) { $navigation->addSubNavigation('score', new Navigation(_('Rangliste'), 'dispatch.php/score')); $this->addSubNavigation('community', $navigation); } // calendar / home page if (!$perm->have_perm('admin')) { $navigation = new Navigation(_('Mein Profil'), 'dispatch.php/profile'); if ($perm->have_perm('autor')) { $navigation->addSubNavigation('settings', new Navigation(_('Einstellungen'), 'dispatch.php/settings/general')); } $this->addSubNavigation('profile', $navigation); $navigation = new Navigation(_('Mein Planer')); if (get_config('CALENDAR_ENABLE')) { $navigation->addSubNavigation('calendar', new Navigation(_('Terminkalender'), 'dispatch.php/calendar/single')); } if (get_config('SCHEDULE_ENABLE')) { $navigation->addSubNavigation('schedule', new Navigation(_('Stundenplan'), 'dispatch.php/calendar/schedule')); } $this->addSubNavigation('planner', $navigation); } // global search $navigation = new Navigation(_('Suchen'), 'dispatch.php/search/courses'); $navigation->addSubNavigation('user', new Navigation(_('Personensuche'), 'browse.php')); $navigation->addSubNavigation('course', new Navigation(_('Veranstaltungssuche'), 'dispatch.php/search/courses')); $this->addSubNavigation('search', $navigation); // tools $navigation = new Navigation(_('Tools')); $navigation->addSubNavigation('news', new Navigation(_('Ankündigungen'), 'dispatch.php/news/admin_news')); if (get_config('VOTE_ENABLE')) { $navigation->addSubNavigation('vote', new Navigation(_('Umfragen und Tests'), 'admin_vote.php', array('page' => 'overview', 'showrangeID' => $username))); $navigation->addSubNavigation('evaluation', new Navigation(_('Evaluationen'), 'admin_evaluation.php', array('rangeID' => $username))); } // literature if (get_config('LITERATURE_ENABLE')) { $navigation->addSubNavigation('literature', new Navigation(_('Literatur'), 'dispatch.php/literature/edit_list.php', array('_range_id' => 'self'))); } // elearning if (get_config('ELEARNING_INTERFACE_ENABLE')) { $navigation->addSubNavigation('elearning', new Navigation(_('Lernmodule'), 'dispatch.php/elearning/my_accounts')); } // export if (get_config('EXPORT_ENABLE') && $perm->have_perm('tutor')) { $navigation->addSubNavigation('export', new Navigation(_('Export'), 'export.php')); } $this->addSubNavigation('tools', $navigation); // external help $navigation = new Navigation(_('Hilfe'), format_help_url('Basis.Allgemeines')); $navigation->addSubNavigation('intro', new Navigation(_('Schnelleinstieg'), format_help_url('Basis.SchnellEinstiegKomplett'))); $this->addSubNavigation('help', $navigation); }
/** * Checks whether a given file upload is valid and allowed. * * @param $the_file file to upload to Stud.IP * @param $real_file_name an optional real file name for handling files * inside a ZIP (otherwise, the filename of the ZIP itself would always be * used) * * @return Can the given file be uploaded to Stud.IP? */ function validate_upload($the_file, $real_file_name='') { global $UPLOAD_TYPES, $msg, $SessSemName, $user, $auth; $the_file_size = $the_file['size']; $the_file_name = $the_file['name']; if (!$the_file) { # haben wir eine Datei? $emsg.= "error§" . _("Sie haben keine Datei zum Hochladen ausgewählt!") . "§"; } else { # pruefen, ob der Typ stimmt if (match_route("dispatch.php/messages/upload_attachment")) { if (!$GLOBALS["ENABLE_EMAIL_ATTACHMENTS"] == true) $emsg.= "error§" . _("Dateianhänge für Nachrichten sind in dieser Installation nicht erlaubt!") . "§"; $active_upload_type = "attachments"; $sem_status = $GLOBALS['perm']->get_perm(); } else { if (Request::option('cid')) { $sem_status = $GLOBALS['perm']->get_studip_perm($SessSemName[1]); $active_upload_type = $SessSemName["art_num"]; } else { $sem_status = $GLOBALS['perm']->get_perm(); $active_upload_type = "personalfiles"; } if (!isset($UPLOAD_TYPES[$active_upload_type])) { $sem_status = $GLOBALS['perm']->get_perm(); $active_upload_type = 'default'; } } //erlaubte Dateigroesse aus Regelliste der Config.inc.php auslesen $max_filesize = $UPLOAD_TYPES[$active_upload_type]["file_sizes"][$sem_status]; //Die Dateierweiterung von dem Original erfragen $pext = strtolower(getFileExtension($real_file_name ? $real_file_name : $the_file_name)); if ($pext == "doc") $doc=TRUE; //Erweiterung mit Regelliste in config.inc.php vergleichen if ($UPLOAD_TYPES[$active_upload_type]["type"] == "allow") { $t=TRUE; $i=1; foreach ($UPLOAD_TYPES[$active_upload_type]["file_types"] as $ft) { if ($pext == $ft) $t=FALSE; if ($i !=1) $exts.=","; $exts.=" ".strtoupper($ft); $i++; } if (!$t) { if ($i==2) $emsg.= "error§" . sprintf(_("Die Datei konnte nicht übertragen werden: Sie dürfen den Dateityp %s nicht hochladen!"), trim($exts)) . "§"; else $emsg.= "error§" . sprintf(_("Die Datei konnte nicht übertragen werden: Sie dürfen die Dateitypen %s nicht hochladen!"), trim($exts)) . "§"; if ($doc) { $help_url = format_help_url("Basis.DateienUpload"); $emsg.= "info§" . sprintf(_("%sHier%s bekommen Sie Hilfe zum Upload von Word-Dokumenten."), "<a target=\"_blank\" href=\"".$help_url."\">", "</a>") . "§"; } } } else { $t=FALSE; $i=1; foreach ($UPLOAD_TYPES[$active_upload_type]["file_types"] as $ft) { if ($pext == $ft) $t=TRUE; if ($i !=1) $exts.=","; $exts.=" ".strtoupper($ft); $i++; } if (!$t) { if ($i==2) $emsg.= "error§" . sprintf(_("Die Datei konnte nicht übertragen werden: Sie dürfen nur den Dateityp %s hochladen!"), trim($exts)) . "§"; else $emsg.= "error§" . sprintf(_("Die Datei konnte nicht übertragen werden: Sie dürfen nur die Dateitypen %s hochladen!"), trim($exts)) . "§"; if ($doc) { $help_url = format_help_url("Basis.DateienUpload"); $emsg.= "info§" . sprintf(_("%sHier%s bekommen Sie Hilfe zum Upload von Word-Dokumenten."), "<a target=\"_blank\" href=\"".$help_url."\">", "</a>") . "§"; } } } //pruefen ob die Groesse stimmt. if ($the_file['error'] === UPLOAD_ERR_INI_SIZE || $the_file_size > $max_filesize) { $emsg.= "error§" . sprintf(_("Die Datei konnte nicht übertragen werden: Die maximale Größe für einen Upload (%s Megabyte) wurde überschritten!"), $max_filesize / 1048576); } elseif ($the_file_size == 0) { $emsg.= "error§" . _("Sie haben eine leere Datei zum Hochladen ausgewählt!") . "§"; } } if ($emsg) { $msg .= $emsg; return false; } else { return true; } }
<? $sm = new SmileyFavorites($GLOBALS['user']->id); ?> <div class="smiley_favorites"> <a href="<?php echo URLHelper::getLink('dispatch.php/smileys'); ?> " data-dialog> <?php echo _('Smileys'); ?> </a> | <a href="<?php echo format_help_url("Basis.VerschiedenesFormat"); ?> " target="new"><?php echo _("Formatierungshilfen"); ?> </a> <br> <? $smileys = Smiley::getByIds($sm->get()) ?> <? if (!empty($smileys)) : ?> <? foreach ($smileys as $smiley) : ?> <img class="js" src="<?php echo $smiley->getUrl(); ?> " data-smiley=" :<?php echo $smiley->name; ?> : " style="cursor: pointer;" onClick="STUDIP.Forum.insertSmiley('<?php
/** * Renders the help bar. * The helpbar will only be rendered if it actually contains any widgets. * It will use the template "helpbar.php" located at "templates/helpbar". * A notification is dispatched before and after the actual rendering * process. * * @return String The HTML code of the rendered helpbar. */ public function render() { $this->loadContent(); // add tour links if (Config::get()->TOURS_ENABLE) { $widget = new HelpbarTourWidget(); if ($widget->hasElements()) { $this->addWidget($widget); } $tour_data = $widget->tour_data; } // add wiki link and remove it from navigation $this->addLink(_('Weiterführende Hilfe'), format_help_url(PageLayout::getHelpKeyword()), Icon::create('link-extern', 'info_alt'), '_blank'); $content = ''; NotificationCenter::postNotification('HelpbarWillRender', $this); if ($this->should_render && $this->hasWidgets()) { $template = $GLOBALS['template_factory']->open('helpbar/helpbar'); $template->widgets = $this->widgets; $template->open = $this->open; $template->tour_data = $tour_data; $content = $template->render(); } NotificationCenter::postNotification('HelpbarDidRender', $this); return $content; }
<? # Lifter010: TODO ?> <? $help_url = format_help_url("Basis.VeranstaltungenVerwaltenGruppen"); ?> <tr> <td class="blank"> <br> <p class="info"> <?php echo _("Es sind noch keine Gruppen oder Funktionen angelegt worden."); ?> <br> <?php echo sprintf(_("Um für diesen Bereich Gruppen anzulegen, klicken Sie auf %sneue Gruppe anlegen%s in der Infobox."), '<u>', '</u>'); ?> <br> <?php echo _("Wenn Sie Gruppen angelegt haben, können Sie diesen Personen zuordnen. Jeder Gruppe können beliebig viele Personen zugeordnet werden. Jede Person kann beliebig vielen Gruppen zugeordnet werden."); ?> <br><br> <?php echo sprintf(_("Lesen Sie weitere Bedienungshinweise in der %sHilfe%s nach!"), "<a href=\"" . $help_url . "\">", "</a>"); ?> </p> </tr> <? $msg = "info§" . _("Es sind noch keine Gruppen oder Funktionen angelegt worden.") . "<br>" . _("Um für diesen Bereich Gruppen oder Funktionen anzulegen, nutzen Sie bitte die obere Zeile!")
/** * Display edit form for wiki page. * * @param string keyword WikiPage name * @param array wikiData Array from DB with WikiPage data * @param string user_id Internal user id * @param string backpage Page to display if editing is aborted * **/ function wikiEdit($keyword, $wikiData, $user_id, $backpage=NULL) { showPageFrameStart(); wikiSinglePageHeader($wikiData, $keyword); begin_blank_table(); if (!$wikiData) { $body = ""; $version = 0; $lastpage="&lastpage=".urlencode($backpage); } else { $body = $wikiData["body"]; $version = $wikiData["version"]; $lastpage = ""; } releaseLocks($keyword); // kill old locks $locks=getLock($keyword, $user_id); $cont=""; if ($locks && $lock["user_id"]!=$user_id) { $message = MessageBox::info(sprintf(_("Die Seite wird eventuell von %s bearbeitet."), htmlReady($locks)), array(_("Wenn Sie die Seite trotzdem ändern, kann ein Versionskonflikt entstehen."), _("Es werden dann beide Versionen eingetragen und müssen von Hand zusammengeführt werden."), _("Klicken Sie auf Abbrechen, um zurückzukehren."))); PageLayout::postMessage($message); } if ($keyword=='toc') { $message = MessageBox::info(_("Sie bearbeiten die QuickLinks."), array(_("Verwenden Sie Aufzählungszeichen (-, --, ---), um Verweise auf Seiten hinzuzufügen."))); PageLayout::postMessage($message); if (!$body) { $body=_("- WikiWikiWeb\n- BeispielSeite\n-- UnterSeite1\n-- UnterSeite2"); } } $template = $GLOBALS['template_factory']->open('wiki/edit.php'); $template->keyword = $keyword; $template->version = $version; $template->body = $body; $cont = $template->render(); printcontent(0, 0, $cont, ''); Helpbar::get()->setVariables(array( 'help_link' => format_help_url('Basis.VerschiedenesFormat'), )); end_blank_table(); echo "</td>"; // end of content area showPageFrameEnd(); }