diff options
author | ivan <ivan> | 2007-12-04 20:51:51 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-12-04 20:51:51 +0000 |
commit | 948b8acdd4b9b3864342062d0c397a11f57c5700 (patch) | |
tree | 4d39e731e1a46f062a143d448793e6ffbd9d598c /httemplate/elements/select-otaker.html | |
parent | 76c7355b1f97f99b5a3f673cf72429761924ee31 (diff) |
add some time-worked reporting
Diffstat (limited to 'httemplate/elements/select-otaker.html')
-rw-r--r-- | httemplate/elements/select-otaker.html | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/httemplate/elements/select-otaker.html b/httemplate/elements/select-otaker.html new file mode 100644 index 000000000..2a689f39d --- /dev/null +++ b/httemplate/elements/select-otaker.html @@ -0,0 +1,27 @@ +<SELECT NAME="otaker"> + +% unless ( $opt{'multiple'} || $opt{'disable_empty'} ) { + <OPTION VALUE="">all</OPTION> +% } + +% foreach my $otaker ( @{ $opt{'otakers'} } ) { + <OPTION VALUE="<% $otaker %>"><% $otaker %></OPTION> +% } + +</SELECT> + +<%init> + +my %opt = @_; + +unless ( $opt{'otakers'} ) { + + my $sth = dbh->prepare("SELECT username FROM access_user". + " WHERE disabled = '' or disabled IS NULL") + or die dbh->errstr; + $sth->execute or die $sth->errstr; + $opt{'otakers'} = [ map { $_->[0] } @{$sth->fetchall_arrayref} ]; + +} + +</%init> |