include('login/functions.php');
connectdb();
$pid=quote_smart($_GET['i']);
$subtitel= "";
if($pid==""){
$pid="13";
}
$query = "SELECT subtitel FROM subonderwerpen WHERE status='1' AND sid='$pid' ORDER BY positie DESC LIMIT 1";
$result = mysql_query($query);
$row = mysql_fetch_object($result);
$subtitel = $row->subtitel;
function checkforspam() {
$problem = 'N';
foreach ($_POST as $key => $value) {
if (stristr($value,'Content-Type:') || stristr($value,'bcc:') || stristr($value,'cc:') || stristr($value,'<') || stristr($value,'<') || stristr($host,'.tw') || stristr($host,'.ru')) {
$problem = 'Y';
}
}
if ($problem == 'Y') {
return 'Y';
} else {
return 'N';
}
}
if(getenv($_SERVER['HTTP_X_FORWARDED_FOR'])) {
$ip = getenv($_SERVER['HTTP_X_FORWARDED_FOR']);
} elseif(getenv($_SERVER['HTTP_CLIENT_IP'])) {
$ip = getenv($_SERVER['HTTP_CLIENT_IP']);
} else {
$ip = $_SERVER['REMOTE_ADDR'];
}
$host = gethostbyaddr($ip); // Host van verstuurder
if(isset($_POST['achternaam'])){
//POST GEMAAKT
if (checkforspam($_POST) == 'N') {
//VEILIG
$naam_ontvanger = "Kees Grovenstein";
$email_ontvanger = "info@veld42.nl";
$email_verzender = "From: Websitebezoeker Geachte ".$naam_ontvanger.",
";
$mailtekst .= "hierbij een bericht vanaf uw website van ".$_POST['naam']."
host:".$host."
";
reset ($_POST);
while (list ($id, $aantal) = each ($_POST)) {
$mailtekst .= $id.": ".$aantal."
";
}
$mailtekst .= "