From 7727ffc74dd19bc3dd2d7b5c2b44e892c2e63f5d Mon Sep 17 00:00:00 2001 From: x2001corpet Date: Sun, 15 Apr 2007 22:26:11 +0000 Subject: [PATCH] page des perdus de vue git-svn-id: svn+ssh://murphy/home/svn/platal/trunk@1701 839d8a87-29fc-0310-9880-83ba4fa771e5 --- modules/email.php | 15 ++++++++++++++- templates/admin/index.tpl | 2 ++ templates/emails/lost.tpl | 37 +++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 templates/emails/lost.tpl diff --git a/modules/email.php b/modules/email.php index f40ce86..59b08cc 100644 --- a/modules/email.php +++ b/modules/email.php @@ -32,7 +32,8 @@ class EmailModule extends PLModule 'emails/send' => $this->make_hook('send', AUTH_MDP), 'emails/antispam/submit' => $this->make_hook('submit', AUTH_COOKIE), - 'admin/emails/duplicated' => $this->make_hook('duplicated', AUTH_MDP, 'admin') + 'admin/emails/duplicated' => $this->make_hook('duplicated', AUTH_MDP, 'admin'), + 'admin/emails/lost' => $this->make_hook('lost', AUTH_MDP, 'admin'), ); } @@ -562,6 +563,18 @@ L'équipe d'administration "; $page->assign('doublon', $props); } } + function handler_lost(&$page, $action = 'list', $email = null) + { + $page->changeTpl('emails/lost.tpl'); + + $page->assign('lost_emails', XDB::iterator(' + SELECT u.user_id, a.alias + FROM auth_user_md5 AS u + INNER JOIN aliases AS a ON (a.id = u.user_id AND a.type = "a_vie") + LEFT JOIN emails AS e ON (u.user_id=e.uid AND FIND_IN_SET("active",e.flags)) + WHERE e.uid IS NULL AND u.deces = 0 + ORDER BY u.promo DESC, u.nom, u.prenom')); + } } // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: diff --git a/templates/admin/index.tpl b/templates/admin/index.tpl index 6763005..ef067d6 100644 --- a/templates/admin/index.tpl +++ b/templates/admin/index.tpl @@ -45,6 +45,8 @@   |   Doublons   |   + Perdus de vue +   |   IPs diff --git a/templates/emails/lost.tpl b/templates/emails/lost.tpl new file mode 100644 index 0000000..7e8c04e --- /dev/null +++ b/templates/emails/lost.tpl @@ -0,0 +1,37 @@ +{**************************************************************************} +{* *} +{* Copyright (C) 2003-2007 Polytechnique.org *} +{* http://opensource.polytechnique.org/ *} +{* *} +{* 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 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 *} +{* *} +{**************************************************************************} + +

Perdus de vue

+ +

Ces {$lost_emails->total()} camarades n'ont pas ou plus d'adresse email valides

+ + + + + + {iterate from=$lost_emails item="looser"} + + + {/iterate} +
Utilisateur
+ {$looser.alias} +
-- 2.1.4