Handle hostnames with upper-case letters
[webmin.git] / openslp / save_snda.cgi
1 #!/usr/local/bin/perl
2 #
3 # An OpenSLP webmin module
4 # by Monty Charlton <monty@caldera.com>,
5 #
6 # Copyright (c) 2000 Caldera Systems
7 #
8 # Permission to use, copy, modify, and distribute this software and its
9 # documentation under the terms of the GNU General Public License is hereby 
10 # granted. No representations are made about the suitability of this software 
11 # for any purpose. It is provided "as is" without express or implied warranty.
12 # See the GNU General Public License for more details.
13 #
14
15 require './slp-lib.pl';
16 &ReadParse();
17
18 local @scopes, @daaddr;
19 local $val = "";
20
21 # Process List Items
22 for($i=0; $i<3; $i++) {
23         if (!$in{'useScopes'}) {
24                 push(@scopes, $val) if ($val=$in{"useScopesValue_$i"});
25                 }
26         if (!$in{'DAAddresses'}) {
27                 push(@daaddr, $val) if ($val=$in{"DAAddressesValue_$i"});
28                 }
29 }
30 if (!$in{'useScopes'}) {
31         &enable_list_line(@scopes,'useScopes');
32         }
33 else {
34         &disable_line('useScopes');
35         }
36
37 if (!$in{'DAAddresses'}) {
38         &enable_list_line(@daaddr,'DAAddresses');
39         }
40 else {
41         &disable_line('DAAddresses');
42         }
43
44 &restart();
45 &redirect("");
46