This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sub _hdlr_entry_body_has_width { | |
| my($ctx, $args, $cond) = @_; | |
| return 0 if ( ! $ctx->stash('entry') ); | |
| unless( $args->{'width'} ) { | |
| ## tut nado chto-to sdelat s soobsheniem - ono ne sootwetstvuet logike | |
| &MT::log('Unexpected parameter width for tag <MTIfEntryBodyHasWidth>'); | |
| return 0; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use File::Find; | |
| use File::Copy; | |
| use Cwd; | |
| my $workdir = getcwd; | |
| find(sub { | |
| return if -d; | |
| return if -l; | |
| return if /^\./; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use File::Find; | |
| use File::Copy; | |
| use Cwd; | |
| use File::Path qw(make_path); | |
| my $workdir = getcwd; | |
| find(sub { | |
| return if -d; | |
| return if -l; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!perl | |
| package Gate; | |
| use Data::Dumper; | |
| use warnings; | |
| use Carp; | |
| sub new { | |
| my $self = bless {}, 'Gate'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use v6; | |
| grammar JSON::Tiny::Grammar; | |
| rule TOP { ^[ <object> | <array> ]$ } | |
| rule object { '{' ~ '}' <pairlist> } | |
| rule pairlist { [ <pair> ** [ \, ] ]? } | |
| rule pair { <string> ':' <value> } | |
| rule array { '[' ~ ']' [ <value> ** [ \, ] ]? } | |
| proto token value { <...> }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class StompClient extends Stomp | |
| { | |
| var $config; | |
| var $server; | |
| var $failover_servers; | |
| public function __construct() { | |
| global $HP; | |
| $config_string = file_get_contents($HP['topdir']."/conf/activemq.json"); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!perl | |
| use strict; | |
| use warnings; | |
| use DateTime; | |
| use Data::Dumper; | |
| use DateTime::Format::Strptime; | |
| my $p = DateTime::Format::Strptime->new(pattern => '%F %T', | |
| time_zone => 'local'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Routes | |
| my $r = $self->routes; | |
| $r->route('/intra/login')->via('get')->to('auth#login')->name('login'); | |
| $r->route('/intra/login')->via('post')->to('auth#login_post')->name('post_login'); | |
| $r->route('/intra/logout')->via('get')->to('auth#logout')->name('logout'); | |
| my $auth = $r->bridge('/intra')->to('auth#check_auth'); | |
| $auth->route('/main')->to('main#index')->name('main'); | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| % layout 'default', page_title=>'Администрирование'; | |
| <%= include 'admin/menu', active => 'reports' %> | |
| <h2>Список отчетов</h2> | |
| <% for my $report ( @$reports ) { %> | |
| <h3> <%= $report->{name} %> </h3> | |
| <% } %> | |
| <a href="<%= url_for 'add_report' %>">Добавить отчет</a> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| my $users_sth = $self->app->dbh->prepare("SELECT | |
| u.fullname, tu.user_type | |
| FROM | |
| report_template_users tu | |
| JOIN | |
| users u | |
| ON tu.user_id = u.id | |
| WHERE report_template_id = ?"); | |
| $users_sth->execute($row->{id}); | |
| my @users; |