Probleme mit dem Bannerdealer Script

VIPbanner_de

www.VIPbanner.de
ID: 72674
L
1 Mai 2006
2.598
150
hi,

habe mir das Bannerdealer Script von https://www.0900-tools.de/ geholt. Nun is es so, das das Script schon ne weile nicht mehr upgedated wurde, so musste ich aus allen Dateien @$HTTP_POST_VARS durch $_POST ersetzen, damit ich das überhaupt mal installieren konnte.. nur jetzt klappt der Bannerupload nicht und ich vermute das der Uploadteil auch veraltet ist und deswegen funktioniert das nicht. Das Script blockiert definitif beim Upload, habe das getestet indem ich nach einzelnen funktionen ein die; eingebaut hab um zu erfahren wo es zuerst greift und wo die funktion dann zuletzt ausgeführt wird. Ich habe mal den ganzen Uploadteil hier und hoffe mir kann jemand helfen das der upload funktioniert.

PHP:
class upload
	{
    var $error_msg = '';
    function upload($input_field_name){$this->input_field_name = $input_field_name;}
    function set_accepted_mime_types($accepted_mime_types){$this->accepted_mime_types = $accepted_mime_types;}
    function set_max_file_size($max_size){$this->max_file_size = $max_size;}
    function set_max_image_size($width, $height){$this->max_image_width = $width; $this->max_image_height = $height;}

    function draw_form($title = "Upload", $action = '')
		{
        if (isset($this->max_file_size)){$maxlenght = " maxlength=\"{$this->max_file_size}\"";} else{$maxlenght = '';}
        if (isset($this->accepted_mime_types)){$accept = ' accept="' . implode(',', $this->accepted_mime_types) . '"';} else{$accepted = '';}

        echo "<form enctype=\"multipart/form-data\" action=\"{$action}\" method=\"post\">";
        echo "Button: <input name=\"{$this->input_field_name}\" size=\"13\" type=\"file\"$accept$maxlenght>";
        echo "<br>Title: <input type=\"text\" name=\"TITEL\" size=\"38\" maxlength=\"50\" value=\"MY PAGE\"><br>URL: <input type=\"text\" name=\"BANNERURL\" size=\"39\" maxlength=\"100\" value=\"https://\"><br>Upload-Pass: <input type=\"password\" name=\"pass\" size=\"11\" maxlength=\"8\"> <input type=\"submit\" value=\"Upload Now\">";
        echo "</form>";

        if (isset($this->accepted_mime_types)){}
	    }

    function security_check()
		{
        if (is_uploaded_file($_FILES[$this->input_field_name]['tmp_name'])){$this->file = $_FILES[$this->input_field_name];} else{$this->error_msg = "Die Datei existiert nicht."; return false;}
        if(isset($this->max_file_size) && ($this->file["size"] > $this->max_file_size)){$this->error_msg .= "Maximum file size exceeded . Uploaded files may not be larger than " . $this->max_file_size . " bytes . (= " . round($this->max_file_size / 1024, 2) . "KB)"; return false;}

        if(ereg("image", $this->file["type"]))
			{
            $image_size = getimagesize($this->file["tmp_name"]);
            if(isset($this->max_image_width) && isset($this->max_image_height) && ($image_size[0] > $this->max_image_width) || ($image_size[1] > $this->max_image_height))
				{
                $this->error_msg .= "Bild zu gross! . Das Bild darf nicht fetter sein als " . $this->max_image_width . " x " . $this->max_image_height . " pixel";
                return false;
	            }
	        }
        if(isset($this->accepted_mime_types) && !in_array($this->file["type"], $this->accepted_mime_types))
			{
            $this->error_msg = "Dieser MIME - type wird nicht akzeptiert!<br>\n";
            $this->error_msg .= "Dein File: {$this->file["type"]}<br>\n";
            $this->error_msg .= "Erlaubt: " . implode(', ', $this->accepted_mime_types);
            return false;
	        }
        return true;
	    }

    function move($destination_folder, $overwrite = false)
		{
        if ($this->security_check() == false){return false;}
        $filename = $this->file['tmp_name'];
        $destination = $destination_folder . $this->file['name'];
        if (file_exists($destination) && $overwrite != true)
			{
            $this->error_msg = "Ups, Fehler unsererseits, bitte einfach wiederholen, dann klappts auch! (Passwort bleibt gültig)";
            return false;
	        }
		elseif (move_uploaded_file ($filename, $destination))
			{
            return true;
	        }
		else{
            $this->error_msg = "Error! File konnte nicht upgeloadet werden! Bitte kontaktiere den Webmaster! (Passwort bleibt gültig)";
            return false;
	        }
	    }
    function read(){if ($this->security_check() == false){return false;}
	$filename = $this->file['tmp_name'];
	$fd = fopen ($filename, "rb");
	$contents = fread ($fd, filesize ($filename));
	fclose ($fd);
	return $contents;
    }
}
$input_field_name = "bildupload";
$accepted_mime_types = array('image/jpg', 'image/jpeg', 'image/gif', 'image/png', 'image/pjpeg');
$overwrite = false;
$upload = new upload($input_field_name);
$upload->set_max_file_size($Maximale_Bytes);
$upload->set_max_image_size($XXbreite, $XXhoehe);
$upload->set_accepted_mime_types($accepted_mime_types);