#!/usr/local/bin/perl
# edit_log.cgi
# Display a form for adding a new logfile or editing an existing one.
# Allows you to set the schedule on which the log is analysed
require './webalizer-lib.pl';
&foreign_require("cron", "cron-lib.pl");
&ReadParse();
$access{'view'} && &error($text{'edit_ecannot'});
if ($in{'new'}) {
$access{'add'} || &error($text{'edit_ecannot'});
&ui_print_header(undef, $text{'edit_title1'}, "");
}
else {
&can_edit_log($in{'file'}) || &error($text{'edit_ecannot'});
&ui_print_header(undef, $text{'edit_title2'}, "");
$lconf = &get_log_config($in{'file'});
}
print "