% if ( $m->comp_exists ("/comps/$prj/header.msn") ) { <& "/comps/$prj/header.msn", alias => 'main' &> % } else { <& "/comps/header.msn", alias => 'main' &> % } <script type="text/javascript"> <!-- function reset_cookie ( nID ) { ra.cookie.set('card_id', nID, { secure: false, path: '/', expires: new Date (<% $expire->epoch.'000' %>) } ); } var flashvars = { basedir: '<% $basedir %>'\ % if ( $id && ref $document ) { , id: "<% $id %>" % } }; var params = { bgcolor: "#FFFFFF", allowScriptAccess: "always" }; swfobject.embedSWF("/i/<% $prj %>/swf/ice.swf", "myContent", "700", "550", "9.0.0", "/i/<% $prj %>/swf/expressInstall.swf",flashvars,params); //--> </script> <div id="myContent"> <h1 style="color:red;">Для просмотра открытки скачайте Flash плеер</h1> <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" border="0" /></a></p> </div> % ### Футер % ############################################## % if ( $m->comp_exists ("/comps/$prj/footer.msn") ) { <& "/comps/$prj/footer.msn" &> % } else { <& "/comps/footer.msn" &> % } % ### /Футер <%args> $id => undef </%args> <%init> &abort404 if $id && $id =~ /\D/; my $prj = $request->{project}; my $profile = $request->{project_profile}; my $root = $request->{project_section}; my %cookies = Apache::Cookie->fetch; my $cookie = $cookies{card_id}; my $expire = Contenido::DateTime->new->add( days => 7 ); # Вытаскиваем SID из куки # $id = $cookie->value() if !$id && $cookie; my $document; if ( $id ) { $document = $keeper->get_document_by_id ($id, class => 'promosuite::Postcard', ); &abort404 unless ref $document; } else { $r->header_out ('X-Accel-Expires', 0); $document = promosuite::Postcard->new ( $keeper ); $document->sections($root->id); $document->store; my $cookie = Apache::Cookie->new ($request->r(), -name => 'card_id', -expires=> '+7d', -value => $document->id, -path => '/', ); $cookie->bake(); } if ( $state->development ) { $r->content_type('text/html; charset=utf-8'); } else { $r->content_type('text/html; charset=utf-8'); } my $basedir = $state->development ? '/'.$prj : ''; </%init>