70 lines
1.2 KiB
PHP
70 lines
1.2 KiB
PHP
<?PHP
|
|
|
|
include_once("init.php");
|
|
|
|
importGET("tab");
|
|
// erwartet wird: $tab -> Name der anzuzeigenden Tabelle
|
|
|
|
?>
|
|
|
|
<HTML>
|
|
<HEAD>
|
|
<TITLE>NDB - Tabelle <?PHP print $tab; ?></TITLE>
|
|
</HEAD>
|
|
<BODY>
|
|
|
|
<?php
|
|
|
|
/*
|
|
DEPRECATED
|
|
dieses Skript dient nur zum Anzeigen der Tabellen und ist nicht mehr
|
|
Teil des Web-Projekts
|
|
*/
|
|
|
|
|
|
require("navi.php");
|
|
|
|
|
|
|
|
echo "<DIV ALIGN=\"CENTER\">";
|
|
|
|
$felder = mysql_list_fields($dbName,$tab);
|
|
|
|
echo "<TABLE BORDER=\"2\" CELLPADDING=\"4\" RULES=\"groups\"><THEAD><TR>";
|
|
# ---------- die Tabellenk÷pfe ------------
|
|
$i=0;
|
|
while ($i < mysql_num_fields($felder))
|
|
{
|
|
$feldName = mysql_field_name($felder,$i);
|
|
if ($feldName == "mensch_id") $mensch_id_row=$i;
|
|
echo "<TH>" . $feldName . "</TH>";
|
|
$i++;
|
|
}
|
|
echo "</TR></THEAD>";
|
|
|
|
if ($tab == "Menschen") $mensch_id_row = -1;
|
|
|
|
# ----------- die Datenzeilen -------------
|
|
$daten = mysql_query("SELECT * FROM $tab");
|
|
$tabelleLeer = (mysql_num_rows($daten) == 0);
|
|
while ($zeile = mysql_fetch_row($daten))
|
|
{
|
|
echo "<TBODY><TR>";
|
|
$i=0;
|
|
while ($i < count($zeile))
|
|
{
|
|
if ($i == $mensch_id_row)
|
|
echo '<TD>' . holeName($zeile[$mensch_id_row]) . "</TD>";
|
|
else echo "<TD>" . $zeile[$i] . "</TD>";
|
|
$i++;
|
|
}
|
|
echo "</TR></TBODY>";
|
|
}
|
|
|
|
?>
|
|
|
|
</TABLE>
|
|
</DIV>
|
|
|
|
</BODY>
|
|
</HTML>
|