- Timestamp:
- 12/08/22 13:44:35 (2 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Makefile
r910 r933 32 32 33 33 HTML = \ 34 alloctypes.html help.html index.shtml ipdb.css rDNS.html 34 alloctypes.html help.html index.shtml ipdb.css rDNS.html htaccess.example 35 35 36 36 JS = templates/widgets.js … … 63 63 SCRIPTS = \ 64 64 cgi-bin/access-pwd-update.pl cgi-bin/allocate.pl cgi-bin/combineblocks.pl \ 65 cgi-bin/consistency-check.pl cgi-bin/db-update.pl cgi-bin/freespace.pl \65 cgi-bin/consistency-check.pl cgi-bin/db-update.pl cgi-bin/freespace.pl cgi-bin/pool2csv.pl \ 66 66 \ 67 67 cgi-bin/admin.cgi cgi-bin/ipdb-rpc.cgi cgi-bin/main.cgi cgi-bin/newcity.cgi cgi-bin/newnode.cgi \ -
trunk/cgi-bin/IPDB.pm
r926 r933 144 144 # Append the default domain on unqualified DNS names? 145 145 our $append_domain = 1; 146 147 # Enable link publishing selected IP pool data as a CSV 148 # Not enabled by default due to webserver config required 149 our $enablecsv = 0; 146 150 147 151 ## -
trunk/cgi-bin/MyIPDB.pm
r913 r933 101 101 #$IPDB::append_domain = 1; 102 102 103 ## Enable link publishing selected IP pool data as a CSV? 104 # Not enabled by default due to webserver config required 105 #$IPDB::enablecsv = 0; 106 103 107 ## connectDB_My() 104 108 # Wrapper for IPDB::connectDB -
trunk/cgi-bin/main.cgi
r922 r933 1 1 #!/usr/bin/perl 2 2 # ipdb/cgi-bin/main.cgi 3 ### 4 # SVN revision info 5 # $Date$ 6 # SVN revision $Rev$ 7 # Last update by $Author$ 8 ### 9 # Copyright (C) 2004-2016 - Kris Deugau 3 ## 4 # $Id$ 5 # Copyright (C) 2004-2018,2022 - Kris Deugau <kdeugau@deepnet.cx> 6 # 7 # This program is free software: you can redistribute it and/or modify 8 # it under the terms of the GNU General Public License as published by 9 # the Free Software Foundation, either version 3 of the License, or 10 # (at your option) any later version. 11 # 12 # This program is distributed in the hope that it will be useful, 13 # but WITHOUT ANY WARRANTY; without even the implied warranty of 14 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 # GNU General Public License for more details. 16 # 17 # You should have received a copy of the GNU General Public License 18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 19 ## 10 20 11 21 use strict; … … 24 34 ##uselib## 25 35 26 # push "the directory the script is in" into @INC 27 use FindBin; 28 use lib "$FindBin::RealBin/"; 36 # Taint-safe (ish) voodoo to push "the directory the script is in" into @INC. 37 use File::Spec (); 38 use File::Basename (); 39 my $path; 40 BEGIN { 41 $path = File::Basename::dirname(File::Spec->rel2abs($0)); 42 if ($path =~ /(.*)/) { 43 $path = $1; 44 } 45 } 46 use lib $path; 29 47 30 48 use CustIDCK; … … 458 476 $page->param(vlan => $poolinfo->{vlan}); 459 477 $page->param(poolpctfree => sprintf("%0.1f", $poolinfo->{nfree}/2**(32-$poolinfo->{masklen}) * 100 ) ); 478 $page->param(csvlink => $IPDB::enablecsv); 460 479 461 480 # Tree navigation … … 485 504 my $plist = listPool($ip_dbh, $webvar{pool}, 1); 486 505 $page->param(poolips => $plist); 506 # CSV voodoo 507 $page->param(poolid => $webvar{pool}); 487 508 488 509 # retrieve any notices … … 1409 1430 $page->param(city => $webvar{city}); 1410 1431 $page->param(disptype => $disp_alloctypes{$webvar{alloctype}}); 1432 $page->param(vlan => $webvar{vlan}); 1411 1433 $page->param(custid => $webvar{custid}); 1412 1434 $page->param(swip => $webvar{swip} eq 'on' ? 'Yes' : 'No'); -
trunk/templates/listpool.tmpl
r917 r933 3 3 <TMPL_IF webpath></TMPL_IF> 4 4 <br> 5 <div class="tbltitle">Listing pool IPs for <TMPL_VAR NAME=block><br> 6 (<TMPL_VAR NAME=disptype> in <TMPL_VAR NAME=city>)<TMPL_IF vlan><br> 7 VLAN <TMPL_VAR NAME=vlan></TMPL_IF> 8 <TMPL_VAR NAME=poolpctfree>% free</div> 5 <div class="tbltitle">Listing pool IPs for <TMPL_VAR NAME=block> 6 <br>(<TMPL_VAR NAME=disptype> in <TMPL_VAR NAME=city>) 7 <TMPL_IF vlan><br>VLAN <TMPL_VAR NAME=vlan></TMPL_IF> 8 <br><TMPL_VAR NAME=poolpctfree>% free 9 <TMPL_IF csvlink><br><a href="<TMPL_VAR NAME=webpath>/<TMPL_VAR NAME=poolid>-<TMPL_VAR NAME=city>.csv">Download</a> IP, CustID, Description as CSV</TMPL_IF> 10 </div> 9 11 10 12 <br>
Note:
See TracChangeset
for help on using the changeset viewer.