Nicht mehr ganz neu hier
Hallo ich habe mal wieder ein Problem mit meinen Kontaktformular was soll ich tun
Fatal error: Call to undefined function check() in C:\xampp\htdocs\lebekickboxarena\kontakt.php on line 56
ich hoffe ihr könnt mir helfen.
Fatal error: Call to undefined function check() in C:\xampp\htdocs\lebekickboxarena\kontakt.php on line 56
ich hoffe ihr könnt mir helfen.
Code:
<?php session_start();
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Kontaktformular.org
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Einstellungen
// Ihre E-Mailadresse
$ihre_emailadresse = 'info@lebe-kickboxarena.de';
// Absender || Muster(From: NAME <EMAIL>) // Beispiel: 'From: Max Mustermann <max@musterdomain.tld>'
$email_absender = 'From: Kontaktformular <system@domain.tld>';
// Betreff
$email_betreffzeile = 'Kontaktformular-Anfrage-Lebe-Kickboxarena';
// Hinweismeldungen
#Nicht alle Felder ausgefllt
$errormessage[0] = 'Fehler, Sie haben nicht alle Felder ausgefüllt:';
#Kein Name eingegeben
$errormessage[1] = '<br />- Ungültiger Name';
#Ungltige E-Mailadresse eingegeben
$errormessage[2] = '<br />- Ungültiger E-Mailadresse';
#Kein Betreff eingegeben
$errormessage[3] = '<br />- Ungültiger Betreff';
#Keine Nachricht eingegeben
$errormessage[4] = '<br />- Ungültige Nachricht';
#Ungltiger Sicherheitscode
$errormessage[5] = '<br />- Ungültiger Sicherheitscode';
#Ungltiger Zeichen (Spamverdacht)
$errormessage[6] = '<br />- Ungültige Zeichen entdeckt';
#Alle Felder sind OK
$okay = 'Vielen Dank für Ihre Nachricht, wir werden Sie demnächst bearbeiten!<br /><br />';
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#######################################
#######################################
if(isset($_POST['submit'])) {
#######################################
$name = check($_POST['name']);
$email = check($_POST['email']);
$betreff = check($_POST['betreff']);
$nachricht = check($_POST['nachricht']);
$firma = check($_POST['firma']);
#######################################
$ip = $_SERVER['REMOTE_ADDR'];
$host = gethostbyaddr($ip);
#######################################
$zeit = time();
$datum = date ("d.m.Y", $zeit);
$uhrzeit = date ("H:i:s", $zeit);
#######################################
$message = '<span style="color:red">' . $errormessage[0];
if($name==''){$message .= $errormessage[1]; $fehler = 1;}
if(!ereg("^[_a-zA-Z0-9-]+(\.[_a-zA-Z0-9-]+)*@([a-zA-Z0-9-]+\.)+([a-zA-Z]{2,6})$", $email)) {
$message .= $errormessage[2]; $fehler = 1;}
if($betreff==''){$message .= $errormessage[3]; $fehler = 1;}
if($nachricht==''){$message .= $errormessage[4]; $fehler = 1;}
if($_POST['code']=="" || strtolower($_POST['code'])!=$_SESSION['captcha_code']){
$message .= $errormessage[5]; $fehler = 1;}
if(ehi_check()!=0){$message .= $errormessage[6]; $fehler = 1;}
$message .= '</span><br /><br />';
#######################################
#######################################
if(!isset($fehler)){
$email_nachricht = "-- Kontakformularanfrage Photo BEST --\n\nBetreff: $betreff";
$email_nachricht .= "\nName: $name\nE-Mailadresse: $email\nHomepage: $firma\n\n";
$email_nachricht .= "Nachricht:\n$nachricht\n\nIP: $ip\nHost: $host\n";
$email_nachricht .= "gesendet am $datum um $uhrzeit.";
// Mail senden
@mail($ihre_emailadresse, $email_betreffzeile, $email_nachricht, $email_absender);
//Variablen resetten
$name = '';
$betreff = '';
$email = '';
$nachricht = '';
$firma = '';
$meldung=$okay;
} else {
$meldung=$message;
}
#######################################
#######################################
} //endissetsubmit
else{$meldung='';}
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
?>
<!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=utf-8" />
<!-- TemplateBeginEditable name="doctitle" -->
<title>Lebe-Kickboxarena & Co</title>
<!-- TemplateEndEditable -->
<link href="styles/thrColHybHdr.css" rel="stylesheet" type="text/css" /><!--[if IE]>
<style type="text/css">
/* Fügen Sie CSS-Korrekturen für alle IE-Versionen in diesen bedingten Kommentar ein. */
.twoColHybLtHdr #sidebar1 { padding-top: 30px; }
.twoColHybLtHdr #mainContent { zoom: 1; padding-top: 15px; }
/* Mit der obigen proprietären Zoom-Eigenschaft wird IE die Eigenschaft hasLayout zugewiesen, die gegebenenfalls zur Verhinderung verschiedener Fehler erforderlich ist. */
</style>
<![endif]-->
<!-- TemplateBeginEditable name="head" -->
<!-- TemplateEndEditable -->
<style type="text/css">
<!--
body {
background-color: #470006;
}
-->
</style>
<link href="styles/styles.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_nbGroup(event, grpName) { //v6.0
var i,img,nbArr,args=MM_nbGroup.arguments;
if (event == "init" && args.length > 2) {
if ((img = MM_findObj(args[2])) != null && !img.MM_init) {
img.MM_init = true; img.MM_up = args[3]; img.MM_dn = img.src;
if ((nbArr = document[grpName]) == null) nbArr = document[grpName] = new Array();
nbArr[nbArr.length] = img;
for (i=4; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = args[i+1];
nbArr[nbArr.length] = img;
} }
} else if (event == "over") {
document.MM_nbOver = nbArr = new Array();
for (i=1; i < args.length-1; i+=3) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = (img.MM_dn && args[i+2]) ? args[i+2] : ((args[i+1])? args[i+1] : img.MM_up);
nbArr[nbArr.length] = img;
}
} else if (event == "out" ) {
for (i=0; i < document.MM_nbOver.length; i++) {
img = document.MM_nbOver[i]; img.src = (img.MM_dn) ? img.MM_dn : img.MM_up; }
} else if (event == "down") {
nbArr = document[grpName];
if (nbArr)
for (i=0; i < nbArr.length; i++) { img=nbArr[i]; img.src = img.MM_up; img.MM_dn = 0; }
document[grpName] = nbArr = new Array();
for (i=2; i < args.length-1; i+=2) if ((img = MM_findObj(args[i])) != null) {
if (!img.MM_up) img.MM_up = img.src;
img.src = img.MM_dn = (args[i+1])? args[i+1] : img.MM_up;
nbArr[nbArr.length] = img;
} }
}
//-->
</script>
</head>
<body class="twoColHybLtHdr" onload="MM_preloadImages('image/bottum_home_a.jpg','image/bottum_home_h.jpg','image/bottum_location_a.jpg','image/bottum_location_h.jpg','image/bottum_training_a.jpg','image/bottum_training_h.jpg','image/bottum_trainerteam_a.jpg','image/bottum_trainerteam_h.jpg','image/bottum_preise_a.jpg','image/bottum_preise_h.jpg','image/bottum_kontakt_a.jpg','image/bottum_kontakt_h.jpg','image/bottum_leer_oben.jpg','image/bottum_leer_unten.jpg')">
<div id="container">
<div id="header"><img src="image/logo.jpg" alt="Logo des LebeKickboxarena" width="479" height="172" />
<!-- end #header --></div>
<div id="sidebar1">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','bottumleeroben','image/bottum_leer_oben.jpg',1)" onMouseOver="MM_nbGroup('over','bottumleeroben','image/bottum_leer_oben.jpg','image/bottum_leer_oben.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumleeroben" src="image/bottum_leer_oben.jpg" border="0" alt="" onLoad="" /></a></td>
</tr>
<tr>
<td><a href="Templates/index.php" target="_top" onclick="MM_nbGroup('down','group1','bottumhome','image/bottum_home_a.jpg',1)" onmouseover="MM_nbGroup('over','bottumhome','image/bottum_home_h.jpg','image/bottum_home_a.jpg',1)" onmouseout="MM_nbGroup('out')"><img src="image/bottum_home.jpg" alt="Home" name="bottumhome" width="150" height="25" border="0" id="bottumhome" onload="" /></a></td>
</tr>
<tr>
<td><a href="Templates/location.php" target="_top" onClick="MM_nbGroup('down','group1','location','image/bottum_location_a.jpg',1)" onMouseOver="MM_nbGroup('over','location','image/bottum_location_h.jpg','image/bottum_location_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="location" src="image/bottum_location.jpg" border="0" alt="Location" onLoad="" /></a></td>
</tr>
<tr>
<td><a href="Templates/training.php" target="_top" onClick="MM_nbGroup('down','group1','bottumtraining','image/bottum_training_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumtraining','image/bottum_training_h.jpg','image/bottum_training_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumtraining" src="image/bottum_training.jpg" border="0" alt="Training" onLoad="" /></a></td>
</tr>
<tr>
<td><a href="Templates/traininerteam.php" target="_top" onClick="MM_nbGroup('down','group1','bottumtrainerteam','image/bottum_trainerteam_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumtrainerteam','image/bottum_trainerteam_h.jpg','image/bottum_trainerteam_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumtrainerteam" src="image/bottum_trainerteam.jpg" border="0" alt="Trainerteam" onLoad="" /></a></td>
</tr>
<tr>
<td><a href="Templates/preise.php" target="_top" onClick="MM_nbGroup('down','group1','bottumpreise','image/bottum_preise_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumpreise','image/bottum_preise_h.jpg','image/bottum_preise_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumpreise" src="image/bottum_preise.jpg" border="0" alt="Preise" onLoad="" /></a></td>
</tr>
<tr>
<td><a href="Templates/kontakt.php" target="_top" onClick="MM_nbGroup('down','group1','bottumkontakt','image/bottum_kontakt_a.jpg',1)" onMouseOver="MM_nbGroup('over','bottumkontakt','image/bottum_kontakt_h.jpg','image/bottum_kontakt_a.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumkontakt" src="image/bottum_kontakt.jpg" border="0" alt="Kontakt" onLoad="" /></a></td>
</tr>
<tr>
<td><a href="javascript:;" target="_top" onClick="MM_nbGroup('down','group1','bottumleerunten','image/bottum_leer_unten.jpg',1)" onMouseOver="MM_nbGroup('over','bottumleerunten','image/bottum_leer_unten.jpg','image/bottum_leer_unten.jpg',1)" onMouseOut="MM_nbGroup('out')"><img name="bottumleerunten" src="image/bottum_leer_unten.jpg" border="0" alt="" onLoad="" /></a></td>
</tr>
</table>
<p> </p>
<!-- end #sidebar1 --></div>
<div id="mainContent"><!-- TemplateBeginEditable name="inhalt" -->
<h1> Kontakt </h1>
<form name="kontaktformular" action="<?php echo $_SERVER['kontaktformular/PHP_SELF']; ?>" method="post">
<table width="749" border="0" align="left" style="width:500px; text-align: left; font-weight: bold;">
<tr>
<td colspan="4"><?php echo $meldung; ?></td>
</tr>
<tr>
<td class="kontakt" style="width:150px"><strong>Name:</strong></td>
<td><input name="name" type="text" value="<?php echo $name; ?>" size="40" maxlength="100" /></td>
<td><strong class="kontakt">Nachricht:</strong></td>
<td rowspan="6"><textarea name="nachricht" cols="40" rows="12" style="white-space: nowrap;"><?php echo $nachricht; ?></textarea></td>
</tr>
<tr>
<td class="kontakt" style="width:150px"><strong>E-Mail Adresse:</strong><br /></td>
<td><input name="email" type="text" id="email" value="<?php echo $email; ?>" size="40" maxlength="100" /></td>
<td> </td>
</tr>
<tr>
<td class="kontakt" style="width:150px"><strong>Betreff:</strong></td>
<td><input name="betreff" type="text" value="<?php echo $betreff; ?>" size="40" maxlength="50" /></td>
<td> </td>
</tr>
<tr>
<td class="kontakt" style="width:150px"> </td>
<td> </td>
<td style="width:130px"> </td>
</tr>
<tr>
<td class="kontakt" style="width:150px"><strong>Sicherheitscode:</strong></td>
<td><div id="reloadit" style="width:124px; height:40px; text-align:center; border:none;"> <img id="captcha" src="captcha.php?<?php echo SID; ?>" alt="captcha" /></div>
<a href="javascript:reload_captcha();" class="kontakt" style="color:black;text-decoration:none;">Neuer Code</a></td>
<td> </td>
</tr>
<tr>
<td class="kontakt" style="width:150px"><strong>Sicherheitscode <br />
wiederholen: </strong></td>
<td><input name="code" type="text" size="20" maxlength="50" /></td>
<td> </td>
<td><input type="hidden" name="PHPSESSID" value="<?php echo htmlspecialchars(session_id());?>" /></td>
</tr>
<tr>
<td style="width:150px"> </td>
<td> </td>
<td> </td>
<td><input type="submit" value="Versenden" name="submit" /></td>
</tr>
</table>
</form>
<!-- TemplateEndEditable -->
<!-- end #mainContent --></div>
<!-- Dieses clear-Element sollte direkt auf das #mainContent-div folgen, um das #container-div anzuweisen, alle untergeordneten Floats aufzunehmen. -->
<br class="clearfloat" />
<div id="footer">
<p>Lebe-Kickboxarena & Co <a href="Templates/kontakt.php">Kontakt</a> <a href="Templates/impressum.php">Impressum</a> <a href="Templates/weblogin.php">WebLogin</a></p>
<!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>