# slide_werist.pl

use strict;

use CGI qw(:standard);
use myHTML;

my $bilderp      = my_wer_path();

my $num = param('num');

my @bilder;

my $nnum=$num+1;

opendir WERDIR, $bilderp;
@bilder=grep {/^[^.]/} readdir WERDIR;
closedir WERDIR;

my $anz = @bilder;
if ($nnum > $anz-1) {
   $nnum=0;
   }
  
my $pic="$bilderp$bilder[$num]";

#print header();                  
p2 "<html>",
   "<head>",
   "<meta http-equiv='refresh' content='5; URL=slide_werist.pl?num=$nnum'>",
   "</head>",
   "<body>",
   "<center>";

p2 "Gesucht...<br>",
   "<br>";

p "<img height='600' src='$pic' alt='$pic'>";

p "</center>";   

myHTML::end_html;
