htmlentities($row['key']), 'value' => htmlentities($row['value'])); } } // bild einlesen if (count($bilder)>0) { $result=mysql_query("select id,datei,thumb,titel,credits,info from co_medialib where id=".implode(" or id=",$bilder),$conID); if ($row=mysql_fetch_assoc($result)) { $bilddaten=array("d"=>$row["datei"],"titel"=>$row["titel"],"credits"=>$row["credits"],"info"=>$row["info"]); } } // link einlesen if (count($links)>0) { $result=mysql_query("select id,url,titel,ziel,info from co_bookmarks where id=".implode(" or id=",$links),$conID); if ($row=mysql_fetch_assoc($result)) { $linkdaten=array("url"=>$row["url"],"titel"=>$row["titel"],"info"=>$row["info"],"ziel"=>$row["ziel"]); } } if ($headline!="") $content.='
'.$headline.'
'; if ($kurzbeschreibung!="") $content.='
'.$kurzbeschreibung.'
'; if (isset($bilddaten)) $content.=''; if ($beschreibung!="") $content.='
'.$beschreibung.'
'; if (count($daten)>0) { $content.='
'; $content.='
'; $content.=''; $content.=''; foreach ($daten as $dat) { $content.=''; } $content.='
'.$datenheadline.'
'.$dat['key'].':'.$dat['value'].'
'; $content.='
'; $content.='
'; } if (isset($linkdaten)) { $content.='
'; if ($linkheadline!="") $content.='Video
'; if ($linkdaten['info']!="") $content.=$linkdaten['info'].'
'; $content.=''.htmlentities($linkdaten['titel']).'
'; } } break; // // case "porsche_termine": $ptermine=array(); $bilder=array(); $bilddaten=null; $content=""; $result=mysql_query("select * from porsche_termine where sprache='$sprache' and status=1 and odatum<='$heute' and (offdatum>='$heute' or offdatum='0000-00-00') order by odatum DESC,id DESC",$conID); while ($row=mysql_fetch_assoc($result)) { $xid=$row["id"]; $headline=nl2br(htmlentities($row["headline"])); $kurzbeschreibung=nl2br(htmlentities($row["kurzbeschreibung"])); $images=$row["images"]; if ($images!="") $bilder=array_merge(explode(",",$images),$bilder); $ptermine[$xid]=array("h"=>$headline,"b"=>$kurzbeschreibung,"i"=>$images, "t"=>array()); } $bilder=array_unique($bilder); // bilddaten einlesen $bilddaten=array(); $result=mysql_query("select id,datei,thumb,titel,credits,info from co_medialib where id=".implode(" or id=",$bilder),$conID); while ($row=mysql_fetch_assoc($result)) { $bid=$row["id"]; $bilddaten[$bid]=array("d"=>$row["datei"],"t"=>$row["thumb"],"titel"=>$row["titel"],"credits"=>$row["credits"],"info"=>$row["info"]); } // einzeltermine einlesen $xids=array_keys($ptermine); $result=mysql_query("select * from porsche_termine_daten where sprache='$sprache' and (refid=".implode(" or refid=",$xids).") order by sortnr asc",$conID); while (($row=mysql_fetch_assoc($result))!==false) { if (($row['key']!="")&&($row['value']!="")) { $ptermine[$row['refid']]['t'][] = array('key' => htmlentities($row['key']), 'value' => htmlentities($row['value'])); } } foreach (array_keys($ptermine) as $xid) { $content.='
'; if ($ptermine[$xid]['h']!="") $content.='

'.$ptermine[$xid]['h'].'

'; if ($ptermine[$xid]['b']!="") $content.='
'.$ptermine[$xid]['b'].'
'; if ($ptermine[$xid]['i']!="") { $bid=$ptermine[$xid]['i']*1+0; $content.=''; } if (count($ptermine[$xid]['t'])>0) { $content.='
'; $content.='
'; $content.=''; foreach ($ptermine[$xid]['t'] as $dat) { $content.=''; } $content.='
'.$dat['key'].''.$dat['value'].'
'; $content.='
'; $content.='
'; } $content.='
'; } // break; case "clips": // $katids = array(6,7,8); $pagesize = 5; $startclipid = -1; $startclip = null; // welche Kategorien sind gefuellt? $tmpkats = array(); $kat = null; foreach ($katids as $katid) { $result=mysql_query("select count(*) from clips where site=$site and sprache='$sprache' and status=1 and kategorie=".$katid." and odatum<='$heute' and (offdatum>='$heute' or offdatum='0000-00-00')",$conID); if (($row=mysql_fetch_row($result))&&($row[0]>0)) { $kat = new stdClass; $kat->id = $katid; $kat->bez = ''; $kat->anz = $row[0]; $kat->aktiv = false; $tmpkats[$kat->id] = $kat; } } // Kategorie-Bezeichnungen laden if (count($tmpkats)>0) { $sqlIn=implode(",", array_keys($tmpkats)); $result=mysql_query("select * from clips_kategorien where site=$site and status=1 and id IN (".$sqlIn.") order by bez ASC",$conID); while ($row=mysql_fetch_assoc($result)) { if (array_key_exists($row['id'],$tmpkats)) { $kat = $tmpkats[$row['id']]; $kat->bez = htmlentities($row["bez"]); $clipkategorien[$kat->id] = $kat; } } } // startclip? if (isset($clipid)) { $result=mysql_query("select id, kategorie from clips where site=$site and sprache='$sprache' and status=1 and id='$clipid' and odatum<='$heute' and (offdatum>='$heute' or offdatum='0000-00-00')",$conID); if ($row=mysql_fetch_assoc($result)) { if (array_key_exists($row["kategorie"],$clipkategorien)) { $startclipid = $row["id"]; $clipkat = $row["kategorie"]; $result = mysql_query("select id from clips where site=$site and sprache='$sprache' and status=1 and kategorie='$clipkat' and odatum<='$heute' and (offdatum>='$heute' or offdatum='0000-00-00') order by edatum DESC",$conID); $counter = 0; while ($row=mysql_fetch_assoc($result)) { if ($row["id"]!=$startclipid) { $counter++; } else { break; } } $clipseite = floor($counter/$pagesize)+1; } } } // aktive Kategorie if (!isset($clipkat)||!array_key_exists($clipkat,$clipkategorien)) { $keys = array_keys($clipkategorien); $clipkat = (count($keys)>0) ? $clipkategorien[$keys[0]]->id : null; } if (isset($clipkat)) { $kat = $clipkategorien[$clipkat]; $kat->aktiv = true; $clipkategorien[$clipkat] = $kat; } // aktuelle Seite der aktiven Kategorie laden $currentpage = 0; $totalpages = 0; $tmpclips = array(); $tmpimgs = array(); $tmpvids = array(); $clip = null; $img = null; $vid = null; $imgids = array(); $vidids = array(); if (isset($clipkat)) { $totalrecords = $clipkategorien[$clipkat]->anz; $currentpage = (isset($clipseite)&&(strval(intval($clipseite))==strval($clipseite))&&($clipseite<1000)) ? $clipseite : 1; $totalpages = 1 + floor(($totalrecords-1) / $pagesize); $offset = ($currentpage-1)*($pagesize); $loopcnt = 0; $maxloop = 100; while (($offset>0)&&($currentpage>0)&&($offset>=$totalrecords)) { $currentpage--; $offset = ($currentpage-1)*($pagesize); $loopcnt++; if ($loopcnt>$maxloop) { $currentpage = 1; $offset = $pagesize; } } $next = ($currentpage*$pagesize<$totalrecords); $top = ($next) ? $pagesize : $totalrecords - (($totalpages-1)*$pagesize); $result=mysql_query("select * from clips where site=$site and sprache='$sprache' and status=1 and kategorie='$clipkat' and odatum<='$heute' and (offdatum>='$heute' or offdatum='0000-00-00') order by edatum DESC limit ".$offset.",".$top,$conID); while ($row=mysql_fetch_assoc($result)) { $clip = new stdClass; $clip->id=$row["id"]; $clip->kategorie=$row["kategorie"]; $clip->datei=$row["datei"]; $clip->headline=htmlentities($row["headline"]); $clip->headline=str_replace("\n"," ",$clip->headline); $clip->headline=str_replace("\l"," ",$clip->headline); $clip->meldung=htmlentities($row["meldung"]); $clip->meldung=str_replace("\n"," ",$clip->meldung); $clip->meldung=str_replace("\l"," ",$clip->meldung); $clip->imgid=null; $clip->image=''; $clip->thumb=''; $clip->video=null; if ($row["images"]!="") { $imgid=explode(",",$row["images"]); $clip->imgid=$imgid[0]; if (!in_array($clip->imgid,$imgids)) { $imgids[]=$clip->imgid; } } if (!in_array($clip->datei,$vidids)) { $vidids[]=$clip->datei; } $tmpclips[$clip->id]=$clip; } } if (count($imgids)>0) { $sqlIn=implode(",", $imgids); $ordner=($site==18) ? 'clips/elster/tv' : 'clips'; $result=mysql_query("select * from co_medialib where ordner='".$ordner."' and id IN (".$sqlIn.")",$conID); while ($row=mysql_fetch_assoc($result)) { $img = new stdClass; $img->id=$row["id"]; $img->datei=$row["datei"]; $img->thumb=$row["thumb"]; $tmpimgs[$img->id] = $img; } } if (count($vidids)>0) { $sqlIn=implode(",", $vidids); $ordner=($site==18) ? 'clips/elster/tv/media' : 'clips'; $result=mysql_query("select * from co_fileserver where ordner='".$ordner."' and id IN (".$sqlIn.")",$conID); while ($row=mysql_fetch_assoc($result)) { $vid = new stdClass; $vid->id=$row["id"]; $vid->datei=$row["datei"]; $tmpvids[$vid->id] = $vid; } } foreach ($tmpclips as $id => $clip) { if (array_key_exists($clip->imgid,$tmpimgs)) { $clip->image = $tmpimgs[$clip->imgid]->datei; $clip->thumb = $tmpimgs[$clip->imgid]->thumb; } if (array_key_exists($clip->datei,$tmpvids)) { $clip->video = $tmpvids[$clip->datei]->datei; } if (isset($clip->video)) { if (!isset($clips)) { $clips = new stdClass; $clips->page = $currentpage; $clips->pages = $totalpages; $clips->kat = $clipkat; $clips->list = array(); } $clips->list[] = $clip; if ($clip->id==$startclipid) { $startclip = $clip; } } } // break; case "overview": // // $result=mysql_query("select * from news where site=$site and sprache='$sprache' and status=1 and odatum<='$heute' and (offdatum>='$heute' or offdatum='0000-00-00') order by odatum DESC,id DESC",$conID); while ($row=mysql_fetch_assoc($result)) { $nid=$row["id"]; $datum=dt_datum($row["datum"]); $headline=(htmlentities($row["headline"])); $headline=str_replace("\n"," ",$headline); $headline=str_replace("\l"," ",$headline); $meldung=ClearMultipleSpace(html_entity_decode(strip_tags($row["meldung"]))); $images=$row["images"]; $pdf=$row["pdf"]; $related=$row["related"]; $tmp1=wordwrap($meldung,110,"#####"); $tmp2=explode("#####",$tmp1); $tmp3=wordwrap($meldung,320,"#####"); $tmp4=explode("#####",$tmp3); if ($images!="") $bilder=array_merge(explode(",",$images),$bilder); if ($related!="") $links=array_merge(explode(",",$related),$links); if ($pdf!="") $pdfs=array_merge(explode(",",$pdf),$pdfs); $news[$nid]=array("d"=>$datum,"h"=>$headline,"m"=>"".$datum." ".$tmp2[0],"me"=>"".$datum." ".$tmp4[0],"i"=>$images); } $bilder=array_unique($bilder); $links=array_unique($links); $pdfs=array_unique($pdfs); // bilddaten einlesen $bilddaten=array(); $result=mysql_query("select id,datei,thumb,titel,credits,info from co_medialib where id=".implode(" or id=",$bilder),$conID); while ($row=mysql_fetch_assoc($result)) { $bid=$row["id"]; $bilddaten[$bid]=array("d"=>$row["datei"],"t"=>$row["thumb"],"titel"=>$row["titel"],"credits"=>$row["credits"],"info"=>$row["info"]); } $content=""; foreach (array_keys($news) as $id) { if ($news[$id]["i"]!="") { $bid=$news[$id]["i"]*1+0; $datei=$bilddaten[$bid]["t"]; } else { $datei="blank_a.gif"; } if ($site==16) { $content.="
".$news[$id]["h"]."
".$news[$id]["m"]."... lesen
"; } elseif ($site==18) { $content.="
"; if ($datei!="blank_a.gif") { $content.=""; } else { $content.=""; } $content.="

".$news[$id]["h"]."

".$news[$id]["me"]."... Meldung lesen
"; } } // break; // // case "details": $teaser=array(); $bilder=array(); $links=array(); $pdfs=array(); $news=array(); $xid=0; if (isset($_GET["artikelid"])) { $xid=$_GET["artikelid"]*1+0; } $result=mysql_query("select * from news where status=1 and id=".$xid,$conID); $row=mysql_fetch_assoc($result); $nid=$row["id"]; $datum=dt_datum($row["datum"]); $headline=nl2br(htmlentities($row["headline"])); $meldung=$row["meldung"]; $meldungelster="".$datum." ".$meldung; if (substr($meldung,0,3)=="

") { $meldung="

$datum ".substr($meldung,3); } else { $meldung="$datum ".$meldung; } $images=$row["images"]; $pdf=$row["pdf"]; $related=$row["related"]; $meta_title=$row["meta_title"]; $meta_description=$row["meta_description"]; if ($meta_title=="") { $meta_title=htmlentities(ClearMultipleSpace(html_entity_decode(strip_tags($headline)))); } if ($images!="") $bilder=array_merge(explode(",",$images),$bilder); if ($related!="") $links=array_merge(explode(",",$related),$links); if ($pdf!="") $pdfs=array_merge(explode(",",$pdf),$pdfs); $news[$nid]=array("d"=>$datum,"h"=>$headline,"m"=>$meldung,"i"=>$images,"r"=>$related,"p"=>$pdf); $bilder=array_unique($bilder); $links=array_unique($links); $pdfs=array_unique($pdfs); // bilddaten einlesen $bilddaten=array(); $result=mysql_query("select id,datei,thumb,titel,credits,info from co_medialib where id=".implode(" or id=",$bilder),$conID); while ($row=mysql_fetch_assoc($result)) { $bid=$row["id"]; $bilddaten[$bid]=array("d"=>$row["datei"],"titel"=>$row["titel"],"credits"=>$row["credits"],"info"=>$row["info"]); } // pdf daten einlesen $pdfdaten=array(); $result=mysql_query("select id,datei,titel,info from co_pdfserver where id=".implode(" or id=",$pdfs),$conID); while ($row=mysql_fetch_assoc($result)) { $bid=$row["id"]; $pdfdaten[$bid]=array("d"=>$row["datei"],"titel"=>$row["titel"],"info"=>$row["info"]); } // verknpfungen einlesen $linkdaten=array(); $result=mysql_query("select id,url,titel,ziel,info from co_bookmarks where id=".implode(" or id=",$links),$conID); while ($row=mysql_fetch_assoc($result)) { $bid=$row["id"]; $linkdaten[$bid]=array("url"=>$row["url"],"titel"=>$row["titel"],"info"=>$row["info"],"ziel"=>$row["ziel"]); } $bilddiv="

"; $bildelster=""; if ($news[$xid]["i"]!="") { foreach (explode(",",$news[$xid]["i"]) as $bid) { $datei=$bilddaten[$bid]["d"]; $btitel=$bilddaten[$bid]["titel"]; $bu=$bildddaten[$bid]["infos"]; $credits=$bilddaten[$bid]["credits"]; $bilddiv.="\"$btitel\"
"; $bildelster.=""; } } $bilddiv.="
"; $related_pdf=""; if ($news[$xid]["p"]!="") { $data=array(); foreach (explode(",",$news[$xid]["p"]) as $pid) { $datei=$pdfdaten[$pid]["d"]; $titel=htmlentities($pdfdaten[$pid]["titel"]); $info=$pdfdaten[$pid]["info"]; if ($site==18) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, "ftp://jgassebner.homepage.t-online.de/scoutsource/public/pdf_dokumente/".$datei); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_BINARYTRANSFER, true); curl_setopt($ch, CURLOPT_USERPWD, "jg@jgassebner.homepage.t-online.de:scout250"); $s=curl_exec($ch); curl_close($ch); $s=showbytes(strlen($s)); } else { $s=showbytes(filesize("../pdf_dokumente/".$datei)); } if ($site==18) { $link=""; } else { $link=" ".$titel." (PDF Dokument / $s)"; } array_push($data,$link); } $related_pdf=implode("
",$data); } $related_links=""; if ($news[$xid]["r"]!="") { $data=array(); foreach (explode(",",$news[$xid]["r"]) as $pid) { $url=$linkdaten[$pid]["url"]; $titel=htmlentities($linkdaten[$pid]["titel"]); $info=$linkdaten[$pid]["info"]; $ziel=$linkdaten[$pid]["ziel"]; if ($titel=="") $titel="Weitere Informationen"; if ($site==18) { $link=""; } else { $link=" ".$titel.""; } array_push($data,$link); } $related_links=implode("
",$data); } $datum=strip_tags($datum); $content=""; if ($site==16) { $content="

$headline


$bilddiv$meldung

$related_pdf
$related_links

"; } elseif ($site==18) { $content=$bildelster. "
$headline
". $meldungelster; if (($related_pdf!="")||($related_links!="")) $content.="

"; if ($related_pdf!="") $content.=$related_pdf; if ($related_links!="") { if ($related_pdf!="") $content.="

"; $content.=$related_links; } } break; // case "termine": // // $result=mysql_query("select * from termine where sprache='$sprache' and status=1 and odatum<='$heute' and (offdatum>='$heute' or offdatum='0000-00-00') order by datumvon ASC,id DESC",$conID); while ($row=mysql_fetch_assoc($result)) { $tid=$row["id"]; $images=$row["images"]; $datumvon=dt_datum($row["datumvon"]); $datumbis=dt_datum($row["datumbis"]); $headline=(htmlentities($row["headline"])); $headline=str_replace("\n"," ",$headline); $headline=str_replace("\l"," ",$headline); $beschreibung=ClearMultipleSpace(html_entity_decode(strip_tags($row["beschreibung"]))); $datum=""; if ($datumbis=="00.00.0000") { $datum=$datumvon; } else { $jvon=substr($datumvon,6,4); $mvon=substr($datumvon,3,2); $tvon=substr($datumvon,0,2); $jbis=substr($datumbis,6,4); $mbis=substr($datumbis,3,2); $tbis=substr($datumbis,0,2); if ($jbis>$jvon) { $datum=$datumvon." ".$datumbis; } else { if ($mbis>$mvon) { $datum=$tvon.".".$mvon.". ".$tbis.".".$mbis.".".$jbis; } else { $datum=$tvon.". ".$tbis.".".$mbis.".".$jbis; } } } if ($images!="") $bilder=array_merge(explode(",",$images),$bilder); $termine[$tid]=array("d"=>$datum,"h"=>$headline,"b"=>$beschreibung,"i"=>$images); } $bilder=array_unique($bilder); // bilddaten einlesen $bilddaten=array(); $result=mysql_query("select id,datei,thumb,titel,credits,info from co_medialib where id=".implode(" or id=",$bilder),$conID); while ($row=mysql_fetch_assoc($result)) { $bid=$row["id"]; $bilddaten[$bid]=array("d"=>$row["datei"],"t"=>$row["thumb"],"titel"=>$row["titel"],"credits"=>$row["credits"],"info"=>$row["info"]); } $content=""; foreach (array_keys($termine) as $id) { if ($termine[$id]["i"]!="") { $bid=$termine[$id]["i"]*1+0; $datei=$bilddaten[$bid]["t"]; } else { $datei=""; } $content.="
".$termine[$id]["d"]."

".$termine[$id]["h"]."

"; if ($datei!="") { $content.=""; $content.="
"; } else { $content.="
"; } $content.= $termine[$id]["b"]."
"; } // break; } // // // // // $panel_teaser=""; if (!isset($teaser_start)) $teaser_start=0; if (!isset($teaser_limit)) $teaser_limit=2; $exc_id=""; if (isset($_GET["artikelid"])) { $exc_id=$_GET["artikelid"]*1+0; } if ($exc_id>0) { $result=mysql_query("select id,datum,headline,meldung from news where site=$site and id<>$exc_id and sprache='$sprache' and status=1 and odatum<='$heute' and (offdatum>='$heute' or offdatum='0000-00-00') order by odatum DESC,id DESC limit 0,2",$conID); } else { $result=mysql_query("select id,datum,headline,meldung from news where site=$site and sprache='$sprache' and status=1 and odatum<='$heute' and (offdatum>='$heute' or offdatum='0000-00-00') order by odatum DESC,id DESC limit 0,2",$conID); } while ($row=mysql_fetch_assoc($result)) { $nid=$row["id"]; $datum=dt_datum($row["datum"]); $headline=(htmlentities($row["headline"])); $headline=str_replace("\n"," ",$headline); $headline=str_replace("\l"," ",$headline); $meldung=ClearMultipleSpace(html_entity_decode(strip_tags($row["meldung"]))); $tmp1=wordwrap($meldung,80,"#####"); $tmp2=explode("#####",$tmp1); $panel_teaser.="
$datum
$headline
".$tmp2[0]."...
"; } ?> Pützer Elster B Porsche-Museum - scoutsource communication

Für den Inhalt dieser Seite ist eine neuere Version von Adobe Flash Player erforderlich.

Adobe Flash Player herunterladen