#!/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 &ui_hr(); print &ui_form_start("backup.cgi/firewall.zip", "post"); print &ui_table_start($text{'backup_header'}, undef, 2); # Show destination my ($mode, @dest) = &parse_backup_dest($config{'backup_dest'}); my $tx = ""; $tx = "
| ".&ui_oneradio("dest_mode", 0, undef, ($mode == 0 ? 1 : 0) )." | "; $tx .= "".$text{'backup_dest0'}." | |||
| ".&ui_oneradio("dest_mode", 1, undef, ($mode == 1 ? 1 : 0) )." | "; $tx .= "".$text{'backup_dest1'}." | "; $tx .= "".&ui_filebox("dest",($mode == 1 ? $dest[0] : ""),40)." | ||
| ".&ui_oneradio("dest_mode", 3, undef, ($mode == 3 ? 1 : 0) )." | "; $tx .= "".$text{'backup_dest3'}." | "; $tx .= "".&ui_textbox("email",($mode == 3 ? $dest[0] : ""),40)." | ||
| ".&ui_oneradio("dest_mode", 2, undef, ($mode == 2 ? 1 : 0) )." | "; $tx .= "".$text{'backup_dest2'}." | "; $tx .= "".&ui_textbox("ftphost",($mode == 2 ? $dest[2] : ""),20)." | "; $tx .= "".$text{'backup_ftpfile'}." | "; $tx .= "".&ui_textbox("ftpfile",($mode == 2 ? $dest[3] : ""),20)." |
| "; $tx .= " | ".$text{'backup_ftpuser'}." | "; $tx .= "".&ui_textbox("ftpuser",($mode == 2 ? $dest[0] : ""),20)." | "; $tx .= "".$text{'backup_ftppass'}." | "; $tx .= "".&ui_password("ftppass",($mode == 2 ? $dest[1] : ""),20)." |
"; print &ui_submit($text{'backup_ok'}); print &ui_submit($text{'backup_save'}, "save"); print &ui_form_end(undef,undef,1); print &ui_hr(); &footer("", $text{'index_return'});