| 1 |
296 |
ahitrov |
<html> |
| 2 |
|
|
<head> |
| 3 |
|
|
<title><% $profile->name %></title> |
| 4 |
|
|
% if ( ref $favicon && exists $favicon->{filename} ) { |
| 5 |
|
|
<link rel="SHORTCUT ICON" href="<% $favicon->{filename} %>"> |
| 6 |
|
|
% } |
| 7 |
|
|
% if ($state->development) { |
| 8 |
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
| 9 |
|
|
% } |
| 10 |
|
|
</head> |
| 11 |
|
|
<body bgcolor="000000" style="margin 0px; padding:0px; color: #ffffff" > |
| 12 |
|
|
<table height="100%" border="0" cellspacing="0" cellpadding="0" align="center"> |
| 13 |
|
|
<tr><td align="center" style="font: 13px Arial, Helvetica, sans-serif; color:#FFFFFF;" > |
| 14 |
|
|
% if ( ref $image ) { |
| 15 |
|
|
% my $img = $image->{"image_$num"}; |
| 16 |
|
|
% if ( exists $img->{filename} && $img->{filename} ) { |
| 17 |
|
|
|
| 18 |
|
|
|
| 19 |
|
|
|
| 20 |
|
|
<div><img |
| 21 |
|
|
src="<% $img->{filename} %>" width="<% $img->{width} %>" height="<% $img->{height} %>" style="border:#B0B0B0 1px solid;"></div> |
| 22 |
|
|
% } |
| 23 |
|
|
<div style="font-weight: bold; padding: 10px 0px;"> |
| 24 |
|
|
<% $img->{alt} %> |
| 25 |
|
|
</div> |
| 26 |
|
|
% } |
| 27 |
|
|
<td></tr> |
| 28 |
|
|
<tr><td align="center"> |
| 29 |
|
|
|
| 30 |
|
|
|
| 31 |
|
|
|
| 32 |
|
|
<div style="font: 13px Arial, Helvetica, sans-serif; color:#FFFFFF; padding-bottom: 10px;">Фото <b><% $num |h %></b> из <b><% $maxnumber %></b> |
| 33 |
|
|
% if ( $num > 1 ) { |
| 34 |
|
|
<a href="?id=<% $id %>&num=<% $num-1 %>&class=<% $class |h %>" style="color: #ffffff; text-decoration: none;">« предыдущая</a> |
| 35 |
|
|
% } |
| 36 |
|
|
|
| 37 |
|
|
% if ( $num < $maxnumber ) { |
| 38 |
|
|
<a href="?id=<% $id %>&num=<% $num+1 %>&class=<% $class |h %>" style="color: #ffffff; text-decoration: none;">следующая »</a> |
| 39 |
|
|
% } |
| 40 |
|
|
</div> |
| 41 |
|
|
% if ( $doc->class eq 'promosuite::Photorep' ) { |
| 42 |
|
|
<div style="font: 13px Arial, Helvetica, sans-serif; color:#FFFFFF; padding-bottom: 10px;">Фоторепортаж: <a href="./photo.html?id=<% $doc->id %>" target="_blank" |
| 43 |
|
|
onclick="window.close();" style="color:#00C6FF;"><% $doc->name %></a></div> |
| 44 |
|
|
% } |
| 45 |
|
|
</td></tr></table> |
| 46 |
|
|
</body> |
| 47 |
|
|
</html> |
| 48 |
|
|
<%args> |
| 49 |
|
|
|
| 50 |
|
|
$class => undef |
| 51 |
|
|
$id => undef |
| 52 |
|
|
$num => 1 |
| 53 |
|
|
|
| 54 |
|
|
</%args> |
| 55 |
|
|
<%init> |
| 56 |
|
|
|
| 57 |
|
|
my $prj = $request->{project}; |
| 58 |
|
|
my $profile = $request->{project_profile}; |
| 59 |
|
|
my $root = $request->{project_section}; |
| 60 |
|
|
my $favicon = $profile->get_image('favicon'); |
| 61 |
|
|
&abort404 unless $class && $class =~ /\w+::\w+/; |
| 62 |
|
|
&abort404 unless $id && $id =~ /^\d+$/; |
| 63 |
|
|
&abort404 unless $num && $num =~ /^\d+$/; |
| 64 |
|
|
|
| 65 |
|
|
my $doc = $keeper->get_document_by_id ( $id, |
| 66 |
|
|
class => $class, |
| 67 |
|
|
status => [1,2], |
| 68 |
|
|
); |
| 69 |
|
|
&abort404 unless ref $doc; |
| 70 |
|
|
my $image = $doc->get_image('pictures'); |
| 71 |
|
|
my $maxnumber = $image->{maxnumber}; |
| 72 |
|
|
&abort404 if $num > $maxnumber; |
| 73 |
|
|
|
| 74 |
|
|
</%init> |