Changeset 87 for trunk/cgi-bin/main.cgi
- Timestamp:
- 11/26/04 17:28:19 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r74 r87 828 828 my $city; # Shut up Perl's "strict" scoping/usage check. 829 829 $sql = "select * from poolips where available='y' and". 830 " ptype='$base' and city='$webvar{ city}'";830 " ptype='$base' and city='$webvar{pop}'"; 831 831 } 832 832 … … 839 839 $ipcount{$data[0]}++; 840 840 } 841 $sth = $ip_dbh->prepare("select city from allocations where cidr=?"); 841 842 foreach my $key (keys %ipcount) { 842 $optionlist .= "<option value='$key'>$key [$ipcount{$key} free IP(s)]</option>\n"; 843 $sth->execute($key); 844 my @data = $sth->fetchrow_array; 845 $optionlist .= "<option value='$key'>$key [$ipcount{$key} free IP(s)] in $data[0]</option>\n"; 843 846 } 844 847 $cidr = "Single static IP"; … … 931 934 $html =~ s|\$\$ALLOC_FROM\$\$|$alloc_from|g; 932 935 $html =~ s|\$\$CIDR\$\$|$cidr|g; 936 $webvar{city} = desanitize($webvar{city}); 933 937 $html =~ s|\$\$CITY\$\$|$webvar{city}|g; 934 938 $html =~ s|\$\$CUSTID\$\$|$webvar{custid}|g; 939 $webvar{circid} = desanitize($webvar{circid}); 935 940 $html =~ s|\$\$CIRCID\$\$|$webvar{circid}|g; 936 941 $webvar{desc} = desanitize($webvar{desc}); … … 1156 1161 printAndExit("Please enter a customer ID."); 1157 1162 } 1158 if ($webvar{custid} !~ /^(?:\d{10}|\d{7}|STAFF )(?:-\d\d?)?$/) {1163 if ($webvar{custid} !~ /^(?:\d{10}|\d{7}|STAFF|TEMP)(?:-\d\d?)?$/) { 1159 1164 printAndExit("Please enter a valid customer ID- this must be a 7- or 10-digit number, or STAFF for static IPs for staff."); 1160 1165 }
Note:
See TracChangeset
for help on using the changeset viewer.