function userTableData(&$session, $id) { $session->trace(TC_Gui3, 'forum.UserTableData'); $name = 'forum'; outTableRecord(); outTableCellStrong(TAG_NEWLINE . 'Modul ' . $name); $rec = dbGetRecordById($session, T_User, $id, 'postingsperpage,threadsperpage,postings'); outTableRecordDelim(); outTableTextField($session, 'Beiträge je Seite:', 'forum_postingsperpage', $rec[0], 3, 3); outTableRecordDelim(); outTableTextField($session, 'Forumsinhalt: Themen je Seite:', 'forum_threadsperpage', $rec[1], 3, 3); outTableRecordEnd(); outTableRecordCells('Bisher erstellte Forumsbeiträge:', $rec[2]); }
function guiLogin(&$session, $message) { guiStandardHeader($session, "Anmeldung für den InfoBasar", Th_LoginHeader, Th_LoginBodyStart); guiStartForm($session); if (!empty($message)) { $message = preg_replace('/^\\+/', '+++ Fehler: ', $message); guiParagraph($session, $message, false); } outDivision($session); if (!isset($_POST['login_user'])) { $_POST['login_user'] = $session->fUserName; $_POST['login_email'] = ''; } outTableAndRecord(); outTableTextField($session, 'Benutzername:', 'login_user', null, 32, 32); outTableRecordDelim(); outTablePasswordField($session, 'Passwort:', 'login_code', '', 32, 32); outTableRecordDelim(); outTableButton($session, ' ', 'but_login', 'Anmelden'); outTableAndRecordEnd(); guiLine($session, 2); guiParagraph($session, 'Passwort vergessen?', false); outTableAndRecord(); outTableTextField($session, 'EMail-Adresse:', 'login_email', null, 32, 0); outTableRecordDelim(); outTableButton($session, ' ', 'but_forget', 'Passwort ändern'); outTableAndRecordEnd(); echo '(Das neue Passwort wird dann zugeschickt.)'; outNewline(); outStrong('Achtung:'); echo 'Benutzername muss ausgefüllt sein!'; outDivisionEnd($session); guiFinishForm($session, $session); guiStandardBodyEnd($session, Th_LoginBodyEnd); return 1; }
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); }
function baseForumSearch(&$session, $message) { $session->trace(TC_Gui1, 'baseForumSearch'); getUserParam($session, U_MaxHits, $maxhits); guiStandardHeader($session, 'Forumsuche', Th_SearchHeader, Th_SearchBodyStart); if (!empty($message)) { guiParagraph($session, $message, false); } guiParagraph($session, 'Hinweis: vorläufig nur ein Suchbegriff möglich', false); guiStartForm($session); outTableAndRecord(); outTableTextFieldButton($session, 'Im Titel:', 'forum_titletext', null, 32, 64, ' ', 'forum_title', 'Suchen'); outTableRecordDelim(); outTableTextFieldButton($session, 'Im Beitrag:', 'forum_bodytext', null, 32, 64, ' ', 'forum_body', 'Suchen'); outTableRecordDelim(); outTableTextField($session, 'Maximale Trefferzahl:', U_MaxHits, $maxhits, 10, 10); outTableAndRecordEnd(); guiFinishForm($session, $session); guiStandardBodyEnd($session, Th_SearchBodyEnd); }
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); }
function admRename(&$session, $message) { $session->trace(TC_Gui1, 'admRename'); admStandardHeader($session, 'Umbenennen einer Seite'); if (!empty($message)) { guiParagraph($session, $message, false); } guiStartForm($session); outTableAndRecord(); outTableTextField($session, 'Bisheriger Name:', 'rename_oldname', null, 64, 64); outTableRecordDelim(); outTableTextField($session, 'Neuer Name:', 'rename_newname', null, 64, 64); outTableRecordDelim(); outTableCell(' '); outTableDelim(); outButton($session, 'rename_info', 'Info'); if (!empty($_POST['rename_oldname']) && !empty($_POST['rename_newname'])) { echo ' | '; outButton($session, 'rename_rename', 'Umbenennen'); outNewline(); outCheckBox($session, 'rename_backlinks', 'Alle Verweise umbenennen', null); } outTableDelimAndRecordEnd(); outTableEnd(); guiFinishForm($session); if (!empty($_POST['rename_oldname']) && dbPageId($session, $_POST['rename_oldname']) > 0) { $row = dbFirstRecord($session, 'select page,text,createdby,createdat from ' . dbTable($session, T_Text) . ' where replacedby is null and text like ' . dbSqlString($session, '%' . $_POST['rename_oldname'] . '%')); if (!$row) { guiParagraph($session, '+++ keine Verweise gefunden', false); } else { outTableAndRecord(1); outTableCellStrong('Seite'); outTableCellStrong('Typ'); outTableCellStrong('von'); outTableCellStrong('Letzte Änderung'); outTableCellStrong('Fundstelle'); outTableCellStrong('Seite'); outTableRecordEnd(); while ($row) { $pagerecord = dbGetRecordById($session, T_Page, $row[0], 'name,type'); $text = findTextInLine($row[1], $_POST['rename_oldname'], 10, true); if (!empty($text)) { outTableRecord(); outTableInternLink($session, null, encodeWikiName($session, $pagerecord[0]), $pagerecord[0], M_Base); outTableCell($pagerecord[1]); outTableCell($row[2]); outTableCell(htmlentities($row[3])); outTableCell($text); outTableRecordEnd(); } $row = dbNextRecord($session); } outTableEnd(); } } admFinishBody($session); }