function overview(&$session) { $session->trace(TC_Gui3, 'forum.overview'); outTableRecord(); outTableCell(' '); outTableCellStrong(tagNewline() . 'Modul Foren'); outTableRecordEnd(); outTableRecordInternLink($session, 'Auflistung der existierenden Foren.', 'forumhome', 'Forenübersicht', 'forum'); outTableRecordInternLink($session, 'Suche in den Foren.', 'forumsearch', 'Forensuche', 'forum'); }
function overview(&$session) { $session->trace(TC_Gui3, 'address.overview'); outTableRecord(); outNewLine(); outTableCellStrong(tagNewline() . 'Modul Adressen'); outTableRecordEnd(); outTableRecordInternLink($session, 'Adressbuch erstellen oder ändern.', 'editbook', 'Adressbücher', 'address'); outTableRecordInternLink($session, 'Adresse erstellen oder ändern.', 'editcard', 'Adresskarte', 'address'); outTableRecordInternLink($session, 'Adressen suchen, exportieren.', 'showcards', 'Suchen', 'address'); }
function dbPrintTable(&$session, $query, $headers, $max_lines) { $session->trace(TC_Db1, "dbPrintTable"); $result = mysql_query($query, $session->fDbInfo); if (!$result) { protoc(mysql_error()); } else { $first = true; $no = 0; if ($max_lines <= 0) { $max_lines = 1000; } while ($row = mysql_fetch_row($result)) { if ($first) { outTable(1); outTableRecord(); foreach ($headers as $key => $value) { outTableCellStrong($value); } outTableRecordEnd(); $first = false; } if (++$no > $max_lines) { break; } outTableRecord(); foreach ($row as $key => $value) { outTableCell($value); } outTableRecordEnd(); } if ($first) { echo "Die Anfrage ergab keine Ergebnisse<br>\n"; } else { outTableEnd(); if ($no > $max_lines) { guiParagraph($session, "Es gibt noch weitere Ergebnisse!", false); } } mysql_free_result($result); } }
function outTableRecordCells($text1, $text2, $text3 = null) { echo TAG_TABLE_RECORD; outTableCell($text1); outTableCell($text2); if ($text3 != null) { outTableCell($text3); } outTableRecordEnd(); }
function baseInfo(&$session) { guiStandardHeader($session, 'Infobasar-Info', Th_InfoHeader, null); guiParagraph($session, '(C) Hamatoma AT berlios DOT de 2004-2005', 0); outTable(); outTableRecord(); outTableCellStrong('Gegenstand'); outTableCellStrong('Version'); outTableRecordDelim(); outTableCell('Basismodul:'); outTableCell(PHP_ModuleVersion); outTableRecordDelim(); outTableCell('PHP-Klassen:'); outTableCell(PHP_ClassVersion); outTableRecordDelim(); outTableCell('DB-Schema:'); outTableCell(htmlentities($session->getMacro(TM_DBSchemeVersion))); outTableRecordDelim(); outTableCell('DB-Basisinhalt:'); outTableCell(htmlentities($session->getMacro(TM_DBBaseContentVersion))); outTableRecordDelim(); outTableCell('DB-Erweiterungen:'); $macro = $session->getMacro(TM_DBExtensions); outTableCell(htmlentities(str_replace(';', ' | ', substr($macro, 1, strlen($macro) - 2)))); outTableRecordEnd(); outTableEnd(); guiStandardBodyEnd($session, Th_InfoBodyEnd); }
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); }
function addressPrintTable(&$session, $query, $max_lines) { $result = mysql_query($query, $session->fDbInfo); if (!$result) { protoc(mysql_error()); } else { guiHeadline($session, 2, 'Suchergebnis:'); $first = true; $no = 0; if ($max_lines <= 0) { $max_lines = 1000; } outTable(1); while ($row = mysql_fetch_row($result)) { if ($first) { addressPrintTableHeader($session); $first = false; } if (++$no > $max_lines) { break; } outTableRecord(); addressPrintRow($session, $row); outTableRecordEnd(); } if ($first) { echo "Die Anfrage ergab keine Ergebnisse"; outNewline(); } else { outTableEnd(); if ($no > $max_lines) { guiParagraph($session, "Es gibt noch weitere Ergebnisse!", false); } } mysql_free_result($result); } }
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); } }