Subversion Repositories Applications.papyrus

Rev

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

Rev 436 Rev 443
Line 19... Line 19...
19
// | You should have received a copy of the GNU Lesser General Public                                     |
19
// | You should have received a copy of the GNU Lesser General Public                                     |
20
// | License along with this library; if not, write to the Free Software                                  |
20
// | License along with this library; if not, write to the Free Software                                  |
21
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
21
// | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA                            |
22
// |                                                                                                      |
22
// |                                                                                                      |
23
// +------------------------------------------------------------------------------------------------------+
23
// +------------------------------------------------------------------------------------------------------+
24
// CVS : $Id: pap_initialise_info.inc.php,v 1.21 2005-08-31 17:34:52 ddelon Exp $
24
// CVS : $Id: pap_initialise_info.inc.php,v 1.22 2005-09-20 17:01:22 ddelon Exp $
25
/**
25
/**
26
*Initialisation de Papyrus : vérification et récupération de paramètres généraux.
26
*Initialisation de Papyrus : vérification et récupération de paramètres généraux.
27
*
27
*
28
* La page contient le code initialisant l'éxecution du rendu d'une page par Papyrus.
28
* La page contient le code initialisant l'éxecution du rendu d'une page par Papyrus.
29
* Nous y trouvons la recherche des informations disponibles sur :
29
* Nous y trouvons la recherche des informations disponibles sur :
Line 39... Line 39...
39
*@author            Jean-Pascal MILCENT <jpm@tela-botanica.org>
39
*@author            Jean-Pascal MILCENT <jpm@tela-botanica.org>
40
//Autres auteurs :
40
//Autres auteurs :
41
*@author            Alexandre GRANIER <alex@tela-botanica.org>
41
*@author            Alexandre GRANIER <alex@tela-botanica.org>
42
*@author            Laurent COUDOUNEAU <laurent.coudouneau@ema.fr>
42
*@author            Laurent COUDOUNEAU <laurent.coudouneau@ema.fr>
43
*@copyright         Tela-Botanica 2000-2004
43
*@copyright         Tela-Botanica 2000-2004
44
*@version           $Revision: 1.21 $ $Date: 2005-08-31 17:34:52 $
44
*@version           $Revision: 1.22 $ $Date: 2005-09-20 17:01:22 $
45
// +------------------------------------------------------------------------------------------------------+
45
// +------------------------------------------------------------------------------------------------------+
46
*/
46
*/
Line 47... Line 47...
47
 
47
 
48
// +------------------------------------------------------------------------------------------------------+
48
// +------------------------------------------------------------------------------------------------------+
Line 238... Line 238...
238
    // Utilisation de la fonction statique de Pear HTTP pour négocier cette i18n.
238
    // Utilisation de la fonction statique de Pear HTTP pour négocier cette i18n.
239
    $i18n = HTTP::negotiateLanguage($aso_i18n_site, $i18n_site_url);
239
    $i18n = HTTP::negotiateLanguage($aso_i18n_site, $i18n_site_url);
240
}
240
}
241
// Nous stockons la valeur trouvé pour l'url demandée dans la variable globale de Génésia.
241
// Nous stockons la valeur trouvé pour l'url demandée dans la variable globale de Génésia.
242
$_GEN_commun['i18n'] = $i18n;
242
$_GEN_commun['i18n'] = $i18n;
243
 
-
 
244
// Recherche de la présence de la valeur d'i18n dans l'url
243
// Recherche de la présence de la valeur d'i18n dans l'url
245
if ( (! isset($_GET[GEN_URL_CLE_I18N])) || (empty($_GET[GEN_URL_CLE_I18N])) ) {
244
if ( (! isset($_GET[GEN_URL_CLE_I18N])) || (empty($_GET[GEN_URL_CLE_I18N])) ) {
246
    $_GEN_commun['url_i18n'] = '';
245
    $_GEN_commun['url_i18n'] = '';
247
} else {
246
} else {
248
    // L'i18n est trouvé dans l'url, nous écrasons donc la valeur i18n.
247
    // L'i18n est trouvé dans l'url, nous écrasons donc la valeur i18n.
Line 259... Line 258...
259
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
258
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
Line 260... Line 259...
260
 
259
 
261
$_GEN_commun['info_i18n'] = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
260
$_GEN_commun['info_i18n'] = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
Line -... Line 261...
-
 
261
$resultat->free();
262
$resultat->free();
262
 
263
 
263
 
264
//Gestion de l'erreur aucune internationalisation trouvable.
264
//Gestion de l'erreur aucune internationalisation trouvable.
265
if (empty($_GEN_commun['i18n'])) {
265
if (empty($_GEN_commun['i18n'])) {
266
    die('ERREUR Génésia : valeur internationalisation introuvable. <br />'.
266
    die('ERREUR Génésia : valeur internationalisation introuvable. <br />'.
Line 270... Line 270...
270
 
270
 
271
// Récupération des informations sur la langue
271
// Récupération des informations sur la langue
272
$requete =  'SELECT * '.
272
$requete =  'SELECT * '.
273
            'FROM gen_i18n_langue '.
273
            'FROM gen_i18n_langue '.
274
            'WHERE gil_id_langue = "'.$_GEN_commun['info_i18n']->gi_ce_langue.'"';
-
 
275
 
274
            'WHERE gil_id_langue = "'.$_GEN_commun['info_i18n']->gi_ce_langue.'"';
276
$resultat = $db->query($requete);
275
$resultat = $db->query($requete);
Line 277... Line 276...
277
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
276
(DB::isError($resultat)) ? die(BOG_afficherErreurSql(__FILE__, __LINE__, $resultat->getMessage(), $requete)) : '';
278
 
277
 
Line 279... Line 278...
279
$_GEN_commun['info_i18n_langue'] = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
278
$_GEN_commun['info_i18n_langue'] = $resultat->fetchRow(DB_FETCHMODE_OBJECT);
280
$resultat->free();
279
$resultat->free();
281
 
280
 
282
// Récupération des informations sur le pays
281
// Récupération des informations sur le pays
283
$requete =  'SELECT * '.
-
 
284
            'FROM gen_i18n_pays '.
282
$requete =  'SELECT * '.
285
            'WHERE gip_id_pays = "'.$_GEN_commun['info_i18n']->gi_ce_pays.'"';
283
            'FROM gen_i18n_pays '.
Line 286... Line 284...
286
 
284
            'WHERE gip_id_pays = "'.$_GEN_commun['info_i18n']->gi_ce_pays.'"';
287
$resultat = $db->query($requete);
285
$resultat = $db->query($requete);
Line 495... Line 493...
495
    $_GEN_commun['url']->addQueryString(GEN_URL_CLE_FORMAT, $_GEN_commun['url_format']);
493
    $_GEN_commun['url']->addQueryString(GEN_URL_CLE_FORMAT, $_GEN_commun['url_format']);
496
}
494
}
Line 497... Line 495...
497
 
495
 
498
/* +--Fin du code ---------------------------------------------------------------------------------------+
496
/* +--Fin du code ---------------------------------------------------------------------------------------+
-
 
497
* $Log: not supported by cvs2svn $
-
 
498
* Revision 1.21  2005/08/31 17:34:52  ddelon
-
 
499
* Integrateur Wikini et administration des Wikini
499
* $Log: not supported by cvs2svn $
500
*
500
* Revision 1.20  2005/06/24 10:48:35  jpm
501
* Revision 1.20  2005/06/24 10:48:35  jpm
501
* Modification des chemins des fichiers pour fonctionnement avec API Pear locale.
502
* Modification des chemins des fichiers pour fonctionnement avec API Pear locale.
502
*
503
*
503
* Revision 1.19  2005/04/14 13:52:37  jpm
504
* Revision 1.19  2005/04/14 13:52:37  jpm