#!/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: contact.html,v 1.3 2002/06/06 14:58:02 inf Exp $ ########################################### # # # MimerDesk: Contact site # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # (c) Ionstream Design AY 1999 - 2000 # # # # Programmed by: Teemu Arina # # # ########################################### # Asetukset ################################## use strict; use vars qw ($ACTIVEGRP $USER $IP $LAST_ACT @LANGUAGES %LANGUAGES $FORWARDED $TIME_USED $IDLE $form $ref $sth); use lib::MimerDesk; sub print_template; @LANGUAGES = qw(def sv en fi); %LANGUAGES = ( def => 'Default', sv => 'Svenska', en => 'English', fi => 'Suomi' ); # Program ################################## my ($MONTH,$YEAR); read_config('../config/mimerdesk.cfg'); initialize(); $form = decode_multipart(); $form->{'ID'} =~ tr/0-9//cd; $form->{'auth'} =~ tr/0-9a-z//cd; print_template('front_contact'); # Subs ################################## ################################## # Read template and process it # ################################## # 1. Print header # 2. Read template # 3. Do all normal replacements sub print_template { my ($fulltemplate); my ($template,$content) = @_; print_header('pragma'); $ref = get_template($template,$content); $fulltemplate = $ref->{$template}; ($ref->{$content}) = itag_replacer($ref->{$content}); lock_tables('READ','frontcontent'); my ($ref) = db_select("*","frontcontent", "ID = 'frontcontact'"); unlock_tables(); ($ref->{'EN_DATA'}) = itag_replacer($ref->{'EN_DATA'}); $fulltemplate =~ s/<>/$ref->{'EN_DATA'}/m; my $language = dropdownmenu(name => "language", order => \@LANGUAGES, default => 'def', values => \%LANGUAGES); $fulltemplate =~ s/<>/$language

/m; $fulltemplate = replace_tags($fulltemplate); print $fulltemplate; db_end('disconnect'); exit; }