- Timestamp:
- 01/15/10 14:52:28 (15 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/dns.cgi
r59 r60 247 247 } else { 248 248 showdomain('n',$webvar{id}); 249 $page->param(logdom => 1); 249 250 } 250 251 … … 709 710 ##fixme need to add bits to *create* log entries... 710 711 my $sql = "SELECT user_id, email, name, entry, date_trunc('second',stamp) FROM log WHERE "; 711 my $id = $curgroup; 712 if ($webvar{ltype} && $webvar{ltype} eq 'dom') { 712 my $id = $curgroup; # we do this because the group log may be called from (almost) any page, 713 # but the others are much more limited. this is probably non-optimal. 714 if ($werbvar{ltype} && $webvar{ltype} eq 'user') { 715 $sql .= "user_id=?"; 716 $id = $webvar{id}; 717 $page->param(logfor => 'user '.userFullName($dbh,$id)); 718 } elsif ($webvar{ltype} && $webvar{ltype} eq 'dom') { 713 719 $sql .= "domain_id=?"; 714 720 $id = $webvar{id}; 721 $page->param(logfor => 'domain '.domainName($dbh,$id)); 715 722 } else { 716 723 # Default to listing curgroup log 717 724 $sql .= "group_id=?"; 725 $page->param(logfor => 'group '.groupName($dbh,$id)); 718 726 } 719 727 my $sth = $dbh->prepare($sql); … … 722 730 while (my ($uid, $email, $name, $entry, $stamp) = $sth->fetchrow_array) { 723 731 my %row; 724 # (1,1,1,'test@test','Test','frobbed the whatsit',now());725 732 $row{userfname} = $name; 726 733 $row{userid} = $uid; … … 732 739 $page->param(logentries => \@logbits); 733 740 734 } 741 } # end $webvar{page} dance 735 742 736 743 -
trunk/templates/log.tmpl
r59 r60 7 7 <div id="datatablewrapper"> 8 8 9 <table border="0" width=" 70%">9 <table border="0" width="90%"> 10 10 <tr><th colspan="5" align="center">Log entries for <TMPL_VAR NAME=logfor></th></tr> 11 11 <tr class="darkrowheader"> -
trunk/templates/reclist.tmpl
r39 r60 38 38 <td colspan="4">Records</td> 39 39 <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=record&parentid=<TMPL_VAR NAME=id>&defrec=<TMPL_VAR NAME=defrec>&recact=new">Add record</a></td> 40 <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page= showlog&id=<TMPL_VAR NAME=id>&defrec=<TMPL_VAR NAME=defrec>">View log</a></td>40 <td align="right"><a href="dns.cgi?sid=<TMPL_VAR NAME=sid>&page=log&id=<TMPL_VAR NAME=id><TMPL_IF logdom>&ltype=dom</TMPL_IF>">View log</a></td> 41 41 </tr> 42 42
Note:
See TracChangeset
for help on using the changeset viewer.