#!/usr/bin/perl # Show a form for backing up some or all firewall objects require './itsecur-lib.pl'; &can_edit_error("backup"); &check_zip(); &header($text{'backup_title'}, "", undef, undef, undef, undef, &apply_button()); print "
\n"; print "
\n"; print "\n"; print "\n"; print "
$text{'backup_header'}
\n"; # Show destination ($mode, @dest) = &parse_backup_dest($config{'backup_dest'}); print "\n"; print "\n"; # Show password print "\n", $config{'backup_pass'}; # Show what to backup %what = map { $_, 1 } split(/\s+/, $config{'backup_what'}); print "\n"; # Show schedule $job = &find_backup_job(); print "\n"; print "
$text{'backup_dest'}\n"; printf "\n", $mode == 0 ? "checked" : "", $text{'backup_dest0'}; printf "\n", $mode == 1 ? "checked" : "", $text{'backup_dest1'}; printf "\n", $mode == 1 ? $dest[0] : "", &file_chooser_button("dest"); printf "\n", $mode == 3 ? "checked" : "", $text{'backup_dest3'}; printf "\n", $mode == 3 ? $dest[0] : ""; printf "\n", $mode == 2 ? "checked" : ""; printf "\n", $text{'backup_dest2'}, $mode == 2 ? $dest[2] : ""; printf "\n", $text{'backup_ftpfile'}, $mode == 2 ? $dest[3] : ""; printf "\n", $text{'backup_ftpuser'}, $mode == 2 ? $dest[0] : ""; printf "\n", $text{'backup_ftppass'}, $mode == 2 ? $dest[1] : ""; print "
%s
%s %s
%s
%s %s
%s %s
$text{'backup_pass'} \n"; printf " %s\n", $config{'backup_pass'} ? "" : "checked", $text{'backup_nopass'}; printf "\n", $config{'backup_pass'} ? "checked" : ""; printf "
$text{'backup_what'} \n"; foreach $w (@backup_opts) { printf " %s
\n", $w, $what{$w} ? "checked" : "", $text{$w."_title"}; } if (defined(&select_all_link)) { print &select_all_link("what", 0),"\n"; print &select_invert_link("what", 0),"\n"; } print "
$text{'backup_sched'} \n"; printf " %s\n", $job ? "" : "checked", $text{'backup_nosched'}; printf " %s\n", $job ? "checked" : "", $text{'backup_interval'}; print "
\n"; print "\n"; print "
\n"; print "
\n"; &footer("", $text{'index_return'});