#!/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: chat_kirjoita.html,v 1.7 2002/06/14 23:37:37 inf Exp $ ########################################### # # # MimerDesk: I-Chat viestin lisääminen # # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # # (c) Ionstream Design AY 1999 - 2000 # # # # Programmed by: Teemu Vainio # # # ########################################### # Asetukset ################################## use strict; use vars qw ($APPLICATION $ACTIVEGRP $ARTICLE $MONTH $USER $IP $LAST_ACT $FORWARDED $TIME_USED $IDLE $form $ref $sth $nimi $trans); use lib::MimerDesk; use CGI::Carp "fatalsToBrowser"; sub lisaa_viesti; sub hae_kayttajat; sub channel_name; $APPLICATION = 'Communication - Chat'; ########### # Ohjelma # ########### # 1. Haetaan käyttäjälista privachattivalikkoa varten # 2. Lisää uusi viesti jos sellainen on kirjoitettu read_config('../config/mimerdesk.cfg'); initialize(); $form = decode_multipart(); $form->{'ID'} =~ tr/0-9//cd; $form->{'auth'} =~ tr/0-9a-z//cd; ($USER, $IP, $LAST_ACT, $FORWARDED, $TIME_USED, $IDLE, $ACTIVEGRP) = authenticate($form->{'ID'}, $form->{'auth'}, $form->{'changeGroup'}); $trans = lib::MimerDesk->new_gettext(program => 'chat_kirjoita',language => $config{'language'}); $APPLICATION = $trans->gettext('Communication - Chat'); my @users = hae_kayttajat(); lisaa_viesti($form->{'piilo'}) if $form->{'piilo'}; my $kayttajanappi; foreach(@users) {$kayttajanappi = $kayttajanappi."