Added new collateral subsystem.
This commit is contained in:
parent
e229d9061c
commit
bf4fe76d96
9 changed files with 298 additions and 84 deletions
|
|
@ -11,20 +11,15 @@ package WebGUI::Macro::Thumbnail;
|
|||
#-------------------------------------------------------------------
|
||||
|
||||
use strict;
|
||||
use Tie::CPHash;
|
||||
use WebGUI::Attachment;
|
||||
use WebGUI::Collateral;
|
||||
use WebGUI::Macro;
|
||||
use WebGUI::Session;
|
||||
use WebGUI::SQL;
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
sub process {
|
||||
my (@param, %data, $image);
|
||||
tie %data, 'Tie::CPHash';
|
||||
@param = WebGUI::Macro::getParams($_[0]);
|
||||
%data = WebGUI::SQL->quickHash("select filename,collateralId from collateral where name='$param[0]'");
|
||||
$image = WebGUI::Attachment->new($data{filename},"images",$data{collateralId});
|
||||
return $image->getThumbnail;
|
||||
my @param = WebGUI::Macro::getParams($_[0]);
|
||||
my $collateral = WebGUI::Collateral->find($param[0]);
|
||||
return $collateral->getThumbnail;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue