- Timestamp:
- 07/28/10 10:56:09 (14 years ago)
- Location:
- branches/htmlform
- Files:
-
- 3 added
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/htmlform/cgi-bin/CommonWeb.pm
r449 r450 65 65 </center> 66 66 ); 67 print "<br>would print footer but already dun gone and shot( $self->foot)\n";67 print "<br>would print footer but already dun gone and shot(self->foot)\n"; 68 68 exit(0); 69 69 } -
branches/htmlform/cgi-bin/main.cgi
r449 r450 60 60 )); 61 61 62 63 62 # Set up the CGI object... 64 63 my $q = new CGI::Simple; … … 74 73 75 74 if(!defined($webvar{action})) { 76 $webvar{action} = "<NULL>"; #shuts up the warnings. 77 } 75 $webvar{action} = "index"; #shuts up the warnings. 76 } 77 78 my $page = HTML::Template->new(filename => "$webvar{action}.tmpl"); 78 79 79 80 if($webvar{action} eq 'index') { … … 182 183 # if $IPDBacl{$authuser} =~ /A/; 183 184 185 print $page->output; 186 184 187 # We print the footer here, so we don't have to do it elsewhere. 185 188 my $footer = HTML::Template->new(filename => "footer.tmpl"); … … 233 236 # Initial display: Show master blocks with total allocated subnets, total free subnets 234 237 sub showSummary { 235 236 startTable('Master netblock', 'Routed netblocks', 'Allocated netblocks',237 'Free netblocks', 'Largest free block');238 239 238 my %allocated; 240 239 my %free; … … 276 275 } 277 276 278 # Print the data. 279 my $count=0; 277 # Assemble the data to stuff into the template. 278 my @masterlist; 279 my $rowclass=0; 280 280 foreach my $master (@masterblocks) { 281 my @row = ("<a href=\"/ip/cgi-bin/main.cgi?action=showmaster&block=$master\">$master</a>", 282 $routed{"$master"}, $allocated{"$master"}, $free{"$master"}, 283 ( ($bigfree{"$master"} eq '') ? ("<NONE>") : ("/".$bigfree{"$master"}) ) 281 my %row = (rowclass => "row$rowclass", 282 master => "$master", 283 routed => $routed{"$master"}, 284 allocated => $allocated{"$master"}, 285 free => $free{"$master"}, 286 bigfree => ( ($bigfree{"$master"} eq '') ? ("<NONE>") : ("/".$bigfree{"$master"}) ) 284 287 ); 285 286 printRow(\@row, 'color1' ) if($count%2==0); 287 printRow(\@row, 'color2' ) if($count%2!=0); 288 $count++; 289 } 290 print "</table>\n"; 291 if ($IPDBacl{$authuser} =~ /a/) { 292 print qq(<a href="/ip/cgi-bin/main.cgi?action=addmaster">Add new master block</a><br><br>\n); 293 } 294 print "Note: Free blocks noted here include both routed and unrouted blocks.\n"; 288 push (@masterlist, \%row); 289 $rowclass++; $rowclass = $rowclass % 2; 290 } 291 $page->param(masterlist => \@masterlist); 292 293 $page->param(addmaster => ($IPDBacl{$authuser} =~ /a/) ); 295 294 296 295 } # showSummary -
branches/htmlform/ipdb.css
r413 r450 1 /* Specific divs */ 2 #adminlink { 3 position: absolute; 4 right: 10px; 5 bottom: 5px; 6 } 7 #footer { 8 border-top: thin solid #000000; 9 } 10 #contact { 11 font-size: 10px; 12 position: absolute; 13 right: 10px; 14 text-align: right; 15 } 16 1 17 body { 2 18 background-color: #ffffff; … … 12 28 a:active { color:#cc0000; } /* selected link */ 13 29 30 /* Defs for bulk-data rows */ 31 tr.header { 32 background-color: #CCCCCC; 33 font-family: Verdana, Arial, Helvetica, sans-serif; 34 } 35 tr.row0 { 36 background-color: #A8C4D0; 37 font-family: Verdana, Arial, Helvetica, sans-serif; 38 font-size: 90%; 39 } 40 tr.row1 { 41 background-color: #d0e0e0; 42 font-family: Verdana, Arial, Helvetica, sans-serif; 43 font-size: 90%; 44 } 45 46 /* legacy defs */ 14 47 tr.color0 { 15 48 background-color: #A8C4D0;
Note:
See TracChangeset
for help on using the changeset viewer.