<?php
$zieladresse = 'lehnertmarcus@web.de';

// Welche Adresse soll als Absender angegeben werden?
// (Manche Hoster lassen diese Angabe vor dem Versenden der Mail ueberschreiben)
$absenderadresse = 'lehnertmarcus@web.de';
$betreff = 'Kundenzufriedenheitsumfrage';
$urlDankeSeite = 'https://lehnertmarcus.lima-city.de/danke_anfrage.html';

// Welche(s) Zeichen soll(en) zwischen dem Feldnamen und dem angegebenen Wert stehen?
$trenner = ":\t"; // Doppelpunkt + Tabulator
if ($_SERVER['REQUEST_METHOD'] === "POST") {

	$header = array();
	$header[] = "From: ".mb_encode_mimeheader($absendername, "utf-8", "Q")." <".$absenderadresse.">";
	
		$header[] = "MIME-Version: 1.0";
	$header[] = "Content-type: text/plain; charset=utf-8";
	$header[] = "Content-transfer-encoding: 8bit";
	
    $mailtext = "";

    foreach ($_POST as $name => $wert) {
        if (is_array($wert)) {
		    foreach ($wert as $einzelwert) {
			    $mailtext .= $name.$trenner.$einzelwert."\n";
            }
        } else {
            $mailtext .= $name.$trenner.$wert."\n";
        }
    }

    mail(
    	$zieladresse, 
    	mb_encode_mimeheader($betreff, "utf-8", "Q"), 
    	$mailtext,
    	implode("\n", $header)
    ) or die("Die Mail konnte nicht versendet werden.");
    header("Location: $urlDankeSeite");
    exit;
    
}

header("Content-type: text/html; charset=utf-8");

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xml:lang="de" xmlns="http://www.w3.org/1999/xhtml">

	<head>
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<title>Umfrage Kundenzufriedenheit</title>
		<meta name="author" content="Druckerei" />
		<meta name="publisher" content="" />
		<meta name="copyright" content="" />
		<script type="text/javascript" src="umfrage_files/JQuery.js"></script>
		<script type="text/javascript" src="umfrage_files/Jscript.js"></script>
		<link href="css/agl-styles.css" type="text/css" rel="stylesheet" media="all" />
		<style type="text/css" media="screen"><!--
#Umfrage{width: 1187px;height: 637px;}
.ds1/*agl rulekind: base;*/{color: #ffffb4;}
.ds2/*agl rulekind: base;*/{color: #ffffb4;font-size: 24px;font-family: arial;font-weight: bold;}
.ds3/*agl rulekind: base;*/{color: #ffffb4;font-size: 15px;font-family: arial;}
.ds5/*agl rulekind: base;*/{color: #ffffb4;font-size: 18px;font-family: arial;}
.ds6/*agl rulekind: base;*/{color: #ffffb4;font-size: 12px;font-family: arial;font-weight: bold;}
.ds7/*agl rulekind: base;*/{font-size: 12px;font-family: arial;font-weight: bold;}
.ds13/*agl rulekind: base;*/{color: #ffffb4;font-size: 12px;}
.ds14/*agl rulekind: base;*/{color: #ffffb4;font-size: 15px;}
.ds15/*agl rulekind: base;*/{font-size: 12px;font-family: arial;}
.ds16/*agl rulekind: base;*/{font-size: 15px;font-family: arial;}
.dsR5204 /*agl rulekind: base;*/ { height: 85px; }
.dsR5295 /*agl rulekind: base;*/ { width: 165px; height: 19px; }
#DataList1_ctl02_question_TextType { width: 1044px; height: 107px; }
.dsR5050 /*agl rulekind: base;*/ { width: 17px; height: auto; }
.dsR5051 /*agl rulekind: base;*/ { width: auto; height: auto; }
.ds22 /*agl rulekind: base;*/ { font-size: 15px; font-family: arial; font-weight: bold; }
.dsR5738 /*agl rulekind: base;*/ { width: 434px; height: 179px; }
.dsR5778 /*agl rulekind: base;*/ { width: 599px; height: 180px; vertical-align: top; }
.dsR5779 /*agl rulekind: base;*/ { width: 434px; height: 180px; vertical-align: top; }
#specialTD { width: 660px; }
#DataList1_ctl01_question_RangeTypeNotRequired_2 { width: auto; height: auto; }
.ds25 /*agl rulekind: base;*/ { color: #ffffb4; font-size: 15px; font-family: arial; font-weight: bold; }
#Name { background-color: #fd4646; width: 348px; height: auto; }
.ds26 /*agl rulekind: base;*/ { color: #f00; }
.dsR5897 /*agl rulekind: base;*/ { width: 125px; }
.dsR5898 /*agl rulekind: base;*/ { width: 249px; height: 19px; }
.dsR5899 /*agl rulekind: base;*/ { width: 228px; height: 19px; }
.dsR5900 /*agl rulekind: base;*/ { width: 625px; height: 20px; }
.dsR5901 /*agl rulekind: base;*/ { width: 615px; height: 88px; }
.dsR5957 /*agl rulekind: base;*/ { text-align: left; width: 660px; height: 30px; }
.dsR5958 /*agl rulekind: base;*/ { width: 660px; height: 20px; }
.dsR5962 /*agl rulekind: base;*/ { width: 680px; height: 174px; }
.dsR5986 /*agl rulekind: base;*/ { width: 160px; vertical-align: bottom; }
.dsR6051 /*agl rulekind: base;*/ { width: 1000px; vertical-align: top; }
.dsR6052 /*agl rulekind: base;*/ { width: 1064px; height: 127px; }
.dsR6062 /*agl rulekind: base;*/ { width: 1000px; height: 26px; }
.dsR6063 /*agl rulekind: base;*/ { width: 1000px; height: 15px; }
.dsR6066 /*agl rulekind: base;*/ { height: 35px; vertical-align: top; }
.dsR6067 /*agl rulekind: base;*/ { width: 420px; height: auto; }
.dsR6068 /*agl rulekind: base;*/ { top: 619px; left: 30px; width: 1064px; height: 91px; }
.ds27 /*agl rulekind: base;*/ { color: #fd4646; }
.dsR6079 /*agl rulekind: base;*/ { width: 150px; height: 20px; }
.dsR6084 /*agl rulekind: base;*/ { width: 527px; height: 20px; vertical-align: top; }
.dsR6085 /*agl rulekind: base;*/ { width: 829px; height: 27px; }
.dsR6086 /*agl rulekind: base;*/ { width: 152px; height: 20px; }
.dsR6091 /*agl rulekind: base;*/ { width: 530px; height: 28px; }
.dsR6092 /*agl rulekind: base;*/ { width: 200px; vertical-align: bottom; }
.dsR6093 /*agl rulekind: base;*/ { width: 164px; vertical-align: bottom; }
.dsR6094 /*agl rulekind: base;*/ { width: 1114px; height: 180px; }
.dsR6106 /*agl rulekind: base;*/ { top: 460px; left: 30px; width: 1071px; height: 213px; }
.dsR6107 /*agl rulekind: base;*/ { width: 510px; height: 26px; vertical-align: top; }
.dsR6108 /*agl rulekind: base;*/ { width: 510px; vertical-align: top; }
#umfrage { width: 1128px; height: 613px; }
--></style>
	</head>

	<body bgcolor="#003366" text="white" link="#00ccff" vlink="#00ccff" alink="#00ccff">
		   <img src="Home/druckereilogo.gif" alt="" height="90" width="240" border="0" /><br />
		    <form id="umfrage" action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post" name="umfrage">
			<table class="dsR6094" border="0" cellspacing="0" cellpadding="0">
				<tr>
					<td class="dsR5779">
						<table class="dsR5738" border="0" cellspacing="10" cellpadding="0">
							<tr>
								<td class="dsR6066"><span class="ds1"> </span><span class="ds2">Umfrage zur Kundenzufriedenheit</span></td>
							</tr>
							<tr>
								<td class="dsR5204"><span class="ds3">Sie haben in den letzten Tagen eine Lieferung von der<br />
										Druckerei erhalten.<br />
										<br />Wir sind ständig bemüht, unsere Leistungen zu verbessern<br />
										und freuen uns, wenn Sie uns kurz bewerten.</span></td>
							</tr>
						</table>
					</td>
					<td class="dsR5778">
						<table class="dsR5962" cellspacing="10">
							<tbody>
								<tr>
									<td class="style3 dsR5958">
										<table class="dsR5900" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td class="dsR5898"><b><span class="ds5">sehr zufrieden</span></b></td>
												<td class="dsR5899"><b><span class="ds5">zufrieden</span></b></td>
												<td class="dsR5295"><b><span class="ds5">sehr unzufrieden</span></b></td>
											</tr>
										</table>
									</td>
								</tr>
								<tr>
									<td id="specialTD">
										<table class="dsR5901" border="0" cellspacing="0" cellpadding="0">
											<tr>
												<td class="dsR5897"><img src="umfrage_files/5.jpg" alt="Meget utilfreds" height="88" width="88" /></td>
												<td class="dsR5897"><img src="umfrage_files/4.jpg" alt="Tilfreds" height="88" width="88" /></td>
												<td class="dsR5897"><img src="umfrage_files/3.jpg" alt="Fint" height="88" width="88" /></td>
												<td class="dsR5897"><img src="umfrage_files/2.jpg" alt="Utilfreds" height="88" width="88" /></td>
												<td class="dsR5897"><img src="umfrage_files/1.jpg" alt="Meget tilfreds" height="88" width="88" /></td>
											</tr>
										</table>
									</td>
									<!--<td colspan="5">
                                                            <span style="margin-left: 0;"><img src="5.jpg" /></span>
                                                            <span style="margin-left: 40px"><img src="4.jpg" /></span>
                                                            <span style="margin-left: 40px"><img src="3.jpg" /></span>
                                                            <span style="margin-left: 40px"><img src="2.jpg" /></span>
                                                            <span style="margin-left: 40px"><img src="1.jpg" /></span>
                                                        </td>--></tr>
								<!--
                                                     <tr>
                                                         <td ID="specialTD">
                                                             &nbsp;</td>
                                                         <td class="style4">
                                                             &nbsp;</td>
                                                         <td class="style4">
                                                             &nbsp;</td>
                                                         <td class="style4">
                                                             &nbsp;</td>
                                                         <td class="style4">
                                                             &nbsp;</td>
                                                         <td class="style5">
                                                             &nbsp;</td>
                                                     </tr>
                                                     -->
								<tr>
									<td class="dsR5957"><span id="DataList1_ctl01_question_RangeTypeNotRequired" style="display:inline-block;width:890px;"><span style="margin-left: 12px;"><input id="DataList1_ctl01_question_RangeTypeNotRequired_0" type="radio" name="DataList1$ctl01$question$RangeTypeNotRequired" value="10" /><label for="DataList1_ctl01_question_RangeTypeNotRequired_0"><span class="ds6">10</span></label></span><span style="margin-left: 35px;"><input id="DataList1_ctl01_question_RangeTypeNotRequired_1" type="radio" name="DataList1$ctl01$question$RangeTypeNotRequired" value="9" /><label for="DataList1_ctl01_question_RangeTypeNotRequired_1"><span class="ds7">9</span></label></span><span style="margin-left: 35px;"><input id="DataList1_ctl01_question_RangeTypeNotRequired_2" type="radio" name="DataList1$ctl01$question$RangeTypeNotRequired" value="8" /><label for="DataList1_ctl01_question_RangeTypeNotRequired_2"><span class="ds6">8</span></label></span><span style="margin-left: 35px;"><input id="DataList1_ctl01_question_RangeTypeNotReuired_3" type="radio" name="DataList1$ctl01$question$RangeTypeNotRequired" value="7" /><label for="DataList1_ctl01_question_RangeTypeNotRequired_3"><span class="ds6">7</span></label></span><span style="margin-left: 35px;"><input id="DataList1_ctl01_question_RangeTypeNotRequired_4" type="radio" name="DataList1$ctl01$question$RangeTypeNotRequired" value="6" /><label for="DataList1_ctl01_question_RangeTypeNotRequired_4"><span class="ds6">6</span></label></span><span style="margin-left: 35px;"><input id="DataList1_ctl01_question_RangeTypeNotRequired_5" type="radio" name="DataList1$ctl01$question$RangeTypeNotRequired" value="5" /><label for="DataList1_ctl01_question_RangeTypeNotRequired_5"><span class="ds6">5</span></label></span><span style="margin-left: 35px;"><input id="DataList1_ctl01_question_RangeTypeNotRequired_6" type="radio" name="DataList1$ctl01$question$RangeTypeNotRequired" value="4" /><label for="DataList1_ctl01_question_RangeTypeNotRequired_6"><span class="ds6">4</span></label></span><span style="margin-left: 35px;"><input id="DataList1_ctl01_question_RangeTypeNotRequired_7" type="radio" name="DataList1$ctl01$question$RangeTypeNotRequired" value="3" /><label for="DataList1_ctl01_question_RangeTypeNotRequired_7"><span class="ds6">3</span></label></span><span style="margin-left: 35px;"><input id="DataList1_ctl01_question_RangeTypeNotRequired_8" type="radio" name="DataList1$ctl01$question$RangeTypeNotRequired" value="2" /><label for="DataList1_ctl01_question_RangeTypeNotRequired_8"><span class="ds6">2</span></label></span><span style="margin-left: 35px;"><input id="DataList1_ctl01_question_RangeTypeNotRequired_9" type="radio" name="DataList1$ctl01$question$RangeTypeNotRequired" value="1" /><label for="DataList1_ctl01_question_RangeTypeNotRequired_9"><span class="ds6">1</span></label></span></span></td>
									<input id="DataList1_ctl01_question_questionID" type="hidden" name="DataList1$ctl01$question$questionID" value="4" /><input id="DataList1_ctl01_question_questionType" type="hidden" name="DataList1$ctl01$question$questionType" value="5" /> <!-- </tr> --></tr>
							</tbody>
						</table>
					</td>
				</tr>
			</table>
			<table class="dsR6052" border="0" cellspacing="10" cellpadding="0">
				<tr>
					<td class="dsR6051"><textarea id="DataList1_ctl02_question_TextType" style=" font-size: 8pt; font-family: arial; resize: none;" name="DataList1$ctl02$question$TextType" rows="6" cols="170"></textarea></td>
				</tr>
			</table>
			<table class="dsR3958 dsR6106" border="0" cellspacing="10" cellpadding="0">
				<tr>
					<td class="dsR6108"><span class="ds3">Wie haben Sie von der Druckerei Bechmann erfahren?</span></td>
					<td class="dsR6108"><span class="ds3">Warum haben Sie sich für die Druckerei Bechmann entschieden?</span></td>
				</tr>
				<tr>
					<td class="dsR6108"><input class="dsR5050" type="radio" name="erfahren" value="Freunde oder Bekannte" /><span class="ds13"> </span><span class="ds3">Freunde oder Bekannte</span></td>
					<td class="dsR6108"><input class="dsR5051" type="radio" name="Entscheidung" value="Preis" tabindex="1" /><span class="ds14"> </span><span class="ds3">Preis</span></td>
				</tr>
				<tr>
					<td class="dsR6108"><input class="dsR5051" type="radio" name="erfahren" value="Internet" /><span class="ds3"> Internet</span></td>
					<td class="dsR6108"><input class="dsR5051" type="radio" name="Entscheidung" value="Qualität" /><span class="ds14"> </span><span class="ds3">Qualität</span></td>
				</tr>
				<tr>
					<td class="dsR6108"><input class="dsR5051" type="radio" name="erfahren" value="Werbung erhalten" /><span class="ds15"> </span><span class="ds3">Werbung erhalten</span></td>
					<td class="dsR6108"><input class="dsR5050" type="radio" name="Entscheidung" value="Lieferzeit" /><span class="ds14"> </span><span class="ds3">Lieferzeit</span></td>
				</tr>
				<tr>
					<td class="dsR6107"><input class="dsR5051" type="radio" name="erfahren" value="anderes" /><span class="ds3"> anderes</span><span class="ds16"> </span><span class="ds15"><input class="dsR6067" type="text" name="erfahren anderes" size="68" /></span></td>
					<td class="dsR6107"><input type="radio" name="Entscheidung" value="anderes" /><span class="ds3"> anderes </span><span class="ds15"><input class="dsR6067" type="text" name="entschieden anderes" size="68" /></span></td>
				</tr>
				<tr>
					<td class="dsR6107"><span class="ds3">Wie wahrscheinlich ist es, dass Sie die Druckerei, anderen Geschäftspartnern weiter empfehlen?</span></td>
					<td class="dsR6107">
						<table class="dsR6091" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td class="dsR6092"><input class="dsR5051" type="radio" name="Empfehlung" value="sehr wahrscheinlich" /> <span class="ds3">sehr wahrscheinlich</span></td>
								<td class="dsR6093"><input class="dsR5050" type="radio" name="Empfehlung" value="wahrscheinlich" /> <span class="ds3">wahrscheinlich</span></td>
								<td class="dsR5986"><input type="radio" name="Empfehlung" value="unwahrscheinlich" /> <span class="ds3">unwahrscheinlich</span></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<table class="dsR4021 dsR6068" border="0" cellspacing="10" cellpadding="0">
				<tr>
					<td class="dsR6063"><span class="ds3">Vielen Dank für Ihre Unterstützung, alle Antworten werden vertraulich behandelt.<br />
							Mit freundlichen Grüßen, Druckerei</span></td>

				</tr>
				<tr>
					<td class="dsR6062">
						<table class="dsR6085" border="0" cellspacing="0" cellpadding="0">
							<tr>
								<td class="dsR6084"><span class="ds25">Ihr Name bzw. Firma</span><span class="ds22"> </span><span class="ds26"><span class="ds27"><span class="ds22"><input name="name" id="Name" value="<?php echo $name; ?>" size="56" /></span></span></span></td>
								<td class="dsR6086"><input type="submit" name="Abfrage senden" value="Abfrage senden" /></td>
								<td class="dsR6079"><input type="reset" /></td>
							</tr>
						</table>
					</td>
				</tr>
			</table>
			<p></p>
		</form>
	</body>

</html>