Skip to content

Commit

Permalink
correctifs : retour après modération et month_all2
Browse files Browse the repository at this point in the history
  • Loading branch information
ynaessens committed Apr 17, 2018
1 parent d0b6189 commit 475ab30
Show file tree
Hide file tree
Showing 7 changed files with 36 additions and 33 deletions.
4 changes: 2 additions & 2 deletions edit_entry_handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* edit_entry_handler.php
* Permet de vérifier la validitée de l'édition ou de la création d'une réservation
* Ce script fait partie de l'application GRR
* Dernière modification : $Date: 2018-03-20 23:00$
* Dernière modification : $Date: 2018-04-17 12:00$
* @author Laurent Delineau & JeromeB & Yan Naessens
* @copyright Copyright 2003-2018 Team DEVOME - JeromeB
* @link http://www.gnu.org/licenses/licenses.html
Expand Down Expand Up @@ -659,7 +659,7 @@
$_SESSION['displ_msg'] = 'yes';
if ($message_error != "")
$_SESSION['session_message_error'] = $message_error;
Header("Location:".$ret_page);
Header("Location: ".$ret_page);
// Header("Location: ".$page.".php?year=$year&month=$month&day=$day&area=$area&room=$room_back");
exit;
}
Expand Down
4 changes: 2 additions & 2 deletions include/functions.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/**
* include/functions.inc.php
* fichier Bibliothèque de fonctions de GRR
* Dernière modification : $Date: 2018-04-11 16:00$
* Dernière modification : $Date: 2018-04-17 12:00$
* @author JeromeB & Laurent Delineau & Marc-Henri PAMISEUX & Yan Naessens
* @copyright Copyright 2003-2018 Team DEVOME - JeromeB
* @link http://www.gnu.org/licenses/licenses.html
Expand Down Expand Up @@ -831,7 +831,7 @@ function protect_data_sql($_value)
// Traite les données envoyées par la methode GET de la variable $_GET["page"]
function verif_page()
{
$page = array("day", "week", "month", "week_all", "month_all");
$page = array("day", "week", "month", "week_all", "month_all", "month_all2");
if (isset($_GET["page"]))
{
if (in_array($_GET["page"], $page))
Expand Down
8 changes: 4 additions & 4 deletions include/mrbs_sql.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
/**
* mrbs_sql.inc.php
* Bibliothèque de fonctions propres à l'application GRR
* Dernière modification : $Date: 2018-02-23 18:00$
* @author JeromeB & Laurent Delineau & Marc-Henri PAMISEUX
* Dernière modification : $Date: 2018-04-16 15:00$
* @author JeromeB & Laurent Delineau & Marc-Henri PAMISEUX & Yan Naessens
* @copyright Copyright 2003-2018 Team DEVOME - JeromeB
* @link http://www.gnu.org/licenses/licenses.html
*
Expand Down Expand Up @@ -797,7 +797,7 @@ function moderate_entry_do($_id,$_moderate,$_description,$send_mail="yes")
}
else
{
// On sélectionne toutes les réservation de la périodicité
// On sélectionne toutes les réservations de la périodicité
$res = grr_sql_query("SELECT id FROM ".TABLE_PREFIX."_entry WHERE repeat_id='".$repeat_id."'");
if (! $res)
fatal_error(0, grr_sql_error());
Expand All @@ -812,7 +812,7 @@ function moderate_entry_do($_id,$_moderate,$_description,$send_mail="yes")
}
// On supprime l'info de périodicité
grr_sql_query("DELETE FROM ".TABLE_PREFIX."_repeat WHERE id='".$repeat_id."'");
grr_sql_query("UPDATE ".TABLE_PREFIX."_entry SET repead_id = '0' WHERE repead_id='".$repeat_id."'");
grr_sql_query("UPDATE ".TABLE_PREFIX."_entry SET repeat_id = '0' WHERE repeat_id='".$repeat_id."'");
}
}
}
Expand Down
26 changes: 13 additions & 13 deletions js/functions.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Permet de faire une validation afin que l'usager ne puisse pas sélectionner un jour invalide pour le début du premier Jours/Cycle
// Permet de faire une validation afin que l'usager ne puisse pas s�lectionner un jour invalide pour le d�but du premier Jours/Cycle
function verifierJoursCycles()
{
valeurA = document.getElementById('jourDebut').value;
Expand Down Expand Up @@ -45,9 +45,9 @@ function clicMenu(num)
function centrerpopup(page,largeur,hauteur,options)
{
// les options :
// * left=100 : Position de la fenêtre par rapport au bord gauche de l'écran.
// * top=50 : Position de la fenêtre par rapport au haut de l'écran.
// * resizable=x : Indique si la fenêtre est redimensionnable.
// * left=100 : Position de la fen�tre par rapport au bord gauche de l'�cran.
// * top=50 : Position de la fen�tre par rapport au haut de l'�cran.
// * resizable=x : Indique si la fen�tre est redimensionnable.
// * scrollbars=x : Indique si les barres de navigations sont visibles.
// * menubar=x : Indique si la barre des menus est visible.
// * toolbar=x : Indique si la barre d'outils est visible.
Expand Down Expand Up @@ -90,11 +90,11 @@ function confirmButton(theform,themessage)
}
// end of the 'confirmButton()' function
/**
* Checks/unchecks les boites à cocher
* Checks/unchecks les boites cocher
*
* the_form string the form name
* do_check boolean whether to check or to uncheck the element
* day la valaur de de la boite à cocher ou à décocher
* day la valaur de de la boite cocher ou � d�cocher
* return boolean always true
*/
function setCheckboxesGrr(elts, do_check, day)
Expand Down Expand Up @@ -144,13 +144,13 @@ function _setCheckboxesGrr(the_form, do_check, day)
return true;
}
// end of the 'setCheckboxes()' function
// Les quatre fonctions qui suivent servent à enregistrer un cookie
// Elles sont utilisé par edit_enty.php pour conserver les informations de la saisie pour
// pouvoir les récupérer lors d'une erreur.
// Les quatre fonctions qui suivent servent enregistrer un cookie
// Elles sont utilis� par edit_enty.php pour conserver les informations de la saisie pour
// pouvoir les r�cup�rer lors d'une erreur.
//Hugo
// Voir http://www.howtocreate.co.uk/jslibs/script-saveformvalues
var FS_INCLUDE_NAMES = 0, FS_EXCLUDE_NAMES = 1, FS_INCLUDE_IDS = 2, FS_EXCLUDE_IDS = 3, FS_INCLUDE_CLASSES = 4, FS_EXCLUDE_CLASSES = 5;
//Hugo - fonction qui récupère les informations des champs input pour les stocker dans un cookie (Voir http://www.howtocreate.co.uk/jslibs/script-saveformvalues)
//Hugo - fonction qui r�cup�re les informations des champs input pour les stocker dans un cookie (Voir http://www.howtocreate.co.uk/jslibs/script-saveformvalues)
function getFormString( formRef, oAndPass, oTypes, oNames )
{
if (oNames)
Expand Down Expand Up @@ -198,7 +198,7 @@ function getFormString( formRef, oAndPass, oTypes, oNames )
}
return oStr;
}
//Hugo - Fonction qui récupère les informations stockées de le cookie pour les remttres dans les inputs (Voir http://www.howtocreate.co.uk/jslibs/script-saveformvalues)
//Hugo - Fonction qui récupère les informations stockées dans le cookie pour les remttre dans les inputs (Voir http://www.howtocreate.co.uk/jslibs/script-saveformvalues)
function recoverInputs( formRef, oStr, oAndPass, oTypes, oNames )
{
if (oStr)
Expand Down Expand Up @@ -296,7 +296,7 @@ function setCookie(cookieName, cookieValue, lifeTime, path, domain, isSecure)
}
return false;
}
/* fonction qui est utilisée pour basculer un élément d'une liste1 vers une liste2 et inversement (utilisé lors de la création d'une demande) */
/* fonction qui est utilis�e pour basculer un �l�ment d'une liste1 vers une liste2 et inversement (utilis� lors de la cr�ation d'une demande) */
function Deplacer(liste1, liste2)
{
while (liste1.options.selectedIndex >= 0)
Expand All @@ -322,7 +322,7 @@ function selectionner_liste(IdListe)
IdListe.options[i].selected = true;
}
}
/*-----MAJ Loïs THOMAS --> Fonctions qui permettent de cacher et afficher le menu à gauche -----*/
/*-----MAJ Lo�s THOMAS --> Fonctions qui permettent de cacher et afficher le menu gauche -----*/
function divaffiche(month_all2)
{
var Nbr = month_all2;
Expand Down
4 changes: 2 additions & 2 deletions menu_gauche.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* menu_gauche.php
* Menu calendrier & domaines & ressource & légende
* Ce script fait partie de l'application GRR
* Dernière modification : $Date: 2017-12-16 14:00$
* @author Laurent Delineau & JeromeB
* Dernière modification : $Date: 2018-02-04 18:00$
* @author Laurent Delineau & JeromeB & Yan Naessens
* @copyright Copyright 2003-2018 Team DEVOME - JeromeB
* @link http://www.gnu.org/licenses/licenses.html
*
Expand Down
9 changes: 5 additions & 4 deletions month_all2.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php
/**
* month_all2.php
* Interface d'accueil avec affichage par mois des réservation de toutes les ressources d'un domaine
* Interface d'accueil avec affichage par mois des réservations de toutes les ressources d'un domaine
* Ce script fait partie de l'application GRR
* Dernière modification : $Date: 2018-03-21 12:00$
* Dernière modification : $Date: 2018-04-17 12:00$
* @author Laurent Delineau & JeromeB & Yan Naessens
* @copyright Copyright 2003-2018 Team DEVOME - JeromeB
* @link http://www.gnu.org/licenses/licenses.html
Expand Down Expand Up @@ -301,13 +301,14 @@
{
echo "\n<br /><table class='table-header'><tr>";
tdcell($d[$cday]["color"][$i]);
echo "<span class=\"small_planning\">";
if ($d[$cday]["res"][$i] != '-')
echo " <img src=\"img_grr/buzy.png\" alt=\"".get_vocab("ressource actuellement empruntee")."\" title=\"".get_vocab("ressource actuellement empruntee")."\" width=\"20\" height=\"20\" class=\"image\" /> \n";
if ((isset($d[$cday]["option_reser"][$i])) && ($d[$cday]["option_reser"][$i] != -1))
echo " <img src=\"img_grr/small_flag.png\" alt=\"".get_vocab("reservation_a_confirmer_au_plus_tard_le")."\" title=\"".get_vocab("reservation_a_confirmer_au_plus_tard_le")." ".time_date_string_jma($d[$cday]["option_reser"][$i],$dformat)."\" width=\"20\" height=\"20\" class=\"image\" /> \n";
if ((isset($d[$cday]["moderation"][$i])) && ($d[$cday]["moderation"][$i] == 1))
echo " <img src=\"img_grr/flag_moderation.png\" alt=\"".get_vocab("en_attente_moderation")."\" title=\"".get_vocab("en_attente_moderation")."\" class=\"image\" /> \n";
echo "<span class=\"small_planning\">";

if ($acces_fiche_reservation)
{
if (Settings::get("display_level_view_entry") == 0)
Expand All @@ -318,7 +319,7 @@
}
else
{
echo "<a title=\"".htmlspecialchars($d[$cday]["data"][$i])."\" href=\"view_entry.php?id=" . $d[$cday]["id"][$i]."&amp;page=month\">"
echo "<a title=\"".htmlspecialchars($d[$cday]["data"][$i])."\" href=\"view_entry.php?id=" . $d[$cday]["id"][$i]."&amp;page=month_all2\">"
.$d[$cday]["who1"][$i]{0}
. "</a>";
}
Expand Down
14 changes: 8 additions & 6 deletions view_entry.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* view_entry.php
* Interface de visualisation d'une réservation
* Ce script fait partie de l'application GRR
* Dernière modification : $Date: 2018-03-27 11:00$
* Dernière modification : $Date: 2018-04-17 12:00$
* @author Laurent Delineau & JeromeB & Yan Naessens
* @copyright Copyright 2003-2018 Team DEVOME - JeromeB
* @link http://www.gnu.org/licenses/licenses.html
Expand Down Expand Up @@ -56,7 +56,7 @@
die();
$back = '';
if (isset($_SERVER['HTTP_REFERER']))
$back = htmlspecialchars($_SERVER['HTTP_REFERER']);
$back = htmlspecialchars_decode($_SERVER['HTTP_REFERER']);
// echo $back;
if (isset($_GET["action_moderate"])){
// ici on a l'id de la réservation, on peut donc construire un lien de retour complet, à la bonne date et avec la ressource précise
Expand All @@ -79,7 +79,7 @@
$day = date ('d', $row1['0']);
$page = (isset($_GET['page']))? $_GET['page'] : "day";
$back = $page.'.php?year='.$year.'&month='.$month.'&day='.$day;
if (($page == "week_all") || ($page == "month_all") || ($page == "day"))
if (($page == "week_all") || ($page == "month_all") || ($page == "month_all2") || ($page == "day"))
$back .= "&area=".mrbsGetRoomArea($row1['1']);
if (($page == "week") || ($page == "month"))
$back .= "&room=".$row1['1'];
Expand All @@ -88,7 +88,9 @@
$back = $page.".php";
}
moderate_entry_do($id,$_GET["moderate"], $_GET["description"]);
// echo $back;
header("Location: ".$back);
die();
}
$sql = "SELECT ".TABLE_PREFIX."_entry.name,
".TABLE_PREFIX."_entry.description,
Expand Down Expand Up @@ -299,11 +301,11 @@
$year = date ('Y', $row1['0']);
$month = date ('m', $row1['0']);
$day = date ('d', $row1['0']);
$back = $page.'.php?year='.$year.'&amp;month='.$month.'&amp;day='.$day;
$back = $page.'.php?year='.$year.'&month='.$month.'&day='.$day;
if ((isset($_GET["page"])) && (($_GET["page"] == "week") || ($_GET["page"] == "month") || ($_GET["page"] == "week_all") || ($_GET["page"] == "month_all")))
$back .= "&amp;area=".mrbsGetRoomArea($row1['1']);
$back .= "&area=".mrbsGetRoomArea($row1['1']);
if ((isset($_GET["page"])) && (($_GET["page"] == "week") || ($_GET["page"] == "month")))
$back .= "&amp;room=".$row1['1'];
$back .= "&room=".$row1['1'];
}
else
$back = "";
Expand Down

0 comments on commit 475ab30

Please sign in to comment.