Changeset 42 for trunk/dns.cgi
- Timestamp:
- 12/07/09 17:33:42 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r41 r42 656 656 $page->param(grptree => $tmpgrplist); 657 657 658 $page->param(inlogingrp => $curgroup == $logingroup); 659 658 660 # stuff for menu group change. nb: this is icky. 659 661 fill_grouplist("grouplist"); … … 664 666 $tmp_ruri =~ s/\&action=[^&]+//g; 665 667 # and any bits from the "starts with" letter block - (ab)using this widget 666 # to fill the bulk of the URI so the template doesn't grow to insanity668 # to fill the bulk of the URI so various templates don't grow to insanity 667 669 $tmp_ruri =~ s/\&startwith=[a-z09-]+//g; 668 670 # $page->param(whereami => $ENV{REQUEST_URI}); … … 999 1001 fill_fpnla($count); 1000 1002 1003 $sortby = 'group'; 1004 # sort/order 1005 $sortby = $webvar{sortby} if $webvar{sortby}; 1006 $sortorder = $webvar{order} if $webvar{order}; 1007 1008 if (0){ 1009 ##fixme: yick 1010 if ($sortby eq 'group') { 1011 $page->param(grporder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1012 $page->param(parentorder => 'ASC'); 1013 $page->param(nusersorder => 'ASC'); 1014 $page->param(ndomainsorder => 'ASC'); 1015 $page->param(sortgrp => 1); 1016 } elsif ($sortby eq 'parent') { 1017 $page->param(grporder => 'ASC'); 1018 $page->param(parentorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1019 $page->param(nusersorder => 'ASC'); 1020 $page->param(ndomainsorder => 'ASC'); 1021 $page->param(sortparent => 1); 1022 } elsif ($sortby eq 'nusers') { 1023 $page->param(grporder => 'ASC'); 1024 $page->param(parentorder => 'ASC'); 1025 $page->param(nusersorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1026 $page->param(ndomainsorder => 'ASC'); 1027 $page->param(sortnusers => 1); 1028 } elsif ($sortby eq 'ndomains') { 1029 $page->param(grporder => 'ASC'); 1030 $page->param(parentorder => 'ASC'); 1031 $page->param(nusersorder => 'ASC'); 1032 $page->param(ndomainsorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1033 $page->param(sortndomains => 1); 1034 } else { 1035 $page->param(grporder => 'ASC'); 1036 $page->param(parentorder => 'ASC'); 1037 $page->param(nusersorder => 'ASC'); 1038 $page->param(ndomainsorder => 'ASC'); 1039 } 1040 1041 $page->param(sortorder => $sortorder); 1042 } 1043 1044 my @cols = ('group','parent','nusers','ndomains'); 1045 1046 my @headings; 1047 1048 $sortorder = $webvar{sortorder} if $webvar{sortorder}; 1049 foreach my $colhead (@cols) { 1050 my %coldata; 1051 $coldata{firstcol} = 1 if $colhead eq $cols[0]; 1052 $coldata{sid} = $sid; 1053 $coldata{page} = $webvar{page}; 1054 $coldata{offset} = $webvar{offset} if $webvar{offset}; 1055 $coldata{sortby} = $colhead; 1056 if ($colhead eq $sortby) { 1057 push @debugbits, "$colhead $sortby $sortorder<br>\n"; 1058 $coldata{order} = ($sortorder eq 'ASC' ? 'DESC' : 'ASC'); 1059 $coldata{sortorder} = $sortorder; 1060 } else { 1061 $coldata{order} = 'ASC'; 1062 } 1063 push @headings, \%coldata; 1064 } 1065 1066 $page->param(colheads => \@headings); 1067 1001 1068 my @grouplist; 1002 1069 $sth = $dbh->prepare("SELECT g.group_id, g.group_name, g2.group_name, ".
Note:
See TracChangeset
for help on using the changeset viewer.