| Server IP : 189.126.111.107 / Your IP : 216.73.217.69 Web Server : Apache System : Linux www.gadotticar.com.br 5.4.0-135-generic #152-Ubuntu SMP Wed Nov 23 20:19:22 UTC 2022 x86_64 User : gadotticar ( 1000) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/virtual-server/ |
Upload File : |
#!/usr/bin/perl
# Delete one or more selected plans
require './virtual-server-lib.pl';
&ReadParse();
&error_setup($text{'dplans_err'});
$canplans = &can_edit_plans();
$canplans || &error($text{'plans_ecannot'});
# Get the plans and remove them
@d = split(/\0/, $in{'d'});
@d || &error($text{'dplans_enone'});
@plans = &list_editable_plans();
@allplans = &list_plans();
foreach $d (@d) {
($plan) = grep { $_->{'id'} eq $d } @plans;
if ($plan) {
@allplans = grep { $_->{'id'} ne $d } @allplans;
@allplans || &error($text{'dplans_eall'});
&delete_plan($plan);
}
}
# Log and return
&run_post_actions_silently();
&webmin_log("delete", "plans", scalar(@d));
&redirect("edit_newplan.cgi");