} else if (!$etape) { $erreur = ''; if (@file_exists($nom_fic)) { $f = @fopen($nom_fic, "r+"); if (!$f) $erreur = "<p>Le fichier \"".$nom_fic."\" n'est pas accessible en écriture.</p>"; } else { $f = @fopen($nom_fic, "w"); if (!$f) $erreur = "<p>Impossible de créer le fichier \"".$nom_fic."\".</p>"; } if ($f) if (!@fclose($f)) $erreur = "<p>Impossible de sauvegarder le fichier \"".$nom_fic."\".</p>"; if ($erreur!='') { echo begin_page("Installation de GRR"); begin_html(); echo "<h2>Installation de la base $dbsys : problème de droits d'accès</h2>"; echo $erreur; if (@file_exists($nom_fic)) echo "<p>Vous pouvez également renseigner manuellement le fichier \"".$nom_fic."\".</p>"; else if (@file_exists($nom_fic.".ori")) { echo "<p>Vous pouvez renommer manuellement le fichier \"".$nom_fic.".ori\" en \"".$nom_fic."\", et lui donner les droits suffisants.</p>"; echo "<p>Une fois le fichier \"".$nom_fic.".ori\" renommé en \"".$nom_fic."\", vous pouvez également renseigner manuellement le fichier \"".$nom_fic."\".</p>"; } echo "<p>Vous pouvez par exemple utilisez votre client FTP afin de régler ce problème ou bien contactez l'administrateur technique. Une fois cette manipulation effectuée, vous pourrez continuer.</p>"; echo "<p><form action='install_mysql.php' method='get'>"; echo "<input type='hidden' name='etape' value='' />"; echo "<input type='submit' class='fondl' name='Continuer' />"; echo "</form>"; end_html();
$fin_session = 'y'; if (($fin_session == 'y') and (getSettingValue("authentification_obli")==1)) { header("Location: ./logout.php?auto=1&url=$url"); die(); }; if ((getSettingValue("authentification_obli")==0) and (getUserName()=='')) { $type_session = "no_session"; } else { $type_session = "with_session"; } echo begin_page(get_vocab("mrbs").get_vocab("deux_points").getSettingValue("company")); echo "<div class=\"page_sans_col_gauche\">"; $cible = isset($_POST["cible"]) ? $_POST["cible"] : (isset($_GET["cible"]) ? $_GET["cible"] : ''); $cible = htmlentities($cible); // sécurité $type_cible = isset($_POST["type_cible"]) ? $_POST["type_cible"] : (isset($_GET["type_cible"]) ? $_GET["type_cible"] : ''); if ($type_cible!='identifiant:non') $type_cible=''; // sécurité $action = isset($_POST["action"]) ? $_POST["action"] : ''; $corps_message = isset($_POST["message"]) ? $_POST["message"] : 'Contenu du message : '; $email_reponse = isset($_POST["email_reponse"]) ? $_POST["email_reponse"] : ''; $error_subject = 'n'; if (isset($_POST["objet_message"])) { $objet_message = trim($_POST["objet_message"]); if ($objet_message == '') $error_subject = 'y';
function print_header($day = '', $month = '', $year = '', $type_session = 'with_session') { global $vocab, $search_str, $grrSettings, $clock_file, $desactive_VerifNomPrenomUser, $grr_script_name; global $use_prototype, $use_admin, $use_tooltip_js, $desactive_bandeau_sup, $id_site, $use_select2; if (!$desactive_VerifNomPrenomUser) { $desactive_VerifNomPrenomUser = '******'; } // On vérifie que les noms et prénoms ne sont pas vides VerifNomPrenomUser($type_session); if ($type_session == "with_session") { echo begin_page(Settings::get("company"), "with_session"); } else { echo begin_page(Settings::get("company"), "no_session"); } // Si nous ne sommes pas dans un format imprimable if (!isset($_GET['pview']) || $_GET['pview'] != 1) { // If we dont know the right date then make it up if (!isset($day) || !isset($month) || !isset($year) || $day == '' || $month == '' || $year == '') { $date_now = time(); if ($date_now < Settings::get("begin_bookings")) { $date_ = Settings::get("begin_bookings"); } else { if ($date_now > Settings::get("end_bookings")) { $date_ = Settings::get("end_bookings"); } else { $date_ = $date_now; } } $day = date("d", $date_); $month = date("m", $date_); $year = date("Y", $date_); } if (!isset($search_str)) { $search_str = get_vocab("search_for"); } if (empty($search_str)) { $search_str = ""; } if (!(isset($desactive_bandeau_sup) && $desactive_bandeau_sup == 1 && $type_session != 'with_session')) { if (@file_exists('./admin_access_area.php')) { $adm = 1; $racine = "../"; $racineAd = "./"; } else { $adm = 0; $racine = "./"; $racineAd = "./admin/"; } // Génération XML $generationXML = 1; if (Settings::get("export_xml_actif") == "Oui" && $adm == 0) { include "{$racine}/include/generationxml.php"; } if (Settings::get("export_xml_plus_actif") == "Oui" && $adm == 0) { include "{$racine}/include/generationxmlplus.php"; } // On fabrique une date valide pour la réservation si ce n'est pas le cas $date_ = mktime(0, 0, 0, $month, $day, $year); if ($date_ < Settings::get("begin_bookings")) { $date_ = Settings::get("begin_bookings"); } else { if ($date_ > Settings::get("end_bookings")) { $date_ = Settings::get("end_bookings"); } } $day = date("d", $date_); $month = date("m", $date_); $year = date("Y", $date_); echo '<div id="toppanel">' . PHP_EOL; echo '<div id="panel">' . PHP_EOL; echo '<div class="content">' . PHP_EOL; echo '<table id="header">' . PHP_EOL; echo '<tr>' . PHP_EOL; //Logo $nom_picture = $racine . "images/" . Settings::get("logo"); if (Settings::get("logo") != '' && @file_exists($nom_picture)) { echo '<td class="logo" height="100">' . PHP_EOL . '<a href="' . $racine . page_accueil('yes') . 'day=' . $day . '&year=' . $year . '&month=' . $month . '"><img src="' . $nom_picture . '" alt="logo"/></a>' . PHP_EOL . '</td>' . PHP_EOL; } //Accueil echo '<td class="accueil ">', PHP_EOL, '<h2>', PHP_EOL, '<a href="' . $racine . page_accueil('yes'), 'day=', $day, '&year=', $year, '&month=', $month, '">', get_vocab("welcome"), ' - <b>', Settings::get("company"), '</b></a>', PHP_EOL, '</h2>', PHP_EOL; //Mail réservartion echo Settings::get('message_accueil'); $sql = "SELECT value FROM " . TABLE_PREFIX . "_setting WHERE name='mail_etat_destinataire'"; $res = grr_sql_query1($sql); //Libère le résultat de la mémoire grr_sql_free($res); if ($res == 1) { if ($type_session == "no_session") { echo '<td class="contactformulaire">', PHP_EOL, '<input class="btn btn-default" type="submit" rel="popup_name" value="Réserver" onClick="javascript:location.href=\'contactFormulaire.php?day=', $day, '&month=', $month, '&year=', $year, '\'" >', PHP_EOL, '</td>', PHP_EOL; } } // Administration div Sauvegarde if ($type_session == "with_session") { if (authGetUserLevel(getUserName(), -1, 'area') >= 4 || authGetUserLevel(getUserName(), -1, 'user') == 1) { echo '<td class="administration">' . PHP_EOL; echo "<br><a href='{$racineAd}admin_accueil.php?day={$day}&month={$month}&year={$year}'>" . get_vocab('admin') . "</a>" . PHP_EOL; if (authGetUserLevel(getUserName(), -1, 'area') >= 6) { echo '<br />' . PHP_EOL; echo "<form action='{$racineAd}admin_save_mysql.php' method='get'><div>" . PHP_EOL; echo '<input type="hidden" name="flag_connect" value="yes" />' . PHP_EOL; echo '<input type="submit" class="btn btn-default" value="' . get_vocab("submit_backup") . '" /></div>' . PHP_EOL; echo '</form>' . PHP_EOL; how_many_connected(); } echo '</td>' . PHP_EOL; } } if ($type_session != "with_session") { echo '<script>selection()</script>' . PHP_EOL; } echo '<td class="configuration" >' . PHP_EOL; if (@file_exists('js/' . $clock_file)) { echo '<div class="clock">' . PHP_EOL; echo '<div id="Date">' . PHP_EOL; echo ' <span id="hours"></span>' . PHP_EOL; echo 'h' . PHP_EOL; echo '<span id="min"></span>' . PHP_EOL; echo '</div></div>' . PHP_EOL; } $_SESSION['chemin_retour'] = ''; if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') { $parametres_url = htmlspecialchars($_SERVER['QUERY_STRING']) . "&"; $_SESSION['chemin_retour'] = traite_grr_url($grr_script_name) . "?" . $_SERVER['QUERY_STRING']; echo '<a onclick="charger();" href="' . traite_grr_url($grr_script_name) . '?' . $parametres_url . 'default_language=fr"><img src="' . $racine . 'img_grr/fr_dp.png" alt="France" title="france" width="20" height="13" class="image" /></a>' . PHP_EOL; echo '<a onclick="charger();" href="' . traite_grr_url($grr_script_name) . '?' . $parametres_url . 'default_language=de"><img src="' . $racine . 'img_grr/de_dp.png" alt="Deutch" title="deutch" width="20" height="13" class="image" /></a>' . PHP_EOL; echo '<a onclick="charger();" href="' . traite_grr_url($grr_script_name) . '?' . $parametres_url . 'default_language=en"><img src="' . $racine . 'img_grr/en_dp.png" alt="English" title="English" width="20" height="13" class="image" /></a>' . PHP_EOL; echo '<a onclick="charger();" href="' . traite_grr_url($grr_script_name) . '?' . $parametres_url . 'default_language=it"><img src="' . $racine . 'img_grr/it_dp.png" alt="Italiano" title="Italiano" width="20" height="13" class="image" /></a>' . PHP_EOL; echo '<a onclick="charger();" href="' . traite_grr_url($grr_script_name) . '?' . $parametres_url . 'default_language=es"><img src="' . $racine . 'img_grr/es_dp.png" alt="Spanish" title="Spanish" width="20" height="13" class="image" /></a>' . PHP_EOL; } if ($type_session == 'no_session') { if (Settings::get('sso_statut') == 'cas_visiteur' || Settings::get('sso_statut') == 'cas_utilisateur') { echo '<br /> <a href="index.php?force_authentification=y">' . get_vocab("authentification") . '</a>' . PHP_EOL; echo '<br /> <small><i><a href="login.php">' . get_vocab("connect_local") . '</a></i></small>' . PHP_EOL; } else { echo '<br /> <a href="login.php">' . get_vocab("connect") . '</a>' . PHP_EOL; } } else { echo '<br /> <b>' . get_vocab("welcome_to") . htmlspecialchars($_SESSION['prenom']) . ' ' . htmlspecialchars($_SESSION['nom']) . '</b>' . PHP_EOL; echo '<br /> <a href="' . $racine . 'my_account.php?day=' . $day . '&year=' . $year . '&month=' . $month . '">' . get_vocab("manage_my_account") . '</a>' . PHP_EOL; if (verif_access_search(getUserName())) { echo '<br/><a href="' . $racine . 'report.php">' . get_vocab("report") . '</a>' . PHP_EOL; } $disconnect_link = false; if (!(Settings::get("cacher_lien_deconnecter") == 'y' && isset($_SESSION['est_authentifie_sso']))) { $disconnect_link = true; if (Settings::get("authentification_obli") == 1) { echo '<br /> <a href="' . $racine . 'logout.php?auto=0" >' . get_vocab('disconnect') . '</a>' . PHP_EOL; } else { echo '<br /> <a href="' . $racine . 'logout.php?auto=0&redirect_page_accueil=yes" >' . get_vocab('disconnect') . '</a>' . PHP_EOL; } } if (Settings::get("Url_portail_sso") != '' && isset($_SESSION['est_authentifie_sso'])) { if ($disconnect_link) { echo ' - ' . PHP_EOL; } else { echo '<br />' . PHP_EOL; } echo '<a href="' . Settings::get("Url_portail_sso") . '">' . get_vocab("Portail_accueil") . '</a>' . PHP_EOL; } if (Settings::get('sso_statut') == 'lasso_visiteur' || Settings::get('sso_statut') == 'lasso_utilisateur') { echo '<br />'; if ($_SESSION['lasso_nameid'] == NULL) { echo '<a href="lasso/federate.php">' . get_vocab('lasso_federate_this_account') . '</a>' . PHP_EOL; } else { echo '<a href="lasso/defederate.php">' . get_vocab('lasso_defederate_this_account') . '</a>' . PHP_EOL; } } } echo '</td>' . PHP_EOL; echo '</tr>' . PHP_EOL; echo '</table>' . PHP_EOL; echo '</div>' . PHP_EOL; echo '</div>' . PHP_EOL; echo '<div class="tab">' . PHP_EOL; // echo '<ul class="login">'.PHP_EOL; //echo '<li>'.PHP_EOL; echo '<a id="open" class="open" href="#">Menu <i>(ouvrir/fermer)</i></a>' . PHP_EOL; // echo '</li>'.PHP_EOL; // echo '</ul>'.PHP_EOL; echo '</div>' . PHP_EOL; echo '</div>' . PHP_EOL; } } }
/** * Fonction qui affiche le header, * @param string $day * @param string $month * @param string $year * @param string $type_session * @param bool $close si il est true, dans le template twig les div ouverts dans printHeader seront fermés à la fin du fichier, sinon ils restent ouvert et c'est soit menu_gauche, soit le * script en cours qui doit les fermer. */ function print_header($day = '', $month = '', $year = '', $type_session = 'with_session', $close = true, $display = true, $admin = true) { global $vocab, $search_str, $grrSettings, $clock_file, $desactive_VerifNomPrenomUser, $grr_script_name; global $use_prototype, $use_admin, $use_tooltip_js, $desactive_bandeau_sup, $id_site, $use_select2; /** * Intégration de twig : * Todo ne pas faire un echo ici et récupérer l'array pour twig, pour pouvoir fusionner les deux templates header et printHeader * Je laisse les infos dans l'ondre original du script, ça serait plus propre de les grouper, pour remplir * l'array pour twig, mais ça serait plus compliqier de suivre les modifs du code, à prévoir en refacto plus tard * * var global twig */ global $twig; $tplArray = []; $tplArray['close'] = $close; global $template; $tplArray['template'] = $template; if (!$desactive_VerifNomPrenomUser) { $desactive_VerifNomPrenomUser = '******'; } // On vérifie que les noms et prénoms ne sont pas vides VerifNomPrenomUser($type_session); /* le header <head> de la page est toujours affiché */ if ($type_session == 'with_session') { echo begin_page(Settings::get('company'), 'with_session'); } else { echo begin_page(Settings::get('company'), 'no_session'); } // Si nous ne sommes pas dans un format imprimable if (!isset($_GET['pview']) || $_GET['pview'] != 1) { // If we dont know the right date then make it up if (!isset($day) || !isset($month) || !isset($year) || $day == '' || $month == '' || $year == '') { $date_now = time(); if ($date_now < Settings::get('begin_bookings')) { $date_ = Settings::get('begin_bookings'); } elseif ($date_now > Settings::get('end_bookings')) { $date_ = Settings::get('end_bookings'); } else { $date_ = $date_now; } $day = date('d', $date_); $month = date('m', $date_); $year = date('Y', $date_); } if (!isset($search_str)) { $search_str = get_vocab('search_for'); } if (empty($search_str)) { $search_str = ''; } if (!(isset($desactive_bandeau_sup) && $desactive_bandeau_sup == 1 && $type_session != 'with_session')) { if (@file_exists('./admin_access_area.php')) { $adm = 1; $racine = '../'; $racineAd = './'; } else { $adm = 0; $racine = './'; $racineAd = './admin/'; } $tplArray['dansRepAdmin'] = $adm; // Génération XML $generationXML = 1; if (Settings::get('export_xml_actif') == 'Oui' && $adm == 0) { include "{$racine}/include/generationxml.php"; } // On fabrique une date valide pour la réservation si ce n'est pas le cas $date_ = mktime(0, 0, 0, $month, $day, $year); if ($date_ < Settings::get('begin_bookings')) { $date_ = Settings::get('begin_bookings'); } elseif ($date_ > Settings::get('end_bookings')) { $date_ = Settings::get('end_bookings'); } $day = date('d', $date_); $month = date('m', $date_); $year = date('Y', $date_); /*echo '<div id="toppanel">'.PHP_EOL; echo '<div id="panel">'.PHP_EOL; echo '<div class="content">'.PHP_EOL; echo '<table id="header">'.PHP_EOL; echo '<tr>'.PHP_EOL;*/ //Logo $nom_picture = $racine . 'images/' . Settings::get('logo'); if (Settings::get('logo') != '' && @file_exists($nom_picture)) { $tplArray['nomPicture'] = $nom_picture; $tplArray['homeLink'] = $racine . page_accueil('yes') . 'day=' . $day . '&year=' . $year . '&month=' . $month; /*echo '<td class="logo" height="100">'.PHP_EOL.'<a href="'.$racine.page_accueil('yes').'day='.$day.'&year='.$year.'&month='.$month.'"><img src="'.$nom_picture.'" alt="logo"/></a>'.PHP_EOL.'</td>'.PHP_EOL;*/ } else { $tplArray['nomPicture'] = false; } //Accueil $tplArray['vocab']['welcome'] = get_vocab('welcome'); $tplArray['company'] = Settings::get('company'); /*echo '<td class="accueil ">',PHP_EOL,'<h2>',PHP_EOL,'<a href="'.$racine.page_accueil('yes'),'day=',$day,'&year=',$year,'&month=',$month,'">',get_vocab('welcome'),' - <b>',Settings::get('company'),'</b></a>',PHP_EOL,'</h2>',PHP_EOL;*/ //Mail réservartion $tplArray['messageAcceuil'] = Settings::get('message_accueil'); //echo Settings::get('message_accueil'); $sql = 'SELECT value FROM ' . TABLE_PREFIX . "_setting WHERE name='mail_etat_destinataire'"; $res = grr_sql_query1($sql); //Libère le résultat de la mémoire grr_sql_free($res); if ($res == 1) { if ($type_session == 'no_session') { /*echo '<td class="contactformulaire">',PHP_EOL,'<input class="btn btn-default" type="submit" rel="popup_name" value="Réserver" onClick="javascript:location.href=\'contactFormulaire.php?day=',$day,'&month=',$month,'&year=',$year,'\'" >',PHP_EOL,'</td>',PHP_EOL;*/ $tplArray['mailEtatDestEtNoSession'] = true; $tplArray['pathToReserver'] = 'contactFormulaire.php?day=' . $day . '&month=' . $month . '&year=' . $year; } else { $tplArray['mailEtatDestEtNoSession'] = false; } } // Administration div Sauvegarde $tplArray['adminUserWithSession'] = false; if ($type_session == 'with_session') { if (authGetUserLevel(getUserName(), -1, 'area') >= 4 || authGetUserLevel(getUserName(), -1, 'user') == 1) { $tplArray['adminUserWithSession'] = true; //echo '<td class="administration">'.PHP_EOL; $tplArray['pathToAdmin'] = $racineAd . "admin_accueil.php?day=" . $day . "&month=" . $month . "&year=" . $year; $tplArray['vocab']['admin'] = get_vocab('admin'); //echo "<br><a href='{$racineAd}admin_accueil.php?day={$day}&month={$month}&year={$year}'>".get_vocab('admin').'</a>'.PHP_EOL; if (authGetUserLevel(getUserName(), -1, 'area') >= 6) { $tplArray['pathToMyslqlSave'] = $racineAd . 'admin_save_mysql.php'; $tplArray['vocab']['submit_backup'] = get_vocab('submit_backup'); /*echo '<br />'.PHP_EOL; echo "<form action='{$racineAd}admin_save_mysql.php' method='get'><div>".PHP_EOL; echo '<input type="hidden" name="flag_connect" value="yes" />'.PHP_EOL; echo '<input type="submit" class="btn btn-default" value="'.get_vocab('submit_backup').'" /></div>'.PHP_EOL; echo '</form>'.PHP_EOL;*/ $tplArray['vocab']['one_connected'] = get_vocab('one_connected'); $tplArray['vocab']['several_connected'] = get_vocab('several_connected'); $tplArray['nb_connect'] = how_many_connected(); $tplArray['pathToViewConnexions'] = $racineAd . 'admin_view_connexions.php'; /** * remove: affiche_pop_up appel, fichier twig alert.html.twig pour gérer les alert, * ATTENTION paramètre "force" non implémenté dans * la fonction affiche_pop_up * * code original : affiche_pop_up(get_vocab('maj_bdd_not_update').get_vocab('please_go_to_admin_maj.php'), 'force'); * Ici le but était dans tous les cas d'affichier le message si besion, je ne vérifie pas les settings */ /* if true, afficher une alert */ if (verif_version()) { $tplArray['erreurVersion'] = get_vocab('maj_bdd_not_update') . get_vocab('please_go_to_admin_maj.php'); } else { $tplArray['erreurVersion'] = false; } } else { $tplArray['pathToMyslqlSave'] = false; } /*echo '</td>'.PHP_EOL;*/ } } if ($type_session != 'with_session') { /*echo '<script>selection()</script>'.PHP_EOL;*/ $tplArray['session'] = false; } else { $tplArray['session'] = true; } /*echo '<td class="configuration" >'.PHP_EOL;*/ if (@file_exists('js/' . $clock_file)) { $tplArray['clockFile'] = $clock_file; /*echo '<div class="clock">'.PHP_EOL; echo '<div id="Date">'.PHP_EOL; echo ' <span id="hours"></span>'.PHP_EOL; echo 'h'.PHP_EOL; echo '<span id="min"></span>'.PHP_EOL; echo '</div></div>'.PHP_EOL;*/ } else { $tplArray['clockFile'] = false; } /* reset attribut session */ $_SESSION['chemin_retour'] = ''; if (isset($_SERVER['QUERY_STRING']) && $_SERVER['QUERY_STRING'] != '') { /** * filtre rapide + urlencode, todo : voir pour mieux faire */ //$parametres_url = htmlspecialchars(strip_tags($_SERVER['QUERY_STRING'])).'&'; $parametres_url = urlencode(filter_var(strip_tags($_SERVER['QUERY_STRING']), FILTER_SANITIZE_URL)); //$_SESSION['chemin_retour'] = traite_grr_url($grr_script_name).'?'.$_SERVER['QUERY_STRING']; $_SESSION['chemin_retour'] = traite_grr_url($grr_script_name) . '?' . $parametres_url; $tplArray['pathToReturn'] = traite_grr_url($grr_script_name) . '?' . $parametres_url; /*echo '<a onclick="charger();" href="'.traite_grr_url($grr_script_name).'?'.$parametres_url.'default_language=fr"><img src="'.$racine.'img_grr/fr_dp.png" alt="France" title="france" width="20" height="13" class="image" /></a>'.PHP_EOL; echo '<a onclick="charger();" href="'.traite_grr_url($grr_script_name).'?'.$parametres_url.'default_language=de"><img src="'.$racine.'img_grr/de_dp.png" alt="Deutch" title="deutch" width="20" height="13" class="image" /></a>'.PHP_EOL; echo '<a onclick="charger();" href="'.traite_grr_url($grr_script_name).'?'.$parametres_url.'default_language=en"><img src="'.$racine.'img_grr/en_dp.png" alt="English" title="English" width="20" height="13" class="image" /></a>'.PHP_EOL; echo '<a onclick="charger();" href="'.traite_grr_url($grr_script_name).'?'.$parametres_url.'default_language=it"><img src="'.$racine.'img_grr/it_dp.png" alt="Italiano" title="Italiano" width="20" height="13" class="image" /></a>'.PHP_EOL; echo '<a onclick="charger();" href="'.traite_grr_url($grr_script_name).'?'.$parametres_url.'default_language=es"><img src="'.$racine.'img_grr/es_dp.png" alt="Spanish" title="Spanish" width="20" height="13" class="image" /></a>'.PHP_EOL; */ } if ($type_session == 'no_session') { $tplArray['ssoStatus'] = Settings::get('sso_statut'); if (Settings::get('sso_statut') == 'cas_visiteur' || Settings::get('sso_statut') == 'cas_utilisateur') { $tplArray['vocab']['authentification'] = get_vocab('authentification'); $tplArray['vocab']['connect_local'] = get_vocab('connect_local'); /*echo '<br /> <a href="index.php?force_authentification=y">'.get_vocab('authentification').'</a>'.PHP_EOL; echo '<br /> <small><i><a href="login.php">'.get_vocab('connect_local').'</a></i></small>'.PHP_EOL;*/ } else { /*echo '<br /> <a href="login.php">'.get_vocab('connect').'</a>'.PHP_EOL;*/ $tplArray['vocab']['connect'] = get_vocab('connect'); } } else { $tplArray['vocab']['welcome_to'] = get_vocab('welcome_to'); $tplArray['vocab']['manage_my_account'] = get_vocab('manage_my_account'); $tplArray['pathToMyAccount'] = $racine . 'my_account.php?day=' . $day . '&year=' . $year . '&=' . $month; $tplArray['prenom'] = htmlspecialchars($_SESSION['prenom']); $tplArray['nom'] = htmlspecialchars($_SESSION['nom']); /*echo '<br /> <b>'.get_vocab('welcome_to').htmlspecialchars($_SESSION['prenom']).' '.htmlspecialchars($_SESSION['nom']).'</b>'.PHP_EOL; echo '<br /> <a href="'.$racine.'my_account.php?day='.$day.'&year='.$year.'&month='.$month.'">'.get_vocab('manage_my_account').'</a>'.PHP_EOL;*/ if (verif_access_search(getUserName())) { $tplArray['searchAccess'] = true; $tplArray['pathToReport'] = $racine . 'report.php'; $tplArray['vocab']['report'] = get_vocab('report'); //echo '<br/><a href="'.$racine.'report.php">'.get_vocab('report').'</a>'.PHP_EOL; } else { $tplArray['searchAccess'] = false; } $disconnect_link = false; if (!(Settings::get('cacher_lien_deconnecter') == 'y' && isset($_SESSION['est_authentifie_sso']))) { $disconnect_link = true; $tplArray['disconnectLink'] = true; $tplArray['vocab']['disconnect'] = get_vocab('disconnect'); if (Settings::get('authentification_obli') == 1) { $tplArray['authentificationObli'] = true; $tplArray['pathToLogout'] = $racine . 'logout.php?auto=0'; //echo '<br /> <a href="'.$racine.'logout.php?auto=0" >'.get_vocab('disconnect').'</a>'.PHP_EOL; } else { $tplArray['authentificationObli'] = false; $tplArray['pathToLogout'] = $racine . 'logout.php?auto=0&redirect_page_accueil=yes'; /*echo '<br /> <a href="'.$racine.'logout.php?auto=0&redirect_page_accueil=yes" >'.get_vocab('disconnect').'</a>'.PHP_EOL;*/ } } else { $tplArray['disconnectLink'] = false; } if (Settings::get('Url_portail_sso') != '' && isset($_SESSION['est_authentifie_sso'])) { $tplArray['portailSso'] = Settings::get('Url_portail_sso'); $tplArray['vocab']['Portail_accueil'] = get_vocab('Portail_accueil'); if ($disconnect_link) { echo ' - ' . PHP_EOL; } else { echo '<br />' . PHP_EOL; } //echo '<a href="'.Settings::get('Url_portail_sso').'">'.get_vocab('Portail_accueil').'</a>'.PHP_EOL; } else { $tplArray['portailSso'] = false; } if (Settings::get('sso_statut') == 'lasso_visiteur' || Settings::get('sso_statut') == 'lasso_utilisateur') { $tplArray['ssoStatus'] = Settings::get('sso_statut'); //echo '<br />'; if ($_SESSION['lasso_nameid'] == null) { $tplArray['lasso_nameid'] = false; $tplArray['vocab']['lasso_federate_this_account'] = get_vocab('lasso_federate_this_account'); /*echo '<a href="lasso/federate.php">'.get_vocab('lasso_federate_this_account').'</a>'.PHP_EOL;*/ } else { $tplArray['lasso_nameid'] = true; $tplArray['vocab']['lasso_defederate_this_account'] = get_vocab('lasso_defederate_this_account'); /*echo '<a href="lasso/defederate.php">'.get_vocab('lasso_defederate_this_account').'</a>'.PHP_EOL;*/ } } } /* echo '</td>'.PHP_EOL; echo '</tr>'.PHP_EOL; echo '</table>'.PHP_EOL; echo '</div>'.PHP_EOL; echo '</div>'.PHP_EOL; echo '<div class="tab">'.PHP_EOL; // echo '<ul class="login">'.PHP_EOL; //echo '<li>'.PHP_EOL; echo '<a id="open" class="open" href="#">Menu <i>(ouvrir/fermer)</i></a>'.PHP_EOL; // echo '</li>'.PHP_EOL; // echo '</ul>'.PHP_EOL; echo '</div>'.PHP_EOL; echo '</div>'.PHP_EOL;*/ if ($display) { if ($admin) { echo $twig->render('printHeaderAdmin.html.twig', $tplArray); } else { echo $twig->render('printHeader.html.twig', $tplArray); } } else { return $tplArray; } } } }
$id_room = isset($_GET["id_room"]) ? $_GET["id_room"] : NULL; if (isset($id_room)) { settype($id_room, "integer"); } else { $print = "all"; } if (Settings::get("authentification_obli") == 0 && getUserName() == '') { $type_session = "no_session"; } else { $type_session = "with_session"; } if (authGetUserLevel(getUserName(), -1) < 1 && Settings::get("authentification_obli") == 1 || !verif_acces_ressource(getUserName(), $id_room)) { showAccessDenied(''); exit; } echo begin_page(get_vocab("mrbs") . get_vocab("deux_points") . Settings::get("company")); $res = grr_sql_query("SELECT * FROM " . TABLE_PREFIX . "_room WHERE id={$id_room}"); if (!$res) { fatal_error(0, get_vocab('error_room') . $id_room . get_vocab('not_found')); } $row = grr_sql_row_keyed($res, 0); grr_sql_free($res); echo "<h3 style=\"text-align:center;\">"; echo get_vocab("room") . get_vocab("deux_points") . " " . htmlspecialchars($row["room_name"]); $id_area = mrbsGetRoomArea($id_room); $area_name = grr_sql_query1("select area_name from " . TABLE_PREFIX . "_area where id='" . $id_area . "'"); $area_access = grr_sql_query1("select access from " . TABLE_PREFIX . "_area where id='" . $id_area . "'"); echo "<br />(" . $area_name; if ($area_access == 'r') { echo " - " . get_vocab("access"); }
function todo_file_exist_error() { global $_TODO_FILENAME, $txt; show_title($txt['fatal_error']); begin_page($txt['fatal_error'], $txt['fatal_error_class']); echo $txt['unexistant_todo_file_text']; end_page(); log_write($txt['todo_regeneration_log'] . $_TODO_FILENAME); $f = fopen($_TODO_FILENAME, "wb"); fwrite($f, $txt['default_todo_file_data']); fclose($f); }
// Inclusion de la lib' de gestion de la todo list require "todo_list_manager.php"; // Traitement des demandes if (isset($_GET['action']) && $_GET['action'] != 'see') { $todo_class = $_GET['action']; switch ($_GET['action']) { case 'push': todo_push(); break; case 'pop': todo_pop(); break; case 'update': todo_update(); break; case 'clear': todo_clear(); break; case 'download': todo_download(); break; default: show_title($txt['error']); begin_page($txt['error'], $txt['error_class']); echo $txt['undefined_action']; end_page(); } } else { $todo_class = 'see'; todo_see(); }
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ include "../include/admin.inc.php"; $grr_script_name = "admin_open_mysql.php"; $back = ""; $day = date("d"); $month = date("m"); $year = date("Y"); check_access(6, $back); $sql_file = isset($_FILES["sql_file"]) ? $_FILES["sql_file"] : NULL; $file_name = isset($_GET["file_name"]) ? $_GET["file_name"] : NULL; VerifyModeDemo(); if (!$file_name) { print_header("", "", "", $type = "with_session"); } else { echo begin_page("", "no_session"); } echo "<div class=\"page_sans_col_gauche\">"; echo "<br />"; if (!$file_name && !$sql_file['name']) { exit(get_vocab("admin_import_users_csv11") . "<br /><a href=\"admin_config.php?page_config=4\">" . get_vocab("back") . "</a></div></body></html>"); } if (!$file_name) { echo "<h3>Restauration à partir du ficher : "; echo $sql_file['name'] . "</h3>\n"; $file_name = str_replace("\\", "/", dirname($sql_file['tmp_name']) . "/" . $sql_file['name']); $ok = @copy($sql_file['tmp_name'], $file_name); $file = fopen($file_name, "r") or exit("Unable to open file!"); $line = fgets($file); var_dump($line); if (!stristr($line, '#**************** BASE DE DONNEES')) {
header('Location: ' . $url); die; } else { header('Location: ./' . htmlspecialchars_decode(page_accueil()) . ''); die; } } } $tplArray = []; // Dans le cas d'une démo, on met à jour la base une fois par jour. MajMysqlModeDemo(); //si on a interdit l'acces a la page login if (Settings::get('Url_cacher_page_login') != '' && (!isset($sso_super_admin) || $sso_super_admin == false) && !isset($_GET['local'])) { header('Location: ./index.php'); } echo begin_page(get_vocab('mrbs') . get_vocab('deux_points') . Settings::get('company'), 'no_session'); /*<!--<script type="text/javascript" src="js/functions.js" ></script> <div class="center">-->*/ $nom_picture = './images/' . Settings::get('logo'); if (Settings::get('logo') != '' && @file_exists($nom_picture)) { $tplArray['pathLogo'] = $nom_picture; /*echo "<a href=\"javascript:history.back()\"><img src=\"".$nom_picture."\" alt=\"logo\" /></a>\n";"";*/ } else { $tplArray['pathLogo'] = false; } $tplArray['settings']['title'] = Settings::get('title_home_page'); $tplArray['settings']['company'] = Settings::get('company'); $tplArray['settings']['message'] = Settings::get('message_home_page'); $tplArray['settings']['disableLogin'] = Settings::get('disable_login'); $tplArray['vocab']['msg_login3'] = get_vocab('msg_login3'); /*<h1>
if (!isset($_GET['mdp']) && isset($argv[1])) { $_GET['mdp'] = $argv[1]; } if (isset($_GET['mdp'])) { include "../include/connect.inc.php"; include "../include/config.inc.php"; include "../include/misc.inc.php"; include "../include/functions.inc.php"; include "../include/{$dbsys}.inc.php"; include "../include/settings.class.php"; if (!Settings::load()) { die("Erreur chargement settings"); } if ($_GET['mdp'] != Settings::get("motdepasse_backup") || Settings::get("motdepasse_backup") == '') { if (!isset($argv[1])) { echo begin_page("backup", $page = "no_session") . "<p>"; } echo "Le mot de passe fourni est invalide."; if (!isset($argv[1])) { echo "</p>"; include "../include/trailer.inc.php"; } die; } } else { include "../include/admin.inc.php"; $back = ''; if (isset($_SERVER['HTTP_REFERER'])) { $back = htmlspecialchars($_SERVER['HTTP_REFERER']); } if (authGetUserLevel(getUserName(), -1) < 6) {
} include "include/language.inc.php"; if (!isset($_GET['mdp'])) { $_GET['mdp'] = $argv[1]; } if (!isset($_GET['mdp']) || $_GET['mdp'] != Settings::get("motdepasse_verif_auto_grr") || Settings::get("motdepasse_verif_auto_grr") == '') { if (!isset($argv[1])) { echo begin_page($titre, $page = "no_session") . "<p>"; } echo "Le mot de passe fourni est invalide."; if (!isset($argv[1])) { echo "</p>"; include "include/trailer.inc.php"; } die; } if (!isset($argv[1])) { echo begin_page($titre, $page = "no_session"); } // On vérifie une fois par jour si le délai de confirmation des réservations est dépassé // Si oui, les réservations concernées sont supprimées et un mail automatique est envoyé. verify_confirm_reservation(); // On vérifie une fois par jour que les ressources ont été rendue en fin de réservation // Si non, une notification email est envoyée verify_retard_reservation(); if (!isset($argv[1])) { echo "<p>Le script a été exécuté.</p>"; include "include/trailer.inc.php"; } else { echo "Le script a ete execute."; }
// Redirect header("Location: private.php?action=read&pmid=" . $_GET['pm']); } else { if (isset($_GET['profile'])) { // Display the profile of the user with the specified username $username = mysql_escape_string($_GET['profile']); // Get user ID $user = get_user_by_username($username); // Redirect header("Location: member.php?action=profile&uid=" . $user['uid']); } else { if (isset($_GET['feedback'])) { // Decode parameters $params = json_decode($_GET['feedback']); // Create a submit form and submit begin_page(); end_header(); ?> <form id="newthread_form" method="post" action="newthread.php?fid=<?php echo FORUM_FEEDBACK; ?> &processed=1"> <input type="hidden" name="my_post_key" value="<?php echo generate_post_check(); ?> " /> <input type="hidden" name="subject" value="" /> <input type="hidden" name="icon" value="-1" /> <input type="hidden" name="action" value="do_newthread" /> <input type="hidden" name="posthash" value="<?php md5($mybb_user['uid'] . random_str());
<?php include 'includes/common.php'; begin_page('de'); ?> <h2> Mirrors / Spiegel </h2> <ul> <li><a href="http://ngircd.barton.de/">ngircd.barton.de</a> <li><a href="http://ngircd.mirror.3rz.org">ngircd.mirror.3rz.org</a> </ul> <?php end_page();
function print_header($day='',$month='',$year='',$area='',$type_session='with_session',$page='no_admin',$room='') { global $vocab, $search_str, $grrSettings, $clock_file, $desactive_VerifNomPrenomUser, $grr_script_name; global $use_prototype, $use_tooltip_js, $desactive_bandeau_sup, $id_site; if (!($desactive_VerifNomPrenomUser)) $desactive_VerifNomPrenomUser = '******'; // On vérifie que les noms et prénoms ne sont pas vides VerifNomPrenomUser($type_session); if ($type_session == "with_session") echo begin_page(get_vocab("mrbs").get_vocab("deux_points").getSettingValue("company"),"with_session"); else echo begin_page(get_vocab("mrbs").get_vocab("deux_points").getSettingValue("company"),"no_session"); // Si nous ne sommes pas dans un format imprimable if ((!isset($_GET['pview'])) or ($_GET['pview'] != 1)) { # If we dont know the right date then make it up if (!isset($day) or !isset($month) or !isset($year) or ($day == '') or ($month == '') or ($year == '')) { $date_now = mktime(); if ($date_now < getSettingValue("begin_bookings")) $date_ = getSettingValue("begin_bookings"); else if ($date_now > getSettingValue("end_bookings")) $date_ = getSettingValue("end_bookings"); else $date_ = $date_now; $day = date("d",$date_); $month = date("m",$date_); $year = date("Y",$date_); } if (!(isset($search_str))) $search_str = get_vocab("search_for"); if (empty($search_str)) $search_str = ""; ?> <script type="text/javascript"> chaine_recherche = "<?php echo $search_str; ?>"; function onsubmitForm() { if(document.pressed == 'a') { document.getElementById('day').selectedIndex=<?php $date_now = mktime();echo (date("d",$date_now)-1); ?>; document.getElementById('month').selectedIndex=<?php echo (date("m",$date_now)-1);?>; document.getElementById('year').selectedIndex=<?php echo (date("Y",$date_now)-strftime("%Y", getSettingValue("begin_bookings")));?>; var p=location.pathname; if(!p.match("day.php") && !p.match("week.php") && !p.match("week_all.php") && !p.match("month.php") && !p.match("month_all.php") && !p.match("month_all2.php") && !p.match("year.php")) document.getElementById('myform').action ="day.php"; } if(document.pressed == 'd') document.getElementById('myform').action ="day.php"; if(document.pressed == 'w') <?php echo " document.getElementById('myform').action = \""; if ($room=="") echo "week_all.php"; else echo "week.php"; echo "\";\n"; ?> if(document.pressed == 'm') <?php echo " document.getElementById('myform').action = \""; if ($room=="") { if (isset($_SESSION['type_month_all'])) {echo $_SESSION['type_month_all'].".php";} else {echo "month_all.php";} } else echo "month.php"; echo "\";\n"; ?> return true; } </script> <?php if (!(isset($desactive_bandeau_sup) and ($desactive_bandeau_sup==1) and ($type_session != 'with_session'))) { // On fabrique une date valide pour la réservation si ce n'est pas le cas $date_ = mktime(0, 0, 0, $month, $day, $year); if ($date_ < getSettingValue("begin_bookings")) $date_ = getSettingValue("begin_bookings"); else if ($date_ > getSettingValue("end_bookings")) $date_ = getSettingValue("end_bookings"); $day = date("d",$date_); $month = date("m",$date_); $year = date("Y",$date_); ?> <table width="100%" border="0"> <tr> <td class="border_banner"> <table width="100%" border="0"> <tr> <?php $nom_picture = "./images/".getSettingValue("logo"); if ((getSettingValue("logo")!='') and (@file_exists($nom_picture))) echo "<td class=\"banner\"><img src=\"".$nom_picture."\" class=\"image\" alt=\"logo\" /></td>\n"; echo "<td class=\"banner\">\n"; echo " <a href=\"".page_accueil('yes')."day=$day&year=$year&month=$month\">".get_vocab("welcome")."</a>"; echo " - <b>".getSettingValue("company")."</b>"; if ($type_session == 'no_session') { if ((getSettingValue('sso_statut') == 'cas_visiteur') or (getSettingValue('sso_statut') == 'cas_utilisateur')) { echo "<br /> <a href='index.php?force_authentification=y'>".get_vocab("authentification")."</a>"; // echo "<br /> <small><i><a href='login.php?url=".rawurlencode(str_replace('&','&',get_request_uri()))."'>".get_vocab("connect_local")."</a></i></small>"; // corrige un bug dans le calcul de la page d'accueil après connexion. echo "<br /> <small><i><a href='login.php'>".get_vocab("connect_local")."</a></i></small>"; } else { // echo "<br /> <a href='login.php?url=".rawurlencode(str_replace('&','&',get_request_uri()))."'>".get_vocab("connect")."</a>"; // corrige un bug dans le calcul de la page d'accueil après connexion. echo "<br /> <a href='login.php'>".get_vocab("connect")."</a>"; } } else { echo "<br /> <b>".get_vocab("welcome_to").grr_htmlSpecialChars($_SESSION['prenom'])." ".grr_htmlSpecialChars($_SESSION['nom'])."</b>"; echo "<br /> <a href=\"my_account.php?day=".$day."&year=".$year."&month=".$month."\">".get_vocab("manage_my_account")."</a>"; //if ($type_session == "with_session") { $parametres_url = ''; $_SESSION['chemin_retour'] = ''; if (isset($_SERVER['QUERY_STRING']) and ($_SERVER['QUERY_STRING'] != '')) { // Il y a des paramètres à passer $parametres_url = grr_htmlSpecialChars($_SERVER['QUERY_STRING'])."&"; $_SESSION['chemin_retour'] = traite_grr_url($grr_script_name)."?". $_SERVER['QUERY_STRING']; } echo " - <a href=\"".traite_grr_url($grr_script_name)."?".$parametres_url."default_language=fr\"><img src=\"img_grr/fr_dp.png\" alt=\"France\" title=\"france\" width=\"20\" height=\"13\" class=\"image\" /></a>\n"; echo "<a href=\"".traite_grr_url($grr_script_name)."?".$parametres_url."default_language=de\"><img src=\"img_grr/de_dp.png\" alt=\"Deutch\" title=\"deutch\" width=\"20\" height=\"13\" class=\"image\" /></a>\n"; echo "<a href=\"".traite_grr_url($grr_script_name)."?".$parametres_url."default_language=en\"><img src=\"img_grr/en_dp.png\" alt=\"English\" title=\"English\" width=\"20\" height=\"13\" class=\"image\" /></a>\n"; echo "<a href=\"".traite_grr_url($grr_script_name)."?".$parametres_url."default_language=it\"><img src=\"img_grr/it_dp.png\" alt=\"Italiano\" title=\"Italiano\" width=\"20\" height=\"13\" class=\"image\" /></a>\n"; echo "<a href=\"".traite_grr_url($grr_script_name)."?".$parametres_url."default_language=es\"><img src=\"img_grr/es_dp.png\" alt=\"Spanish\" title=\"Spanish\" width=\"20\" height=\"13\" class=\"image\" /></a>\n"; //} $disconnect_link = false; if (!((getSettingValue("cacher_lien_deconnecter")=='y') and (isset($_SESSION['est_authentifie_sso'])))) { // on n'affiche pas le lien logout dans le cas d'un utilisateur LCS connecté. $disconnect_link = true; if (getSettingValue("authentification_obli") == 1) { echo "<br /> <a href=\"./logout.php?auto=0\" >".get_vocab('disconnect')."</a>"; } else { echo "<br /> <a href=\"./logout.php?auto=0&redirect_page_accueil=yes\" >".get_vocab('disconnect')."</a>"; } } if ((getSettingValue("Url_portail_sso")!='') and (isset($_SESSION['est_authentifie_sso']))) { if ($disconnect_link) echo " - "; else echo "<br /> "; echo('<a href="'.getSettingValue("Url_portail_sso").'">'.get_vocab("Portail_accueil").'</a>'); } // Cas d'une authentification LASSO if ((getSettingValue('sso_statut') == 'lasso_visiteur') or (getSettingValue('sso_statut') == 'lasso_utilisateur')) { echo "<br /> "; if ($_SESSION['lasso_nameid'] == NULL) echo "<a href=\"lasso/federate.php\">".get_vocab('lasso_federate_this_account')."</a>"; else echo "<a href=\"lasso/defederate.php\">".get_vocab('lasso_defederate_this_account')."</a>"; } } ?> </td> <?php if (((isset($area)) and ($area > 0)) or ((isset($room)) and ($room > 0))) // si aucune ressource ni domaine ne sont définis, on affiche pas la colonne de sélection du jour $affiche_col_date = TRUE; else $affiche_col_date = FALSE; if (($page=="no_admin") and ($affiche_col_date)) { ?> <td class="banner" align="center"> <form id="myform" action="" method="get" onsubmit="return onsubmitForm();"><div> <?php genDateSelector("", $day, $month, $year,""); if ((isset($area)) and ($area > 0)) echo "<input type=\"hidden\" id=\"area_\" name=\"area\" value=\"$area\" />"; if ((isset($room)) and ($room > 0)) echo "<input type=\"hidden\" id=\"room_\" name=\"room\" value=\"$room\" />"; ?> <input type="submit" value="<?php echo get_vocab("gototoday") ?>" onclick="document.pressed='a'" /> <br /> <br /> <input type="submit" value="<?php echo get_vocab("allday") ?>" onclick="document.pressed='d'" /> <input type="submit" value="<?php echo get_vocab("week") ?>" onclick="document.pressed='w'" /> <input type="submit" value="<?php echo get_vocab("month") ?>" onclick="document.pressed='m'" /> </div></form> </td> <?php } if ($type_session == "with_session") { if ((authGetUserLevel(getUserName(),-1,'area') >= 4) or (authGetUserLevel(getUserName(),-1,'user') == 1)) { echo "<td class=\"banner\" align=\"center\">"; echo "<a href='admin_accueil.php?day=$day&month=$month&year=$year'>".get_vocab("admin")."</a>\n"; if(authGetUserLevel(getUserName(),-1,'area') >= 6) { echo "<br />\n<form action=\"admin_save_mysql.php\" method=\"get\"><div>\n <input type=\"hidden\" name=\"flag_connect\" value=\"yes\" />\n <input type=\"submit\" value=\"".get_vocab("submit_backup")."\" /></div>\n </form>"; how_many_connected(); } echo "\n</td>"; } } ?> <td class="banner" align="center"> <?php if (@file_exists($clock_file)) { echo "<script type=\"text/javascript\">"; echo "<!--\n"; echo "new LiveClock();\n"; echo "//-->"; echo "</script><br />"; } echo grr_help("","")."<br />"; if (verif_access_search(getUserName())) { echo "<a href=\"report.php\">".get_vocab("report")."</a><br />"; } echo "<span class=\"small\">".affiche_version()."</span> - "; if ($type_session == "with_session") { if ($_SESSION['statut'] == 'administrateur') { echo affiche_lien_contact("contact_support","identifiant:non","seulement_si_email"); } else { echo affiche_lien_contact("contact_administrateur","identifiant:non","seulement_si_email"); } } else { echo affiche_lien_contact("contact_administrateur","identifiant:non","seulement_si_email"); } ?> </td> </tr> </table> </td> </tr> </table> <?php } if (isset($use_prototype)) echo "<script type=\"text/javascript\" src=\"./include/prototype-1.6.0.3.js\"></script>"; if (isset($use_tooltip_js)) echo "<script type=\"text/javascript\" src=\"./include/tooltip.js\"></script>"; echo getSettingValue('message_accueil'); } }
} // Cas de PHP4 en mode CGI sur IIS } else { if (isset($_SERVER['HTTP_AUTHORIZATION']) && !empty($_SERVER['HTTP_AUTHORIZATION'])) { list($login, $pw) = explode(':', base64_decode(substr($_SERVER['HTTP_AUTHORIZATION'], 6))); } else { // on demande de s'identifier // A ce stade : // - soit l'utilisateur ne s'est pas encore identifié // - soit l'utilisateur s'est identifié mais de façon incorrecte // - soit l'utilisateur s'est identifié de façon correcte mais l'identifiant n'a pas pu être récupéré. $my_message = "Module d'authentification de GRR"; header('WWW-Authenticate: Basic realm="' . $my_message . '"'); header('HTTP/1.0 401 Unauthorized'); // en cas d'annulation echo begin_page(get_vocab("mrbs"), "no_session"); echo "<h3>" . get_vocab("wrong_pwd") . "</h3>"; echo "<h3>" . get_vocab("connexion_a_grr_non_autorisee") . "</h3>"; echo "</body></html>"; exit; } } } } // A ce stade, l'utilisateur est authentifié et $login n'est pas vide via le serveur apache $user_ext_authentifie = 'apache'; $password = ''; $result = grr_opensession($login, $password, $user_ext_authentifie); // On écrit les données de session et ferme la session session_write_close(); $message = '';
require_once "./include/session.inc.php"; require_once "./include/settings.class.php"; grr_resumeSession(); require_once "./include/language.inc.php"; require_once SPKITLASSO . '/lassospkit_public_api.inc.php'; if (lassospkit_nameid() == NULL) { // TODO: vérifier qu'il n'existe pas déjà une fédération pour le // compte courant $return_url = $_SERVER['REQUEST_URI']; lassospkit_redirect_federate($return_url); exit; } //Chargement des valeurs de la table settingS require_once "./include/language.inc.php"; require_once "./include/functions.inc.php"; echo begin_page(Settings::get("company") . get_vocab("deux_points") . get_vocab("mrbs"), "no_session"); if (lassospkit_userid() == NULL) { if (getUserName() != '') { lassospkit_set_userid(getUserName()); echo get_vocab('lasso_federated'); } else { echo get_vocab('lasso_please_connect'); } echo "<br />"; echo "<a href='{$_SERVER['HTTP_REFERER']}'>" . get_vocab('back') . '</a>'; } else { echo get_vocab('lasso_already_federated'); echo "<ul>"; echo "<li>" . get_vocab('lasso_local_user') . ": <code>" . lassospkit_userid() . "</code></li>"; $idps = lassospkit_nameid(); foreach ($idps as $idp => $nameid) {
// Resume session $fin_session = 'n'; if (!grr_resumeSession()) { $fin_session = 'y'; } if ($fin_session == 'y' && Settings::get("authentification_obli") == 1) { header("Location: ./logout.php?auto=1&url={$url}"); die; } if (Settings::get("authentification_obli") == 0 && getUserName() == '') { $type_session = "no_session"; } else { $type_session = "with_session"; } header('Content-Type: text/html; charset=utf-8'); echo begin_page(Settings::get("company")); echo "<div class=\"page_sans_col_gauche\">"; $cible = isset($_POST["cible"]) ? $_POST["cible"] : (isset($_GET["cible"]) ? $_GET["cible"] : ''); $cible = htmlentities($cible); $type_cible = isset($_POST["type_cible"]) ? $_POST["type_cible"] : (isset($_GET["type_cible"]) ? $_GET["type_cible"] : ''); if ($type_cible != 'identifiant:non') { $type_cible = ''; } $action = isset($_POST["action"]) ? $_POST["action"] : ''; $corps_message = isset($_POST["message"]) ? $_POST["message"] : ''; $email_reponse = isset($_POST["email_reponse"]) ? $_POST["email_reponse"] : ''; $error_subject = 'n'; if (isset($_POST["objet_message"])) { $objet_message = trim($_POST["objet_message"]); if ($objet_message == '') { $error_subject = 'y';
if (isset($_GET['url'])) { $url = rawurlencode($_GET['url']); header('Location: login.php?url=' . $url); exit; } //redirection vers l'url de déconnexion $url = Settings::get('url_disconnect'); if ($url != '') { header("Location: {$url}"); exit; } if (isset($_GET['redirect_page_accueil']) && $_GET['redirect_page_accueil'] == 'yes') { header('Location: ./' . htmlspecialchars_decode(page_accueil()) . ''); exit; } echo begin_page(get_vocab('mrbs'), 'no_session'); if (!$_GET['auto']) { //echo(get_vocab('msg_logout1').'<br/>'); $tplArray['message'] = get_vocab('msg_logout1'); } else { //echo(get_vocab('msg_logout2').'<br/>'); $tplArray['message'] = get_vocab('msg_logout2'); } /* <!--<div class="center"> <h1> <?php if (!$_GET['auto']) { echo(get_vocab('msg_logout1').'<br/>'); } else { echo(get_vocab('msg_logout2').'<br/>');