# Execute Dev-Editor's commands
#
# Author: Patrick Canterino <patrick@patshaping.de>
-# Last modified: 2009-03-30
+# Last modified: 2009-03-31
#
use strict;
my $dirlist = '';
+ my $count = 0;
+
my $filter1 = $data->{'cgi'}->param('filter') || '*'; # The real wildcard
my $filter2 = ($filter1 && $filter1 ne '*') ? $filter1 : ''; # Wildcard for output
unless($virtual eq '/')
{
+ $count++;
+
my @stat = stat($physical.'/..');
my $udtpl = new Template;
next if($config->{'hide_dot_files'} && substr($dir,0,1) eq '.');
next unless(dos_wildcard_match($filter1,$dir));
+ $count++;
+
my $phys_path = $physical.'/'.$dir;
my $virt_path = multi_string($virtual.$dir.'/');
$dtpl->parse_if_block('forbidden',is_forbidden_file($config->{'forbidden'},$virt_path->{'normal'}));
$dtpl->parse_if_block('readable',-r $phys_path && -x $phys_path);
$dtpl->parse_if_block('users',$users && -o $phys_path);
+ $dtpl->parse_if_block('even',($count % 2) == 0);
$dirlist .= $dtpl->get_template;
}
next if($config->{'hide_dot_files'} && substr($file,0,1) eq '.');
next unless(dos_wildcard_match($filter1,$file));
+ $count++;
+
my $phys_path = $physical.'/'.$file;
my $virt_path = multi_string($virtual.$file);
$ftpl->parse_if_block('users',$users && -o $phys_path);
+ $ftpl->parse_if_block('even',($count % 2) == 0);
+
$dirlist .= $ftpl->get_template;
}
-<tr>
+<tr{IF even} style="background-color:#EEEEEE"{ENDIF}>
<td align="right" style="white-space:nowrap">[SUBDIR]</td>
<td style="padding-left:15pt;white-space:nowrap;">{DATE}{IF gmt} (GMT){ENDIF}</td>
<td style="padding-left:15pt;white-space:nowrap;">{IF !forbidden}{IF readable}<a href="{SCRIPT}?command=show&file={DIR_URL}{IF filter}&filter={FILTER_URL}{ENDIF}">{DIR_NAME}/</a>{ELSE}<span style="color:#C0C0C0" title="Not accessible">{DIR_NAME}/</span>{ENDIF}{ELSE}<span style="color:#C0C0C0" title="File access forbidden by Dev-Editor's configuration">{DIR_NAME}/</span>{ENDIF}</td>