<?php
error_reporting(E_ALL);
//ini_set("display_errors","1");
$IP = $_SERVER['REMOTE_ADDR'];
$host = gethostbyaddr($IP);
## Datum ##
$tstamp = mktime(0, 0, 0, date("m"), date("d"), date("Y"));
$datum = date("d.m.Y", $tstamp); // ISO-8601 Format
if(isset($_POST['senden'])){
$ready = 1;
if(empty($_POST['vorname'])){
$ready = 0;
$error[vorname] = 'Dein Vorname fehlt!';
}
if(empty($_POST['nachname'])){
$ready = 0;
$error[nachname] = 'Dein Nachname fehlt!';
}
if(!preg_match("/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-z]{2,6}$/i", $_POST['email'])){
$ready = 0;
$error[email] = 'Gib deine E-Mailadresse richtig ein';
}
if(empty($_POST['subject'])){
$ready = 0;
$error[subject] = 'Dein Betreff fehlt!';
}
if(empty($_POST['messages'])){
$ready = 0;
$error[messages] = 'Deine Nachricht fehlt!';
}
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<META name="verify-v1" content="Gw5wPUc+HkDjILqZK6xJTBZB9Lv0wFkhMynz2IZsZBY=" />
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<META NAME="description" content="Tauchclub in Bad Vilbel. Hier taucht man mit Freuden">
<META NAME="keywords" content="Tauchen, Sporttauchen, Schnorcheln, Ausbildung, Tauchkurs, Brevet, Tauchbrevet, Tauchclub Triton Bad Vilbel, Google, Webseite, CMAS, VDST, HTSV, PADI, Brevet, Unterwasser, Wassersport, UW-Fotografie, Tauchclub Bad Vilbel, Bad Vilbel, Tauchclub, Dekotabellen, Dekomprestion, tauchen, Unterwassersport, Hessen, Tauchreisen, Tauchtouren, Schnorcheln, Sport, Fun, Urlaub">
<META NAME="MSSmartTagsPreventParsing" CONTENT="TRUE">
<META NAME="robots" LANG="de" CONTENT="index, nofollow">
<META NAME="Date" LANG="de" CONTENT="16.8.2001">
<META NAME="DC.Date" LANG="de" CONTENT="16.8.2001">
<META NAME="DC.Title" LANG="de" CONTENT="1. Tauchclub Triton Bad Vilbel e.V">
<META NAME="DC.Creator" LANG="de" CONTENT="Jürgen Rüd">
<META NAME="DC.Subject" LANG="de" CONTENT="1. Tauchclub Triton Bad Vilbel e.V">
<META NAME="DC.Description" LANG="de" CONTENT="">
<META NAME="DC.Publisher" LANG="de" CONTENT="1. Tauchclub Triton Bad Vilbel e.V">
<META NAME="DC.Contributor" LANG="de" CONTENT="">
<META NAME="DC.Identifier" LANG="de" CONTENT="http://www.tauchclub-triton.de">
<META NAME="DC.Source" LANG="de" CONTENT="">
<META NAME="DC.Language" LANG="de" CONTENT="de">
<META NAME="robots" content="noarchive">
<META NAME="revisit-after" content="5 days">
<META NAME="content-language" content="de">
<META NAME="publisher" content="Tauchclub Triton Bad Vilbel">
<META NAME="copyright" content="Copyright © Tauchclub Triton Bad Vilbel">
<meta http-equiv="imagetoolbar" content="no">
<link href="scripts/css/layout.css" rel="stylesheet" type="text/css" />
<script src="scripts/js/browsers.js" type="text/javascript"></script>
<title>Kontaktformular</title>
</head>
<body>
<div id="logo"></div>
<div id="box">
<form action="<?php $_SERVER['PHP_SELF'] ?>" method="post" >
<h1 class="h1text">Kontaktmail an TC-Triton</h1>
<div class="clear">
<h2 class="h2text">Brevetsausbildungen</h2>
<div class="clear"></div>
<div class="rubrik">
<div class="logo"><strong>Grundbrevets</strong></div>
<div class="text"><strong>Sonderbrevets</strong></div>
<div class="link"><strong>Spezielle Zusatzbrevetausbildungen</strong></div>
<div class="clear"></div>
<hr />
<div class="logo">
<ul class="checkbox">
<li><input type="checkbox" name="Brevet[]" class="formcheckbox" value="Kindertauchschein Bronze/Silber" />Kindertauchschein Bronze/Silber</li>
<li><input type="checkbox" name="Brevet[]" class="formcheckbox" value="Grundtauchschein" />Grundtauchschein</li>
<li><input type="checkbox" name="Brevet[]" class="formcheckbox" value="DTSA Bronze" />DTSA Bronze</li>
<li><input type="checkbox" name="Brevet[]" class="formcheckbox" value="DTSA Silber" />DTSA Silber</li>
<li><input type="checkbox" name="Brevet[]" class="formcheckbox" value="DTSA Gold" />DTSA Gold</li>
</ul>
</div>
<div class="text">
<ul class="checkbox">
<li><input type="checkbox" name="SonderBrevet[]" class="formcheckbox" value="Orientierung" />Orientierung</li>
<li><input type="checkbox" name="SonderBrevet[]" class="formcheckbox" value="HLW" />Herz-Lunge-Wiederbelebung</li>
<li><input type="checkbox" name="SonderBrevet[]" class="formcheckbox" value="Gruppenführung" />Gruppenführung</li>
<li><input type="checkbox" name="SonderBrevet[]" class="formcheckbox" value="Tauchsicherheit & Rettung" />Tauchsicherheit & Rettung</li>
<li><input type="checkbox" name="SonderBrevet[]" class="formcheckbox" value="Nachttauchen" />Nachttauchen</li>
<li><input type="checkbox" name="SonderBrevet[]" class="formcheckbox" value="Trockentauchen" />Trockentauchen</li>
</ul>
</div>
<div class="link">
<ul class="checkbox">
<li>Nitrox Bronze CMAS (VDST) <input type="checkbox" name="ZusatzBrevet[]" class="formcheckbox" value="Nitrox Bronze CMAS (VDST)" /></li>
<li>Nitrox Silber CMAS (VDST) <input type="checkbox" name="ZusatzBrevet[]" class="formcheckbox" value="Nitrox Silber CMAS (VDST)" /></li>
<li>Rebreathertauchen <input type="checkbox" name="ZusatzBrevet[]" class="formcheckbox" value="Rebreathertauchen" /></li>
<li>Tauchlehrer Assistent <input type="checkbox" name="ZusatzBrevet[]" class="formcheckbox" value="Tauchlehrer Assistent" /></li>
</ul>
</div>
</div>
<div class="clear"></div>
<h2 class="h2text">Kontaktformular</h2>
<div class="rubrik">
<div class="logo">*Vorname:<?php echo '<br /><span class="formerror">'.$error['vorname'].'</span>' ?></div>
<div class="text"><input type="text" name="vorname" class="formu" tabindex="1" value="<?php echo $_POST['vorname']; ?>" /></div>
<div class="link"></div>
<div class="clear"></div>
<div class="leer"></div>
<div class="logo">*Nachname:<?php echo '<br /><span class="formerror">'.$error['nachname'].'</span>' ?></div>
<div class="text"><input type="text" name="nachname" class="formu" tabindex="2" value="<?php echo $_POST['nachname']; ?>" /></div>
<div class="link"></div>
<div class="clear"></div>
<div class="leer"></div>
<div class="logo">*E-Mail Adresse:<?php echo '<br /><span class="formerror">'.$error['email'].'</span>' ?></div>
<div class="text"><input type="text" name="email" class="formmail" tabindex="5" value="<?php echo $_POST['email']; ?>" /></div>
<div class="link"></div>
<div class="clear"></div>
<div class="leer"></div>
<div class="logo">*Betreff:<?php echo '<br /><span class="formerror">'.$error['subject'].'</span>' ?></div>
<div class="text"><?php
if(isset($_GET['subject']) != ""){
$str = '<input type="text" name="subject" class="formbetr" value="'.$_GET['subject'].'" tabindex="6" />';
} else {$str ='<input type="text" name="subject" class="formbetr" value="'.$_POST['subject'].'" tabindex="6" />';}
echo $str ?></div>
<div class="link"></div>
<div class="clear"></div>
<div class="leer"></div>
<div class="logo">*Nachricht:<?php echo '<br /><span class="formerror">'.$error['messages'].'</span>' ?></div>
<div class="text"><textarea name="messages" class="formarea" cols="52" rows="6" wrap="hard" tabindex="7"><?php echo $_POST['messages']; ?></textarea></div>
<div class="link"></div>
<div class="clear"></div>
<div class="leer"></div>
<div class="logo"> </div>
<div class="text"><input type="submit" name="senden" value="senden" class="formu" tabindex="8" /></div>
<div class="link"></div>
<div class="clear"></div>
<div class="leer"></div>
</div>
</form>
<?php
if (isset($_POST['senden']) && $ready)
{
/*print_r($_POST);
echo '<br />';*/
$monate=array("Januar","Februar","März","April","Mai","Juni","Juli","August", "September","Oktober","November","Dezember");
$wochentage=array("Sonntag","Montag","Dienstag","Mittwoch", "Donnerstag","Freitag","Samstag");
$monat=$monate[date("n")-1];
$wochentag=$wochentage[date("w")];
$datum=$wochentag.", ".date("j").". ".$monat." ".date("Y")."";
$time = date("H:i:s");
//$domain = "http://www.tauchclub-triton.de";
$domain = $_SERVER['HTTP_HOST'];
//$mailaddy = "matthias.lux66@googlemail.com";
$mailaddy = "tc-triton@gmx.net";
// E-MailForm was versendet wird
$mailbody = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="'.$domain.'scripts/css/layout.css" rel="stylesheet" type="text/css" />
<title>E-Mail Formular von' .$domain. '</title>
</head>
<body>
<table align="left" cellpadding="2" cellspacing="2" border="0" width="700">
<tr>
<td align="right" valign="top" colspan="2">E-Mailversendet am: ' .$datum.'</td>
</tr>
<tr>
<td align="right" valign="top" colspan="2">Uhrzeit: ' .$time.'</td>
</tr>
<tr>
<td align="left" valign="top">Vorname: '.$_POST['vorname'].'</td>
<td align="left" valign="top">Nachname: '.$_POST['nachname'].'</td>
</tr>
<tr>
<td align="left" colspan="2" valign="top">E-Mail Adresse: '.$_POST['email'].'</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2">Betreff: '.$_POST['subject'].'</td>
</tr>
<tr>
<td align="left" valign="top" colspan="2" width="500">Nachricht:<br />'.$_POST['messages'].'</td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td align="left" valign="top">Brevetsausbildung:</td>
<td align="left" valign="top" width="450">
'.$_POST['Brevet01'].'<br />'.$_POST['Brevet02'].'<br />'.$_POST['Brevet03'].'
<br />'.$_POST['Brevet04'].'<br />'.$_POST['Brevet05'].'<br />'.$_POST['Brevet06'].'<br /></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td align="left" valign="top">Sonderbrevets:</td>
<td align="left" valign="top" width="450">'.$_POST['SonderBrevet01'].'<br />'.$_POST['SonderBrevet02'].'
<br />'.$_POST['SonderBrevet03'].'<br />'.$_POST['SonderBrevet04'].'<br />'.$_POST['SonderBrevet05'].'
<br />'.$_POST['SonderBrevet06'].'<br /></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
<tr>
<td align="left" valign="top">Sonderbrevets:</td>
<td align="left" valign="top" width="450">'.$_POST['SpezialBrevet01'].'<br />'.$_POST['SpezialBrevet02'].'
<br />'.$_POST['SpezialBrevet03'].'<br />'.$_POST['SpezialBrevet04'].'<br /></td>
</tr>
<tr>
<td colspan="2"> </td>
</tr>
</table>
</body>
</html>';
/* zusätzliche Header */
$headers = "From:".$_POST['vorname'] . " " . $_POST['nachname']. " <" . $_POST['email'] . ">\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
//$headers .= "From: http://www.tauchclub-triton.de\r\n";
/* Verschicken der Mail */
$send = @mail($mailaddy, $_POST['subject'], $mailbody, $headers);
if($send){
echo '<div class="email_return">
<h1 class="h1text">E-Mail erfogreich verschickt</h1>
<div class="clear"></div>';
if((isset($_POST['Brevet']) && isset($_POST['SonderBrevet']) && ($_POST['ZusatzBrevet'])) != ""){
$str ='
<div class="rubrik">
<div class="logo"><strong>Grundbrevets</strong></div>
<div class="text"><strong>Sonderbrevets</strong></div>
<div class="link"><strong>Spezielle Zusatzbrevetausbildungen</strong></div>
<div class="clear"></div>
<hr />
<div class="logo">';
foreach($_POST['Brevet'] as $brevets){
echo $brevets. '<br />';
}'
</div>
<div class="text">';
foreach($_POST['SonderBrevet'] as $sonderbrevets){
echo $sonderbrevets. '<br />';
}'
</div>
<div class="link">';
foreach($_POST['ZusatzBrevet'] as $zusatzbrevets){
echo $zusatzbrevets. '<br />';
}'
</div>
</div>
<div class="clear"></div>';
} else {
$str = '';
}
echo $str;
echo '
<h1 class="h1text">Ihre Anfrage</h1>
<div class="rubrik">
wurde an den Tauchclub Triton <strong>erfolgreich</strong> mit den von Ihnen angegebenen Daten verschickt.
<hr />
<div class="logo">Vorname: '.$_POST['vorname'].'</div>
<div class="text">Nachname: '.$_POST['nachname'].'</div>
<div class="link" style="text-align:right">E-Mail: '.$_POST['email'].'</div>
<div class="clear"></div>
<div class="leer"></div>
Ihre Nachricht:<br />'.$_POST['messages'].'
</div>
<div class="clear"></div>
<div class="rubrik">
<p align="right">Zurück zu <a href="verein.htm" target="main">Startseite</a></p>
</div>
<div class="clear"></div>
</div>';
}
else
{
echo '<div class="email_return">
<h1 class="h1text">E-Mail wurde NICHT verschickt!!</h1>
<div class="rubrik">
Sorry, leider wurde diese E-Mail nicht verschickt.<p><b>Bitte</b> überprüfen Sie
nochmal Ihre Eingaben. Danke!<p>
<a href="kontakt.php" target="_self">Zurück</a> zum Formular
</div>
</div>';
}
}
?>
</div>
</body>
</html>