<html>
<head>
<title>-Members edit-</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<h1>Members editieren-></h1>
<?php
$zeile=file("mems.dat");
$datei="mems.dat";
for ($i=1; $i<sizeof($zeile); $i++) {
$entry=explode(',',$zeile[$i]);
$entry[0] = ereg_replace("&komma;",",",$entry[0]);
$entry[1] = ereg_replace("&komma;",",",$entry[1]);
$entry[2] = ereg_replace("&komma;",",",$entry[2]);
$entry[3] = ereg_replace("&komma;",",",$entry[3]);
$entry[4] = ereg_replace("&komma;",",",$entry[4]);
$entry[5] = ereg_replace("&komma;",",",$entry[5]);
$entry[6] = ereg_replace("&komma;",",",$entry[6]);
echo"<tr>
<td width=\"419\" height=\"56\">
<div align=\"right\"><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\"><font size=\"1\">
real name: ".$entry[2]."<br>
Aufgabe: ".$entry[5]."<br>
ICQ: ".$entry[4]." <br>
MSN: ".$entry[3]." <br>
city: ".$entry[6]." <br>
con: ".$entry[7]." <br>
</font></font></div>
</td>
<td width=\"117\" height=\"56\">
<div align=\"left\"><font face=\"Verdana, Arial, Helvetica, sans-serif\" size=\"2\"><b><font size=\"1\" color=\"#1269C0\">".$entry[1]."</font></b></font></div>
</td>
</tr>
<tr><td><a href=\"mem_edit.php?action=admin&do=saveeditnews&i=$i\"><b>bearbeiten/löschen</b></a></font></td>
</tr>
</table><br>
";
} //actions fangen hier an
if ($action == "admin" && $do == "saveeditnews") {
if($todo) {
$pw = "kaese";
$bearbeiten = explode(",",$zeile[$i]);
$bearbeiten[1] = ereg_replace("&komma;",",",$bearbeiten[1]);
$bearbeiten[2] = ereg_replace("&komma;",",",$bearbeiten[2]);
$bearbeiten[3] = ereg_replace("&komma;",",",$bearbeiten[3]);
echo "<center><br><font face=\"Verdana, Arial, sans-serif\" size=\"4\">Members editieren/delete</font><br><br>";
echo "<form action=\"$PHP_SELF?action=admin&do=saveeditnews&id=$i&todo=enter\" method=post>";
echo "<table border=\"0\"><tr><td>";
echo "<tr><td width=\"100\"><font face=Verdana, Arial, Helvetica, sans-serif><font size=\"2\">Name:</font></font></td><td><input type=\"text\" name=\"name\" size=\"40\" maxlength=\"20\" value=\"".$bearbeiten[0]."\" style=\"font-family:Courier,mono;font-size:10pt;font-style:normal;font-weight:normal;font-variant:normal;color:#000000;background-color:#EEEEEE\"></td></tr>";
echo "<tr><td width=\"100\"><font face=Verdana, Arial, Helvetica, sans-serif><font size=\"2\">Real:</font></font></td><td><input type=\"text\" name=\"real\" size=\"40\" maxlength=\"40\" value=\"".$bearbeiten[1]."\" style=\"font-family:Courier,mono;font-size:10pt;font-style:normal;font-weight:normal;font-variant:normal;color:#000000;background-color:#EEEEEE\"></td></tr>";
echo "<tr><td width=\"100\"><font face=Verdana, Arial, Helvetica, sans-serif><font size=\"2\">E-Mail:</font></font></td><td><input type=\"text\" name=\"mail\" size=\"40\" maxlength=\"40\" value=\"".$bearbeiten[2]."\" style=\"font-family:Courier,mono;font-size:10pt;font-style:normal;font-weight:normal;font-variant:normal;color:#000000;background-color:#EEEEEE\"></td></tr>";
echo "<tr><td width=\"100\"><font face=Verdana, Arial, Helvetica, sans-serif><font size=\"2\">ICQ:</font></font></td><td><input type=\"text\" name=\"icq\" size=\"40\" maxlength=\"40\" value=\"".$bearbeiten[3]."\" style=\"font-family:Courier,mono;font-size:10pt;font-style:normal;font-weight:normal;font-variant:normal;color:#000000;background-color:#EEEEEE\"></td></tr>";
echo "<tr><td width=\"100\"><font face=Verdana, Arial, Helvetica, sans-serif><font size=\"2\">Aufgabe:</font></font></td><td><input type=\"text\" name=\"aufg\" size=\"40\" maxlength=\"40\" value=\"".$bearbeiten[4]."\" style=\"font-family:Courier,mono;font-size:10pt;font-style:normal;font-weight:normal;font-variant:normal;color:#000000;background-color:#EEEEEE\"></td></tr>";
echo "<tr><td width=\"100\"><font face=Verdana, Arial, Helvetica, sans-serif><font size=\"2\">City:</font></font></td><td><input type=\"text\" name=\"city\" size=\"40\" maxlength=\"40\" value=\"".$bearbeiten[5]."\" style=\"font-family:Courier,mono;font-size:10pt;font-style:normal;font-weight:normal;font-variant:normal;color:#000000;background-color:#EEEEEE\"></td></tr>";
echo "<tr><td width=\"100\"><font face=Verdana, Arial, Helvetica, sans-serif><font size=\"2\">Connection:</font></font></td><td><input type=\"text\" name=\"con\" size=\"40\" maxlength=\"40\" value=\"".$bearbeiten[6]."\" style=\"font-family:Courier,mono;font-size:10pt;font-style:normal;font-weight:normal;font-variant:normal;color:#000000;background-color:#EEEEEE\"></td></tr>";
echo "<tr><td width=\"100\"><font face=\"Verdana, Arial, Helvetica, sans-serif\"><font size=\"2\">Passwort:</font></font></td><td><input type=\"password\" name=\"passwort\" size=\"40\" style=\"font-family:Courier,mono;font-size:10pt;font-style:normal;font-weight:normal;font-variant:normal;color:#000000;background-color:#EEEEEE\"></td></tr>";
echo "<tr><td width=\"100\"> </td><td><font face=\"Verdana, Arial, Helvetica, sans-serif\"><font size=\"2\">delete? </font></font><input type=checkbox name=delete></td></tr>";
echo "<tr><td width=\"100\"> </td><td><input type=\"hidden\" name=\"i\" value=\"".$i."\"><input type=\"submit\" value=\"Ändern\"> <input type=\"reset\" value=\"Rückgängig\">";
echo "</td></tr></table></form></center>";
}
If(isset($todo)) {
//hier müsste jetzt das zum einfügen
//und löschen rein
}
?>
</body>
</html>