<?php
if (!defined('WBLEGAL')) die('Kann nicht ohne Personal WebBase ausgeführt werden.');
echo $header;
function martinus_parse_url($input) {
return '<a target="_blank" href="'.deferer('http://www.daskirchenjahr.de/tag.php'.$input[1]).'"';
}
// Ich suche mir das aktuelle Kirchenfest von daskirchenjahr.de
$eingangsseite = my_get_contents('http://www.daskirchenjahr.de/index.php');
if ($eingangsseite == '') die('<b>Fehler: Konnte Ressourcen nicht beziehen!</b><br><br>Wenn das Problem weiterhin besteht, prüfen Sie bitte Ihre PHP-Konfiguration.'.$footer);
preg_match_all('/Aktuelles Fest: <A HREF="(.+?)"(.+?)><B>(.+?)<\/B><\/A>/im', $eingangsseite, $omatches);
echo '<h1>'.htmlentities($module_information->caption).'</h1>';
$festseite = my_get_contents('http://www.daskirchenjahr.de/'.$omatches[1][0].'&typ=proprium');
preg_match_all('/<\/A><\/P><BR>(.+?)<CENTER><TABLE WIDTH="90%" CELLSPACING="4" ALIGN=CENTER><TR><TD style="text-align:center; background-color:#dcdcee"><FONT SIZE="-1">Zuletzt/is', $festseite, $matches);
echo '<h2>Proprium</h2>';
$txt = $matches[1][0];
$txt = str_replace('<A HREF="', '<a target="_blank" href="', $txt);
$txt = str_replace(' <FONT SIZE=2>()</FONT>', '', $txt);
if (strpos($festseite, '<TD style="header;text-align=center;background-color:purple">')) $farbe = 'Violett';
if (strpos($festseite, '<TD style="header;text-align=center;background-color:white">')) $farbe = 'Weiß';
if (strpos($festseite, '<TD style="header;text-align=center;background-color:black">')) $farbe = 'Schwarz';
if (strpos($festseite, '<TD style="header;text-align=center;background-color:green">')) $farbe = 'Grün';
if (strpos($festseite, '<TD style="header;text-align=center;background-color:red">')) $farbe = 'Rot';
preg_match_all('/<A class="mainmenu" style="background-color:#DCDCDC" href="(.+?)" title="(.+?)">(.+?)<\/A><BR><P style="text-align:center;background-color:#DFEAFF"><A class="submenu" style="background-color:#DFEAFF" href="tag.php(.+?)"/is', $festseite, $matches);
$ary = explode('"', $matches[3][0]);
$einordnung = '<a target="_blank" href="'.deferer
('http://www.daskirchenjahr.de/'.$ary[count($ary)-4]).'">'.$ary[count($ary)-2].'</a>';
$dazwischen = '';
$dazwischen .= '<TR VALIGN="TOP"><TD WIDTH="22%" STYLE="background-color:#F4F4F4"><P ALIGN="RIGHT"><STRONG>Name:</STRONG></P></TD><TD WIDTH="78%" STYLE="background-color:#F4F4F4"><P>'.$omatches[3][0].'</P></TD></TR>';
$dazwischen .= '<TR VALIGN="TOP"><TD WIDTH="22%" STYLE="background-color:#F4F4F4"><P ALIGN="RIGHT"><STRONG>Einordnung:</STRONG></P></TD><TD WIDTH="78%" STYLE="background-color:#F4F4F4"><P>'.$einordnung.'</P></TD></TR>';
$dazwischen .= '<TR VALIGN="TOP"><TD WIDTH="22%" STYLE="background-color:#F4F4F4"><P ALIGN="RIGHT"><STRONG>Farbe:</STRONG></P></TD><TD WIDTH="78%" STYLE="background-color:#F4F4F4"><P>'.$farbe.'</P></TD></TR>';
$txt = str_replace('<COL WIDTH="201*"><TR VALIGN="TOP">', '<COL WIDTH="201*">'.$dazwischen.'<TR VALIGN="TOP">', $txt);
$txt = preg_replace('/<FONT SIZE=2>(.+?)<\/FONT>/is', '$1', $txt);
// Sonderzeichen
echo decode_critical_html_characters($txt);
echo '<h2>Weitere Informationen</h2>';
echo '<ul>';
preg_match_all('/<p class="topmenu" style="background-color:#DCDCDC">(.+?)<\/P>/is', $festseite, $matches);
$txt = $matches[1][0];
$txt = preg_replace('/<A(.+?)>Proprium<\/A> \| /is', '', $txt);
$txt = str_replace('<A HREF="', '<a target="_blank" href="', $txt);
echo '<li>';
// Sonderzeichen
echo decode_critical_html_characters($txt);
echo '</li>';
echo '</ul>Diese Informationen wurden zusammengetragen aus <a target="_blank" href="'.deferer('http://www.daskirchenjahr.de/').'">Das Kirchenjahr</a> von Dr. Martinus.';
echo $footer;
?>