- Timestamp:
- 01/22/08 16:11:01 (17 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/extras/db2rwhois.pl
r371 r380 41 41 my @masterblocks; 42 42 my %netnameprefix; 43 my %def_custids;44 43 45 44 # Get the list of live directories for potential deletion … … 282 281 "IP-Network: $net\n". 283 282 "IP-Network-Block: ".$net->range."\n". 284 "Org-Name: $name\n".285 "Street-Address: $street\n".286 "City: $city\n".287 "StateProv: $prov\n".288 "Postal-Code: $pocode\n".289 "Country-Code: $country\n".290 "Tech-Contact: $tech\n".283 "Org-Name: ".($name ? $name : 'Friendly ISP')."\n". 284 "Street-Address: ".($street ? $street : '123 4th Street')."\n". 285 "City: ".($city ? $city : 'Anytown')."\n". 286 "StateProv: ".($prov ? $prov : 'Ontario')."\n". 287 "Postal-Code: ".($pocode ? $pocode : 'H0H 0H0')."\n". 288 "Country-Code: ".($country ? $country : 'CA')."\n". 289 "Tech-Contact: ".($tech ? $tech : 'ISP-ARIN-HANDLE')."\n". 291 290 "Created: $ctime\n". 292 291 "Updated: $mtime\n". -
trunk/cgi-bin/ipdb.psql
r371 r380 158 158 fc Reserve for fibre Fibre blocks 203 6750400 ISP 159 159 wr CORE/WAN block CORE/WAN block 220 6750400 ISP 160 pr Dynamic-route DSL netblock Dynamic-route DSL 221 ISP160 pr Dynamic-route DSL netblock (cust) Dynamic-route DSL (cust) 221 ISPCUST 161 161 ar ATM block ATM block 222 ISP 162 162 fr Fibre Fibre 223 ATM-BUS ISP -
trunk/cgi-bin/main.cgi
r371 r380 400 400 $sth->execute(); 401 401 402 # hack hack hack 403 # set up to flag swip=y records if they don't actually have supporting data in the customers table 404 my $custsth = $ip_dbh->prepare("select count(*) from customers where custid=?"); 405 402 406 my $count=0; 403 407 while (my @data = $sth->fetchrow_array()) { … … 408 412 # $data[2] =~ s/\s+//g; 409 413 414 $custsth->execute($data[3]); 415 my ($ncust) = $custsth->fetchrow_array(); 416 410 417 # Prefix subblocks with "Sub " 411 418 my @row = ( (($data[2] =~ /^.r$/) ? 'Sub ' : ''). 412 419 qq(<a href="/ip/cgi-bin/main.cgi?action=edit&block=$data[0]">$data[0]</a>), 413 420 $data[1], $disp_alloctypes{$data[2]}, $data[3], 414 ($data[4] eq 'y' ? 'Yes': 'No'), $data[5]);421 ($data[4] eq 'y' ? ($ncust == 0 ? 'Yes<small>*</small>' : 'Yes') : 'No'), $data[5]); 415 422 # If the allocation is a pool, allow listing of the IPs in the pool. 416 423 if ($data[2] =~ /^.[pd]$/) { … … 841 848 print qq(<div class="center"><div class="heading">The IP $msg has been allocated to customer $webvar{custid}</div>). 842 849 ( ($webvar{alloctype} eq 'di' && $webvar{billinguser}) ? 843 qq(<div><a href="https://billing.example.com/ extserv.pl?).850 qq(<div><a href="https://billing.example.com/radius.pl?). 844 851 "action=new_radius_user&custid=$webvar{custid}&userid=$webvar{billinguser}". 845 852 qq(&ipdb=1&ip=$msg">Add this IP to RADIUS user table</a></div>) … … 854 861 "sucessfully added as: $disp_alloctypes{$webvar{alloctype}}</div>". 855 862 ( ($webvar{alloctype} eq 'pr' && $webvar{billinguser}) ? 856 qq(<div><a href="https://billing.example.com/ extserv.pl?).863 qq(<div><a href="https://billing.example.com/radius.pl?). 857 864 "action=new_radius_user&custid=$webvar{custid}&userid=$webvar{billinguser}". 858 865 "&route_subnet=".$netblock->addr."&subnet_slash=".$netblock->masklen. … … 1120 1127 my $html = join('', <HTML>); 1121 1128 1129 # Link back to browse-routed or list-pool page on "Update complete" page. 1130 my $backlink = "/ip/cgi-bin/main.cgi?action="; 1131 my $cblock; # to contain the CIDR of the container block we're retrieving. 1132 my $sql; 1133 if (my $pooltype = ($webvar{alloctype} =~ /^(.)i$/) ) { 1134 $sql = "select pool from poolips where ip='$webvar{block}'"; 1135 $backlink .= "listpool&pool="; 1136 } else { 1137 $sql = "select cidr from routed where cidr >>= '$webvar{block}'"; 1138 $backlink .= "showrouted&block="; 1139 } 1140 # I define there to be no errors on this operation... so we don't need to check for them. 1141 $sth = $ip_dbh->prepare($sql); 1142 $sth->execute; 1143 $sth->bind_columns(\$cblock); 1144 $sth->fetch(); 1145 $sth->finish; 1146 $backlink .= $cblock; 1147 1122 1148 my $swiptmp = ($webvar{swip} eq 'on' ? 'Yes' : 'No'); 1123 1149 $html =~ s/\$\$BLOCK\$\$/$webvar{block}/g; … … 1134 1160 $webvar{notes} = desanitize($webvar{notes}); 1135 1161 $html =~ s/\$\$NOTES\$\$/$webvar{notes}/g; 1162 $html =~ s/\$\$BACKLINK\$\$/$backlink/g; 1163 $html =~ s/\$\$BACKBLOCK\$\$/$cblock/g; 1136 1164 1137 1165 if ($IPDBacl{$authuser} =~ /s/) { -
trunk/header.inc
r370 r380 34 34 </tbody></table> 35 35 36 <table width="100%" border="0" cellspacing="0" cellpadding="0" 36 <table width="100%" border="0" cellspacing="0" cellpadding="0"> 37 37 <tr bgcolor="#000000"><td></td></tr></table> 38 38 <!-- end line and top. --> -
trunk/updated.html
r320 r380 13 13 </table> 14 14 </div> 15 <p> 16 <div name="backlink"> 17 <a href="$$BACKLINK$$">Back to $$BACKBLOCK$$</a> 18 </div>
Note:
See TracChangeset
for help on using the changeset viewer.