[! use strict; use Proxmox::Form; use Proxmox::Utils; use Proxmox::ConfigServer; use Proxmox::Config::System; !] [- my $frm = Proxmox::Form->new (\%fdat); my $system_cfg = $fdat{__system_config}; $frm->add_cfg_element('virusquar', 'lifetime', "number", undef, __("Lifetime (days)")); $frm->add_element("section_preview", "section", undef, __("Mail Preview Settings")); $frm->add_cfg_element('virusquar', 'viewimages', "bool", undef, __("View images")); $frm->add_cfg_element('virusquar', 'allowhrefs', "bool", undef, __("Allow HREFs")); if ($frm->submit==0) { $frm->load_cfg ($system_cfg); } else { if ($udat{AM} eq 'w') { $frm->save_cfg ($system_cfg); my $conn = Proxmox::ConfigClient::connect (); eval { $conn->service_cmd ('apache', 'restart'); }; } else { $udat{popup_error} = Proxmox::Utils::msg ('nowr'); } } print OUT $frm->out_form; -]