<?php

 $BGColor=getDaten("BGColor");                          //Hintergrundfarbe Seite
 $TBGColor=getDaten("TBGColor");                        //Hintergrundfarbe Textfeld
 $TColor=getDaten("TColor");                            //Farbe Schrift
 $BColor=getDaten("BColor");                            //Farbe Rahmen
 $Target=getDaten("Target");                            //Ziel zum Klick (click.php)
 $BaseTarget=getDaten("BaseTarget");                    //Zielfenster
 $targeturl=(int)getDaten("targeturl");                 //wenn auf 1 dann direkt zur Meldungseite
 $Breite=(int)trim(getDaten("breite"));                 //Breite in Pixeln (178-1762)

 $Hoehe=30; 
 if ($Breite<200) $Breite=200;
 if (!preg_match("/^#[0-9A-F]{6}$/i",$BGColor)) $BGColor="#FFFFFF";
 if (!preg_match("/^#[0-9A-F]{6}$/i",$TBGColor)) $TBGColor="#FFFFFF";
 if (!preg_match("/^#[0-9A-F]{6}$/i",$TColor)) $TColor="#000000";
 if (!preg_match("/^#[0-9A-F]{6}$/i",$BColor)) $BColor="#000000";
 if (!preg_match("/^[_0-9A-Z]+$/i",$BaseTarget)) $BaseTarget="_top";
  
 $FlashVars="";
 $FlashVars.=(empty($FlashVars)?"":"&")."BGCol=".urlencode(str_replace("#","0x",$BGColor));
 $FlashVars.=(empty($FlashVars)?"":"&")."TCol=".urlencode(str_replace("#","0x",$TColor));
 $FlashVars.=(empty($FlashVars)?"":"&")."TBGCol=".urlencode(str_replace("#","0x",$TBGColor));
 $FlashVars.=(empty($FlashVars)?"":"&")."BCol=".urlencode(str_replace("#","0x",$BColor));
 $FlashVars.=(empty($FlashVars)?"":"&")."bid=".urlencode($Target);
 $FlashVars.=(empty($FlashVars)?"":"&")."tf=".urlencode($BaseTarget);
 $FlashVars.=(empty($FlashVars)?"":"&")."usespl=".urlencode($targeturl);

?>
<body style="background-color:<? Print $BGColor;?>;padding:0px ;margin:0px;">
<script type="text/javascript" src="./Ticker.js"></script>
<script language="JavaScript">MakeFlash(<? Print $Breite;?>,<? Print $Hoehe;?>,"./Ticker.swf","<? Print htmlentities($FlashVars);?>");</script><noscript>
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0"
WIDTH="<? Print $Breite;?>" HEIGHT="<? Print $Hoehe;?>" id="Ticker_Flash" ALIGN="">
<PARAM NAME="movie" VALUE="./Ticker.swf">
<PARAM NAME="quality" VALUE="high">
<PARAM NAME="wmode" VALUE="transparent">
<PARAM NAME="flashvars" VALUE="<? Print htmlentities($FlashVars);?>">
<EMBED src="Ticker.swf" quality=high WIDTH="<? Print $Breite;?>" HEIGHT="<? Print $Hoehe;?>" NAME="Ticker_Flash" 
FLASHVARS="<? Print htmlentities($FlashVars);?>" ALIGN="" TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromedia.com/go/getflashplayer"></EMBED>
</OBJECT>
</noscript>
</body>