#!/usr/bin/perl # MimerDesk # Web based groupware and eLearning environment # www.mimerdesk.org # # Copyright (C) 2001 Ionstream Ltd. # www.ionstream.fi # # This program is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the Free # Software Foundation; either version 2 of the License, or (at your option) # any later version. # # This program is distributed with a hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along # with this program; if not, write to the Free Software Foundation, Inc., # 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # $Id: popup.html,v 1.3 2002/06/06 14:58:02 inf Exp $ ########################################### # # # POPUP displayer # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # (c) Ionstream Oy 1999 - 2001 # # # # Programmed by: Teemu Arina # # # ########################################### use strict; use vars qw ($APPLICATION $ACTIVEGRP $ARTICLE $MONTH $USER $IP $LAST_ACT $FORWARDED $TIME_USED $IDLE $form $ref $sth); use lib::MimerDesk; use CGI::Carp "fatalsToBrowser"; sub display_notice_box; sub lue_help; ########### # Program # ########### read_config('../config/mimerdesk.cfg'); initialize(); $form = decode_multipart(); $form->{'ID'} =~ tr/0-9//cd; $form->{'auth'} =~ tr/0-9a-z//cd; if ($form->{'mode'} && $form->{'text'}) {display_notice_box();} elsif ($form->{'profile'}) { print "Content-Type: text/html\nPragma: No-cache\n\n"; print < Preview picture [$form->{'profile'}]
EOF } else { print_header('pragma'); print "Error!"; } ####################### # Display notice box # ####################### sub display_notice_box { my $mode = $form->{'mode'}; my $additional = $form->{'additional'}; my $text = $form->{'text'}; $text =~ s/\'//g; my $mode_picture = 'success2.gif' if $mode eq "notice"; my $mode_picture = 'failed.gif' if $mode eq "error"; my $helppi = lue_help($text); print_header('pragma'); print "\n"; print "\n"; print "$mode\n"; print "\n"; print "\n"; print "\n"; print "
\"Ok\"
"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "
"; print ""; print "\n"; print ""; print "\n"; print "\n"; print ""; print "\n"; print "
"; print "
"; print $helppi; if ($form->{'additional'}) { print "

\n"; print $form->{'additional'}; print "
\n"; } print "
\n"; print "
"; print "
nbsp();"; print "
\n"; print "\n"; print "\n"; db_end('disconnect'); exit; } ################## # Lue help file # ################## # sub lue_help { my(@current_help,$hdata,$helppi); lock_tables('READ', 'languagedata'); db_list("SELECT * FROM languagedata where ID = '$_[0]'"); while (my $ref = $sth->fetchrow_hashref()) {$hdata = $ref->{'EDATA'};} db_end(); unlock_tables(); @current_help = split /\n/, $hdata; foreach (@current_help) { s/\r\n//g; s/\n//g; s/\|/
\n/g; s/#//g; $helppi = join " ", @current_help; } return $helppi; }