package II9e72235cd9f2c242da2651d7239befbf; use strict 'vars'; use base qw/II3562149e53818b6637b38680e87ba918/; use II8744eb8e98a485e15ba13495b68a19a1; BEGIN{*II9e72235cd9f2c242da2651d7239befbf::IlIlllIIlIIllIll=\%{pack('H6','7f7f11')^':1G'};*II9e72235cd9f2c242da2651d7239befbf::IlIllIIllIlllllI=\&{pack('H24','2c5826207f6d227001323870')^'A9ONEWQH6P@D'};$II9e72235cd9f2c242da2651d7239befbf::IIIlIlIIlllIIIlI=pack('H18','010e1d14160f081e17')^'IZIDIGGMC';$II9e72235cd9f2c242da2651d7239befbf::lllIIIlllIIIlIll=pack('H12','7f09071c797f')^'5@IP0<'};sub fields    { qw/ approved ctime tag testimonial name email Image website_title website_url player youtube_id url preview / } BEGIN{*II9e72235cd9f2c242da2651d7239befbf::IIllIIllIlIlIIlI=\%{pack('H6','710561')^'4K7'};*II9e72235cd9f2c242da2651d7239befbf::lIIIlIlIIIllIIlI=\&{pack('H24','5e3b2a5c6f6049730658290e')^'3ZC2UZ:K1:Q:'};$II9e72235cd9f2c242da2651d7239befbf::IlllllIlIlIlIlIl=pack('H18','1c6a00141971166a69')^'T>TDF9Y9=';$II9e72235cd9f2c242da2651d7239befbf::IIlIIlIlIlIlIllI=pack('H12','750417721c7f')^'?MY>U<'};sub namesResourcePrefix { 'field.testimonial' } __PACKAGE__->standardHandler($_, $_ => 'checkbox') for qw/approved/; __PACKAGE__->standardHandler($_, $_ => 'datepopup') for qw/ctime/; __PACKAGE__->standardHandler($_, $_ => 'text(20)') for qw/tag/; __PACKAGE__->standardHandler($_, $_ => 'textarea(8, 80)') for qw/testimonial/; __PACKAGE__->standardHandler($_, $_ => 'conflist(select,lists::players::main)')	for qw/player/; __PACKAGE__->standardHandler($_, $_ => 'goth(/master/plugins/testimonials/frontend_item.html)') for qw/preview/; BEGIN{*II9e72235cd9f2c242da2651d7239befbf::lllllIllllIlIIII=\%{pack('H6','0e786e')^'K68'};*II9e72235cd9f2c242da2651d7239befbf::llllIIIllIllIlIl=\&{pack('H24','55275a25010d4369755d487f')^'8F3K;70QB?0K'};$II9e72235cd9f2c242da2651d7239befbf::llIlIIlIlIlIIIII=pack('H18','196d18661b1e1c1a61')^'Q9L6DVSI5';$II9e72235cd9f2c242da2651d7239befbf::IlIllIIlllIlIIII=pack('H12','060b72087779')^'LB<D>:'};sub getImage { my $this = shift; my $object = $this->getDecorated; my $f = 'Image'; my $pfx = $this->pfx; my $code = qq(<input type=file name="$pfx$f">); if ($object->{image}) { my $url = $object->getImageURL; $code .= qq(&nbsp;&nbsp; <a target=img_$object->{image} href="$url">); $code .= II8744eb8e98a485e15ba13495b68a19a1::lIIIIIIllIlIIllI($II9e72235cd9f2c242da2651d7239befbf::IllIllIIllIlllll{$II3562149e53818b6637b38680e87ba918::lIIIIllllIIlIIIl},991,$II9e72235cd9f2c242da2651d7239befbf::IllIllIIllIlllll{$II3562149e53818b6637b38680e87ba918::lIllIlIIIIIIIIII})->message('Show'); $code .= qq(</a>&nbsp;&nbsp; <input type=checkbox name=$pfx$f\_del value=1> ); $code .= II8744eb8e98a485e15ba13495b68a19a1::llIlllIIlllIlIIl($II9e72235cd9f2c242da2651d7239befbf::IIllIIllIlIlIIlI{$II8744eb8e98a485e15ba13495b68a19a1::IIIIllIIIlIIllII},991,$II9e72235cd9f2c242da2651d7239befbf::IIllIIllIlIlIIlI{$II8744eb8e98a485e15ba13495b68a19a1::llllIIlIllllIlIl})->message('Delete'); } $code .= "<br>"; $code; } BEGIN{*II9e72235cd9f2c242da2651d7239befbf::IllIllIIllIlllll=\%{pack('H6','087119')^'M?O'};*II9e72235cd9f2c242da2651d7239befbf::lllIIIlllIlIlIII=\&{pack('H24','2a233e5d7d69476164374004')^'GBW3GS4YSU80'};$II9e72235cd9f2c242da2651d7239befbf::IlIIIlIIlIIIllII=pack('H18','7c150c6f0d1d741a64')^'4AX?RU;I0';$II9e72235cd9f2c242da2651d7239befbf::IIlIllllllIlIlII=pack('H12','050e1b097c78')^'OGUE5;'};sub setImage { my ($this, $v) = @_; my $in = $this->getInput; my $object = $this->getDecorated; my $f = 'Image'; my $pfx = $this->pfx; my $dir = $object->getTestimonialDir; my $upload = $in->{"$pfx$f"}; my $hasNew = $upload && $upload->{data}; if ($in->{"$pfx$f\_del"} || $hasNew) { unlink "$ENV{DOCUMENT_ROOT}/$dir/$object->{image}"; $object->{image} = '' unless $hasNew; } return unless $hasNew; my ($ext) = $upload->{fname} =~ /(\.\w+)$/; my $fname = sprintf("%s/%s/%s%s", $ENV{DOCUMENT_ROOT}, $dir, $object->id, $ext); II9e72235cd9f2c242da2651d7239befbf::IlIllIIllIlllllI($II8744eb8e98a485e15ba13495b68a19a1::IllIlIlIIIlIIIII{$II8744eb8e98a485e15ba13495b68a19a1::IIIlllllIllllIII},1004,$II8744eb8e98a485e15ba13495b68a19a1::IllIlIlIIIlIIIII{$II9e72235cd9f2c242da2651d7239befbf::lllIIIlllIIIlIll})->makePath($fname); my $fh; open $fh, ">$fname" or die "failed to open [$fname]: $!"; binmode $fh; print $fh $upload->{data}; close $fh; $object->{image} = $object->id . $ext; return; } 1;