if ($output == 'meta') {
            $CONTENT = json_encode($meta);
        }
        $TITLE = $meta['deskripsi'];
        $types = json_decode('{"html":"","meta":"","graph":"","csv":"","json":"","xml":""}', true);
        foreach ($types as $key => $val) {
            $ACTION .= sprintf('<li><a href="./%1$s?q=%2$s&o=%3$s">%4$s</a></li>', $val, $query, $key, $key);
        }
        $ACTION = '<ul class="action">' . $ACTION . '</ul>';
    } else {
        die($CONTENT);
    }
} else {
    $catalog = new catalog();
    $catalog->get_catalog(DATA_DIR);
    $CONTENT = $catalog->render_catalog();
}
// Further process if else
$MENU .= '<li><a href="./?">Katalog</a></li>';
$MENU .= '<li><a href="#">Dataset baru</a></li>';
$MENU = '<ul class="menu">' . $MENU . '</ul>';
$HEADER = sprintf('<h2>%1$s</h2>', $TITLE) . $MENU . $ACTION;
$FOOTER = sprintf('&copy; %1$s <a href="http://id-php.org/GDI">GDI</a>', date('Y'));
$THEME = 'assets/styles/default.css';
if ($output == 'graph') {
    include_once 'graph.php';
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="id" dir="ltr"" xmlns="http://www.w3.org/1999/xhtml">