Ejemplo n.º 1
0
        }
        // strip last comma
        $info = substr_replace($info, '', -2);
    } else {
        $info .= '<div style="clear: both;">' . lang_opac_search_result_info . ': <strong><cite>' . $keywords . '</cite></strong></div>';
    }
} else {
    // show promoted titles
    if ($sysconf['enable_promote_titles']) {
        $biblio_list->only_promoted = true;
    }
}
// check if we are on xml resultset mode
if (isset($_GET['resultXML']) && $sysconf['enable_xml_result']) {
    // get document list but don't output the result
    $biblio_list->getDocumentList($sysconf['opac_result_num'], false);
    if ($biblio_list->num_rows > 0) {
        // send http header
        header('Content-Type: text/xml');
        echo '<?xml version="1.0" encoding="UTF-8" ?>' . "\n";
        echo $biblio_list->XMLresult();
    }
    exit;
} else {
    // show the list
    echo $biblio_list->getDocumentList($sysconf['opac_result_num']);
    echo '<br />' . "\n";
    // set result number info
    $info = str_replace('{biblio_list->num_rows}', $biblio_list->num_rows, $info);
}
// count total pages
Ejemplo n.º 2
0
     if ($callnumber) {
         $search_result_info .= 'Call Number : <strong><cite>' . $callnumber . '</cite></strong>, ';
     }
     // strip last comma
     $search_result_info = substr_replace($search_result_info, '', -2);
 } else {
     $search_result_info .= __('Found <strong>{biblio_list->num_rows}</strong> from your keywords') . ': <strong class="search-found-info-keywords">' . $keywords_info . '</strong>';
 }
 $search_result_info .= '</div>';
 // show promoted titles
 if (isset($sysconf['enable_promote_titles']) && $sysconf['enable_promote_titles']) {
     $biblio_list->only_promoted = true;
 }
 if (!isset($_GET['resultXML'])) {
     // show the list
     echo $biblio_list->getDocumentList();
     echo '<br />' . "\n";
 }
 // set result number info
 $search_result_info = str_replace('{biblio_list->num_rows}', $biblio_list->num_rows, $search_result_info);
 // count total pages
 $total_pages = ceil($biblio_list->num_rows / $sysconf['opac_result_num']);
 // page number info
 if (isset($_GET['page']) and $_GET['page'] > 1) {
     $page = intval($_GET['page']);
     $msg = str_replace('{page}', $page, __('You currently on page <strong>{page}</strong> of <strong>{total_pages}</strong> page(s)'));
     //mfc
     $msg = str_replace('{total_pages}', $total_pages, $msg);
     $search_result_info .= '<div class="search-page-info">' . $msg . '</div>';
 } else {
     $page = 1;