- Timestamp:
- 12/09/09 18:02:18 (15 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r43 r44 922 922 $sortorder = $webvar{order} if $webvar{order}; 923 923 924 if ($sortby eq 'domain') { 925 $page->param(domorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 926 $page->param(statorder => 'ASC'); 927 $page->param(grporder => 'ASC'); 928 $page->param(sortdomain => 1); 929 } elsif ($sortby eq 'status') { 930 $page->param(domorder => 'ASC'); 931 $page->param(statorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 932 $page->param(grporder => 'ASC'); 933 $page->param(sortstatus => 1); 934 } elsif ($sortby eq 'group') { 935 $page->param(domorder => 'ASC'); 936 $page->param(statorder => 'ASC'); 937 $page->param(grporder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 938 $page->param(sortgroup => 1); 939 } else { 940 $page->param(domorder => 'ASC'); 941 $page->param(statorder => 'ASC'); 942 $page->param(grporder => 'ASC'); 943 } 924 # set up the headers 925 my @cols = ('domain', 'status', 'group'); 926 my %colheads = (domain => 'Domain', status => 'Status', group => 'Group'); 927 fill_colheads(\@cols, \%colheads); 944 928 945 929 $page->param(sortorder => $sortorder); … … 1007 991 $sortorder = $webvar{order} if $webvar{order}; 1008 992 1009 if (0){ 1010 ##fixme: yick 1011 if ($sortby eq 'group') { 1012 $page->param(grporder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1013 $page->param(parentorder => 'ASC'); 1014 $page->param(nusersorder => 'ASC'); 1015 $page->param(ndomainsorder => 'ASC'); 1016 $page->param(sortgrp => 1); 1017 } elsif ($sortby eq 'parent') { 1018 $page->param(grporder => 'ASC'); 1019 $page->param(parentorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1020 $page->param(nusersorder => 'ASC'); 1021 $page->param(ndomainsorder => 'ASC'); 1022 $page->param(sortparent => 1); 1023 } elsif ($sortby eq 'nusers') { 1024 $page->param(grporder => 'ASC'); 1025 $page->param(parentorder => 'ASC'); 1026 $page->param(nusersorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1027 $page->param(ndomainsorder => 'ASC'); 1028 $page->param(sortnusers => 1); 1029 } elsif ($sortby eq 'ndomains') { 1030 $page->param(grporder => 'ASC'); 1031 $page->param(parentorder => 'ASC'); 1032 $page->param(nusersorder => 'ASC'); 1033 $page->param(ndomainsorder => ($sortorder eq 'ASC' ? 'DESC' : 'ASC')); 1034 $page->param(sortndomains => 1); 1035 } else { 1036 $page->param(grporder => 'ASC'); 1037 $page->param(parentorder => 'ASC'); 1038 $page->param(nusersorder => 'ASC'); 1039 $page->param(ndomainsorder => 'ASC'); 1040 } 1041 1042 $page->param(sortorder => $sortorder); 1043 } 1044 1045 my @cols = ('group','parent','nusers','ndomains'); 1046 1047 my %colnames = (group => 'Group', parent => 'Parent Group', nusers => 'Users', ndomains => 'Domains'); 1048 1049 fill_colheads(\@cols, \%colnames); 1050 1051 if (0) { 1052 my @headings; 1053 1054 $sortorder = $webvar{sortorder} if $webvar{sortorder}; 1055 foreach my $col (@cols) { 1056 my %coldata; 1057 $coldata{firstcol} = 1 if $col eq $cols[0]; 1058 $coldata{sid} = $sid; 1059 $coldata{page} = $webvar{page}; 1060 $coldata{offset} = $webvar{offset} if $webvar{offset}; 1061 $coldata{sortby} = $col; 1062 $coldata{colname} = $colnames{$col}; 1063 if ($col eq $sortby) { 1064 $coldata{order} = ($sortorder eq 'ASC' ? 'DESC' : 'ASC'); 1065 $coldata{sortorder} = $sortorder; 1066 } else { 1067 $coldata{order} = 'ASC'; 1068 } 1069 push @headings, \%coldata; 1070 } 1071 1072 $page->param(colheads => \@headings); 1073 1074 } # temp 993 # set up the headers 994 my @cols = ('group','parent','nusers','ndomains'); 995 my %colnames = (group => 'Group', parent => 'Parent Group', nusers => 'Users', ndomains => 'Domains'); 996 fill_colheads(\@cols, \%colnames); 1075 997 1076 998 my @grouplist; … … 1141 1063 fill_fpnla($count); 1142 1064 1065 $sortby = 'user'; 1066 # sort/order 1067 $sortby = $webvar{sortby} if $webvar{sortby}; 1068 $sortorder = $webvar{order} if $webvar{order}; 1069 1070 # set up the headers 1071 my @cols = ('user','fname','type','group','status'); 1072 my %colnames = (user => 'Username', fname => 'Full Name', type => 'Type', group => 'Group', status => 'Status'); 1073 fill_colheads(\@cols, \%colnames); 1074 1143 1075 my @userlist; 1144 1076 $sth = $dbh->prepare("SELECT u.user_id, u.username, u.firstname, u.lastname, u.type, g.group_name, u.status ". -
trunk/templates/domlist.tmpl
r41 r44 24 24 <table width="98%" border="0" cellspacing="4" cellpadding="3"> 25 25 <tr> 26 <td class="datahead_l"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=domlist&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=domain&order=<TMPL_VAR NAME=domorder>">Domain</a><TMPL_IF NAME=sortdomain> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 27 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=domlist&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=status&order=<TMPL_VAR NAME=statorder>">Status</a><TMPL_IF NAME=sortstatus> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 28 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=domlist&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=group&order=<TMPL_VAR NAME=grporder>">Group</a><TMPL_IF NAME=sortgroup> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 26 <TMPL_LOOP NAME=colheads> 27 <td class="datahead_<TMPL_IF firstcol>l<TMPL_ELSE>s</TMPL_IF>"><a href="dns.cgi?sid=<TMPL_VAR 28 NAME=sid>&page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&offset=<TMPL_VAR 29 NAME=offset></TMPL_IF>&sortby=<TMPL_VAR NAME=sortby>&order=<TMPL_VAR NAME=order>"><TMPL_VAR 30 NAME=colname></a><TMPL_IF NAME=sortorder> <img alt="<TMPL_VAR NAME=sortorder>" 31 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 32 </TMPL_LOOP> 29 33 <td class="datahead_s">Change Status</td> 30 34 <td class="datahead_s">Delete</td> -
trunk/templates/grpman.tmpl
r43 r44 24 24 <table width="98%" border="0" cellspacing="4" cellpadding="3"> 25 25 <tr> 26 <TMPL_IF foobarbaz>27 <td class="datahead_l"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF28 NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=group&order=<TMPL_VAR29 NAME=grporder>">Group</a><TMPL_IF NAME=sortgrp> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR30 NAME=sortorder>.png" /></TMPL_IF></td>31 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF32 NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=parent&order=<TMPL_VAR33 NAME=parentorder>">Parent Group</a><TMPL_IF NAME=sortparent> <img alt="<TMPL_VAR NAME=sortorder>"34 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td>35 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF36 NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=nusers&order=<TMPL_VAR37 NAME=nusersorder>">Users</a><TMPL_IF NAME=sortnusers> <img alt="<TMPL_VAR NAME=sortorder>"38 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td>39 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&<TMPL_IF40 NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=ndomains&order=<TMPL_VAR41 NAME=ndomainsorder>">Domains</a><TMPL_IF NAME=sortndomains> <img alt="<TMPL_VAR NAME=sortorder>"42 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td>43 <TMPL_ELSE>44 26 <TMPL_LOOP NAME=colheads> 45 <td class="datahead_<TMPL_IF firstcol>l<TMPL_ELSE>s</TMPL_IF>"><a href="dns.cgi?sid=<TMPL_VAR 46 NAME=sid>&page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&offset=<TMPL_VAR 47 NAME=offset></TMPL_IF>&sortby=<TMPL_VAR NAME=sortby>&order=<TMPL_VAR NAME=order>"><TMPL_VAR 48 NAME=colname></a><TMPL_IF NAME=sortorder> <img alt="<TMPL_VAR NAME=sortorder>" 49 src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 50 </TMPL_LOOP> 51 </TMPL_IF> 27 <td class="datahead_<TMPL_IF firstcol>l<TMPL_ELSE>s</TMPL_IF>"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&offset=<TMPL_VAR NAME=offset></TMPL_IF>&sortby=<TMPL_VAR NAME=sortby>&order=<TMPL_VAR NAME=order>"><TMPL_VAR NAME=colname></a><TMPL_IF NAME=sortorder> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td></TMPL_LOOP> 52 28 <td class="datahead_s">Delete</td> 53 29 </tr> … … 55 31 <TMPL_LOOP name=grouptable> 56 32 <tr class="row<TMPL_VAR name=bg>"> 57 <td ><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&action=chgroup&group=<TMPL_VAR NAME=groupid>"><TMPL_VAR NAME=groupname></a></td>33 <td align="left"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=grpman&action=chgroup&group=<TMPL_VAR NAME=groupid>"><TMPL_VAR NAME=groupname></a></td> 58 34 <td><TMPL_VAR name=pgroup></td> 59 35 <td><TMPL_VAR name=nusers></td> -
trunk/templates/useradmin.tmpl
r41 r44 24 24 <table width="98%" border="0" cellspacing="4" cellpadding="3"> 25 25 <tr> 26 <td class="datahead_l"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=useradmin&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=username&order=<TMPL_VAR NAME=userorder>">Username</a><TMPL_IF NAME=sortuser> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 27 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=useradmin&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=fullname&order=<TMPL_VAR NAME=fnameorder>">Full Name</a><TMPL_IF NAME=sortfname> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 28 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=useradmin&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=type&order=<TMPL_VAR NAME=typeorder>">Type</a><TMPL_IF NAME=sorttype> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 29 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=useradmin&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=group&order=<TMPL_VAR NAME=grouporder>">Group</a><TMPL_IF NAME=sortgroup> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 30 <td class="datahead_s"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=useradmin&<TMPL_IF NAME=offset>offset=<TMPL_VAR NAME=offset>&</TMPL_IF>sortby=status&order=<TMPL_VAR NAME=statusorder>">Full Name</a><TMPL_IF NAME=sortstatus> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td> 26 <TMPL_LOOP NAME=colheads> 27 <td class="datahead_<TMPL_IF firstcol>l<TMPL_ELSE>s</TMPL_IF>"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=<TMPL_VAR NAME=page><TMPL_IF NAME=offset>&offset=<TMPL_VAR NAME=offset></TMPL_IF>&sortby=<TMPL_VAR NAME=sortby>&order=<TMPL_VAR NAME=order>"><TMPL_VAR NAME=colname></a><TMPL_IF NAME=sortorder> <img alt="<TMPL_VAR NAME=sortorder>" src="images/<TMPL_VAR NAME=sortorder>.png" /></TMPL_IF></td></TMPL_LOOP> 31 28 <td class="datahead_s">Delete</td> 32 29 </tr> … … 34 31 <TMPL_LOOP name=usertable> 35 32 <tr class="row<TMPL_VAR name=bg>"> 36 <td ><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=userman&action=chuser&user=<TMPL_VAR NAME=userid>"><TMPL_VAR NAME=username></a></td>33 <td align="left"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=userman&action=chuser&user=<TMPL_VAR NAME=userid>"><TMPL_VAR NAME=username></a></td> 37 34 <td><TMPL_VAR name=userfull></td> 38 35 <td><TMPL_VAR name=usertype></td>
Note:
See TracChangeset
for help on using the changeset viewer.