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:
|
<?php
session_start();
?>
<?php
$user = $_SESSION['user'];
$datum = time();
$neuname = "$user-$datum.jpg";
if(isset($_POST['send']))
{
if($_FILES['Datei']['name'])
{
if($_FILES['Datei']['size']<1900000)
{
if(substr($_FILES['Datei']['type'],0,6)=='image/')
{
$move=move_uploaded_file($_FILES['Datei']['tmp_name'], "upload/".$neuname);
if($move) {
echo'<br><form action="?section=hochladen3" Method="post">
<table border=0 cellpadding=4 cellspacing=1 width="350" id="table" align="center">
<tr class="tabletitle">
<td colspan=2><b>Bild eintragen</b></td>
</tr>
<tr class="tablea">
<td width="50%"><b>Bild Name: <input type="text" name="name"></b></td>
<td rowspan="3"><b>Beschreibung:<br><textarea name="inhalt" cols="20" rows="6" wrap="physical"></textarea></td>
</tr>
<tr class="tablea">
<td><b>Kategorie: <input type="text" name="web"></b></td>
</tr>
<tr class="tablea">
<td><b>Adresse: <input type="text" name="url" STYLE="background-color: gray" READONLY value="upload/$neuname"></b></td>
</tr>
<tr class="tablea">
<td colspan="2" align="center"><input type="submit" value="Eintragen"></td>
</tr>
</table>
</form>';
}else{
echo'Der Upload war leider <u>nicht</u> erfogreich !';
}
}else{
echo'Die Datei muss vom Typ <u>Image</u> sein!';
}
}else{
echo'Die Datei ist zu gross max. 1,9 MB !';
}
}else{
echo'Bitte gib eine Datei an max. 1,9 MB und Sie muss vom Typ Image sein !';
}
}
?> |