<?
require("news.config.php");
if($bildid = intval(functions::getFormData('Bild'))) {
	$bild = new bild();
	$plattform = $news->Plattform;
	$helfer = $news->Helfer;
	$bild->getImage($bildid);
	exit;
}
if($bildid = intval(functions::getFormData('BildFenster'))) {
	$news->BildFenster($bildid);
	exit;
}

$news->AusgabeStart = intval(functions::getFormData('Start'));
$news->Thema = intval(functions::getFormData('Thema', 0, 0, -1));
$news->Artikel = intval(functions::getFormData('Artikel'));
$news->MailArtikel = intval(functions::getFormData('MailArtikel'));
$news->Heft = functions::getFormData('Heft');
$news->Suchstring = functions::getFormData('Suche');
if(($news->Thema == -1) && (! $news->Suchstring) && (! $news->Heft)) $news->Thema = 0;

if($news->MailArtikel) {
	$ausgabe = $news->MailArtikel();
}else if($news->Artikel) {
	$ausgabe = $news->Details();
} else if($news->Heft) {
	$ausgabe = $news->Heftauswahl();
} else if(isset($_GET['Suche'])) {
	$ausgabe = $news->Suche();
} else {
	if(!($ausgabe = $news->Uebersicht())) {
		$ausgabe['inhalt'] = $news->Helfer->getError();
	}
}
$ausgabe['Themenliste'] = $news->ThemenListe($news->Thema, ' <input type="submit" value="ok">');
$ausgabe['Druckversion'] = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];

echo $news->printPage($ausgabe);
?>
