62 lines
1.7 KiB
PHP
62 lines
1.7 KiB
PHP
|
<?PHP
|
|||
|
|
|||
|
// von au<61>en kommt die Variable $telefon_id mit der Nummer des Telefoneintrags
|
|||
|
// bzw. sie ist nicht gesetzt f<>r einen Neuen
|
|||
|
// ausserdem wird die $mensch_id uebergeben
|
|||
|
|
|||
|
|
|||
|
include_once("init.php");
|
|||
|
|
|||
|
|
|||
|
importGET("telefon_id");
|
|||
|
if (!isset($telefon_id)) importPOST("telefon_id");
|
|||
|
if (!isset($telefon_id)) $telefon_id = -1;
|
|||
|
|
|||
|
// falls eine bestehende Nummer bearbeitet werden soll
|
|||
|
if ($telefon_id > -1)
|
|||
|
{
|
|||
|
$result = mysql_query("SELECT * FROM Telefon WHERE telefon_id='$telefon_id'");
|
|||
|
$infos = mysql_fetch_array($result);
|
|||
|
$nummer = $infos["Nummer"];
|
|||
|
$vorwahl = $infos["Vorwahl"];
|
|||
|
$intVorwahl = $infos["IntVorwahl"];
|
|||
|
$notiz = $infos["Notiz"];
|
|||
|
}
|
|||
|
else
|
|||
|
// eine neue Nummer wird angelegt
|
|||
|
{
|
|||
|
$nummer = "";
|
|||
|
$vorwahl = "381";
|
|||
|
$intVorwahl = "49";
|
|||
|
$notiz = "";
|
|||
|
}
|
|||
|
|
|||
|
?>
|
|||
|
|
|||
|
<P>
|
|||
|
<DIV ALIGN="CENTER">
|
|||
|
<form name="Telefon" action="edit_telefon.php?<?PHP print SID; ?>" method="post">
|
|||
|
<DIV ALIGN="CENTER">
|
|||
|
<table border="2" cellpadding="4" cellspacing="2">
|
|||
|
<tr> <td>Land: <input type="text" name="intVorwahl" size="5"
|
|||
|
value="00<?PHP echo $intVorwahl; ?>"></td>
|
|||
|
<td>Ort: <INPUT TYPE="TEXT" name="vorwahl" size="7"
|
|||
|
VALUE="0<?PHP echo $vorwahl; ?>"</td>
|
|||
|
<td>Nr.: <INPUT TYPE="TEXT" NAME="nummer" size="11"
|
|||
|
value="<?php echo $nummer; ?>"></td></tr>
|
|||
|
<tr> <td colspan="3">Bemerkungen: <INPUT TYPE="TEXT" NAME="notiz"
|
|||
|
VALUE="<?PHP print $notiz; ?>" size="43">
|
|||
|
</TD></TR>
|
|||
|
</table>
|
|||
|
</DIV>
|
|||
|
<input type="hidden" name="telefon_id" value="<?php echo $telefon_id; ?>">
|
|||
|
<INPUT TYPE="HIDDEN" NAME="submitTelefon" VALUE="edit">
|
|||
|
<INPUT TYPE="hidden" NAME="mensch_id"
|
|||
|
VALUE="<?PHP print $mensch_id; ?>">
|
|||
|
<DIV ALIGN="CENTER"><input type="submit" value=" Eintragen "
|
|||
|
ACCESKEY=" "></DIV>
|
|||
|
|
|||
|
</FORM>
|
|||
|
</DIV>
|
|||
|
|