コード例 #1
0
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);
    }
}
コード例 #2
0
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);
}
コード例 #3
0
ファイル: gui.php プロジェクト: BackupTheBerlios/infobasar
function outTableAndRecord($border = 0)
{
    outTable($border);
    echo TAG_TABLE_RECORD;
}
コード例 #4
0
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);
    }
}