Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *************************************************************************************************/ defined('_PHP_CONGES') or die('Restricted access'); // // MAIN // /*** initialisation des variables ***/ $session_username = ""; $session_password = ""; /************************************/ // // recup du num de session (mais on ne sais pas s'il est passé en GET ou POST $session = isset($_REQUEST['session']) ? $_REQUEST['session'] : ''; $DEBUG = FALSE; //$DEBUG=TRUE; if ($session != "") { if (session_is_valid($session)) { session_update($session); } else { session_delete($session); $session = ""; $session_username = ""; $session_password = ""; $_SESSION['config'] = init_config_tab(); // on recrée le tableau de config pour l'url du lien redirect(ROOT_PATH . 'index.php?error=session-invalid'); } } else { // PAS DE SESSION ($session == "") redirect(ROOT_PATH . 'index.php'); }
Vous devez avoir reçu une copie de la Licence Publique Générale GNU en même temps que ce programme ; si ce n'est pas le cas, écrivez à la Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, États-Unis. ************************************************************************************************* This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *************************************************************************************************/ if (isset($_REQUEST['session'])) { session_is_valid($_REQUEST['session']); } if (isset($_REQUEST['lang'])) { $lang = $_REQUEST['lang']; } elseif (isset($_SESSION['lang'])) { $lang = $_SESSION['lang']; } else { /* Retrieve lang informations from config database */ $lang_query = "SELECT conf_valeur FROM conges_config WHERE conf_nom='lang';"; $ReqLang = SQL::query($lang_query); $lang = $ReqLang->fetch_row(); if ($lang != NULL) { $lang = $lang[0]; } } putenv('LANG=' . $lang);