% if ( $m->comp_exists ("/comps/$prj/header.msn") ) { <& "/comps/$prj/header.msn" &> % } else { <& "/comps/header.msn" &> % } % ### Правая колонка % ############################################### % ### /Правая колонка
%#

<% $voting->name %>

% if ( $voting->status == 2 ) {

<& /inc/text_format.msn, doc => $voting, field => 'finished' &>

% } elsif ( $ok ) {

<& /inc/text_format.msn, doc => $voting, field => 'submit' &>

% } else {

<& /inc/text_format.msn, doc => $voting, field => 'abstr' &>

% } % if ( !$ok && $voting->status == 1 ) { % if ( ref $quest && $quest->{question_amount} ) {
% my $i = 0; % foreach my $question ( @{ $quest->{questions} } ) {

<% ++$i %>. <& /inc/text_format.msn, doc => $voting, text => $question->{question} &>
% if ( $question->{amount} ) { % my $j = 0; % foreach my $choice ( @{ $question->{choices} } ) {
% } % } % } % }

% if ( ref $quest && $quest->{freefields_amount} ) { % my $i = 0; % foreach my $free ( @{ $quest->{freefields} } ) { % } % if ( $voting->status == 1 ) { % }
<% $free %>
% }

% }
% if ( $m->comp_exists ("/comps/$prj/right.msn") ) { <& "/comps/$prj/right.msn" &> % }else{ <& /comps/right.msn &> % }
% ### Футер % ############################################## % if ( $m->comp_exists ("/comps/$prj/footer.msn") ) { <& "/comps/$prj/footer.msn" &> % } else { <& "/comps/footer.msn" &> % } % ### /Футер %#
<% Dumper($quest) %>
<%args> $filled => undef $name => undef $phone => undef $email => undef $ok => undef <%init> my $prj = $request->{project}; my $profile = $request->{project_profile}; my $root = $request->{project_section}; my ($voting) = $keeper->get_documents ( s => $root->id, class => 'promosuite::Voting', status => [1,2], limit => 1, ); &abort404 unless ref $voting; my $quest = $voting->get_image('voting'); if ($filled) { $m->comp ( '/subs/count_results.msn', voting => $voting, quest => $quest, %ARGS ); $r->header_out("Location", "contest.html?ok=1"); $r->status(302); $r->send_http_header(); $m->abort(); }