FleyerShaver
Neues Mitglied
Also das ist mein bisheriges Uploadscript:
Wenn ich das Script bis jetzt aufrufe passiert das:
Parse error: parse error, unexpected T_ELSEIF in /var/www/web21/html/sendgame.php on line 42
Die Zeile 43 ist das:
Was mach ich falsch.
PHP:
<?php
require_once "maincore.php";
require_once "subheader.php";
require_once "side_left.php";
opentable("Game hochladen");
if(!iMEMBER) fallback("index.php");
if($_POST['send'])
{
if(!$_POST['gamename'])
{
echo "Es muss ein Gamename angegeben werden\n<br>";
}
if(!$_FILES['file']['name'])
{
echo "Es muss ein Gamefile geuploadet werden";
}
}
if($_FILES['file']['error'] > 0) {
echo "Problem: ";
switch ($_FILES['file']['error']) {
case 1: echo "Die Datei ist größer als 10 MB.<br>";
break;
case 2: echo "Die Datei ist zu groß.<br>";
break;
case 3: echo "Die Datei wurde unvollständig hochgeladen.<br>";
break;
case 4: echo "Es wurde keine Datei hochgeladen.<br>";
break;
}
//Passender MIME-Type
if($_FILES['file']['type'] != 'application/x-shockwave-flash')
{
echo "Es wurde keine *.swf Datei hochgeladen";
}
if($_FILES['bild']['name'])
{
if($_FILES['bild'] != image/jpeg)
{
echo "Das Bild muss im *.jpg Format gespeichert werden";
}
$bild = getimagesize($_FILES['bild'])
if($bild['0'] > 150 OR $bild['1'] > 150)
{
echo "Das Bild darf maximal 150x150 Pixel groß sein.<br>";
}
}
echo '<form action="sendgame.php" method="post" enctype="multipart/form-data" name="submit_form">
<table align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="100" class="tbl">Gamekategorie:</td>
<td class="tbl"><select name="gamecat" class="textbox">
<option value="1">Action</option>
<option value="2">Adventure</option>
<option value="3">Brettspiele</option>
<option value="4">Casino</option>
<option value="5">Denkspiele</option>
<option value="6">Kampfspiele</option>
<option value="7">Kartenspiele</option>
<option value="8">Klassiker</option>
<option value="9">Lustige Spiele</option>
<option value="10">Puzzlespiele</option>
<option value="11">Schnelligkeitsspiele</option>
<option value="12">Shooter</option>
<option value="13">Sportspiele</option>
<option value="14">Tierspiele</option>
<option value="15">TV-Games</option>
<option value="16">WEltraumspiele</option>
<option value="17">X-Mas Games</option>
</select></td>
</tr>
<tr>
<td class="tbl">Gamename:</td>
<td class="tbl"><input type="text" name="gamename" value="" maxlength="64" class="name" style="width:300px;"></td>
</tr>
<tr>
<td class="tbl">Beschreibung:</td>
<td class="tbl"><input type="text" name="beschreibung" value="" maxlength="64" class="beschreibung" style="width:300px;"></td>
</tr>
<tr>
<td valign="top" class="tbl">Stichwörter*:</td>
<td class="tbl"><textarea class="textbox" name="stichwoerter" rows="3" style="width:300px;"></textarea></td>
</tr>
<tr>
<td colspan="2" class="tbl">*Stichwörter mit Leerzeichen trennen </td>
</tr>
<tr>
<td class="tbl">Game-File*:</td>
<td class="tbl"><input type="file" name="file"></td>
</tr>
<tr>
<td colspan="2" class="tbl">*maximal 10MB und muss im .swf Format gespeichert werden </td>
</tr>
<tr>
<td class="tbl">Bild*-File:</td>
<td class="tbl"><input type="file" name="bild"></td>
</tr>
<tr>
<td colspan="2" class="tbl">*maximal 150x150 Pixel </td>
</tr>
<tr>
<td colspan="2" class="tbl"><br><center>
<input type="reset" value="Reset" class="button">
<input type="submit" name="send" value="Game schicken" class="button"></center></td>
</tr>
</table>
</form>';
closetable();
require_once "side_right.php";
require_once "footer.php";
?>
Parse error: parse error, unexpected T_ELSEIF in /var/www/web21/html/sendgame.php on line 42
Die Zeile 43 ist das:
PHP:
if($bild['0'] > 150 OR $bild['1'] > 150)