<?php

Header("Location: https://aloe-care.be-forever.de");
die();
 
require_once("scheff.php");
$dateiname = start; 
showpage ($page);	

function showpage ($page)	{
global $db, $prefix, $siteurl, $inhalte, $keywords, $pid, $imgpath, $petit, $siteinfo,$ptyp;
	
	//print_r($_POST);
	if ($_POST[antwort] == 1) {
	//echo "<h1>MAIL:$_POST[antwort] $_POST[E_Mail]</h1>";
				if (preg_match('/^[^@\s]+@([-a-z0-9]+\.)+[a-z]{2,}$/i',$_POST[E_Mail]))	{ 
				
				if ((!empty ($_POST[Name])) AND (!empty ($_POST[Nachricht])))	{
	$thename = strip_tags ( $_POST[Name] );
	$street = strip_tags ( $_POST[Strasse_Nr] );
	$plz = strip_tags ( $_POST[PLZ] );
	$ort = strip_tags ( $_POST[Ort]);
	$nachricht = strip_tags ( $_POST[Nachricht] );
	$tele	= strip_tags ( $_POST[Telefon] );
	$mamessage = "<p><strong>Bitte beachten Sie folgende Anfrage &uuml;ber das Kontaktformular auf Ihrer Homepage:</strong><br><br><b>Name:</b><br>$thename<br><br><b>Stra&szlig;e, Nr:</b><br>$street<br><br><b>Postleitzahl:</b><br>$plz<br><br><b>Ort:</b><br>$ort<br><br><b>eMail:</b><br><a href=\"mailto:$_POST[E_Mail]\">$_POST[E_Mail]</a><br><br><b>Telefon:</b><br>$tele<br><br><b>Nachricht:</b><br>$nachricht<br><br></p>";
				$headers .= 'X-Mailer: PHP/' . phpversion() . "\n"; 
				$headers .= 'X-Sender-IP: ' . $REMOTE_ADDR . "\n";
				$headers .= "Content-type: text/html; charset=ISO-8859-1 \n";
				$headers .= "MIME-Version: 1.0 \n";
				$headers .= "From: $_POST[E_Mail]\r\n";
			echo "$siteinfo[mainmail], Anfrage Formular Homepage, $mamessage, $headers";	
				mail("$siteinfo[mainmail]", "Anfrage Formular Homepage", $mamessage, $headers);
				Header("Location: $petit.htm?antwort=2");
				die ();
				}}}
   if ((!empty($ptyp)) AND ($ptyp != 'C'))	{ 	require_once("modul/$ptyp.php"); die();}
  else {   
	include("horizont.php");
  
  
  
		$sql = "SELECT * FROM ".$prefix."_pages WHERE AKTIV='1' AND p_seite = '$pid' ORDER BY p_order";	
    $result = $db->sql_query($sql);
	$x = 0;
	
	while ($inhalt	= $db->sql_fetchrow($result)) {
	if (empty ($inhalt[p_order]))	{ errotodb ("$prefix", "P_order ID: $inhalt[p_id] = 0" );	}													
	$inhalte = "$inhalt[p_id]\:/}$inhalt[p_typ]\:/}$inhalt[p_tag]\:/}\:/}$inhalt[p_order]\:/}$inhalt[p_inhalt]\:/}$inhalt[p_offen1]\:/}$inhalt[p_offen2]\:/}$inhalt[aktiv]\:/}$inhalt[picname]\:/}$inhalt[picw]\:/}$inhalt[pich]\:/}$inhalt[picalign]\:/}$inhalt[pictext]\:/}$inhalt[p_offen3]\:/}$inhalt[p_offen4]\:/}$inhalt[title]";	
	
	mainspa ('',$inhalte);
	$x++;
	}

	include("sohle.php");
 }
 }


?>
