3 <meta http
-equiv
="Content-Type" content
="text/html; charset=utf-8"/>
4 <title
>z39
.5 klient
</title
>
10 $query=stripslashes($_REQUEST[query
]);
11 $num_hosts = count($host);
12 if (empty($query) ||
count($host) == 0) {
13 echo '<form method="get">
14 <input type="checkbox"
15 name="host[]" value="bagel.indexdata.dk/gils" />
17 <input type="checkbox"
18 name="host[]" value="localhost:9999/Default" />
20 <input type="checkbox" checked="checked"
21 name="host[]" value="ckis.cuni.cz:9992/PEDF" />
25 <input type="text" size="30" name="query" />
26 <input type="submit" name="action" value="Search" />
30 echo 'You searched for ' . htmlspecialchars($query) . '<br />';
31 for ($i = 0; $i < $num_hosts; $i++
) {
32 $id[] = yaz_connect($host[$i]);
38 yaz_ccl_conf($id[$i], $fields); // see example for yaz_ccl_conf
39 if (!yaz_ccl_parse($id[$i], $query, &$cclresult)) {
40 echo 'Error: ' . $cclresult["errorstring"];
42 $rpn = $cclresult["rpn"];
43 //yaz_search($id, "rpn", $rpn)ů
44 yaz_syntax($id[$i], "usmarc");
45 yaz_range($id[$i], 1, 10);
46 yaz_search($id[$i], "rpn", $rpn);
51 for ($i = 0; $i < $num_hosts; $i++
) {
52 echo '<hr />' . $host[$i] . ':';
53 $error = yaz_error($id[$i]);
57 $hits = yaz_hits($id[$i]);
58 echo "Result Count $hits";
61 for ($p = 1; $p <= 10; $p++
) {
62 $rec = yaz_record($id[$i], $p, "string");
63 if (empty($rec)) continue;
64 echo "<dt><b>$p</b></dt><dd>";