<?php
	require_once( "../local.config.inc.php" );

	function genertable() {
		$retval = "";
		$retval.="<table border=\"1\">";
		$tasks = FNTH_db_get_resultset( "select * from tasks" );
		foreach ($tasks as $task) {
			$retval.="<tr>";
			$retval.=sprintf( "<td>%d</td>",$task["task_id"] );
			$retval.=sprintf( "<td>%s</td>",$task["task_ctstamp"] );
			$retval.=sprintf( "<td>%s</td>",$task["task_name"] );
			$retval.=sprintf( "<td>%s</td>",print_r( unserialize( $task["task_state"] ) , true ) );
			$retval.="</tr>";
		}
		$retval.="</table>";
		return $retval;	
	}

	echo FNTHPage::renderPage( genertable() );
?>
