package IId11ee70846c9e81cb4c97449d4e65c3c; use strict 'vars'; use base qw/II3562149e53818b6637b38680e87ba918/; use LWP::UserAgent; use IId5637b9360d1b37fe53e21dd377eae5a; BEGIN{*IId11ee70846c9e81cb4c97449d4e65c3c::IIllllIlIIIlIllI=\%{pack('H6','0d1c14')^'HRB'};*IId11ee70846c9e81cb4c97449d4e65c3c::lIIlllIllIlllIlI=\&{pack('H24','27285624040945737d2a2a73')^'JI?J>36KJHRG'};$IId11ee70846c9e81cb4c97449d4e65c3c::IllIllllIIIIlIIl=pack('H18','0517156864000d170c')^'MCA8;HBDX';$IId11ee70846c9e81cb4c97449d4e65c3c::lIIIIlllIIlllIlI=pack('H12','067f001b1b1b')^'L6NWRX'};sub fields    { qw/ title url secret_word user_id membership_id / } BEGIN{*IId11ee70846c9e81cb4c97449d4e65c3c::IIIlIllIllIlIIll=\%{pack('H6','1c7005')^'Y>S'};*IId11ee70846c9e81cb4c97449d4e65c3c::IIlIIlIIIllIlIll=\&{pack('H24','382629270903240003273d75')^'UG@I39W84EEA'};$IId11ee70846c9e81cb4c97449d4e65c3c::llIllllIlIllllIl=pack('H18','1d6c1a640576711219')^'U8N4Z>>AM';$IId11ee70846c9e81cb4c97449d4e65c3c::IllllIIllIlIlIIl=pack('H12','10097e160a70')^'Z@0ZC3'};sub required  { qw/title url/} BEGIN{*IId11ee70846c9e81cb4c97449d4e65c3c::lIIlIllIIIlIIIll=\%{pack('H6','1d7c1d')^'X2K'};*IId11ee70846c9e81cb4c97449d4e65c3c::lIlIlIlIlIIIlllI=\&{pack('H24','5f2926257b00430f782d406d')^'2HOKA:07OO8Y'};$IId11ee70846c9e81cb4c97449d4e65c3c::lIlIIIIllIIlIlll=pack('H18','1f196b6f0f731a0500')^'WM??P;UVT';$IId11ee70846c9e81cb4c97449d4e65c3c::llllIIIlIlIIIIll=pack('H12','0c0a1e191379')^'FCPUZ:'};sub namesResourcePrefix { 'field.bcastnews_feeder' } __PACKAGE__->standardHandler($_, $_ => 'text(30)') for qw/secret_word/; __PACKAGE__->standardHandler($_, $_ => 'linkerpro(single,linkers::user::main)') for qw/user_id/; __PACKAGE__->standardHandler($_, $_ => 'linkerpro(single,linkers::membership::main)') for qw/membership_id/; BEGIN{*IId11ee70846c9e81cb4c97449d4e65c3c::IlIIIlIlllIIllll=\%{pack('H6','051c14')^'@RB'};*IId11ee70846c9e81cb4c97449d4e65c3c::lllIlIIlIlIIllIl=\&{pack('H24','585354517801426070292070')^'52=?B;1XGKXD'};$IId11ee70846c9e81cb4c97449d4e65c3c::lllllllIIIIlIIIl=pack('H18','0b0e13190b18071603')^'CZGITPHEW';$IId11ee70846c9e81cb4c97449d4e65c3c::lllIIlllIllllIII=pack('H12','7d1f077f1b74')^'7VI3R7'};sub setUrl { my ($form, $v) = @_; my $in = $form->getInput; my $object = $form->getDecorated; $object->{url} = $v; if ($object->{url} !~ m|^https?://|) { $form->addError(__PACKAGE__->message('bcastnews_feeder.form.error.invalid_url')); } else { my $ua = LWP::UserAgent->new; $ua->timeout(10); $ua->env_proxy; $object->{url} =~ s|/$||; my $response = $ua->post("$object->{url}/action/Jin/Bcastnews/Web/check_feeder.html?secret_word=$in->{secret_word}"); if (! $response->is_success) { $form->addError(__PACKAGE__->message('bcastnews_feeder.form.error.problem_url', $response->status_line)); } elsif ($response->content eq 'invalid secret word') { $form->addError(__PACKAGE__->message('bcastnews_feeder.form.error.invalid_secret_word')); } elsif ($response->content ne 'OK') { $form->addError(__PACKAGE__->message('bcastnews_feeder.form.error.bcastnews_not_available', $v)); } } return; } 1; 