Changeset 400 for trunk/cgi-bin/main.cgi
- Timestamp:
- 05/11/10 17:06:26 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/main.cgi
r397 r400 15 15 use CommonWeb qw(:ALL); 16 16 use MyIPDB; 17 use CustIDCK; 17 18 use POSIX qw(ceil); 18 19 use NetAddr::IP; … … 943 944 return; 944 945 } 945 if ($webvar{custid} !~ /^(?:\d{5,10}|STAFF|TEMP)(?:-\d\d?)?$/) { 946 printError("Please enter a valid customer ID- this must be a 7- or 10-digit number, or STAFF for static IPs for staff."); 947 return; 948 } 949 print "<!-- [ In validateInput(). Insert customer ID cross-check here. ] -->\n"; 946 if ($webvar{custid} !~ /^(?:\d{10}|\d{7}|STAFF)(?:-\d\d?)?$/) { 947 # Force uppercase for now... 948 $webvar{custid} =~ tr/a-z/A-Z/; 949 # Crosscheck with billing. 950 my $status = CustIDCK->custid_exist($webvar{custid}); 951 if ($CustIDCK::Error) { 952 printError("Error verifying customer ID: ".$CustIDCK::ErrMsg); 953 return; 954 } 955 if (!$status) { 956 printError("Customer ID not valid. Make sure the Customer ID ". 957 "is correct.<br>\nUse STAFF for staff static IPs, and 6750400 for any other ". 958 "non-customer assignments."); 959 return; 960 } 961 #"Please enter a valid customer ID- this must be a 7- or 10-digit number, or STAFF for 962 #static IPs for staff."); 963 } 964 # print "<!-- [ In validateInput(). Insert customer ID cross-check here. ] -->\n"; 950 965 } else { 951 966 # New! Improved! And now Loaded From The Database!! … … 967 982 } else { 968 983 $flag = 'n'; 969 if ($webvar{alloctype} =~ /[wp][cr]| d[pi]/) {984 if ($webvar{alloctype} =~ /[wp][cr]|[ds][pi]/) { 970 985 # Set this forcibly rather than messing around elsewhere. Yes, this *is* a hack. PTHBTT!! 971 # Match CORE/WAN types (wc, wr, pc, pr), DSL pool and IP (dp, di).972 $webvar{pop} = "Sudbury";973 } elsif ($webvar{pop} =~ /^-$/) {986 $webvar{pop} = 'Sudbury'; 987 } 988 if ($webvar{pop} =~ /^-$/) { 974 989 $flag = 'to route the block from/through'; 975 990 }
Note:
See TracChangeset
for help on using the changeset viewer.