Esempio n. 1
0
/**
 * Returns an overview of certain documents
 *
 * @param Array $documents Ids of the documents in question
 * @param mixed $open      Array containing open states of documents
 * @return string Overview of documents as html, ready to be displayed
 */
function show_documents($documents, $open = null)
{
    if (!is_array($documents)) {
        return;
    }
    if (!is_null($open) && !is_array($open)) {
        $open = null;
    }
    if (is_array($open)) {
        reset($open);
        $ank = key($open);
    }
    if (!empty($documents)) {
        $query = "SELECT {$GLOBALS['_fullname_sql']['full']} AS fullname, username, user_id,\n                         dokument_id, filename, filesize, downloads, protected, url, description,\n                         IF(IFNULL(name, '') = '', filename, name) AS t_name,\n                         GREATEST(a.chdate, a.mkdate) AS chdate\n                  FROM dokumente AS a\n                  LEFT JOIN auth_user_md5 USING (user_id)\n                  LEFT JOIN user_info USING (user_id)\n                  WHERE dokument_id IN (?)\n                  ORDER BY a.chdate DESC";
        $statement = DBManager::get()->prepare($query);
        $statement->execute(array($documents));
        $documents = $statement->fetchAll(PDO::FETCH_ASSOC);
    }
    foreach ($documents as $index => $document) {
        $type = empty($document['url']) ? 0 : 6;
        $is_open = is_null($open) || $open[$document['dokument_id']] ? 'open' : 'close';
        $extension = getFileExtension($document['filename']);
        // Create icon
        $icon = sprintf('<a href="%s">%s</a>', GetDownloadLink($document['dokument_id'], $document['filename'], $type), GetFileIcon($extension, true)->asImg());
        // Create open/close link
        $link = $is_open === 'open' ? URLHelper::getLink('#dok_anker', array('close' => $document['dokument_id'])) : URLHelper::getLink('#dok_anker', array('open' => $document['dokument_id']));
        // Create title including filesize and number of downloads
        $size = $document['filesize'] > 1024 * 1024 ? sprintf('%u MB', round($document['filesize'] / 1024 / 1024)) : sprintf('%u kB', round($document['filesize'] / 1024));
        $downloads = $document['downloads'] == 1 ? '1 ' . _('Download') : $document['downloads'] . ' ' . _('Downloads');
        $title = sprintf('<a href="%s"%s class="tree">%s</a> (%s / %s)', $link, $ank == $document['dokument_id'] ? ' name="dok_anker"' : '', htmlReady(mila($document['t_name'])), $size, $downloads);
        // Create additional information
        $addon = sprintf('<a href="%s">%s</a> %s', URLHelper::getLink('dispatch.php/profile', array('username' => $document['username'])), $document['fullname'], date('d.m.Y H:i', $document['chdate']));
        if ($document['protected']) {
            $addon = tooltipicon(_('Diese Datei ist urheberrechtlich geschützt!')) . ' ' . $addon;
        }
        if (!empty($document['url'])) {
            $addon .= ' ' . Icon::create('link-extern', 'clickable', ['title' => _('Diese Datei wird von einem externen Server geladen!')])->asImg(16);
        }
        // Attach created variables to document
        $documents[$index]['addon'] = $addon;
        $documents[$index]['extension'] = $extension;
        $documents[$index]['icon'] = $icon;
        $documents[$index]['is_open'] = $is_open;
        $documents[$index]['link'] = $link;
        $documents[$index]['title'] = $title;
        $documents[$index]['type'] = $type;
    }
    $template = $GLOBALS['template_factory']->open('user_activities/files-details');
    $template->documents = $documents;
    return $template->render();
}
Esempio n. 2
0
<label for="message" class="caption">
    <?php 
echo _('Nachricht bei fehlgeschlagener Anmeldung');
?>
:
    <?php 
echo strpos($rule->getMessage(), '%s') ? tooltipicon(_("Die Zeichen %s sind ein Platzhalter für änderbare Bedingungen")) : '';
?>
</label>
<textarea name="message" rows="4" cols="50"><?php 
echo htmlReady($rule->getMessage());
?>
</textarea>
<br/>
<label for="start_date" class="caption">
    <?php 
echo _('Gültigkeitszeitraum der Regel');
?>
:
</label>
<div class="form_group">
    <?php 
echo _('von');
?>
    <input type="text" size="16" maxlength="16" name="start_date"
        id="start_date" value="<?php 
echo $rule->getStartTime() ? date('d.m.Y H:i', $rule->getStartTime()) : '';
?>
" data-max-date=""
        placeholder="tt.mm.jjjj --:--"/>
    <?php 
Esempio n. 3
0
echo htmlReady($group['name']);
?>
            </a>
            <? if ($group['visible'] == 0) : ?>
                <? $infotext = _("Versteckte Studiengruppen können über die Suchfunktionen nicht gefunden werden."); ?>
                <? $infotext .= " "; ?>
                <? if (Config::get()->ALLOW_DOZENT_VISIBILITY) : ?>
                    <? $infotext .= _("Um die Studiengruppe sichtbar zu machen, wählen Sie den Punkt \"Sichtbarkeit\" im Administrationsbereich der Veranstaltung."); ?>
                <? else : ?>
                    <? $infotext .= _("Um die Studiengruppe sichtbar zu machen, wenden Sie sich an die Admins."); ?>
                <? endif ?>
                <?php 
echo _("[versteckt]");
?>
                <?php 
echo tooltipicon($infotext);
?>
            <? endif ?>
        </td>
        <td style="text-align: left">
            <? if (!empty($group['navigation'])) : ?>
                <? foreach (MyRealmModel::array_rtrim($group['navigation']) as $key => $nav)  : ?>
                    <? if (isset($nav) && $nav->isVisible(true)) : ?>
                        <a href="<?php 
echo UrlHelper::getLink('seminar_main.php', array('auswahl' => $group['seminar_id'], 'redirect_to' => strtr($nav->getURL(), '?', '&')));
?>
" <?php 
echo $nav->hasBadgeNumber() ? 'class="badge" data-badge-number="' . intval($nav->getBadgeNumber()) . '"' : '';
?>
>
                            <?php 
Esempio n. 4
0
?>
                    <?php 
foreach ($priocourses as $prio => $course) {
    ?>
                        <?php 
    $name = $course->name;
    if (get_config('IMPORTANT_SEMNUMBER')) {
        $name = $course->veranstaltungsnummer . ' ' . $name;
    }
    $prios[$course->id]['name'] = htmlReady(my_substr($name, 0, 50));
    $tooltxt = array();
    $tooltxt[] = $course->veranstaltungsnummer;
    $tooltxt[] = $course->name;
    $tooltxt[] = join(', ', $course->members->findBy('status', 'dozent')->orderBy('position')->limit(3)->pluck('Nachname'));
    $tooltxt[] = join('; ', $course->cycles->toString());
    $prios[$course->id]['info'] = tooltipicon(join("\n", $tooltxt));
    ?>
                        <?php 
    $visible = !isset($user_prio[$course->id]);
    ?>
                        <li class="<?php 
    echo htmlReady($course->id);
    ?>
 <?php 
    echo $visible ? 'visible' : '';
    ?>
" <?php 
    echo !$visible ? 'style="display:none"' : '';
    ?>
>
                            <input type="checkbox" class="hidden-js" value="0" name="admission_prio[<?php 
Esempio n. 5
0
    /**
     *
     * @param $request_id
     */
    function showRequest($request_id)
    {
        global $cssSw, $perm;

        $reqObj = new RoomRequest($request_id);
        $semObj = new Seminar($reqObj->getSeminarId());
        $sem_link = $perm->have_studip_perm('tutor', $semObj->getId()) ?
            "seminar_main.php?auswahl=" . $semObj->getId() :
            "dispatch.php/course/details/?sem_id=" . $semObj->getId() . "&send_from_search=1&send_from_search_page="
            . URLHelper::getLink("resources.php?working_on_request=$request_id");
        ?>
        <form method="POST" action="<?echo URLHelper::getLink('?working_on_request=' . $request_id);?>">
        <?php 
echo CSRFProtection::tokenTag();
?>
        <input type="hidden" name="view" value="edit_request">
        <table border=0 celpadding=2 cellspacing=0 width="99%" align="center">
            <tr>
                <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
                </td>
                <td class="<? echo $cssSw->getClass() ?>" colspan="2" width="96%" valign="top">
                    <a href="<?php 
echo URLHelper::getLink($sem_link);
?>
">
                        <b><?php 
echo $semObj->seminar_number ? htmlReady($semObj->seminar_number) . ':' : '';
echo htmlReady($semObj->getName());
?>
</b>
                    </a>
                    <font size="-1">
                        <br>
                        <?
                        $names = $this->selectSemInstituteNames($semObj->getInstitutId());

                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("Art der Anfrage").": ".$reqObj->getTypeExplained()."<br>";
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("Erstellt von").": <a href=\"".URLHelper::getLink('dispatch.php/profile?username='******'%x %H:%M', $reqObj->mkdate) . '<br>';
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("Letzte Änderung") . ": ". strftime('%x %H:%M', $reqObj->chdate) . '<br>';
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("Letzte Änderung von") . ": <a href=\"".URLHelper::getLink('dispatch.php/profile?username='******': ';
                        foreach ($semObj->getMembers('dozent') as $doz) {
                            if ($dozent){
                                echo ", ";
                            }
                            echo '<a href ="'. URLHelper::getLink('dispatch.php/profile?username='******'username']). '">'.HtmlReady($doz['fullname'])."</a>";
                            $dozent = true;
                        }
                        print "<br>";
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("verantwortliche Einrichtung").": ".htmlReady($names['inst_name'])."<br>";
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("verantwortliche Fakultät").": ".htmlReady($names['fak_name'])."<br>";
                        print "&nbsp;&nbsp;&nbsp;&nbsp;"._("aktuelle Teilnehmerzahl").": ".$semObj->getNumberOfParticipants('total').'<br>';
                        ?>
                    </font>
                </td>
            </tr>
            <tr>
                <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
                </td>
                <td class="<? echo $cssSw->getClass() ?>" width="35%" valign="top">
                    <font size="-1"><b><?php 
echo _("angeforderte Belegungszeiten");
?>
:</b><br><br>
                    <?
                    $dates = $semObj->getGroupedDates($reqObj->getTerminId(),$reqObj->getMetadateId());
                    if ($dates['first_event']) {
                            $i = 1;
                            if(is_array($dates['info']) && sizeof($dates['info']) > 0 ){
                                 foreach ($dates['info'] as $info) {
                                      $name = $info['name'];
                                      if ($info['weekend']) $name = '<span style="color:red">'. $info['name'] . '</span>';
                                          printf ("<font color=\"blue\"><i><b>%s</b></i></font>. %s<br>", $i, $name);
                                      $i++;
                                 }
                            }

                            if ($reqObj->getType() != 'date') {
                                echo _("regelmäßige Buchung ab").": ".strftime("%x", $dates['first_event']);
                            }
                     } else {
                            print _("nicht angegeben");
                     }
                    ?>
                    </font>
                </td>
                <td style="border-left:1px dotted black; background-color: #f3f5f8" width="51%" rowspan="4" valign="top">
                    <table cellpadding="2" cellspacing="0" border="0" width="90%">
                        <tr>
                            <td width="70%">
                                <font size="-1"><b><?php 
echo _("angeforderter Raum");
?>
:</b></font>
                            </td>
                            <?
                            unset($resObj);
                            $cols=0;
                            if (is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"]))
                                foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"] as $key => $val) {
                                    $cols++;
                                    print "<td width=\"1%\" align=\"left\"><font size=\"-1\" color=\"blue\"><i><b>".$cols.".</b></i></font></td>";
                                }
                            ?>
                            <td width="29%" align="right">
                                <!--<font style="font-size:10px;color:blue;"><?//=_("Kapazität")?></font>-->
                            </td>
                        </tr>
                        <tr>
                            <td width="70%">
                            <?
                            if ($request_resource_id = $reqObj->getResourceId()) {
                                $resObj = ResourceObject::Factory($request_resource_id);
                                print $resObj->getFormattedLink($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["first_event"]);
                                print tooltipicon(_('Der ausgewählte Raum bietet folgende der wünschbaren Eigenschaften:')
                                                  . "\n" . $resObj->getPlainProperties(TRUE),
                                                  $resObj->getOwnerId() == 'global');
                                if ($resObj->getOwnerId() == 'global') {
                                    print ' [global]';
                                }
                            } else
                                print _("Es wurde kein Raum angefordert.");

                            ?>
                            </td>
                            <?
                            $i=0;
                            if(is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"]) && sizeof($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"]) > 0 )
                             foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"] as $key => $val) {
                                print "<td width=\"1%\" nowrap><font size=\"-1\">";
                                if ($request_resource_id) {
                                    if ($request_resource_id == $val["resource_id"]) {
                                        print Icon::create('accept', 'accept', ['title' => _("Dieser Raum ist augenblicklich gebucht"), TRUE])->asImg();
                                        echo '<input type="radio" name="selected_resource_id['. $i .']" value="'. $request_resource_id .'" checked="checked">';
                                    } else {
                                        $overlap_status = $this->showGroupOverlapStatus($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["detected_overlaps"][$request_resource_id], $val["events_count"], $val["overlap_events_count"][$request_resource_id], $val["termin_ids"]);
                                        print $overlap_status["html"];
                                        printf ("<input type=\"radio\" name=\"selected_resource_id[%s]\" value=\"%s\" %s %s>",
                                            $i, $request_resource_id,
                                            ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["selected_resources"][$i] == $request_resource_id) ? "checked" : "",
                                            ($overlap_status["status"] == 2 || !ResourcesUserRoomsList::CheckUserResource($request_resource_id)) ? "disabled" : "");
                                    }
                                } else
                                    print "&nbsp;";
                                print "</font></td>";
                                $i++;
                             }

                            ?>
                            <td width="29%" align="right">
                                <?
                                if (is_object($resObj)) {
                                    $seats = $resObj->getSeats();
                                    $requested_seats = $reqObj->getSeats();
                                    if ((is_numeric($seats)) && (is_numeric($requested_seats))) {
                                        $percent_diff = (100 / $requested_seats) * $seats;
                                        if ($percent_diff > 0)
                                            $percent_diff = "+".$percent_diff;
                                        if ($percent_diff < 0)
                                            $percent_diff = "-".$percent_diff;
                                        print "<font style=\"font-size:10px;\">".round($percent_diff)."%</font>";
                                    }
                                }
                                ?>
                            </td>
                        </tr>
                        <?
                        if (get_config('RESOURCES_ENABLE_GROUPING')) {
                            $room_group = RoomGroups::GetInstance();
                            $group_id = $_SESSION['resources_data']['actual_room_group'];
                            ?>
                        <tr>
                            <td style="border-top:1px solid;" width="100%" colspan="<?php 
echo $cols + 2;
?>
">
                                <font size="-1"><b><?php 
echo _("Raumgruppe berücksichtigen");
?>
:</b></font>
                            </td>
                        </tr>
                        <tr>
                        <td colspan="<?php 
echo $cols;
?>
"><font size="-1">
                        <select name="request_tool_choose_group">
                        <option <?php 
echo is_null($group_id) ? 'selected' : '';
?>
 value="-"><?php 
echo _("Keine Raumgruppe anzeigen");
?>
</option>
                        <?
                        foreach($room_group->getAvailableGroups() as $gid){
                        echo '<option value="'.$gid.'" '
                            . (!is_null($group_id) && $group_id == $gid ? 'selected' : '') . '>'
                            .htmlReady(my_substr($room_group->getGroupName($gid),0,45))
                            .' ('.$room_group->getGroupCount($gid).')</option>';
                        }
                        ?>
                        </select>
                        </font>
                        </td>
                        <td colspan="2"><font size="-1">
                        <?php 
echo Button::create(_('Auswählen'), 'request_tool_group');
?>
<br>
                        </font>
                        </td>
                        </tr>
                        <?
                        if ($room_group->getGroupCount($group_id)){
                            foreach ($room_group->getGroupContent($group_id) as $key) {
                        ?>
                        <tr>
                            <td width="70%">
                                <?
                                $resObj = ResourceObject::Factory($key);
                                print $resObj->getFormattedLink($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["first_event"]);
                                print tooltipicon(_('Der ausgewählte Raum bietet folgende der wünschbaren Eigenschaften:')
                                                  . "\n" . $resObj->getPlainProperties(TRUE),
                                                  $resObj->getOwnerId() == 'global');
                                if ($resObj->getOwnerId() == 'global') {
                                    print ' [global]';
                                }
                            ?>
                            </td>
                            <?
                            $i=0;
                            if (is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"])) {
                                foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"] as $key2 => $val2) {
                                    print "<td width=\"1%\" nowrap><font size=\"-1\">";
                                    if ($key == $val2["resource_id"]) {
                                        print Icon::create('accept', 'accept', ['title' => _("Dieser Raum ist augenblicklich gebucht"), TRUE])->asImg();
                                        echo '<input type="radio" name="selected_resource_id['. $i .']" value="'. $key .'" checked="checked">';
                                    } else {
                                        $overlap_status = $this->showGroupOverlapStatus($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["detected_overlaps"][$key], $val2["events_count"], $val2["overlap_events_count"][$resObj->getId()], $val2["termin_ids"]);
                                        print $overlap_status["html"];
                                        printf ("<input type=\"radio\" name=\"selected_resource_id[%s]\" value=\"%s\" %s %s>", $i, $key,
                                        ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["selected_resources"][$i] == $key) ? "checked" : "",
                                        ($overlap_status["status"] == 2 || !ResourcesUserRoomsList::CheckUserResource($key)) ? "disabled" : "");
                                    }
                                    print "</font></td>";
                                    $i++;
                                }
                            }
                            ?>
                            <td width="29%" align="right">
                                <?
                                if (is_object($resObj)) {
                                    $seats = $resObj->getSeats();
                                    $requested_seats = $reqObj->getSeats();
                                    if ((is_numeric($seats)) && (is_numeric($requested_seats))) {
                                        $percent_diff = (100 / $requested_seats) * $seats;
                                        if ($percent_diff > 0)
                                            $percent_diff = "+".$percent_diff;
                                        if ($percent_diff < 0)
                                            $percent_diff = "-".$percent_diff;
                                        print "<font style=\"font-size:10px;\">".round($percent_diff)."%</font>";
                                    }
                                }
                                ?>
                            </td>
                        </tr>
                        <?
                                }
                            }
                        }
                        ?>
                        <tr>
                            <td style="border-top:1px solid;" width="100%" colspan="<?php 
echo $cols + 2;
?>
">
                                <font size="-1"><b><?php 
echo _("weitere passende Räume");
?>
:</b>
                                </font>
                            </td>
                        </tr>
                        <?
                        if (is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["considered_resources"]))
                            foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["considered_resources"] as $key=>$val) {
                                if ($val["type"] == "matching")
                                    $matching_rooms[$key] = TRUE;
                                if ($val["type"] == "clipped")
                                    $clipped_rooms[$key] = TRUE;
                                if ($val["type"] == "grouped")
                                    $grouped_rooms[$key] = TRUE;
                            }

                        if (sizeof($matching_rooms)) {
                            // filter list to [search_limit_low]...[search_limit_high]
                            $search_limit_low = $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_low"];
                            $search_limit_high = $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_high"];
                            $matching_rooms = array_slice($matching_rooms, $search_limit_low, $search_limit_high - $search_limit_low);
                            foreach ($matching_rooms as $key=>$val) {
                            ?>
                        <tr>
                            <td width="70%">
                                <?
                                $resObj = ResourceObject::Factory($key);
                                print $resObj->getFormattedLink($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["first_event"]);
                                print tooltipicon(_('Der ausgewählte Raum bietet folgende der wünschbaren Eigenschaften:')
                                                  . "\n" . $resObj->getPlainProperties(TRUE),
                                                  $resObj->getOwnerId() == 'global');
                                if ($resObj->getOwnerId() == 'global') {
                                    print ' [global]';
                                }
                            ?>
                            </td>
                            <?
                            $i=0;
                            if (is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"])) {
                                foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"] as $key2 => $val2) {
                                    print "<td width=\"1%\" nowrap><font size=\"-1\">";
                                    if ($key == $val2["resource_id"]) {
                                        print Icon::create('accept', 'accept', ['title' => _("Dieser Raum ist augenblicklich gebucht"), TRUE])->asImg();
                                        echo '<input type="radio" name="selected_resource_id['. $i .']" value="'. $key .'" checked="checked">';
                                    } else {
                                        $overlap_status = $this->showGroupOverlapStatus($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["detected_overlaps"][$key], $val2["events_count"], $val2["overlap_events_count"][$resObj->getId()], $val2["termin_ids"]);
                                        print $overlap_status["html"];
                                        printf ("<input type=\"radio\" name=\"selected_resource_id[%s]\" value=\"%s\" %s %s>",
                                        $i, $key, ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["selected_resources"][$i] == $key) ? "checked" : "",
                                        ($overlap_status["status"] == 2 || !ResourcesUserRoomsList::CheckUserResource($key)) ? "disabled" : "");
                                    }
                                    print "</font></td>";
                                    $i++;
                                }
                            }
                            ?>
                            <td width="29%" align="right">
                                <?
                                if (is_object($resObj)) {
                                    $seats = $resObj->getSeats();
                                    $requested_seats = $reqObj->getSeats();
                                    if ((is_numeric($seats)) && (is_numeric($requested_seats))) {
                                        $percent_diff = (100 / $requested_seats) * $seats;
                                        if ($percent_diff > 0)
                                            $percent_diff = "+".$percent_diff;
                                        if ($percent_diff < 0)
                                            $percent_diff = "-".$percent_diff;
                                        print "<font style=\"font-size:10px;\">".round($percent_diff)."%</font>";
                                    }
                                }
                                ?>
                            </td>
                        </tr>
                            <?
                            }
                            ?>
                        <tr>
                            <td colspan="<?php 
echo $cols + 2;
?>
" align="center">
                                <font size="-1">
                                    <?php 
echo _("zeige Räume");
?>
                                    <a href="<?php 
echo URLHelper::getLink('?dec_limit_low=1');
?>
">-</a>
                                    <input type="text" name="search_rooms_limit_low" size="1" value="<?php 
echo $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_low"] + 1;
?>
">
                                    <a href="<?php 
echo URLHelper::getLink('?inc_limit_low=1');
?>
">+</a>

                                    bis
                                    <a href="<?php 
echo URLHelper::getLink('?dec_limit_high=1');
?>
">-</a>
                                    <input type="text" name="search_rooms_limit_high" size="1" value="<?php 
echo $_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["search_limit_high"];
?>
">
                                    <a href="<?php 
echo URLHelper::getLink('?inc_limit_high=1');
?>
">+</a>

                                    <?php 
echo Icon::create('arr_2up', 'sort', ['title' => 'ausgewählten Bereich anzeigen'])->asInput(array('name' => 'matching_rooms_limit_submit'));
?>
                                </font>
                            </td>
                        </tr>
                            <?
                        } else
                            print "<tr><td width=\"100%\" colspan=\"".($cols+1)."\"><font size=\"-1\">"._("keine gefunden")."</font></td></tr>";

                        //Clipped Rooms
                        if (sizeof($clipped_rooms)) {
                        ?>
                        <tr>
                            <td style="border-top:1px solid;" width="100%" colspan="<?php 
echo $cols + 2;
?>
">
                                <font size="-1"><b><?php 
echo _("Räume aus der Merkliste");
?>
:</b></font>
                            </td>
                        </tr>
                        <?
                            foreach ($clipped_rooms as $key=>$val) {
                        ?>
                        <tr>
                            <td width="70%">
                                <?
                                $resObj = ResourceObject::Factory($key);
                                print $resObj->getFormattedLink($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["first_event"]);
                                print tooltipicon(_('Der ausgewählte Raum bietet folgende der wünschbaren Eigenschaften:')
                                                  . "\n" . $resObj->getPlainProperties(TRUE),
                                                  $resObj->getOwnerId() == 'global');
                                if ($resObj->getOwnerId() == 'global') {
                                    print ' [global]';
                                }
                            ?>
                            </td>
                            <?
                            $i=0;
                            if (is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"])) {
                                foreach ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"] as $key2 => $val2) {
                                    print "<td width=\"1%\" nowrap><font size=\"-1\">";
                                    if ($key == $val2["resource_id"]) {
                                        print Icon::create('accept', 'clickable', ['title' => _('Dieser Raum ist augenblicklich gebucht'), TRUE])->asImg();
                                    } else {
                                        $overlap_status = $this->showGroupOverlapStatus($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["detected_overlaps"][$key], $val2["events_count"], $val2["overlap_events_count"][$resObj->getId()], $val2["termin_ids"]);
                                        print $overlap_status["html"];
                                        printf ("<input type=\"radio\" name=\"selected_resource_id[%s]\" value=\"%s\" %s %s>",
                                        $i, $key,
                                        ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["selected_resources"][$i] == $key) ? "checked" : "",
                                        ($overlap_status["status"] == 2 || !ResourcesUserRoomsList::CheckUserResource($key)) ? "disabled" : "");
                                    }
                                    print "</font></td>";
                                    $i++;
                                }
                            }
                            ?>
                            <td width="29%" align="right">
                                <?
                                if (is_object($resObj)) {
                                    $seats = $resObj->getSeats();
                                    $requested_seats = $reqObj->getSeats();
                                    if ((is_numeric($seats)) && (is_numeric($requested_seats))) {
                                        $percent_diff = (100 / $requested_seats) * $seats;
                                        if ($percent_diff > 0)
                                            $percent_diff = "+".$percent_diff;
                                        if ($percent_diff < 0)
                                            $percent_diff = "-".$percent_diff;
                                        print "<font style=\"font-size:10px;\">".round($percent_diff)."%</font>";
                                    }
                                }
                                ?>
                            </td>
                        </font></td>
                        </tr>
                        <?
                            }
                        }
                        ?>
                    </table>
                </td>
            </tr>
            <tr>
                <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
                </td>
                <td class="<? echo $cssSw->getClass() ?>" width="35%" valign="top">
                    <font size="-1"><b><?php 
echo _("gewünschte Raumeigenschaften");
?>
:</b><br><br>
                    <?
                    $properties = $reqObj->getProperties();
                    if (sizeof($properties)) {
                    ?>
                        <table width="99%" cellspacing="0" cellpadding="2" border="0">
                        <?

                        foreach ($properties as $key=>$val) {
                            ?>
                            <tr>
                                <td width="70%">
                                    <li><font size="-1"><?php 
echo htmlReady($val["name"]);
?>
</font></li>
                                </td>
                                <td width="30%"><font size="-1">
                                <?
                                switch ($val["type"]) {
                                    case "bool":
                                        /*printf ("%s", ($val["state"]) ?  htmlReady($val["options"]) : " - ");*/
                                    break;
                                    case "num":
                                    case "text":
                                        print htmlReady($val["state"]);
                                    break;
                                    case "select":
                                        $options=explode (";",$val["options"]);
                                        foreach ($options as $a) {
                                            if ($val["state"] == $a)
                                                print htmlReady($a);
                                        }
                                    break;
                                }
                                ?></font>
                                </td>
                            </tr>
                            <?
                        }
                        ?>
                        </table>
                        <?
                    } else
                        print _("Es wurden keine Raumeigenschaften gewünscht.");
                    ?>
                    </font>
                </td>
            </tr>
            <tr>
                <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
                </td>
                <td class="<? echo $cssSw->getClass() ?>" width="35%" valign="top">
                    <font size="-1"><b><?php 
echo _("Kommentar des Anfragenden");
?>
:</b><br><br>
                    <?
                    if ($comment = $reqObj->getComment())
                        print $comment;
                    else
                        print _("Es wurde kein Kommentar eingegeben");
                    ?>
                    </font>
                </td>

            </tr>
            <tr>
                <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
                </td>
                <td class="<? echo $cssSw->getClass() ?>" width="35%" valign="top">

                    <?
                    $user_status_mkdate = $reqObj->getUserStatus($GLOBALS['user']->id);
                    ?>
                    <b><?php 
echo "Benachrichtigungen";
?>
:</b><br>
                    <input type="radio" onChange="jQuery(this).closest('form').submit()" name="reply_recipients" id="reply_recipients_requester" value="requester" checked>
                    <label for="reply_recipients_requester">
                    <?php 
echo _("Ersteller");
?>
                    </label>
                    <input type="radio" onChange="jQuery(this).closest('form').submit()" name="reply_recipients" id="reply_recipients_lecturer" value="lecturer" <?php 
echo $reqObj->reply_recipients == 'lecturer' ? 'checked' : '';
?>
>
                    <label for="reply_recipients_lecturer">
                    <?php 
echo _("Ersteller und alle Lehrenden");
?>
                    </label>
                    <br>
                    <b><?php 
echo "Anfrage markieren";
?>
:</b><br>
                    <input type="radio" onChange="jQuery(this).closest('form').submit()" name="request_user_status" id="request_user_status_0" value="0" checked>
                    <label for="request_user_status_0">
                    <?php 
echo _("unbearbeitet");
?>
                    </label>
                    <input type="radio" onChange="jQuery(this).closest('form').submit()" name="request_user_status" id="request_user_status_1" value="1" <?php 
echo $user_status_mkdate ? 'checked' : '';
?>
>
                    <label for="request_user_status_1">
                    <?php 
echo _("bearbeitet");
?>
                    </label>
                    <br><br>
                    <b><?php 
echo _("Kommentar zur Belegung (intern)");
?>
:</b><br><br>
                    <textarea name="comment_internal" style="width: 90%" rows="2"></textarea>
                </td>
            </tr>

            <tr>
                <td class="<? $cssSw->switchClass(); echo $cssSw->getClass() ?>" width="4%">&nbsp;
                </td>
                <td class="<? echo $cssSw->getClass() ?>" colspan="2" width="96%" valign="top" align="center">
                    <div class="button-group">
                <?
                // can we dec?
                if ($_SESSION['resources_data']["requests_working_pos"] > 0) {
                    $d = -1;
                    if ($_SESSION['resources_data']["skip_closed_requests"])
                        while ((!$_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $d]["request_id"]]) && ($_SESSION['resources_data']["requests_working_pos"] + $d > 0))
                            $d--;
                    if ((sizeof($_SESSION['resources_data']["requests_open"]) > 1) && (($_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $d]["request_id"]]) || (!$_SESSION['resources_data']["skip_closed_requests"])))
                        $inc_possible = TRUE;
                }


                if ($inc_possible) {
                    echo Button::create('<< ' . _('Zurück'), 'dec_request');
                }


                echo Button::createCancel(_('Abbrechen'), 'cancel_edit_request');
                echo Button::create(_('Löschen'), 'delete_request');

                if ((($reqObj->getResourceId()) || (sizeof($matching_rooms)) || (sizeof($clipped_rooms)) || (sizeof($grouped_rooms))) &&
                    ((is_array($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["groups"])) || ($_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"]]["assign_objects"]))) {
                    echo Button::createAccept(_('Speichern'), 'save_state');
                    echo Button::createCancel(_('Ablehnen'), 'suppose_decline_request');
                }

                // can we inc?
                if ($_SESSION['resources_data']["requests_working_pos"] < sizeof($_SESSION['resources_data']["requests_working_on"])-1) {
                    $i = 1;
                    if ($_SESSION['resources_data']["skip_closed_requests"])
                        while ((!$_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $i]["request_id"]]) && ($_SESSION['resources_data']["requests_working_pos"] + $i < sizeof($_SESSION['resources_data']["requests_working_on"])-1))
                            $i++;
                    if ((sizeof($_SESSION['resources_data']["requests_open"]) > 1) && (($_SESSION['resources_data']["requests_open"][$_SESSION['resources_data']["requests_working_on"][$_SESSION['resources_data']["requests_working_pos"] + $i]["request_id"]]) || (!$_SESSION['resources_data']["skip_closed_requests"])))
                        $dec_possible = TRUE;
                }

                if ($dec_possible) {
                    echo Button::create(_('Weiter') . ' >>', 'inc_request');
                }
                ?>
                    </div>

                <?
                if (sizeof($_SESSION['resources_data']["requests_open"]) > 1)
                    printf ("<br><font size=\"-1\">" . _("<b>%s</b> von <b>%s</b> Anfragen in der Bearbeitung wurden noch nicht aufgelöst.") . "</font>", sizeof($_SESSION['resources_data']["requests_open"]), sizeof($_SESSION['resources_data']["requests_working_on"]));
                    printf ("<br><font size=\"-1\">" . _("Aktueller Request: ")."<b>%s</b></font>", $_SESSION['resources_data']["requests_working_pos"]+1);
                ?>
                </td>
            </tr>
        </table>
        </form>
        <br><br>
        <?
    }
Esempio n. 6
0
echo $rule->getDistributionTime() ? date('d.m.Y', $rule->getDistributionTime()) : '';
?>
"/>
    &nbsp;&nbsp;
    <input type="time" name="distributiontime" id="distributiontime" size="4"
        value="<?php 
echo $rule->getDistributionTime() ? date('H:i', $rule->getDistributionTime()) : '23:59';
?>
"/>
</div>
<? if ($rule->isFCFSallowed()) : ?>
    <label for="enable_FCFS">
    <input <?php 
echo $rule->prio_exists ? 'disabled' : '';
?>
 type="checkbox" id="enable_FCFS"  name="enable_FCFS" value="1" <?php 
echo !is_null($rule->getDistributionTime()) && !$rule->getDistributionTime() ? "checked" : "";
?>
>
    <?php 
echo _("<u>Keine</u> automatische Platzverteilung (Windhund-Verfahren)");
?>
    <?php 
echo $rule->prio_exists ? tooltipicon(_("Es existieren bereits Anmeldungen für die automatische Platzverteilung.")) : '';
?>
    </label>
<? endif ?>
<script>
    $('#distributiondate').datepicker();
    $('#distributiontime').timepicker();
</script>
Esempio n. 7
0
">
                <?php 
echo $user['username'];
?>
            </a>
        </td>
        <td>
            <?
            $tooltxt = _("Sichtbarkeit:") . ' ' . $user['visible'];
            $tooltxt .= "\n" . _("Domänen:") . ' ' . $user['userdomains'];
            if ($user['locked'] == '1') {
                $tooltxt .= "\n" .  _("Nutzer ist gesperrt!");
            }
            ?>
           <?php 
echo tooltipicon($tooltxt);
?>
        </td>
        <td>
            <?php 
echo $user['perms'];
?>
        </td>
        <td>
            <?php 
echo htmlReady($user['Vorname']);
?>
        </td>
        <td>
            <?php 
echo htmlReady($user['Nachname']);
Esempio n. 8
0
?>
 -- </option>
                            <? Statusgruppe::displayOptionsForRoles($all_roles); ?>
                        </select>
                    </td>
                </tr>
                <? endif; ?>

                <tr>
                    <td>
                        <?php 
echo _("Gruppengröße");
?>
:
                        <?php 
echo tooltipicon(_("Mit dem Feld 'Gruppengröße' haben Sie die Möglichkeit, die Sollstärke für eine Gruppe festzulegen. Dieser Wert ist nur aus Teilnehmersicht relevant - verantwortliche Personen (Tutoren, Lehrende) können auch mehr Gruppenmitglieder eintragen."));
?>
                    </td>
                    <td>
                        <input type="text" name="new_size" value="<?php 
echo $role_data['size'];
?>
">
                    </td>
                </tr>

                <? if ($range_type == 'sem') : ?>
                <tr>
                    <td>
                        <?php 
echo _("Selbsteintrag");
Esempio n. 9
0
echo $option;
?>
</option>
                        <? endforeach; ?>
                    </select>
                    <? if ($calendar->getPermissionByUser($GLOBALS['user']->id) == Calendar::PERMISSION_OWN) : ?>
                    <? $info = _('Private und vertrauliche Termine sind nur für Sie sichtbar. Öffentliche Termine werden auf ihrer internen Homepage auch anderen Nutzern bekanntgegeben.') ?>
                    <? elseif ($calendar->getRange() == Calendar::RANGE_SEM) : ?>
                    <? $info = _('In Veranstaltungskalendern können nur private Termine angelegt werden.') ?>
                    <? elseif ($calendar->getRange() == Calendar::RANGE_INST) : ?>
                    <? $info = _('In Einrichtungskalendern können nur private Termine angelegt werden.') ?>
                    <? else : ?>
                    <? $info = _('Im Kalender eines anderen Nutzers können Sie nur private oder vertrauliche Termine einstellen. Vertrauliche Termine sind nur für Sie und den Kalenderbesitzer sichtbar. Alle anderen sehen den Termin nur als Besetztzeit.') ?>
                    <? endif; ?>
                    <?php 
echo tooltipicon($info);
?>
                </td>
            </tr>
            <tr>
                <td>
                    <label for="priority">
                        <?php 
echo _('Priorität');
?>
:
                    </label>
                </td>
                <td colspan="2">
                    <? $priority_names = array(_('keine Angabe'), _('hoch'), _('mittel'), _('niedrig')) ?>
                    <select name="priority" id="priority" size="1">
 function getInfoIcon($item_id)
 {
     if (is_object($this->studienmodulmanagement) && $this->tree->isModuleItem($item_id)) {
         $nav = $this->studienmodulmanagement->getModuleInfoNavigation($item_id, SemesterData::GetSemesterIdByIndex($this->tree->sem_number[0]));
         if ($nav->isVisible(true)) {
             $ret = '<a class="module-info" href="' . URLHelper::getLink($nav->getURL()) . '">';
             $ret .= $nav->getImage()->asImg($nav->getLinkAttributes());
             $ret .= '<span>' . htmlready($nav->getTitle()) . '</span>';
             $ret .= '</a>';
         }
     } else {
         if ($item_id == "root") {
             $info = $this->root_content ? $this->root_content : _("Keine weitere Info vorhanden");
         } else {
             $info = $this->tree->getValue($item_id, 'info') ? $this->tree->getValue($item_id, 'info') : _("Keine weitere Info vorhanden");
         }
         $ret = tooltipicon(kill_format($info));
     }
     return $ret;
 }