255): $unicurrent=utf8_encode($current); $unistring=$unistring.$unicurrent; elseif($codcurrent<192): if($codcurrent==184): $unicurrent=chr(209).chr($codcurrent-39); $unistring=$unistring.$unicurrent; elseif($codcurrent==168): $unicurrent=chr(208).chr($codcurrent-39); $unistring=$unistring.$unicurrent; elseif($codcurrent==147): $unicurrent=utf8_encode("\""); $unistring=$unistring.$unicurrent; elseif($codcurrent==148): $unicurrent=utf8_encode("\""); $unistring=$unistring.$unicurrent; elseif($codcurrent==151): $unicurrent=utf8_encode("-"); $unistring=$unistring.$unicurrent; else: $unicurrent=utf8_encode($current); $unistring=$unistring.$unicurrent; endif; else: if ($codcurrent<240): $unicurrent=chr(208).chr($codcurrent-48); $unistring=$unistring.$unicurrent; else: $unicurrent=chr(209).chr($codcurrent-112); $unistring=$unistring.$unicurrent; endif; endif; } return $unistring; } global $scan, $scan1, $scan2, $pri1, $pri2, $host, $i1, $hits; global $server1, $server2; global $item; global $use_1, $term_1, $trun1, $bop_1; global $use_2, $term_2, $trun2, $bop_2; global $use_3, $term_3, $trun3, $bop_3; global $use_4, $term_4, $trun4, $bop_4; global $use_5, $term_5, $trun5, $bop_5; $ver1=ord(substr(phpversion(),0,1))-48; $ver2=ord(substr(phpversion(),2,1))-48; $ver=$ver1*10+$ver2; #echo $ver; if ($ver>42)extract($_REQUEST); if ($format == "1.2.840.10003.5.109.10") { $pri2=1; $pri1=1; $pxml=0; } if (($scan==tounicode(""))||($scan1==tounicode(""))||($scan2==tounicode(""))) { if (strlen($term_2)>0) { $term_1=$term_2; $use_1=$use_2; } if (strlen($term_3)>0) { $term_1=$term_3; $use_1=$use_3; } include("func.php"); $target=$host[0]; $field1="@attr 1=" . $use_1; $term1=$term_1; if (strlen($term1)==0) /* { echo "z39.50
Z39.50

, ,


"; exit; } */ { $term_1='0'; $term1=$term_1; } $syntax="RUSMarc"; $element="F"; $number=15; ?> <? echo tounicode("Web . Z39.50.")?>
http://www.elnit.ru Описание     IRBIS64Свободный доступ к базе данных IRBIS64  Z39.50Шлюз Z39.50



2) { $host[$num_hosts]= $server1; $num_hosts=$num_hosts+1; } } else $server1=" "; if ($server2) { if (strlen($server2)>2) { $host[$num_hosts]= $server2; $num_hosts=$num_hosts+1; } } else $server2=" "; if ((strlen($server1)<2)||(strlen($server2)<2)) $num_hosts=1; if ((strlen($server1)>2)&&(strlen($server2)>2)) $num_hosts=2; for ($i = 0; $i < $num_hosts; $i++) { $id[] = yaz_connect($host[$i]); $uni=0; $uni=get_unicode($host[$i]); $uterm1=$term1; if($uni==0) $uterm1=fromunicode($term1,"rus"); $zapr=$field1 . ' "' . $uterm1 . '"'; // if ($uni==0) $zapr=tounicode($zapr); $options=array("number"=>$number,"stepsize"=>0,"position"=>1); yaz_scan($id[$i],"rpn", $zapr, $options); yaz_wait(); $errno = yaz_errno($id[$i]); if ($errno == 0) { /* echo 'Scan ok; '; */ $ar = yaz_scan_result($id[$i], &$options); // while(list($key,$val)=each($options)) { // echo "$key = $val "; // } $hostnm=get_hostname($host[$i]); /* echo "z39.50"; echo "
"; echo "
"; echo " Z39.50"; */ echo "
".tounicode(": ")."" . tounicode($hostnm) . " (" . $host[$i] . ")" . "
"; echo ""; echo ""); echo tounicode(""); /* echo $zapr; */ /* echo $host[$i]; */ // echo "!",$ar[1][1]; /* echo '
".tounicode(" -
"; $count=$count+1; } $lastterm=$termdop; echo "
'; */ $count=0; while(list($key,list($k, $term, $tcount))=each($ar)) { // echo "$key = $val "; if (empty($k)) continue; // $termdop=str_replace(' ','%20',$term); $termdop=trim($term); echo "
"; $termdop2=$termdop; if ($uni==0) $termdop=tounicode($termdop); if ($uni==0) $termdop2=tounicode($termdop2); $termdop2=urlencode($termdop2); echo ""; if ($uni==0) $term=tounicode($term,"rus"); echo $term,""; echo "        ",$tcount; echo "

"; /* } else { echo tounicode(" . : ") . yaz_error($id[$i]) . "
"; } // yaz_close($host[$i]); } */ echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; $from2=$from-10; $to2=$from2+9; // $prevterm=substr($termdop,0,1); if (uni==1) $prevterm=tounicode(substr(fromunicode($termdop,"rus"),0,1)); // if ($uni==0) $prevterm=tounicode(substr(fromunicode($termdop,"rus"),0,1)); if ($from2>0) { // echo "
"; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; $spisok=tounicode(""); // echo ""; // echo "  ";?>        "; // echo $prevterm; } // echo $count; // echo "!"; // echo $number; if ($count>=$number) { echo "
"; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; $spisok=tounicode(""); // echo ""; $from1=$from+10; $to1=$from1+9; // echo ""; // echo ""; // echo ""; ?> >')); echo ""; } // echo ""; echo "
   
"; echo ""; echo "
"; } else { echo tounicode(" . : ") . yaz_error($id[$i]) . "
"; } // yaz_close($host[$i]); } echo "
"; exit; } if ($extend == "m") { # header("Location: marc.php"); # exit; # header("Content-type: text/marc"); include("func.php"); $sout = ""; if ((empty($term_1) && empty($term_2)) || ((count($host) == 0)&&(empty($server1))&&(empty($server2)))) { echo tounicode(" !"); exit; }; if (!empty($term_1)) { $term = "@attr 1=" . $use_1 . " @attr 5=1 \"". $term_1 . "\" "; } if (!empty($term_2)) { $term = $term . " @attr 1=" . $use_2 . " @attr 5=1 \"". $term_2 . "\" "; }; if (!empty($term_3)) { $term = $term . " @attr 1=" . $use_3 . " @attr 5=1 \"". $term_3 . "\" "; }; if (!empty($term_4)) { $term = $term . " @attr 1=" . $use_4 . " @attr 5=1 \"". $term_4 . "\" "; }; if (!empty($term_5)) { $term = $term . " @attr 1=" . $use_5 . " @attr 5=1 \"". $term_5 . "\" "; }; if (!empty($term_1) && !empty($term_2) ) { $term = "@" . $bop_1 . " " . $term; }; if (!empty($term) && !empty($term_3) ) { $term = "@" . $bop_2 . " " . $term; }; if (!empty($term) && !empty($term_4) ) { $term = "@" . $bop_3 . " " . $term; }; if (!empty($term) && !empty($term_5) ) { $term = "@" . $bop_4 . " " . $term; }; # echo $term; # $fp = fopen("/phplog/s.log","w"); $pk="n"; if ($host[0] == "olsc3.unilib.neva.ru/books") { $pk="y"; } if (substr($host[0],0,6)=="ruslan") { $pk="y"; } if ($host[0] == "195.178.205.8/All") { $pk="n"; } if ($host[0] == "rocco51.epnet.com:2990/afh") { $format="1.2.840.10003.5.10:100000"; } if ($pk == "y") { $termn=convert_cyr_string($term,"w","k"); $term=$termn; } $num_hosts = count($host); $num_hostsold=$num_hosts; if ($host[0] == "195.178.205.30/book") { $host[$num_hosts]= "195.178.205.8/vgbilint"; $num_hosts=$num_hosts+1; } if ($server1) { $host[$num_hosts]= $server1; $num_hosts=$num_hosts+1; } if ($server2) { $host[$num_hosts]= $server2; $num_hosts=$num_hosts+1; } # echo ' ' . htmlspecialchars(fromunicode($term,"rus")) . '
'; // for ($i = 0; $i < $num_hosts; $i++) { // $id[] = yaz_connect($host[$i]); // yaz_syntax($id[$i],$format); // yaz_range($id[$i],$from,$to-$from+1); // yaz_element($id[$i],"F"); // $uni=0; $uni=get_unicode($host[0]); // if ($uni==1) $term=tounicode($term); $term_send=$term; if ($uni==0) $term_send=fromunicode($term,"rus"); // yaz_search($id[$i],"rpn",$term_send); // } // yaz_wait(); #echo $format; echo tounicode(" "); echo " $p"; echo "
"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""); echo ""; exit; for ($i = 0; $i <$num_hosts; $i++) { # echo '

' . ": " . $host[$i] . "
"; $error = yaz_error($id[$i]); if (!empty($error)) { echo "Error: $error"; } else { $hits = yaz_hits($id[$i]); # echo " : " . $hits; } for ($p = $from; $p <= $to; $p++) { $rec = yaz_record($id[$i],$p,"array"); # fwrite($fp, $rec); if (empty($rec)) continue; $s1o="000"; $s2o=" "; $s3o=" "; $s4o=" "; for($i1 = 0; $i1 <= 200; $i1++) { $s1=substr($rec[$i1][0],3,3); $s21=substr($rec[$i1][0],10,1); $s22=substr($rec[$i1][0],11,1); if ($s21 == "@") { $s2=" "; } else { if ($s21 == " ") { # $s21="#"; } if ($s22 == " ") { # $s22="#"; } $s2=$s21 . $s22; } $s3=substr($rec[$i1][0],16,1); if (($s1==$s1o) && (strlen($rec[$i1][1]) > 0)) { if (strlen($s3) > 0) { $s4o=$s4o . "^" . $s3 . $rec[$i1][1]; } } else { if (strlen($s3) > 0) { $s4=$s4 . "^" . $s3 . $rec[$i1][1]; } else { $s4=$rec[$i1][1]; } $s4leno=strlen($s4o); if ($s4leno > 0) { if ($s1o <> "000") { $sout = "#"; $sout = $sout . $s1o; $sout = $sout . "-"; $sout = $sout . $s2o . $s4o; $sout = $sout . "\n"; echo convert_cyr_string ($sout, "w", "d"); } } $s1o=$s1; $s2o=$s2; $s3o=$s3; $s4o=$s4; if (strlen($s4) ==0) { $s1o="000"; } } } if ($s1o <> "000") { $sout = $sout . "#"; $sout = $sout . s1o; $sout = $sout . "-"; $sout = $sout . s2o . $s4o; $sout = $sout . "\n"; echo convert_cyr_string ($sout, "w", "d"); } echo "_\n"; } } exit; } if ($pri2<>1) { ?> Web И БИС. Шлюз Z39.50.
http://www.elnit.ru Описание     IRBIS64Свободный доступ к базе данных IRBIS64  Z39.50Шлюз Z39.50




".tounicode(" !")."


\n"; return(1); }; if (!empty($term_1) && ($trun1=="0")) { $term = "@attr 1=" . $use_1 . " \"". trim($term_1) . "\" "; } if (!empty($term_1) && ($trun1=="1")) { $term = "@attr 1=" . $use_1 . " @attr 5=1 \"". trim($term_1) . "\" "; } if (!empty($term_1) && ($trun1=="2")) { $term = "@attr 1=" . $use_1 . " @attr 5=2 \"". trim($term_1) . "\" "; } if (!empty($term_2) && ($trun2=="0")) { $term = $term . " @attr 1=" . $use_2 . " \"". trim($term_2) . "\" "; }; if (!empty($term_2) && ($trun2=="1")) { $term = $term . " @attr 1=" . $use_2 . " @attr 5=1 \"". trim($term_2) . "\" "; }; if (!empty($term_2) && ($trun2=="2")) { $term = $term . " @attr 1=" . $use_2 . " @attr 5=2 \"". trim($term_2) . "\" "; }; if (!empty($term_3) && ($trun3=="0")) { $term = $term . " @attr 1=" . $use_3 . " \"". trim($term_3) . "\" "; }; if (!empty($term_3) && ($trun3=="1")) { $term = $term . " @attr 1=" . $use_3 . " @attr 5=1 \"". trim($term_3). "\" "; }; if (!empty($term_3) && ($trun3=="2")) { $term = $term . " @attr 1=" . $use_3 . " @attr 5=2 \"". trim($term_3). "\" "; }; if (!empty($term_4) && ($trun4=="0")) { $term = $term . " @attr 1=" . $use_4 . " \"". trim($term_4) . "\" "; }; if (!empty($term_4) && ($trun4=="1")) { $term = $term . " @attr 1=" . $use_4 . " @attr 5=1 \"". trim($term_4). "\" "; }; if (!empty($term_4) && ($trun4=="2")) { $term = $term . " @attr 1=" . $use_4 . " @attr 5=2 \"". trim($term_4). "\" "; }; if (!empty($term_5) && ($trun5=="0")) { $term = $term . " @attr 1=" . $use_5 . " \"". trim($term_5) . "\" "; }; if (!empty($term_5) && ($trun5=="1")) { $term = $term . " @attr 1=" . $use_5 . " @attr 5=1 \"". trim($term_5). "\" "; }; if (!empty($term_5) && ($trun5=="2")) { $term = $term . " @attr 1=" . $use_5 . " @attr 5=2 \"". trim($term_5). "\" "; }; # $fp = fopen("/phplog/s.log","w"); if (!empty($term_1) && !empty($term_2) ) { $term = "@" . $bop_1 . " " . $term; }; if (!empty($term_3)) { $term = "@" . $bop_2 . " " . $term; } if (!empty($term_4)) { $term = "@" . $bop_3 . " " . $term; } if (!empty($term_5)) { $term = "@" . $bop_4 . " " . $term; } // echo $host[0]; $pk="n"; if ($host[0] == "olsc3.unilib.neva.ru/books") { $pk="y"; } if (substr($host[0],0,6)=="ruslan") { $pk="y"; } if ($host[0] == "195.178.205.8/All") { $pk="n"; } if ($host[0] == "rocco51.epnet.com:2990/afh") { $format="1.2.840.10003.5.10:100000"; } if ($host[0] == "195.178.196.201:210/zcat") { if ($format=="1.2.840.10003.5.101") { $host[0]="195.178.196.201:210/CATALOG_LNS"; } } if ($host[0] == "195.178.196.201:210/serns") { $format="1.2.840.10003.5.101"; } if ($pk == "y") { $termn=convert_cyr_string($term,"w","k"); $term=$termn; } $num_hosts = count($host); $num_hostsold=$num_hosts; if ($host[0] == "195.178.205.30/book") { $host[$num_hosts]= "195.178.205.8/vgbilint"; $num_hosts=$num_hosts+1; } if ($server1) { $host[$num_hosts]= $server1; $num_hosts=$num_hosts+1; } if ($server2) { $host[$num_hosts]= $server2; $num_hosts=$num_hosts+1; } if ($num_hosts<2) $pri1=1; if ($format!="1.2.840.10003.5.109.10") { echo ''.tounicode(" ") . htmlspecialchars($term) . '
';} for ($i = 0; $i < $num_hosts; $i++) { $uni=0; $uni=get_unicode($host[$i]); $formats=$format; if ($uni==2) { if ($format=="1.2.840.10003.5.28") $formats="1.2.840.10003.5.101"; if ($num_hosts<2) $format="1.2.840.10003.5.101"; } $id[] = yaz_connect($host[$i]); yaz_syntax($id[$i],$formats); if ($format=="1.2.840.10003.5.1000.34.1") { if ($from==1) { $from=0; }} yaz_range($id[$i],$from,$to-$from+1); if ($pri1==0) { yaz_range($id[$i],0,0); } yaz_element($id[$i],"B"); if ($pri2==1) yaz_element($id[$i],"F"); $term_send=$term; if ($uni==0) $term_send=fromunicode($term,"rus"); // echo $term; yaz_search($id[$i],"rpn",$term_send); } $time_start = getmicrotime(); yaz_wait(); $time_end = getmicrotime(); $time = $time_end - $time_start; if (($format!="1.2.840.10003.5.1000.34.1")&&($format!="1.2.840.10003.5.109.10")) echo tounicode(" "). $time. tounicode(" ."); if ($num_hosts<2) echo tounicode("
"). yaz_hits($id[0]). "". tounicode("
"); //echo "
"; $hits=yaz_hits($id[0]); if ($pri1==1) { if (($extend=="n") && ($pk=="n") && ($hits<>"0") && ($format=="1.2.840.10003.5.28")) { echo "
 
".tounicode(" "); echo "

"; $torder=tounicode(""); $treset=tounicode(" "); echo " 
 
"; } } if ($pri1==0) { echo "
"); } for ($i = 0; $i <$num_hosts; $i++) { $hostnm=get_hostname($host[$i]); if ($pri1==0) { echo ""; } if ($pri1==1) { if ($extend=="y") echo "
"; for ($p = $from; $p <= $to; $p++) { if (($format=="1.2.840.10003.5.101")||($format=="1.2.840.10003.5.109.10")) { $rec = yaz_record($id[$i],$p,"raw"); } else { $rec = yaz_record($id[$i],$p,"array"); } if ($format=="1.2.840.10003.5.1000.34.1") $rec = yaz_record($id[$i],$p,"string"); # fwrite($fp, $rec); if (empty($rec)) continue; if ($extend=="y") { $uni=0; $uni=get_unicode($host[$i]); echo " $p"; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; echo tounicode(""); echo tounicode("
"; if (strlen($hostnm)>1) echo tounicode($hostnm); else echo $host[$i]; echo ""; $error = yaz_error($id[$i]); if (empty($error)) { $hits = yaz_hits($id[$i]); $uni=0; $uni=get_unicode($host[$i]); $formats=$format; if ($uni==2) { if ($format=="1.2.840.10003.5.28") $formats="1.2.840.10003.5.101"; } echo ""; echo ""; echo tounicode(" "); echo $hits; echo ""; } else { echo $error; } echo "
"; $s1o="000"; $s2o=" "; $s3o=" "; $s4o=" "; for($i1 = 0; $i1 <= 200; $i1++) { $s1=substr($rec[$i1][0],3,3); $s21=substr($rec[$i1][0],10,1); $s22=substr($rec[$i1][0],11,1); if ($s21 == "@") { $s2=" "; } else { if ($s21 == " ") { $s21="#"; } if ($s22 == " ") { $s22="#"; } $s2=$s21 . $s22; } $s3=substr($rec[$i1][0],16,1); if (($s1==$s1o) && (strlen($rec[$i1][1]) > 0)) { if (strlen($s3) > 0) { $s4o=$s4o . "^" . $s3 . $rec[$i1][1]; } } else { if (strlen($s3) > 0) { $s4=$s4 . "^" . $s3 . $rec[$i1][1]; } else { $s4=$rec[$i1][1]; } $s4leno=strlen($s4o); if ($s4leno > 0) { if ($s1o <> "000") { echo ""; } } $s1o=$s1; $s2o=$s2; $s3o=$s3; $s4o=$s4; if (strlen($s4) ==0) { $s1o="000"; } } } if ($s1o <> "000") { if($uni==0) $s1o=tounicode($s1o); echo ""; } echo ""; echo "
"; echo "
",$s1o;
                                                echo "
"; if ($s2o<>' ') { if($uni==0) $s2o=tounicode($s2o); if($uni==0) $s4o=tounicode($s4o); echo "
",$s2o,$s4o;
                                                  }
                                                   else
                                                  {
								  if ($uni==0) $s4o=tounicode($s4o);
                                                    echo "
",$s4o;
                                                  }
                                                echo "
"; echo "
",$s1o;
                                       echo "
"; if($uni==0) $s2o=tounicode($s2o); if($uni==0) $s4o=tounicode($s4o); if ($s2o<>' ') { echo "
",$s2o,$s4o;
                                                  }
                                                   else
                                                  {
                                                    echo "
",$s4o;
                                                  }
                                       echo "
"; echo "
"; } else { if ($format=="1.2.840.10003.5.10") { $z1=0; $z2=0; $z3=0; $z4=0; $pauthor=' '; $pperson=' '; $pzagl=' '; $ppubl=' '; $pphys=' '; $pser=' '; $pprim=' '; $prubr=' '; $isbn=' '; $udk=' '; $lang=' '; $stock=' '; $shifr=' '; $pannot=' '; for($i1 = 0; $i1 <= 200; $i1++) { if (empty($rec[$i1][1])) continue; $p1=substr($rec[$i1][0],0,18); $p3=substr($rec[$i1][0],0,16); $p2=$rec[$i1][1]; $p4=substr($rec[$i1][0],0,10); $p5=substr($rec[$i1][0],13,5); if ($pk == "y") { $p2n=convert_cyr_string($p2,"k","w"); $p2=$p2n; } if (($p4=="(3,100)(3,") && ($p5=="(3,a)")) { $pauthor=$p2; } if (($p4=="(3,700)(3,") && ($p5=="(3,a)")) { if ($pauthor==' ') $pauthor=$p2; else $pauthor=$pauthor.', '.$p2; } if (($p4=="(3,600)(3,") && ($p5=="(3,a)")) { $pperson=$p2; } if (($p4=="(3,600)(3,") && ($p5=="(3,d)")) { $pperson=$pperson.', '.$p2; } if (($p4=="(3,245)(3,") && ($p5=="(3,a)")) { $pzagl=$p2; } if (($p4=="(3,245)(3,") && ($p5=="(3,b)")) { $pzagl=$pzagl . ": " .$p2; } if (($p4=="(3,245)(3,") && ($p5=="(3,c)")) { $pzagl=$pzagl . $p2; } if (($p4=="(3,260)(3,") && ($p5=="(3,a)")) { $ppubl=$p2; } if (($p4=="(3,260)(3,") && ($p5=="(3,b)")) { $ppubl=$ppubl . " : " .$p2; $z1=1; } if (($p4=="(3,260)(3,") && ($p5=="(3,c)")) { if ($z1==0) { $ppubl=$ppubl . " : " . $p2; } else $ppubl=$ppubl . ", " . $p2; } if (($p4=="(3,300)(3,") && ($p5=="(3,a)")) { $pphys=$p2; } if (($p4=="(3,300)(3,") && ($p5=="(3,b)")) { $pphys=$pphys . " : " . $p2; $z2=1; } if (($p4=="(3,300)(3,") && ($p5=="(3,c)")) { if ($z2==0) { $pphys=$pphys . " : " . $p2; } else $pphys=$pphys . " ; " . $p2; } if (($p4=="(3,440)(3,") && ($p5=="(3,a)")) { $pser=$p2; } if (($p4=="(3,440)(3,") && ($p5=="(3,v)")) { $pser=$pser . " ; " . $p2; } if (($p4=="(3,504)(3,") && ($p5=="(3,a)")) { $pprim=$p2; } if ($p3=="(3,650)(3, )(3,") { if ($z3==0) { $prubr=$p2; $z3=1; } else $prubr=$prubr . " . --
" . $p2; } if (($p4=="(3,020)(3,") && ($p5=="(3,a)")) { $isbn=$p2; } if (($p4=="(3,080)(3,") && ($p5=="(3,a)")) { if ($z4==0) { $udk=$p2; $z4=1; } else $udk=$udk . " .
" . $p2; } if (($p4=="(3,520)(3,") && ($p5=="(3,a)")) { $pannot=$p2; } if (($p4=="(3,852)(3,") && ($p5=="(3,a)")) { $stock=$p2; } if (($p4=="(3,852)(3,") && ($p5=="(3,j)")) { $shifr=$p2; } } echo " $p"; echo ""; if ($pauthor<>' ') { echo ""; } if ($pzagl<>' ') { echo ""; } if ($pperson<>' ') { echo ""; } if ($ppubl<>' ') { echo ""; } if ($pphys<>' ') { echo ""; } if ($pser<>' ') { echo ""; } if ($pprim<>' ') { echo ""; } if ($pannot<>' ') { echo ""; } if ($prubr<>' ') { echo ""; } if ($isbn<>' ') { echo ""; } if ($udk<>' ') { echo ""; } if (($stock<>' ')|($shifr<>' ')) { echo ""; } echo "
"; echo "

: "; echo "

"; echo $pauthor; echo "

"; echo "
"; echo "

: "; echo "

"; echo $pzagl; echo "

"; echo "
"; echo "

: "; echo "

"; echo $pperson; echo "

"; echo "
"; echo "

: "; echo "

"; echo $ppubl; echo "

"; echo "
"; echo "

. : "; echo "

"; echo $pphys; echo "

"; echo "
"; echo "

"; echo "

"; echo $pser; echo "

"; echo "
"; echo "

: "; echo "

"; echo $pprim; echo "

"; echo "
"; echo "

: "; echo "

"; echo $pannot; echo "

"; echo "
"; echo "

: "; echo "

"; echo $prubr; echo "

"; echo "
"; echo "

ISBN: "; echo "

"; echo $isbn; echo "

"; echo "
"; echo "

: "; echo "

"; echo $udk; echo "

"; echo "
"; echo "

"; echo "

"; if (strlen($stock)>2) { echo $stock . ", " . $shifr; } else { echo $shifr; } echo "

"; echo "
"; echo "
"; } if ($format == "1.2.840.10003.5.28") { $z1=0; $z2=0; $z3=0; $z4=0; $z5=0; $pauthor=' '; $pauthor1=' '; $pauthor2=' '; $pzagl=' '; $ppubl=' '; $pphys=' '; $pist=' '; $pistd=' '; $pisty=' '; $pser=' '; $pprim=' '; $prubr=' '; $isbn=' '; $issn=' '; $udk=' '; $othercl=' '; $lang=' '; $price=' '; $stock=' '; $zaglper=' '; $shifr=' '; $country=' '; $invnumb=' '; $pannot=' '; $pdocum=' '; $pstelage=' '; $uni=get_unicode($host[$i]); for($i1 = 0; $i1 <= 200; $i1++) { if (empty($rec[$i1][1])) continue; $p1=substr($rec[$i1][0],0,18); $p3=substr($rec[$i1][0],0,16); $p4=substr($rec[$i1][0],0,10); $p5=substr($rec[$i1][0],13,5); $p2=$rec[$i1][1]; if ($pk == "y") { $p2n=convert_cyr_string($p2,"k","w"); $p2=$p2n; } if (($p4=="(3,700)(3,") && ($p5=="(3,a)")) { $pauthor=$p2; } if (($p4=="(3,700)(3,") && ($p5=="(3,b)")) { $pauthor=$pauthor . " " . $p2; } else { if (($p4=="(3,700)(3,") && ($p5=="(3,g)")) { $pauthor=$pauthor . ", " . $p2; }} if (($p4=="(3,701)(3,") && ($p5=="(3,a)")) { if ($pauthor1==' ') { $pauthor1=$p2; } else { $pauthor1=$pauthor1.', '.$p2;} } if (($p4=="(3,701)(3,") && ($p5=="(3,b)")) { $pauthor1=$pauthor1 . " " . $p2; } else { if (($p4=="(3,701)(3,") && ($p5=="(3,g)")) { $pauthor1=$pauthor1 . ", " . $p2; }} if (($p4=="(3,702)(3,") && ($p5=="(3,a)")) { $pauthor2=$p2; } if (($p4=="(3,702)(3,") && ($p5=="(3,b)")) { $pauthor2=$pauthor2 . " " . $p2; } if (($p4=="(3,102)(3,") && ($p5=="(3,a)")) { $country=$p2; } if (($p4=="(3,200)(3,") && ($p5=="(3,a)")) { $pzagl=$p2; } if (($p4=="(3,200)(3,") && ($p5=="(3,d)")) { $pzagl=$pzagl . " = " . $p2; } if (($p4=="(3,200)(3,") && ($p5=="(3,e)")) { $pzagl=$pzagl . ": " . $p2; } if (($p4=="(3,200)(3,") && ($p5=="(3,h)")) { $pzagl=$pzagl . " " . $p2; } if (($p4=="(3,200)(3,") && ($p5=="(3,i)")) { $pzagl=$pzagl . " " . $p2; } if (($p4=="(3,541)(3,") && ($p5=="(3,a)")) { $zaglper=$p2; } if (($p4=="(3,210)(3,") && ($p5=="(3,a)")) { $ppubl=$p2; } if (($p4=="(3,210)(3,") && ($p5=="(3,c)")) { if ($ppubl<>' ') { $ppubl=$ppubl . " : " .$p2; $z1=1; } else { if ($country<>' ') { $ppubl=$country . " : " .$p2; $z1=1; } } } if (($p4=="(3,210)(3,") && ($p5=="(3,d)")) { if ($z1==0) { if ($ppubl<>' ') { $ppubl=$ppubl . " : " .$p2; $z1=1; } else { if ($country<>' ') { $ppubl=$country . " : " .$p2; $z1=1; } } } else $ppubl=$ppubl . ", " . $p2; } if (($p4=="(3,215)(3,") && ($p5=="(3,a)")) { $pphys=$p2; } if (($p4=="(3,215)(3,") && ($p5=="(3,c)")) { $pphys=$pphys . " : " . $p2; $z2=1; } if (($p4=="(3,215)(3,") && ($p5=="(3,d)")) { if ($z2==0) { $pphys=$pphys . " : " . $p2; } else $pphys=$pphys . " ; " . $p2; } if (($p4=="(3,225)(3,") && ($p5=="(3,a)")) { $pser=$p2; } if (($p4=="(3,225)(3,") && ($p5=="(3,v)")) { $pser=$pser . " ; " . $p2; } if (($p4=="(3,461)(3,") && ($p5=="(3,a)")) { $pist=$p2; } if (($p4=="(3,463)(3,") && ($p5=="(3,a)")) { if ($pist==' ') { $pist=$p2; } else $pistd=$p2; } if (($p4=="(3,463)(3,") && ($p5=="(3,v)")) { if ($pistd==' ') { $pistd=$p2; } else $pistd=$pistd . ", " . $p2; } if (($p4=="(3,463)(3,") && ($p5=="(3,d)")) { $pisty=$p2; } if (($p4=="(3,320)(3,") && ($p5=="(3,a)")) { $pprim=$p2; } if (($p4=="(3,606)(3,") && ($p5=="(3,a)")) { if ($z3==0) { $prubr=$p2; $z3=1; } else $prubr=$prubr . " . --
" . $p2; } if (($p4=="(3,606)(3,") && ($p5=="(3,x)")) { $prubr=$prubr . " . --
" . $p2; } if (($p4=="(3,610)(3,") && ($p5=="(3,a)")) { if ($prubr == " ") { $prubr=$p2; } else { $prubr=$prubr . "
" . $p2; } } if (($p4=="(3,010)(3,") && ($p5=="(3,a)")) { $isbn=$p2; } if (($p4=="(3,011)(3,") && ($p5=="(3,a)")) { $issn=$p2; } if (($p4=="(3,010)(3,") && ($p5=="(3,d)")) { $price=$p2; } if (($p4=="(3,330)(3,") && ($p5=="(3,a)")) { $pannot=$p2; } if (($p4=="(3,856)(3,") && ($p5=="(3,u)")) { $pdocum=$p2; } if (($p4=="(3,899)(3,") && ($p5=="(3,a)")) { $stock=$p2; } if (($p4=="(3,899)(3,") && ($p5=="(3,c)")) { if ($pstelage==' ') { $pstelage=$p2; } else { $pstelage=$pstelage.'
'.$p2;} $stock=' '; } if (($p4=="(3,899)(3,") && ($p5=="(3,j)")) { $shifr=$p2; } if (($p4=="(3,899)(3,") && ($p5=="(3,h)")) { $shifr=$shifr . " " . $p2; } if (($p4=="(3,899)(3,") && ($p5=="(3,i)")) { $shifr=$shifr . " " . $p2; } if (($p4=="(3,899)(3,") && ($p5=="(3,x)")) { if ($invnumb == " ") { $invnumb=$p2; } else { $invnumb=$invnumb . "; " . $p2; } } if (($p4=="(3,999)(3,") && ($p5=="(3,p)")) { if ($invnumb == " ") { $invnumb=$p2; } else { $invnumb=$invnumb . "; " . $p2; } } if (($p4=="(3,999)(3,") && ($p5=="(3,b)")) { $invnumb=$invnumb . " (" . $p2 . ")"; } if (($p4=="(3,675)(3,") && ($p5=="(3,a)")) { if ($z4==0) { $udk=$p2; $z4=1; } else $udk=$udk . " .
" . $p2; } if (($p4=="(3,686)(3,") && ($p5=="(3,a)")) { $othercl=$p2; } if (($p4=="(3,686)(3,") && ($p5=="(3,2)")) { $othercl=$othercl . " " . $p2; } if (($p4=="(3,101)(3,") && ($p5=="(3,a)")) { $lang=$p2; } } if ($uni==0) $pauthor=tounicode($pauthor); if ($uni==0) $pauthor1=tounicode($pauthor1); if ($uni==0) $country=tounicode($country); if ($uni==0) $pauthor2=tounicode($pauthor2); if ($uni==0) $pzagl=tounicode($pzagl); if ($uni==0) $zaglper=tounicode($zaglper); if ($uni==0) $ppubl=tounicode($ppubl); if ($uni==0) $pser=tounicode($pser); if ($uni==0) $pphys=tounicode($pphys); if ($uni==0) $pist=tounicode($pist); if ($uni==0) $pistd=tounicode($pistd); if ($uni==0) $pisty=tounicode($pisty); if ($uni==0) $pprim=tounicode($pprim); if ($uni==0) $isbn=tounicode($isbn); if ($uni==0) $prubr=tounicode($prubr); if ($uni==0) $issn=tounicode($issn); if ($uni==0) $price=tounicode($price); if ($uni==0) $pdocum=tounicode($pdocum); if ($uni==0) $pannot=tounicode($pannot); if ($uni==0) $stock=tounicode($stock); if ($uni==0) $pstelage=tounicode($pstelage); if ($uni==0) $shifr=tounicode($shifr); if ($uni==0) $invnumb=tounicode($invnumb); if ($uni==0) $othercl=tounicode($othercl); if ($uni==0) $lang=tounicode($lang); if ($uni==0) $udk=tounicode($udk); if ($pauthor <> ' ') { $presult=$pauthor . ". " . $pzagl; } else { $presult=$pzagl; } $ordid = $host[$i] . "\n"; if ($pauthor<>' ') { $ordid = $ordid . tounicode(": ") . $pauthor; } if ($pzagl<>' ') { $ordid = $ordid . tounicode(": ") . $pzagl; } if ($zaglper<>' ') { $ordid = $ordid . tounicode("\n : ") . $zaglper; } if ($pist<>' ') { $ordid = $ordid . tounicode("\n: ") . $pist . ", " . $pisty . ", " . $pistd; } if ($ppubl<>' ') { $ordid = $ordid . tounicode("\n: ") . $ppubl; } if ($pphys<>' ') { $ordid = $ordid . tounicode("\n. : ") . $pphys; } if ($pauthor1<>' ') { $ordid = $ordid . tounicode("\n : ") . $pauthor1; } if ($pser<>' ') { $ordid = $ordid . tounicode("\n ") . $pser; } if ($pprim<>' ') { $ordid = $ordid . tounicode("\n: ") . $pprim; } if ($prubr<>' ') { # $ordid = $ordid . tounicode("\n: ") . $prubr; } if ($isbn<>' ') { $ordid = $ordid . "\nISBN: " . $isbn; } if ($issn<>' ') { $ordid = $ordid . "\nISSN: " . $issn; } if ($udk<>' ') { $ordid = $ordid . tounicode("\n: ") . $udk; } if ($othercl<>' ') { $ordid = $ordid . tounicode("\n. : ") . $othercl; } if ($lang<>' ') { $ordid = $ordid . tounicode("\n: ") . $lang; } if (($stock<>' ')|($shifr<>' ')) { if ($host[$i]=="195.178.205.8/vgbilint") { $stock=tounicode(" ."); } $ordid = $ordid . tounicode("\n : ") . $stock . ", " . $shifr; } if ($invnumb<>' ') { $ordid = $ordid . tounicode("\n. : ") . $invnumb; } if ($pstelage<>' ') { $ordid = $ordid . tounicode("\n: ") . $pstelage; } # echo "\n\n"; $ordid1=str_replace("'"," ", $ordid); $ordid=$ordid1; echo "\n"; echo "$p . "; echo ""; if ($pauthor<>' ') { echo ""; } if ($pzagl<>' ') { echo ""; } if ($zaglper<>' ') { echo ""; } if ($pist<>' ') { $pist=$pist . ", " . $pisty . ", " . $pistd; echo ""; } if ($ppubl<>' ') { echo ""; } if ($pphys<>' ') { echo ""; } if ($pauthor1<>' ') { echo ""; } if ($pauthor2<>' ') { echo ""; } if ($pser<>' ') { echo ""; } if ($pprim<>' ') { echo ""; } if ($pannot<>' ') { echo ""; } if ($prubr<>' ') { echo ""; } if ($isbn<>' ') { echo ""; } if ($issn<>' ') { echo ""; } if ($udk<>' ') { echo ""; } if ($othercl<>' ') { echo ""; } if ($lang<>' ') { echo ""; } if ($pdocum<>' ') { echo ""; } if (($stock<>' ')|($shifr<>' ')) { echo ""; } if ($invnumb<>' ') { echo ""; } if ($pstelage<>' ') { echo ""; } echo "
"; echo tounicode(": "); echo ""; echo $pauthor; echo "
"; echo tounicode(": "); echo ""; echo $pzagl; echo "
"; echo tounicode(" : "); echo ""; echo $zaglper; echo "
"; echo tounicode(": "); echo ""; echo $pist; echo "
"; echo tounicode(": "); echo ""; echo $ppubl; echo "
"; echo tounicode(". : "); echo ""; echo $pphys; echo "
"; echo tounicode(" : "); echo ""; echo $pauthor1; echo "
"; echo tounicode(" .: "); echo ""; echo $pauthor2; echo "
"; echo tounicode(""); echo ""; echo $pser; echo "
"; echo tounicode(": "); echo ""; echo $pprim; echo "
"; echo tounicode(": "); echo ""; echo $pannot; echo "
"; echo tounicode(": "); echo ""; echo $prubr; echo "
"; echo "ISBN: "; echo ""; echo $isbn; echo "
"; echo "ISSN: "; echo ""; echo $issn; echo "
"; echo tounicode(": "); echo ""; echo $udk; echo "
"; echo tounicode(". : "); echo ""; echo $othercl; echo "
"; echo tounicode(": "); echo ""; echo $lang; echo "
"; echo tounicode(" : "); echo ""; echo "$pdocum"; echo "
"; echo tounicode(" : "); echo ""; if (strlen($stock)>2) { echo $stock . ", " . $shifr; } else { echo $shifr; } echo "
"; echo tounicode(". : "); echo ""; echo $invnumb; echo "
"; echo tounicode(" : "); echo ""; echo $pstelage; echo "
"; echo ""; echo "
 "; echo " "; echo ""; // $url = url_encode($term_1); // $img2 = $url; // $img2 = str_replace('%2F54', '/', $img2); // $img2 = str_replace('+' , '%20' , $img2); // echo $img2; echo ""; echo tounicode(" "); echo ""; echo "
"; echo "
"; } if ($format=="1.2.840.10003.5.101") { $uni=get_unicode($host[$i]); if ($uni<2) { if (empty($rec)) continue; echo "
$p
"; echo "
";
							$format1="1.2.840.10003.5.1000.34.1";
//							 echo "";
					if ($uni==0) $rec=tounicode($rec);
                             echo $rec;
//							 echo "";
                             echo "
"; } else { if (empty($rec)) continue; echo "
$p
"; echo "
";
		      		     if ($uni==2) $term_send=fromunicode($term,"rus");
                                         $format1="1.2.840.10003.5.1000.34.1";
//                                         echo "";
?>

";
					     echo "
"; echo "
"; $id2 = yaz_connect($host[$i]); yaz_syntax($id2,"1.2.840.10003.5.1000.34.1"); if($p==1) { yaz_range($id2,0,1);} else { yaz_range($id2,$p,$p);} yaz_element($id2,"F"); yaz_search($id2,"rpn",$term_send); yaz_wait(); $rec4 = yaz_record($id2,$p,"string"); // if ($uni==2) $rec4=tounicode($rec4); $pos1=strpos($rec4,$term_1); $part3=strip_tags(substr($rec4,$pos1-70,1000)); // echo ""; // echo "..."; ?> 0) { $part1=substr($part3,0,$pos1); echo $part1; echo ""; echo $term_1; echo ""; $part3=substr($part3,$pos1+$len2,$len1-$pos1-$len2-1); $len1=strlen($part3); $pos1=strpos($part3,$term_1); } echo $part3; // echo $part3; echo "..."; echo ""; yaz_close($id2); // echo ""; echo "
"; $format=="1.2.840.10003.5.101"; } } if ($format=="1.2.840.10003.5.128") { if (empty($rec)) continue; echo "
$p
"; echo "
";
                             echo $rec;
                             echo "
"; } if ($format=="1.2.840.10003.5.109.10") { if (empty($rec)) continue; // echo "
$p
"; // echo "
";
			     if($pxml==0) {
			     echo ''; 
			     echo "";
			     echo '';
			     echo '';
			     $pxml=1;
					}
			     $rec=ereg_replace(" <","\"",$rec);
			     $rec=ereg_replace("> ","\"",$rec);
                             echo $rec;
//                             echo "
"; } if ($format=="1.2.840.10003.5.1000.34.1") { if (empty($rec)) continue; $uni=get_unicode($host[$i]); echo "
$p
"; // echo "
";
//				if ($uni==2) $rec=tounicode($rec);
				$len1=strlen($rec);
				$term_1=fromunicode($term_1,"rus");
				$len2=strlen($term_1);
//				echo "!!!";
//				echo $term_1;
				$pos1=strpos($rec,$term_1);
//				echo $pos1;
				$part3=$rec;
				while ($pos1>0) {
					$part1=substr($part3,0,$pos1);
					echo $part1;
					echo "";
					echo $term_1;
					echo "";
					$part3=substr($part3,$pos1+$len2,$len1-$pos1-$len2-1);
//					echo $part2;
//					$part3=part2;
				$len1=strlen($part3);
				$pos1=strpos($part3,$term_1);
						}

				echo $part3;
//                             echo $rec;
//                             echo "
"; } } } if ($pri1==0) echo "
"; /* Table resultatov */ if ($format!="1.2.840.10003.5.109.10") echo ''; // yaz_close($id[$i]); } if ($pri1==1) { if ($format!="1.2.840.10003.5.109.10") echo ""; } } if (($pri1!=0)&&($format!="1.2.840.10003.5.109.10")) { echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "
"; $from2=$from-10; $to2=$from2+9; if ($from2>0) { // echo "
"; // for ($i = 0; $i < $num_hostsold; $i++) // { // echo ""; // } // echo ""; // echo ""; // // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo "  "; // echo "
"; ?>        "; } echo "
"; $from1=$from+10; $to1=$from1+9; if (($hits>0) && ($from1<=$hits)) { // echo "
"; // for ($i = 0; $i < $num_hostsold; $i++) // { // echo ""; // } // echo ""; // echo ""; if (!$server1) { $server1=$host[0]; } // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // echo ""; // if ($format!="1.2.840.10003.5.1000.34.1") // echo ""; // echo "
"; ?> >')); echo ""; } echo "
   
"; echo ""; echo "
"; } # fclose($fp); if ($format!="1.2.840.10003.5.109.10") { echo "
"; echo ""; echo ""; } else { echo ''; echo ''; } ?>