/[nn.old]/trunk/search/isis.cgi
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /trunk/search/isis.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 8 - (show annotations)
Tue Jan 22 11:24:15 2002 UTC (22 years, 2 months ago) by dpavlin
File MIME type: application/octet-stream
File size: 1046 byte(s)
Initial revision

1 #!/usr/bin/perl -w
2
3 use strict;
4 use OpenIsis;
5 use CGI qw/:standard -no_xhtml/;
6
7 my %labels = ('a'=>'naslovu', 'f'=>'autoru');
8
9 print header(-charset=>'iso-8859-2'),start_html(-title=>'ISIS web demo',-lang=>'hr'),start_form;
10 print "Trazi po ",popup_menu(-name=>'po_cemu',-values=>[ keys %labels ],-labels=>\%labels);
11 print textfield('search'),submit;
12 print end_form,hr;
13
14 my $s = ".";
15
16 if (param('search')) {
17 $s=param('search');
18 print i("Trazili ste '$s' u ".$labels{param('po_cemu')}),p;
19 }
20
21 my $nadjeno = 0;
22
23 my $db = OpenIsis::open( '/var/autofs/misc/isis/isis/DATA/LIBRI/LIBRI' );
24 for (1..OpenIsis::maxRowid( $db )) {
25 my $row = OpenIsis::readAsHash( $db, $_ );
26 my $tmp = $row->{'200'};
27
28 $tmp =~ tr/џ/ƾ/; # ISIS -> iso-8859-2
29
30 my %data = ('f'=>'nepoznat autor','a'=>'nema naslova');
31 while ($tmp =~ s/\^(\w)([^\^]+)//) {
32 # print " $1:$2\n";
33 $data{$1}=$2;
34 }
35 if ($data{param('po_cemu')} =~ m/$s/i) {
36 $nadjeno++;
37 print $nadjeno,". ",$data{f},": ",b($data{a}),br;
38 }
39 }
40
41 print hr,"Ukupno nadjeno $nadjeno knjiga...";
42

Properties

Name Value
cvs2svn:cvs-rev 1.1
svn:executable *
svn:mime-type application/octet-stream

  ViewVC Help
Powered by ViewVC 1.1.26