require_once("cms_defs.inc.php");
if(instr($_SERVER['HTTP_REFERER'], "cms_thedit1.php")){
$glEditModus="J";
if(intval($_SERVER['SERVER_PORT'])!=443){
echo "Ungültiges Protokoll.";
exit();
}
@session_start();
if(!isset($_SESSION["un"])){
die("Ungültiger Aufruf");
}
// Spamblock
if(strpos(strtolower($_SERVER['HTTP_REFERER']), strtolower($_SERVER['HTTP_HOST']))===false){
echo "Filter: Ungueltiger Aufruf...";
exit();
}
}else{
$glEditModus="N";
}
srand((double)microtime()*1000000);
$glThID=isSQLParamOK(ParamValue("id"), 1);
$db = @MYSQL_CONNECT(BQ_DBSERVER,BQ_DBUSER,BQ_DBPASS) or die ("Konnte keine Verbindung zur Datenbank herstellen");
$db_check = @MYSQL_SELECT_DB(BQ_DBNAME);
if($glEditModus=="J"){
if(!isBesitzerMitThemaOK($db_check, $_SESSION["anm"], $glThID)){
die("Sie dürfen dieses Thema nicht bearbeiten.");
}
}
if($db_check){
$setresult = mysql_query("SELECT * FROM cms_settings");
$glSetRecCnt=mysql_num_rows($setresult);
if($glSetRecCnt<=0){
die("Keine Setting-Daten eingetragen.");
}
$glMainDoc=mysql_result($setresult, 0, "MainDocument");
$glMenueW=mysql_result($setresult, 0, "MenueW");
$glMenueH=mysql_result($setresult, 0, "MenueH");
if($glEditModus=="J"){
$glMenueH+=20;
}
}else{
die("z. Zt. keine Datenverbindung");
}
if($glThID>0){
$thresult = mysql_query("SELECT * FROM cms_themen WHERE LfdNr = ".$glThID);
$glThCnt=mysql_num_rows($thresult);
if($glThCnt<=0){
die("Keine Thema-Daten eingetragen.");
}
$bodybackground="";
if(strlen(mysql_result($thresult,0,"BackgroundPic"))>0){
$bodybackground=" background=\"".mysql_result($thresult,0,"BackgroundPic")."\"";
}
//----- PopUp JavaScript noetig???
$objresult = mysql_query("SELECT * FROM cms_objects WHERE ThemaID = ".$glThID. " AND unsichtbar = 'N' AND ((ObjectType = 'BildVorschau') OR (ObjectType = 'RolloverStyle' AND Beschreibung = 'J') OR (ObjectType = 'Rollover' AND Beschreibung = 'J'))");
$glObjCnt=mysql_num_rows($objresult);
$glPopUpJS=false;
if($glObjCnt>0){
$glPopUpJS=true;
}
//----- MouseOver Layer bei RolloverStyle und Rollover
$objresult = mysql_query("SELECT * FROM cms_objects WHERE ThemaID = ".$glThID. " AND unsichtbar = 'N' AND MouseOverVisObj > 0 AND (ObjectType = 'RolloverStyle' OR ObjectType = 'Rollover') ");
$glObjCnt=mysql_num_rows($objresult);
$glMouseOverScript="";
if($glObjCnt>0){
$glMouseOverScript=getMouseOverScript();
}
//----- Formtag noetig???
$cmsFormScript="";
$objresult = mysql_query("SELECT * FROM cms_objects WHERE ThemaID = ".$glThID. " AND unsichtbar = 'N' AND ObjectType LIKE '%Form%'");
$glObjCnt=mysql_num_rows($objresult);
$glFormBegTag="";
$glFormEndTag="";
if($glObjCnt>0){
$cmsFormScript=getFormScript();
$glFormBegTag="
\r\n";
}
//----- Stylesheets
$objresult = mysql_query("SELECT * FROM cms_styles WHERE BesitzerID = '".mysql_result($thresult, 0, "BesitzerID")."'");
$glObjCnt=mysql_num_rows($objresult);
$glStyleTag="";
if($glObjCnt>0){
for($i=0;$i<$glObjCnt;$i++){
$glStyleTag=$glStyleTag."";
}
}
$objresult = mysql_query("SELECT * FROM cms_objects WHERE ThemaID = ".$glThID." ORDER BY DrawSort");
$glObjCnt=mysql_num_rows($objresult);
if($glObjCnt<=0){
die("Keine Objekt-Daten eingetragen.");
}
}
?>
echo mysql_result($thresult, 0, "Titel"); ?>
">
">
">
">
">
">
">
echo $glStyleTag; ?>
if($glThID>0){
//----- Rolloverscripte einbauen, falls noetig
$rollresult = mysql_query("SELECT * FROM cms_objects WHERE ThemaID = ".$glThID. " AND ObjectType = 'Rollover'");
$glRollCnt=mysql_num_rows($rollresult);
$onLoadTag="";
if($glRollCnt>0){
$onLoadTag=" onLoad=\"MM_preloadImages(";
for($i=0;$i<$glRollCnt;$i++){
$onLoadTag=$onLoadTag."'cms_objects/".mysql_result($rollresult,$i,"RollOver")."'";
if($i<$glRollCnt-1){
$onLoadTag=$onLoadTag.", ";
}
}
$onLoadTag=$onLoadTag."); ";
$onLoadTag=$onLoadTag." overPreloadImages(";
for($i=0;$i<$glRollCnt;$i++){
$onLoadTag=$onLoadTag."'cms_objects/".mysql_result($rollresult,$i,"RollSelected")."', 'ImageSel".mysql_result($rollresult,$i,"LfdNr")."'";
if($i<$glRollCnt-1){
$onLoadTag=$onLoadTag.", ";
}
}
$onLoadTag=$onLoadTag."); ";
?>
} //----- Ende Rollover
//----- Tickerscript einbauen, falls noetig
$glTickerOnload="";
if($glEditModus=="N"){ echo getTickerScript(); }
$onLoadTag=$onLoadTag.$glTickerOnload."\"";
if($onLoadTag=="\""){
$onLoadTag="";
}
if($glEditModus=="J"){ include("cms_thedit1_JS.inc.php"); }
if($glEditModus=="N" && $glFormBegTag!=""){
echo $cmsFormScript;
}
}
?>
leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" echo $onLoadTag; ?>>
echo ""; //----- Fuer Seitenexport z. B. als PHP-include benoetigt
echo $glFormBegTag;
//----- Menue im oeffentlichen Modus anzeigen
if($glEditModus=="J"){
?>
if(mysql_result($thresult,0,"LinealOn")=="J"){
?>
}
?>
}
include("cms_Main_Thema.inc.php");
echo $glFormEndTag;
//----- Bei HTML-Export nicht ausgeben
if(ParamValue("hex")!="yes"){
?>
//----- Ende kein HTML-Export
}
echo ""; //----- Fuer Seitenexport z. B. als PHP-include benoetigt
?>
//--------------------------------------------------------------------------------------------------------
// Ticker Javascripte generieren, Onload-Functionen einleiten
function getMouseOverScript(){
global $glThID;
$jscode="";
$jscode=$jscode."\r\n";
$jscode=$jscode."//--------------------------------------------------------------------------\r\n";
$jscode=$jscode."// Script initialisieren\r\n";
$jscode=$jscode."//--------------------------------------------------------------------------\r\n";
$jscode=$jscode."function doMouseOverVis(status, LName){\r\n";
$jscode=$jscode." if(document.layers){\r\n";
$jscode=$jscode." var aktL=document.layers[LName];\r\n";
$jscode=$jscode." }else{\r\n";
$jscode=$jscode." var obj=document.getElementById(LName);\r\n";
$jscode=$jscode." var aktL=obj.style;\r\n";
$jscode=$jscode." }\r\n\r\n";
$jscode=$jscode." aktL.visibility = status;\r\n\r\n";
$jscode=$jscode."}\r\n\r\n";
return($jscode);
}
//--------------------------------------------------------------------------------------------------------
// Ticker Javascripte generieren, Onload-Functionen einleiten
function getTickerScript(){
global $glThID;
global $glTickerOnload;
$jscode="";
$jscode=$jscode."\r\n";
$result = mysql_query("SELECT * FROM cms_objects WHERE ThemaID = ".$glThID. " AND ObjectType = 'Ticker'");
$Cnt=mysql_num_rows($result);
if($Cnt>0){
$retcode="";
for($i=0;$i<$Cnt;$i++){
$lid="Layer_".mysql_result($result, $i, "ThemaID")."_".mysql_result($result, $i, "LfdNr");
$LfdNr=mysql_result($result, $i, "LfdNr");
$tmpcode=$jscode;
$tmpcode=str_replace("gltimer","gltimer".$LfdNr,$tmpcode);
$tmpcode=str_replace("glXPos","glXPos".$LfdNr,$tmpcode);
$tmpcode=str_replace("glStageW","glStageW".$LfdNr,$tmpcode);
$tmpcode=str_replace("animateLayer","animateLayer".$LfdNr,$tmpcode);
$tmpcode=str_replace("glLayWidth","glLayWidth".$LfdNr,$tmpcode);
$tmpcode=str_replace("glLName","glLName".$LfdNr,$tmpcode);
$tmpcode=str_replace("TickerLayer",$lid,$tmpcode);
$tmpcode=str_replace("initScript","initScript".$LfdNr,$tmpcode);
$tmpcode=str_replace("%%x-exchange%%",mysql_result($result, $i, "x"),$tmpcode);
$tmpcode=str_replace("%%millisek%%",mysql_result($result, $i, "Zeichenbreite"),$tmpcode);
$tmpcode=str_replace("%%pixstep%%",mysql_result($result, $i, "Maxzeichen"),$tmpcode);
$retcode=$retcode.$tmpcode;
$glTickerOnload=$glTickerOnload." onload=\"initScript".$LfdNr."();\"";
}
return($retcode);
}else{
return("");
}
}
function getFormScript(){
global $glThID;
$jsc=$jsc."\r\n";
return($jsc);
}
?>