Revision 296 (by ahitrov, 2013/03/26 17:59:01) Promosite (anthill) project source
<html>
<head>
<title><% $profile->name %></title>
% if ( ref $favicon && exists $favicon->{filename} ) {
<link rel="SHORTCUT ICON" href="<% $favicon->{filename} %>">
% }
% if ($state->development) {
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
% }
</head>
<body bgcolor="000000" style="margin 0px; padding:0px; color: #ffffff" >
<table height="100%"  border="0" cellspacing="0" cellpadding="0" align="center">
<tr><td align="center" style="font: 13px Arial, Helvetica, sans-serif; color:#FFFFFF;" >
% if ( ref $image ) {
%       my $img = $image->{"image_$num"};
%       if ( exists $img->{filename} && $img->{filename} ) {



<div><img
 src="<% $img->{filename} %>" width="<% $img->{width} %>" height="<% $img->{height} %>" style="border:#B0B0B0 1px solid;"></div>
%	}
<div style="font-weight: bold; padding: 10px 0px;">
<% $img->{alt} %>
</div>
% }
<td></tr>
<tr><td  align="center">



<div style="font: 13px Arial, Helvetica, sans-serif; color:#FFFFFF; padding-bottom: 10px;">Фото <b><% $num |h %></b> из <b><% $maxnumber %></b>&nbsp;
% if ( $num > 1 ) {
<a href="?id=<% $id %>&num=<% $num-1 %>&class=<% $class |h %>" style="color: #ffffff; text-decoration: none;">&laquo;&nbsp;предыдущая</a>
% }
&nbsp;&nbsp;
% if ( $num < $maxnumber ) {
<a href="?id=<% $id %>&num=<% $num+1 %>&class=<% $class |h %>" style="color: #ffffff; text-decoration: none;">следующая&nbsp;&raquo;</a>
% }
</div>
% if ( $doc->class eq 'promosuite::Photorep' ) {
<div style="font: 13px Arial, Helvetica, sans-serif; color:#FFFFFF; padding-bottom: 10px;">Фоторепортаж: <a href="./photo.html?id=<% $doc->id %>" target="_blank"
 onclick="window.close();" style="color:#00C6FF;"><% $doc->name %></a></div>
% }
</td></tr></table>
</body>
</html>
<%args>

	$class	=> undef
        $id	=> undef
        $num	=> 1

</%args>
<%init>

  my $prj = $request->{project};
  my $profile = $request->{project_profile};
  my $root = $request->{project_section};
  my $favicon = $profile->get_image('favicon');
  &abort404	unless $class && $class =~ /\w+::\w+/;
  &abort404	unless $id && $id =~ /^\d+$/;
  &abort404	unless $num && $num =~ /^\d+$/;

  my $doc = $keeper->get_document_by_id ( $id,
		class	=> $class,
		status	=> [1,2],
	);
  &abort404	unless ref $doc;
  my $image = $doc->get_image('pictures');
  my $maxnumber = $image->{maxnumber};
  &abort404	if $num > $maxnumber;

</%init>