68 lines
1.5 KiB
PHP
68 lines
1.5 KiB
PHP
|
<?PHP
|
||
|
|
||
|
include_once("init.php");
|
||
|
|
||
|
|
||
|
if (!isset($mensch_id) OR !existiertID($mensch_id))
|
||
|
die(abschlussMeldung(
|
||
|
'Die angegebene Person ist nicht in der Datenbank vorhanden! [za]'));
|
||
|
|
||
|
|
||
|
|
||
|
$result = mysql_query(
|
||
|
"SELECT * FROM Adressen WHERE mensch_id='$mensch_id'");
|
||
|
|
||
|
if (mysql_num_rows($result) == 0)
|
||
|
print '<DIV ALIGN="CENTER"><BR>keine Adressen</DIV>';
|
||
|
else
|
||
|
{ ?>
|
||
|
|
||
|
<DIV ALIGN="CENTER">
|
||
|
<FORM NAME="Adressenliste"
|
||
|
ACTION="edit_adresse.php?<?PHP print SID; ?>#adresse"
|
||
|
METHOD="POST">
|
||
|
<TABLE BORDER="2">
|
||
|
|
||
|
<TR><TH>Wahl</TH>
|
||
|
<TH>Adresse</TH>
|
||
|
<TH>Land</TH></TR>
|
||
|
|
||
|
<?PHP
|
||
|
|
||
|
$ersteZeile=true;
|
||
|
// die Datenzeilen
|
||
|
while ($zeile = mysql_fetch_array($result))
|
||
|
{
|
||
|
print '<TR>';
|
||
|
print '<TD ALIGN="CENTER"><INPUT TYPE="RADIO" NAME="adresse_id" .
|
||
|
VALUE="' . $zeile["adresse_id"] . '"';
|
||
|
if ($ersteZeile) print ' CHECKED="CHECKED"';
|
||
|
print '></TD><TD>';
|
||
|
print $zeile["Strasse"] . ' ' . $zeile["Hausnummer"] . '<BR>';
|
||
|
if (strlen($zeile["Zusatz"]) > 0)
|
||
|
print $zeile["Zusatz"] . '<BR>';
|
||
|
print $zeile["PLZ"] . ' ' . $zeile["Ort"] . '</TD>';
|
||
|
print '<TD ALIGN="CENTER">' . $zeile["Land"] . '</TD></TR>';
|
||
|
print '<TR><TD COLSPAN="3" ALIGN="RIGHT">' .
|
||
|
$zeile["Notiz"] . '</TD></TR>';
|
||
|
$ersteZeile = false;
|
||
|
}
|
||
|
|
||
|
print '<INPUT TYPE="HIDDEN" NAME="mensch_id" VALUE="' . $mensch_id . '">';
|
||
|
|
||
|
// die Aktionsknoepfe
|
||
|
?>
|
||
|
|
||
|
</TABLE>
|
||
|
|
||
|
|
||
|
<DIV ALIGN="CENTER">
|
||
|
<INPUT TYPE="SUBMIT" NAME="submitAdressenliste" VALUE=" Bearbeiten ">
|
||
|
<INPUT TYPE="SUBMIT" NAME="submitAdressenliste" VALUE=" Entfernen ">
|
||
|
</DIV>
|
||
|
|
||
|
</FORM>
|
||
|
</DIV>
|
||
|
|
||
|
<?PHP } ?>
|