/[nn]/search/nn-page.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/nn-page.cgi

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (hide annotations) (vendor branch)
Thu Jan 31 16:41:43 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 CGI qw/:standard start_ul -no_xhtml/;
4    
5     my $nn_dir="/home/dpavlin/nn";
6    
7     my $url="http://www.nn.hr/CijeliBrojS.asp?god=%d&br=%d";
8    
9     print header;
10    
11     if (param('god') && param('br')) {
12     open(IN,"$nn_dir/CijeliBrojS?god=".param('god')."&br=".param('br')) || die "$1";
13     while(<IN>) { print };
14     close(IN);
15     } else {
16     opendir(DIR,$nn_dir) || warn "opendir: $!";
17     my @files = grep { /^CijeliBrojS/ && -f "$nn_dir/$_" } readdir(DIR);
18     closedir(DIR);
19     print start_html("Svi brojevi NN"),start_ul;
20     foreach my $file (@files) {
21     if ($file=~m/god=(\d+)\&br=(\d+)/) {
22     print li,a({href=>sprintf($url,$1,$2)},"NN $2/$1");
23     }
24     }
25     print end_ul;
26     }
27    

  ViewVC Help
Powered by ViewVC 1.1.26