kyrillische Formulardaten übertragen

Code:
<form action="<?php $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" accept-charset="UTF-8">

hab ich eingefügt aber das bringt nichts.
 
@jonnybottrop

So sollte es funktionieren, versuch's mal:

HTML:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de-DE" lang="de-DE">

<head>

	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta name="language" content="de"/>
	<meta name="description" content="www.atw-parts.de"/>
	<meta name="revisit" content="After 7 days"/>
	<meta name="robots" content="INDEX,FOLLOW"/>
	<meta http-equiv="Content-Style-Type" content="text/css" />   
	<meta http-equiv="Content-Script-Type" content="text/javascript" />

	<title>::: AUTOTEILE Werther ::: ???????????? ???????? ? ????? ?? ???</title>

	<style type="text/css">

	body	{margin:0px;
		padding:0px;
	     	font-size:12pt;
     		font-family:'Georgia', serif;
		color:#777777;}

	#kontaktformular	{width:860px;
				height:300px
				margin:0px;
				padding:0px;
     				font-size:12pt;
     				font-family:'Georgia', serif;
     				float:left;
     				color:#777777;}

	#anfrage	{width:370px;

			height:300px;
			margin:0px;
			padding:0px;
     			float:left;
			background-color:#;}

	#block_rechts	{width:400px;
			height:300px;
			margin:0px 0px 0px 20px;
			padding:0px;
	     		float:left;
			background-color:#;}

	#kontaktdaten	{width:430px;
			margin:0px;
			padding:0px;
			clear:both;}

	#dateianhang	{width:380px;
			height:50px;
			margin:10px 0px 0px 0px;
			padding:0px;
	     		clear:both;
			background-color:#;
			border:0px;
			text-align:center;}
         
	#buttons	{width:400px;
			height:50px
			margin:0px;
			padding:0px;
     			clear:both;
			text-align:center;}

	.label	{width:320px; 
		padding:0px;
		margin:0px;
		font-size:12pt;
		background-color:#;}

	.field	{width:300px;
		padding:0px;
		margin:0px;}

	.error 	{width:300px; 
		padding:0px 0px 0px 5px;}

	.pflichtfeld {color:##c31924;}
	 
	.zurueck {color:#c31924;}

	</style>

</head>

<body>

??? ??????????? ??? ?????????? ????????.<br>
<br>

<div id="kontaktformular">

	<form action="<?php $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
	<p><input style="width:0px; height:0px; visibility:hidden;" type="hidden" name="action" value="smail" /></p>
	<p><input style="width:0px; height:0px; visibility:hidden;" type="hidden" name="content" value="formular"/></p>

	<div id="anfrage">
   		
		<table>
			<tr>
				<td class="label"><label>????: <span class="pflichtfeld">*</span></label></td>
				<td class="field"><?php if ($fehler["betreff"] != "") { echo $fehler["betreff"]; } ?><input type="text" name="betreff" style="width:250px;padding:0px;margin:0px;" maxlength="150" value="<?php echo $_POST[betreff]; ?>" size="30" <?php if ($fehler["betreff"] != "") { echo 'class="errordesignfields"'; } ?>/></td>
			
			</tr>
			
			<tr>	
    			
				<td class="label"><label>?????????: <span class="pflichtfeld">*</span></label></td>
	    			<td class="field"><?php if ($fehler["nachricht"] != "") { echo $fehler["nachricht"]; } ?><textarea name="nachricht" style="width:250px;padding:0px;margin:10px 0px 0px 0px;"  cols="30" rows="15" <?php if ($fehler["nachricht"] != "") { echo 'class="errordesignfields"'; } ?>><?php echo $_POST[nachricht]; ?></textarea></td>
	
			</tr>
	
		</table>
 	
	</div>

	<div id="block_rechts">

	<div id="kontaktdaten">

		<table>
			
			<tr>
				<td class="label"><label>???: <span class="pflichtfeld">*</span></label></td>
				<td class="field"> <?php if ($fehler["vorname"] != "") { echo $fehler["vorname"]; } ?><input type="text" name="vorname" style="width:250px;padding:0px;margin:0px;" maxlength="25" value="<?php echo $_POST[vorname]; ?>" size="20" <?php if ($fehler["vorname"] != "") { echo 'class="errordesignfields"'; } ?>/></td>
		
			</tr>
			
			<tr>
				<td class="label"><label>??????: <span class="pflichtfeld">*</span></label></td>
				<td class="field"> <?php if ($fehler["name"] != "") { echo $fehler["name"]; } ?><input type="text" name="name" style="width:250px;paddingng:0px;margin:10px 0px 0px 0px;" maxlength="25" id="textfield" value="<?php echo $_POST[name]; ?>" size="20" <?php if ($fehler["name"] != "") { echo 'class="errordesignfields"'; } ?>/></td>
			
			</tr>

			<tr>
				<td class="label"><label>?????: </label></td>
				<td class="field"><input type="text" name="firma" style="width:250px;padding:0px;margin:10px 0px 0px 0px;" maxlength="150" value="<?php echo $_POST[firma]; ?>" size="20"/></td>
				<td class="error"></td>
			</tr>

			<tr>
				<td class="label"><label>???????: </label></td>
				<td class="field"><input type="text" name="telefon" style="width:250px;padding:0px;margin:10px 0px 0px 0px;" maxlength="200" value="<?php echo $_POST[telefon]; ?>" size="20" /></td>
		
			</tr>	

			<tr>
				<td class="label"><label>E-Mail: <span class="pflichtfeld">*</span></label></td>
				<td class="field"><?php if ($fehler["email"] != "") { echo $fehler["email"]; } ?><input type="text" name="email" style="width:250px;padding:0px;margin:10px 0px 0px 0px;" maxlength="200" value="<?php echo $_POST[email]; ?>" size="20" <?php if ($fehler["email"] != "") { echo 'class="errordesignfields"'; } ?>/></td>

			</tr>
		
			

		</table>

	</div>


	<br><div class="label"><label>?????????? ???? (???????????? 5 Mb)</label></div>
	
 
 	<div id="dateianhang">
	
		<?php
		      for ($i=0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) {
		        echo '<fieldset class="upload">';
		 	echo '<input type="file" size="16" name="f[]" /><br />';
			echo '</fieldset>';
      			}
		?>

	</div>

	<div id="buttons">
   
		<p style="font-size:10pt;"><span class="pflichtfeld">*</span> ???????????</p>
   
			<input type="submit" name="mt-mk" value="????????" onclick="tescht();"/>
		   	<input type="submit" name="delete" value="?????" />
		
	</div>

	</div>

	</form>

</div>

</body>
</html>

PHP:
<?php 
session_start(); 

  $script_root = substr(__FILE__, 0, 
                        strrpos(__FILE__, 
                                DIRECTORY_SEPARATOR) 
                       ).DIRECTORY_SEPARATOR; 

require_once $script_root.'upload.php'; 

$remote = getenv("REMOTE_ADDR"); 

function encrypt($string, $key) { 
$result = ''; 
for($i=0; $i<strlen($string); $i++) { 
   $char = substr($string, $i, 1); 
   $keychar = substr($key, ($i % strlen($key))-1, 1); 
   $char = chr(ord($char)+ord($keychar)); 
   $result.=$char; 
} 
return base64_encode($result); 
} 
$sicherheits_eingabe = encrypt($_POST["sicherheitscode"], "8h384ls94"); 
$sicherheits_eingabe = str_replace("=", "", $sicherheits_eingabe); 

@require('config.php'); 

if ($_POST['delete']) 
{ 
unset($_POST); 
} 

if ($_POST["mt-mk"]) { 

   $anrede      = $_POST["anrede"]; 
$titel      = $_POST["titel"]; 
    
$vorname      = $_POST["vorname"]; 
$name      = $_POST["name"]; 
$firma   = $_POST["firma"]; 
   $telefon   = $_POST["telefon"]; 
$email      = $_POST["email"]; 
$betreff   = $_POST["betreff"]; 
$nachricht   = $_POST["nachricht"]; 
   $sicherheitscode   = $_POST["sicherheitscode"]; 
   $date = date("d.m.Y | H:i"); 
   $ip = $_SERVER['REMOTE_ADDR'];  
   $UserAgent = $_SERVER["HTTP_USER_AGENT"]; 
   $host = getHostByAddr($remote); 

$anrede = stripslashes($anrede); 
$vorname = stripslashes($vorname); 
$name = stripslashes($name); 
$email = stripslashes($email); 
$betreff = stripslashes($betreff); 
$nachricht = stripslashes($nachricht); 
  
if (isset($anrede) && $anrede == "0") { 
   
          $fehler['anrede'] = "<font color=#c31924>Bitte wählen Sie eine <strong>Anrede</strong> aus.<br /></font>";
 
  } 


if(!$vorname) { 
  
 $fehler['vorname'] = "<font color=#c31924><strong>???</strong><br /></font>"; 
  
} 


if(!$name) { 
  
 $fehler['name'] = "<font color=#c31924><strong>??????</strong><br /></font>"; 
  
} 


if (!preg_match("/^[0-9a-zA-ZÄÜÖ_.-]+@[0-9a-z.-]+\.[a-z]{2,6}$/", $email)) { 
   $fehler['email'] = "<font color=#c31924><strong>E-Mail-Adresse</strong>\n<br /></font>";
 } 

  
if(!$betreff) { 
  
 $fehler['betreff'] = '<font color=#c31924><strong>????:</strong><br /></font>';
   
  
} 
  
if(!$nachricht) { 
  
 $fehler['nachricht'] = '<font color=#c31924><strong>?????????</strong><br /></font>';
   
  
} 

if($sicherheits_eingabe != $_SESSION['captcha_spam']){ 
unset($_SESSION['captcha_spam']); 
   $fehler['captcha'] = "<font color=#c31924>Der <strong>Code</strong> wurde falsch eingegeben.<br /></font>";
    } 

    if (!isset($fehler) || count($fehler) == 0) { 
      $error             = false; 
      $errorMessage      = ''; 
      $uploadErrors      = array(); 
      $uploadedFiles     = array(); 
      $totalUploadSize   = 0; 

      if ($cfg['UPLOAD_ACTIVE'] && in_array($_SERVER['REMOTE_ADDR'], $cfg['BLACKLIST_IP']) === true) {
           $error = true; 
          $fehler['upload'] = '<font color=#c31924>Sie haben keine Erlaubnis Dateien hochzuladen.<br /></font>';
       } 

      if (!$error) { 
          for ($i=0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) { 
              if ($_FILES['f']['error'][$i] == UPLOAD_ERR_NO_FILE) { 
                  continue; 
              } 

              $extension = explode('.', $_FILES['f']['name'][$i]); 
              $extension = strtolower($extension[count($extension)-1]); 
              $totalUploadSize += $_FILES['f']['size'][$i]; 

              if ($_FILES['f']['error'][$i] != UPLOAD_ERR_OK) { 
                  $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i]; 
                  switch ($_FILES['f']['error'][$i]) { 
                      case UPLOAD_ERR_INI_SIZE : 
                          $uploadErrors[$j]['error'] = 'Die Datei ist zu groß (PHP-Ini Direktive).';
                       break; 
                      case UPLOAD_ERR_FORM_SIZE : 
                          $uploadErrors[$j]['error'] = 'Die Datei ist zu groß (MAX_FILE_SIZE in HTML-Formular).';
                       break; 
                      case UPLOAD_ERR_PARTIAL : 
                          if ($cfg['UPLOAD_ACTIVE']) { 
                                $uploadErrors[$j]['error'] = 'Die Datei wurde nur teilweise hochgeladen.';
                           } else { 
                              $uploadErrors[$j]['error'] = 'Die Datei wurde nur teilweise versendet.';
                             } 
                      break; 
                      case UPLOAD_ERR_NO_TMP_DIR : 
                          $uploadErrors[$j]['error'] = 'Es wurde kein temporärer Ordner gefunden.';
                       break; 
                      case UPLOAD_ERR_CANT_WRITE : 
                          $uploadErrors[$j]['error'] = 'Fehler beim Speichern der Datei.';
                       break; 
                      case UPLOAD_ERR_EXTENSION  : 
                          $uploadErrors[$j]['error'] = 'Unbekannter Fehler durch eine Erweiterung.';
                       break; 
                      default : 
                          if ($cfg['UPLOAD_ACTIVE']) { 
                                $uploadErrors[$j]['error'] = 'Unbekannter Fehler beim Hochladen.';
                           } else { 
                              $uploadErrors[$j]['error'] = 'Unbekannter Fehler beim Versenden des Email-Attachments.';
                           } 
                  } 

                  $j++; 
                  $error = true; 
              } 
              else if ($totalUploadSize > $cfg['MAX_ATTACHMENT_SIZE']*1024) { 
                  $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i]; 
                  $uploadErrors[$j]['error'] = 'Maximaler Upload erreicht ('.$cfg['MAX_ATTACHMENT_SIZE'].' KB).';
                   $j++; 
                  $error = true; 
              } 
              else if ($_FILES['f']['size'][$i] > $cfg['MAX_FILE_SIZE']*1024) { 
                  $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i]; 
                  $uploadErrors[$j]['error'] = 'Die Datei ist zu groß (max. '.$cfg['MAX_FILE_SIZE'].' KB).';
                   $j++; 
                  $error = true; 
              } 
              else if (!empty($cfg['BLACKLIST_EXT']) && strpos($cfg['BLACKLIST_EXT'], $extension) !== false) {
                   $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i]; 
                  $uploadErrors[$j]['error'] = 'Die Dateiendung ist nicht erlaubt.';
                   $j++; 
                  $error = true; 
              } 
              else if (preg_match("=^[\\:*?<>|/]+$=", $_FILES['f']['name'][$i])) {
                   $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i]; 
                  $uploadErrors[$j]['error'] = 'Ungültige Zeichen im Dateinamen (\/:*?<>|).';
                   $j++; 
                  $error = true; 
              } 
              else if ($cfg['UPLOAD_ACTIVE'] && file_exists($cfg['UPLOAD_FOLDER'].'/'.$_FILES['f']['name'][$i])) {
                   $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i]; 
                  $uploadErrors[$j]['error'] = 'Die Datei existiert bereits.'; 
                  $j++; 
                  $error = true; 
              } 
              else { 
                  if ($cfg['UPLOAD_ACTIVE']) { 
                     move_uploaded_file($_FILES['f']['tmp_name'][$i], $cfg['UPLOAD_FOLDER'].'/'.$_FILES['f']['name'][$i]);    
                   } 
                  $uploadedFiles[] = $_FILES['f']['name'][$i]; 
              } 
          } 
      } 

      if ($error) { 
          $errorMessage = 'Es sind folgende Fehler beim Versenden des Kontaktformulars aufgetreten:'."\n";
           if (count($uploadErrors) > 0) { 
              foreach ($uploadErrors as $err) { 
                  $tmp .= '<strong>'.$err['name']."</strong><br/>\n- ".$err['error']."<br/><br/>\n";
               } 
              $tmp = "<br/><br/>\n".$tmp; 
          } 
          $errorMessage .= $tmp.''; 
          $fehler['upload'] = $errorMessage; 
      } 
  } 



   if (!isset($fehler)) 
   { 


   $recipient = "".$empfaenger.""; 
   $betreff = "".$_POST["betreff"].""; 
   $mailheaders = "From: \"".stripslashes($_POST["vorname"])." ".stripslashes($_POST["name"])."\" <".$_POST["email"].">\n";
    $mailheaders .= "Reply-To: <".$_POST["email"].">\n"; 
   $mailheaders .= "X-Mailer: PHP/" . phpversion() . "\n"; 


   $msg  = "Folgendes wurde am ". $date ." Uhr &uuml;ber das Kontaktformular auf www.atw-parts.de geschickt:\n" . "\n\n";
    $msg .= "Name: " . $anrede . " " . $titel . "" . $vorname . " " . $name . "\n";
 $msg .= "Firma: " . $firma . "\n\n"; 
$msg .= "E-Mail: " . $email . "\n"; 
$msg .= "Telefon: " . $telefon . "\n"; 
$msg .= "\nBetreff: " . $betreff . "\n"; 
$msg .= "Nachricht:\n" . $_POST['nachricht'] = preg_replace("/\r\r|\r\n|\n\r|\n\n/","\n",$_POST['nachricht']) . "\n\n";
 
   "-------------------------------------------------------------------------\n\n";
  if (count($uploadedFiles) > 0) { 
       if ($cfg['UPLOAD_ACTIVE']) { 
              $msg .= 'Es wurden folgende Dateien hochgeladen:'."\n"; 
           foreach ($uploadedFiles as $file) { 
               $msg .= ' - '.$cfg['DOWNLOAD_URL'].'/'.$cfg['UPLOAD_FOLDER'].'/'.$file."\n";
            } 
       } else { 
           $msg .= 'Es wurden folgende Dateien angehängt:'."\n"; 
           foreach ($uploadedFiles as $file) { 
               $msg .= ' - '.$file."\n"; 
           } 
       } 
   } 
  $msg .= "\n\nIP Adresse: " . $ip . "\n"; 

    


    if (!$cfg['UPLOAD_ACTIVE'] && count($uploadedFiles) > 0) { 
        $attachments = array(); 
        for ($i = 0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) { 
               if ($_FILES['f']['name'][$i] == UPLOAD_ERR_NO_FILE) { 
                continue; 
            } 
            $attachments[] = $_FILES['f']['tmp_name'][$i]; 
        } 
        $boundary = md5(uniqid(rand(), true)); 
        $mailheaders .= "MIME-Version: 1.0\n"; 
        $mailheaders .= "Content-Transfer-Encoding: 8bit\n"; 
        $mailheaders .= "Content-Type: multipart/mixed;\n\tboundary=\"".$boundary."\"\n";
         $mailheaders .= "\n--".$boundary."\n"; 
        $mailheaders .= "Content-Type: text/plain;\n\tcharset=\"UTF-8\"\n"; 
        $mailheaders .= "Content-Transfer-Encoding: 8bit\n"; 
        for ($i = 0; $i < count($uploadedFiles); $i++) { 
            $file = fopen($attachments[$i],"r"); 
            $content = fread($file,filesize($attachments[$i])); 
            fclose($file); 
            $encodedfile = chunk_split(base64_encode($content)); 
            $msg .= "\n\n--".$boundary."\n"; 
            $msg .= "Content-Type: application/octet-stream;\n\tname=\"".$uploadedFiles[$i]."\"\n";
             $msg .= "Content-Transfer-Encoding: base64\n"; 
            $msg .= "Content-Disposition: attachment;\n\tfilename=\"".$uploadedFiles[$i]."\"\n\n";
             $msg .= $encodedfile."\n\n"; 
        } 
        $msg .= "\n\n--".$boundary."--"; 
    } 


   $msg = strip_tags ($msg); 

    
   $dsubject = "Your request";  
   $dmailheaders = "From: ".$ihrname." <".$recipient.">\n"; 
   $dmailheaders .= "Reply-To: <".$recipient.">\n"; 
   $dmailheaders .= "Content-Type: text/plain; Charset=utf-8\n";
   $dmsg  = "??????? ?? B??? ?????????. ?? ??????????? ??? ????? ??????? ?????????? ??? ??????.\n\n";
    $dmsg .= "????? ?????? ???????.\n" . 
  "\n\n"; 
   $dmsg .= "???: " . $anrede . " " . $titel . "" . $vorname . " " . $name . "\n";
 $dmsg .= "?????: " . $firma . "\n\n"; 
$dmsg .= "E-Mail: " . $email . "\n"; 
$dmsg .= "???????:: " . $telefon . "\n"; 
$dmsg .= "\n????: " . $betreff . "\n"; 
$dmsg .= "?????????:\n" . str_replace("\r", "", $nachricht) . "\n\n"; 
    
   if (count($uploadedFiles) > 0) { 
       $dmsg .= ''."\n"; 
       foreach ($uploadedFiles as $file) { 
           $dmsg .= ' - '.$file."\n"; 
       } 
   } 
   $dmsg = strip_tags ($dmsg); 


if (mail($recipient,$betreff,$msg,$mailheaders)) { 
mail($email, $dsubject, $dmsg, $dmailheaders); 


echo "<META HTTP-EQUIV=\"refresh\" content=\"0;URL=danke.php\">"; 
exit; 
  
} 
} 
} 

?>
 
Ich muss nochmal stören. Es werden ja immer 2 Mails abgeschickt. Die Bestätigungsmail an den Verfasser der Nachricht sieht gut aus. Die Mail mit der eigenlichen Anfrage die der Admin der Seite erhält jedoch nicht. Die kyrillischen Zeichen werden dort nich angezeigt sondern wieder durcheinander. Also wenn ich kyrillisch als Betreff, Nachricht usw. eingebe kommen diese nicht beim Empfänger an.

Kann sich nochmal jemand den Code ansehen

Der Übersichtlichkeit wegen hier nochmal der ganze Code.

Code:
<?php  
session_start();  

  $script_root = substr(__FILE__, 0,  
                        strrpos(__FILE__,  
                                DIRECTORY_SEPARATOR)  
                       ).DIRECTORY_SEPARATOR;  

require_once $script_root.'upload.php';  

$remote = getenv("REMOTE_ADDR");  

function encrypt($string, $key) {  
$result = '';  
for($i=0; $i<strlen($string); $i++) {  
   $char = substr($string, $i, 1);  
   $keychar = substr($key, ($i % strlen($key))-1, 1);  
   $char = chr(ord($char)+ord($keychar));  
   $result.=$char;  
}  
return base64_encode($result);  
}  
$sicherheits_eingabe = encrypt($_POST["sicherheitscode"], "8h384ls94");  
$sicherheits_eingabe = str_replace("=", "", $sicherheits_eingabe);  

@require('config.php');  

if ($_POST['delete'])  
{  
unset($_POST);  
}  

if ($_POST["mt-mk"]) {  

   $anrede      = $_POST["anrede"];  
$titel      = $_POST["titel"];  
     
$vorname      = $_POST["vorname"];  
$name      = $_POST["name"];  
$firma   = $_POST["firma"];  
   $telefon   = $_POST["telefon"];  
$email      = $_POST["email"];  
$betreff   = $_POST["betreff"];  
$nachricht   = $_POST["nachricht"];  
   $sicherheitscode   = $_POST["sicherheitscode"];  
   $date = date("d.m.Y | H:i");  
   $ip = $_SERVER['REMOTE_ADDR'];   
   $UserAgent = $_SERVER["HTTP_USER_AGENT"];  
   $host = getHostByAddr($remote);  

$anrede = stripslashes($anrede);  
$vorname = stripslashes($vorname);  
$name = stripslashes($name);  
$email = stripslashes($email);  
$betreff = stripslashes($betreff);  
$nachricht = stripslashes($nachricht);  
   
if (isset($anrede) && $anrede == "0") {  
    
          $fehler['anrede'] = "<font color=#c31924>Bitte wählen Sie eine <strong>Anrede</strong> aus.<br /></font>";
   
  }  


if(!$vorname) {  
   
 $fehler['vorname'] = "<font color=#c31924><strong>???</strong><br /></font>";  
   
}  


if(!$name) {  
   
 $fehler['name'] = "<font color=#c31924><strong>??????</strong><br /></font>";  
   
}  


if (!preg_match("/^[0-9a-zA-ZÄÜÖ_.-]+@[0-9a-z.-]+\.[a-z]{2,6}$/", $email)) {  
   $fehler['email'] = "<font color=#c31924><strong>E-Mail-Adresse</strong>\n<br /></font>";
  }  

   
if(!$betreff) {  
   
 $fehler['betreff'] = '<font color=#c31924><strong>????:</strong><br /></font>';
     
   
}  
   
if(!$nachricht) {  
   
 $fehler['nachricht'] = '<font color=#c31924><strong>?????????</strong><br /></font>';
     
   
}  

if($sicherheits_eingabe != $_SESSION['captcha_spam']){  
unset($_SESSION['captcha_spam']);  
   $fehler['captcha'] = "<font color=#c31924>Der <strong>Code</strong> wurde falsch eingegeben.<br /></font>";
     }  

    if (!isset($fehler) || count($fehler) == 0) {  
      $error             = false;  
      $errorMessage      = '';  
      $uploadErrors      = array();  
      $uploadedFiles     = array();  
      $totalUploadSize   = 0;  

      if ($cfg['UPLOAD_ACTIVE'] && in_array($_SERVER['REMOTE_ADDR'], $cfg['BLACKLIST_IP']) === true) {
            $error = true;  
          $fehler['upload'] = '<font color=#c31924>Sie haben keine Erlaubnis Dateien hochzuladen.<br /></font>';
        }  

      if (!$error) {  
          for ($i=0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) {  
              if ($_FILES['f']['error'][$i] == UPLOAD_ERR_NO_FILE) {  
                  continue;  
              }  

              $extension = explode('.', $_FILES['f']['name'][$i]);  
              $extension = strtolower($extension[count($extension)-1]);  
              $totalUploadSize += $_FILES['f']['size'][$i];  

              if ($_FILES['f']['error'][$i] != UPLOAD_ERR_OK) {  
                  $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  switch ($_FILES['f']['error'][$i]) {  
                      case UPLOAD_ERR_INI_SIZE :  
                          $uploadErrors[$j]['error'] = 'Die Datei ist zu groß (PHP-Ini Direktive).';
                        break;  
                      case UPLOAD_ERR_FORM_SIZE :  
                          $uploadErrors[$j]['error'] = 'Die Datei ist zu groß (MAX_FILE_SIZE in HTML-Formular).';
                        break;  
                      case UPLOAD_ERR_PARTIAL :  
                          if ($cfg['UPLOAD_ACTIVE']) {  
                                $uploadErrors[$j]['error'] = 'Die Datei wurde nur teilweise hochgeladen.';
                            } else {  
                              $uploadErrors[$j]['error'] = 'Die Datei wurde nur teilweise versendet.';
                              }  
                      break;  
                      case UPLOAD_ERR_NO_TMP_DIR :  
                          $uploadErrors[$j]['error'] = 'Es wurde kein temporärer Ordner gefunden.';
                        break;  
                      case UPLOAD_ERR_CANT_WRITE :  
                          $uploadErrors[$j]['error'] = 'Fehler beim Speichern der Datei.';
                        break;  
                      case UPLOAD_ERR_EXTENSION  :  
                          $uploadErrors[$j]['error'] = 'Unbekannter Fehler durch eine Erweiterung.';
                        break;  
                      default :  
                          if ($cfg['UPLOAD_ACTIVE']) {  
                                $uploadErrors[$j]['error'] = 'Unbekannter Fehler beim Hochladen.';
                            } else {  
                              $uploadErrors[$j]['error'] = 'Unbekannter Fehler beim Versenden des Email-Attachments.';
                            }  
                  }  

                  $j++;  
                  $error = true;  
              }  
              else if ($totalUploadSize > $cfg['MAX_ATTACHMENT_SIZE']*1024) {  
                  $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  $uploadErrors[$j]['error'] = 'Maximaler Upload erreicht ('.$cfg['MAX_ATTACHMENT_SIZE'].' KB).';
                    $j++;  
                  $error = true;  
              }  
              else if ($_FILES['f']['size'][$i] > $cfg['MAX_FILE_SIZE']*1024) { 
                   $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  $uploadErrors[$j]['error'] = 'Die Datei ist zu groß (max. '.$cfg['MAX_FILE_SIZE'].' KB).';
                    $j++;  
                  $error = true;  
              }  
              else if (!empty($cfg['BLACKLIST_EXT']) && strpos($cfg['BLACKLIST_EXT'], $extension) !== false) {
                    $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  $uploadErrors[$j]['error'] = 'Die Dateiendung ist nicht erlaubt.';
                    $j++;  
                  $error = true;  
              }  
              else if (preg_match("=^[\\:*?<>|/]+$=", $_FILES['f']['name'][$i])) {
                    $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  $uploadErrors[$j]['error'] = 'Ungültige Zeichen im Dateinamen (\/:*?<>|).';
                    $j++;  
                  $error = true;  
              }  
              else if ($cfg['UPLOAD_ACTIVE'] && file_exists($cfg['UPLOAD_FOLDER'].'/'.$_FILES['f']['name'][$i])) {
                    $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  $uploadErrors[$j]['error'] = 'Die Datei existiert bereits.';  
                  $j++;  
                  $error = true;  
              }  
              else {  
                  if ($cfg['UPLOAD_ACTIVE']) {  
                     move_uploaded_file($_FILES['f']['tmp_name'][$i], $cfg['UPLOAD_FOLDER'].'/'.$_FILES['f']['name'][$i]);    
                    }  
                  $uploadedFiles[] = $_FILES['f']['name'][$i];  
              }  
          }  
      }  

      if ($error) {  
          $errorMessage = 'Es sind folgende Fehler beim Versenden des Kontaktformulars aufgetreten:'."\n";
            if (count($uploadErrors) > 0) {  
              foreach ($uploadErrors as $err) {  
                  $tmp .= '<strong>'.$err['name']."</strong><br/>\n- ".$err['error']."<br/><br/>\n";
                }  
              $tmp = "<br/><br/>\n".$tmp;  
          }  
          $errorMessage .= $tmp.'';  
          $fehler['upload'] = $errorMessage;  
      }  
  }  



   if (!isset($fehler))  
   {  


   $recipient = "".$empfaenger."";  
   $betreff = "".$_POST["betreff"]."";  
   $mailheaders = "From: \"".stripslashes($_POST["vorname"])." ".stripslashes($_POST["name"])."\" <".$_POST["email"].">\n";
     $mailheaders .= "Reply-To: <".$_POST["email"].">\n";  
   $mailheaders .= "X-Mailer: PHP/" . phpversion() . "\n";  


   $msg  = "Folgendes wurde am ". $date ." Uhr &uuml;ber das Kontaktformular auf www.atw-parts.de geschickt:\n" . "\n\n";
     $msg .= "Name: " . $anrede . " " . $titel . "" . $vorname . " " . $name . "\n";
  $msg .= "Firma: " . $firma . "\n\n";  
$msg .= "E-Mail: " . $email . "\n";  
$msg .= "Telefon: " . $telefon . "\n";  
$msg .= "\nBetreff: " . $betreff . "\n";  
$msg .= "Nachricht:\n" . $_POST['nachricht'] = preg_replace("/\r\r|\r\n|\n\r|\n\n/","\n",$_POST['nachricht']) . "\n\n";
   
   "-------------------------------------------------------------------------\n\n";
   if (count($uploadedFiles) > 0) {  
       if ($cfg['UPLOAD_ACTIVE']) {  
              $msg .= 'Es wurden folgende Dateien hochgeladen:'."\n";  
           foreach ($uploadedFiles as $file) {  
               $msg .= ' - '.$cfg['DOWNLOAD_URL'].'/'.$cfg['UPLOAD_FOLDER'].'/'.$file."\n";
             }  
       } else {  
           $msg .= 'Es wurden folgende Dateien angehängt:'."\n";  
           foreach ($uploadedFiles as $file) {  
               $msg .= ' - '.$file."\n";  
           }  
       }  
   }  
  $msg .= "\n\nIP Adresse: " . $ip . "\n";  

     


    if (!$cfg['UPLOAD_ACTIVE'] && count($uploadedFiles) > 0) {  
        $attachments = array();  
        for ($i = 0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) {  
               if ($_FILES['f']['name'][$i] == UPLOAD_ERR_NO_FILE) {  
                continue;  
            }  
            $attachments[] = $_FILES['f']['tmp_name'][$i];  
        }  
        $boundary = md5(uniqid(rand(), true));  
        $mailheaders .= "MIME-Version: 1.0\n";  
        $mailheaders .= "Content-Transfer-Encoding: 8bit\n";  
        $mailheaders .= "Content-Type: multipart/mixed;\n\tboundary=\"".$boundary."\"\n";
          $mailheaders .= "\n--".$boundary."\n";  
        $mailheaders .= "Content-Type: text/plain;\n\tcharset=\"UTF-8\"\n";  
        $mailheaders .= "Content-Transfer-Encoding: 8bit\n";  
        for ($i = 0; $i < count($uploadedFiles); $i++) {  
            $file = fopen($attachments[$i],"r");  
            $content = fread($file,filesize($attachments[$i]));  
            fclose($file);  
            $encodedfile = chunk_split(base64_encode($content));  
            $msg .= "\n\n--".$boundary."\n";  
            $msg .= "Content-Type: application/octet-stream;\n\tname=\"".$uploadedFiles[$i]."\"\n";
              $msg .= "Content-Transfer-Encoding: base64\n";  
            $msg .= "Content-Disposition: attachment;\n\tfilename=\"".$uploadedFiles[$i]."\"\n\n";
              $msg .= $encodedfile."\n\n";  
        }  
        $msg .= "\n\n--".$boundary."--";  
    }  


   $msg = strip_tags ($msg);  

     
   $dsubject = "Your request";   
   $dmailheaders = "From: ".$ihrname." <".$recipient.">\n";  
   $dmailheaders .= "Reply-To: <".$recipient.">\n";  
   $dmailheaders .= "Content-Type: text/plain; Charset=utf-8\n"; 
   $dmsg  = "??????? ?? B??? ?????????. ?? ??????????? ??? ????? ??????? ?????????? ??? ??????.\n\n";
     $dmsg .= "????? ?????? ???????.\n" .  
  "\n\n";  
   $dmsg .= "???: " . $anrede . " " . $titel . "" . $vorname . " " . $name . "\n";
  $dmsg .= "?????: " . $firma . "\n\n";  
$dmsg .= "E-Mail: " . $email . "\n";  
$dmsg .= "???????:: " . $telefon . "\n";  
$dmsg .= "\n????: " . $betreff . "\n";  
$dmsg .= "?????????:\n" . str_replace("\r", "", $nachricht) . "\n\n";  
     
   if (count($uploadedFiles) > 0) {  
       $dmsg .= ''."\n";  
       foreach ($uploadedFiles as $file) {  
           $dmsg .= ' - '.$file."\n";  
       }  
   }  
   $dmsg = strip_tags ($dmsg);  


if (mail($recipient,$betreff,$msg,$mailheaders)) {  
mail($email, $dsubject, $dmsg, $dmailheaders);  


echo "<META HTTP-EQUIV=\"refresh\" content=\"0;URL=danke.php\">";  
exit;  
   
}  
}  
}  

?> 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de-DE" lang="de-DE">

<head>

	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
	<meta name="language" content="de"/>
	<meta name="description" content="www.atw-parts.de"/>
	<meta name="revisit" content="After 7 days"/>
	<meta name="robots" content="INDEX,FOLLOW"/>
	<meta http-equiv="Content-Style-Type" content="text/css" />   
	<meta http-equiv="Content-Script-Type" content="text/javascript" />

	<title>::: AUTOTEILE Werther ::: ???????????? ???????? ? ????? ?? ???</title>

	<style type="text/css">

	body	{margin:0px;
		padding:0px;
	     	font-size:12pt;
     		font-family:'Georgia', serif;
		color:#777777;}

	#kontaktformular	{width:860px;
				height:300px
				margin:0px;
				padding:0px;
     				font-size:12pt;
     				font-family:'Georgia', serif;
     				float:left;
     				color:#777777;}

	#anfrage	{width:370px;

			height:300px;
			margin:0px;
			padding:0px;
     			float:left;
			background-color:#;}

	#block_rechts	{width:400px;
			height:300px;
			margin:0px 0px 0px 20px;
			padding:0px;
	     		float:left;
			background-color:#;}

	#kontaktdaten	{width:430px;
			margin:0px;
			padding:0px;
			clear:both;}

	#dateianhang	{width:380px;
			height:50px;
			margin:10px 0px 0px 0px;
			padding:0px;
	     		clear:both;
			background-color:#;
			border:0px;
			text-align:center;}
         
	#buttons	{width:400px;
			height:50px
			margin:0px;
			padding:0px;
     			clear:both;
			text-align:center;}

	.label	{width:320px; 
		padding:0px;
		margin:0px;
		font-size:12pt;
		background-color:#;}

	.field	{width:300px;
		padding:0px;
		margin:0px;}

	.error 	{width:300px; 
		padding:0px 0px 0px 5px;}

	.pflichtfeld {color:##c31924;}
	 
	.zurueck {color:#c31924;}

	</style>

</head>

<body>

??? ??????????? ??? ?????????? ????????.<br>
<br>

<div id="kontaktformular">

	<form action="<?php $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
	<p><input style="width:0px; height:0px; visibility:hidden;" type="hidden" name="action" value="smail" /></p>
	<p><input style="width:0px; height:0px; visibility:hidden;" type="hidden" name="content" value="formular"/></p>

	<div id="anfrage">
   		
		<table>
			<tr>
				<td class="label"><label>????: <span class="pflichtfeld">*</span></label></td>
				<td class="field"><?php if ($fehler["betreff"] != "") { echo $fehler["betreff"]; } ?><input type="text" name="betreff" style="width:250px;padding:0px;margin:0px;" maxlength="150" value="<?php echo $_POST[betreff]; ?>" size="30" <?php if ($fehler["betreff"] != "") { echo 'class="errordesignfields"'; } ?>/></td>
			
			</tr>
			
			<tr>	
    			
				<td class="label"><label>?????????: <span class="pflichtfeld">*</span></label></td>
	    			<td class="field"><?php if ($fehler["nachricht"] != "") { echo $fehler["nachricht"]; } ?><textarea name="nachricht" style="width:250px;padding:0px;margin:10px 0px 0px 0px;"  cols="30" rows="15" <?php if ($fehler["nachricht"] != "") { echo 'class="errordesignfields"'; } ?>><?php echo $_POST[nachricht]; ?></textarea></td>
	
			</tr>
	
		</table>
 	
	</div>

	<div id="block_rechts">

	<div id="kontaktdaten">

		<table>
			
			<tr>
				<td class="label"><label>???: <span class="pflichtfeld">*</span></label></td>
				<td class="field"> <?php if ($fehler["vorname"] != "") { echo $fehler["vorname"]; } ?><input type="text" name="vorname" style="width:250px;padding:0px;margin:0px;" maxlength="25" value="<?php echo $_POST[vorname]; ?>" size="20" <?php if ($fehler["vorname"] != "") { echo 'class="errordesignfields"'; } ?>/></td>
		
			</tr>
			
			<tr>
				<td class="label"><label>??????: <span class="pflichtfeld">*</span></label></td>
				<td class="field"> <?php if ($fehler["name"] != "") { echo $fehler["name"]; } ?><input type="text" name="name" style="width:250px;paddingng:0px;margin:10px 0px 0px 0px;" maxlength="25" id="textfield" value="<?php echo $_POST[name]; ?>" size="20" <?php if ($fehler["name"] != "") { echo 'class="errordesignfields"'; } ?>/></td>
			
			</tr>

			<tr>
				<td class="label"><label>?????: </label></td>
				<td class="field"><input type="text" name="firma" style="width:250px;padding:0px;margin:10px 0px 0px 0px;" maxlength="150" value="<?php echo $_POST[firma]; ?>" size="20"/></td>
				<td class="error"></td>
			</tr>

			<tr>
				<td class="label"><label>???????: </label></td>
				<td class="field"><input type="text" name="telefon" style="width:250px;padding:0px;margin:10px 0px 0px 0px;" maxlength="200" value="<?php echo $_POST[telefon]; ?>" size="20" /></td>
		
			</tr>	

			<tr>
				<td class="label"><label>E-Mail: <span class="pflichtfeld">*</span></label></td>
				<td class="field"><?php if ($fehler["email"] != "") { echo $fehler["email"]; } ?><input type="text" name="email" style="width:250px;padding:0px;margin:10px 0px 0px 0px;" maxlength="200" value="<?php echo $_POST[email]; ?>" size="20" <?php if ($fehler["email"] != "") { echo 'class="errordesignfields"'; } ?>/></td>

			</tr>
		
			

		</table>

	</div>


	<br><div class="label"><label>?????????? ???? (???????????? 5 Mb)</label></div>
	
 
 	<div id="dateianhang">
	
		<?php
		      for ($i=0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) {
		        echo '<fieldset class="upload">';
		 	echo '<input type="file" size="16" name="f[]" /><br />';
			echo '</fieldset>';
      			}
		?>

	</div>

	<div id="buttons">
   
		<p style="font-size:10pt;"><span class="pflichtfeld">*</span> ???????????</p>
   
			<input type="submit" name="mt-mk" value="????????" onclick="tescht();"/>
		   	<input type="submit" name="delete" value="?????" />
		
	</div>

	</div>

	</form>

</div>

</body>
</html>
 
Und so?

Code:
<?php  
session_start();  
 
  $script_root = substr(__FILE__, 0,  
                        strrpos(__FILE__,  
                                DIRECTORY_SEPARATOR)  
                       ).DIRECTORY_SEPARATOR;  
 
require_once $script_root.'upload.php';  
 
$remote = getenv("REMOTE_ADDR");  
 
function encrypt($string, $key) {  
$result = '';  
for($i=0; $i<strlen($string); $i++) {  
   $char = substr($string, $i, 1);  
   $keychar = substr($key, ($i % strlen($key))-1, 1);  
   $char = chr(ord($char)+ord($keychar));  
   $result.=$char;  
}  
return base64_encode($result);  
}  
$sicherheits_eingabe = encrypt($_POST["sicherheitscode"], "8h384ls94");  
$sicherheits_eingabe = str_replace("=", "", $sicherheits_eingabe);  
 
@require('config.php');  
 
if ($_POST['delete'])  
{  
unset($_POST);  
}  
 
if ($_POST["mt-mk"]) {  
 
   $anrede      = $_POST["anrede"];  
$titel      = $_POST["titel"];  
     
$vorname      = $_POST["vorname"];  
$name      = $_POST["name"];  
$firma   = $_POST["firma"];  
   $telefon   = $_POST["telefon"];  
$email      = $_POST["email"];  
$betreff   = $_POST["betreff"];  
$nachricht   = $_POST["nachricht"];  
   $sicherheitscode   = $_POST["sicherheitscode"];  
   $date = date("d.m.Y | H:i");  
   $ip = $_SERVER['REMOTE_ADDR'];   
   $UserAgent = $_SERVER["HTTP_USER_AGENT"];  
   $host = getHostByAddr($remote);  
 
$anrede = stripslashes($anrede);  
$vorname = stripslashes($vorname);  
$name = stripslashes($name);  
$email = stripslashes($email);  
$betreff = stripslashes($betreff);  
$nachricht = stripslashes($nachricht);  
   
if (isset($anrede) && $anrede == "0") {  
    
          $fehler['anrede'] = "<font color=#c31924>Bitte wählen Sie eine <strong>Anrede</strong> aus.<br /></font>";
   
  }  
 
 
if(!$vorname) {  
   
 $fehler['vorname'] = "<font color=#c31924><strong>???</strong><br /></font>";  
   
}  
 
 
if(!$name) {  
   
 $fehler['name'] = "<font color=#c31924><strong>??????</strong><br /></font>";  
   
}  
 
 
if (!preg_match("/^[0-9a-zA-ZÄÜÖ_.-]+@[0-9a-z.-]+\.[a-z]{2,6}$/", $email)) {  
   $fehler['email'] = "<font color=#c31924><strong>E-Mail-Adresse</strong>\n<br /></font>";
  }  
 
   
if(!$betreff) {  
   
 $fehler['betreff'] = '<font color=#c31924><strong>????:</strong><br /></font>';
     
   
}  
   
if(!$nachricht) {  
   
 $fehler['nachricht'] = '<font color=#c31924><strong>?????????</strong><br /></font>';
     
   
}  
 
if($sicherheits_eingabe != $_SESSION['captcha_spam']){  
unset($_SESSION['captcha_spam']);  
   $fehler['captcha'] = "<font color=#c31924>Der <strong>Code</strong> wurde falsch eingegeben.<br /></font>";
     }  
 
    if (!isset($fehler) || count($fehler) == 0) {  
      $error             = false;  
      $errorMessage      = '';  
      $uploadErrors      = array();  
      $uploadedFiles     = array();  
      $totalUploadSize   = 0;  
 
      if ($cfg['UPLOAD_ACTIVE'] && in_array($_SERVER['REMOTE_ADDR'], $cfg['BLACKLIST_IP']) === true) {
            $error = true;  
          $fehler['upload'] = '<font color=#c31924>Sie haben keine Erlaubnis Dateien hochzuladen.<br /></font>';
        }  
 
      if (!$error) {  
          for ($i=0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) {  
              if ($_FILES['f']['error'][$i] == UPLOAD_ERR_NO_FILE) {  
                  continue;  
              }  
 
              $extension = explode('.', $_FILES['f']['name'][$i]);  
              $extension = strtolower($extension[count($extension)-1]);  
              $totalUploadSize += $_FILES['f']['size'][$i];  
 
              if ($_FILES['f']['error'][$i] != UPLOAD_ERR_OK) {  
                  $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  switch ($_FILES['f']['error'][$i]) {  
                      case UPLOAD_ERR_INI_SIZE :  
                          $uploadErrors[$j]['error'] = 'Die Datei ist zu groß (PHP-Ini Direktive).';
                        break;  
                      case UPLOAD_ERR_FORM_SIZE :  
                          $uploadErrors[$j]['error'] = 'Die Datei ist zu groß (MAX_FILE_SIZE in HTML-Formular).';
                        break;  
                      case UPLOAD_ERR_PARTIAL :  
                          if ($cfg['UPLOAD_ACTIVE']) {  
                                $uploadErrors[$j]['error'] = 'Die Datei wurde nur teilweise hochgeladen.';
                            } else {  
                              $uploadErrors[$j]['error'] = 'Die Datei wurde nur teilweise versendet.';
                              }  
                      break;  
                      case UPLOAD_ERR_NO_TMP_DIR :  
                          $uploadErrors[$j]['error'] = 'Es wurde kein temporärer Ordner gefunden.';
                        break;  
                      case UPLOAD_ERR_CANT_WRITE :  
                          $uploadErrors[$j]['error'] = 'Fehler beim Speichern der Datei.';
                        break;  
                      case UPLOAD_ERR_EXTENSION  :  
                          $uploadErrors[$j]['error'] = 'Unbekannter Fehler durch eine Erweiterung.';
                        break;  
                      default :  
                          if ($cfg['UPLOAD_ACTIVE']) {  
                                $uploadErrors[$j]['error'] = 'Unbekannter Fehler beim Hochladen.';
                            } else {  
                              $uploadErrors[$j]['error'] = 'Unbekannter Fehler beim Versenden des Email-Attachments.';
                            }  
                  }  
 
                  $j++;  
                  $error = true;  
              }  
              else if ($totalUploadSize > $cfg['MAX_ATTACHMENT_SIZE']*1024) {  
                  $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  $uploadErrors[$j]['error'] = 'Maximaler Upload erreicht ('.$cfg['MAX_ATTACHMENT_SIZE'].' KB).';
                    $j++;  
                  $error = true;  
              }  
              else if ($_FILES['f']['size'][$i] > $cfg['MAX_FILE_SIZE']*1024) { 
                   $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  $uploadErrors[$j]['error'] = 'Die Datei ist zu groß (max. '.$cfg['MAX_FILE_SIZE'].' KB).';
                    $j++;  
                  $error = true;  
              }  
              else if (!empty($cfg['BLACKLIST_EXT']) && strpos($cfg['BLACKLIST_EXT'], $extension) !== false) {
                    $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  $uploadErrors[$j]['error'] = 'Die Dateiendung ist nicht erlaubt.';
                    $j++;  
                  $error = true;  
              }  
              else if (preg_match("=^[\\:*?<>|/]+$=", $_FILES['f']['name'][$i])) {
                    $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  $uploadErrors[$j]['error'] = 'Ungültige Zeichen im Dateinamen (\/:*?<>|).';
                    $j++;  
                  $error = true;  
              }  
              else if ($cfg['UPLOAD_ACTIVE'] && file_exists($cfg['UPLOAD_FOLDER'].'/'.$_FILES['f']['name'][$i])) {
                    $uploadErrors[$j]['name'] = $_FILES['f']['name'][$i];  
                  $uploadErrors[$j]['error'] = 'Die Datei existiert bereits.';  
                  $j++;  
                  $error = true;  
              }  
              else {  
                  if ($cfg['UPLOAD_ACTIVE']) {  
                     move_uploaded_file($_FILES['f']['tmp_name'][$i], $cfg['UPLOAD_FOLDER'].'/'.$_FILES['f']['name'][$i]);    
                    }  
                  $uploadedFiles[] = $_FILES['f']['name'][$i];  
              }  
          }  
      }  
 
      if ($error) {  
          $errorMessage = 'Es sind folgende Fehler beim Versenden des Kontaktformulars aufgetreten:'."\n";
            if (count($uploadErrors) > 0) {  
              foreach ($uploadErrors as $err) {  
                  $tmp .= '<strong>'.$err['name']."</strong><br/>\n- ".$err['error']."<br/><br/>\n";
                }  
              $tmp = "<br/><br/>\n".$tmp;  
          }  
          $errorMessage .= $tmp.'';  
          $fehler['upload'] = $errorMessage;  
      }  
  }  
 
 
 
   if (!isset($fehler))  
   {  
 
 
   $recipient = "".$empfaenger."";  
   $betreff = "".$_POST["betreff"]."";  
   $mailheaders = "From: \"".stripslashes($_POST["vorname"])." ".stripslashes($_POST["name"])."\" <".$_POST["email"].">\n";
     $mailheaders .= "Reply-To: <".$_POST["email"].">\n";  
   $mailheaders .= "X-Mailer: PHP/" . phpversion() . "\n";  
 
 
   $msg  = "Folgendes wurde am ". $date ." Uhr &uuml;ber das Kontaktformular auf www.atw-parts.de geschickt:\n" . "\n\n";
     $msg .= "Name: " . $anrede . " " . $titel . "" . $vorname . " " . $name . "\n";
  $msg .= "Firma: " . $firma . "\n\n";  
$msg .= "E-Mail: " . $email . "\n";  
$msg .= "Telefon: " . $telefon . "\n";  
$msg .= "\nBetreff: " . $betreff . "\n";  
$msg .= "Nachricht:\n" . $_POST['nachricht'] = preg_replace("/\r\r|\r\n|\n\r|\n\n/","\n",$_POST['nachricht']) . "\n\n";
   
   "-------------------------------------------------------------------------\n\n";
   if (count($uploadedFiles) > 0) {  
       if ($cfg['UPLOAD_ACTIVE']) {  
              $msg .= 'Es wurden folgende Dateien hochgeladen:'."\n";  
           foreach ($uploadedFiles as $file) {  
               $msg .= ' - '.$cfg['DOWNLOAD_URL'].'/'.$cfg['UPLOAD_FOLDER'].'/'.$file."\n";
             }  
       } else {  
           $msg .= 'Es wurden folgende Dateien angehängt:'."\n";  
           foreach ($uploadedFiles as $file) {  
               $msg .= ' - '.$file."\n";  
           }  
       }  
   }  
  $msg .= "\n\nIP Adresse: " . $ip . "\n";  
 
     
 
 
    if (!$cfg['UPLOAD_ACTIVE'] && count($uploadedFiles) > 0) {  
        $attachments = array();  
        for ($i = 0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) {  
               if ($_FILES['f']['name'][$i] == UPLOAD_ERR_NO_FILE) {  
                continue;  
            }  
            $attachments[] = $_FILES['f']['tmp_name'][$i];  
        }  
        $boundary = md5(uniqid(rand(), true));  
        $mailheaders .= "MIME-Version: 1.0\n";  
        $mailheaders .= "Content-Transfer-Encoding: 8bit\n";  
        $mailheaders .= "Content-Type: multipart/mixed; boundary=\"".$boundary."\"\n";
          $mailheaders .= "\n--".$boundary."\n";  
        $mailheaders .= "Content-Type: text/plain; charset=\"UTF-8\"\n";  
        $mailheaders .= "Content-Transfer-Encoding: 8bit\n";  
        for ($i = 0; $i < count($uploadedFiles); $i++) {  
            $file = fopen($attachments[$i],"r");  
            $content = fread($file,filesize($attachments[$i]));  
            fclose($file);  
            $encodedfile = chunk_split(base64_encode($content));  
            $msg .= "\n\n--".$boundary."\n";  
            $msg .= "Content-Type: application/octet-stream; name=\"".$uploadedFiles[$i]."\"\n";
              $msg .= "Content-Transfer-Encoding: base64\n";  
            $msg .= "Content-Disposition: attachment; filename=\"".$uploadedFiles[$i]."\"\n\n";
              $msg .= $encodedfile."\n\n";  
        }  
        $msg .= "\n\n--".$boundary."--";  
    }  
 
 
   $msg = strip_tags ($msg);  
 
     
   $dsubject = "Your request";   
   $dmailheaders = "From: ".$ihrname." <".$recipient.">\n";  
   $dmailheaders .= "Reply-To: <".$recipient.">\n";  
   $dmailheaders .= "Content-Type: text/plain; Charset=utf-8\n"; 
   $dmsg  = "??????? ?? B??? ?????????. ?? ??????????? ??? ????? ??????? ?????????? ??? ??????.\n\n";
     $dmsg .= "????? ?????? ???????.\n" .  
  "\n\n";  
   $dmsg .= "???: " . $anrede . " " . $titel . "" . $vorname . " " . $name . "\n";
  $dmsg .= "?????: " . $firma . "\n\n";  
$dmsg .= "E-Mail: " . $email . "\n";  
$dmsg .= "???????:: " . $telefon . "\n";  
$dmsg .= "\n????: " . $betreff . "\n";  
$dmsg .= "?????????:\n" . str_replace("\r", "", $nachricht) . "\n\n";  
     
   if (count($uploadedFiles) > 0) {  
       $dmsg .= ''."\n";  
       foreach ($uploadedFiles as $file) {  
           $dmsg .= ' - '.$file."\n";  
       }  
   }  
   $dmsg = strip_tags ($dmsg);  
 
 
if (mail($recipient,$betreff,$msg,$mailheaders)) {  
mail($email, $dsubject, $dmsg, $dmailheaders);  
 
 
echo "<META HTTP-EQUIV=\"refresh\" content=\"0;URL=danke.php\">";  
exit;  
   
}  
}  
}  
 
?> 
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de-DE" lang="de-DE">
 
<head>
 
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
    <meta name="language" content="de"/>
    <meta name="description" content="www.atw-parts.de"/>
    <meta name="revisit" content="After 7 days"/>
    <meta name="robots" content="INDEX,FOLLOW"/>
    <meta http-equiv="Content-Style-Type" content="text/css" />   
    <meta http-equiv="Content-Script-Type" content="text/javascript" />
 
    <title>::: AUTOTEILE Werther ::: ???????????? ???????? ? ????? ?? ???</title>
 
    <style type="text/css">
 
    body    {margin:0px;
        padding:0px;
            font-size:12pt;
            font-family:'Georgia', serif;
        color:#777777;}
 
    #kontaktformular    {width:860px;
                height:300px
                margin:0px;
                padding:0px;
                    font-size:12pt;
                    font-family:'Georgia', serif;
                    float:left;
                    color:#777777;}
 
    #anfrage    {width:370px;
 
            height:300px;
            margin:0px;
            padding:0px;
                float:left;
            background-color:#;}
 
    #block_rechts   {width:400px;
            height:300px;
            margin:0px 0px 0px 20px;
            padding:0px;
                float:left;
            background-color:#;}
 
    #kontaktdaten   {width:430px;
            margin:0px;
            padding:0px;
            clear:both;}
 
    #dateianhang    {width:380px;
            height:50px;
            margin:10px 0px 0px 0px;
            padding:0px;
                clear:both;
            background-color:#;
            border:0px;
            text-align:center;}
         
    #buttons    {width:400px;
            height:50px
            margin:0px;
            padding:0px;
                clear:both;
            text-align:center;}
 
    .label  {width:320px; 
        padding:0px;
        margin:0px;
        font-size:12pt;
        background-color:#;}
 
    .field  {width:300px;
        padding:0px;
        margin:0px;}
 
    .error  {width:300px; 
        padding:0px 0px 0px 5px;}
 
    .pflichtfeld {color:##c31924;}
     
    .zurueck {color:#c31924;}
 
    </style>
 
</head>
 
<body>
 
??? ??????????? ??? ?????????? ????????.<br>
<br>
 
<div id="kontaktformular">
 
    <form action="<?php $_SERVER['PHP_SELF'];?>" method="post" enctype="multipart/form-data" accept-charset="UTF-8">
    <p><input style="width:0px; height:0px; visibility:hidden;" type="hidden" name="action" value="smail" /></p>
    <p><input style="width:0px; height:0px; visibility:hidden;" type="hidden" name="content" value="formular"/></p>
 
    <div id="anfrage">
        
        <table>
            <tr>
                <td class="label"><label>????: <span class="pflichtfeld">*</span></label></td>
                <td class="field"><?php if ($fehler["betreff"] != "") { echo $fehler["betreff"]; } ?><input type="text" name="betreff" style="width:250px;padding:0px;margin:0px;" maxlength="150" value="<?php echo $_POST[betreff]; ?>" size="30" <?php if ($fehler["betreff"] != "") { echo 'class="errordesignfields"'; } ?>/></td>
            
            </tr>
            
            <tr>    
                
                <td class="label"><label>?????????: <span class="pflichtfeld">*</span></label></td>
                    <td class="field"><?php if ($fehler["nachricht"] != "") { echo $fehler["nachricht"]; } ?><textarea name="nachricht" style="width:250px;padding:0px;margin:10px 0px 0px 0px;"  cols="30" rows="15" <?php if ($fehler["nachricht"] != "") { echo 'class="errordesignfields"'; } ?>><?php echo $_POST[nachricht]; ?></textarea></td>
    
            </tr>
    
        </table>
    
    </div>
 
    <div id="block_rechts">
 
    <div id="kontaktdaten">
 
        <table>
            
            <tr>
                <td class="label"><label>???: <span class="pflichtfeld">*</span></label></td>
                <td class="field"> <?php if ($fehler["vorname"] != "") { echo $fehler["vorname"]; } ?><input type="text" name="vorname" style="width:250px;padding:0px;margin:0px;" maxlength="25" value="<?php echo $_POST[vorname]; ?>" size="20" <?php if ($fehler["vorname"] != "") { echo 'class="errordesignfields"'; } ?>/></td>
        
            </tr>
            
            <tr>
                <td class="label"><label>??????: <span class="pflichtfeld">*</span></label></td>
                <td class="field"> <?php if ($fehler["name"] != "") { echo $fehler["name"]; } ?><input type="text" name="name" style="width:250px;paddingng:0px;margin:10px 0px 0px 0px;" maxlength="25" id="textfield" value="<?php echo $_POST[name]; ?>" size="20" <?php if ($fehler["name"] != "") { echo 'class="errordesignfields"'; } ?>/></td>
            
            </tr>
 
            <tr>
                <td class="label"><label>?????: </label></td>
                <td class="field"><input type="text" name="firma" style="width:250px;padding:0px;margin:10px 0px 0px 0px;" maxlength="150" value="<?php echo $_POST[firma]; ?>" size="20"/></td>
                <td class="error"></td>
            </tr>
 
            <tr>
                <td class="label"><label>???????: </label></td>
                <td class="field"><input type="text" name="telefon" style="width:250px;padding:0px;margin:10px 0px 0px 0px;" maxlength="200" value="<?php echo $_POST[telefon]; ?>" size="20" /></td>
        
            </tr>   
 
            <tr>
                <td class="label"><label>E-Mail: <span class="pflichtfeld">*</span></label></td>
                <td class="field"><?php if ($fehler["email"] != "") { echo $fehler["email"]; } ?><input type="text" name="email" style="width:250px;padding:0px;margin:10px 0px 0px 0px;" maxlength="200" value="<?php echo $_POST[email]; ?>" size="20" <?php if ($fehler["email"] != "") { echo 'class="errordesignfields"'; } ?>/></td>
 
            </tr>
        
            
 
        </table>
 
    </div>
 
 
    <br><div class="label"><label>?????????? ???? (???????????? 5 Mb)</label></div>
    
 
    <div id="dateianhang">
    
        <?php
              for ($i=0; $i < $cfg['NUM_ATTACHMENT_FIELDS']; $i++) {
                echo '<fieldset class="upload">';
            echo '<input type="file" size="16" name="f[]" /><br />';
            echo '</fieldset>';
                }
        ?>
 
    </div>
 
    <div id="buttons">
   
        <p style="font-size:10pt;"><span class="pflichtfeld">*</span> ???????????</p>
   
            <input type="submit" name="mt-mk" value="????????" onclick="tescht();"/>
            <input type="submit" name="delete" value="?????" />
        
    </div>
 
    </div>
 
    </form>
 
</div>
 
</body>
</html>
 
Zurück