Changeset 370
- Timestamp:
- 11/27/07 12:18:27 (17 years ago)
- Location:
- trunk
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/IPDB.pm
r350 r370 25 25 %allocated %free %routed %bigfree %IPDBacl 26 26 &initIPDBGlobals &connectDB &finish &checkDBSanity &allocateBlock &deleteBlock 27 & mailNotify27 &getBlockData &mailNotify 28 28 ); 29 29 … … 33 33 @masterblocks %allocated %free %routed %bigfree %IPDBacl 34 34 &initIPDBGlobals &connectDB &finish &checkDBSanity &allocateBlock 35 &deleteBlock & mailNotify35 &deleteBlock &getBlockData &mailNotify 36 36 )] 37 37 ); … … 492 492 $msg = "Unable to deallocate $disp_alloctypes{$type} $cidr"; 493 493 $sth = $dbh->prepare("update poolips set custid='6750400',available='y',". 494 "city=(select city from allocations where cidr >>= '$cidr'),". 494 "city=(select city from allocations where cidr >>= '$cidr'". 495 " order by masklen(cidr) desc limit 1),". 495 496 "description='',notes='',circuitid='' where ip='$cidr'"); 496 497 $sth->execute; … … 643 644 644 645 646 ## IPDB::getBlockData() 647 # Return custid, type, city, and description for a block 648 sub getBlockData { 649 my $dbh = shift; 650 my $block = shift; 651 652 my $sth = $dbh->prepare("select cidr,custid,type,city,description from searchme". 653 " where cidr='$block'"); 654 $sth->execute(); 655 return $sth->fetchrow_array(); 656 } # end getBlockData() 657 658 645 659 ## IPDB::mailNotify() 646 660 # Sends notification mail to recipients regarding an IPDB operation -
trunk/cgi-bin/admin.cgi
r348 r370 570 570 " value='$types[0]'>$types[1]</option>\n"; 571 571 } 572 print "<option". (($data[2] eq 'in') ? ' selected' : '') .573 " value='in'>Internal netblock</option>\n</select></td>\n";574 572 575 573 print qq(<td><input name=city value="$data[3]"></td>\n). -
trunk/cgi-bin/ipdb.psql
r347 r370 147 147 we Dynamic WiFi block Dynamic WiFi block 104 WL-RES ISP-WIFI 148 148 ve Dynamic VoIP block Dynamic VoIP block 105 DYN-VOIP ISP 149 li Static IP - LAN/POP Static LAN/POP IP 190 6750400 ISP 150 ld Static Pool - LAN/POP LAN pool 191 6750400 ISP 149 li Static IP - LAN/POP Static LAN/POP IP 190 NOC-VPN ISP 150 li Static IP - Management Static management IP 191 NOC-VPN ISP 151 ld Static Pool - LAN/POP LAN pool 195 NOC-VPN ISP 152 ld Static Pool - Management Management pool 196 NOC-VPN ISP 153 in Internal netblock Internal netblock 199 6750400 ISP 151 154 wc Reserve for CORE/WAN blocks CORE/WAN blocks 200 6750400 ISP 152 155 pc Reserve for dynamic-route DSL netblocks Dynamic-route netblocks 201 6750400 ISP-STATIC-DSL … … 158 161 fr Fibre Fibre 223 ISP 159 162 rm Routing Routed netblock 500 6750400 ISP 160 in Internal netblock Internal netblock 990 6750400 ISP161 163 mm Master block Master block 999 6750400 ISP 162 164 \. -
trunk/cgi-bin/main.cgi
r320 r370 1283 1283 } 1284 1284 1285 # need to retrieve block data before deleting so we can notify on that 1286 my ($cidr,$custid,$type,$city,$description) = getBlockData($ip_dbh, $webvar{block}); 1287 1285 1288 my ($code,$msg) = deleteBlock($ip_dbh, $webvar{block}, $webvar{alloctype}); 1286 1289 1287 1290 if ($code eq 'OK') { 1288 1291 print "<div class=heading align=center>Success! $webvar{block} deallocated.</div>\n"; 1289 syslog "notice", "$authuser deallocated '$webvar{alloctype}'-type netblock $webvar{block}"; 1292 syslog "notice", "$authuser deallocated '$webvar{alloctype}'-type netblock $webvar{block}". 1293 " $custid, $city, desc='$description'"; 1290 1294 # Notify tech@ when a block/IP is deallocated 1291 1295 # mailNotify('tech@example.com',"REMOVED: $disp_alloctypes{$webvar{alloctype}} $webvar{block}", 1292 # "$disp_alloctypes{$webvar{alloctype}} $webvar{block} deallocated by $authuser\n"); 1296 # "$disp_alloctypes{$webvar{alloctype}} $webvar{block} deallocated by $authuser\n". 1297 # "CustID: $custid\nCity: $city\nDescription: $description\n"); 1293 1298 } else { 1294 1299 if ($webvar{alloctype} =~ /^.i$/) { -
trunk/cgi-bin/newcity.cgi
r214 r370 40 40 41 41 if ($webvar{pop} eq 'on') { 42 $sth = $dbh->prepare("insert into cities values ('$webvar{city}','y')");42 $sth = $dbh->prepare("insert into cities (city,routing) values ('$webvar{city}','y')"); 43 43 } else { 44 $sth = $dbh->prepare("insert into cities values ('$webvar{city}','n')");44 $sth = $dbh->prepare("insert into cities (city,routing) values ('$webvar{city}','n')"); 45 45 } 46 46 $sth->execute; -
trunk/cgi-bin/search.cgi
r351 r370 40 40 my %webvar = parse_post(); 41 41 cleanInput(\%webvar); 42 43 if (defined($webvar{rpp})) { 44 ($RESULTS_PER_PAGE) = ($webvar{rpp} =~ /(\d+)/); 45 } 42 46 43 47 if (!defined($webvar{stype})) { … … 185 189 } else { 186 190 # Add the limit/offset clauses 187 $sql .= " order by cidr limit $RESULTS_PER_PAGE offset $offset"; 191 $sql .= " order by cidr"; 192 $sql .= " limit $RESULTS_PER_PAGE offset $offset" if $RESULTS_PER_PAGE != 0; 188 193 # And tell the user. 189 194 print "<div class=heading>Searching...............</div>\n"; … … 420 425 421 426 # print the page thing.. 422 if ($ rowCount > $RESULTS_PER_PAGE) {427 if ($RESULTS_PER_PAGE > 0 && $rowCount > $RESULTS_PER_PAGE) { 423 428 my $pages = ceil($rowCount/$RESULTS_PER_PAGE); 424 429 print qq(<div class="center"> Page: ); -
trunk/compsearch.html
r234 r370 6 6 <td colspan=2>Match on:<input type=radio checked name=which value="all">All 7 7 <input type=radio name=which value="any">Any 8 <td colspan=2 align=right><input type=submit value="Search Now"></td> 8 <td>Results per page: <select name=rpp> 9 <option value='25'>25</option> 10 <option value='50'>50</option> 11 <option value='100'>100</option> 12 <option value='200'>200</option> 13 <option value='0'>Show all</option> 14 </select> 15 <td align=right><input type=submit value="Search Now"></td> 9 16 </td> 10 17 <tr class="color1"> -
trunk/header.inc
r234 r370 7 7 <script language=javascript> 8 8 function openHelp() { 9 window.open("/ip/help.html", "help_window", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=700,height= 300")9 window.open("/ip/help.html", "help_window", "toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=yes,resizable=yes,copyhistory=no,width=700,height=400") 10 10 } 11 11 function openTables() { -
trunk/help.html
r285 r370 28 28 </tr> 29 29 <tr class="color2"> 30 <td>Customer ID:</td><td>705 or 6137328844 </td><td>Find all alloctions to that31 customer. 32 Matches on prefix (area code, area code + exchange, etc).30 <td>Customer ID:</td><td>705 or 6137328844 or 503101</td><td>Find all alloctions to that 31 customer. Matches on prefix (area code, area code + exchange, etc). Searches old as well as 32 new CustIDs. 33 33 </td> 34 34 </tr>
Note:
See TracChangeset
for help on using the changeset viewer.