Changeset 933 for trunk/cgi-bin
- Timestamp:
- 12/08/22 13:44:35 (2 years ago)
- Location:
- trunk/cgi-bin
- Files:
-
- 1 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
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');
Note:
See TracChangeset
for help on using the changeset viewer.