Subversion Repositories Sites.tela-botanica.org

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 david 1
<?php
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */
3
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
8
// | This library is free software; you can redistribute it and/or                                        |
9
// | modify it under the terms of the GNU Lesser General Public                                           |
10
// | License as published by the Free Software Foundation; either                                         |
11
// | version 2.1 of the License, or (at your option) any later version.                                   |
12
// |                                                                                                      |
13
// | This library is distributed in the hope that it will be useful,                                      |
14
// | but WITHOUT ANY WARRANTY; without even the implied warranty of                                       |
15
// | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU                                    |
16
// | Lesser General Public License for more details.                                                      |
17
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | License along with this library; if not, write to the Free Software                                  |
20
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: annuaire_moteur.php,v 1.2 2005/03/24 08:24:39 alex Exp $
23
/**
24
* programme principal du module annuaire_moteur
25
*
26
* programme principal du module annuaire_moteur
27
*
28
*@package annuaire
29
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
32
*@author        Aucun
33
*@copyright     Tela-Botanica 2000-2004
34
*@version       $Revision: 1.2 $
35
// +------------------------------------------------------------------------------------------------------+
36
*/
37
 
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
41
 
42
include_once 'client/annuaire/configuration/ann_config.inc.php' ;
263 alex 43
 
4 david 44
include_once (ANN_CHEMIN_APPLI."annuaire_moteur_fonction.php");
45
include_once (ANN_CHEMIN_LIBRAIRIE."annuaire.fonct.php") ;
46
 
47
if (isset($lang)) {
48
    include_once ANN_CHEMIN_APPLI."/langues/ann_langue_$lang.inc.php" ;
49
} else {
50
    include_once ANN_CHEMIN_APPLI.'/langues/ann_langue_fr.inc.php' ;
51
}
52
 
53
define ("ANN_MAIL_TOUS", 1) ;
54
define ("ANN_MAIL_TOUS_ENVOIE", 2) ;
263 alex 55
define ('ANN_ACTION_VOIR_ADHERENT', 'voir_adherent');
56
define ('ANN_ACTION_VOIR_COTISATION', 'voir_cotisation');
57
define ('ANN_VARIABLE_ACTION', 'action');
58
define ('ANN_ACTION_MAIL_TOUS', 'mail_tous');
59
define ('ANN_ACTION_SUPPRIMER_ADHERENT', 'suppr_adh');
4 david 60
 
263 alex 61
// Action pour les cotisations
62
define ('ANN_ACTION_SAISIR_COTISATION', 'sc');
63
define ('ANN_ACTION_VALIDER_COTISATION', 'cu');
64
define ('ANN_ACTION_MODIFIER_COTISATION', 'mu');
65
define ('ANN_ACTION_SUPPRIMER_COTISATION', 'rm');
66
define ('ANN_ACTION_ENVOYER_RECU', 'er');
4 david 67
 
263 alex 68
 
69
function afficherContenuNavigation () {
70
    $res .= '<ul class="onglets">';
71
    $GLOBALS['ann_url']->addQueryString(ANN_VARIABLE_ACTION, ANN_ACTION_VOIR_ADHERENT);
72
    $res .= '<li class="'.cma(ANN_ACTION_VOIR_ADHERENT).'"><a href="'.$GLOBALS['ann_url']->getURL().'">Adh&eacute;rents</a></li>';
73
    $GLOBALS['ann_url']->addQueryString(ANN_VARIABLE_ACTION, ANN_ACTION_VOIR_COTISATION);
74
    $res .= '<li class="'.cma(ANN_ACTION_VOIR_COTISATION).'"><a href="'.$GLOBALS['ann_url']->getURL().'">Cotisations</a></li>';
75
    $res .= '</ul>';
76
    $GLOBALS['ann_url']->removeQueryString (ANN_VARIABLE_ACTION) ;
77
    return $res ;
78
}
79
 
4 david 80
function afficherContenuCorps () {
81
    global $statut ;
263 alex 82
	if (!isset($_REQUEST[ANN_VARIABLE_ACTION])) $_REQUEST[ANN_VARIABLE_ACTION] = ANN_ACTION_VOIR_ADHERENT;
4 david 83
    if (!$GLOBALS['AUTH']->getAuth())  {
84
        $res = AUTH_formulaire_login() ;
85
    } else {
263 alex 86
        switch ($_REQUEST[ANN_VARIABLE_ACTION]) {
87
        	case ANN_ACTION_SAISIR_COTISATION:
88
        	case ANN_ACTION_MODIFIER_COTISATION:
89
        	case ANN_ACTION_SUPPRIMER_COTISATION:
90
        	case ANN_ACTION_VALIDER_COTISATION:
91
        	case ANN_ACTION_ENVOYER_RECU:
92
        		if (isset($_GET['u_id'])) {
93
        		include_once (ANN_CHEMIN_APPLI.'admin_annu.php');
94
	            $GLOBALS['ann_url']->addQueryString ('u_id', $_GET['u_id']) ;
95
	            return putFrame() ;
96
        		}
97
        	case ANN_ACTION_VOIR_COTISATION:
98
        		$res .= '<div>'.resume_cotisation().'</div>'."\n";
99
        	break;
100
        	case ANN_ACTION_MAIL_TOUS:
101
        	case ANN_MAIL_TOUS_ENVOIE:
102
        		include_once (ANN_CHEMIN_APPLI.'mail_tous.php') ;
103
	        	return putFrame() ;
104
	        default:
105
	        	if (isset ($_GET['u_id'])) {
106
	        		include_once (ANN_CHEMIN_APPLI.'admin_annu.php');
107
	            	$GLOBALS['ann_url']->addQueryString ('u_id', $_GET['u_id']) ;
108
	            	return putFrame() ;
109
	        	}
287 alex 110
	        	return mkengine().mkresu();
4 david 111
        }
112
    }
113
    return $res ;
114
}
115
 
263 alex 116
function cma ($var) {
117
    $class = $_REQUEST[ANN_VARIABLE_ACTION] == $var ?  'menu_actif' :  'menu_inactif' ;
118
    return $class ;
119
}
4 david 120
?>