$TeaserPath="material";$TeaserList=array();$AllowedPType=array("f"=>100,"p"=>1,"m"=>1);
$d = dir("$relPath/$TeaserPath");
while (false !== ($entry = $d->read())) if (preg_match("/^(p|f|m)_(.*)\.html$/i",$entry,$matches)) $TeaserList[]=$entry;
$d->close();
$TeaserAnz=min($MaxElems,count($TeaserList));
$TeaserArr=array();$ShownList=array();$ShownPType=array();
if ($TeaserAnz=$AllowedPType[$matches[1]]
|| array_key_exists($matches[2],$ShownList) && $ShownList[$matches[2]]>=1))));
$TeaserArr[$SortOrder]=$TeaserList[$SortOrder];
$ShownPType[$matches[1]]++;
$ShownList[$matches[2]]++;
}
}else $TeaserArr=$TeaserList;
$Cnt=0;
foreach($TeaserArr AS $Teaser) {
$Output=file_get_contents("$relPath/$TeaserPath/$Teaser");
$UserTarget=$Target;
if($targeturl==1){
preg_match("/\"videolayer[0-9]*\.swf\?bildid=([^&\"]+)_mat+[^\"]*\"/",$Output,$treffer);
if(!empty($treffer[1])) $UserTarget.="&turl=".urlencode("http://www.nowyoo.com/tour/profil_".$treffer[1].".html?PPID=cd0500001");
}
$Output=preg_replace("/\"videolayer([0-9]*)\.swf\?bildid=([^&\"]+)[^\"]*\"/","\"./$Player\\1.swf?bildid=\\2&base=".urlencode($BaseTarget)."&path=".urlencode($UserTarget)."\"",$Output);
$Output=preg_replace("/##profilpath##([^#]*)##profilendung##/",htmlentities($UserTarget),$Output);
$Output=preg_replace("/url\([^)]*\)/i","url(./images/$bgImage)",$Output);
$Output=str_replace("class=\"txtweiss\"","class=\"$TextAlign\"",$Output);
$Output=str_replace("class=\"login\"","class=\"$TextClass\"",$Output);
Print $Output;
Print ++$Cnt%$ElemsPerRow?" ":"";
}
?>
|