Linux mail.vriendennsm.nl 6.1.0-51-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.177-1 (2026-07-16) x86_64
Apache/2.4.68 (Debian)
Server IP : 217.154.75.17 & Your IP : 216.73.216.195
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
usr /
share /
webmin /
Delete
Unzip
Name
Size
Permission
Date
Action
acl
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
adsl-client
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
apache
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
at
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
authentic-theme
[ DIR ]
drwxr-xr-x
2026-07-25 20:56
backup-config
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
bacula-backup
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
bandwidth
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
bin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
bind8
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
blue-theme
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
change-user
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-copy
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-cron
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-passwd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-shell
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-software
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-useradmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-usermin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cluster-webmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cpan
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
cron
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
custom
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
dfsadmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
dhcpd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
dovecot
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
exim
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
exports
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
fail2ban
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
fdisk
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
fetchmail
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
filemin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
filter
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
firewall
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
firewall6
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
firewalld
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
fsdump
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
gray-theme
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
grub2
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
heartbeat
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
htaccess-htpasswd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
idmapd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
images
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
inetd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
init
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
inittab
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ipfilter
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ipfw
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ipsec
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
iscsi-client
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
iscsi-server
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
iscsi-target
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
iscsi-tgtd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
kea-dhcp
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
krb5
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
lang
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ldap-client
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ldap-server
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ldap-useradmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
logrotate
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
logviewer
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
lpadmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
lvm
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
mailboxes
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
mailcap
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
man
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
mount
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
mysql
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
net
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
nftables
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
nginx
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
nis
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
openslp
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
package-updates
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
pam
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
pap
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
passwd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
phpini
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
postfix
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
postgresql
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
ppp-client
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
pptp-client
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
pptp-server
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
proc
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
procmail
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
proftpd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
qmailadmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
quota
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
raid
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
samba
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
sarg
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
sendmail
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
servers
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
shell
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
shorewall
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
shorewall6
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
smart-status
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
smf
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
software
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
spam
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
squid
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
sshd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
status
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
stunnel
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
syslog
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
syslog-ng
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
system-status
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
systemd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
tcpwrappers
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
time
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
tunnel
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
unauthenticated
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
updown
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
useradmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
usermin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
vendor_perl
[ DIR ]
drwxr-xr-x
2026-06-10 18:25
webalizer
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
webmin
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
webmincron
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
webminlog
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
xinetd
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
xterm
[ DIR ]
drwxr-xr-x
2026-07-25 20:55
LICENCE
1.48
KB
-rw-r--r--
2026-07-17 21:17
LICENCE.ja
1.62
KB
-rw-r--r--
2026-07-17 21:17
README.md
4.23
KB
-rw-r--r--
2026-07-17 21:17
WebminCore.pm
9.05
KB
-rw-r--r--
2026-07-17 21:17
acl_security.pl
4.87
KB
-rwxr-xr-x
2026-07-17 21:17
changepass.pl
868
B
-rwxr-xr-x
2026-07-17 21:22
chooser.cgi
7.21
KB
-rwxr-xr-x
2026-07-17 21:22
config-aix
227
B
-rw-r--r--
2026-07-17 21:17
config-cobalt-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-coherent-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-corel-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-debian-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-freebsd
256
B
-rw-r--r--
2026-07-17 21:17
config-generic-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-gentoo-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-hpux
243
B
-rw-r--r--
2026-07-17 21:17
config-irix
284
B
-rw-r--r--
2026-07-17 21:17
config-lib.pl
11.84
KB
-rwxr-xr-x
2026-07-17 21:17
config-macos
260
B
-rw-r--r--
2026-07-17 21:17
config-mandrake-linux
278
B
-rw-r--r--
2026-07-17 21:17
config-msc-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-netbsd
283
B
-rw-r--r--
2026-07-17 21:17
config-open-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-openbsd
241
B
-rw-r--r--
2026-07-17 21:17
config-openmamba-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-openserver
236
B
-rw-r--r--
2026-07-17 21:17
config-osf1
266
B
-rw-r--r--
2026-07-17 21:17
config-pardus-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-redhat-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-slackware-linux
280
B
-rw-r--r--
2026-07-17 21:17
config-sol-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-solaris
417
B
-rw-r--r--
2026-07-17 21:17
config-suse-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-syno-linux
364
B
-rw-r--r--
2026-07-17 21:17
config-trustix-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-turbo-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-united-linux
264
B
-rw-r--r--
2026-07-17 21:17
config-unixware
286
B
-rw-r--r--
2026-07-17 21:17
config-windows
88
B
-rw-r--r--
2026-07-17 21:17
config.cgi
1.64
KB
-rwxr-xr-x
2026-07-17 21:22
config_save.cgi
1.68
KB
-rwxr-xr-x
2026-07-17 21:22
copyconfig.pl
4.33
KB
-rwxr-xr-x
2026-07-17 21:22
create-module.pl
3.95
KB
-rwxr-xr-x
2026-07-17 21:22
date_chooser.cgi
2.19
KB
-rwxr-xr-x
2026-07-17 21:22
deb-name
7
B
-rw-r--r--
2026-07-17 21:22
defaultacl
124
B
-rw-r--r--
2026-07-17 21:17
defaulttheme
16
B
-rw-r--r--
2026-07-17 21:17
entities_map.txt
1.47
KB
-rw-r--r--
2026-07-17 21:17
fastrpc.cgi
11.87
KB
-rwxr-xr-x
2026-07-17 21:22
favicon.ico
14.73
KB
-rw-r--r--
2026-07-17 21:17
forgot.cgi
6.27
KB
-rwxr-xr-x
2026-07-17 21:22
forgot_form.cgi
1.14
KB
-rwxr-xr-x
2026-07-17 21:22
forgot_send.cgi
5.11
KB
-rwxr-xr-x
2026-07-17 21:22
group_chooser.cgi
7.51
KB
-rwxr-xr-x
2026-07-17 21:22
help.cgi
2.26
KB
-rwxr-xr-x
2026-07-17 21:22
html-editor-lib.pl
17.72
KB
-rw-r--r--
2026-07-17 21:17
index.cgi
5.61
KB
-rwxr-xr-x
2026-07-17 21:22
install-module.pl
1.54
KB
-rwxr-xr-x
2026-07-17 21:22
install-type
4
B
-rw-r--r--
2026-07-17 21:22
javascript-lib.pl
14.69
KB
-rwxr-xr-x
2026-07-17 21:17
lang_list.txt
2.51
KB
-rw-r--r--
2026-07-17 21:17
maketemp.pl
424
B
-rwxr-xr-x
2026-07-17 21:17
mime.types
12.42
KB
-rw-r--r--
2026-07-17 21:17
miniserv-lib.pl
175.51
KB
-rw-r--r--
2026-07-17 21:17
miniserv.pem
2.9
KB
-rw-r--r--
2026-07-17 21:17
miniserv.pl
33.88
KB
-rwxr-xr-x
2026-07-17 21:22
module_chooser.cgi
4.14
KB
-rwxr-xr-x
2026-07-17 21:22
negativeacl
29
B
-rw-r--r--
2026-07-17 21:17
newmods.pl
1.25
KB
-rwxr-xr-x
2026-07-17 21:17
os_eol.json
50.05
KB
-rw-r--r--
2026-07-17 21:17
os_list.txt
35.22
KB
-rw-r--r--
2026-07-17 21:17
oschooser.pl
4.55
KB
-rwxr-xr-x
2026-07-17 21:22
pam_login.cgi
4.33
KB
-rwxr-xr-x
2026-07-17 21:22
password_change.cgi
7.02
KB
-rwxr-xr-x
2026-07-17 21:22
password_form.cgi
1.3
KB
-rwxr-xr-x
2026-07-17 21:22
perlpath.pl
571
B
-rwxr-xr-x
2026-07-17 21:22
record-failed.pl
503
B
-rwxr-xr-x
2026-07-17 21:22
record-login.pl
513
B
-rwxr-xr-x
2026-07-17 21:22
record-logout.pl
516
B
-rwxr-xr-x
2026-07-17 21:22
robots.txt
26
B
-rw-r--r--
2026-07-17 21:17
rpc.cgi
4.03
KB
-rwxr-xr-x
2026-07-17 21:22
run-postinstalls.pl
971
B
-rwxr-xr-x
2026-07-17 21:22
run-uninstalls.pl
1004
B
-rwxr-xr-x
2026-07-17 21:22
safeacl
73
B
-rw-r--r--
2026-07-17 21:17
session_login.cgi
5.11
KB
-rwxr-xr-x
2026-07-17 21:22
setup-repos.sh
766
B
-rw-r--r--
2026-07-17 21:17
setup.bat
3.08
KB
-rw-r--r--
2026-07-17 21:17
setup.pl
32.4
KB
-rwxr-xr-x
2026-07-17 21:22
setup.sh
35.21
KB
-rwxr-xr-x
2026-07-17 21:17
switch_theme.cgi
1.22
KB
-rwxr-xr-x
2026-07-17 21:22
switch_user.cgi
404
B
-rwxr-xr-x
2026-07-17 21:22
thirdparty.pl
1.73
KB
-rwxr-xr-x
2026-07-17 21:17
ui-lib.pl
123.52
KB
-rwxr-xr-x
2026-07-17 21:17
update-from-repo.sh
14.77
KB
-rwxr-xr-x
2026-07-17 21:17
uptracker.cgi
2.89
KB
-rwxr-xr-x
2026-07-17 21:22
user_chooser.cgi
7.39
KB
-rwxr-xr-x
2026-07-17 21:22
version
6
B
-rw-r--r--
2026-07-17 21:17
web-lib-funcs.pl
417.23
KB
-rwxr-xr-x
2026-07-17 21:17
web-lib.pl
856
B
-rwxr-xr-x
2026-07-17 21:17
webmin-daemon
80
B
-rw-r--r--
2026-07-17 21:17
webmin-init
1.93
KB
-rwxr-xr-x
2026-07-17 21:17
webmin-pam
101
B
-rw-r--r--
2026-07-17 21:17
webmin-search-lib.pl
9.47
KB
-rwxr-xr-x
2026-07-17 21:17
webmin-systemd
374
B
-rw-r--r--
2026-07-17 21:17
webmin_search.cgi
2.63
KB
-rwxr-xr-x
2026-07-17 21:22
xmlrpc.cgi
4.14
KB
-rwxr-xr-x
2026-07-17 21:22
Save
Rename
#!/usr/bin/perl # chooser.cgi # Outputs HTML for a frame-based file chooser BEGIN { push(@INC, "."); }; use WebminCore; @icon_map = ( "c", "text.gif", "txt", "text.gif", "pl", "text.gif", "cgi", "text.gif", "html", "text.gif", "htm", "text.gif", "php", "text.gif", "php5", "text.gif", "gif", "image.gif", "jpg", "image.gif", "jpeg", "image.gif", "png", "image.gif", "tar", "binary.gif" ); &init_config(); if (&get_product_name() eq 'usermin') { &switch_to_remote_user(); } %access = &get_module_acl(); # Work out root directory local @uinfo = getpwnam($remote_user); if (!$access{'root'}) { $rootdir = $uinfo[7] ? $uinfo[7] : "/"; } else { $rootdir = $access{'root'}; $rootdir =~ s/^\~/$uinfo[7]/; } # Switch to correct Unix user if (&supports_users()) { if (&get_product_name() eq 'usermin') { # Always run as Usermin login &switch_to_remote_user(); } else { # ACL determines $fileunix = $access{'fileunix'} || $remote_user; @uinfo = getpwnam($fileunix); if (!@uinfo && !$access{'fileunix'}) { @uinfo = getpwnam("nobody"); } if (@uinfo) { &switch_to_unix_user(\@uinfo); } } } &ReadParse(undef, undef, 1); # If a chroot is forced which is under the allowed root, there is no need for # a restrictred root if ($in{'chroot'} && $in{'chroot'} ne '/' && $rootdir && $rootdir ne '/' && $in{'chroot'} =~ /^\Q$rootdir\E/) { $rootdir = undef; } if ($gconfig{'os_type'} eq 'windows') { # On Windows, chroot should be empty if not use, and default path # should be c:/ if ($in{'chroot'} eq "/") { $in{'chroot'} = ""; } if ($rootdir eq "/") { $rootdir = "c:"; } } if ($in{'add'}) { # Only use last filename by default $in{'file'} =~ s/\s+$//; if ($in{'file'} =~ /\n(.*)$/) { $in{'file'} = $1; } } if ($in{'file'} =~ /^(([a-z]:)?.*\/)([^\/]*)$/i && $in{'file'} !~ /\.\./) { # File entered is valid $dir = $1; $file = $3; } else { # Fall back to default $dir = $rootdir; $dir .= '/' if ($dir !~ /\/$/); $file = ""; } $add = int($in{'add'}); if (!(-d $in{'chroot'}.$dir)) { # Entered directory does not exist $dir = $rootdir.'/'; $file = ""; } if (!&allowed_dir($dir)) { # Directory is outside allowed root $dir = $rootdir.'/'; $file = ""; } # Work out the top allowed dir $topdir = $rootdir eq "/" || $rootdir eq "c:" ? $rootdir : $access{'otherdirs'} ? "/" : $rootdir; $uchroot = &urlize($in{'chroot'}); $utype = &urlize($in{'type'}); $ufile = &urlize($in{'file'}); if ($in{'frame'} == 0) { # base frame &PrintHeader(); if ($in{'type'} == 0) { print "<title>$text{'chooser_title1'}</title>\n"; } elsif ($in{'type'} == 1) { print "<title>$text{'chooser_title2'}</title>\n"; } print "<frameset rows='*,50'>\n"; print "<frame marginwidth=5 marginheight=5 name=topframe ", "src=\"@{[&get_webprefix()]}/chooser.cgi?frame=1&file=".$ufile. "&chroot=".$uchroot."&type=".$utype."&add=$add\">\n"; print "<frame marginwidth=0 marginheight=0 name=bottomframe ", "src=\"@{[&get_webprefix()]}/chooser.cgi?frame=2&file=".$ufile. "&chroot=".$uchroot."&type=".$utype."&add=$add\" scrolling=no>\n"; print "</frameset>\n"; } elsif ($in{'frame'} == 1) { # List of files in this directory &popup_header(); print <<EOF; <script type='text/javascript'> function fileclick(f, d) { curr = top.frames[1].document.forms[0].elements[1].value; if (curr == f) { // Double-click! Enter directory or select file if (d) { // Enter this directory location = "chooser.cgi?frame=1&add=$add&chroot=$uchroot&type=$utype&file="+f+"/"; } else { // Select this file and close the window if ($add == 0) { top.opener.ifield.value = f; } else { if (top.opener.ifield.value != "") { top.opener.ifield.value += "\\n"; } top.opener.ifield.value += f; } top.close(); } } else { top.frames[1].document.forms[0].elements[1].value = f; } } function parentdir(p) { top.frames[1].document.forms[0].elements[1].value = p; location = "chooser.cgi?frame=1&chroot=$uchroot&type=$utype&file="+p; } </script> EOF print "<div id='filter_box' style='display:none;margin:0px;padding:0px;width:100%;clear:both;'>"; print &ui_textbox("filter",$text{'ui_filterbox'}, 50, 0, undef,"style='width:100%;color:#aaa;' onkeyup=\"filter_match(this.value,'row',true);\" onfocus=\"if (this.value == '".$text{'ui_filterbox'}."') {this.value = '';this.style.color='#000';}\" onblur=\"if (this.value == '') {this.value = '".$text{'ui_filterbox'}."';this.style.color='#aaa';}\""); print &ui_hr("style='width:100%;'")."</div>"; print "<b>",&text('chooser_dir', &html_escape($dir)),"</b>\n"; $ok = opendir(DIR, $in{'chroot'}.$dir); &popup_error(&text('chooser_eopen', "$!")) if (!$ok && !$in{'chroot'}); print &ui_columns_start(undef, 100); my $cnt = 0; foreach $f (sort { $a cmp $b } readdir(DIR)) { $path = "$in{'chroot'}$dir$f"; if ($f eq ".") { next; } if ($f eq ".." && ($dir eq "/" || $dir eq $topdir.'/')) { next; } if ($f =~ /^\./ && $f ne ".." && $access{'nodot'}) { next; } if (!(-d $path) && $in{'type'} == 1) { next; } @st = stat($path); $isdir = 0; undef($icon); if (-d $path) { $icon = "dir.gif"; $isdir = 1; } elsif ($path =~ /\.([^\.\/]+)$/) { $icon = $icon_map{$1}; } if (!$icon) { $icon = "unknown.gif"; } if ($f eq "..") { $dir =~ /^(.*\/)[^\/]+\/$/; $link = "<a href=\"\" onClick='parentdir(\""."e_javascript($1)."\"); return false'>"; } else { $link = "<a href=\"\" onClick='fileclick(\""."e_javascript("$dir$f")."\", $isdir); return false'>"; } local @cols; push(@cols, "$link<img border=0 src=@{[&get_webprefix()]}/images/$icon></a>"); push(@cols, "$link".&html_escape($f)."</a>"); push(@cols, &nice_size($st[7])); @tm = localtime($st[9]); push(@cols, sprintf "<tt>%.2d/%s/%.4d</tt>", $tm[3], $text{'smonth_'.($tm[4]+1)}, $tm[5]+1900); push(@cols, sprintf "<tt>%.2d:%.2d</tt>", $tm[2], $tm[1]); print &ui_columns_row(\@cols); $cnt++; } closedir(DIR); print &ui_columns_end(); if ( $cnt >= 10 ) { print "<script type='text/javascript' src='@{[&get_webprefix()]}/unauthenticated/filter_match.js?28112013'></script>"; print "<script type='text/javascript'>filter_match_box();</script>"; } &popup_footer(); } elsif ($in{'frame'} == 2) { # Current file and OK/cancel buttons &popup_header(); print <<EOF; <script type='text/javascript'> function filechosen() { if ($add == 0) { top.opener.ifield.value = document.forms[0].path.value; } else { if (top.opener.ifield.value != "") { top.opener.ifield.value += "\\n"; } top.opener.ifield.value += document.forms[0].path.value; } top.close(); } </script> EOF print &ui_form_start(undef, undef, undef, "onSubmit='filechosen(); return false'"); print &ui_table_start(undef, "width=100%", 2); print &ui_table_row(&ui_submit($text{'chooser_ok'}), &ui_textbox("path", $dir.$file, 45, 0, undef, "style='width:100%'"), 1,["width=5% valign=middle nowrap","valign=middle width=95%"]); print &ui_table_end(); print &ui_form_end(); &popup_footer(); } # allowed_dir(dir) # Returns 1 if some directory should be listable sub allowed_dir { local ($dir) = @_; return 1 if ($rootdir eq "" || $rootdir eq "/" || $rootdir eq "c:"); foreach my $allowed ($rootdir, split(/\t+/, $access{'otherdirs'})) { return 1 if (&is_under_directory($allowed, $dir)); } return 0; }