TEIL 1 - datein aus der txt auslesen und ins fomular einlesen:
++++
++++
PHP-Code:
<?php
/////////////////////////////////////////////
$sm_counter_max = "10"; // maximale anzahl der smilies
$datei = "smilie.dat";
$fp = fopen("$datei","r");
if($fp) {
for($i=0; $i<$sm_counter_max; $i++) {
$daten = fgets($fp,5000);
$zeile = $sm_array.$daten;
$sm = explode ('||°||', $zeile);
// diese Eingaben aus dem Array ziehen
$sm_url = $sm[0];
$sm_code = $sm[1];
$sm_status = $sm[2];
// zähler korrekt bei 1 starten
$iy = $i+1;
if ($iy < 10) {$ix = 0;} else {$ix = "";}
$sm_counter = "$ix$iy";
if ($sm_url != "") { $my_sm_img = "<img src=$url_smilie/$sm_url>"; }
echo "<form action=\"admin_smilie_ok.php\" method=\"post\">";
echo "<font size=$size_font1 color=$color_font3 face=$style_font> $sm_counter : ";
echo "<input type=\"hidden\" name=\"sm_no\" value=\"$i\">";
echo "<input type=\"text\" name=\"sm_url_neu\" size=\"10\" maxlength=\"25\" value=\"$sm_url\">";
echo " $my_sm_img ";
echo "<input type=\"text\" name=\"sm_code_neu\" size=\"10\" maxlength=\"25\" value=\"$sm_code\"> ";
if ( $sm_status == "on" ) {$sm_status_x = "checked=checked";}
echo "<input type=\"checkbox\" name=\"sm_status_neu\" $sm_status_x> [ Status: on/off ]";
echo "<input type=\"hidden\" name=\"username\" value=$admin_log>";
echo "<input type=\"hidden\" name=\"passwort\" value=$admin_pass>";
echo "<input type=\"submit\" value=\"Smilie $sm_counter ändern\"></form>";
echo "<br />";
} // end for
} // end if
fclose($fp);
////////////////////////////////////////////////////////////////////
?>
Kommentar