$WB_INDEX = true;
include_once("4-admin/config.php");
include_once("4-admin/library.php");
include_once("4-admin/kopfinfo.php");
if (isset($rotation_id))
{
$db->cx_sql("SELECT Banner.* FROM Banner INNER JOIN RotationsBanner ON RotationsBanner.RotationsID = '$rotation_id' AND Banner.ID = RotationsBanner.BannerID WHERE ((Banner.GueltigVon <= NOW() AND Banner.GueltigBis >= NOW()) OR (Banner.GueltigVon = '0000-00-00')) AND Banner.Aktiv = '1' ORDER BY Banner.ZuletztGezeigt ASC;");
if($r=$db->cx_row())
{
$BannerID = $r['ID'];
$maxAnzeige = $r['maxAnzeige'];
$AnzahlAnzeigeZeitraum = $r['AnzahlAnzeigeZeitraum'];
$Alt = $r['Alt'];
$HTML = $r['HTML'];
$Bild = $r['Datei'];
$Groesse = explode("x",$r['Groesse']);
$Breite = $Groesse[0];
$Hoehe = $Groesse[1];
$db->cx_sql("UPDATE Banner SET AnzahlAnzeige = AnzahlAnzeige+1, AnzahlAnzeigeZeitraum = AnzahlAnzeigeZeitraum+1, ZuletztGezeigt = '$jetzt' WHERE ID = '$BannerID' AND ((Banner.GueltigVon <= NOW() AND Banner.GueltigBis >= NOW()) OR (Banner.GueltigVon = '0000-00-00')) AND Aktiv = '1';");
if ($maxAnzeige != "")
if ($AnzahlAnzeigeZeitraum >= $maxAnzeige)
deaktivieren($rotation_id);
?>
document.write("");
document.write("();\">");
if($HTML != "")
{
?>
document.write(" echo($HTML); ?>");
}
else
{
?>
document.write("
images/_uploads/ echo($Bild); ?>\" alt=\" echo($Alt); ?>\" border=\"0\" height=\" echo($Hoehe); ?>\" width=\" echo($Breite); ?>\">");
}
?>
document.write("");
}
}
else
{
?>
document.write("
images/utilities/trans27.gif\" border=\"0\">");
}
?>