%#============================================================================ %# ePortal - WEB Based daily organizer %# Author - S.Rusakov %# %# Copyright (c) 2000-2004 Sergey Rusakov. All rights reserved. %# This program is open source software %# %# %#---------------------------------------------------------------------------- %# Parameters: %# link - ID of ePortal::Catalog object to download %# todisk - true to force "Save as" dialog %#---------------------------------------------------------------------------- <& /message.mc &> <% plink(pick_lang(rus => "Вернуться в каталог", eng => "Back to Catalogue"), -href => href("index.htm", group => $c->parent_id)) %>

<% $body %>

<% plink(pick_lang(rus => "Вернуться в каталог", eng => "Back to Catalogue"), -href => href("index.htm", group => $c->parent_id)) %>

%#=== @metags onStartRequest ==================================================== <%method onStartRequest><%perl> $link = $ARGS{link}; if ( $link ) { $c = new ePortal::Catalog; if ( ! $c->restore($link) ) { $session{ErrorMessage} = pick_lang( rus => "Указанный ресурс не найден", eng => "Resource not found"); return; } if ( $c->RecordType eq 'textHTML' ) { $body = filter_html(' ' . $c->Text); } elsif ( $c->RecordType eq 'textpara' ) { $body = $c->Text; $body =~ s/\r?\n\r?\n/

\n/g; } elsif ( $c->RecordType eq 'textline' ) { $body = $c->Text; $body =~ s/\r?\n/

\n/g; } elsif ( $c->RecordType eq 'text' ) { $body = "\n

\n" . $c->Text . "\n
\n"; } else { die "Unknown RecordType"; } } %#=== @METAGS once ========================================================= <%once> my ($link, $c, $body) = ();