forked from JeromeDevome/GRR
-
Notifications
You must be signed in to change notification settings - Fork 3
/
changeEtablissement.php
41 lines (33 loc) · 1.15 KB
/
changeEtablissement.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
include_once "include/connect.inc.php";
include_once "include/config.inc.php";
include_once "include/misc.inc.php";
include_once "include/mrbs_sql.inc.php";
include_once "include/functions.inc.php";
include_once "include/$dbsys.inc.php";
include_once "include/mincals.inc.php";
$grr_script_name = "day.php";
#Param�tres de connection
require_once("include/settings.class.php");
#Chargement des valeurs de la table settings
$settings = new Settings();
if (!$settings)
die("Erreur chargement settings");
#Fonction relative � la session
include_once "include/session.inc.php";
// Resume session
if (!grr_resumeSession()) {
if ((Settings::get("authentification_obli")==1) or ((Settings::get("authentification_obli")==0) and (isset($_SESSION['login'])))) {
header("Location: ./logout.php?auto=1&url=$url");
die();
}
};
if (isset($_POST['etablissement']) ) {
$tabSplit = explode("=", $_POST['etablissement']);
$_SESSION['current_etablisement']= $tabSplit[1];
}
if (isset($_GET['code_etablissement']) ) {
$_SESSION['current_etablisement']= $_GET['code_etablissement'];
}
header("Location: ".htmlspecialchars_decode(page_accueil())."");
?>