2 # Delete several host file entries
4 require './net-lib.pl';
5 &error_setup($text{'hdelete_err'});
6 $access{'hosts'} == 2 || &error($text{'hosts_ecannot'});
8 @d = split(/\0/, $in{'d'});
9 @d || &error($text{'hdelete_enone'});
12 &lock_file($config{'hosts_file'});
13 @hosts = &list_hosts();
14 foreach $d (sort { $b <=> $a } @d) {
19 &unlock_file($config{'hosts_file'});
20 &webmin_log("delete", "hosts", scalar(@d));
21 &redirect("list_hosts.cgi");