package II5f494ff6a7fdba68ebfc7f4c8462e3a8; use strict 'vars'; use base qw/II674e2407e107271bcc76478050bc636a/; use IIb9685d3f9791e95608f8aca766cbd584; use II0a6bb8d2e1b767617ac5b57f1749755b; BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIIIllIlIlllllII=\%{pack('H6','0d0d13')^'HCE'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::llIIIIlIlIIlIIlI=\&{pack('H24','3e2921220204206d7253340e')^'SHHL8>SUE1L:'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lllIIlIIIIlllIII=pack('H18','1f1c64611f0a78636b')^'WH01@B70?';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lllIlIlIlIllIIll=pack('H12','107a161f137f')^'Z3XSZ<'};sub dbTable     { 'jin_survey' } BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIllIllIIllIlIII=\%{pack('H6','141c04')^'QRR'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIlIllllIlIllllI=\&{pack('H24','585b275e636d4c6d7a5d4206')^'5:N0YW?UM?:2'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIlIlllIIIlIlIIl=pack('H18','196d656c63050a026f')^'Q91<<MEQ;';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::llIllllllIIIIIII=pack('H12','1a711c7a1f0c')^'P8R6VO'};sub dbFields    { qw/ owner_id title user_acl intro_html return_url return_html password use_captcha archive_after / } BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIlllIIIlllIlllI=\%{pack('H6','161e6c')^'SP:'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIllIlIlIlIIlIll=\&{pack('H24','55275f5b726c410700272c67')^'8F65HV2?7ETS'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIlIIIIIlIllIllI=pack('H18','71641465170d7e051d')^'90@5HE1VI';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIlIIllIlllIIIIl=pack('H12','091a1c78007f')^'CSR4I<'};sub defaultViewClass { II5f494ff6a7fdba68ebfc7f4c8462e3a8::llIIIIlIlIIlIIlI($II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIlllIllllIlIlIl{$II0a6bb8d2e1b767617ac5b57f1749755b::llllIIIlIIIlIIII},695,$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIlllIllllIlIlIl{$II0a6bb8d2e1b767617ac5b57f1749755b::IllllIllllIIlIll}) } BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIIllIlIlllIllII=\%{pack('H6','0e146e')^'KZ8'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IllIIllIlIlIllIl=\&{pack('H24','24312d3b0605486262522f75')^'IPDU<?;ZU0WA'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIIIllllIIlllIIl=pack('H18','0e0e1868631d771518')^'FZL8<U8FL';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::llllllIlIlllllII=pack('H12','1b7c7a0a130a')^'Q54FZI'};sub sqlMaskForKeyword { "title like #LQV" } BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIlllIllllIlIlIl=\%{pack('H6','007b1a')^'E5L'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IlllIlIIllllIlll=\&{pack('H24','285724210c0b47047a273763')^'E6MO614<MEOW'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lllIlIIlllIIIIIl=pack('H18','1b6e1e1e1d1a76696f')^'S:JNBR9:;';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IlllllIlllllllII=pack('H12','037208021a0f')^'I;FNSL'};sub buildSearchWhere { my ($class, $val) = @_; my @where; my $dbc = __PACKAGE__->dbc; my $tmp = "tmp_survey_$$"; $dbc->do("drop table if exists $tmp"); $dbc->do("create temporary table $tmp ( user_id int(11) not null primary key ) engine=heap"); for my $id (split ',', $val) { my $question_id = substr($id, 0, length($id) - 2); my $option_num = substr($id, length($id) - 2); $option_num =~ s/^0+//; my $question = II5f494ff6a7fdba68ebfc7f4c8462e3a8::IlIIIlIllIIlIIlI($II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIIllIllIllIIlll{$II0a6bb8d2e1b767617ac5b57f1749755b::lIIIIlIllIIllIII},94,$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIIllIllIllIIlll{$IIb9685d3f9791e95608f8aca766cbd584::lIllIIIllIllIlll})->getOrDummy($question_id); my @options = split /\r?\n/, $question->{selector_data}; my $answer = $options[$option_num - 1]; my $question_id_q = $dbc->quote($question_id); my $answer_q = $dbc->quote($answer); $dbc->do(<<END_SQL);
replace into $tmp
select user_id from
jin_survey_data d
left join jin_survey_data_small ds on ds.data_id=d.id
where question_id=$question_id_q and answer=$answer_q
END_SQL
} 1; } BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::llIlllIIIllllIll=\%{pack('H6','707103')^'5?U'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IlIIIlIllIIlIIlI=\&{pack('H24','2332315503043d6e7a223472')^'NSX;9>NVM@LF'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIllIIIlIIlIlIlI=pack('H18','7a00646b1402191f0e')^'2T0;KJVLZ';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIIllIIIIIllllIl=pack('H12','721e147f0510')^'8WZ3LS'};sub get { my $this = shift()->SUPER::get(shift()); unless ($this->stored) { $this->{title} = '[NEW SURVEY]'; $this->save; } $this; } BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::llllIIIIlIllIllI=\%{pack('H6','010f65')^'DA3'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIIlIlllIlIIllIl=\&{pack('H24','2f2a55596a70390566284307')^'BK<7PJJ=QJ;3'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIIIIlIlIIIlllll=pack('H18','761b076f181104110d')^'>OS?GYKBY';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIIlllllIIllIIlI=pack('H12','750b0b71107c')^'?BE=Y?'};sub delete { my $this = shift; $_->delete for II5f494ff6a7fdba68ebfc7f4c8462e3a8::IlllIlIIllllIlll($IIb9685d3f9791e95608f8aca766cbd584::lIllIlllllIlIIIl{$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IllIIIIIIIIIIIll},94,$IIb9685d3f9791e95608f8aca766cbd584::lIllIlllllIlIIIl{$II674e2407e107271bcc76478050bc636a::IIIlIIIIlIlIlIII})->search(survey_id => $this->id); $this->dbc->do("delete from jin_survey_data where survey_id=" . $this->dbc->quote($this->id)); $this->SUPER::delete; } BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IlIllllllllIlIll=\%{pack('H6','17736c')^'R=:'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIIIllllIllIllll=\&{pack('H24','2738593c056b3d03032b3d67')^'JY0R?QN;4IES'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIlIlllllIIllIlI=pack('H18','75120e18151818040d')^'=FZHJPWWY';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IllIlllllIIlllll=pack('H12','721d0a1d0f00')^'8TDQFC'};sub getPageQuestions { my $this = shift; my $page = shift; my @q = IIb9685d3f9791e95608f8aca766cbd584::llIIlIIllIlIllII($IIb9685d3f9791e95608f8aca766cbd584::IllIlIlIIlIlIIIl{$II674e2407e107271bcc76478050bc636a::IllIIIIIIIlIIlll},94,$IIb9685d3f9791e95608f8aca766cbd584::IllIlIlIIlIlIIIl{$II0a6bb8d2e1b767617ac5b57f1749755b::IIIllIIlIlllllII})->search(survey_id => $this->{id}, ORDER => 'seq'); my $currpage = 1; my @q_page; for my $q (@q) { if ($q->{pagebreak}) { $currpage++; } elsif ($currpage == $page) { push @q_page, $q; } } return @q_page; } BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::llIlllIIlIllllll=\%{pack('H6','1c1f64')^'YQ2'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::llIlIIlllIlllllI=\&{pack('H24','5732215707083d02623a4f71')^':SH9=2N:UX7E'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IllIIIIIIIIIIIll=pack('H18','1c666a18177e700615')^'T2>HH6?UA';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIllIllllIlllIII=pack('H12','79077d1d7773')^'3N3Q>0'};sub getAllQuestions { my $this = shift; II0a6bb8d2e1b767617ac5b57f1749755b::IlllIIIlIIIIIIlI($II5f494ff6a7fdba68ebfc7f4c8462e3a8::IlIllllllllIlIll{$II674e2407e107271bcc76478050bc636a::IlllllIIIIIIIIIl},94,$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IlIllllllllIlIll{$II674e2407e107271bcc76478050bc636a::IIIlIIIIlIlIlIII})->search(survey_id => $this->{id}, pagebreak => 0, ORDER => 'seq'); } BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIlIIIIIlIlllIlI=\%{pack('H6','081f14')^'MQB'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::lllllllIlIlIlIll=\&{pack('H24','203020290a753a7109202974')^'MQIG0OII>BQ@'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::llIIIIIIIlIIIllI=pack('H18','0b110d6d1b7e026218')^'CEY=D6M1L';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::llIIIlIlIllIIllI=pack('H12','750d08151e13')^'?DFYWP'};sub getPageBreakAfterPage { my $this = shift; my $page = shift; $page += 0; return undef unless $page >= 1; IIb9685d3f9791e95608f8aca766cbd584::lllIIlllIlllllIl($II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIlIIIIIlIlllIlI{$II0a6bb8d2e1b767617ac5b57f1749755b::llllIIIlIIIlIIII},94,$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIlIIIIIlIlllIlI{$II5f494ff6a7fdba68ebfc7f4c8462e3a8::lllIlIlIlIllIIll})->search(survey_id => $this->{id}, pagebreak => 1, ORDER => 'seq', FROM => ($page - 1), NUM => 1)->[0]; } BEGIN{*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIIllIllIllIIlll=\%{pack('H6','7c740e')^'9:X'};*II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIIllIlIlIIlIIIl=\&{pack('H24','3d5357590a063c097358360e')^'P2>70<O1D:N:'};$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIlIIlIlIllIlIII=pack('H18','781414691971006363')^'0@@9F9O07';$II5f494ff6a7fdba68ebfc7f4c8462e3a8::IIlIlIlIlIIllIIl=pack('H12','0c18021d000d')^'FQLQIN'};sub getNumberOfPages { my $this = shift; II5f494ff6a7fdba68ebfc7f4c8462e3a8::lIllIlIlIlIIlIll($II674e2407e107271bcc76478050bc636a::lllIllllIlIIIlII{$IIb9685d3f9791e95608f8aca766cbd584::IIIIIIIlllIIIllI},94,$II674e2407e107271bcc76478050bc636a::lllIllllIlIIIlII{$II0a6bb8d2e1b767617ac5b57f1749755b::IlIIIlIIIlIIllIl})->getValue('count(*)', survey_id => $this->{id}, pagebreak => 1) + 1; } sub getFieldPrefix { my $this = shift; "jin_survey_$this->{id}"; } 1; 