<?php
/* daCode http://www.dacode.org
 * htdocs/wap/index.php3
 * Fabien Penso <penso@linuxfr.org>
 * $Id: index.php3,v 1.12 2001/07/11 09:22:26 penso Exp $
 *
 * This is used to make a WML/WAP version
*/
	$topdir = '..';
	require $topdir."/dacode.php3";

	$news = LoadClass('News');

	header("Content-Type: text/vnd.wap.wml");
	echo "<?xml version=\"1.0\"?>\n";
	echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"";
	echo " \"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
	echo "<wml><card id=\"top\" title=\"".$config->name."\">\n";

	$tmp = $news->get_news(10,0,0,1,1,0,0,0);

	if (gettype($tmp) == "array") {

		echo "<p align=\"left\">\n";
		echo "<table columns=\"1\" align=\"C\">\n";

		while(current($tmp)) {
			$cur = current($tmp);

			echo "<tr><td><a href=\"news.".$config->php."?news_id=$cur[id]\">$cur[title]</a><br/></td></tr>\n";

			next($tmp);
		}

		echo "</table></p>\n";

	}

	echo "</card></wml>\n";

?>
