<?php
include( "./support/class.FastTemplate.php3" );
include( "class.dbcore.php3" );
include( "class.rfkmap.php3" );
if (!isset($language)) $language = "spanish";
$tpl = new FastTemplate( "./templates/" );
$tpl->define( array ( "main" => "main.tpl" ));
$cNews = new RFKmap( $tpl, "Books",
array ( "view_list" => "booklist.tpl",
"view_item" => "bookitem.tpl",
"view_only" => "bookonly.tpl" ));
$tpl->assign(TITLE_A, "List of $language's books.");
$result = $cNews->view_list( $tpl, "", "$language", "", " LIMIT 0,5" );
if ($result) $cNews->view_list_parse( $tpl, "CONTENT_A" );
else $tpl->assign( "CONTENT_A", "- List empty -" );
if (isset($id_book)) {
$tpl->assign(TITLE_B, "Details of a $language book.");
$result = $cNews->view_only( $tpl, "$id_book", "$language" );
if ($result) $cNews->view_only_parse( $tpl, "CONTENT_B" );
else $tpl->assign( "CONTENT_B", "- Nothing to print -" );
} else {
$tpl->assign( "TITLE_B", "" );
$tpl->assign( "CONTENT_B", "" );
}
$tpl->parse(CONTENT, "main");
$tpl->FastPrint(CONTENT);
?>