/[nn]/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

Annotation of /search/isis.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Tue Jan 22 11:24:16 2002 UTC (22 years, 3 months ago) by dpavlin
Branch: dbp, MAIN
CVS Tags: r0, HEAD
Changes since 1.1: +0 -0 lines
initial import

1 dpavlin 1.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    

  ViewVC Help
Powered by ViewVC 1.1.26