« auto/share/dist/Nes/cgi-bin/obj/session.pl
↑ Summary
auto/share/dist/Nes/cgi-bin/plugin/debug_info.pl »
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | # ------------------------------------------------------------------------------ | ||
| 4 | # | ||
| 5 | # NES by - Skriptke | ||
| 6 | # Copyright 2009 - 2010 Enrique F. Castañón | ||
| 7 | # Licensed under the GNU GPL. | ||
| 8 | # http://nes.sourceforge.net/ | ||
| 9 | # | ||
| 10 | # Version 0.9 pre | ||
| 11 | # | ||
| 12 | # captcha.pl | ||
| 13 | # | ||
| 14 | # ------------------------------------------------------------------------------ | ||
| 15 | |||
| 16 | use strict; | ||
| 17 | use Nes; | ||
| 18 | use captcha_plugin; | ||
| 19 | |||
| 20 | my $nes = Nes::Singleton->new(); | ||
| 21 | |||
| 22 | my $out = $nes->{'container'}->get_out_content(); | ||
| 23 | my $captcha = nes_captcha_plugin->new($out); | ||
| 24 | |||
| 25 | $nes->{'container'}->set_out_content( $captcha->go() ); | ||
| 26 | |||
| 27 | my $nes_tags = {}; | ||
| 28 | $nes_tags->{'this_plugin'} = 'captcha_plugin'; | ||
| 29 | |||
| 30 | foreach my $name ( keys %{$captcha->{'captcha'}} ) { | ||
| 31 | $captcha->{'captcha'}{$name}->verify(); | ||
| 32 | } | ||
| 33 | |||
| 34 | $nes->{'container'}->add_tags(%$nes_tags); | ||
| 35 | |||
| 36 | # don't forget to return a true value from the file | ||
| 37 | 1; | ||
| 38 |