package II0c7f82b9d6296ca3516a350d7af5cd14; use strict 'vars'; use base qw/II3562149e53818b6637b38680e87ba918/; BEGIN{*II0c7f82b9d6296ca3516a350d7af5cd14::IlllIllIllIlIIll=\%{pack('H6','0f0607')^'JHQ'};*II0c7f82b9d6296ca3516a350d7af5cd14::IlllIlIIlllIIlIl=\&{pack('H24','3c372c3e6c08326264203406')^'QVEPV2AZSBL2'};$II0c7f82b9d6296ca3516a350d7af5cd14::IIlllIlIllllIlll=pack('H18','1c6a07090776091718')^'T>SYX>FDL';$II0c7f82b9d6296ca3516a350d7af5cd14::IlIIllllIllIIlll=pack('H12','021b7a71020b')^'HR4=KH'};sub fields    { qw/title plugin_name file/ } BEGIN{*II0c7f82b9d6296ca3516a350d7af5cd14::lllIIIlllIIIIlII=\%{pack('H6','07751f')^'B;I'};*II0c7f82b9d6296ca3516a350d7af5cd14::lIIlIIlllllIllll=\&{pack('H24','372e3e58726b3c7a0d274160')^'ZOW6HQOB:E9T'};$II0c7f82b9d6296ca3516a350d7af5cd14::IlllIlIlIlIIIlIl=pack('H18','0711176509710f6e01')^'OEC5V9@=U';$II0c7f82b9d6296ca3516a350d7af5cd14::IIlllIlIIIllIlIl=pack('H12','7e0102037008')^'4HLO9K'};sub required  { qw/title plugin_name file/ } BEGIN{*II0c7f82b9d6296ca3516a350d7af5cd14::llllIlIlIllIIllI=\%{pack('H6','15046c')^'PJ:'};*II0c7f82b9d6296ca3516a350d7af5cd14::llIIlIIIlIIllIlI=\&{pack('H24','54215f3a7d71237978253a65')^'9@6TGKPAOGBQ'};$II0c7f82b9d6296ca3516a350d7af5cd14::IlllIIlIlIlllIII=pack('H18','0e6915680a09171a67')^'F=A8UAXI3';$II0c7f82b9d6296ca3516a350d7af5cd14::lIIllllllIIlIIlI=pack('H12','04757b74070c')^'N<58NO'};sub namesResourcePrefix { 'field.wplicense' } __PACKAGE__->standardHandler($_, $_ => 'text(50)') for qw/title plugin_name/; BEGIN{*II0c7f82b9d6296ca3516a350d7af5cd14::llIIIlIlllllIIll=\%{pack('H6','047866')^'A60'};*II0c7f82b9d6296ca3516a350d7af5cd14::llIlIlIIllIIIIll=\&{pack('H24','2c333d26080b4d68652f4e08')^'ARTH21>PRM6<'};$II0c7f82b9d6296ca3516a350d7af5cd14::llIlIIIllllIIlll=pack('H18','7a0060070d087b1067')^'2T4WR@4C3';$II0c7f82b9d6296ca3516a350d7af5cd14::lIIllllIIIlIIIIl=pack('H12','7c737f190815')^'6:1UAV'};sub getFile { my $this = shift; my $f = 'file'; my $object = $this->getDecorated; '<br><b>' . __PACKAGE__->message('banner_item.form.message.upload_file') . '</b><br>' . II0c7f82b9d6296ca3516a350d7af5cd14::lIIlIIlllllIllll($II3562149e53818b6637b38680e87ba918::llIIlIIIllIIIlll{$II0c7f82b9d6296ca3516a350d7af5cd14::IIlllIlIllllIlll},991,$II3562149e53818b6637b38680e87ba918::llIIlIIIllIIIlll{$II3562149e53818b6637b38680e87ba918::IlIIIlIlIllIIIlI})->getFormElement($this, "$f\_upload", $object->id, $object->getPluginCfg) . '<b>' . __PACKAGE__->message('banner_item.form.message.specify_url') . '</b><br>' . sprintf('<input type="text" size="50" name="%s_url" value="%s">', $f, $object->{$f}); } BEGIN{*II0c7f82b9d6296ca3516a350d7af5cd14::IlllIlllllllIllI=\%{pack('H6','757764')^'092'};*II0c7f82b9d6296ca3516a350d7af5cd14::IlIlllIIIIIIlIll=\&{pack('H24','2e5d5d216c7333607c5c4a77')^'C<4OVI@XK>2C'};$II0c7f82b9d6296ca3516a350d7af5cd14::lIIIlIllIllIIIll=pack('H18','731f6f02057e746711')^';K;RZ6;4E';$II0c7f82b9d6296ca3516a350d7af5cd14::IlIIIlIlIllIIllI=pack('H12','1f7216030a72')^'U;XOC1'};sub setFile { my ($this, $v) = @_; my $in = $this->getInput; my $f = 'file'; my $object = $this->getDecorated; my $url = $v->{url}; $object->{$f} = $url; my $cfg = $object->getPluginCfg; II3562149e53818b6637b38680e87ba918::IIIlIllllllIlIIl($II3562149e53818b6637b38680e87ba918::IlIIIlIIIIIlIlIl{$II3562149e53818b6637b38680e87ba918::lllIllllIllllIIl},991,$II3562149e53818b6637b38680e87ba918::IlIIIlIIIIIlIlIl{$II0c7f82b9d6296ca3516a350d7af5cd14::IIlllIlIIIllIlIl})->setFormElement($this, "$f\_upload", $object->id, $cfg); my ($filename) = II8744eb8e98a485e15ba13495b68a19a1::get_files($cfg->{dir}, $object->id, 1); if($filename || ($v->{upload_1_del} && ! $object->changed($f))) { $object->{$f} = ''; return; } return unless $url; if ($url !~ m|^https?://| || $url =~ m![\s\t]!) { $this->addError(__PACKAGE__->message('banner_item.form.error.invalid_image_url', $url)); } else { my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; my $response = $ua->head($url); $this->addError(__PACKAGE__->message('banner_item.form.error.problem_image_url', $response->status_line)) unless $response->is_success; } return; } 1; 