<?php
	$topdir = '.';
	require $topdir."/dacode.php3";

	$news = LoadClass('News');
	$session= LoadClass('Session');

	header("Content-Type: text/plain");

	$newstempo = $news->get_news(20,0,0,1,1,0,0);

	if (gettype($newstempo) == "array") {
		reset($newstempo);
		echo "%%\n";
		while ($cur=current($newstempo)) {
			echo "$cur[title]\n";
			ereg("^([0-9]{4})([0-9]{2})([0-9]{2})", $cur['timestamp'], $res);
			echo $session->newsurls($cur['id'],0,0,$res[1],$res[2],$res[3])."\n";
			echo $cur['name']."\n";
			echo $cur['contact']."\n";
			echo $cur['topic']."\n";
			echo "%%\n";
			next($newstempo);
		}
	}
?>
