Пример #1
0
function outTableInternLink(&$session, $prefix, $link, $text = null, $module = null, $halignment = AL_None)
{
    if ($prefix != null) {
        outTableCell($prefix);
    }
    outTableDelim($halignment);
    guiInternLink($session, $link, $text, $module);
    echo TAG_TABLE_DELIM_END;
}
Пример #2
0
function baseSearch(&$session, $message)
{
    $session->trace(TC_Gui1, 'baseSearch');
    if (!isset($_POST['search_bodytext']) && isset($_POST['search_titletext'])) {
        $_POST['search_bodytext'] = $_POST['search_titletext'];
    }
    getUserParam($session, U_MaxHits, $_POST['search_maxhits']);
    guiStandardHeader($session, 'Suchen auf den Wiki-Seiten', Th_SearchHeader, Th_SearchBodyStart);
    if (isset($_POST['search_title']) || isset($_POST['search_body'])) {
        baseSearchResults($session);
    }
    guiStartForm($session);
    outTableAndRecord();
    outTableCell('Titel:');
    outTableDelim();
    outTextField($session, 'search_titletext', null, 32, 64);
    echo " ";
    outButton($session, 'search_title', "Suchen");
    outTableDelimAndRecordEnd();
    outTableRecord();
    outTableCell('Beitrag:');
    outTableDelim();
    outTextField($session, 'search_bodytext', null, 32, 64);
    echo " ";
    outButton($session, 'search_body', 'Suchen');
    outTableDelimAndRecordEnd();
    outTableTextField($session, 'Maximale Trefferzahl:', 'search_maxhits', null, 10, 10);
    outTableAndRecordEnd();
    guiFinishForm($session, $session);
    outParagraph($session);
    outStrong('Hinweis:');
    outNewline();
    echo 'Vorläufig nur ein Suchbegriff möglich.';
    outNewline();
    echo 'Joker (Wildcards) sind % (beliebig) und _ (1 Zeichen).';
    outNewline();
    outStrong('Bsp:');
    outNewline();
    outQuotation('a_t ');
    echo ' findet "Kin';
    outStrong('ast');
    echo '" und "';
    outStrong('Amt');
    echo 'sperson", aber nicht "h';
    outStrong('a');
    echo 's';
    outStrong('st');
    echo '"';
    outNewline();
    outQuotation('Hilfe%format');
    echo ' findet ';
    outStrong('Hilfe');
    echo 'Bei';
    outStrong('Format');
    echo 'ierung und "';
    outStrong('Hilfe');
    echo ' für ein Datei';
    outStrong('format');
    echo '".', outParagraphEnd($session);
    guiStandardBodyEnd($session, Th_SearchBodyEnd);
}
Пример #3
0
function addressEditCard(&$session, $message = null, $card_id = null)
{
    $session->trace(TC_Gui1, 'addressEditCard');
    if (!isset($_POST['card_id']) || empty($_POST['card_id'])) {
        $session->trace(TC_X, 'addressEditCard-2');
        if ($card_id == null) {
            $card_id = dbGetValueByClause($session, Tab_Card, 'min(id)', '1');
        }
        list($books, $firstname, $lastname, $nickname, $emailprivate, $emailprivate2, $phoneprivate, $phoneprivate2, $faxprivate, $mobileprivate, $emailoffice, $emailoffice2, $phoneoffice, $phoneoffice2, $faxoffice, $mobileoffice, $street, $country, $zip, $city, $functions, $notes) = dbGetRecordById($session, Tab_Card, $card_id, 'books,firstname, lastname, nickname, ' . 'emailprivate, emailprivate2, phoneprivate, phoneprivate2, faxprivate, mobileprivate, ' . 'emailoffice, emailoffice2, phoneoffice, phoneoffice2, faxoffice, mobileoffice, ' . 'street, country, zip, city, ' . 'functions, notes');
    } else {
        $session->trace(TC_Gui1, 'addressEditCard-3: ' . $_POST['card_books']);
        $books = $_POST['card_books'];
        $firstname = $_POST['card_firstname'];
        $lastname = $_POST['card_lastname'];
        $nickname = $_POST['card_nickname'];
        $emailprivate = $_POST['card_emailprivate'];
        $emailprivate2 = $_POST['card_emailprivate2'];
        $phoneprivate = $_POST['card_phoneprivate'];
        $phoneprivate2 = $_POST['card_phoneprivate2'];
        $faxprivate = $_POST['card_faxprivate'];
        $mobileprivate = $_POST['card_mobileprivate'];
        $emailoffice = $_POST['card_emailoffice'];
        $emailoffice2 = $_POST['card_emailoffice2'];
        $phoneoffice = $_POST['card_phoneoffice'];
        $phoneoffice2 = $_POST['card_phoneoffice2'];
        $faxoffice = $_POST['card_faxoffice'];
        $mobileoffice = $_POST['card_mobileoffice'];
        $street = $_POST['card_street'];
        $country = $_POST['card_country'];
        $zip = $_POST['card_zip'];
        $city = $_POST['card_city'];
        $functions = $_POST['card_functions'];
        $notes = $_POST['card_notes'];
        $card_id = $_POST['card_id'];
    }
    guiStandardHeader($session, 'Ändern einer Adresskarte ', Th_AddressHeader, Th_AddressBodyStart);
    $ids = preg_split('/[ ,]+/', $books);
    $books = '';
    foreach ($ids as $ii => $id) {
        $books .= dbSingleValue($session, 'select name from ' . dbTable($session, Tab_Book) . " where id=" . (0 + $id)) . ($ii < count($ids) - 1 ? ',' : '');
        $session->trace(TC_Gui1, 'addressEditCard-4: ' . $id . "/" . $books);
    }
    if (isset($search_title) || isset($search_body)) {
        baseSearchResults($session);
    }
    if ($message != null) {
        guiParagraph($session, $message, false);
    }
    guiStartForm($session);
    outHiddenField($session, 'card_id', $card_id);
    outTable(0);
    outTableRecordCells('Id:', $card_id);
    outTableRecord();
    outTableTextField($session, 'Adressbücher:', 'card_books', $books, 34, 0);
    outTableRecordDelim();
    outTableTextField2($session, 'Vor-, Nachname:', 'card_firstname', $firstname, 16, 64, ' ', 'card_lastname', $lastname, 16, 64);
    outTableRecordEnd();
    outTableTextField($session, 'Spitzname:', 'card_nickname', $nickname, 16, 64);
    outTableRecordEnd();
    outTableRecordCells('Privat', ' ');
    outTableRecord();
    outTableTextField2($session, 'EMail EMail2:', 'card_emailprivate', $emailprivate, 34, 128, ' ', 'card_emailprivate2', $emailprivate2, 34, 128);
    outTableRecordDelim();
    outTableTextField2($session, 'Telefon Telefon2:', 'card_phoneprivate', $phoneprivate, 34, 128, ' ', 'card_phoneprivate2', $phoneprivate2, 34, 128);
    outTableRecordDelim();
    outTableTextField2($session, 'Mobil Fax:', 'card_mobileprivate', $mobileprivate, 34, 128, ' ', 'card_faxprivate', $faxprivate, 34, 128);
    outTableRecordDelim();
    outTableCell('Land PLZ Ort Straße:');
    outTableDelim();
    outTextField($session, 'card_country', $country, 3, 64);
    echo ' ';
    outTextField($session, 'card_zip', $zip, 5, 12);
    echo ' ';
    outTextField($session, 'card_city', $city, 22, 64);
    echo ' ';
    outTextField($session, 'card_street', $street, 34, 128);
    outTableDelimAndRecordEnd();
    outTableRecordCells('Geschäftlich:', ' ');
    outTableRecord();
    outTableTextField2($session, 'EMail: EMail2:', 'card_emailoffice', $emailoffice, 34, 128, ' ', 'card_emailoffice2', $emailoffice2, 34, 128);
    outTableRecordDelim();
    outTableTextField2($session, 'Telefon Telefon2:', 'card_phoneoffice', $phoneoffice, 34, 128, ' ', 'card_phoneoffice2', $phoneoffice2, 34, 128);
    outTableRecordDelim();
    outTableTextField2($session, 'Mobil Fax:', 'card_mobileoffice', $mobileoffice, 34, 128, ' ', 'card_faxoffice', $faxoffice, 34, 128);
    outTableRecordDelim();
    outTableTextField($session, 'Funktionen', 'card_functions', $functions, 34, 128);
    outTableRecordDelim();
    outTableTextArea($session, 'Bemerkungen:', 'card_notes', $notes, 31, 4);
    outTableRecordDelim();
    outTableButton2($session, ' ', 'card_change', 'Ändern', ' ', 'card_new', 'Neu');
    outTableRecordDelim();
    outTableTextField($session, 'Nächster DS (Id):', 'card_next', '', 8, 8);
    outTableRecordEnd();
    outTableEnd();
    guiFinishForm($session);
    guiStandardBodyEnd($session, Th_AddressBodyEnd);
}
Пример #4
0
function baseForum(&$session)
{
    $session->trace(TC_Gui1, 'baseForum');
    if (!isset($_POST['forum_id']) || !isInt($_POST['forum_id'])) {
        $_POST['forum_id'] = 1;
    }
    $forum_id = $_POST['forum_id'];
    if (empty($_POST['page_no'])) {
        $_POST['page_no'] = 1;
    }
    $page_no = $_POST['page_no'];
    $forum = dbGetRecordById($session, T_Forum, $forum_id, 'name,description');
    dbForumInfo($session, $forum_id, $threads, $pages);
    $headline = 'Forum ' . $forum[0];
    guiStandardHeader($session, $headline, Th_StandardHeader, Th_StandardBodyStart);
    guiParagraph($session, $forum[1], true);
    guiParagraph($session, 'Seite ' . $page_no . ' von ' . $pages . ' (' . (0 + $threads) . ($threads == 1 ? ' Thema)' : ' Themen)'), false);
    outTableAndRecord();
    outTableInternLink($session, null, P_Forum . '?forum_id=' . $forum_id . '&action=' . A_NewThread, 'Neues Thema');
    outTableDelim(AL_Right);
    guiPageLinks($session, P_Forum . '?action=' . A_ShowForum . '&forum_id=' . $forum_id, $page_no, $pages);
    outTableDelimAndRecordEnd();
    outTableEnd();
    $id_list = dbIdListOfPage($session, T_Posting, "forum={$forum_id} and top is null order by id desc", $session->fUserThreadsPerPage, $page_no);
    outTableAndRecord(1);
    outTableCellStrong('Thema');
    outTableCellStrong('Autor');
    outTableCellStrong('Antworten');
    outTableCellStrong('Aufrufe');
    outTableCellStrong('Letzter Beitrag');
    outTableCellStrong('Thema');
    outTableRecordEnd();
    foreach ($id_list as $ii => $id) {
        $thread = dbGetRecordById($session, T_Posting, $id, 'author,changedat,subject,changedby,calls');
        $last_id = null;
        dbThreadInfo($session, $id, $answers, $thread_pages, $last_id);
        if (empty($last_id)) {
            $last = $thread;
            $last_id = $id;
        } else {
            $last = dbGetRecordById($session, T_Posting, $last_id, 'author,changedat,subject');
        }
        outTableRecordAndDelim();
        guiThreadPageLink($session, $id, 1, $thread[2]);
        outTableDelimEnd();
        outTableCell(htmlentities($thread[0]));
        outTableCell($answers + 0);
        outTableCell($thread[4] + 0);
        outTableDelim();
        echo $last[0];
        echo ' ';
        echo dbSqlDateToText($session, $last[1]);
        outNewline();
        guiInternLink($session, P_Thread . '?action=' . A_ShowThread . '&posting_id=' . $last_id, $last[2]);
        outTableDelimAndRecordEnd();
    }
    outTableEnd();
    outTableAndRecord();
    outTableInternLink($session, null, P_Forum . '?forum_id=' . $forum_id . '&action=' . A_NewThread, 'Neues Thema');
    outTableDelim(AL_Right);
    guiPageLinks($session, P_Forum . '?action=' . A_ShowForum . '&forum_id=' . $forum_id, $page_no, $pages);
    outTableDelimAndRecordEnd();
    outTableEnd();
    guiStandardBodyEnd($session, Th_StandardBodyEnd);
}
Пример #5
0
function admShowDir(&$session, $path, $headline = null, $pattern = null, $button_text = null, $button_prefix = null, $file_prefix = null, $with_form = true)
{
    $session->trace(TC_Init, 'admShowDir');
    $dir = opendir($path);
    if ($headline != '') {
        guiHeadline($session, 2, $headline == null ? "Verzeichnis {$path} auf dem Server" : $headline);
    }
    if ($button_text != null && $with_form) {
        guiStartForm($session);
    }
    outTableAndRecord(1);
    outTableCellStrong('Name');
    outTableCellStrong('Größe');
    outTableCellStrong('Geändert am');
    if ($button_text != null) {
        outTableCellStrong('Aktion');
    }
    outTableRecordEnd();
    $no = 0;
    while ($file = readdir($dir)) {
        if ($file != '.' && $file != '..' && ($pattern == null || preg_match($pattern, $file))) {
            $name = $path . $file;
            outTableRecord();
            outTableCell(htmlentities($file));
            outTableCell(is_dir($name) ? 'Verzeichnis' : filesize($name), AL_Right);
            outTableCell(date("Y.m.d H:i:s", filemtime($name)));
            if ($button_text != null) {
                $no++;
                outTableDelim();
                outHiddenField($session, $file_prefix . $no, $path . $file);
                outButton($session, $button_prefix . $no, $button_text);
                outTableDelimEnd();
            }
            outTableRecordEnd();
        }
    }
    outTableEnd();
    closedir($dir);
    if ($button_text != null && $with_form) {
        guiFinishForm($session);
    }
}