%#============================================================================ %# ePortal - WEB Based daily organizer %# Author - S.Rusakov %# %# Copyright (c) 2000-2003 Sergey Rusakov. All rights reserved. %# This program is free software; you can redistribute it %# and/or modify it under the same terms as Perl itself. %# %# %#---------------------------------------------------------------------------- %# %# Export all user's notepad as HTML file %# %#----------------------------------------------------------------------------

<% pick_lang(rus => "Записная книжка", eng => "Notepad") %>

<% pick_lang(rus => "Пользователь", eng => "User") %>: <% $ePortal->ShortUserName %>
<% pick_lang(rus => "Дата", eng => "Date") %>: <% scalar localtime %>

<% pick_lang(rus => "Оглавление", eng => "Table of contents") %>

<%perl> my @foldered; $m->flush_buffer; # # Show table of contents # my $folder = new ePortal::NotepadFolder; $folder->restore_all; while($folder->restore_next) { $m->out( CGI::b( $folder->title ) . "\n"); $m->flush_buffer; } # # Show messages not belongs to any folder # my $ntp = new ePortal::Notepad; $ntp->restore_all; my $other; while( $ntp->restore_next ) { next if grep $_ == $ntp->id, @foldered; $m->out("Прочее
\n") if $other; $m->flush_buffer; $m->out("
"); # # Show memos itself # $ntp = new ePortal::Notepad; $ntp->restore_all; while( $ntp->restore_next ) { my $txt = $ntp->memo; $txt =~ s/\n/
\n/go; $m->out("

id . "\">" . $ntp->title . "
\n"); $m->out( "$txt\n" ); $m->flush_buffer; } %#=== @metags attr ========================================================= <%attr> Title => {rus => "Записная книжка (HTML)", eng => "Notepad export"} Layout => 'Empty' %#=== @METAGS MenuItems ==================================================== <%method MenuItems><%perl> return [];