X7ROOT File Manager
Current Path:
/usr/libexec/webmin/webalizer
usr
/
libexec
/
webmin
/
webalizer
/
📁
..
📄
CHANGELOG
(855 B)
📄
acl_security.pl
(1.2 KB)
📄
backup_config.pl
(1.63 KB)
📄
cgi_args.pl
(840 B)
📄
config
(158 B)
📄
config-ALL-linux
(107 B)
📄
config-debian-linux-4.0-ALL
(172 B)
📄
config-freebsd
(176 B)
📄
config-gentoo-linux
(107 B)
📄
config-mandrake-linux-10.3-ALL
(107 B)
📄
config-netbsd
(120 B)
📄
config-openbsd
(179 B)
📄
config-openmamba-linux
(113 B)
📄
config-solaris-10-ALL
(175 B)
📄
config-syno-linux
(222 B)
📄
config.info
(425 B)
📄
config.info.ca
(514 B)
📄
config.info.cs
(226 B)
📄
config.info.de
(471 B)
📄
config.info.es
(310 B)
📄
config.info.fa
(365 B)
📄
config.info.fi
(0 B)
📄
config.info.fr
(465 B)
📄
config.info.hr
(0 B)
📄
config.info.hu
(407 B)
📄
config.info.ms
(387 B)
📄
config.info.nl
(396 B)
📄
config.info.no
(379 B)
📄
config.info.pl
(488 B)
📄
config.info.ru
(308 B)
📄
config.info.tr
(372 B)
📄
config.info.uk
(314 B)
📄
defaultacl
(46 B)
📄
edit_global.cgi
(4.8 KB)
📄
edit_log.cgi
(3.67 KB)
📁
images
📄
index.cgi
(5.13 KB)
📄
install_check.pl
(545 B)
📁
lang
📄
log_parser.pl
(707 B)
📄
mass.cgi
(1.81 KB)
📄
module.info
(201 B)
📄
module.info.af
(0 B)
📄
module.info.af.auto
(131 B)
📄
module.info.ar
(0 B)
📄
module.info.ar.auto
(184 B)
📄
module.info.be
(0 B)
📄
module.info.be.auto
(224 B)
📄
module.info.bg
(0 B)
📄
module.info.bg.auto
(203 B)
📄
module.info.ca
(156 B)
📄
module.info.ca.auto
(21 B)
📄
module.info.cs
(46 B)
📄
module.info.cs.auto
(108 B)
📄
module.info.da
(0 B)
📄
module.info.da.auto
(119 B)
📄
module.info.de
(113 B)
📄
module.info.de.auto
(18 B)
📄
module.info.el
(0 B)
📄
module.info.el.auto
(248 B)
📄
module.info.es
(52 B)
📄
module.info.es.auto
(118 B)
📄
module.info.eu
(0 B)
📄
module.info.eu.auto
(153 B)
📄
module.info.fa
(0 B)
📄
module.info.fa.auto
(230 B)
📄
module.info.fi
(0 B)
📄
module.info.fi.auto
(151 B)
📄
module.info.fr
(45 B)
📄
module.info.fr.auto
(125 B)
📄
module.info.he
(0 B)
📄
module.info.he.auto
(154 B)
📄
module.info.hr
(0 B)
📄
module.info.hr.auto
(142 B)
📄
module.info.hu
(37 B)
📄
module.info.hu.auto
(116 B)
📄
module.info.it
(0 B)
📄
module.info.it.auto
(142 B)
📄
module.info.ja
(0 B)
📄
module.info.ja.auto
(181 B)
📄
module.info.ko
(0 B)
📄
module.info.ko.auto
(147 B)
📄
module.info.lt
(0 B)
📄
module.info.lt.auto
(164 B)
📄
module.info.lv
(0 B)
📄
module.info.lv.auto
(153 B)
📄
module.info.ms
(118 B)
📄
module.info.ms.auto
(18 B)
📄
module.info.mt
(0 B)
📄
module.info.mt.auto
(138 B)
📄
module.info.nl
(34 B)
📄
module.info.nl.auto
(101 B)
📄
module.info.no
(33 B)
📄
module.info.no.auto
(93 B)
📄
module.info.pl
(91 B)
📄
module.info.pl.auto
(18 B)
📄
module.info.pt
(0 B)
📄
module.info.pt.auto
(152 B)
📄
module.info.pt_BR
(0 B)
📄
module.info.pt_BR.auto
(161 B)
📄
module.info.ro
(0 B)
📄
module.info.ro.auto
(145 B)
📄
module.info.ru
(53 B)
📄
module.info.ru.auto
(153 B)
📄
module.info.sk
(0 B)
📄
module.info.sk.auto
(174 B)
📄
module.info.sl
(0 B)
📄
module.info.sl.auto
(160 B)
📄
module.info.sv
(0 B)
📄
module.info.sv.auto
(130 B)
📄
module.info.th
(0 B)
📄
module.info.th.auto
(294 B)
📄
module.info.tr
(0 B)
📄
module.info.tr.auto
(154 B)
📄
module.info.uk
(0 B)
📄
module.info.uk.auto
(225 B)
📄
module.info.ur
(0 B)
📄
module.info.ur.auto
(194 B)
📄
module.info.vi
(0 B)
📄
module.info.vi.auto
(147 B)
📄
module.info.zh
(0 B)
📄
module.info.zh.auto
(130 B)
📄
module.info.zh_TW
(24 B)
📄
module.info.zh_TW.auto
(100 B)
📄
save_global.cgi
(4.14 KB)
📄
save_log.cgi
(5.38 KB)
📄
view_log.cgi
(1.74 KB)
📄
webalizer-lib.pl
(8.74 KB)
📄
webalizer.pl
(822 B)
Editing: save_log.cgi
#!/usr/bin/perl # save_log.cgi # Save, create or delete options for a log file use strict; use warnings; no warnings 'redefine'; no warnings 'uninitialized'; our (%text, %config, %gconfig, %access, $module_name, %in, $remote_user, $cron_cmd, $custom_logs_file); require './webalizer-lib.pl'; &foreign_require("cron", "cron-lib.pl"); &ReadParse(); &error_setup($text{'save_err'}); $access{'view'} && &error($text{'edit_ecannot'}); !$in{'new'} || $access{'add'} || &error($text{'edit_ecannot'}); &can_edit_log($in{'file'}) || &error($text{'edit_efilecannot'}); # Find the cron job my $job; if (!$in{'new'} && !$in{'view'} && !$in{'run'}) { my @jobs = &cron::list_cron_jobs(); foreach my $j (@jobs) { $job = $j if ($j->{'command'} eq "$cron_cmd $in{'file'}"); } } if ($in{'view'}) { # Re-direct to the view page &redirect("view_log.cgi/".&urlize(&urlize($in{'file'}))."/index.html"); exit; } elsif ($in{'global'}) { # Re-direct to the options page &redirect("edit_global.cgi?file=".&urlize($in{'file'})."&type=$in{'type'}&custom=$in{'custom'}"); exit; } elsif ($in{'run'}) { # Force report generation and show the output &ui_print_unbuffered_header(undef, $text{'gen_title'}, ""); my $lconf = &get_log_config($in{'file'}); print "<b>",&text('gen_header', "<tt>$in{'file'}</tt>"),"</b><br>\n"; print "<pre>"; my $rv = &generate_report($in{'file'}, \*STDOUT, 1); print "</pre>\n"; if ($rv && -r "$lconf->{'dir'}/index.html") { print "<b>$text{'gen_done'}</b><p>\n"; print &ui_link("view_log.cgi/".&urlize(&urlize($in{'file'})). "/index.html", $text{'gen_view'})."<p>\n"; } elsif ($rv) { print "<b>$text{'gen_nothing'}</b><p>\n"; } else { print "<b>$text{'gen_failed'}</b><p>\n"; } &webmin_log("generate", "log", $in{'file'}); &ui_print_footer("edit_log.cgi?file=".&urlize($in{'file'}). "&type=$in{'type'}&custom=$in{'custom'}", $text{'edit_return'}, "", $text{'index_return'}); exit; } elsif ($in{'delete'}) { # Delete this custom log file from the configuration &lock_file($custom_logs_file); my @custom = &read_custom_logs(); @custom = grep { $_->{'file'} ne $in{'file'} } @custom; if ($job) { &lock_file($job->{'file'}); &foreign_call("cron", "delete_cron_job", $job); &unlock_file($job->{'file'}); } &write_custom_logs(@custom); &unlock_file($custom_logs_file); my $cfile = &log_config_name($in{'file'}); &unlink_logged($cfile); &webmin_log("delete", "log", $in{'file'}); } else { # Validate and store inputs if ($in{'new'}) { -r $in{'file'} && !-d $in{'file'} || &error($text{'save_efile'}); } -d $in{'dir'} || &error($text{'save_edir'}); $in{'cmode'} != 2 || -r $in{'cfile'} || &error($text{'save_ecfile'}); my $lconf = { }; if ($access{'user'} eq '*') { # Set the user to whatever was entered defined(getpwnam($in{'user'})) || &error($text{'save_euser'}); $lconf->{'user'} = $in{'user'}; } elsif (!$in{'new'} && $lconf->{'dir'}) { # This is not a new log, so the user cannot be changed } elsif ($access{'user'} eq '') { # This is a new log, or one that has not been saved for # the first time yet. Use the webmin user as the user defined(getpwnam($remote_user)) || &error(&text('save_ewuser', $remote_user)); $lconf->{'user'} = $remote_user; } else { # This is a new log, or one that has not been saved for # the first time yet. Use the user set in the ACL $lconf->{'user'} = $access{'user'}; } $lconf->{'dir'} = $in{'dir'}; $lconf->{'sched'} = $in{'sched'}; $lconf->{'type'} = $in{'type'}; $lconf->{'over'} = $in{'over'}; $lconf->{'clear'} = $in{'clear'}; &cron::parse_times_input($lconf, \%in); # Create or delete the cron job my $oldjob = $job; if ($lconf->{'sched'}) { # Create cron job and script $job->{'user'} = 'root'; $job->{'active'} = 1; $job->{'command'} = "$cron_cmd $in{'file'}"; &lconf_to_cron($lconf, $job); &lock_file($cron_cmd); &cron::create_wrapper($cron_cmd, $module_name, "webalizer.pl"); &unlock_file($cron_cmd); } &lock_file(&cron::cron_file($job)) if ($job); if ($lconf->{'sched'} && !$oldjob) { # Create the cron job &foreign_call("cron", "create_cron_job", $job); } elsif ($lconf->{'sched'} && $oldjob) { # Update the cron job &foreign_call("cron", "change_cron_job", $job); } elsif (!$lconf->{'sched'} && $oldjob) { # Delete the cron job &foreign_call("cron", "delete_cron_job", $job); } &unlock_file(&cron::cron_file($job)) if ($job); if ($in{'new'}) { # Add a new custom log file to the configuration &lock_file($custom_logs_file); my @custom = &read_custom_logs(); push(@custom, { 'file' => $in{'file'}, 'type' => $in{'type'} }); &write_custom_logs(@custom); &unlock_file($custom_logs_file); } # Create or link the custom webalizer.conf file my $cfile = &config_file_name($in{'file'}); if ($in{'cmode'} == 0) { # None at all &unlink_logged($cfile); } elsif ($in{'cmode'} == 1) { # File under /etc/webmin/webalizer if (-l $cfile) { &unlink_logged($cfile); } if (!-r $cfile) { # Need to copy into place ©_source_dest($config{'webalizer_conf'}, $cfile); } } elsif ($in{'cmode'} == 2) { # Symbolic link to somewhere &unlink_logged($cfile); symlink($in{'cfile'}, $cfile); } # Update the log file's options $cfile = &log_config_name($in{'file'}); &lock_file($cfile); &save_log_config($in{'file'}, $lconf); &unlock_file($cfile); &webmin_log($in{'new'} ? "create" : "modify", "log", $in{'file'}); } &redirect("");
Upload File
Create Folder