package IIdb07a20cc2e4142773a9139bbfd08ac2; use base qw/II720d6e18aa34327713eb014408fc9144/; use strict 'vars'; use POSIX qw/strftime/; use IIa7e18da9a1870a23e5d1573a274b9cd7; use II4809bb754250d5277423b6cba6d98f24; use IIf6c7e28bdd48eb29efc7b9362c0037a2; use II1d17f4bae0cdcee9878216ee8bd5ec5d; BEGIN{*IIdb07a20cc2e4142773a9139bbfd08ac2::lIlIIIllIllIIIIl=\%{pack('H6','1d7363')^'X=5'};*IIdb07a20cc2e4142773a9139bbfd08ac2::IlIlIIIlIllIlIll=\&{pack('H24','3b575659047a480f78532174')^'V6?7>@;7O1Y@'};$IIdb07a20cc2e4142773a9139bbfd08ac2::IlIlllIIIlIllIlI=pack('H18','751b19660978710518')^'=OM6V0>VL';$IIdb07a20cc2e4142773a9139bbfd08ac2::IIIIllIIlllIIIll=pack('H12','717c74710405')^';5:=MF'};sub act_get_image { my $class = shift; my $request = Zen->getRequest; my $in = $request->getInput; II720d6e18aa34327713eb014408fc9144::llllllIIIlIIlIlI($II4809bb754250d5277423b6cba6d98f24::IlllIIllIllIIIlI{$II720d6e18aa34327713eb014408fc9144::IlllllIlIIIIlIll},1005,$II4809bb754250d5277423b6cba6d98f24::IlllIIllIllIIIlI{$IIdb07a20cc2e4142773a9139bbfd08ac2::IIIIllIIlllIIIll})->true(($in->{cert_id} && $in->{user_id}), 'invalid link'); my $cert = II720d6e18aa34327713eb014408fc9144::IlllIllllIllIIIl($II4809bb754250d5277423b6cba6d98f24::IllIlIIllIllllIl{$IIf6c7e28bdd48eb29efc7b9362c0037a2::lIIllIIlllIIllII},140,$II4809bb754250d5277423b6cba6d98f24::IllIlIIllIllllIl{$IIf6c7e28bdd48eb29efc7b9362c0037a2::IIllIIIIIIllllII})->get($in->{cert_id}); my $user = IIf6c7e28bdd48eb29efc7b9362c0037a2::IIIlIlIlIIIllllI($II4809bb754250d5277423b6cba6d98f24::IllllllllllllIll{$IIa7e18da9a1870a23e5d1573a274b9cd7::IlIlIIllIIIlIIIl},114,$II4809bb754250d5277423b6cba6d98f24::IllllllllllllIll{$II4809bb754250d5277423b6cba6d98f24::lIlIlIlIIlIIIllI})->get($in->{user_id}); my $certified = IIa7e18da9a1870a23e5d1573a274b9cd7::IlIIlIIIlIlIlIll($II4809bb754250d5277423b6cba6d98f24::IlIlIllIlIIlIllI{$IIa7e18da9a1870a23e5d1573a274b9cd7::IlIlIIllIIIlIIIl},162,$II4809bb754250d5277423b6cba6d98f24::IlIlIllIlIIlIllI{$IIa7e18da9a1870a23e5d1573a274b9cd7::lIlIlIIIlIIIIIIl})->enum(validForUser => $user->{id}, id => $cert->{membership_id}, NUM => 1)->[0] ? 1 : 0; my $gd = $cert->getGD; $gd->trueColor(1); my $image = new $gd($cert->getImageFilename($certified)) || die; if ($certified) { $image->string(_get_gd_font($cert->{id_font}), $cert->{id_x}, $cert->{id_y}, $user->{id}, $image->colorResolve(_get_gd_color($cert->{id_color}))); $image->string(_get_gd_font($cert->{date_font}), $cert->{date_x}, $cert->{date_y}, strftime($cert->{date_format}, localtime), $image->colorResolve(_get_gd_color($cert->{date_color}))); $image->string(_get_gd_font($cert->{name_font}), $cert->{name_x}, $cert->{name_y}, $user->{name}, $image->colorResolve(_get_gd_color($cert->{name_color}))); } $request->printHeader('image/gif'); print $image->gif; return; } BEGIN{*IIdb07a20cc2e4142773a9139bbfd08ac2::IlIIIIlIllllIlll=\%{pack('H6','021c19')^'GRO'};*IIdb07a20cc2e4142773a9139bbfd08ac2::IllllIIlIllllIII=\&{pack('H24','2f283c5b000324047c283c71')^'BIU5:9W<KJDE'};$IIdb07a20cc2e4142773a9139bbfd08ac2::llllllIlllIIIlIl=pack('H18','0d0417126875721a0e')^'EPCB7==IZ';$IIdb07a20cc2e4142773a9139bbfd08ac2::lIlIIIIIllIIllII=pack('H12','07101e0b180e')^'MYPGQM'};sub _get_gd_color { my $color = shift; $color =~ s!^\#!!; map { hex substr($color, $_, 2) } (0, 2, 4); } BEGIN{*IIdb07a20cc2e4142773a9139bbfd08ac2::lIIllllIllIIIIII=\%{pack('H6','020b13')^'GEE'};*IIdb07a20cc2e4142773a9139bbfd08ac2::IIIIlllIIIlIlIlI=\&{pack('H24','21252255787a3f0e6d223671')^'LDK;B@L6Z@NE'};$IIdb07a20cc2e4142773a9139bbfd08ac2::lllllIIllIllIlll=pack('H18','1901186a190d7a6a0d')^'QUL:FE59Y';$IIdb07a20cc2e4142773a9139bbfd08ac2::IllIlllllIIIIIll=pack('H12','127403021a09')^'X=MNSJ'};sub _get_gd_font { my $font = shift; $font == 1 ? GD->gdGiantFont : $font == 2 ? GD->gdLargeFont : $font == 3 ? GD->gdMediumBoldFont : $font == 4 ? GD->gdSmallFont : GD->gdTinyFont; } 1; 