OK, erstmal Danke für die Hilfe.
Oder meinst du eine andere Fehlermeldung? Oder wie oder was?
Ich meine die Fehlermeldung soll eigentlich nur ein Hinweis dafür sein, das ebeben kein Bild ausgewählt wurde.
ok und was steht in Zeile 156 in der index.php?
Also, Zeile 156 ist ab jetzt Zeile 124
Hier nochmal die aktuelle Fehlermeldung:
-----------
32
none
0
Warning: getimagesize: Unable to open '/homepages/5/d71291015/htdocs/images/news/45876_.' for reading. in /homepages/5/d71291015/htdocs/webmaster/ newsadmin/index.php on line 124
----------
Hier ist der Quellcode der Seite. ----------
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Newsadmin</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
include "newsini.php";
if (!isset($action)){
?>
<h3 align="center"><? print $lang["addnews"] ?></h3><form enctype="multipart/form-data" method="post" action="<? $PHP_SELF ?>?action=add">
<table border="0" cellpadding="2" cellspacing="0" bgcolor="#99CCFF">
<tr>
<td>
<table border="0" cellpadding="0" cellspacing="2">
<tr valign="top" bgcolor="#CCCCCC">
<td><? print $lang["newstitle"] ?>:</td>
<td>
<input type="text" name="title" size="50" maxlength="255"> </td>
</tr>
<tr valign="top" bgcolor="#CCCCCC">
<td><? print $lang["shorttext"]?>:</td>
<td>
<textarea name="kurztext" cols="50" rows="10" id="kurztext"></textarea>
</td>
</tr>
<tr valign="top" bgcolor="#CCCCCC">
<td><? print $lang["longtext"]?>:</td>
<td>
<textarea name="langtext" cols="50" rows="10" id="langtext"></textarea>
</td>
</tr>
<tr valign="top" bgcolor="#CCCCCC">
<td><? print $lang["photo"]?>:</td>
<td>
<input type="file" name="photo" size="50" maxlength="255"> </td>
</tr>
<tr valign="top" bgcolor="#CCCCCC">
<td><? print $lang["photocaption"]?>:</td>
<td>
<input type="text" name="caption" size="50" maxlength="255">
</td>
</tr>
<tr valign="top" bgcolor="#CCCCCC">
<td><? print $lang["link"]?>:</td>
<td>
<input type="text" name="URL" size="50" maxlength="255"> </td>
</tr>
<tr valign="top" bgcolor="#CCCCCC">
<td><? print $lang["linktitle"]?>:</td>
<td>
<input type="text" name="urlname" size="50" maxlength="255">
</td>
</tr>
<tr valign="top" bgcolor="#CCCCCC">
<td><? print $lang["textformat"]?>:</td>
<td>
<input type="radio" name="format" value="text" checked> <? print $lang["text"]?>
<input name="format" type="radio" value="html" checked>
HTML </td>
</tr>
<tr valign="top" bgcolor="#CCCCCC">
<td colspan="2">
<input type="reset" name="Reset" value="<? print $lang["reset"]?>">
<input type="submit" name="Submit" value="<? print $lang["save"]?>">
</td>
</tr>
</table>
</td>
</tr>
</table></form>
<?
};
if (@$action=="add"){
$conid=dbconnect($dbname, $username, $password);
$tmp=time();
$date=date("Y-m-d H:i:s",$tmp);
$URL=strtolower($URL);
$URL=str_replace("http://","",$URL);
if ($format=="text"){
$langtext=nl2br($langtext);
};
$result = dbquery($conid, "INSERT INTO $dbtable VALUES ('','$date','$title','$kurztext','$langtext','','','','$URL','$urlname')");
print "<p align=center>$lang[addok]<br><a href=$PHP_SELF>$lang[addmore]</a></p>";
$result = dbquery($conid, "SELECT max(id) as maxid FROM $dbtable");
list($id)=dbfetch($result);
print "<p><b>$id</b></p>";
if ($photo != ''){
print "$photo<br>$photo_name<br>$photo_size<br>$photo_type";
// convert to canonic name
$t=explode(".",$photo_name);
$max=count($t)-1;
$ext=$t[$max];
$photo_name=str_replace(".$ext","",$photo_name);
$filename=eregi_replace("([^a-z0-9]*)","",$photo_name);
$filename=strtolower($filename);
srand((double)microtime()*1000000);
$filename=rand(10000,99999)."_".$filename.".$ext";
// copy file
if (function_exists("move_uploaded_file")){
move_uploaded_file($photo, $photopath.$filename);
}else{
copy($photo, $photopath.$filename);
unlink($photo);
}
$info=getimagesize($photopath.$filename);
$result = dbquery($conid, "UPDATE $dbtable SET image='$filename',caption='$caption' WHERE (id='$id')");
};
};
?>
</body>
</html>