Revision 296 (by ahitrov, 2013/03/26 17:59:01) |
Promosite (anthill) project source
|
% if ( $m->comp_exists ("/comps/$prj/header.msn") ) {
<& "/comps/$prj/header.msn" &>
% } else {
<& "/comps/header.msn" &>
% }
%### новости и видео
<table cellspacing="0" cellpadding="0" width="100%" border="0" style="margin-bottom: 20px;">
<tr><td width="4%"><div style="width: 10px; height: 1px"><spacer height="1" width="10" type="block"></div></td>
<td width="35%" valign="top">
%
% if ( $m->comp_exists ("/comps/$prj/block_news.msn") ) {
<& "/comps/$prj/block_news.msn" &>
% } else {
<& "/comps/block_news.msn" &>
% }
%
</td>
<td valign="top"><img src="/i/<% $prj %>/z.gif" width="15" height="1"></td>
% if ( ref $video ) {
<td width="57%" valign="top"><div style="width:530px; height:11px;"><spacer type="block"></div>
<div style="background:#333333; padding:5px 0px 5px 25px;" class="hdr"><a href="./video.html"><% $vsection->name %></a></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td colspan="3" style="border-left:#3C3C3C 1px solid; border-right:#3C3C3C 1px solid;">
<div style="margin:15px 10px 0px 10px; text-align:center;"><% $video->html %></div>
</td></tr>
<tr>
<td width="10%"><div style="background: url(/i/<% $prj %>/l_gr2.gif) no-repeat bottom left; height:17px;"><spacer type="block"></div></td>
<td width="80%"><div style="background: url(/i/<% $prj %>/b_gr2.gif) repeat-x; height:17px;"><spacer type="block"></div></td>
<td width="10%" align="right"><div style="background:url(/i/<% $prj %>/r_gr2.gif) no-repeat bottom right; height:17px;"><spacer type="block"></div></td>
</tr>
</table>
</td>
% }
<td width="4%"><div style="width: 10px; height: 1px"><spacer height="1" width="10" type="block"></div></td>
</tr>
</table>
%### cегодня и видеогалерея
<table cellspacing="0" cellpadding="0" width="100%" border="0">
<tr>
<td width="4%"><div style="width: 10px; height: 1px"><spacer height="1" width="10" type="block"></div></td>
<td width="35%" valign="top"><div style="width:328px; height:1px;"><spacer type="block"></div>
% ### Блок "сегодня"
% ##############################################
% if ( $m->comp_exists ("/comps/$prj/block_today_schedule.msn") ) {
<& "/comps/$prj/block_today_schedule.msn" &>
% } else {
<& "/comps/block_today_schedule.msn" &>
% }
% ### /Футер
</td>
<td valign="top" ><img src="/i/<% $prj %>/z.gif" width="15" height="1"></td>
<td width="57%" valign="top"><div style="width:530px; height:1px;"><spacer type="block"></div>
<div style="background:#333333; padding:5px 10px 5px 25px;" class="hdr"><a href="./video.html"><% $vsection->name %></a></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background:#5C5D62;">
<tr>
<td><div style="padding:0px 10px 0px 15px;">
<table border="0" cellspacing="0" cellpadding="10">
<tr><td>
% if ( $m->comp_exists ("/comps/$prj/block_rep_videos.msn") ) {
<& "/comps/$prj/block_rep_videos.msn", doc => $vsection, show => 'rubber', max => 10, visual => 4 &>
% } else {
<& "/comps/block_rep_photos.msn", doc => $vsection, show => 'rubber', max => 10, visual => 4 &>
% }
</td></tr>
</table>
<div style="padding-left:10px">
<a href="./video.html" class="txt"><b>Все видео »</b></a> </div></div></td>
</tr>
<tr>
<td><div style="background: url(/i/<% $prj %>/l_gr.gif) no-repeat bottom left; width:17px; height:17px; float: left;"><spacer type="block"></div>
<div style="background:url(/i/<% $prj %>/r_gr.gif) no-repeat bottom right; width:17px; height:17px; float: right;"><spacer type="block"></div></td>
</tr>
</table>
<div style="background:#333333; padding:5px 10px 5px 25px; margin-top:15px;" class="hdr"><a href="./photo.html"><% $psection->name %></a></div>
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="background:#5C5D62;">
<tr>
<td><div style="padding:0px 10px 0px 15px;">
<table border="0" cellspacing="0" cellpadding="10">
<tr><td>
% if ( $m->comp_exists ("/comps/$prj/block_rep_photos.msn") ) {
<& "/comps/$prj/block_rep_photos.msn", doc => $photorep, show => 'rubber', max => 10, visual => 4 &>
% } else {
<& "/comps/block_rep_photos.msn", doc => $photorep, show => 'rubber', max => 10, visual => 4 &>
% }
</td></tr>
</table>
<div style="padding-left:10px">
<a href="./photo.html" class="txt"><b>Все фото »</b></a></div></div></td>
</tr>
<tr>
<td><div style="background: url(/i/<% $prj %>/l_gr.gif) no-repeat bottom left; width:17px; height:17px; float: left;"><spacer type="block"></div>
<div style="background:url(/i/<% $prj %>/r_gr.gif) no-repeat bottom right; width:17px; height:17px; float: right;"><spacer type="block"></div></td>
</tr>
</table></td>
<td width="4%"><div style="width: 10px; height: 1px"><spacer height="1" width="10" type="block"></div></td>
</tr>
</table>
% ### Футер
% ##############################################
% if ( $m->comp_exists ("/comps/$prj/footer.msn") ) {
<& "/comps/$prj/footer.msn" &>
% } else {
<& "/comps/footer.msn" &>
% }
% ### /Футер
<%args>
$p => 1
$id => undef
</%args>
<%init>
my $prj = $request->{project};
my $profile = $request->{project_profile};
my $root = $request->{project_section};
&abort404 if $id && $id !~ /^\d+$/;
my $document;
my ($section) = $keeper->get_sections (
s => $root->id,
class => 'promosuite::AnnoSection',
limit => 1,
status => 1,
);
if ( $id && ref $section ) {
$document = $keeper->get_document_by_id ($id,
s => $section->id,
class => 'promosuite::Anons',
status => 1,
);
}
my ($psection) = $keeper->get_sections (
s => $root->id,
class => 'promosuite::MultimediaSection',
limit => 1,
status => 1,
);
my ($photorep) = $keeper->get_documents (
s => $psection->id,
class => 'promosuite::Photorep',
status => 1,
order => ['date', 'direct'],
limit => 1
);
$request->{photorep} = $photorep;
my ($vsection) = $keeper->get_sections (
s => $root->id,
class => 'promosuite::PromoSection',
limit => 1,
status => 1,
);
my ($video) = $keeper->get_documents (
s => $vsection->id,
class => 'promosuite::Promoblock',
status => 1,
order => ['date', 'direct'],
limit => 1,
);
</%init>