include "./include/config.inc.php3";
include "./include/texte.php3";
include "./sys/funktion.inc";
$html_array= file("templates/erinnern.htm");
$html_code = implode($html_array,"");
$html_code= rubrikerstellen($html_code);
$html_code= usererlauben($html_code);
$codesenden="nein";
$query="SELECT * FROM $sitetable5 WHERE siteid='$nummer' and code='aktiv'";
$result=mysql_db_query($dbname,$query,$conn) or die (mysql_error());
while($date=mysql_fetch_array($result))
{
$ort="$date[ort]";
$plz="$date[plz]";
$name="$date[name]";
$start="$date[start]";
$ende="$date[ende]";
$platz="$date[platz]";
$preise="$date[preise]";
$beschreibung="$date[beschreibung]";
$veranstalter="$date[veranstalter]";
$kontaktinfo="$date[kontaktinfo]";
$bild="$date[bild]";
$datumeintrag="$date[datumeintrag]";
$endedatum="$date[endedatum]";
$startdatum="$date[startdatum]";
$mail="$date[mail]";
$hometitel="$date[hometitel]";
$homeurl="$date[homeurl]";
$rubrik="$date[rubrik]";
$unterrubrik="$date[unterrubrik]";
$codesenden="ja";
}
if($codesenden=="nein")
{
Header( "Location: $seitenurl/verfehler.php?$sidname=$sidsid");
exit;
}
$htmla= explode("", "$html_code");
$htmlb= explode("", "$htmla[1]");
$html_block= $htmlb[0];
$block_block="";
if($rubrik=="")
{
$html_code="$htmla[0] $htmlb[1]";
}
else
{
$query="SELECT * FROM $sitetable3 WHERE nummer='$rubrik'";
$result=mysql_db_query($dbname,$query,$conn) or die (mysql_error());
while($date=mysql_fetch_array($result))
{
$suche_code= array(
"={name}=si",
"={session}=si"
);
$suche_text= array(
"$date[name]",
"?$sidname=$sidsid&rubrik=$date[nummer]"
);
$block_block= preg_replace ($suche_code, $suche_text, $html_block);
}
$html_code="$htmla[0] $block_block $htmlb[1]";
}
$htmla= explode("", "$html_code");
$htmlb= explode("", "$htmla[1]");
$html_block= $htmlb[0];
$block_block="";
if($unterrubrik=="")
{
$html_code="$htmla[0] $htmlb[1]";
}
else
{
$query="SELECT * FROM $sitetable4 WHERE nummer='$unterrubrik'";
$result=mysql_db_query($dbname,$query,$conn) or die (mysql_error());
while($date=mysql_fetch_array($result))
{
$suche_code= array(
"={name}=si",
"={session}=si"
);
$suche_text= array(
"$date[name]",
"?$sidname=$sidsid&rubrik=$rubrik&unterrubrik=$date[nummer]"
);
$block_block= preg_replace ($suche_code, $suche_text, $html_block);
}
$html_code="$htmla[0] $block_block $htmlb[1]";
}
if($code=="2")
{
$codesenden=0;
$anzeige="";
if(!preg_match("=[[:alnum:]]+=i",$ename))
{
$anzeige="$anzeige $userfehler_23";
$codesenden=1;
}
if(!preg_match("=[[:alnum:]]+=i",$evname))
{
$anzeige="$anzeige $userfehler_25";
$codesenden=1;
}
if(!eregi("^([_[:alnum:]-]+)(\.[_[:alnum:]-]+)*@([[:alnum:]])([[:alnum:]\.-]+)([[:alnum:]])\.([[:alpha:]]{2,4})$",$email))
{
$anzeige="$anzeige $userfehler_27";
$codesenden=1;
}
if($codesenden=="0")
{
$datumss="$startdatum";
$minus_tage="$tag";
list($tag, $monat, $jahr) = explode(".", $datumss);
$neues_datum= mktime(0, 0, 0, $monat, $tag, $jahr) - $minus_tage * 60 * 60 * 24;
$eindatum= date("d.m.Y", $neues_datum);
$query="INSERT INTO $sitetable7 (siteid,nummer,mail,name,vname,datum)
VALUES ('','$nummer','$email','$ename','$evname','$eindatum')";
mysql_db_query($dbname,$query,$conn) or die(mysql_error());
$anzeige="$erinnern_ok";
$htmla= explode("", "$html_code");
$htmlb= explode("", "$htmla[1]");
$html_block= $htmlb[0];
$block_block="";
$rub_code= array(
"={anzeige}=si"
);
$rub_text= array(
"$anzeige"
);
$block_block= preg_replace ($rub_code, $rub_text, $html_block);
$html_code= "$htmla[0] $block_block $htmlb[1]";
$htmla= explode("", "$html_code");
$htmlb= explode("", "$htmla[1]");
$html_block= $htmlb[0];
$block_block="";
$html_code= "$htmla[0] $block_block $htmlb[1]";
}
else
{
$htmla= explode("", "$html_code");
$htmlb= explode("", "$htmla[1]");
$html_block= $htmlb[0];
$block_block="";
$rub_code= array(
"={email}=si",
"={amail}=si",
"={text}=si",
"={avname}=si",
"={evname}=si",
"={ename}=si",
"={aname}=si",
"={session_form}=si"
);
$rub_text= array(
"$email",
"$amail",
"$text",
"$avname",
"$evname",
"$ename",
"$aname",
""
);
$block_block= preg_replace ($rub_code, $rub_text, $html_block);
$html_code= "$htmla[0] $block_block $htmlb[1]";
}
$htmla= explode("", "$html_code");
$htmlb= explode("", "$htmla[1]");
$html_block= $htmlb[0];
$block_block="";
$rub_code= array(
"={anzeige}=si"
);
$rub_text= array(
"$anzeige"
);
$block_block= preg_replace ($rub_code, $rub_text, $html_block);
$html_code= "$htmla[0] $block_block $htmlb[1]";
}
else
{
$htmla= explode("", "$html_code");
$htmlb= explode("", "$htmla[1]");
$html_block= $htmlb[0];
$block_block="";
$html_code= "$htmla[0] $block_block $htmlb[1]";
$htmla= explode("", "$html_code");
$htmlb= explode("", "$htmla[1]");
$html_block= $htmlb[0];
$block_block="";
$rub_code= array(
"={email}=si",
"={amail}=si",
"={text}=si",
"={avname}=si",
"={evname}=si",
"={ename}=si",
"={aname}=si",
"={session_form}=si"
);
$rub_text= array(
"$email",
"$amail",
"$text",
"$avname",
"$evname",
"$ename",
"$aname",
""
);
$block_block= preg_replace ($rub_code, $rub_text, $html_block);
$html_code= "$htmla[0] $block_block $htmlb[1]";
}
$php_code= array(
"={ort}=si",
"={plz}=si",
"={name}=si",
"={vonuhr}=si",
"={bisuhr}=si",
"={veranstaltungsplatz}=si",
"={preise}=si",
"={beschreibung}=si",
"={veranstalter}=si",
"={kontaktinfo}=si",
"={bild}=si",
"={datumeintrag}=si",
"={bis}=si",
"={von}=si",
"={mail}=si",
"={hometitel}=si",
"={link}=si",
"={session2}=si",
"={datum}=si",
"={session}=si",
"={coby}=si",
"={session_form}=si"
);
$php_text= array (
"$ort",
"$plz",
"$name",
"$start",
"$ende",
"$platz",
"$preise",
"$beschreibung",
"$veranstalter",
"$kontaktinfo",
"",
"$datumeintrag",
"$endedatum",
"$startdatum",
"$mail",
"$hometitel",
"$homeurl",
"?$sidname=$sidsid&nummer=$nummer",
"$seitendatum",
"?$sidname=$sidsid",
"$coby",
""
);
$html_text = preg_replace ($php_code, $php_text, $html_code);
echo("$html_text");
?>