<%args> $id => undef $display_set => 'eng' $image_id => undef

<% $company_image->{"description_$display_set"} %>
% if ($company_image->{"upload_user"}){ (Image uploaded by <% $company_image->{"upload_user"} %>) % }

 
<%init> ### Check for errors # This'll be passed to /db/common/error.mhtml if # required args are missing my @missing_args; # Required args push(@missing_args, 'id') unless ($id); push(@missing_args, 'display_set') unless ($display_set); # Call error.mhtml if we're missing something if (@missing_args) { $m->comp('/db/common/error.mhtml', errors => [ { description => 'Missing arguments', args => \@missing_args } ], display_set => $display_set ); } my $db = new HKMDB::Database; # Get image info my $company_image = $db->select( table => 'images', select => [ 'path', "description_$display_set", 'height', 'upload_user', 'width' ], keys => [ $image_id ] );