Skip to content

Commit

Permalink
correction retour à la page précédente
Browse files Browse the repository at this point in the history
  • Loading branch information
cdaviau committed May 31, 2024
1 parent c7d6979 commit af73204
Show file tree
Hide file tree
Showing 55 changed files with 149 additions and 194 deletions.
4 changes: 1 addition & 3 deletions admin/admin_access_area.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@
$msg = '';


$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
$day = date("d");
$month = date("m");
$year = date("Y");
Expand Down
4 changes: 1 addition & 3 deletions admin/admin_accueil.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
*/
include "../include/admin.inc.php";
$grr_script_name = "admin_accueil.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
if ((authGetUserLevel(getUserName(), -1, 'area') < 4) && (authGetUserLevel(getUserName(), -1, 'user') != 1))
{
showAccessDenied($back);
Expand Down
7 changes: 3 additions & 4 deletions admin/admin_admin_site.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,8 @@
$id_site = get_default_site();
if (!isset($id_site))
settype($id_site, "integer");
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();

check_access(6, $back);
if (Settings::get("module_multisite") != "Oui")
{
Expand Down Expand Up @@ -174,4 +173,4 @@ function site_go()
echo "</td></tr></table>";
?>
</body>
</html>
</html>
3 changes: 1 addition & 2 deletions admin/admin_calend.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@
include "../include/admin.inc.php";
$grr_script_name = "admin_calend.php";

$back = '';
if (isset($_SERVER['HTTP_REFERER'])) $back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();

// vérification des droits d'accès
if(authGetUserLevel(getUserName(),-1,'area') < 5)
Expand Down
6 changes: 2 additions & 4 deletions admin/admin_calend2.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
include "../include/admin.inc.php";
$grr_script_name = "admin_calend2.php";

$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
check_access(4, $back);
// Initialisation
$etape = isset($_POST["etape"]) ? $_POST["etape"] : NULL;
Expand Down Expand Up @@ -509,4 +507,4 @@ function validate_and_submit ()
echo "</td></tr></table>";
?>
</body>
</html>
</html>
6 changes: 3 additions & 3 deletions admin/admin_calend_ignore.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@

include "../include/admin.inc.php";
$grr_script_name = "admin_calend_ignore.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);

$back = getBackUri();

check_access(6, $back);
# print the page header
print_header("", "", "", $type="with_session");
Expand Down
4 changes: 1 addition & 3 deletions admin/admin_calend_jour_cycle.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

include "../include/admin.inc.php";
$grr_script_name = "admin_calend_jour_cycle.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
$_SESSION['chemin_retour'] = "admin_calend_jour_cycle.php";
$day = date("d");
$month = date("m");
Expand Down
4 changes: 1 addition & 3 deletions admin/admin_calend_vacances_feries.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

include "../include/admin.inc.php";
$grr_script_name = "admin_calend_vacances_feries.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
check_access(6, $back);
# print the page header
print_header("", "", "", $type="with_session");
Expand Down
6 changes: 2 additions & 4 deletions admin/admin_cgu.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
include "../include/admin.inc.php";
require_once("../include/pages.class.php");
$grr_script_name = "admin_cgu.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
$_SESSION['chemin_retour'] = "admin_cgu.php";
$day = date("d");
$month = date("m");
Expand Down Expand Up @@ -96,4 +94,4 @@

// fin de l'affichage de la colonne de droite
echo '</td></tr></table>';
?>
?>
4 changes: 1 addition & 3 deletions admin/admin_change_pwd.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

include "../include/admin.inc.php";
$grr_script_name = "admin_change_pwd.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
check_access(6, $back);
// Restriction dans le cas d'une démo
VerifyModeDemo();
Expand Down
4 changes: 1 addition & 3 deletions admin/admin_config.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@

include "../include/admin.inc.php";
$grr_script_name = "admin_config.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
$_SESSION['chemin_retour'] = "admin_config.php";
$day = date("d");
$month = date("m");
Expand Down
6 changes: 2 additions & 4 deletions admin/admin_config_calend2.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@
*/

$grr_script_name = "admin_config_calend2.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
check_access(6, $back);
# print the page header
print_header("", "", "", $type="with_session");
Expand Down Expand Up @@ -144,4 +142,4 @@
echo "</td></tr></table>";
?>
</body>
</html>
</html>
5 changes: 2 additions & 3 deletions admin/admin_config_calend3.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,7 @@ function cal3($month, $year)
$s .= "</table>\n";
return $s;
}
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
check_access(6, $back);
print_header("", "", "", $type = "with_session");
// Affichage de la colonne de gauche
Expand Down Expand Up @@ -230,4 +229,4 @@ function check (select)
}
</script>
</body>
</html>
</html>
6 changes: 2 additions & 4 deletions admin/admin_config_imap.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,7 @@
$grrSettings['imap_statut'] = $_POST['imap_statut'];
}
}
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
if ((isset($imap_restrictions)) && ($imap_restrictions == true))
{
showAccessDenied($back);
Expand Down Expand Up @@ -311,4 +309,4 @@
echo "</td></tr></table>";
?>
</body>
</html>
</html>
4 changes: 1 addition & 3 deletions admin/admin_config_ldap.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,7 @@
<?php
die();
};
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
if ((isset($ldap_restrictions)) && ($ldap_restrictions == true))
{
showAccessDenied($back);
Expand Down
7 changes: 2 additions & 5 deletions admin/admin_config_sso.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
include "../include/admin.inc.php";
$grr_script_name = "admin_config_sso.php";

$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
if ((isset($sso_restrictions)) && ($sso_restrictions==true))
{
showAccessDenied($back);
Expand Down Expand Up @@ -138,8 +136,7 @@
echo "Erreur lors de l'enregistrement de sso_redirection_accueil_grr !<br />";
}

if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
if ((authGetUserLevel(getUserName(), -1) < 6) && ($valid != 'yes'))
{
showAccessDenied($back);
Expand Down
5 changes: 2 additions & 3 deletions admin/admin_confirm_change_date_bookings.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@

include "../include/admin.inc.php";
$grr_script_name = "admin_confirm_change_date_bookings.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);

$back = getBackUri();
unset($display);
$display = isset($_GET["display"]) ? $_GET["display"] : NULL;
$day = date("d");
Expand Down
8 changes: 2 additions & 6 deletions admin/admin_corresp_statut.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

include "../include/admin.inc.php";
$grr_script_name = "admin_config_sso.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
if (Settings::get("sso_ac_corr_profil_statut") != 'y')
{
showAccessDenied($back);
Expand Down Expand Up @@ -76,9 +74,7 @@
else
$msg = get_vocab("message_records");
}
$back = "";
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
//print the page header
print_header("", "", "", $type="with_session");
// Affichage de la colonne de gauche
Expand Down
6 changes: 2 additions & 4 deletions admin/admin_delete_entry_after.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

include "../include/admin.inc.php";
$grr_script_name = "admin_delete_entry_after.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
$_SESSION['chemin_retour'] = "admin_config.php";

if (!Settings::load()) {
Expand Down Expand Up @@ -132,4 +130,4 @@

echo "<a href=\"admin_calend.php\">".get_vocab('returnprev')."</a><p>";

include "../include/trailer.inc.php"; ?>
include "../include/trailer.inc.php"; ?>
6 changes: 2 additions & 4 deletions admin/admin_delete_entry_before.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,7 @@

include "../include/admin.inc.php";
$grr_script_name = "admin_delete_entry_before.php";
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
$_SESSION['chemin_retour'] = "admin_config.php";

if (!Settings::load()) {
Expand Down Expand Up @@ -130,4 +128,4 @@

echo "<a href=\"admin_calend.php\">".get_vocab('returnprev')."</a><p>";

include "../include/trailer.inc.php"; ?>
include "../include/trailer.inc.php"; ?>
4 changes: 1 addition & 3 deletions admin/admin_edit_room.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,7 @@
$moderate = 0;
settype($type_affichage_reser, "integer");

$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();

if (isset($_POST["change_room_and_back"]))
{
Expand Down
7 changes: 3 additions & 4 deletions admin/admin_email_manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@
settype($room,"integer");
if (!isset($id_area))
settype($id_area,"integer");
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);

$back = getBackUri();
check_access(4, $back);
// tableau des ressources auxquelles l'utilisateur n'a pas accès
$tab_rooms_noaccess = verif_acces_ressource(getUserName(), 'all');
Expand Down Expand Up @@ -278,4 +277,4 @@ function room_go()
echo "</td></tr></table>";
?>
</body>
</html>
</html>
6 changes: 2 additions & 4 deletions admin/admin_import_entries_csv_udt.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
include "../include/admin.inc.php";
$grr_script_name = "admin_import_entries_csv_udt.php";

$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
$_SESSION['chemin_retour'] = "admin_config.php";

if (!Settings::load()) {
Expand Down Expand Up @@ -604,4 +602,4 @@ function entre_reservation($room_id,$jour_semaine,$name,$description,
// Retour au calendrier
}

?>
?>
4 changes: 1 addition & 3 deletions admin/admin_import_users_csv.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
include "../include/admin.inc.php";
$grr_script_name = "admin_import_users_csv.php";

$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
if ((authGetUserLevel(getUserName(), -1) < 6) && (authGetUserLevel(getUserName(), -1, 'user') != 1))
{
showAccessDenied($back);
Expand Down
6 changes: 2 additions & 4 deletions admin/admin_import_users_elycee.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
include "../include/admin.inc.php";
$grr_script_name = "admin_import_users_elycee.php";

$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
if ((authGetUserLevel(getUserName(), -1) < 6) && (authGetUserLevel(getUserName(), -1, 'user') != 1))
{
showAccessDenied($back);
Expand Down Expand Up @@ -286,4 +284,4 @@
echo "</td></tr></table>"; // fin de la colonne droite
?>
</body>
</html>
</html>
6 changes: 2 additions & 4 deletions admin/admin_import_xml_edt.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,7 @@
include "../include/admin.inc.php";
$grr_script_name = "admin_import_xml_edt.php";

$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = getBackUri();
$_SESSION['chemin_retour'] = "admin_config.php";

if (!Settings::load()) {
Expand Down Expand Up @@ -539,4 +537,4 @@ function entre_reservation($room_id,$jour_semaine,$name,$description,
// Retour au calendrier
}

?>
?>
Loading

0 comments on commit af73204

Please sign in to comment.