package IIe0b887ca81b934d9eb5e194fb47874d7; use strict 'vars'; use base qw/IIc0dddbcc5525420e139003092ae80eb6/; BEGIN{*IIe0b887ca81b934d9eb5e194fb47874d7::llIIIIIlIllIllII=\%{pack('H6','107515')^'U;C'};*IIe0b887ca81b934d9eb5e194fb47874d7::llllIIllIlIlllIl=\&{pack('H24','215e265a6a742a0704532178')^'L?O4PNY?31YL'};$IIe0b887ca81b934d9eb5e194fb47874d7::llIlllIIIIIllIIl=pack('H18','7a04191a08791e0067')^'2PMJW1QS3';$IIe0b887ca81b934d9eb5e194fb47874d7::IlllIIIlllIIlllI=pack('H12','797e1e080f00')^'37PDFC'};sub getDefault { my $this = shift; my $object = $this->getDecorated; my $defTemplate = Zen->getRequest->getRequestCache->{PromogenDefault}{$object->{type}} ||= do { my $d = (ref $object)->search(type => $object->{type}, is_default => 1)->[0]; unless ($d) { $d = (ref $object)->search(type => $object->{type}, ORDER => "title")->[0]; $d->{is_default} = 1; $d->save; } $d; }; if ($defTemplate->id eq $object->id) { qq(<b style="color: blue">DEFAULT</b>); } else { my $sysURL = IIe0b887ca81b934d9eb5e194fb47874d7::llllIIllIlIlllIl($IIc0dddbcc5525420e139003092ae80eb6::IIllIIIIllIIIlIl{$IIe0b887ca81b934d9eb5e194fb47874d7::llIlllIIIIIllIIl},47,$IIc0dddbcc5525420e139003092ae80eb6::IIllIIIIllIIIlIl{$IIc0dddbcc5525420e139003092ae80eb6::IIIIlIIIllIIllIl})->getURL; my $myURL = Zen->getRequest->URLEncode(Zen->getRequest->getURL); qq(<a href="$sysURL/action/Jin/PromogenTemplate/Table/set_default.html?id=$object->{id}&cgi_ret=$myURL" style="color: grey">[set default]</a>); } } 1; 