[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
CVS Update: gleipnir
- To: cvs@lists.cleannorth.org
- Subject: CVS Update: gleipnir
- From: Dan Brosemer <odin@cleannorth.org>
- Date: Sun, 13 Jul 2008 09:03:38 -0401 (EDT)
- List-help: <mailto:cvs-request@lists.cleannorth.org?subject=help>
- List-post: <mailto:cvs@lists.cleannorth.org>
- List-subscribe: <mailto:cvs-request@lists.cleannorth.org?subject=subscribe>
- List-unsubscribe: <mailto:cvs-request@lists.cleannorth.org?subject=unsubscribe>
- Resent-date: Sun, 13 Jul 2008 09:03:42 -0401 (EDT)
- Resent-from: cvs@lists.cleannorth.org
- Resent-message-id: <Tf2KsC.A.MUB.F1feIB@skroob.cleannorth.org>
- Resent-sender: cvs-request@lists.cleannorth.org
Log Message:
-----------
Add email picker. jdew@ didn't check it in and I need to start working on it so check it in now.
Added Files:
-----------
gleipnir/public_html/webmail:
emailpicker.pl
Revision Data
-------------
--- /dev/null
+++ public_html/webmail/emailpicker.pl
@@ -0,0 +1,76 @@
+#!/usr/bin/perl -w
+###############################################################################
+# emailpicker.pl email address picker tool
+# $Id: emailpicker.pl,v 1.1 2008/07/13 13:04:00 odin Exp $
+#
+# Copyright (C) 2005-2006 Jim Dew <jdew@yggdrasil.ca>
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+#
+# 1. Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+# 2. The name of the author may not be used to endorse or promote products
+# derived from this software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+# INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+# AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL
+# THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+#
+###############################################################################
+
+use strict;
+use Gleipnir;
+
+my $gleipnir = new Gleipnir;
+my $cgi = $gleipnir->cgi;
+
+unless ($gleipnir->access('validuser'))
+ {
+ $gleipnir->url('/auth.pl');
+ print $gleipnir->output;
+ exit;
+ }
+
+$gleipnir->showheader(0);
+$gleipnir = ShowPage(-gleipnir => $gleipnir);
+print $gleipnir->output;
+exit;
+
+sub ShowPage
+ {
+ my %options = @_;
+ my $gleipnir = $options{-gleipnir};
+ my $cgi = $gleipnir->cgi;
+ my $dbh = $gleipnir->dbh;
+
+ my $form = $cgi->param('form')||undef;
+ my $field = $cgi->param('field')||undef;
+
+ my $call = $gleipnir->rpc('addressbook_list');
+
+ #this is horrible
+ my @data = @$call;
+ for (my $i = 0; $i <= $#data; $i++)
+ {
+ $call->[$i]{form} = $form;
+ $call->[$i]{field} = $field;
+ }
+
+ #use Data::Dump;
+ #Data::Dump::dump($call);
+
+ my $template=$gleipnir->template('webmail/emailpicker');
+ $template->param(
+ call => $call,
+ );
+ return $gleipnir->body($template->output);
+ }
- Prev by Date: CVS Update: mystuff
- Next by Date: CVS Update: cleannorth.org
- Previous by thread: CVS Update: mystuff
- Next by thread: CVS Update: cleannorth.org
- Index(es):