Subversion Repositories Sites.tela-botanica.org

Rev

Rev 4 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 4 Rev 263
Line 38... Line 38...
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
39
// |                                            ENTETE du PROGRAMME                                       |
40
// +------------------------------------------------------------------------------------------------------+
40
// +------------------------------------------------------------------------------------------------------+
Line 41... Line 41...
41
 
41
 
42
include_once 'client/annuaire/configuration/ann_config.inc.php' ;
-
 
43
include_once 'api/fragmenteur/FRAG_Fragmenteur_Session.class.php' ;
-
 
-
 
42
include_once 'client/annuaire/configuration/ann_config.inc.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");
Line 46... Line 45...
46
include_once (ANN_CHEMIN_LIBRAIRIE."annuaire.fonct.php") ;
45
include_once (ANN_CHEMIN_LIBRAIRIE."annuaire.fonct.php") ;
47
 
46
 
Line 51... Line 50...
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
}
Line 53... Line 52...
53
 
52
 
54
define ("ANN_MAIL_TOUS", 1) ;
53
define ("ANN_MAIL_TOUS", 1) ;
-
 
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');
55
define ("ANN_MAIL_TOUS_ENVOIE", 2) ;
59
define ('ANN_ACTION_SUPPRIMER_ADHERENT', 'suppr_adh');
-
 
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 ;
Line 56... Line 78...
56
 
78
}
57
 
79
 
58
function afficherContenuCorps () {
-
 
-
 
80
function afficherContenuCorps () {
-
 
81
    global $statut ;
59
    global $statut ;
82
    $GLOBALS['bench'] = microtime(true);
60
 
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())  {
-
 
85
        $res = AUTH_formulaire_login() ;
-
 
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:
62
        $res = AUTH_formulaire_login() ;
91
        	case ANN_ACTION_VALIDER_COTISATION:
63
    } else {
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']) ;
-
 
96
	            return putFrame() ;
-
 
97
        		}
-
 
98
        	case ANN_ACTION_VOIR_COTISATION:
-
 
99
        		$res .= '<div>'.resume_cotisation().'</div>'."\n";
-
 
100
        	break;
-
 
101
        	case ANN_ACTION_MAIL_TOUS:
-
 
102
        	case ANN_MAIL_TOUS_ENVOIE:
-
 
103
        		include_once (ANN_CHEMIN_APPLI.'mail_tous.php') ;
67
            return putFrame() ;
104
	        	return putFrame() ;
68
        }
105
	        default:
-
 
106
	        	if (isset ($_GET['u_id'])) {
69
        if (isset ($_GET['action'])) {
107
	        		include_once (ANN_CHEMIN_APPLI.'admin_annu.php');
-
 
108
	            	$GLOBALS['ann_url']->addQueryString ('u_id', $_GET['u_id']) ;
-
 
109
	            	return putFrame() ;
70
            include_once (ANN_CHEMIN_APPLI.'mail_tous.php') ;
110
	        	}
71
            return putFrame() ;
-
 
72
        }
-
 
73
        $res = "<div>".mkengine()."</div>\n" ;
-
 
74
        //mkquery() ;
-
 
75
        $res .= "<div>".mkresu()."</div>\n" ;
111
	        	return mkengine().mkresu().'<div>bench : '.(microtime(true) - $GLOBALS['bench']).'</div>';
-
 
112
        }
76
    
113
    }
77
    }
114
    $res .= '<div>bench : '.(microtime(true) - $GLOBALS['bench']).'</div>';
Line -... Line 115...
-
 
115
    return $res ;
-
 
116
}
-
 
117
 
-
 
118
function cma ($var) {
78
    return $res ;
119
    $class = $_REQUEST[ANN_VARIABLE_ACTION] == $var ?  'menu_actif' :  'menu_inactif' ;
79
}
120
    return $class ;