include "./include/config.inc.php3";
include "./include/texte.php3";
include "./sys/funktion.inc";
$html_array= file("templates/veranstaltung.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]";
if($bild=="")
{
$bild="$bildtext";
}
else
{
$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";
$kontaktinfo= nl2br("$kontaktinfo");
$beschreibung= nl2br("$beschreibung");
$feldtreffer="0";
$query2="SELECT * FROM $sitetable9";
$result2=mysql_db_query($dbname,$query2,$conn) or die(mysql_error());
$feldtreffer= mysql_num_rows($result2);
$htmla= explode("", "$html_code");
$htmlb= explode("", "$htmla[1]");
$html_block="$htmlb[0]";
if($feldtreffer=="0")
{
$html_code= "$htmla[0] $htmlb[1]";
}
else
{
$block_block="";
$block="";
$zahlcode="30";
$query22="SELECT * FROM $sitetable9";
$result22=mysql_db_query($dbname,$query22,$conn) or die (mysql_error());
while($date222=mysql_fetch_array($result22))
{
$trefferscodes="0";
$sucheterm= $date222[feldnummer];
$query2="SELECT * FROM $sitetable10 WHERE feldnummer='$sucheterm'";
$result2=mysql_db_query($dbname,$query2,$conn) or die(mysql_error());
$trefferscodes= mysql_num_rows($result2);
if($trefferscodes=="0")
{
$codesuchensuchen="codes$zahlcode";
if($date222[feldtyp]=="textfeld")
{
$feldcode="$date[$codesuchensuchen]";
}
else
{
$feldcode="$date[$codesuchensuchen]";
}
$block="";
$mail_code= array(
"={freitext1}=si",
"={freitext2}=si"
);
$mail_text= array(
"$date222[feldname]",
"$feldcode"
);
$block = preg_replace ($mail_code, $mail_text, $html_block);
$block_block="$block_block $block";
}
else
{
$block="";
$menuefeld2="";
$blockss="";
$query222="SELECT * FROM $sitetable10 WHERE feldnummer='$sucheterm'";
$result222=mysql_db_query($dbname,$query222,$conn) or die (mysql_error());
while($date24=mysql_fetch_array($result222))
{
$codesuchensuchen="codes$zahlcode";
if($date24[feldwert]=="$date[$codesuchensuchen]")
{
$menuefeld2="$date24[feldname]";
}
}
$mail_code= array(
"={freitext1}=si",
"={freitext2}=si"
);
$mail_text= array(
"$date222[feldname]",
"$menuefeld2"
);
$block = preg_replace ($mail_code, $mail_text, $html_block);
$block_block="$block_block $block";
}
$zahlcode--;
}
$html_code= "$htmla[0] $block_block $htmlb[1]";
}
}
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]";
}
$htmla= explode("", "$html_code");
$htmlb= explode("", "$htmla[1]");
$html_block= $htmlb[0];
$block_block="";
$block_block2="";
$block_block3="";
if($kommentarcode!="ja")
{
$html_code="$htmla[0] $htmlb[1]";
}
else
{
$treffer="0";
$query2="SELECT * FROM $sitetable6 WHERE nummer='$nummer'";
$result2=mysql_db_query($dbname,$query2,$conn) or die(mysql_error());
$treffer= mysql_num_rows($result2);
$htmla2= explode("", "$html_block");
$htmlb2= explode("", "$htmla2[1]");
$html_block2= $htmlb2[0];
$query="SELECT * FROM $sitetable6 WHERE nummer='$nummer' ORDER BY siteid DESC LIMIT 0,$trefferkommentar1";
$result=mysql_db_query($dbname,$query,$conn) or die (mysql_error());
while($date=mysql_fetch_array($result))
{
$block="";
$suche_code= array(
"={titel}=si",
"={text}=si",
"={name}=si",
"={stadt}=si"
);
$suche_text= array(
"$date[titel]",
"$date[bewertungtext]",
"$date[username]",
"$date[userstadt]"
);
$block= preg_replace ($suche_code, $suche_text, $html_block2);
$block_block2="$block_block2 $block";
}
$block_block="$htmla2[0] $block_block2 $htmlb2[1]";
$suche_code= array(
"={bewertungsnr}=si",
"={session2}=si"
);
$suche_text= array(
"$treffer",
"?$sidname=$sidsid&nummer=$nummer"
);
$block_block3= preg_replace ($suche_code, $suche_text, $block_block);
$html_code="$htmla[0] $block_block3 $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",
"$bild",
"$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");
?>