include "./include/config.inc.php3";
include "./include/texte.php3";
include "./sys/funktion.inc";
$query="DELETE FROM $sitetable8 WHERE zeit < ".time()."";
mysql_db_query($dbname,$query,$conn) or die(mysql_error());
if($kommentarcode!="ja")
{
Header( "Location: $seitenurl/index.php?$sidname=$sidsid");
exit;
}
$html_array= file("templates/schreiben.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",$name2))
{
$anzeige="$anzeige $userfehler_28";
$codesenden=1;
}
if(!preg_match("=[[:alnum:]]+=i",$ort2))
{
$anzeige="$anzeige $userfehler_29";
$codesenden=1;
}
if(!preg_match("=[[:alnum:]]+=i",$titel))
{
$anzeige="$anzeige $userfehler_30";
$codesenden=1;
}
if(!preg_match("=[[:alnum:]]+=i",$text))
{
$anzeige="$anzeige $userfehler_31";
$codesenden=1;
}
$ipnummerxxx= getenv ("REMOTE_ADDR");
$query2="SELECT * FROM $sitetable8 WHERE user='$ipnummerxxx' and nummer='$nummer'";
$result2=mysql_db_query($dbname,$query2,$conn) or die(mysql_error());
while($date=mysql_fetch_array($result2))
{
$anzeige="$anzeige $userfehler_32";
$codesenden=1;
}
if($codesenden=="0")
{
$codedatasendens= date("d.m.Y");
$query="INSERT INTO $sitetable6 (siteid,nummer,titel,bewertungtext,username,datum,userstadt)
VALUES ('','$nummer','$titel','$text','$name2','$codedatasendens','$ort2')";
mysql_db_query($dbname,$query,$conn) or die(mysql_error());
$query="INSERT INTO $sitetable8 (siteid,user,code,nummer,zeit)
VALUES ('','$ipnummerxxx','','$nummer',' ".(time()+$termteimcods)." ')";
mysql_db_query($dbname,$query,$conn) or die(mysql_error());
$anzeige="$schreiben_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(
"={name}=si",
"={titel}=si",
"={text}=si",
"={ort}=si",
"={session_form}=si"
);
$rub_text= array(
"$name2",
"$titel",
"$text",
"$ort2",
""
);
$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(
"={name}=si",
"={titel}=si",
"={text}=si",
"={ort}=si",
"={session_form}=si"
);
$rub_text= array(
"$name2",
"$titel",
"$text",
"$ort2",
""
);
$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");
?>