コード例 #1
0
ファイル: user_activities.php プロジェクト: ratbird/hope
/**
 * 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();
}
コード例 #2
0
ファイル: evaluate_values.php プロジェクト: ratbird/hope
        if ($reqObj->getTerminId()) {
            $termin = new SingleDate($reqObj->getTerminId());
            $message .= "\n\n". _("Betroffener Termin:") . "\n" . $termin->toString();
        }

        if ($reqObj->getMetadateId()) {
            $cycle = SeminarCycleDate::find($reqObj->getMetadateId());
            $message .= "\n\n". _("Betroffene Zeit:") . "\n" . $cycle->toString('full');
        }
        // fetch the names of the lecutrers to display them in the message
        foreach($semObj->getMembers('dozent') as $dozenten){
            $title[] = $dozenten['Nachname'];
        }
        if($semObj->seminar_number) $title[] = $semObj->seminar_number;
        $title[] = mila($semObj->getName(),30);

        $reqObj->setReplyComment($decline_message);
        $reqObj->store();
        foreach ($users as $userid) {
            setTempLanguage($userid);
            $messaging->insert_message($message, get_username($userid), $user->id, FALSE, FALSE, FALSE, FALSE,
                _("Raumanfrage abgelehnt:") .' '. implode(', ', $title), TRUE, 'high');
            restoreLanguage();
        }
    }

    // the room-request has been resolved
    else {

        // create appropriate message
コード例 #3
0
ファイル: calendar_visual.inc.php プロジェクト: ratbird/hope
function js_hover(Event $aterm)
{
    global $user;

    $jscript_text = '<b>' . _("Zusammenfassung:") . ' </b>'
            . htmlReady($aterm->getTitle()) . '<hr>';

    if ($aterm instanceof SeminarEvent || $aterm instanceof SeminarCalendarEvent) {
        $jscript_text .= '<b>' . _("Veranstaltung:") . ' </b> '
                . htmlReady($aterm->getSemName()) . '<br>';
    }
    if ($aterm->getDescription()) {
        $jscript_text .= '<b>' . _("Beschreibung:") . ' </b> '
                . htmlReady(mila($aterm->getDescription(), 300)) . '<br>';
    }
    if ($categories = $aterm->toStringCategories()) {
        $jscript_text .= '<b>' . _("Kategorie:") . ' </b> '
                . htmlReady($categories) . '<br>';
    }
    if ($aterm->getLocation()) {
        $jscript_text .= '<b>' . _("Ort:") . ' </b> '
                . htmlReady($aterm->getLocation()) . '<br>';
    }
    if (!($aterm instanceof SeminarEvent)) {
        if ($aterm->toStringPriority()) {
            $jscript_text .= '<b>' . _("Priorität:") . ' </b>'
                    . htmlReady($aterm->toStringPriority()) . '<br>';
        }
        $jscript_text .= '<b>' . _("Zugriff:") . ' </b>'
                . htmlReady($aterm->toStringAccessibility()) . '<br>';
        $jscript_text .= '<b>' . _("Wiederholung:") . ' </b>'
                . htmlReady($aterm->toStringRecurrence()) . '<br>';
        
        if (get_config('CALENDAR_GROUP_ENABLE')) {
            $jscript_text .= sprintf(_('<span style="font-weight: bold;">Eingetragen am:</span> %s von %s'),
                strftime('%x, %X', $aterm->getMakeDate()),
                    htmlReady(get_fullname($aterm->getAuthorId(), 'no_title')))
                . '<br>';
            if ($aterm->getMakeDate() < $aterm->getChangeDate()) {
                $jscript_text .= sprintf(_('<span style="font-weight: bold;">Zuletzt bearbeitet am:</span> %s von %s'),
                    strftime('%x, %X', $aterm->getChangeDate()),
                        htmlReady(get_fullname($aterm->getEditorId(), 'no_title')))
                    . '<br>';
            }
        } else {
            $jscript_text .= sprintf(_('<span style="font-weight: bold;">Eingetragen am:</span> %s'),
                    strftime('%x, %X', $aterm->getMakeDate())) . '<br>';
            if ($aterm->getMakeDate() < $aterm->getChangeDate()) {
                $jscript_text .= sprintf(_('<span style="font-weight: bold;">Zuletzt bearbeitet am:</span> %s'),
                    strftime('%x, %X', $aterm->getChangeDate())) . '<br>';
            }
        }
    } else {
        // related groups
        $related_groups = $aterm->getRelatedGroups();
        if (sizeof($related_groups)) {
            $jscript_text .= '<b>' . _("Betroffene Gruppen:") . ' </b>'
                    . htmlReady(implode(', ', array_map(
                            function ($group) { return $group->name; },
                            $related_groups))) . '<br>';
        }
    }
    
    $jscript_text .= '<br>';

    return " onmouseover=\"STUDIP.CalendarDialog.openCalendarHover('" . JSReady($aterm->toStringDate('SHORT_DAY'), 'inline-single') . "', '" . JSReady($jscript_text, 'inline-single') . "', this);\" onmouseout=\"STUDIP.CalendarDialog.closeCalendarHover();\"";
}
コード例 #4
0
echo CSRFProtection::tokenTag();
?>
<table class="default">
    <thead>
        <tr>
            <th class="topic" colspan="2"><?php 
echo sprintf(_('Folgende %s konnten <b>nicht eindeutig</b> zugewiesen werden. Bitte wählen Sie aus der jeweiligen Trefferliste:'), htmlReady($status_groups['autor']));
?>
</th>
        </tr>
    </thead>
    <tbody>
        <? foreach($flash['csv_mult_founds'] as $name => $csv_mult_found) : ?>
        <tr>
            <td style="width: 40%"><?php 
echo htmlReady(mila($name, 50));
?>
</td>
            <td>
                <select name="selected_users[]">
                    <option value="---">--<?php 
echo _('bitte auswählen');
?>
 --</option>
                    <? foreach ($csv_mult_found as $csv_found) : ?>
                        <? if ($csv_found['is_present']) : ?>
                            <? continue ?>
                        <? endif?>
                        <option value="<?php 
echo $csv_found['username'];
?>
コード例 #5
0
ファイル: edit_news.php プロジェクト: ratbird/hope
?>
');">
                                        <?php 
echo htmlReady($area_data['title']);
?>
                                    </option>
                                    <? foreach ($area_options_selected[$area_key] as $area_option_key => $area_option_title) : ?>
                                        <option <?php 
echo (StudipNews::haveRangePermission('edit', $area_option_key) or $may_delete) ? 'value="' . $area_option_key . '"' : 'disabled';
?>
                                                <?php 
echo tooltip($area_option_title);
?>
>
                                            <?php 
echo htmlReady(mila($area_option_title));
?>
                                        </option>
                                    <? endforeach ?>
                                <? endif ?>
                            <? endforeach ?>
                            </select>
                            </label>
                        </div>
                    </td>
                </tr>
            </tbody>
            </table>
        </div>
    </div>
    <br>
コード例 #6
0
ファイル: contentbox.php プロジェクト: ratbird/hope
 private function parseUser($id)
 {
     $restrictions = $GLOBALS['user']->id == $id ? array() : array('CLASS' => 'PUBLIC');
     $events = SingleCalendar::getEventList($id, $this->start, $this->start + $this->timespan, null, $restrictions);
     // Prepare termine
     $this->termine = array();
     foreach ($events as $termin) {
         // Adjust title
         if (date("Ymd", $termin->getStart()) == date("Ymd", time())) {
             $title = _("Heute") . date(", H:i", $termin->getStart());
         } else {
             $title = substr(strftime("%a", $termin->getStart()), 0, 2);
             $title .= date(". d.m.Y, H:i", $termin->getStart());
         }
         if ($termin->getStart() < $termin->getEnd()) {
             if (date("Ymd", $termin->getStart()) < date("Ymd", $termin->getEnd())) {
                 $title .= " - " . substr(strftime("%a", $termin->getEnd()), 0, 2);
                 $title .= date(". d.m.Y, H:i", $termin->getEnd());
             } else {
                 $title .= " - " . date("H:i", $termin->getEnd());
             }
         }
         if ($termin->getTitle()) {
             $tmp_titel = htmlReady(mila($termin->getTitle()));
             //Beschneiden des Titels
             $title .= ", " . $tmp_titel;
         }
         // Store for view
         $this->termine[] = array('id' => $termin->id, 'type' => get_class($termin), 'range_id' => $termin->range_id, 'event_id' => $termin->event_id, 'chdate' => $termin->chdate, 'title' => $title, 'description' => $termin->getDescription(), 'room' => $termin->getLocation(), 'info' => array(_('Kategorie') => $termin->toStringCategories(), _('Priorität') => $termin->toStringPriority(), _('Sichtbarkeit') => $termin->toStringAccessibility(), _('Wiederholung') => $termin->toStringRecurrence()));
     }
 }
コード例 #7
0
ファイル: _tooltip.php プロジェクト: ratbird/hope
            <div>
                <b><?php 
echo _('Priorität');
?>
:</b> <?php 
echo htmlReady(mila($text, 50));
?>
            </div>
        <? endif; ?>
        <? if ($text = $event->toStringAccessibility()) : ?>
            <div>
                <b><?php 
echo _('Zugriff');
?>
:</b> <?php 
echo htmlReady(mila($text, 50));
?>
            </div>
        <? endif; ?>
    <? endif; ?>
    <? if ($text = $event->toStringRecurrence()) : ?>
        <div>
            <b><?php 
echo _('Wiederholung');
?>
:</b> <?php 
echo htmlReady($text);
?>
        </div>
    <? endif; ?>
    <? if ($event->havePermission(Event::PERMISSION_READABLE)) : ?>
コード例 #8
0
ファイル: _message_row.php プロジェクト: ratbird/hope
"></td>
    <td><?php 
echo $message->getNumAttachments() ? Icon::create('staple', 'info', ["title" => _("Mit Anhang")])->asImg(20) : "";
?>
</td>
    <td><?php 
echo $message->originator->answered ? Icon::create('outbox', 'info', ["title" => _("Beantwortet")])->asImg(20) : "";
?>
</td>
    <td class="title">
        <a href="<?php 
echo URLHelper::getLink("dispatch.php/messages/read/" . $message->getId());
?>
" data-dialog>
            <?php 
echo $message['subject'] ? htmlReady($message['subject']) : htmlReady(mila($message['message'], 40));
?>
        </a>
    </td>
    <td>
    <? if ($message['autor_id'] == "____%system%____") : ?>
        <?php 
echo _("Systemnachricht");
?>
    <? else : if(!$received): ?>
        <? $num_recipients = $message->getNumRecipients() ?>
        <? if ($num_recipients > 1) : ?>
            <?php 
echo sprintf(_("%s Personen"), $num_recipients);
?>
        <? else : ?>
コード例 #9
0
ファイル: datei.inc.php プロジェクト: ratbird/hope
/**
 * Displays the folder and all of its documents and recursively subfolders.
 * This function is not dependent on the recursive-level so it looks as if it all starts from here.
 *
 */
function display_folder ($folder_id, $open, $change, $move, $upload, $refresh=FALSE, $filelink="", $anchor_id, $position="middle", $isissuefolder = false) {
    global $_fullname_sql,$SessionSeminar,$SessSemName, $rechte, $anfang,
        $user, $SemSecLevelWrite, $SemUserStatus, $check_all, $countfolder, $droppable_folder;
    $option = true;
    $countfolder++;
    $more = true;
    $db = DBManager::get();
    $droppable_folder++;
    $javascriptok = true;
    //Einbinden einer Klasse, die Informationen über den ganzen Baum enthält
    $folder_tree = TreeAbstract::GetInstance('StudipDocumentTree', array('range_id' => $SessionSeminar));

    //Hole alle Informationen, die es über $folder_id gibt
    $query = "SELECT ". $_fullname_sql['full'] ." AS fullname , username, folder_id, a.range_id, a.user_id, name, a.description, a.mkdate, a.chdate FROM folder a LEFT JOIN auth_user_md5 USING (user_id) LEFT JOIN user_info USING (user_id) WHERE a.folder_id = '$folder_id' ORDER BY a.name, a.chdate";
    $result = $db->query($query)->fetch();

    $depth = count($folder_tree->getParents($folder_id));
    print "<div id=\"folder_".($depth > 2 ? $result['range_id'] : "root")."_".$countfolder."\"".($rechte ? " class=\"draggable_folder\"" : "").">";
    print "<div style=\"display:none\" id=\"getmd5_fo".$result['range_id']."_".$countfolder."\">".$folder_id."</div>";
    print "<table cellpadding=0 border=0 cellspacing=0 width=\"100%\"><tr>";

    //Abzweigung, wenn Ordner ein Unterordner ist
    if ($depth > 2) // root > folder > subfolder
        print "<td class=\"tree-elbow-end\">" . Assets::img("datatree_2.gif") . "</td>";
    else
        print "<td></td>";
    print "<td valign=\"bottom\">";

    //Farbe des Pfeils bestimmen:
    $chdate = (($result["chdate"]) ? $result["chdate"] : $result["mkdate"]);
    if (object_get_visit($SessSemName[1], "documents") < $chdate)
        $neuer_ordner = TRUE;
    else
        $neuer_ordner = FALSE;
    if ($neuer_ordner == TRUE)
        $timecolor = "#FF0000";
    else {
        $timediff = (int) log((time() - doc_newest($folder_id)) / 86400 + 1) * 15;
        if ($timediff >= 68)
            $timediff = 68;
        $red = dechex(255 - $timediff);
        $other = dechex(119 + $timediff);
        $timecolor= "#" . $red . $other . $other;
    }

    //Jetzt fängt eine zweite Tabelle an mit den Zeilen: Titel, Beschreibung und Knöpfe, Unterdateien und Unterordner
    if ($rechte) {
        print "<div class=\"droppable handle\" id=\"dropfolder_$folder_id\">";
    }
    print "<table cellpadding=0 border=0 cellspacing=0 width=\"100%\" id=\"droppable_folder_$droppable_folder\"><tr>";

    // -> Pfeile zum Verschieben (bzw. die Ziehfläche)
    if (($rechte) && ($depth > 2)) {
        $bewegeflaeche = "<span class=\"updown_marker\" id=\"pfeile_".$folder_id."\">";
        if (($position == "middle") || ($position == "bottom")) {
            $bewegeflaeche .= "<a href=\"".URLHelper::getLink('?open='.$folder_id)."_mfou_\" title=\""._("Nach oben verschieben").
                    "\">" . Icon::create('arr_2up', 'sort')->asImg(['class' => 'text-top']) . "</a>";
        }
        if (($position == "middle") || ($position == "top")) {
            $bewegeflaeche .= "<a href=\"".URLHelper::getLink('?open='.
                    $folder_id)."_mfod_\" title=\""._("Nach unten verschieben").
                    "\">" . Icon::create('arr_2down', 'sort')->asImg(['class' => 'text-top']) . "</a>";
        }
        $bewegeflaeche .= "</span>";
    }

    //Jetzt folgt der Link zum Aufklappen
    if ($open[$folder_id]) {
        //print "<td width=1px class=\"printhead\">&nbsp;</td>";
        print "<td id=\"folder_".$folder_id."_arrow_td\" nowrap valign=\"top\" align=\"left\" width=1% bgcolor=\"$timecolor\" class=\"printhead3\" valign=\"bottom\">";
        print "<a href=\"".URLHelper::getLink("?close=".$folder_id."#anker");
        print "\" class=\"tree\" onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\">";
        print Assets::img('forumgraurunt2.png', tooltip2(_('Objekt zuklappen')) + array('id' => 'folder_' . $folder_id . '_arrow_img'));
        print "</a>";
        print "</td>";
        //print ($javascriptok ? "<td class=\"printhead\"><a href=\"Javascript: changefolderbody('".$folder_id."')\" class=\"tree\"><span id=\"folder_".$folder_id."_header\" style=\"font-weight: bold\">" :
        print "<td class=\"printhead\" valign=\"bottom\">";
        if ($move && ($move != $folder_id) && $folder_tree->isWritable($folder_id, $user->id) && (!$folder_tree->isFolder($move) || ($folder_tree->checkCreateFolder($folder_id, $user->id) && !$folder_tree->isExerciseFolder($folder_id, $user->id)))){
                print "<a href=\"".URLHelper::getLink("?open=".$folder_id."_md_")."\">";
                print Icon::create('arr_2right', 'sort')->asImg();
                print "</a>&nbsp;";
        }
        if (($anchor_id == $folder_id) || (($move == $folder_id))) {
            print "<a name=\"anker\"></a>";
        }
        print "<a href=\"".URLHelper::getLink("?close=".$folder_id."#anker")."\" class=\"tree\" onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\"><span id=\"folder_".$folder_id."_header\" style=\"font-weight: bold\">";
    } else {
        //print "<td width=1px class=\"printhead\">&nbsp;</td>";
        print "<td id=\"folder_".$folder_id."_arrow_td\" nowrap valign=\"top\" align=\"left\" width=1% bgcolor=\"$timecolor\" class=\"printhead2\" valign=\"bottom\">";
        print "<a href=\"";
        print URLHelper::getLink("?open=".$folder_id."#anker");
        print "\" class=\"tree\" onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\">";
        print Assets::img('forumgrau2.png', tooltip2(_('Objekt aufklappen')) + array('id' => 'folder_' . $folder_id . '_arrow_img'));
        print "</a></td>";
        print "<td class=\"printhead\" valign=\"bottom\">";
        if ($move && ($move != $folder_id) && $folder_tree->isWritable($folder_id, $user->id) && (!$folder_tree->isFolder($move) || ($folder_tree->checkCreateFolder($folder_id, $user->id) && !$folder_tree->isExerciseFolder($folder_id, $user->id)))){
            print "&nbsp;<a href=\"".URLHelper::getLink("?open=".$folder_id."_md_")."\">";
            print Icon::create('arr_2right', 'sort')->asImg();
            print "</a>&nbsp";
        }
        print "<a href=\"".URLHelper::getLink("?open=".$folder_id."#anker")."\" class=\"tree\" " .
                "onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\"><span id=\"folder_".$folder_id."_header\" " .
                "style=\"font-weight: normal\">";
    }

    $document_count = doc_count($folder_id);

    if ($document_count > 0) {
        print Icon::create('folder-full', 'clickable')->asImg() . '&nbsp;';
    } else {
        print Icon::create('folder-empty', 'clickable')->asImg() . '&nbsp;';
    }

    //Pfeile, wenn Datei bewegt werden soll
    if ($move && ($folder_id != $move) && $folder_tree->isWritable($folder_id, $user->id) && (!$folder_tree->isFolder($move) || ($folder_tree->checkCreateFolder($folder_id, $user->id) && !$folder_tree->isExerciseFolder($folder_id, $user->id)))){
        print "</a><span class=\"move_arrows\"><a href=\"".URLHelper::getLink("?open=".$folder_id."_md_")."\">";
        print Icon::create('arr_2right', 'sort')->asImg();
        print "</a></span>";
        if ($open[$folder_id])
            print "<a href=\"".URLHelper::getLink("?close=".$folder_id."#anker")."\" class=\"tree\" onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\">";
        else
            print "<a href=\"".URLHelper::getLink("?open=".$folder_id."#anker")."\" class=\"tree\" onClick=\"return STUDIP.Filesystem.changefolderbody('".$folder_id."')\">";
    }

    //Dateiname, Rechte und Dokumente anzeigen
    $tmp_titel = htmlReady(mila($result['name']));
    if ($isissuefolder) {
        $issue_id = $db->query("SELECT range_id FROM folder WHERE folder_id = ".$db->quote($folder_id))->fetch();
        $dates_for_issue = IssueDB::getDatesforIssue($issue_id['range_id']);
        $dates_title = array();
        foreach ($dates_for_issue as $date) {
            $dates_title[] .= date('d.m.y, H:i', $date['date']).' - '.date('H:i', $date['end_time']);
        }

        if (!empty($dates_title)) {
            $tmp_titel = sprintf(_("Sitzung am: %s"), implode(', ', $dates_title)) .
                 ", " . ($tmp_titel ? $tmp_titel : _("Ohne Titel"));
        } else {
            $tmp_titel = $tmp_titel ? $tmp_titel : _("Ohne Titel");
        }
    }

    if (($change == $folder_id)
            && (!$isissuefolder)
            && ((count($folder_tree->getParents($folder_id)) > 1)
             || $result['range_id'] == md5($SessSemName[1] . 'top_folder')
             || $folder_tree->isGroupFolder($result['folder_id'])
             )
            ) { //Aenderungsmodus, Anker + Formular machen, Font tag direkt ausgeben (muss ausserhalb einer td stehen!
        $titel= "</a><input style=\"font-size:8 pt; width: 400px;\" type=\"text\" size=\"20\" maxlength=\"255\" aria-label=\"Ordnername eingeben\" name=\"change_name\" value=\"".htmlReady($result['name'])."\" >";
        if ($rechte && $folder_tree->permissions_activated)
            $titel .= '&nbsp;['.$folder_tree->getPermissionString($result["folder_id"]).']';
    }   else {
        //create a link onto the titel, too
        if ($rechte && $folder_tree->permissions_activated ) {
            $tmp_titel .= '&nbsp;';
            $tmp_titel .= '['.$folder_tree->getPermissionString($result["folder_id"]).']';
        }
        if ($document_count > 1)
            $titel= $tmp_titel."</span>&nbsp;&nbsp;" . sprintf(_("(%s Dokumente)"), $document_count);
        elseif ($document_count)
            $titel= $tmp_titel."</span>&nbsp;&nbsp;" . _("(1 Dokument)");
        else
            $titel= $tmp_titel;
    }
    print $titel;

    if ($isissuefolder) {
        $dates_title = array();
        foreach ($dates_for_issue as $date) {
            $dates_title[] .= date('d.m.y, H:i', $date['date']).' - '.date('H:i', $date['end_time']);
        }
        if (sizeof($dates_title) > 0) {
            $title_name = sprintf(_("Sitzung am: %s"), implode(', ', $dates_title));
            if (!$result['name']) {
                $title_name .= ', '._("Ohne Titel");
            } else {
                $title_name .= ', '.htmlReady($result['name']);
            }
        }
    }

    print "</a>&nbsp;";

    // Schloss, wenn Folder gelockt
    if ($folder_tree->isLockedFolder($folder_id)) {
        print Icon::create('lock-locked', 'inactive', ['title' => _('Dieser Ordner ist gesperrt.')])->asImg(['class' => 'text-bottom']);
    }
    //Wenn verdeckt durch gesperrten übergeordneten Ordner
    else if ( ($super_folder = $folder_tree->getNextSuperFolder($folder_id)) ) {
        print Icon::create('lock-locked', 'inactive', ['title' => _('Dieser Ordner ist nicht zugänglich, da ein übergeordneter Ordner gesperrt ist.')])->asImg(['class' => 'text-bottom']);
    }
    // Wenn es ein Hausaufgabenordner ist
    if ($folder_tree->isExerciseFolder($folder_id)) {
        print Icon::create('edit', 'inactive', ['title' => _('Dieser Ordner ist ein Hausaufgabenordner. Es können nur Dateien eingestellt werden.')])->asImg(['class' => 'text-bottom']);
    }

    print "</td>";

    //So und jetzt die rechtsbündigen Sachen:
    print "</td><td align=right class=\"printhead\" valign=\"bottom\">";

    print "<a href=\"".URLHelper::getLink('dispatch.php/profile?username='******'username'])."\">".htmlReady($result['fullname'])."</a> ";

    print $bewegeflaeche." ";

    //Workaround for older data from previous versions (chdate is 0)
    print date("d.m.Y - H:i", (($result["chdate"]) ? $result["chdate"] : $result["mkdate"]));

    print "</td></tr></table>"; //Ende des Titels, Beschreibung und Knöpfen
    if ($rechte)
        print "</div>";  //End des Droppable-Divs

    if ($open[$folder_id]) {
        print "<div id=\"folder_".$folder_id."_body\">";
        //Der ganze Teil des Unterbaus wurde in die folgende Funktion outsourced:
        display_folder_body($folder_id, $open, $change, $move, $upload, $refresh, $filelink, $anchor_id, $depth - 3);
    } else {
        print "<div id=\"folder_".$folder_id."_body\" style=\"display: none\">";
    }
    print "</div></td></tr></table>";
    print "</div>";
}
コード例 #10
0
ファイル: index.php プロジェクト: ratbird/hope
            <td><?php 
echo htmlReady($banner['description']);
?>
</td>
            <td><?php 
echo $banner['target_type'];
?>
</td>
            <td>
                <? if ($banner['target_type'] == 'seminar'): ?>
                    <?php 
echo mila(reset(get_object_name($banner['target'], 'sem')), 30);
?>
                <? elseif ($banner['target_type'] == 'inst') :?>
                    <?php 
echo mila(reset(get_object_name($banner['target'], 'inst')), 30);
?>
                <? else: ?>
                    <?php 
echo $banner['target'];
?>
                <? endif; ?>
            </td>
            <td style="text-align: center;">
                <?php 
echo $banner['startdate'] ? date("d.m.Y", $banner['startdate']) : _("sofort");
?>
<br>
                <?php 
echo _("bis");
?>
コード例 #11
0
ファイル: admin_news.php プロジェクト: ratbird/hope
                            <th><?php 
echo _("Aktion");
?>
</th>
                        </tr>
                        </thead>
                        <tbody>
                        <? foreach ($news_items[$type] as $news) : ?>
                            <? $title = $news['title'] ?>
                            <? if ($title != $last_title) : ?>
                                <? if ($last_title != 'none') : ?>
                                <? endif ?>
                                <? if ($title) : ?>
                                    <tr>
                                        <th colspan="6"><?php 
echo mila(htmlReady($news['title'])) . ' ' . htmlReady($news['semester']);
?>
</th>
                                    </tr>
                                <? endif ?>
                                <? $last_title = $title ?>
                            <? endif ?>
                            <tr>
                                <td>
                                    <input type="CHECKBOX" name="mark_news[]" value="<?php 
echo $news['object']->news_id . '_' . $news['range_id'];
?>
" aria-label="<?php 
echo _('Diese Ankündigung zum Entfernen vormerken');
?>
" <?php