Subversion Repositories Sites.tela-botanica.org

Rev

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

Rev 4 Rev 406
Line 1... Line 1...
1
<?
1
<?
2
/*vim: set expandtab tabstop=4 shiftwidth=4: */ 
-
 
3
// +------------------------------------------------------------------------------------------------------+
2
// +------------------------------------------------------------------------------------------------------+
4
// | PHP version 4.1                                                                                      |
3
// | PHP version 4.1                                                                                      |
5
// +------------------------------------------------------------------------------------------------------+
4
// +------------------------------------------------------------------------------------------------------+
6
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
5
// | Copyright (C) 2004 Tela Botanica (accueil@tela-botanica.org)                                         |
7
// +------------------------------------------------------------------------------------------------------+
6
// +------------------------------------------------------------------------------------------------------+
Line 17... Line 16...
17
// |                                                                                                      |
16
// |                                                                                                      |
18
// | You should have received a copy of the GNU Lesser General Public                                     |
17
// | 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                                  |
18
// | 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                            |
19
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// +------------------------------------------------------------------------------------------------------+
20
// +------------------------------------------------------------------------------------------------------+
22
// CVS : $Id: annuaire.php,v 1.4 2005/03/24 08:24:39 alex Exp $
-
 
23
/**
21
/**
24
* programme principal du module annuaire
22
* programme principal du module annuaire
25
*
23
*
26
* programme principal du module annuaire
24
* programme principal du module annuaire
27
*
25
*
28
*@package annuaire
26
*@package annuaire
29
//Auteur original :
27
//Auteur original :
30
*@author        Alexandre Granier <alexandre@tela-botanica.org>
28
*@author        Alexandre Granier <alexandre@tela-botanica.org>
31
//Autres auteurs :
29
//Autres auteurs :
32
*@author        Aucun
30
*@author        Jean-Pascal MILCENT <jpm@tela-botanica.org>
33
*@copyright     Tela-Botanica 2000-2004
31
*@copyright     Tela-Botanica 2000-2007
34
*@version       $Revision: 1.4 $
32
*@version       $Id: annuaire.php,v 1.4 2005/03/24 08:24:39 alex Exp $
35
// +------------------------------------------------------------------------------------------------------+
33
// +------------------------------------------------------------------------------------------------------+
36
*/
34
*/
Line 37... Line 35...
37
 
35
 
38
// +------------------------------------------------------------------------------------------------------+
36
// +------------------------------------------------------------------------------------------------------+
39
// |                                            ENTETE du PROGRAMME                                       |
37
// |                                            ENTETE du PROGRAMME                                       |
Line 40... Line 38...
40
// +------------------------------------------------------------------------------------------------------+
38
// +------------------------------------------------------------------------------------------------------+
41
 
39
 
-
 
40
include_once 'client/annuaire/configuration/ann_config.inc.php' ;
-
 
41
include_once ANN_CHEMIN_LIBRAIRIE.'annuaire.fonct.php' ;
-
 
42
/** Constante "dynamique" stockant la langue demandée par l'utilisateur pour l'application.*/
42
include_once 'client/annuaire/configuration/ann_config.inc.php' ;
43
define('INS_LANGUE', substr($GLOBALS['_GEN_commun']['i18n'], 0, 2));
43
include_once ANN_CHEMIN_LIBRAIRIE.'annuaire.fonct.php' ;
44
$fichier_lg = ANN_CHEMIN_APPLI.'/langues/ann_langue_'.INS_LANGUE.'.inc.php';
44
if (isset($lang)) {
45
if (file_exists($fichier_lg)) {
45
    include_once ANN_CHEMIN_APPLI."/langues/ann_langue_$lang.inc.php" ;
46
    include_once $fichier_lg;
46
} else {
47
} else {
-
 
48
    include_once ANN_CHEMIN_APPLI.'/langues/ann_langue_fr.inc.php' ;
Line 47... Line 49...
47
    include_once ANN_CHEMIN_APPLI.'/langues/ann_langue_fr.inc.php' ;
49
}
-
 
50
include_once PAP_CHEMIN_API_PEAR.'HTML/QuickForm.php' ;
Line 48... Line 51...
48
}
51
 
49
 
52
// Ajout d'une feuille de style externe
50
include_once 'HTML/QuickForm.php' ;
53
GEN_stockerStyleExterne ('inscription', 'client/annuaire/annuaire.css') ;
51
 
54
 
52
/**
55
/**
53
 *  Renvoie le code HTML de l'application
-
 
54
 *
56
 *  Renvoie le code HTML de l'application
55
 * @return  string  HTML
57
 *
56
 */
58
 * @return  string  HTML
57
 
59
 */
58
function afficherContenuCorps () {
60
function afficherContenuCorps () {
59
    $res = "<h1 class=\"annuaire_titre1\">".ANN_TITRE."</h1>\n" ;
61
    $res = '<h1 class="annuaire_titre1">'.ANN_TITRE.'</h1>'."\n";
60
    if (!$GLOBALS['AUTH']->getAuth())  {
62
    if (!$GLOBALS['AUTH']->getAuth())  {
61
        $res .= AUTH_formulaire_login() ;
63
        $res .= AUTH_formulaire_login();
62
    } else {
64
    } else {
Line 78... Line 80...
78
            } // Fin if... else
80
            } // Fin if... else
79
            return true;
81
            return true;
80
        } // Fin de la fonction 'setCheckboxes()'";
82
        } // Fin de la fonction 'setCheckboxes()'";
81
        GEN_stockerCodeScript($java) ;
83
        GEN_stockerCodeScript($java) ;
Line 82... Line 84...
82
 
84
 
Line 83... Line 85...
83
        $res .= "<h2 class=\"annuaire_titre2\">".ANN_CLIQUEZ_LETTRE."</h2>\n";
85
        $res .= '<h2 class="annuaire_titre2">'.ANN_CLIQUEZ_LETTRE.'</h2>'."\n";
84
 
86
 
-
 
87
            // S'il y a un mail a envoyé, on l'envoie
-
 
88
        if (isset($_POST['select']) && is_array ($_POST['select'])) {
Line 85... Line 89...
85
            // S'il y a un mail a envoyé, on l'envoie
89
        	$res .= envoie_mail() ;
86
        if (isset($_POST['select']) && is_array ($_POST['select'])) $res .= envoie_mail () ;
90
        }
87
 
91
 
88
        $res .= parcourrirAnnu("") ;
92
        $res .= parcourrirAnnu('') ;
Line 89... Line -...
89
    }
-
 
90
    return $res;
93
    }
91
}
-
 
92
 
94
    return $res;
93
//==============================================================================
95
}
94
// FUNCTION putFooter ()
-
 
95
//
96
 
96
// Generation of footer.
97
function afficherContenuPied () {
97
//==============================================================================
98
    $sortie  = 	'<p id="annuaire_pied_page">'.ANN_PIED_INFO.
98
 
-
 
99
function putFooter () {
-
 
100
  return '&nbsp;';
-
 
101
}
-
 
102
 
-
 
103
 
-
 
104
/*
-
 
105
function envoie_mail () {
-
 
106
    global $titre, $corps, $HTTP_POST_VARS, $select, $AUTH, $db ;
-
 
107
 
-
 
108
    // On vérifie qu'un email aie été sélectionné
-
 
109
    if (!is_array($select)) {
-
 
110
        $res ="<div class=\"annuaire_erreur\">".ANN_VERIF_MAIL_COCHE."</divr>";
-
 
111
        return $res ;
-
 
112
    }
-
 
113
    if ($titre == "" || $corps == "") {
-
 
114
        $res = "<div class=\"annuaire_erreur\">".ANN_VERIF_TITRE."</div>\n" ;
-
 
115
        return $res ;
-
 
116
    }
-
 
117
 
-
 
118
    // On récupère le mail de l'expéditeur
-
 
119
    $req_exp = "select ".ANN_CHAMPS_MAIL." from ".ANN_ANNUAIRE." where ".ANN_CHAMPS_ID."=".$AUTH->getAuthData(ANN_CHAMPS_ID) ;
-
 
120
    $res_exp = $db->query($req_exp) ;
-
 
121
    if (DB::isError($res_exp)) {
-
 
122
	die ("Echec de la requete sur annuaire_tela <br>".$res_exp->getMessage()) ;
-
 
123
    }
-
 
124
    $ligne_exp = $res_exp->fetchRow(DB_FETCHMODE_ASSOC) ;
-
 
125
    $expediteur = $ligne_exp[ANN_CHAMPS_MAIL] ;
-
 
126
 
-
 
127
    $corps .= ANN_PIED_MESSAGE ;
-
 
128
    $liste = "" ;
-
 
129
    
-
 
130
    if (!is_array($select)) {
-
 
131
        $res.= CAR_NO_DESTINATAIRE;
-
 
132
    } else {
-
 
133
        $res .= "<div class=\"$classe_titre\">".CAR_MESSAGE_ENVOYE."</div>\n" ;
-
 
134
        envoie_mail() ;
-
 
135
    }
-
 
136
}*/
-
 
137
/**------------------------------------------------------------------------------
-
 
138
* $Log: annuaire.php,v $
-
 
139
* Revision 1.4  2005/03/24 08:24:39  alex
-
 
140
* --
-
 
141
*
-
 
142
* Revision 1.3  2005/01/06 15:44:33  alex
-
 
143
* correction du javascript
-
 
144
*
-
 
145
* Revision 1.2  2005/01/06 15:17:39  alex
-
 
146
* ajout de commentaires
-
 
147
*
-
 
148
* Revision 1.1.1.1  2005/01/03 17:27:49  alex
-
 
149
* Import initial
-
 
150
*
-
 
151
* Revision 1.1  2005/01/03 17:18:43  alex
-
 
152
* retour vers la liste des participants après un ajout.
99
					'<a href="mailto:'.ANN_PIED_MAIL.'">'.ANN_PIED_MAIL.'</a>.'.
153
*
100
				'</p>';