1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
22:
23:
24:
25:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
52:
53:
54:
55:
56:
57:
58:
59:
60:
61:
62:
63:
64:
65:
66:
67:
68:
69:
70:
71:
72:
73:
74:
75:
76:
77:
78:
79:
80:
81:
82:
83:
84:
85:
86:
87:
88:
89:
90:
91:
92:
93:
94:
95:
96:
97:
98:
99:
100:
101:
102: | <?php
header('location: '.$url);
$url = "http://www.formel1.de";
$upload_dir = "pics";
if (isset ($_GET["step"]))
$step = $_GET["step"];
else
$step = 1;
switch ($step)
{
case 1:
?>
<form name="form1" method="post" action="<?php echo $_SERVER["PHP_SELF"] ?>?step=2">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr valign="top">
<td width="250" bgcolor="#666666"> <strong><font color="#FFFFFF">Wieviele
Bilder wollen Sie uploaden?</font></strong></td>
<td bgcolor="#CCCCCC">
<input name="ii" type="text" id="ii" size="8">
<font color="#FF0000" size="2">Beliebige
Zahl eingeben...</font>
</td>
</tr>
<tr valign="top">
<td width="250" bgcolor="#666666">
<strong><font color="#FFFFFF">weiter zu
Schritt Zwei...</font></strong>
</td>
<td bgcolor="#CCCCCC">
<input name="step2" type="submit" id="step2" value="Schritt 2">
</td>
</tr>
</table>
</form>
<?php
break;
case 2:
if (isset ($_POST["step2"]))
{
$ii = $_POST["ii"];
?>
<form action="<?php echo $_SERVER["PHP_SELF"] ?>?step=3"
method="post" enctype="multipart/form-data" name="form1">
<table width="100%" border="0" cellspacing="2" cellpadding="0">
<tr valign="top">
<td width="250" bgcolor="#666666">
<strong><font color="#FFFFFF">Bitte fügen
Sie die Dateien ein!</font></strong>
</td>
<td bgcolor="#CCCCCC"> </td>
</tr>
<?php
for ($i=1; $i <= $ii; $i++)
{
echo "<tr valign=\"top\">\n";
echo " <td width=\"250\" bgcolor=\"#666666\">\n";
echo " <strong><font color=\"#FFFFFF\">Datei Nr. $i</font></strong>\n";
echo " </td>\n";
echo " <td bgcolor=\"#CCCCCC\">\n";
echo " <input name=\"file[]\" type=\"file\" id=\"file[]\">\n";
echo " </td>\n";
echo "</tr>\n";
}
?>
<tr valign="top">
<td width="250" bgcolor="#666666">
<strong><font color="#FFFFFF">weiter zu
Schritt Drei...</font></strong>
</td>
<td bgcolor="#CCCCCC">
<input name="step3" type="submit" id="step3" value="Schritt 3">
</td>
</tr>
</table>
</form>
<?php
}
break;
case 3:
if (isset ($_POST["step3"]))
{
$count = (count ($_FILES["file"]["name"]))-1;
for ($i = 0; $i <= $count; $i++)
{
$a = $i + 1;
if ($_FILES["file"]["error"][$i] == 0)
{
if (move_uploaded_file
(
$_FILES["file"]["tmp_name"][$i],
$upload_dir . "/" . $_FILES["file"]["name"][$i])
)
echo "Die Datei Nr. $a wurde erfogreich hochgeladen!\n";
else
echo "Fehler beim Hochladen der Datei Nr. " . $a . "\n";
}
else
echo "Datei Nr. $a Fehler: keine Datei ausgewählt\n";
}
}
break;
?> |