Subversion Repositories Applications.papyrus

Rev

Rev 1298 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1298 Rev 1428
Line 17... Line 17...
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_backoffice.php,v 1.6 2007-04-11 08:30:12 neiluj Exp $
22
// CVS : $Id: annuaire_backoffice.php,v 1.7 2007-06-01 13:39:52 alexandre_tb 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
*
Line 29... Line 29...
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.6 $
34
*@version       $Revision: 1.7 $
35
// +------------------------------------------------------------------------------------------------------+
35
// +------------------------------------------------------------------------------------------------------+
36
*/
36
*/
Line 37... Line 37...
37
 
37
 
38
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
39
// |                                            ENTETE du PROGRAMME                                       |
Line 40... Line -...
40
// +------------------------------------------------------------------------------------------------------+
-
 
41
 
-
 
42
// +------------------------------------------------------------------------------------------------------+
-
 
-
 
40
// +------------------------------------------------------------------------------------------------------+
43
// |                                            ENTETE du PROGRAMME                                       |
41
 
44
// +------------------------------------------------------------------------------------------------------+
-
 
-
 
42
 
45
include_once 'configuration/bottin.config.inc.php';
43
include_once 'configuration/bottin.config.inc.php';
46
include_once INS_CHEMIN_APPLI.'bibliotheque/annuaire.fonct.php';
44
 
47
include_once INS_CHEMIN_APPLI.'bibliotheque/annuaire_backoffice.fonct.php';
45
include_once INS_CHEMIN_APPLI.'bibliotheque/annuaire_backoffice.fonct.php';
-
 
46
include_once INS_CHEMIN_APPLI.'bibliotheque/inscription.class.php';
-
 
47
include_once INS_CHEMIN_APPLI.'bibliotheque/inscription.fonct.php';
48
include_once INS_CHEMIN_APPLI.'bibliotheque/inscription.class.php';
48
include_once INS_CHEMIN_APPLI.'bibliotheque/bottin.fonct.php';
49
include_once INS_CHEMIN_APPLI.'bibliotheque/inscription.fonct.php';
49
 
50
$lang=INS_LANGUE_DEFAUT;
50
$lang=INS_LANGUE_DEFAUT;
Line -... Line 51...
-
 
51
define ("ANN_MAIL_TOUS", 1) ;
-
 
52
define ("ANN_MAIL_TOUS_ENVOIE", 2) ;
-
 
53
 
-
 
54
// Action pour valider une demande d inscription
-
 
55
define ('ANN_ACTION_VALIDER_INSCRIPTION', 3);
-
 
56
 
-
 
57
// Action pour supprimer une demande d inscription
-
 
58
define ('ANN_ACTION_SUPPRIMER_DEMANDE_INSCRIPTION', 4);
-
 
59
 
-
 
60
// Action pour supprimer un inscrit
-
 
61
define ('ANN_ACTION_SUPPRIMER_INSCRIT', 5);
-
 
62
 
-
 
63
// TODO: Nom de la variable action, a modifier dans le programme
-
 
64
define ('ANN_VARIABLE_ACTION', 'action');
51
define ("ANN_MAIL_TOUS", 1) ;
65
define ('INS_VARIABLE_ID_DEMANDEUR', 'id_demandeur');
52
define ("ANN_MAIL_TOUS_ENVOIE", 2) ;
66
define ('INS_VARIABLE_ID_INSCRIT', 'id_inscrit');
53
 
67
 
54
// Recherche parametres menu actif : ils ne sont pas present dans le contexte, quel dommage !
68
// Recherche parametres menu actif : ils ne sont pas present dans le contexte, quel dommage !
55
$requete_menu =  'SELECT gm_application_arguments '.
69
$requete_menu =  'SELECT gm_application_arguments '.
Line 66... Line 80...
66
	    	$info_application->$attr[0] = (isset($attr[1]) ? $attr[1] : '');
80
	    	$info_application->$attr[0] = (isset($attr[1]) ? $attr[1] : '');
67
   		}
81
   		}
68
   	}
82
   	}
69
}
83
}
70
//cas de l'annuaire admin papyrus, on modifie certaines constantes
84
//cas de l'annuaire admin papyrus, on modifie certaines constantes
71
if ($info_application->type_annuaire==1) {
85
if (isset ($info_application->type_annuaire)  && $info_application->type_annuaire==1) {
72
	include_once INS_CHEMIN_APPLI.'configuration/annuaire_backoffice.config.inc.php';
86
	include_once INS_CHEMIN_APPLI.'configuration/annuaire_backoffice.config.inc.php';
73
}
87
}
-
 
88
// recuperation de la configuration
-
 
89
include_once INS_CHEMIN_APPLI.'bibliotheque/bottin.class.php';
-
 
90
$GLOBALS['ins_config'] = inscription::getConfig();
Line -... Line 91...
-
 
91
 
-
 
92
// +------------------------------------------------------------------------------------------------------+
-
 
93
// |                                            CORPS du PROGRAMME                                        |
74
 
94
// +------------------------------------------------------------------------------------------------------+
75
function afficherContenuCorps () {
95
function afficherContenuCorps () {
76
    global $statut ;
-
 
77
 
96
	$res = '';
78
    if (!$GLOBALS['AUTH']->getAuth())  {
97
    if (!$GLOBALS['AUTH']->getAuth())  {
79
        $res = AUTH_formulaire_login() ;
98
        $res .= AUTH_formulaire_login() ;
80
    } else {
99
    } else {
81
        if (isset($_REQUEST[INS_CHAMPS_ID])) {
100
        if (isset($_REQUEST[INS_CHAMPS_ID])) {
82
            include_once (INS_CHEMIN_APPLI.'bibliotheque/edition_fiche.php');
101
            include_once (INS_CHEMIN_APPLI.'bibliotheque/edition_fiche.php');
83
            $GLOBALS['ins_url']->addQueryString (INS_CHAMPS_ID, $_REQUEST[INS_CHAMPS_ID]) ;
102
            $GLOBALS['ins_url']->addQueryString (INS_CHAMPS_ID, $_REQUEST[INS_CHAMPS_ID]) ;
84
            return putFrame() ;
103
            return putFrame() ;
-
 
104
        }
-
 
105
        
-
 
106
        // Les actions 	1 => envoie d un mail a tous
-
 
107
        //				2 => valider une demande d inscription
-
 
108
        //				3 => supprimer une demande d inscription
85
        }
109
        // 				5 => supprimer un inscrit
-
 
110
        if (isset ($_GET[ANN_VARIABLE_ACTION])) {
-
 
111
            switch ($_GET[ANN_VARIABLE_ACTION]) {
-
 
112
            	case ANN_MAIL_TOUS :
86
        if (isset ($_GET['action'])) {
113
            	case ANN_MAIL_TOUS_ENVOIE :
87
            include_once (INS_CHEMIN_APPLI.'bibliotheque/mail_tous.php') ;
114
            	include_once (INS_CHEMIN_APPLI.'bibliotheque/mail_tous.php') ;
-
 
115
            	return putFrame() ;
-
 
116
            	break;
-
 
117
            	case ANN_ACTION_VALIDER_INSCRIPTION : $res .= inscription::validerInscription();
-
 
118
            	break;
-
 
119
            	case ANN_ACTION_SUPPRIMER_DEMANDE_INSCRIPTION: $res .= inscription::supprimerDemandeInscription();
-
 
120
            	break;
-
 
121
            	case ANN_ACTION_SUPPRIMER_INSCRIT : $res .= inscription::supprimerInscription();
-
 
122
            	break;
88
            return putFrame() ;
123
            }
89
        }
124
        }
90
        if (isset($_REQUEST['ajouter'])) {
125
        if (isset($_REQUEST['ajouter'])) {
91
        	return ajouterInscrit() ;	
126
        	return ajouterInscrit() ;	
92
        }
127
        }
-
 
128
        $res .= "<div>".mkengine()."</div>\n" ;
-
 
129
        
-
 
130
        // Liste des inscrits en attente de moderation
-
 
131
        $res .= '<h1>'.INS_EN_ATTENTE_DE_MODERATION.'</h1>';
-
 
132
        //$res .= print_r(inscription::getInscritEnAttenteModeration(), true);
-
 
133
        $res .= inscription::getTableauEnAttente((inscription::getInscritEnAttenteModeration()));
93
        $res = "<div>".mkengine()."</div>\n" ;
134
        
94
    }
135
    }
95
    return $res ;
136
    return $res ;
Line 96... Line 137...
96
}
137
}
97
 
138