Hallo,
ich habe folgendes Problem. Wenn ich in meiner Eingabemaske ein Bild auf den Server hochladen möchte steigt mir das System mit der Fehlermeldung:
Bilder müssen vom Typ gif oder jpg sein aus.
Hier das Verkaufsskript (Auszug):
	
Brauche dringend Hilfe da ich sonst nicht weiterkomme.
Danke schon im vorraus.
					ich habe folgendes Problem. Wenn ich in meiner Eingabemaske ein Bild auf den Server hochladen möchte steigt mir das System mit der Fehlermeldung:
Bilder müssen vom Typ gif oder jpg sein aus.
Hier das Verkaufsskript (Auszug):
PHP-Code:
	
	
                  $title = $sessionVars["SELL_title"];
                  $description = $sessionVars["SELL_description"];
                  $pict_url = $sessionVars["SELL_pict_url_original"];
                  $atype = $sessionVars["SELL_atype"];
                  $iquantity = $sessionVars["SELL_iquantity"];
                  $minimum_bid = $sessionVars["SELL_minimum_bid"];
                  $with_reserve = ($sessionVars["SELL_with_reserve"])?"ja":"nein";
                  $payment = $sessionVars["SELL_payment"];
                  $duration = $sessionVars["SELL_duration"];
                  $country = $sessionVars["SELL_country"];
                  $location_zip = $sessionVars["SELL_location_zip"];
                  $shipping = $sessionVars["SELL_shipping"];
                  $international = ($sessionVars["SELL_international"])?"ja":"nein";
                  $category1 = $sessionVars["SELL_category"];
                  $imgtype = $sessionVars["SELL_imgtype"];
                  $zustand = $sessionVars["SELL_zustand"];
                  $fett = $sessionVars["SELL_fett"];
                  $marker = $sessionVars["SELL_marker"];
                  $topkat = $sessionVars["SELL_topkat"];
                  $bild2 = $sessionVars["SELL_bild2"];
                  $bild3 = $sessionVars["SELL_bild3"];
                  $artnr = $sessionVars["SELL_artnr"];
                  $fett_preis = $sessionVars["SELL_fettpreis"];
                  $marker_preis = $sessionVars["SELL_markerpreis"];
                  $topkat_preis = $sessionVars["SELL_topkatpreis"];
                  $bild2_preis = $sessionVars["SELL_bild2preis"];
                  $bild3_preis = $sessionVars["SELL_bild3preis"];
                  $buy_now = $sessionVars["SELL_buy_now"];
                }
                else
                {
                        // auction type
                        reset($auction_types);
                        list($atype,) = each($auction_types);
                        // quantity of items
                        $iquantity = 1;
                        // country
                        // BM 28.2.
                        //reset($countries);
                        //list($country,) = each($countries);
                        // shipping
                        $shipping = 1;
                        // image type
                        $imgtype = 1;
                        $with_reserve = "nein";
                }
        }
// Oder Aktion = 'first' / Erstaufruf++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
        elseif ($action=='first')
        {
          unset($auction_id);
          $ERR = "ERR_".CheckSellData();
          // if no other errors - handle upload here
          if (!$$ERR)
          {
            unset($file_uploaded);
            // Auktions-ID generieren
            $auction_id = generate_id();
            if ( $userfile <> "none" )
            {
              $inf = GetImageSize ( $userfile );
              if ($userfile2 <> "none")
                $inf2 = GetImageSize ( $userfile2 );
              if ($userfile3 <> "none")
                $inf3 = GetImageSize ( $userfile3 );
              $er = false;
              // make a check
              if ($inf)
              {
                $inf[2] = intval($inf[2]); // check for uploaded file type
                if ($userfile2 <> "none")
                  $inf2[2] = intval($inf2[2]);
                if ($userfile3 <> "none")
                  $inf3[2] = intval($inf3[2]);
                if ( ($inf[2]!=1) && ($inf[2]!=2) )
                {
                  $er = true;
                  $ERR = "ERR_602";
                }
                else
                {
                  // check for file size
                  if ( intval($userfile_size)>$MAX_UPLOAD_SIZE )
                  {
                          $er = true;
                          $ERR = "ERR_603";
                  }
                }
                if ($userfile2 <> "none")
                {
                  if ( ($inf2[2]!=1) && ($inf2[2]!=2) )
                  {
                    $er = true;
                    $ERR = "ERR_602_2";
                  }
                  else
                  {
                    // check for file size
                    if ( intval($userfile2_size)>$MAX_UPLOAD_SIZE )
                    {
                      $er = true;
                      $ERR = "ERR_603_2";
                    }
                  }
                }
                if ($userfile3 <> "none")
                {
                  if ( ($inf2[2]!=1) && ($inf2[2]!=2) )
                  {
                    $er = true;
                    $ERR = "ERR_602_3";
                  }
                  else
                  {
                    // check for file size
                    if ( intval($userfile3_size)>$MAX_UPLOAD_SIZE )
                    {
                      $er = true;
                      $ERR = "ERR_603_3";
                    }
                  }
                }
              }
              else
              {
                      $ERR = "ERR_602";
                      $er = true;
              }
              if (!$er)
              {
                // Bild 1 wirklich speichern
                $ext = ($inf[2]==1)?".gif":".jpg";
                $fname = $image_upload_path.$auction_id.$ext;
                if (file_exists($fname))
                  unlink ($fname);
                copy ($userfile, $fname);
                $uploaded_filename = $auction_id.$ext;
                $file_uploaded = true;
                // Bild 2 wirklich speichern
                if ($userfile2 <> "none")
                {
                  $ext = ($inf[2]==1)?".gif":".jpg";
                  $fname = $image_upload_path.$auction_id."_2".$ext;
                  if ( file_exists($fname) )
                          unlink ($fname);
                  copy ( $userfile2, $fname );
                  $uploaded_filename2 = $auction_id."_2".$ext;
                  $file_uploaded = true;
                }
                // Bild 3 wirklich speichern
                if ($userfile3 <> "none")
                {
                  $ext = ($inf[2]==1)?".gif":".jpg";
                  $fname = $image_upload_path.$auction_id."_3".$ext;
                  if ( file_exists($fname) )
                          unlink ($fname);
                  copy ( $userfile3, $fname );
                  $uploaded_filename3 = $auction_id."_3".$ext;
                  $file_uploaded = true;
                }
              }
              else
              {
                // Fehler!!
                unset($file_uploaded);
                $userfile2 = "none";
                $userfile3 = "none";
              }
            }
            else
            {
              unset($file_uploaded);
              $userfile2 = "none";
              $userfile3 = "none";
            }
          }
        }
/*
        Erstaufruf oder Fehler in den Daten -> Eingabemaske nochmal anzeigen
*/
        if ( empty($action) || (($action=='first')&&($$ERR)) )
        {
                include "header.php";
                        $titleH = htmlspecialchars($title);
                        $descriptionH = htmlspecialchars($description);
                        $pict_urlH = htmlspecialchars($pict_url); 
Danke schon im vorraus.
 
          

 
  Moderator
 Moderator
Kommentar