X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=licom.cgi;h=78270c8c2017e23b6f4d9f3c9fa7d5d40ed12023;hb=8c9104d144ad4aa72e0d97be057189bbcd7ac832;hp=2e46d19bedd65ddd6ea16efafb6fccc63c9b68da;hpb=0bfd28f200d96adda48e595db0b85a534cc03c8b;p=licom.git diff --git a/licom.cgi b/licom.cgi index 2e46d19..78270c8 100755 --- a/licom.cgi +++ b/licom.cgi @@ -1,5 +1,21 @@ #!/usr/bin/perl +# LiCoM - Lightweight contact manager +# Copyright (c) 2005-2006 Florian octo Forster +# +# 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; only version 2 of the License is applicable. +# +# This program is distributed in the 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 + use strict; use warnings; use lib (qw(lib)); @@ -7,7 +23,7 @@ use lib (qw(lib)); use CGI (':cgi'); use CGI::Carp (qw(fatalsToBrowser)); use URI::Escape; -use Data::Dumper; +use HTML::Entities (qw(encode_entities)); use LiCoM::Config (qw(get_config set_config read_config)); use LiCoM::Connection (); @@ -47,7 +63,9 @@ our %Actions = verify => [\&html_start, \&action_verify, \&html_end], delete => [\&html_start, \&action_ask_del, \&html_end], expunge => [\&html_start, \&action_do_del, \&html_end], - vcard => \&action_vcard + vcard => \&action_vcard, + edit_group => [\&html_start, \&action_edit_group, \&html_end], + save_group => [\&html_start, \&action_save_group, \&html_end] ); read_config (); @@ -82,7 +100,7 @@ if (!$UserCN) if (!defined ($Actions{$Action})) { - die; + die ("No such action: $Action"); } if (ref ($Actions{$Action}) eq 'CODE') @@ -113,18 +131,21 @@ sub action_browse { my @groups = LiCoM::Group->all (); - print qq(\t\t

Contact Groups

\n\t\t