Changeset 400 for trunk/cgi-bin/admin.cgi
- Timestamp:
- 05/11/10 17:06:26 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/admin.cgi
r398 r400 18 18 use CommonWeb qw(:ALL); 19 19 use MyIPDB; 20 use CustIDCK; 20 21 #use POSIX qw(ceil); 21 22 use NetAddr::IP; … … 134 135 my $custid = $data[0]; 135 136 if ($custid eq '') { 137 if ($webvar{custid} !~ /^(?:\d{10}|\d{7}|STAFF)(?:-\d\d?)?$/) { 138 # Force uppercase for now... 139 $webvar{custid} =~ tr/a-z/A-Z/; 140 # Crosscheck with billing. 141 my $status = CustIDCK->custid_exist($webvar{custid}); 142 if ($CustIDCK::Error) { 143 printError("Error verifying customer ID: ".$CustIDCK::ErrMsg); 144 return; 145 } 146 if (!$status) { 147 printError("Customer ID not valid. Make sure the Customer ID ". 148 "is correct.<br>\nUse STAFF for staff static IPs, and 6750400 for any other ". 149 "non-customer assignments."); 150 return; 151 } 152 } 136 153 # Type that doesn't have a default custid 137 154 $custid = $webvar{custid}; 138 155 } 139 ##fixme Check billing DB here140 156 141 157 my $cidr = new NetAddr::IP $webvar{cidr}; … … 506 522 # 507 523 524 print qq(<hr><a href="/ip/">Back</a> to main interface</a>\n); 508 525 509 526 printFooter;
Note:
See TracChangeset
for help on using the changeset viewer.