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:
103:
104:
105:
106:
107:
108:
109:
110:
111:
112:
113:
114:
115:
116:
117:
118:
119:
120:
121:
122:
123:
124:
125:
|
<?php
$ja=$_POST['ja'];
$bandname=$_POST['bandname'];
$mitglieder=$_POST['mitglieder'];
$land=$_POST['land'];
$biografie=$_POST['biografie'];
$discografie=$_POST['discografie'];
include_once("config.inc.php");
$verbindung=mysql_connect($dbhost,$dbuser,$dbpasswd);
if($ja!="ja" OR $bandname==""){
echo"
<table style='width: 100%;' border='0'>
<form action='band_neu.php' method='post' enctype='multipart/form-data'>
<tr>
<td colspan='3' class='tab_untertitel' width='100%'>Neue Band anlegen</td>
</tr>
$problem
<tr>
<td valign='top'><b>* Bandname</b></td>
<td valign='top'><input type='text' name='bandname' value='$bandname'></td>
<td class='tab_text_klein'></td>
</tr>
<tr>
<td valign='top'><b>Mitglieder</b></td>
<td valign='top'><input type='text' name='mitglieder' value='$mitglieder'></td>
<td></td>
</tr>
<tr>
<td valign='top'><b>Land</b></td>
<td valign='top'><input type='text' name='land' value='$land'></td>
</tr>
<tr>
<td valign='top'><b>Biografie</b></td>
<td valign='top' colspan='2'><textarea name='biografie' style='width:90%; height:100px;'>$biografie</textarea></td>
</tr>
<tr>
<td valign='top'><b>Discografie</b></td>
<td valign='top' colspan='2'><textarea name='discografie' style='width:90%; height:100px;'>$discografie</textarea></td>
</tr>
<tr>
<td></td>
<td colspan=2><input type='file' name='Datei1' accept='image/*'></td>
</tr>
<tr>
<td></td>
<td colspan=2><input type='file' name='Datei2' accept='image/*'></td>
</tr>
<tr>
<td></td>
<td colspan=2><input type='file' name='Datei3' accept='image/*'></td>
</tr>
<tr>
<td></td>
<td colspan=2><input type='file' name='Datei4' accept='image/*'></td>
</tr>
<tr>
<td></td>
<td colspan=2><input type='file' name='Datei5' accept='image/*'></td>
</tr>
<tr><td colspan=3> </td></tr>
<tr>
<td colspan='2' align='right'><input type='hidden' name='ja' value='ja'><input type='reset' value='Felder leeren'> <input type='submit' value='Band anlegen'></form></td>
</tr>
<tr><td colspan=3> </td></tr>
</table>";
}else{
$abfrage_name = "SELECT * FROM band WHERE bandname='$bandname'";
$abfrage2_name=mysql_db_query($db,$abfrage_name,$verbindung);
$abfrage_name_zahl = mysql_num_rows($abfrage2_name);
if($abfrage_name_zahl=="0"){
$time=time();
$bild_name="$bandname-$time";
$bild_name = str_replace(" ","_",$bild_name);$bild_name = str_replace("ä","a",$bild_name);$bild_name = str_replace("ö","o",$bild_name);$bild_name = str_replace("Ö","O",$bild_name);$bild_name = str_replace("ü","u",$bild_name);$bild_name = str_replace("é","e",$bild_name);$bild_name = str_replace("è","e",$bild_name);$bild_name = str_replace("ß","ss",$bild_name);
$bild1 = "$bild_name-1.jpg";
$bild1= htmlentities($bild1, ENT_QUOTES);
$datei1=$_FILES['Datei1']['tmp_name'];
$move1=move_uploaded_file($_FILES['Datei1']['tmp_name'], "bilderlexikon/".$bild1);
$bild2 = "$bild_name-2.jpg";
$bild2= htmlentities($bild2, ENT_QUOTES);
$datei2=$_FILES['Datei2']['tmp_name'];
$move2=move_uploaded_file($_FILES['Datei2']['tmp_name'], "bilderlexikon/".$bild2);
$bild3 = "$bild_name-3.jpg";
$bild3= htmlentities($bild3, ENT_QUOTES);
$datei3=$_FILES['Datei3']['tmp_name'];
$move3=move_uploaded_file($_FILES['Datei3']['tmp_name'], "bilderlexikon/".$bild3);
$bild4 = "$bild_name-4.jpg";
$bild4= htmlentities($bild4, ENT_QUOTES);
$datei4=$_FILES['Datei4']['tmp_name'];
$move4=move_uploaded_file($_FILES['Datei4']['tmp_name'], "bilderlexikon/".$bild4);
$bild5 = "$bild_name-5.jpg";
$bild5= htmlentities($bild5, ENT_QUOTES);
$datei5=$_FILES['Datei5']['tmp_name'];
$move5=move_uploaded_file($_FILES['Datei5']['tmp_name'], "bilderlexikon/".$bild5);
$eintrag = "INSERT INTO band (
`bandname` ,
`mitglied` ,
`land` ,
`biografie` ,
`discografie` ,
`bild1` ,
`bild2` ,
`bild3` ,
`bild4` ,
`bild5` ,
`user`
) VALUES ('$bandname', '$mitglied', '$land', '$biografie', '$discografie', '$bild1', '$bild2', '$bild3', '$bild4', '$bild5', '$user')";
$eintragen = mysql_db_query($db,$eintrag,$verbindung);
}else{echo"Bandname schon vorhanden";}
}
?> |