« auto/share/dist/Nes/cgi-bin/plugin/captcha.pl
↑ Summary
auto/share/dist/Nes/cgi-bin/plugin/filter_demo.pl »
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | # ----------------------------------------------------------------------------- | ||
| 4 | # | ||
| 5 | # Nes by Skriptke | ||
| 6 | # Copyright 2009 - 2010 Enrique Castañón | ||
| 7 | # Licensed under the GNU GPL. | ||
| 8 | # | ||
| 9 | # CPAN: | ||
| 10 | # http://search.cpan.org/dist/Nes/ | ||
| 11 | # | ||
| 12 | # Sample: | ||
| 13 | # http://nes.sourceforge.net/ | ||
| 14 | # | ||
| 15 | # Repository: | ||
| 16 | # http://github.com/Skriptke/nes | ||
| 17 | # | ||
| 18 | # Version 1.03 | ||
| 19 | # | ||
| 20 | # debug_info.pl | ||
| 21 | # | ||
| 22 | # ----------------------------------------------------------------------------- | ||
| 23 | |||
| 24 | use strict; | ||
| 25 | use warnings; | ||
| 26 | use debug_info; | ||
| 27 | |||
| 28 | my $nes = Nes::Singleton->new(); | ||
| 29 | my $info = debug_info->new($nes->{'container'}); | ||
| 30 | my $container = $nes->{'container'}; | ||
| 31 | my $config = $nes->{'CFG'}; | ||
| 32 | |||
| 33 | return 1 if $nes->{'top_container'}->get_nes_env('nes_remote_ip') !~ /^$config->{'debug_info_only_from_ip'}/; | ||
| 34 | |||
| 35 | $info->add(); | ||
| 36 | |||
| 37 | if ( $nes->{'container'} eq $nes->{'top_container'}->{'container'} && $config->{'debug_info_show_in_out'} ) { | ||
| 38 | |||
| 39 | $nes->{'container'}->set_out_content( $container->get_out_content.$info->{'out'} ); | ||
| 40 | $info->del_instance(); | ||
| 41 | |||
| 42 | } | ||
| 43 | |||
| 44 | # don't forget to return a true value from the file | ||
| 45 | 1; | ||
| 46 |