Ejemplo n.º 1
0
    }
    if (isset($biblio_list) && isset($sysconf['enable_xml_result']) && $sysconf['enable_xml_result']) {
        $search_result_info .= '<div>';
        $search_result_info .= '<a href="index.php?resultXML=true&' . $_SERVER['QUERY_STRING'] . '" class="xmlResultLink" target="_blank" title="View Result in XML Format" style="clear: both;">XML Result</a>';
        $search_result_info .= '<a href="index.php?JSONLD=true&' . $_SERVER['QUERY_STRING'] . '" class="jsonResultLink" target="_blank" title="View Result in JSON Format" style="clear: both;">JSON Result</a>';
        $search_result_info .= '</div>';
    }
}
if (isset($_GET['JSONLD']) && $sysconf['jsonld_result']) {
    // get document list but don't output the result
    $biblio_list->getDocumentList(false);
    if ($biblio_list->num_rows > 0) {
        // send http header
        header('Content-Type: application/ld+json');
        header('Content-disposition: attachment; filename=biblio-opac.json');
        echo $biblio_list->JSONLDresult();
    }
    exit;
}
// check if we are on xml resultset mode
if ((isset($_GET['rss']) || isset($_GET['resultXML'])) && $sysconf['enable_xml_result']) {
    // get document list but don't output the result
    $biblio_list->getDocumentList(false);
    if ($biblio_list->num_rows > 0) {
        // send http header
        header('Content-Type: text/xml');
        echo '<?xml version="1.0" encoding="UTF-8" ?>' . "\n";
        if (isset($_GET['rss'])) {
            echo $biblio_list->RSSresult();
        } else {
            echo $biblio_list->XMLresult();