Engelsystem
' . $_SERVER['HTTP_HOST']
. htmlspecialchars(preg_replace(
'#[&?]key=[a-f0-9]{32}#',
'',
$_SERVER['REQUEST_URI']
))
. '
' . date('Y-m-d\TH:i:sP', $news_entries[0]['Datum']) . "\n";
foreach ($news_entries as $news_entry) {
$html .= make_atom_entry_from_news($news_entry);
}
$html .= "";
return $html;
}
function make_atom_entry_from_news($news_entry)
{
return "
" . htmlspecialchars($news_entry['Betreff']) . "
" . preg_replace('#^https?://#', '', page_link_to_absolute("news")) . "-${news_entry['ID']}
" . date('Y-m-d\TH:i:sP', $news_entry['Datum']) . "
" . htmlspecialchars($news_entry['Text']) . "
\n";
}