Changeset 56 for branches/stable/cgi-bin/main.cgi
- Timestamp:
- 11/10/04 11:10:28 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/stable/cgi-bin/main.cgi
r53 r56 15 15 use CommonWeb qw(:ALL); 16 16 use IPDB qw(:ALL); 17 use CustIDCK; 17 18 use POSIX qw(ceil); 18 19 use NetAddr::IP; … … 1159 1160 } 1160 1161 if ($webvar{custid} !~ /^(?:\d{10}|\d{7}|STAFF)(?:-\d\d?)?$/) { 1161 printAndExit("Please enter a valid customer ID- this must be a 7- or 10-digit number, or STAFF for static IPs for staff."); 1162 } 1163 print "<!-- [ In validateInput(). Insert customer ID cross-check here. ] -->\n"; 1162 # Force uppercase for now... 1163 $webvar{custid} =~ tr/a-z/A-Z/; 1164 # Crosscheck with ... er... something. 1165 my $status = CustIDCK->custid_exist($webvar{custid}); 1166 printAndExit("Error verifying customer ID: ".$CustIDCK::ErrMsg) 1167 if $CustIDCK::Error; 1168 printAndExit("Customer ID not valid. Make sure the Customer ID ". 1169 "is correct.<br>\nUse STAFF for staff static IPs, and 6750400 for any other ". 1170 "non-customer assignments.") 1171 if !$status; 1172 #"Please enter a valid customer ID- this must be a 7- or 10-digit number, or STAFF for 1173 #static IPs for staff."); 1174 } 1175 # print "<!-- [ In validateInput(). Insert customer ID cross-check here. ] -->\n"; 1164 1176 } elsif ($webvar{alloctype} =~ /^([sdcmw]p|si|dn|dy|dc|ee|rr|ii)$/){ 1165 1177 # All non-customer allocations MUST be entered with "our" customer ID. 1166 1178 # I have Defined this as 6750400 for consistency. 1167 $webvar{custid} = "6750400"; 1179 # STAFF is also acceptable. 1180 if ((!$webvar{custid}) || ($webvar{custid} ne 'STAFF')) { 1181 $webvar{custid} = "6750400"; 1182 } 1168 1183 if ($webvar{alloctype} eq 'rr') { 1169 1184 if ($webvar{city} !~ /^(?:Huntsville|North Bay|Ottawa|Pembroke|Sault Ste. Marie|Sudbury|Timmins|Thunder Bay|Toronto)$/) {
Note:
See TracChangeset
for help on using the changeset viewer.