42)extract($_REQUEST); $uni=get_unicode($host); if ($uni==0) $term=fromunicode($term,"rus"); #echo "
host="; #echo $host; #echo "
term="; #echo $term; #echo "
to="; #echo $to; #echo "
"; #echo "
position="; #echo $pos; #echo "
"; #$count=$to-$pos; #echo "
count="; #echo $count; #echo "
"; #echo "
$format"; # header("Content-type: text/marc"); #echo ""; #echo "Content-type: text/marc"; # include ("func.php"); # $term="@attr 1=1003 @attr 5=1 christie"; $term1=str_replace('\"',' ',$term); $term=$term1; $sout = ""; $pk="n"; if ($host == "olsc3.unilib.neva.ru/books") { $pk="y"; } if ($host == "195.178.205.8/All") { $pk="y"; } if ($pk == "y") { $termn=convert_cyr_string($term,"w","k"); $term=$termn; } $i=0; $id[] = yaz_connect($host); yaz_syntax($id[$i],$format); yaz_range($id[$i],$pos,$to-$pos+1); yaz_element($id[$i],"F"); yaz_search($id[$i],"rpn",$term); yaz_wait(); $error = yaz_error($id[$i]); $add = yaz_addinfo($id[$i]); echo $add; if (!empty($error)) { echo "Error: $error"; } else { $hits = yaz_hits($id[$i]); # echo " : " . $hits; # echo "
"; # echo $term; # echo "
"; # echo $host; } for ($p = $pos; $p <= $to; $p++) { $rec = yaz_record($id[$i],$p,"raw"); # if (empty($rec)) continue; echo $rec; } exit; ?>