Subversion Repositories Sites.tela-botanica.org

Rev

Rev 4 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

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