if ($aktion eq "Neuen Smilie hinzufügen") { @directories = ("C:\\Projekte\\Eventmanager\\mysql\\bilder\\smilies"); @dateien = (); find(sub {push(@dateien,$_) unless $_ eq '.' or $_ eq '..' or $_ eq 'Thumbs.db'},@directories); my $subtemplate = HTML::Template->new(filename => 'smilies.tmpl', path => [ $absolut_path . '\templates\standard\admin']); my $navtemplate = HTML::Template->new(filename => 'admin_index.tmpl', path => [ $absolut_path . '\templates\standard\admin']); @bilder = @dateien; print "Content-Type: text/html\n\n"; print $header->output; $subtemplate->param(ANZEIGE => 0); $subtemplate->param(FORMULAR => 1); while (@dateien) { my %row_data; $row_data{SMILIE} = shift @dateien; push(@loop_data, \%row_data); } $footer->param(SESSION => "$sid"); $footer->param(ID => "$id"); $navtemplate->param(SESSION => "$sid"); $navtemplate->param(ID => "$id"); $navtemplate->param(CGI_PATH => $cgi_path); $subtemplate->param(LOOP => \@loop_data); $subtemplate->param(BILD => $bilder[0]); $subtemplate->param(IMAGES_PATH => $images_path); $content = $subtemplate->output(); $navcontent = $navtemplate->output(); $template->param(CONTENT => $content); $template->param(NAVCONTENT => $navcontent); print $template->output; print $footer->output; exit; }