- Timestamp:
- 09/10/09 17:41:30 (15 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/TODO
r9 r12 13 13 - throw garbage at it and see what sticks 14 14 - throw deliberately malformed data and see what sticks 15 - rDNS matching 16 - tag'n'warn records where forward and reverse are both supposed to be published 17 "here" - mainly prevents unneccessary record duplication -
trunk/dns.cgi
r11 r12 114 114 my ($count) = ($sth->fetchrow_array); 115 115 116 $page->param(ntot => $count); 117 $page->param(nfirst => 1); 118 $page->param(nlast => 10); 119 116 # fill the page-count and first-previous-next-last-all details 117 fill_pgcount($count,"records",domainName($dbh,$webvar{id})); 120 118 fill_fpnla($count); # should put some params on this sub... 121 122 ##fixme123 $page->param(domain => domainName($dbh,$webvar{id}));124 $page->param(id => $webvar{id});125 ##fixme126 119 127 120 $page->param(defrec => $webvar{defrec}); 128 121 if ($webvar{defrec} eq 'y') { 122 ##fixme: hardcoded group 129 123 showdomain('y',1); 130 124 } else { … … 278 272 if ($code eq 'OK') { 279 273 # redirect to dns.cgi?etc&page=reclist 280 print $q->redirect("");274 changepage(page => "reclist", id => $msg); 281 275 $page = HTML::Template->new(filename => "$templatedir/reclist.tmpl"); 282 276 showdomain(0,$msg); … … 454 448 455 449 450 sub fill_pgcount { 451 my $pgcount = shift; 452 my $pgtype = shift; 453 my $parent = shift; 454 455 $page->param(ntot => $pgcount); 456 $page->param(nfirst => (($offset eq 'all' ? 0 : $offset)*$perpage+1)); 457 $page->param(npglast => ($offset eq 'all' ? $pgcount : 458 ( (($offset+1)*$perpage) > $pgcount ? $pgcount : (($offset+1)*$perpage) ) 459 )); 460 $page->param(pgtype => $pgtype); 461 $page->param(parent => $parent); 462 } # end fill_pgcount() 463 464 456 465 sub listdomains { 457 466 my $sth = $dbh->prepare("select count(*) from domains"); … … 459 468 my ($count) = ($sth->fetchrow_array); 460 469 470 # fill page count and first-previous-next-last-all bits 471 ##fixme - hardcoded group bit 472 fill_pgcount($count,"domains","default group"); 461 473 fill_fpnla($count); 462 463 $page->param(ndomains => $count);464 $page->param(nstart => (($offset eq 'all' ? 0 : $offset)*$perpage+1));465 $page->param(npglast => ($offset eq 'all' ? $count :466 ( (($offset+1)*$perpage) > $count ? $count : (($offset+1)*$perpage) )467 ));468 474 469 475 ##fixme - group -
trunk/templates/domlist.tmpl
r7 r12 6 6 <table width="98%"> 7 7 <tr><td colspan=3 align=center>Domain list</td></tr> 8 <tr><td> Listing <TMPL_VAR NAME=nstart> - <TMPL_VAR NAME=npglast> of <TMPL_VAR NAME=ndomains> Domains</td>8 <tr><td><TMPL_INCLUDE NAME="pgcount.tmpl"></td> 9 9 <td> 10 10 <TMPL_IF navfirst><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=domlist&offset=0"><img src="images/frev.png" border=0>first</a><TMPL_ELSE><img src="images/frev.png" border=0>first</TMPL_IF> -
trunk/templates/reclist.tmpl
r3 r12 12 12 <tr class="darkrowheader"> 13 13 <td colspan> 14 Listing <TMPL_VAR NAME=nfirst> - <TMPL_VAR NAME=nlast> of <TMPL_VAR NAME=ntot> entries in <TMPL_VAR NAME=domain>14 <TMPL_INCLUDE NAME="pgcount.tmpl"> 15 15 </td> 16 16 <td align=center>
Note:
See TracChangeset
for help on using the changeset viewer.