Example #1
0
 public function before_filter(&$action, &$args)
 {
     parent::before_filter($action, $args);
     $course_id = Request::option('sem_id', $args[0]);
     if (empty($course_id)) {
         checkObject();
         //wirft Exception, wenn $SessionSeminar leer ist
         $course_id = $GLOBALS['SessionSeminar'];
     }
     $this->course = Course::find($course_id);
     if (!$this->course) {
         throw new Trails_Exception(400);
     }
     $this->send_from_search_page = Request::get('send_from_search_page');
     if ($GLOBALS['SessionSeminar'] != $this->course->id && !(int) $this->course->visible && !($GLOBALS['perm']->have_perm(Config::get()->SEM_VISIBILITY_PERM) || $GLOBALS['perm']->have_studip_perm('user', $this->course->id))) {
         throw new AccessDeniedException(_('Diese Veranstaltung ist versteckt. Hier gibt es nichts zu sehen.'));
     }
     if (!preg_match('/^(' . preg_quote($GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP'], '/') . ')?([a-zA-Z0-9_-]+\\.php)([a-zA-Z0-9_?&=-]*)$/', $this->send_from_search_page)) {
         $this->send_from_search_page = '';
     }
     if ($this->course->getSemClass()->offsetGet('studygroup_mode')) {
         if ($GLOBALS['perm']->have_studip_perm('autor', $this->course->id)) {
             // participants may see seminar_main
             $link = URLHelper::getUrl('seminar_main.php', array('auswahl' => $this->course->id));
         } else {
             $link = URLHelper::getUrl('dispatch.php/course/studygroup/details/' . $this->course->id, array('send_from_search_page' => $this->send_from_search_page));
         }
         $this->redirect($link);
         return;
     }
 }
Example #2
0
 /**
  * This method is called to remove an avatar for a course.
  *
  * @return void
  */
 function delete_action()
 {
     CourseAvatar::getAvatar($this->course_id)->reset();
     PageLayout::postMessage(MessageBox::success(_("Veranstaltungsbild gelöscht.")));
     if ($this->studygroup_mode) {
         $this->redirect(URLHelper::getUrl('dispatch.php/course/studygroup/edit/' . $this->course_id));
     } else {
         $this->redirect(URLHelper::getUrl('dispatch.php/course/avatar/update/' . $this->course_id));
     }
 }
Example #3
0
 /**
  * Marks a personal notification as read by the user so it won't be displayed
  * in the list in the header.
  * @param string $id : hash-id of the notification
  */
 public function mark_notification_read_action($id)
 {
     PersonalNotifications::markAsRead($id);
     if (Request::isXhr()) {
         $this->render_nothing();
     } else {
         $notification = new PersonalNotifications($id);
         if ($notification->url) {
             $this->redirect(URLHelper::getUrl(TransformInternalLinks($notification->url)));
         } else {
             $this->render_nothing();
         }
     }
 }
Example #4
0
 /**
  *
  * @param $message
  * @param $rec_uname
  * @param $user_id
  * @param $time
  * @param $tmp_message_id
  * @param $set_deleted
  * @param $signature
  * @param $subject
  * @param $force_email
  * @param $priority
  */
 function insert_message($message, $rec_uname, $user_id = '', $time = '', $tmp_message_id = '', $set_deleted = '', $signature = '', $subject = '', $force_email = '', $priority = 'normal', $tags = null)
 {
     global $user;
     $my_messaging_settings = UserConfig::get($user->id)->MESSAGING_SETTINGS;
     // wenn kein subject uebergeben
     $subject = $subject ?: _('Ohne Betreff');
     $email_request = $this->send_as_email ?: $my_messaging_settings['send_as_email'];
     // wenn keine zeit uebergeben
     $time = $time ?: time();
     // wenn keine id uebergeben
     $tmp_message_id = $tmp_message_id ?: md5(uniqid('321losgehtes', true));
     // wenn keine user_id uebergeben
     $user_id = $user_id ?: $user->id;
     # send message now
     if ($user_id != '____%system%____') {
         // real-user message
         $snd_user_id = $user_id;
         $set_deleted = $set_deleted ?: $my_messaging_settings['save_snd'] != '1';
         // don't save sms in outbox
     } else {
         // system-message
         $set_deleted = '1';
         // system-signatur
         $snd_user_id = '____%system%____';
         setTempLanguage();
         $message .= $this->sig_string;
         $message .= _('Diese Nachricht wurde automatisch vom Stud.IP-System generiert. Sie können darauf nicht antworten.');
         restoreLanguage();
     }
     // Setzen der Message-ID als Range_ID für angehängte Dateien
     if (isset($this->provisonal_attachment_id) && $GLOBALS['ENABLE_EMAIL_ATTACHMENTS']) {
         $query = "UPDATE dokumente SET range_id = ?, description = '' WHERE dokument_id = ?";
         $statement = DBManager::get()->prepare($query);
         foreach (get_message_attachments($this->provisonal_attachment_id, true) as $attachment) {
             $statement->execute(array($tmp_message_id, $attachment['dokument_id']));
         }
     }
     // insert message
     $query = "INSERT INTO message (message_id, autor_id, subject, message, priority, mkdate)\n                  VALUES (?, ?, ?, ?, ?, UNIX_TIMESTAMP())";
     $statement = DBManager::get()->prepare($query);
     $statement->execute(array($tmp_message_id, $snd_user_id, $subject, $message, $priority));
     // insert snd
     $insert_tags = DBManager::get()->prepare("\n            INSERT IGNORE INTO message_tags\n            SET message_id = :message_id,\n                user_id = :user_id,\n                tag = :tag,\n                chdate = UNIX_TIMESTAMP(),\n                mkdate = UNIX_TIMESTAMP()\n        ");
     $query = "INSERT INTO message_user (message_id, user_id, snd_rec, deleted, mkdate)\n                  VALUES (?, ?, 'snd', ?, UNIX_TIMESTAMP())";
     $statement = DBManager::get()->prepare($query);
     $statement->execute(array($tmp_message_id, $snd_user_id, $set_deleted ? 1 : 0));
     if ($tags) {
         is_array($tags) || ($tags = explode(" ", (string) $tags));
         foreach ($tags as $tag) {
             $insert_tags->execute(array('message_id' => $tmp_message_id, 'user_id' => $snd_user_id, 'tag' => strtolower($tag)));
         }
     }
     // heben wir kein array bekommen, machen wir einfach eins ...
     if (!is_array($rec_uname)) {
         $rec_uname = array($rec_uname);
     }
     // wir bastelen ein neues array, das die user_id statt des user_name enthaelt
     $rec_id = array();
     foreach ($rec_uname as $one) {
         $rec_id[] = User::findByUsername($one)->user_id;
     }
     $rec_id = array_filter($rec_id);
     // wir gehen das eben erstellt array durch und schauen, ob irgendwer was weiterleiten moechte.
     // diese user_id schreiben wir in ein tempraeres array
     foreach ($rec_id as $one) {
         $tmp_forward_id = User::find($this->get_forward_id($one))->user_id;
         if ($tmp_forward_id) {
             $rec_id[] = $tmp_forward_id;
         }
     }
     // wir mergen die eben erstellten arrays und entfernen doppelte eintraege
     $rec_id = array_unique($rec_id);
     // hier gehen wir alle empfaenger durch, schreiben das in die db und schicken eine mail
     $query = "INSERT INTO message_user (message_id, user_id, snd_rec, mkdate)\n                   VALUES (?, ?, 'rec', UNIX_TIMESTAMP())";
     $insert = DBManager::get()->prepare($query);
     $snd_name = $user_id != '____%system%____' ? User::find($user_id)->getFullName() . ' (' . User::find($user_id)->username . ')' : 'Stud.IP-System';
     foreach ($rec_id as $one) {
         $insert->execute(array($tmp_message_id, $one));
         if ($GLOBALS['MESSAGING_FORWARD_AS_EMAIL']) {
             // mail to original receiver
             $mailstatus_original = $this->user_wants_email($one);
             if ($mailstatus_original == 2 || $mailstatus_original == 3 && $email_request == 1 || $force_email) {
                 $this->sendingEmail($one, $snd_user_id, $message, $subject, $tmp_message_id);
             }
         }
         if ($tags) {
             foreach ($tags as $tag) {
                 $insert_tags->execute(array('message_id' => $tmp_message_id, 'user_id' => $one, 'tag' => strtolower($tag)));
             }
         }
     }
     // Obtain all users that should receive a notification
     $user_ids = $rec_id;
     if (is_object($GLOBALS['user'])) {
         $user_ids = array_diff($user_ids, array($GLOBALS['user']->id));
     }
     // Create notifications
     PersonalNotifications::add($user_ids, URLHelper::getUrl("dispatch.php/messages/read/{$tmp_message_id}", array('cid' => null)), sprintf(_('Sie haben eine Nachricht von %s erhalten!'), $snd_name), 'message_' . $tmp_message_id, Icon::create('mail', 'clickable')->asImagePath(80));
     return sizeof($rec_id);
 }
 function execCommandAssertDeleteItem()
 {
     $item_id = Request::option('item_id');
     $this->mode = "AssertDeleteItem";
     $template = $GLOBALS['template_factory']->open('shared/question');
     $question = _("Sie beabsichtigen, diese Liste inklusive aller Einträge zu löschen. ") . sprintf(_("Es werden insgesamt %s Einträge gelöscht!"), count($this->tree->getKidsKids($item_id))) . "\n" . _("Wollen Sie diese Liste wirklich löschen?");
     $template->set_attribute('approvalLink', URLHelper::getUrl($this->getSelf("cmd=DeleteItem&item_id={$item_id}")));
     $template->set_attribute('disapprovalLink', URLHelper::getUrl($this->getSelf("cmd=Cancel&item_id={$item_id}")));
     $template->set_attribute('question', $question);
     echo $template->render();
     return false;
 }
Example #6
0
 function resource_message_action($resource_id)
 {
     $r_perms = new ResourceObjectPerms($resource_id, $GLOBALS['user']->id);
     if (!$r_perms->havePerm('admin')) {
         throw new AccessDeniedException();
     }
     $this->resource = new ResourceObject($resource_id);
     $title = sprintf(_("Nutzer von %s benachrichtigen"), htmlReady($this->resource->getName()));
     $form_fields['start_day'] = array('type' => 'text', 'size' => '10', 'required' => true, 'caption' => _("Belegungen berücksichtigen von"));
     $form_fields['start_day']['attributes'] = array('onMouseOver' => 'jQuery(this).datepicker();this.blur();', 'onChange' => '$(this).closest("form").submit();');
     $form_fields['start_day']['default_value'] = strftime('%x');
     $form_fields['end_day'] = array('type' => 'text', 'size' => '10', 'required' => true, 'caption' => _("Belegungen berücksichtigen bis"));
     $form_fields['end_day']['attributes'] = array('onMouseOver' => 'jQuery(this).datepicker();this.blur();', 'onChange' => '$(this).closest("form").submit();');
     $form_fields['end_day']['default_value'] = strftime('%x', strtotime('+6 months'));
     $form_fields['subject'] = array('type' => 'text', 'size' => '200', 'attributes' => array('style' => 'width:100%'), 'required' => true, 'caption' => _("Betreff"));
     $form_fields['subject']['default_value'] = $this->resource->getName();
     $form_fields['message'] = array('caption' => _("Nachricht"), 'type' => 'textarea', 'required' => true, 'attributes' => array('rows' => 4, 'style' => 'width:100%'));
     $form_buttons['save_close'] = array('caption' => _('OK'), 'info' => _("Benachrichtigung verschicken und Dialog schließen"));
     $form = new StudipForm($form_fields, $form_buttons, 'resource_message', false);
     $start_time = strtotime($form->getFormFieldValue('start_day'));
     $end_time = strtotime($form->getFormFieldValue('end_day'));
     $assign_events = new AssignEventList($start_time, $end_time, $resource_id, '', '', TRUE, 'all');
     $rec = array();
     while ($event = $assign_events->nextEvent()) {
         if ($owner_type = $event->getOwnerType()) {
             if ($owner_type == 'date') {
                 $seminar = new Seminar(Seminar::GetSemIdByDateId($event->getAssignUserId()));
                 foreach ($seminar->getMembers('dozent') as $dozent) {
                     $rec[$dozent['username']][] = strftime('%x %R', $event->begin) . ' - ' . strftime('%R', $event->end) . ' ' . $seminar->getName();
                 }
             } else {
                 $rec[get_username($event->getAssignUserId())][] = strftime('%x %R', $event->begin) . ' - ' . strftime('%R', $event->end);
             }
         }
     }
     if ($form->isSended() && count($rec) && $form->getFormFieldValue('message')) {
         $messaging = new Messaging();
         $ok = $messaging->insert_message($form->getFormFieldValue('message'), array_keys($rec), $GLOBALS['user']->id, null, null, null, '', $form->getFormFieldValue('subject'), true);
         PageLayout::postMessage(MessageBox::success(sprintf(_("Die Nachricht wurde an %s Nutzer verschickt"), $ok)));
         return $this->redirect(URLHelper::getUrl('resources.php?view=resources'));
     }
     if (!count($rec)) {
         PageLayout::postMessage(MessageBox::error(sprintf(_("Im Zeitraum %s - %s wurden keine Belegungen gefunden!"), strftime('%x', $start_time), strftime('%x', $end_time))));
         $this->no_receiver = true;
     } else {
         $submessage = array();
         foreach ($rec as $username => $slots) {
             $submessage[] = get_fullname_from_uname($username, 'full_rev_username', true) . ' ' . sprintf(_('(%s Belegungen)'), count($slots));
         }
         PageLayout::postMessage(MessageBox::info(sprintf(_("Benachrichtigung an %s Nutzer verschicken"), count($rec)), $submessage, true));
     }
     $this->form = $form;
     $this->response->add_header('X-Title', $title);
 }
Example #7
0
</li>
                    <? endforeach ?>
                </ul>
                <? else : ?>
                    <?php 
echo _("alle Teilnehmer");
?>
                <? endif ?>
            </td>
        </tr>
    </tbody>
</table>

<div style="text-align: center;" data-dialog-button>
    <div class="button-group">
        <? if (!$dates_locked && $GLOBALS['perm']->have_studip_perm("tutor", $_SESSION['SessionSeminar'])) : ?>
            <?php 
echo \Studip\LinkButton::create(_("Termin bearbeiten"), URLHelper::getUrl('dispatch.php/course/timesrooms', array('contentbox_open' => $date['metadate_id'], 'singleDateID' => $date->getId())));
?>
        <? endif ?>
        <? if (!$cancelled_dates_locked && $GLOBALS['perm']->have_studip_perm("tutor", $_SESSION['SessionSeminar'])) : ?>
            <?php 
echo \Studip\LinkButton::create(_("Ausfallen lassen"), URLHelper::getURL("dispatch.php/course/cancel_dates", array('termin_id' => $date->getId())), array('data-dialog' => ''));
?>
        <? endif ?>
    </div>
</div>

<?php 
$sidebar = Sidebar::get();
$sidebar->setImage('sidebar/date-sidebar.png');
Example #8
0
 /**
  * This method is called to remove an avatar for a course.
  *
  * @return void
  */
 public function delete_action()
 {
     InstituteAvatar::getAvatar($this->institute_id)->reset();
     PageLayout::postMessage(MessageBox::success(_('Das Infobild wurde gelöscht.')));
     $this->redirect(URLHelper::getUrl('dispatch.php/institute/basicdata/index/' . $this->institute_id));
 }
Example #9
0
                    <?php 
echo Icon::create('info', 'clickable', ['title' => _('Weitere Informationen einblenden')])->asImg();
?>
                </a>
            <? endif ?>
                <a onClick="STUDIP.RoomRequestDialog.initialize('<?php 
echo URLHelper::getUrl('dispatch.php/course/room_requests/edit_dialog/-', array('new_room_request_type' => $key));
?>
');return false;" href="#">
                    <?php 
echo Icon::create('edit', 'clickable', ['title' => _('Diese Anfrage bearbeiten')])->asImg();
?>
                </a>
            <? if ($one['request']) : ?>
                <a onClick="jQuery('#assi_room_request_with_js').load('<?php 
echo URLHelper::getUrl('dispatch.php/course/room_requests/index_assi/-', array('delete_room_request_type' => $key));
?>
');return false;" href="#">
                    <?php 
echo Icon::create('trash', 'clickable', ['title' => _('Diese Anfrage entfernen')])->asImg();
?>
                </a>
            <? else : ?>
                <?php 
echo Assets::img('blank.gif', array('width' => '16'));
?>
            <? endif ?>
            </div>
        </td>
    </tr>
    <? endforeach ?>
Example #10
0
 function print_result()
 {
     ob_start();
     global $_fullname_sql, $SEM_TYPE, $SEM_CLASS;
     if (is_array($this->sem_browse_data['search_result']) && count($this->sem_browse_data['search_result'])) {
         if (!is_object($this->sem_tree)) {
             $this->sem_tree = new StudipSemTreeViewSimple($this->sem_browse_data["start_item_id"], $this->sem_number, is_array($this->sem_browse_data['sem_status']) ? $this->sem_browse_data['sem_status'] : false, !(is_object($GLOBALS['perm']) && $GLOBALS['perm']->have_perm(get_config('SEM_VISIBILITY_PERM'))));
         }
         $the_tree = $this->sem_tree->tree;
         SkipLinks::addIndex(_("Suchergebnis"), 'sem_search_result', 90);
         list($group_by_data, $sem_data) = $this->get_result();
         echo "\n<table class='default' id=\"sem_search_result\" border=\"0\" align=\"center\" cellspacing=0 cellpadding=2 width = \"99%\">\n";
         echo "<caption>" . sprintf(_(" %s Veranstaltungen gefunden %s, Gruppierung: %s"), count($sem_data), $this->sem_browse_data['sset'] ? _("(Suchergebnis)") : "", $this->group_by_fields[$this->sem_browse_data['group_by']]['name']) . "</caption>";
         foreach ($group_by_data as $group_field => $sem_ids) {
             echo "\n<tr><th colspan='5'>";
             switch ($this->sem_browse_data["group_by"]) {
                 case 0:
                     echo htmlReady($this->search_obj->sem_dates[$group_field]['name']);
                     break;
                 case 1:
                     if ($the_tree->tree_data[$group_field]) {
                         echo htmlReady($the_tree->getShortPath($group_field));
                         if (is_object($this->sem_tree)) {
                             echo $this->sem_tree->getInfoIcon($group_field);
                         }
                     } else {
                         echo _("keine Studienbereiche eingetragen");
                     }
                     break;
                 case 3:
                     echo htmlReady($SEM_TYPE[$group_field]["name"] . " (" . $SEM_CLASS[$SEM_TYPE[$group_field]["class"]]["name"] . ")");
                     break;
                 default:
                     echo htmlReady($group_field);
                     break;
             }
             echo "</th></tr><tr>";
             ob_end_flush();
             ob_start();
             if (is_array($sem_ids['Seminar_id'])) {
                 if ($this->sem_browse_data["default_sem"] != 'all') {
                     $current_semester_id = SemesterData::GetSemesterIdByIndex($this->sem_browse_data["default_sem"]);
                 }
                 while (list($seminar_id, ) = each($sem_ids['Seminar_id'])) {
                     // create instance of seminar-object
                     $seminar_obj = new Seminar($seminar_id);
                     // is this sem a studygroup?
                     $studygroup_mode = SeminarCategories::GetByTypeId($seminar_obj->getStatus())->studygroup_mode;
                     $sem_name = $SEM_TYPE[key($sem_data[$seminar_id]["status"])]["name"] . ": " . key($sem_data[$seminar_id]["Name"]);
                     $seminar_number = key($sem_data[$seminar_id]['VeranstaltungsNummer']);
                     if ($studygroup_mode) {
                         $sem_name .= ' (' . _("Studiengruppe");
                         if ($seminar_obj->admission_prelim) {
                             $sem_name .= ', ' . _("Zutritt auf Anfrage");
                         }
                         $sem_name .= ')';
                         echo '<td width="1%">';
                         echo StudygroupAvatar::getAvatar($seminar_id)->getImageTag(Avatar::SMALL, array('title' => htmlReady($seminar_obj->getName())));
                         echo '</td>';
                     } else {
                         $sem_number_start = key($sem_data[$seminar_id]["sem_number"]);
                         $sem_number_end = key($sem_data[$seminar_id]["sem_number_end"]);
                         if ($sem_number_start != $sem_number_end) {
                             $sem_name .= " (" . $this->search_obj->sem_dates[$sem_number_start]['name'] . " - ";
                             $sem_name .= ($sem_number_end == -1 ? _("unbegrenzt") : $this->search_obj->sem_dates[$sem_number_end]['name']) . ")";
                         } elseif ($this->sem_browse_data["group_by"]) {
                             $sem_name .= " (" . $this->search_obj->sem_dates[$sem_number_start]['name'] . ")";
                         }
                         echo '<td width="1%">';
                         echo CourseAvatar::getAvatar($seminar_id)->getImageTag(Avatar::SMALL, array('title' => htmlReady($seminar_obj->getName())));
                         echo '</td>';
                     }
                     $send_from_search = URLHelper::getUrl(basename($_SERVER['PHP_SELF']), array('keep_result_set' => 1, 'cid' => null));
                     $send_from_search_link = UrlHelper::getLink($this->target_url, array($this->target_id => $seminar_id, 'cid' => null, 'send_from_search' => 1, 'send_from_search_page' => $send_from_search));
                     echo '<td width="66%" colspan="2">';
                     echo '<a href="' . $send_from_search_link . '">';
                     if (Config::get()->IMPORTANT_SEMNUMBER && $seminar_number) {
                         echo htmlReady($seminar_number) . " ";
                     }
                     echo htmlReady($sem_name) . '</a><br>';
                     //create Turnus field
                     if ($studygroup_mode) {
                         echo "<div style=\"font-size:smaller\">" . htmlReady(substr($seminar_obj->description, 0, 100)) . "</div>";
                     } else {
                         $temp_turnus_string = $seminar_obj->getDatesExport(array('short' => true, 'shrink' => true, 'semester_id' => $current_semester_id));
                         //Shorten, if string too long (add link for details.php)
                         if (strlen($temp_turnus_string) > 70) {
                             $temp_turnus_string = htmlReady(substr($temp_turnus_string, 0, strpos(substr($temp_turnus_string, 70, strlen($temp_turnus_string)), ",") + 71));
                             $temp_turnus_string .= " ... <a href=\"{$send_from_search_link}\">(" . _("mehr") . ")</a>";
                         } else {
                             $temp_turnus_string = htmlReady($temp_turnus_string);
                         }
                         if (!Config::get()->IMPORTANT_SEMNUMBER) {
                             echo "<div style=\"margin-left:5px;font-size:smaller\">" . htmlReady($seminar_number) . "</div>";
                         }
                         echo "<div style=\"margin-left:5px;font-size:smaller\">" . $temp_turnus_string . "</div>";
                     }
                     echo '</td>';
                     echo "<td align=\"right\">(";
                     $doz_name = array();
                     $c = 0;
                     reset($sem_data[$seminar_id]['fullname']);
                     foreach ($sem_data[$seminar_id]['username'] as $anzahl1) {
                         if ($c == 0) {
                             list($d_name, $anzahl2) = each($sem_data[$seminar_id]['fullname']);
                             $c = $anzahl2 / $anzahl1;
                             $doz_name = array_merge($doz_name, array_fill(0, $c, $d_name));
                         }
                         --$c;
                     }
                     $doz_uname = array_keys($sem_data[$seminar_id]['username']);
                     $doz_position = array_keys($sem_data[$seminar_id]['position']);
                     if (count($doz_name)) {
                         if (count($doz_position) != count($doz_uname)) {
                             $doz_position = range(1, count($doz_uname));
                         }
                         array_multisort($doz_position, $doz_name, $doz_uname);
                         $i = 0;
                         foreach ($doz_name as $index => $value) {
                             if ($value) {
                                 // hide dozenten with empty username
                                 if ($i == 4) {
                                     echo "... <a href=\"{$send_from_search_link}\">(" . _("mehr") . ")</a>";
                                     break;
                                 }
                                 echo "<a href=\"" . UrlHelper::getLink('dispatch.php/profile', array('username' => $doz_uname[$index])) . "\">" . htmlReady($value) . "</a>";
                                 if ($i != count($doz_name) - 1) {
                                     echo ", ";
                                 }
                             }
                             ++$i;
                         }
                         echo ")</td></tr>";
                     }
                 }
             }
         }
         echo "</table>";
     } elseif ($this->search_obj->search_button_clicked && !$this->search_obj->new_search_button_clicked) {
         if ($this->search_obj->found_rows === false) {
             $details = array(_("Der Suchbegriff fehlt oder ist zu kurz"));
         }
         if (!isset($details)) {
             echo MessageBox::info(_("Ihre Suche ergab keine Treffer"), $details);
         } else {
             echo MessageBox::error(_("Ihre Suche ergab keine Treffer"), $details);
         }
         $this->sem_browse_data["sset"] = 0;
     }
     ob_end_flush();
 }
Example #11
0
            echo '<td class="blank">&nbsp;<a href="';
            echo URLHelper::getLink('', array('imt' => mktime(0, 0, 0, $atimex['mon'] - $mcount, 10, $atimex['year']), 'form_name' => ($form_name ? $form_name : ''), 'submit' => ($submit ? '1' : ''), 'mcount' =>  $mcount, 'element_switch' => $element_switch, 'c' => $c, 'atime' => $atime)) . $q . '">';
            echo Icon::create('arr_2left', 'clickable', ['title' => $mcount.' '._('Monate zurück')])->asImg(16) . '</a>';
            echo '&nbsp;<a href="' . URLHelper::getLink('', array('imt' => mktime(0, 0, 0, $atimex['mon'] - $mcounth, 10, $atimex['year']), 'form_name' => ($form_name ? $form_name : ''), 'submit' => ($submit ? '1' : ''), 'mcount' => $mcount, 'element_switch' => $element_switch, 'c' => $c, 'atime' => $atime)) .  $q . '">';
            echo Icon::create('arr_1left', 'clickable', ['title' => $mcounth.' '._('Monate zurück')])->asImg(16) . '</a></td>', "\n";
            if ($mcounth - 2 > 0) {
                echo '<td class="blank" colspan="', ($mcounth - 2), '" align=center>';
                if ($zeiten)
                    echo $zeiten_buttons;
                echo '&nbsp;</td>';
            }
            echo '<td class="blank" align="right"><a href="' . URLHelper::getLink('', array('imt' => mktime(0, 0, 0, $atimex['mon'] + $mcounth, 10, $atimex['year']), 'mcount' => $mcount, 'form_name' => ($form_name ? $form_name : ''), 'submit' => ($submit ? '1' : ''), 'element_switch' =>  $element_switch, 'c' => $c, 'atime' => $atime)) . $q . '">';
            echo Icon::create('arr_1right', 'clickable', ['title' => $mcounth.' '._('Monate vor')])->asImg(16) . '</a>&nbsp;', "\n";
            echo '<a href="' . URLHelper::getLink('', array('imt' => mktime(0, 0, 0, $atimex['mon'] + $mcount, 10, $atimex['year']), 'form_name' => ($form_name ? $form_name : ''), 'submit' => ($submit ? '1' : ''), 'mcount' => $mcount, 'element_switch' => $element_switch, 'c' => $c, 'atime' => $atime)) . $q . '">';
            echo Icon::create('arr_2right', 'clickable', ['title' => $mcount.' '._('Monate vor')])->asImg(16) . '</a>&nbsp;</td>';
        } elseif ($zeiten) {
            echo '<td class="blank" colspan="', $mcounth, '" align="center">', $zeiten_buttons, "</td>\n";
        }
        echo '</tr></table>', "\n";
    }
} else { // nur einen Monat anzeigen
    if ($studipform) {
        echo includeMonth($imt, URLHelper::getUrl('', array('form_name' => $form_name, 'submit' => $submit, 'element_switch' => $element_switch, 'c' => $c, 'atime' => '')), 'NOKW', $js, strtotime('noon', $atime));
    } else {
        echo includeMonth($imt, URLHelper::getUrl('', array('element_switch' => $element_switch, 'c' => $c, 'atime' => '')), 'NOKW', $js, $atime);
    }
}
echo "</body>\n</html>";

page_close();
Example #12
0
            URLHelper::getLink('?', array('group_by' => $i, 'keep_result_set' => 1)),
            $_SESSION['sem_browse_data']['group_by'] == $i
        );
    }
    $sidebar->addWidget($grouping);
} else {
    $toplist_names = array("dummy",_("Teilnehmeranzahl"), _("die meisten Materialien"), _("aktivste Veranstaltungen"),_("neueste Veranstaltungen"));
    $toplist = new LinksWidget();
    $toplist->setTitle(_("Topliste: ").$toplist_names[$_SESSION['sem_portal']["toplist"] ?: 4]);
    foreach ((array) $toplist_entries as $key => $entry) {
        $toplist->addLink(
            ($key + 1).". ".$entry['name'],
            URLHelper::getURL("dispatch.php/course/details/", array('sem_id' => $entry['seminar_id'],
                'cid' => null,
                'send_from_search' => 1,
                'send_from_search_page' => URLHelper::getUrl(basename($_SERVER['PHP_SELF']), array('cid' => null)))
            ),
            null
        );
    }

    $sidebar->addWidget($toplist);

    $toplist_switcher = new LinksWidget();
    $toplist_switcher->setTitle(_("Weitere Toplisten"));
    foreach (array(4,1,2,3) as $i) {
        $toplist_switcher->addLink(
            $toplist_names[$i],
            URLHelper::getURL("?", array('choose_toplist' => $i)),
            $_SESSION['sem_portal']["toplist"] == $i ? Icon::create("arr_1right", "attention") : null
        );