הנה הקוד המלא:
PHP קוד:
if($site->files['opSmallPic']['tmp_name'] != ""){
@unlink($site->conf['systemPlace'].$site->conf['uploadPlace'].$site->conf['smallImgsMoviesPlace'].$picture['opSmallPic'],$site->conf['systemPlace'].$site->conf['uploadPlace'].$site->conf['smallImgsMoviesPlace'].$download['opSmallPic']);
move_uploaded_file($site->files['opSmallPic']['tmp_name'],$site->conf['systemPlace'].$site->conf['uploadPlace'].$site->conf['smallImgsDownloadsPlace'].$site->post['opLinkName'].".".$y);
$this->makeSmallerImage($site->conf['systemPlace'].$site->conf['uploadPlace'].$site->conf['smallImgsDownloadsPlace'].$site->post['opLinkName'].".".$y,$y);
$opSmallPic = $site->post['opLinkName'].".".$y;
}else{
if($site->Functions->file_exists($site->post['opSmallPic'])){
if($site->post['opSmallPic'] != $site->conf['systemLink'].$site->conf['uploadPlace'].$site->conf['smallImgsMoviesPlace'].$download['opSmallPic']){
@unlink($site->conf['systemPlace'].$site->conf['uploadPlace'].$site->conf['smallImgsMoviesPlace'].$download['opSmallPic']);
copy($site->post['opSmallPic'],$site->conf['systemPlace'].$site->conf['uploadPlace'].$site->conf['smallImgsDownloadsPlace'].$site->post['opLinkName'].".".$y);
$this->makeSmallerImage($site->conf['systemPlace'].$site->conf['uploadPlace'].$site->conf['smallImgsDownloadsPlace'].$site->post['opLinkName'].".".$y,$y);
}
$opSmallPic = $site->post['opLinkName'].".".$y;
}else{
die("התמונה הקטנה ששלחת לא קיימת".$site->post['opSmallPic']);
}
}
חשוב לזכור שהקוד הזה עבד, ובגלל שידרוג לגירסה PHP 5.2.17 נוצרה השגיאה.
תודה לעוזרים.