From caa88dc0da9b371b5ffe25ef2e928d30e9647fc2 Mon Sep 17 00:00:00 2001 From: Desal-Soul Date: Wed, 26 Mar 2025 10:57:42 +0100 Subject: [PATCH] Module Dolibarr ACM version 1 --- .htaccess | 5 + admin/.htaccess | 1 + admin/setup.php | 44 ++++ classe/.htaccess | 1 + classe/Classe/.htaccess | 1 + classe/Classe/GestionDate/GestionPeriode.php | 29 +++ classe/Classe/GestionDate/GestionSemaine.php | 77 +++++++ classe/Classe/GestionDate/gestionJour.php | 27 +++ .../GestionPlanningGeneriqueSemaine.php | 7 + classe/Classe/gestionJourFerier.php | 54 +++++ classe/Classe/gestionTexte.php | 16 ++ classe/Classe/gestionUtilisateurSemaine.php | 84 +++++++ classe/Controleur/.htaccess | 1 + classe/Controleur/ControleurAbsence.php | 39 ++++ classe/Controleur/ControleurAdmin.php | 85 +++++++ classe/Controleur/ControleurGenerique.php | 16 ++ classe/GestionBD/.htaccess | 1 + classe/GestionBD/gestionCouleur.php | 45 ++++ classe/GestionBD/gestionDate.php | 46 ++++ classe/GestionBD/gestionUtilisateur.php | 108 +++++++++ classe/GestionBD/gestionVariableCouleur.php | 35 +++ classe/GestionBD/gestionVariableDate.php | 75 ++++++ core/.htaccess | 1 + core/modules/modACM.class.php | 128 +++++++++++ css/StyleTableau.css.php | 37 +++ img/.htaccess | 1 + img/absence.png | Bin 0 -> 3280 bytes img/object_ACM.png | Bin 0 -> 5057 bytes index.php | 42 ++++ js/.htaccess | 1 + js/envoiePost.js | 27 +++ langs/.htaccess | 1 + langs/fr_FR/ACM.lang | 72 ++++++ lib/.htaccess | 1 + lib/ACM.lib.php | 74 ++++++ lib/Psr4AutoloaderClass.php | 213 ++++++++++++++++++ sql/llx_acm_couleur.sql | 5 + sql/llx_acm_feries.sql | 8 + view/.htaccess | 1 + view/admin/dateGestion.php | 135 +++++++++++ view/admin/parametrageBase.php | 80 +++++++ view/admin/suppression.php | 34 +++ view/erreur.php | 9 + view/planningAbsence/acceuil.php | 95 ++++++++ view/vueGenerale.php | 24 ++ 45 files changed, 1786 insertions(+) create mode 100644 .htaccess create mode 100644 admin/.htaccess create mode 100644 admin/setup.php create mode 100644 classe/.htaccess create mode 100644 classe/Classe/.htaccess create mode 100644 classe/Classe/GestionDate/GestionPeriode.php create mode 100644 classe/Classe/GestionDate/GestionSemaine.php create mode 100644 classe/Classe/GestionDate/gestionJour.php create mode 100644 classe/Classe/GestionPlanning/GestionPlanningGeneriqueSemaine.php create mode 100644 classe/Classe/gestionJourFerier.php create mode 100644 classe/Classe/gestionTexte.php create mode 100644 classe/Classe/gestionUtilisateurSemaine.php create mode 100644 classe/Controleur/.htaccess create mode 100644 classe/Controleur/ControleurAbsence.php create mode 100644 classe/Controleur/ControleurAdmin.php create mode 100644 classe/Controleur/ControleurGenerique.php create mode 100644 classe/GestionBD/.htaccess create mode 100644 classe/GestionBD/gestionCouleur.php create mode 100644 classe/GestionBD/gestionDate.php create mode 100644 classe/GestionBD/gestionUtilisateur.php create mode 100644 classe/GestionBD/gestionVariableCouleur.php create mode 100644 classe/GestionBD/gestionVariableDate.php create mode 100644 core/.htaccess create mode 100644 core/modules/modACM.class.php create mode 100644 css/StyleTableau.css.php create mode 100644 img/.htaccess create mode 100644 img/absence.png create mode 100644 img/object_ACM.png create mode 100644 index.php create mode 100644 js/.htaccess create mode 100644 js/envoiePost.js create mode 100644 langs/.htaccess create mode 100644 langs/fr_FR/ACM.lang create mode 100644 lib/.htaccess create mode 100644 lib/ACM.lib.php create mode 100644 lib/Psr4AutoloaderClass.php create mode 100644 sql/llx_acm_couleur.sql create mode 100644 sql/llx_acm_feries.sql create mode 100644 view/.htaccess create mode 100644 view/admin/dateGestion.php create mode 100644 view/admin/parametrageBase.php create mode 100644 view/admin/suppression.php create mode 100644 view/erreur.php create mode 100644 view/planningAbsence/acceuil.php create mode 100644 view/vueGenerale.php diff --git a/.htaccess b/.htaccess new file mode 100644 index 0000000..66096ff --- /dev/null +++ b/.htaccess @@ -0,0 +1,5 @@ +RewriteEngine On +RewriteBase /dolibarr/htdocs/custom/ACM/web/ + +# Redirige /setup ou /about vers index.php?page=setup ou index.php?page=about +RewriteRule ^(setup|about)$ index.php?page=$1 [L,QSA] diff --git a/admin/.htaccess b/admin/.htaccess new file mode 100644 index 0000000..5d14b45 --- /dev/null +++ b/admin/.htaccess @@ -0,0 +1 @@ +Require all granted \ No newline at end of file diff --git a/admin/setup.php b/admin/setup.php new file mode 100644 index 0000000..3c00e7c --- /dev/null +++ b/admin/setup.php @@ -0,0 +1,44 @@ + 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {$i--;$j--;} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) {$res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) {$res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";} +if (!$res && file_exists("../../main.inc.php")) {$res = @include "../../main.inc.php";} +if (!$res && file_exists("../../../main.inc.php")) {$res = @include "../../../main.inc.php";} +if (!$res) {die("Include of main fails");} + +global $langs, $user; + + +// Translations +$langs->loadLangs(array("admin", "ACM@ACM")); + + +$csrfToken = function_exists('newToken') ? newToken() : $_SESSION['newtoken']; + +$data = array( + 'controleur' => 'admin', + 'action' => 'afficherSetup', + 'page' => 'etup', + 'token' => "$csrfToken" +); + +// URL where you want to POST data +$redirect_url = '../index.php'; +echo ''; +echo '
'; +foreach ($data as $key => $value) {echo '';} +echo '
'; +echo ''; +echo ''; + +$db->close(); +?> \ No newline at end of file diff --git a/classe/.htaccess b/classe/.htaccess new file mode 100644 index 0000000..a7a56f7 --- /dev/null +++ b/classe/.htaccess @@ -0,0 +1 @@ +Require all denied \ No newline at end of file diff --git a/classe/Classe/.htaccess b/classe/Classe/.htaccess new file mode 100644 index 0000000..a7a56f7 --- /dev/null +++ b/classe/Classe/.htaccess @@ -0,0 +1 @@ +Require all denied \ No newline at end of file diff --git a/classe/Classe/GestionDate/GestionPeriode.php b/classe/Classe/GestionDate/GestionPeriode.php new file mode 100644 index 0000000..a97384c --- /dev/null +++ b/classe/Classe/GestionDate/GestionPeriode.php @@ -0,0 +1,29 @@ +jourDebut = $jourDebut; + $this->jourFin = $jourFin; + } + public function getNbDemiJournnees(){ + $this->jourFin ->modify('+1 day'); + $interval = (($this->jourDebut->diff($this->jourFin))->days)*2; + if ( $this->jourDebut->format("Y-m-d" )==$this->jourFin->format("Y-m-d") + && $this->jourDebut->format("a" )==$this->jourFin->format("a")) { + $interval = $interval - 1; + } else { + if ( $this->jourDebut->format("a") == "pm") {$interval = $interval-1;} + if ( $this->jourFin->format("a") == "am") {$interval = $interval-1;} + }return $interval; + } + + public function jourDansPeriode(DateTime $date) : bool { + return $this->jourDebut->format("Ymd")<=$date->format("Ymd") + && $this->jourFin->format("Ymd")>=$date->format("Ymd"); + } +} diff --git a/classe/Classe/GestionDate/GestionSemaine.php b/classe/Classe/GestionDate/GestionSemaine.php new file mode 100644 index 0000000..959fa3b --- /dev/null +++ b/classe/Classe/GestionDate/GestionSemaine.php @@ -0,0 +1,77 @@ +nom = $nomClasse; + $this->jours = []; + foreach (self::$joursSemaine as $jour) $this->jours[$jour] = [0, 0]; + } + + public function setLundi(int $matin, int $aprem = 0) {$this->jours["lundi"] = [$matin, $aprem];} + public function setMardi(int $matin, int $aprem = 0) {$this->jours["mardi"] = [$matin, $aprem];} + public function setMercredi(int $matin, int $aprem = 0) {$this->jours["mercredi"] = [$matin, $aprem];} + public function setJeudi(int $matin, int $aprem = 0) {$this->jours["jeudi"] = [$matin, $aprem];} + public function setVendredi(int $matin, int $aprem = 0) {$this->jours["vendredi"] = [$matin, $aprem];} + public function setSamedi(int $matin, int $aprem = 0) {$this->jours["samedi"] = [$matin, $aprem];} + public function setDimanche(int $matin, int $aprem = 0) {$this->jours["dimanche"] = [$matin, $aprem];} + + public function setDayByNb(int $day, int $matin, int $aprem = 0 ){ + switch ($day) { + case 1: $this->setLundi($matin, $aprem);break; + case 2: $this->setMardi($matin, $aprem);break; + case 3: $this->setMercredi($matin, $aprem);break; + case 4: $this->setJeudi($matin, $aprem);break; + case 5: $this->setVendredi($matin, $aprem);break; + case 6: $this->setSamedi($matin, $aprem);break; + case 7: $this->setDimanche($matin, $aprem);break; + } + } + + public function getNom() : string {return $this->nom;} + public function toString() : string { + $texte = ""; + $x = 0; + $td = 14; + if (!$this->estVide()){ + foreach (GestionSemaine::$joursSemaine as $jour) { + if ($td <= 0){break;} + if ($x <= 0){ + if ($this->jours[$jour][0] == 0 && $this->jours[$jour][1] == 0) { + $texte = $texte . ""; + $td -= 2; + }else { + if ($this->jours[$jour][0] != 0) {$x = $this->jours[$jour][0]; + $texte = $texte . "
o
"; + $td -= $this->jours[$jour][0]; + } + elseif ($this->jours[$jour][1] != 0) { + $texte = $texte . ""; + $texte = $texte . "
o
"; + $x = $this->jours[$jour][1]-1; + $td -= ($this->jours[$jour][1]+1); + } + } + } + if ($x-2 >= 0) { + $x = $x - 2; + } elseif ($x-1 == 0) { + $x = $x - 1; + $texte = $texte . ""; + } + } + } + return $texte; + } + + public function estVide() { + $somme = 0; + foreach (self::$joursSemaine as $jour) {$somme = $somme + $this->jours[$jour][0] + $this->jours[$jour][1];} + return $somme == 0; + } +} diff --git a/classe/Classe/GestionDate/gestionJour.php b/classe/Classe/GestionDate/gestionJour.php new file mode 100644 index 0000000..3f1dcb9 --- /dev/null +++ b/classe/Classe/GestionDate/gestionJour.php @@ -0,0 +1,27 @@ +jourDansPeriode($date); + } + public function jourCorrespondAuBonNombre (string $jour, DateTime $date) : bool { + $tab = ["lundi", "mardi", "mercredi", "jeudi", "vendredi", "samedi", "dimanche"]; + return $tab[((int)$date->format("N")) + 1]==$jour; + } + public function getLundiSemaine(DateTime $date = null) : DateTime { + if ($date == null) {$date = new DateTime();} + if ($date->format("N") != "1") { + $date->modify("-1 day"); + return $this->getLundiSemaine($date); + } + return $date; + } + public function getPremierJourDuMois(DateTime $date = null) { + if ($date == null) {$date = new DateTime();} + return new DateTime($date->format("Y-m")."-1"); + } + +} diff --git a/classe/Classe/GestionPlanning/GestionPlanningGeneriqueSemaine.php b/classe/Classe/GestionPlanning/GestionPlanningGeneriqueSemaine.php new file mode 100644 index 0000000..0b506ac --- /dev/null +++ b/classe/Classe/GestionPlanning/GestionPlanningGeneriqueSemaine.php @@ -0,0 +1,7 @@ +listeJourFerier[$jour['nom']] = ["date"=> new DateTime((new DateTime())->format("Y")."-".$jour['mois']."-".$jour['jour']), "actif" => $jour['actif']]; + }elseif ($jour['regle'] == "paque"){ + $paque =$this->paque(intval((new DateTime())->format("Y"))); + $date = $paque->modify("+".$jour['jour']." day"); + $this->listeJourFerier[$jour['nom']] = ["date"=> $date, "actif" => $jour['actif']]; + } + } + } + public function getListeJourFerier() { + $liste = []; + foreach ($this->listeJourFerier as $key=>$jour) $liste[$key] = $jour["date"]; + return $liste; + } + public function getListeJourFerierActif() { + $liste = []; + foreach ($this->listeJourFerier as $key=>$jour) + if ($jour['actif'] == 'actif') $liste[$key] = $jour["date"]; + return $liste; + } + private function paque(int $year): \DateTime { + $k = intdiv($year, 100); + $m = 15 + intdiv((3 * $k + 3), 4) - intdiv((8 * $k + 13), 25); + $s = 2 - intdiv((3 * $k + 3), 4); + $a = $year % 19; + $d = (19 * $a + $m) % 30; + $r = intdiv(($d + intdiv($a, 11)), 29); + + $og = 21 + $d - $r ; + $sz = 7 - ($year + intdiv($year, 4) + $s) % 7; + $oe = 7 - ($og - $sz) % 7; + $os = $og + $oe; + + $result = new \DateTime(sprintf('%04s-03-01', $year)); + $result->add( + \DateInterval::createFromDateString( + sprintf('%s days', $os-1) + ) + ); + return $result; + } + +} \ No newline at end of file diff --git a/classe/Classe/gestionTexte.php b/classe/Classe/gestionTexte.php new file mode 100644 index 0000000..cbe6fe6 --- /dev/null +++ b/classe/Classe/gestionTexte.php @@ -0,0 +1,16 @@ +user = $user; + $this->dateLundi = $dateLundi; + } + + public function getUser() : string {return $this->user;} + public function getDateLundi() : DateTime {return $this->dateLundi;} + + public function getTravailSemaine() {} + public function getTeletravailSemaine() {} + public function getCongeSemaine() { + return $this->getSemaine("LEAVE_PAID_FR", "couleurCongee"); + } + public function getRecupeSemaine() { + return $this->getSemaine("LEAVE_RECUP", "couleurRecupe"); + } + + private function getSemaine($code, $couleur) { + $dateDimanche = new DateTime($this->dateLundi->format('Y-m-d')." 08:00:00"); + $dateDimanche->modify('+6 day'); + $dateDimanche->modify('+7 hours'); + $listeMalade = gestionUtilisateur::getListeCongeeParNomEtCode($this->user["login"], $code); + $periode = []; + foreach ($listeMalade as $malade) { + if ($malade && ($this->dateLundi->format("Ymd") <= (new DateTime($malade["date_fin"]))->format("Ymd") && (new DateTime($malade["date_debut"]))->format("Ymd") <= $dateDimanche->format("Ymd"))) { + if ( (new DateTime($malade["date_fin"]))->format("Ymd") >= $dateDimanche->format("Ymd")) { + $malade["date_fin"] = $dateDimanche->format("Y-m-d H:i:s"); + } + if ((new DateTime($malade["date_debut"]))->format("Ymd") <= $this->dateLundi->format("Ymd")) { + $malade["date_debut"] = $this->dateLundi->format("Y-m-d H:i:s"); + } + $periode[(new DateTime($malade["date_debut"]))->format("Y-m-d H:i:s")] = new gestionPeriode(new DateTime($malade["date_debut"]), new DateTime($malade["date_fin"])); + } + } + $retour = new GestionSemaine($couleur); + foreach ($periode as $key=>$malade) { + if ((new DateTime($key))->format("a") == "am") + $retour->setDayByNb((new DateTime($key))->format("N"), $malade->getNbDemiJournnees()); + else + $retour->setDayByNb((new DateTime($key))->format("N"), 0, $malade->getNbDemiJournnees()); + } + return $retour->toString(); + } + public function getMaladeSemaine() { + $couleur = "couleurMalade"; + $code1 = "LEAVE_SICK_WORK"; + $code2 = "LEAVE_SICK"; + $dateDimanche = new DateTime($this->dateLundi->format('Y-m-d')." 08:00:00"); + $dateDimanche->modify('+6 day'); + $dateDimanche->modify('+7 hours'); + $listeMalade = gestionUtilisateur::getListeCongeeParNomEtDeuxCode($this->user["login"], $code1, $code2); + $periode = []; + foreach ($listeMalade as $malade) { + if ($malade && ($this->dateLundi->format("Ymd") <= (new DateTime($malade["date_fin"]))->format("Ymd") && (new DateTime($malade["date_debut"]))->format("Ymd") <= $dateDimanche->format("Ymd"))) { + if ( (new DateTime($malade["date_fin"]))->format("Ymd") >= $dateDimanche->format("Ymd")) { + $malade["date_fin"] = $dateDimanche->format("Y-m-d H:i:s"); + } + if ((new DateTime($malade["date_debut"]))->format("Ymd") <= $this->dateLundi->format("Ymd")) { + $malade["date_debut"] = $this->dateLundi->format("Y-m-d H:i:s"); + } + $periode[(new DateTime($malade["date_debut"]))->format("Y-m-d H:i:s")] = new gestionPeriode(new DateTime($malade["date_debut"]), new DateTime($malade["date_fin"])); + } + } + $retour = new GestionSemaine($couleur); + foreach ($periode as $key=>$malade) { + if ((new DateTime($key))->format("a") == "am") + $retour->setDayByNb((new DateTime($key))->format("N"), $malade->getNbDemiJournnees()); + else + $retour->setDayByNb((new DateTime($key))->format("N"), 0, $malade->getNbDemiJournnees()); + } + return $retour->toString(); + } +} \ No newline at end of file diff --git a/classe/Controleur/.htaccess b/classe/Controleur/.htaccess new file mode 100644 index 0000000..a7a56f7 --- /dev/null +++ b/classe/Controleur/.htaccess @@ -0,0 +1 @@ +Require all denied \ No newline at end of file diff --git a/classe/Controleur/ControleurAbsence.php b/classe/Controleur/ControleurAbsence.php new file mode 100644 index 0000000..2a2d16f --- /dev/null +++ b/classe/Controleur/ControleurAbsence.php @@ -0,0 +1,39 @@ +trans("ACMAbsenceTitre"); + $titre = " ".$titrePage; + $liste = gestionUtilisateur::getAllEmployer(); + $date = (new GestionJour())->getLundiSemaine($date); + for($x = 0; $x < 7; $x++) { $semaine[] = new DateTime($date->format("Y-m-d"));$date->modify('+1 day');} + $date->modify("-1 week"); + $mois = " ".$langs->trans("ACM".$semaine[0]->format("M")); + if ($semaine[0]->format("m") == $semaine[6]->format("m")) {$mois = "";} + if ($semaine[0]->format("Y") == $semaine[6]->format("Y")) { $anne0 = ""; + if ((new DateTime())->format("Y") == $semaine[6]->format("Y")) {$anne1 = "";} + else $anne1 = " ".$semaine[6]->format("Y"); + }else {$anne0 = " ".$semaine[0]->format("Y"); $anne1 = " ".$semaine[6]->format("Y");} + $titreSemaine = $langs->trans("ACMSemaineDu")." ".$semaine[0]->format("d")." ".$mois.$anne0." ".$langs->trans("ACMAu")." ".$semaine[6]->format("d"). " ".$langs->trans("ACM".$semaine[6]->format("M")).$anne1; + $listeDateSemaine = []; + foreach ($liste as $user) { + $gestionUser = new gestionUtilisateurSemaine($user, $date); + $listeDateSemaine[$user["login"]]["Malade"] = $gestionUser->getMaladeSemaine(); + $listeDateSemaine[$user["login"]]["Congé"] = $gestionUser->getCongeSemaine(); + $listeDateSemaine[$user["login"]]["Recupe"] = $gestionUser->getRecupeSemaine(); + } + self::afficherVue(["cheminCorpsVue"=>$chemin, "message" => $message, "titrePage"=>$titrePage, "titre"=>$titre, + "liste"=>$liste, "langs"=>$langs, "semaine"=>$semaine, "titreSemaine"=>$titreSemaine, "date"=>$date, + "listeDateSemaine"=>$listeDateSemaine]); + } +} \ No newline at end of file diff --git a/classe/Controleur/ControleurAdmin.php b/classe/Controleur/ControleurAdmin.php new file mode 100644 index 0000000..c1fbee2 --- /dev/null +++ b/classe/Controleur/ControleurAdmin.php @@ -0,0 +1,85 @@ +$chemin, "lien" => $lien]; + foreach ($variables as $key => $value) $parameters[$key] = $value; + self::afficherVue($parameters); + + } + public static function afficherSetup($message = "") { + global $langs; + $lien = "dateGestion".".php"; + $couleurs = gestionVariableCouleur::getACMCouleurs(); + $liste = gestionVariableDate::getACMFeries(); + self::afficherBase("$lien", ["liste" => $liste, "message" => $message, "listeCouleur"=>$couleurs]); + } + + public static function putActif() { + global $langs; + $nom = $_POST["nom"]; + $res = gestionVariableDate::putACMDateActif($nom); + if (!$res) $message = $langs->trans("ACMEchecConnexion"); + self::afficherSetup($message); + } + public static function putInactif() { + global $langs; + $nom = $_POST['nom']; + $res = gestionVariableDate::putACMDateInactif($nom); + if (!$res) $message = $langs->trans("ACMEchecConnexion"); + self::afficherSetup($message); + } + public static function supprimer($message = "") { + global $langs; + $nom = $_POST["nom"]; + $titre = $langs->trans("ACMClasseTitreFonction"); + $chemin = self::$lien . "suppression" . ".php"; + $titrePage = $langs->trans("ACMAdminSupprimer"); + self::afficherBase("suppression.php", ["message" => $message, "nom"=>$nom]); + } + public static function suppression() { + global $langs; + $nom = $_POST["nom"]; + $oui = $_POST["ouiNon"]; + if ($oui == "true") { + $res = gestionVariableDate::deleteACMFeries($nom); + if (!$res) $message = $langs->trans("ACMEchecSuppression"); + else $message = $langs->trans("ACMSuppressionReussite"); + self::afficherSetup($message); + } + else self::afficherSetup("ACMSuppressionAnnuler"); + + } + + public static function changerCouleur($message = "") { + global $langs; + + $ACMTitreTableau = $_POST["ACMTitreTableau"]; gestionVariableCouleur::updateACMCouleur("ACMTitreTableau", $ACMTitreTableau); + $ACMCorpsTableau = $_POST["ACMCorpsTableau"];gestionVariableCouleur::updateACMCouleur("ACMCorpsTableau", $ACMCorpsTableau); + $ACMBordure = $_POST["ACMBordure"]; gestionVariableCouleur::updateACMCouleur("ACMBordure", $ACMBordure); + $ACMConge = $_POST["ACMConge"]; gestionVariableCouleur::updateACMCouleur("ACMConge", $ACMConge); + $ACMMalade = $_POST["ACMMalade"]; gestionVariableCouleur::updateACMCouleur("ACMMalade", $ACMMalade); + $ACMTravail = $_POST["ACMTravail"]; gestionVariableCouleur::updateACMCouleur("ACMTravail", $ACMTravail); + $ACMTeletravail = $_POST["ACMTeletravail"]; gestionVariableCouleur::updateACMCouleur("ACMTeletravail", $ACMTeletravail); + $ACMFontTitreTableau = $_POST["ACMFontTitreTableau"]; gestionVariableCouleur::updateACMCouleur("ACMFontTitreTableau", $ACMFontTitreTableau); + $ACMFontCorpsTableau = $_POST["ACMFontCorpsTableau"]; gestionVariableCouleur::updateACMCouleur("ACMFontCorpsTableau", $ACMFontCorpsTableau); + $ACMRecupe = $_POST["ACMRecupe"]; gestionVariableCouleur::updateACMCouleur("ACMRecupe", $ACMRecupe); + + self::afficherSetup("$ACMTitreTableau"); + } + /*public static function modele($message = "") { + global $langs; + $titre = $langs->trans("ACMClasseTitreFonction"); + $chemin = self::$lien."chemin"."php"; + $titrePage = $langs->trans("ACMAdminTitrePage"); + self::afficherVue(["titre"=>$titre, "cheminCorpsVue"=>$chemin, "message" => $message, "titrePage"=>$titrePage, + ]); + } + }*/ +} \ No newline at end of file diff --git a/classe/Controleur/ControleurGenerique.php b/classe/Controleur/ControleurGenerique.php new file mode 100644 index 0000000..fb98bff --- /dev/null +++ b/classe/Controleur/ControleurGenerique.php @@ -0,0 +1,16 @@ + "erreur.php", "messageErreur" => $messageErreur]); + } +} \ No newline at end of file diff --git a/classe/GestionBD/.htaccess b/classe/GestionBD/.htaccess new file mode 100644 index 0000000..a7a56f7 --- /dev/null +++ b/classe/GestionBD/.htaccess @@ -0,0 +1 @@ +Require all denied \ No newline at end of file diff --git a/classe/GestionBD/gestionCouleur.php b/classe/GestionBD/gestionCouleur.php new file mode 100644 index 0000000..2a41897 --- /dev/null +++ b/classe/GestionBD/gestionCouleur.php @@ -0,0 +1,45 @@ +query($query); + } +} \ No newline at end of file diff --git a/classe/GestionBD/gestionDate.php b/classe/GestionBD/gestionDate.php new file mode 100644 index 0000000..daf2457 --- /dev/null +++ b/classe/GestionBD/gestionDate.php @@ -0,0 +1,46 @@ +query($query); + } +} \ No newline at end of file diff --git a/classe/GestionBD/gestionUtilisateur.php b/classe/GestionBD/gestionUtilisateur.php new file mode 100644 index 0000000..3559705 --- /dev/null +++ b/classe/GestionBD/gestionUtilisateur.php @@ -0,0 +1,108 @@ +query("SET NAMES 'utf8mb4'"); + $list = []; + $sql = " SELECT rowid, entity, ref_employee, ref_ext, admin, employee, fk_establishment, login, gender, civility + , lastname, firstname, job, fk_member, fk_user, fk_user_holiday_validator, idpers1, idpers2, + idpers3, datelastlogin, dateendvalidity, statut, photo, color, barcode, fk_barcode_type, + nb_holiday, thm, tjm, salary, salaryextra, dateemployment, dateemploymentend, weeklyhours, + national_registration_number + FROM llx_user + WHERE employee = 1 + ORDER BY fk_establishment, lastname, login"; + $resql=$db->query($sql); + if ($resql) { + // Parcours des résultats avec fetch_array + while ($row = $db->fetch_array($resql)) { + // Accès aux colonnes via leur index ou alias + $list[] = ["id"=>$row['rowid'], "login"=>$row['login']]; + } + } else { return false; } + return $list; + } + + + + /** + * @param $nom string nom de l'utilisateur + * @return array|false return l'id de l'utilisateur + */ + public static function getIdParNom($nom) { + global $db; + $db->query("SET NAMES 'utf8mb4'"); + $nom = $db->escape($nom); + $sql = "SELECT rowid FROM llx_user WHERE login = '$nom'"; + $resql=$db->query($sql); + if ($resql) { + $row = $db->fetch_array($resql); + $row = $row['rowid']; + return $row; + } else { return false; } + } + + /** + * @param $nom string nom de l'utilisateur + * @param $code string type de congee de dolibarr + * @return array|false return la liste des dates congées des utilisateurs ou faux en cas d'erreur sql + */ + public static function getListeCongeeParNomEtCode(string $nom, string $code) { + $id = self::getIdParNom($nom); + global $db; + $db->query("SET NAMES 'utf8mb4'"); + $list = []; + $matin = "08:00"; $soir = "15:00"; + $id = $db->escape($id); // pour protéger contre l'injection sql + $code = $db->escape($code); + $sql = "SELECT h.date_debut, h.date_fin, t.code, h.halfday FROM llx_holiday h JOIN llx_c_holiday_types t on h.fk_type = t.rowid WHERE h.fk_user = '$id' and h.date_approval IS NOT NULL and code = '$code'"; + $resql=$db->query($sql); + if ($resql) { + while ($row = $db->fetch_array($resql)) { + $debut = $matin; + $fin = $soir; + if ($row['halfday'] == "2") {$debut = $soir;$fin = $matin;} + if ($row['halfday'] == "-1") {$debut = $soir;} + if ($row['halfday'] == "1") {$fin = $matin;} + $list[] = ["date_debut" => $row['date_debut']." ".$debut, "date_fin" => $row['date_fin']." ".$fin, "type" => $row['code']]; + } + } else { return false; } + return $list; + } + + /** + * @param $nom string nom de l'utilisateur + * @param $code1 string type de congé à recuperer + * @param $code2 string type de congé à recuperer + * @return array|false renvoie la liste des congés correspondent à au moins un des deux codes ou faux en cas d'erreur sql + */ + public static function getListeCongeeParNomEtDeuxCode(string $nom, string $code1, string $code2) { + $id = self::getIdParNom($nom); + global $db; + $db->query("SET NAMES 'utf8mb4'"); + $list = []; + $matin = "08:00"; $soir = "15:00"; + $id = $db->escape($id); // pour protéger contre l'injection sql + $code1 = $db->escape($code1); + $code2 = $db->escape($code2); + $sql = "SELECT h.date_debut, h.date_fin, t.code, h.halfday FROM llx_holiday h JOIN llx_c_holiday_types t on h.fk_type = t.rowid WHERE h.fk_user = '$id' and h.date_approval IS NOT NULL and (code = '$code1' OR code = '$code2')"; + $resql=$db->query($sql); + if ($resql) { + while ($row = $db->fetch_array($resql)) { + $debut = $matin; + $fin = $soir; + if ($row['halfday'] == "2") {$debut = $soir;$fin = $matin;} + if ($row['halfday'] == "-1") {$debut = $soir;} + if ($row['halfday'] == "1") {$fin = $matin;} + $list[] = ["date_debut" => $row['date_debut']." ".$debut, "date_fin" => $row['date_fin']." ".$fin, "type" => $row['code']]; + } + } else { return false; } + return $list; + } + +} \ No newline at end of file diff --git a/classe/GestionBD/gestionVariableCouleur.php b/classe/GestionBD/gestionVariableCouleur.php new file mode 100644 index 0000000..575902d --- /dev/null +++ b/classe/GestionBD/gestionVariableCouleur.php @@ -0,0 +1,35 @@ +query("SET NAMES 'utf8mb4'"); + $list = []; + $sql = "SELECT nom, codeHexa FROM llx_acm_couleur"; + $resql=$db->query($sql); + if ($resql) + while ($row = $db->fetch_array($resql)) + $list[$row['nom']] = $row['codeHexa']; + return $list; + } + + /** + * @param $nom string nom de la variable + * @param $codeHexa string code de la couleur en hexa + * @return bool renvoie si la modification, c'est bien effectué + */ + public static function updateACMCouleur(string $nom, string $codeHexa) { + global $db; + $db->query("SET NAMES 'utf8mb4'"); + $nom = $db->escape($nom); + $codeHexa = $db->escape($codeHexa); + $sql = "UPDATE llx_acm_couleur SET codeHexa='$codeHexa' WHERE nom='$nom'"; + $resql=$db->query($sql); + if ($resql) return true; + return false; + } +} \ No newline at end of file diff --git a/classe/GestionBD/gestionVariableDate.php b/classe/GestionBD/gestionVariableDate.php new file mode 100644 index 0000000..bda75a5 --- /dev/null +++ b/classe/GestionBD/gestionVariableDate.php @@ -0,0 +1,75 @@ +query("SET NAMES 'utf8mb4'"); + $list = []; + $sql = "SELECT nom, regle, jour, mois, actif FROM llx_acm_feries ORDER BY regle ASC, mois ASC, jour ASC"; + $resql=$db->query($sql); + if ($resql) + while ($row = $db->fetch_array($resql)) + $list[] = ["nom"=>$row['nom'],"regle"=>$row['regle'],"jour"=>$row['jour'],"mois"=>$row['mois'],"actif"=>$row['actif']]; + return $list; + } + + /** + * @param $nom string label de la date + * @return bool renvoie si la modification a été effectuer + */ + public static function putACMDateActif(string $nom) : bool { + global $db; $db->query("SET NAMES 'utf8mb4'"); + $nom = $db->escape($nom); + $sql = "UPDATE llx_acm_feries SET actif='actif' WHERE nom = '$nom';"; + $resql=$db->query($sql); + if ($resql) return true; + else return false; + } + /** + * @param $nom string label de la date + * @return bool renvoie si la modification a été effectuer + */ + public static function putACMDateInactif($nom) : bool{ + global $db; $db->query("SET NAMES 'utf8mb4'"); + $nom = $db->escape($nom); + $sql = "UPDATE llx_acm_feries SET actif='inactif' WHERE nom = '$nom';"; + $resql=$db->query($sql); + if ($resql) return true; + else return false; + } + + /** + * @param $nom string label de la date + * @param $regle string type de regle + * @param $jour string|int jour + * @param $mois string|int mois + * @param $actif string si est actif ou inactif + * @return bool renvoie la valeur d'insertion + */ + public static function addACMFeries(string $nom, string $regle, $jour, $mois, string $actif) : bool { + global $db; $db->query("SET NAMES 'utf8mb4'"); + $nom = $db->escape($nom); $regle = $db->escape($regle); + $jour = $db->escape($jour); $mois = $db->escape($mois); + $actif = $db->escape($actif); + $sql = "INSERT INTO llx_acm_feries(nom, regle, jour, mois, actif) VALUES ('$nom','$regle','$jour','$mois','$actif')"; + $resql=$db->query($sql); + if ($resql) return true; + else return false; + } + + /** + * @param $nom string label de la date + * @return bool renvoie la valeur de suppression + */ + public static function deleteACMFeries($nom) : bool { + global $db; $db->query("SET NAMES 'utf8mb4'"); + $nom = $db->escape($nom); + $sql = "DELETE FROM llx_acm_feries WHERE nom = '$nom'"; + $resql=$db->query($sql); + if ($resql) return true; + else return false; + } +} \ No newline at end of file diff --git a/core/.htaccess b/core/.htaccess new file mode 100644 index 0000000..a7a56f7 --- /dev/null +++ b/core/.htaccess @@ -0,0 +1 @@ +Require all denied \ No newline at end of file diff --git a/core/modules/modACM.class.php b/core/modules/modACM.class.php new file mode 100644 index 0000000..f3fbfe7 --- /dev/null +++ b/core/modules/modACM.class.php @@ -0,0 +1,128 @@ +register(); +$chargeurDeClasse->addNamespace('Module\\ACM',__DIR__ ."/../../" ); + +use Module\ACM\Classe\GestionBD\gestionVariableCongee; +use Module\ACM\Classe\GestionBD\gestionDate; +use Module\ACM\Classe\GestionBD\gestionCouleur; + +require_once DOL_DOCUMENT_ROOT . "/core/modules/DolibarrModules.class.php"; + +class modACM extends DolibarrModules{ + /** + * @param $db TraceableDB est la variable qui contient la bd de dolibarr + */ + function __construct($db) { + + /** ** ** Base de la création de module dolibarr ** ** **/ + global $langs; + $this->db = $db; + $langs->load("ACM@ACM"); + $this->numero = 340003; + $this->editor_name = "Desal"; // nom de l'éditeur + $this->family = "Desal-Tools"; // lieu où le module est retrouvable + $this->name = preg_replace('/^mod/i', '', get_class($this)); // permet de récupérer le nom du module à partir du nom du fichier + $this->description = $langs->trans("ACMDescription"); // description du module, permet une traduction grâce à la fonction traduction + $this->version = 1; // numero de version au format X.X + $this->const_name = 'MAIN_MODULE_'.strtoupper($this->name); // constante du nom du module + $this->special = 3; // ? + $this->picto = 'ACM.png@'.$this->name; // image nommée object_ACM.png dans le dossier img de ACM + $this->module_parts = array ( // permet la gestion et l'execution des triggers et du js + 'hooks'=>array('holidaycard', 'holidaylist', 'formObjectOptions'), + 'js'=>array() + ); + + /** Création de répertoire dans la partie documentation **/ + $this->dirs = array(); // Exemple de composent : "/templateDolibarr/temp" + $r = 0; + /** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/ + + /** Gestion des dépendances et des modules obligatoires **/ + $this->hidden = false; + $this->depends = array("modHRM"); // module obligatoire pour utilisation + $this->conflictwith = array(); // liste des modules conflictuelle + $this->phpmin = array(7,0); // version minimum de php demander + $this->need_dolibarr_version = array(19,0,2); // version minimum de dolibarr demander + $this->langfiles = array($this->name.'@'.$this->name); // position du fichier de langue + /** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** **/ + $csrfToken = function_exists('newToken') ? newToken() : $_SESSION['newtoken']; + $this->config_page_url = '../custom/ACM/admin/setup.php'; + + $this->tabs = array('objecttype:+ACMAbsences:Absences:ACM@ACM:/ACM/absences.php?id=__ID__'); + + $this->boxes = array(); // permet un affichage sur la page d'accueil + $r = 0; + + /** ** ** Gestion des permissions ** ** **/ + $this->rights = array(); + $this->rights_class = $this->name; + $r=0; + + // Exemple de permission // + $r++; + $this->rights[$r][0] = 3400031; + $this->rights[$r][1] = 'User can use the module'; + $this->rights[$r][2] = 'r'; + $this->rights[$r][3] = 0; + $this->rights[$r][4] = 'moduleutilisable'; + /** ** ** ** ** ** ** ** ** ** ** ** ** **/ + $r = 0; + + + $this->menu = array(); + $r = 0; + $r = $r+1; + // Add here entries to declare new menus + /* BEGIN MODULEBUILDER TOPMENU */ + $this->menu[$r] = array( + 'fk_menu' => 'fk_mainmenu=hrm', // Pas de parent, menu principal + 'type' => 'left', // Menu principal en haut + 'prefix' => img_picto('pictoAbsence', 'absence@ACM', 'class="pictofixedwidth paddingright em088"'), + 'titre' => " ".$langs->trans("ACMAbsenceTitre"), // Nom affiché + 'mainmenu' => 'hrm', // Menu principal pour ton module + 'leftmenu' => 'acmAbsences', // Identifiant unique pour le sous-menu + 'url' => '/acm/index.php', // Lien vers ta page + 'langs' => 'acm@acm', // Fichier de langue + 'position' => 1000+$r, // Position dans le menu + 'enabled' => '$conf->acm->enabled', // Affiche seulement si ACM est activé + ); + + $r = $r+1; + global $dolibarr_main_url_root; + $css_file = $dolibarr_main_url_root . '/custom/ACM/css/style.css'; + $this->resprints = ""; + } + + /** + * @override dolibarr + * @param $options + * @return int + */ + function init($options=''){ + global $conf, $langs; + $result = $this->_load_tables('/ACM/sql/'); + if ($result < 0) { + return -1; // Do not activate module if error 'not allowed' returned when loading module SQL queries (the _load_table run sql with run_sql with the error allowed parameter set to 'default') + } + $this->remove($options); + $sql = array(); + gestionCouleur::getListeCouleur(); + gestionDate::importerDateFerier(); + return $this->_init($sql, $options); + } + + /** + * @param $options + * @return mixed + */ + function remove($options=''){ + $sql = array(); + return $this->_remove($sql, $options); + } + + + +} \ No newline at end of file diff --git a/css/StyleTableau.css.php b/css/StyleTableau.css.php new file mode 100644 index 0000000..7e65aaa --- /dev/null +++ b/css/StyleTableau.css.php @@ -0,0 +1,37 @@ + + \ No newline at end of file diff --git a/img/.htaccess b/img/.htaccess new file mode 100644 index 0000000..5d14b45 --- /dev/null +++ b/img/.htaccess @@ -0,0 +1 @@ +Require all granted \ No newline at end of file diff --git a/img/absence.png b/img/absence.png new file mode 100644 index 0000000000000000000000000000000000000000..282f736999e472f471c1b5e8bc65ece45589368f GIT binary patch literal 3280 zcmZ8j2T&7AwA~~SYCw^PA<{&oDM*P_=_tJ#=_mvwp(6o76bv9J9R!prAfkY@&>~2Q z(gkTsks9ns98F*ZCf%E-yf zK=S|1dQ_1y|KCh$bbi#J^t{l2l$Od$boSpYSs9t5=%X1BW~wUt7XWPc4Rp0I!Pi%E z9g`dsdAklz38j@zac{`yH_Qt_6sIsn!kS>t*I#bE^{U zG3`>xp<p#arV z7lu`NgR)B=v2Y#Kfcx1>?h|?57-KgWh&YHt{!J&2rUH1{lD<1dg~?hkCE6kQ7pc{l9j%v%<<$>&Vg&n)dtbNB*zA2XICr8d4+V|`1H9J1EC~p?66Ha~JeKII}2KO6Fu(gXZAPFI6Su*nJN+zPQ-{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--git a/img/object_ACM.png b/img/object_ACM.png new file mode 100644 index 0000000000000000000000000000000000000000..4a8f4d23cafd3880d167cb7942a197084fd6afa5 GIT binary patch literal 5057 zcmV;y6F%&TP)f+fqr1vk@|rffN=%U z*hEg40{jkl$LsV6aA+ZvHsKxn01uJ8^ULW$U~B>OHsKjpV|MPNz02-JM?j&J0^cO@PsOJZq76oik6}Y z$Qh@o-!~#Ff(tJMdBT|Em7+RBqYr=s)$fNAlzCA7KG>S8LD1*}pkMvA?fn`$PoF1R z>Jp7U05+@NuT4;9zWTk%4=GI)fwvN6=ym~9WAaY}dR3V-^Chu~JkgEF`Lzt-<(9nD zF=YWy5r1lEVie%Lm;#;`f$snp1?iUHKb`OV0_bhRGfKd%q!$G*3d%M#Mk5or53m53 zmoWc4;HV7kOatboXya`NZB68aLxC>bu z@^1iUr=Vd@P)67DHA~*kfR-&W^!5gMnn%hCcrBu_bA8B1k)xSyCIY_3r~(6V!9ID%%H~;DNrGn1-Ya5|nENE&#S-f42vK zS9+jtRO2jQ5B6DdHR)#WPgNZYJ<|CtRrft9%I*t%33(^|p1Xm+_ekfc!o}E^{Ee7~ z9F@?Gc}#qjH%eiKs(UYPKE#E2*!i15;^i3)hgRTP?91X0$;PnF!yH7up*t^&rBK;7 z!S?Q7$9_D`6>-c=9_Rpm1iVH4zZbFJyES9I)79_E`1kNRK>a=n_*Kd}b|E~?FOlPF z*!bjpgzg12s1Zsl@B_?|zk}+JMweLX%{yIOCC#(3%MNa*_7gLAv;yD5eA%_wb@OTQ zZ+=QL?lGOH?tU1tv71sPQFV^PfTxLmvz_?ildQ;V3mA(iQjQJ%*9V+R`lFLC zj70`zCFW`nS*7;mPLUmRfqRK=WxoebMtl`V1+KwlYA!60o)eMdW>O|^JE8+93Kv;u z`f`Evq{3`W5%0}~QY2QtX*vDx6hi3;zD1Ot0pK-75|jj;$Z{1Xd?UpNTKF;P2f&XD zp>zaekgX_8(;Cw2AY$R$D) z=wXDZTTSJoWgY`y3L~y$KJ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P6B2vMM>8dhrwII1XnZ@2=ba9(88y z;S;ThJCc6s0mN-7kG=RvOn>`w`g4$M&vuZ{7F9yLrfoh8-=qO&zD5gTc5VCUi}0^O zyu;GYjYK>5aKysKwiNrsc;reQ+q>U@|NEBe7ICv+1F}5&z|ofaKNOSyBP#C@{&lSm;r1Gk9w+n8Z#(?SQRaM|;Rp)ZH1HbBGvxOEY=;D72Khau`%+Xvc; zxRPbv7r(3OdvAg=7pO9s0xcsnpNpN*8wP$$9o_z2G`f&Ge_YO-YmvavX$QhDR6R+y zme;8=X>}K^h}pKb;VY+p#BnvxsOF;riz`(v>mwT^PzYfOrruppFAU zG%5~3_Wx5I&%2P0Orr=Yr`?E|yQ@=AMYfGv+)>a(224dFjHK;&+tJM$UAqy`sPgAy zkpNFN51KuQ_wY(a?$g^JF}d!+9^YUKqEcS%ozf<}<1p+h-ajEumT@8K#vmryHm2}t zn#Z}ihwakDvH&QJ|K5I>Qp90IQIv<IpL`=({ zJE@M(DPj5*Hlu#kDL#nVQPtWLfG~)9V7=c%y-j$AzM9pi8}${c?v)3w;{H6Zy|q4T|aUqP3$GiqXmBf Xmk$UXT$-LS00000NkvXXu0mjf9-7B_ literal 0 HcmV?d00001 diff --git a/index.php b/index.php new file mode 100644 index 0000000..a93b99b --- /dev/null +++ b/index.php @@ -0,0 +1,42 @@ +register(); +$chargeurDeClasse->addNamespace('Module\\ACM',__DIR__); +$res = 0; +global $db, $hookmanager, $conf; +// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined) +if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) { $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";} +// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME +$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1; +while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) {$i--;$j--;} +if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) {$res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";} +if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) {$res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";} +// Try main.inc.php using relative path +if (!$res && file_exists("../../main.inc.php")) {$res = @include "../../main.inc.php";} +if (!$res && file_exists("../../../main.inc.php")) {$res = @include "../../../main.inc.php";} +if (!$res) {die("Include of main fails");} + +if (!isset($_POST['controleur'])){ + $controleur = 'ControleurAbsence'; +} else { + $controleur = $_POST['controleur']; +} + + +$nomDeClasseControleur = 'Module\ACM\Classe\Controleur\Controleur'.ucfirst($controleur); +if (class_exists($nomDeClasseControleur)){ + if (isset($_POST['action'])){ + $action = $_POST['action']; + $methodes = get_class_methods($nomDeClasseControleur); + if (in_array($action, $methodes)){ + $nomDeClasseControleur::$action(); + }else ControleurGenerique::afficherErreur("

Erreur 404

page not found

"); + }else ControleurAbsence::afficherAbsence(); +}else ControleurAbsence::afficherAbsence(); \ No newline at end of file diff --git a/js/.htaccess b/js/.htaccess new file mode 100644 index 0000000..5d14b45 --- /dev/null +++ b/js/.htaccess @@ -0,0 +1 @@ +Require all granted \ No newline at end of file diff --git a/js/envoiePost.js b/js/envoiePost.js new file mode 100644 index 0000000..2bd98a7 --- /dev/null +++ b/js/envoiePost.js @@ -0,0 +1,27 @@ +function envoyerPost(data, url, csrfToken) { + // Créer un formulaire + const form = document.createElement('form'); + form.method = 'POST'; + form.action = url; + + // Ajouter chaque clé-valeur du tableau comme champ de formulaire + for (const [key, value] of Object.entries(data)) { + const input = document.createElement('input'); + input.type = 'hidden'; + input.name = key; + input.value = value; + form.appendChild(input); + } + + // Ajouter le jeton CSRF au formulaire + const csrfInput = document.createElement('input'); + csrfInput.type = 'hidden'; + csrfInput.name = 'token'; + csrfInput.value = csrfToken; + form.appendChild(csrfInput); + + // Ajouter le formulaire au document, le soumettre et le supprimer + document.body.appendChild(form); + form.submit(); + document.body.removeChild(form); +} \ No newline at end of file diff --git a/langs/.htaccess b/langs/.htaccess new file mode 100644 index 0000000..a7a56f7 --- /dev/null +++ b/langs/.htaccess @@ -0,0 +1 @@ +Require all denied \ No newline at end of file diff --git a/langs/fr_FR/ACM.lang b/langs/fr_FR/ACM.lang new file mode 100644 index 0000000..563ab42 --- /dev/null +++ b/langs/fr_FR/ACM.lang @@ -0,0 +1,72 @@ +# Dolibarr language file - fr_FR - ACM +CHARSET-UTF-8 +# Générique +ACM = Absence Congé Manageur +ACMDescription = Absence Congé Manageur ou ACM est un module ayant pour but la facilitation de la gestion des congés et des absences des employers. + +# Setup +ACMSettings = Absence Congé Manageur Paramétrage et Information +ACMSetup = Paramétrage ACM +ACMSetupTitre = Paramétrage Absence Congé Manageur +ACMPasDeParamettragePossible = Pas de paramettrage possible pour ACM pour le moment +# About +ACMAbout = A propos d'ACM +ACMAboutTitre = A propos d'Absence Congé Manageur +ACMAboutIntro = Absence Congé Manageur ou ACM est un module ayant pour but la facilitation de la gestion des congés et des absences des employers. +ACMAboutP1 = La gestion des absences est faite dans la partie GRH +ACMAboutP2 = La gestion des congés n'est pas encore géré +ACMCreditLogo = Icônes créées par zero_wing - Flaticon +ACMCreditLogoAbs = Icônes créées par Deione - Flaticon + +Permission3400031 = Utilisateur peux utiliser ce module + +# Absence +ACMAbsenceTitre = Gestion des absences +ACMSemaineDu = Semaine du +ACMAu = au + +# Date +ACMNewYear = Nouvel an +ACMLaborDay = Fête du travail +ACMVictoryDay = Armistice 39 45 +ACMNationalDay = Fête nationale +ACMAssomption = 15 août +ACMToussaint = Toussaint +ACMArmistice = Armistice 14 18 +ACMChristmas = Noël +ACMEasterMonday = Pâques +ACMAscension = Ascension +ACMPentecost = Pentecôte + +# Mois +ACMJan = janvier +ACMFeb = février +ACMMar = mars +ACMApr = avril +ACMMay = mai +ACMJun = juin +ACMJul = juillet +ACMAug = août +ACMSep = septembre +ACMOct = octobre +ACMNov = novembre +ACMDec = décembre + +# Gestion Planing +ACMTitreTableau = titre tableau +ACMCorpsTableau = corp tableau +ACMBordure = bordure +ACMConge = congé +ACMAbsent = absent +ACMMalade = malade +ACMTravail = travail +ACMTeletravail = télétravail +ACMAm = matin +ACMPm = après-midi +ACMLogin = identifient +ACMFontTitreTableau = titre +ACMFontCorpsTableau = texte +ACMRecupe = récupération + +# Couleur +ACMCouleur = Couleur \ No newline at end of file diff --git a/lib/.htaccess b/lib/.htaccess new file mode 100644 index 0000000..a7a56f7 --- /dev/null +++ b/lib/.htaccess @@ -0,0 +1 @@ +Require all denied \ No newline at end of file diff --git a/lib/ACM.lib.php b/lib/ACM.lib.php new file mode 100644 index 0000000..a33a050 --- /dev/null +++ b/lib/ACM.lib.php @@ -0,0 +1,74 @@ +. + */ + +/** + * \file temp/lib/temp.lib.php + * \ingroup temp + * \brief Library files with common functions for Temp + */ + +/** + * Prepare admin pages header + * + * @return array + */ +function ACMAdminPrepareHead() +{ + global $langs, $conf; + + // global $db; + // $extrafields = new ExtraFields($db); + // $extrafields->fetch_name_optionals_label('myobject'); + + $langs->load("ACM@ACM"); + + $h = 0; + $head = array(); + + $head[$h][0] = dol_buildpath("/ACM/admin/setup.php", 1); + $head[$h][1] = $langs->trans("Settings"); + $head[$h][2] = 'settings'; + $h++; + + /* + $head[$h][0] = dol_buildpath("/temp/admin/myobject_extrafields.php", 1); + $head[$h][1] = $langs->trans("ExtraFields"); + $nbExtrafields = is_countable($extrafields->attributes['myobject']['label']) ? count($extrafields->attributes['myobject']['label']) : 0; + if ($nbExtrafields > 0) { + $head[$h][1] .= ' ' . $nbExtrafields . ''; + } + $head[$h][2] = 'myobject_extrafields'; + $h++; + */ + + + + // Show more tabs from modules + // Entries must be declared in modules descriptor with line + //$this->tabs = array( + // 'entity:+tabname:Title:@temp:/temp/mypage.php?id=__ID__' + //); // to add new tab + //$this->tabs = array( + // 'entity:-tabname:Title:@temp:/temp/mypage.php?id=__ID__' + //); // to remove a tab + + complete_head_from_modules($conf, $langs, null, $head, $h, 'ACM@ACM'); + + complete_head_from_modules($conf, $langs, null, $head, $h, 'ACM@ACM', 'remove'); + + return $head; +} diff --git a/lib/Psr4AutoloaderClass.php b/lib/Psr4AutoloaderClass.php new file mode 100644 index 0000000..3710f80 --- /dev/null +++ b/lib/Psr4AutoloaderClass.php @@ -0,0 +1,213 @@ +register(); + * + * // register the base directories for the namespace prefix + * $loader->addNamespace('Foo\Bar', '/path/to/packages/foo-bar/src'); + * $loader->addNamespace('Foo\Bar', '/path/to/packages/foo-bar/tests'); + * + * The following line would cause the autoloader to attempt to load the + * \Foo\Bar\Qux\Quux classe from /path/to/packages/foo-bar/src/Qux/Quux.php: + * + * debug = $debug; + } + + private function affichageDebogage(string $message) : void + { + if ($this->debug) + echo $message; + } + + /** + * An associative array where the key is a namespace prefix and the value + * is an array of base directories for classes in that namespace. + * + * @var array + */ + protected array $prefixes = array(); + + /** + * Register loader with SPL autoloader stack. + * + * @return void + */ + public function register() : void + { + spl_autoload_register(array($this, 'loadClass')); + } + + /** + * Adds a base directory for a namespace prefix. + * + * @param string $prefix The namespace prefix. + * @param string $base_dir A base directory for classe files in the + * namespace. + * @param bool $prepend If true, prepend the base directory to the stack + * instead of appending it; this causes it to be searched first rather + * than last. + * @return void + */ + public function addNamespace(string $prefix, string $base_dir, bool $prepend = false) : void + { + // normalize namespace prefix + $prefix = trim($prefix, '\\') . '\\'; + + // normalize the base directory with a trailing separator + $base_dir = rtrim($base_dir, DIRECTORY_SEPARATOR) . '/'; + + // initialize the namespace prefix array + if (isset($this->prefixes[$prefix]) === false) { + $this->prefixes[$prefix] = array(); + } + + // retain the base directory for the namespace prefix + if ($prepend) { + array_unshift($this->prefixes[$prefix], $base_dir); + } else { + array_push($this->prefixes[$prefix], $base_dir); + } + } + + /** + * Loads the classe file for a given classe name. + * + * @param string $class The fully-qualified classe name. + * @return mixed The mapped file name on success, or boolean false on + * failure. + */ + public function loadClass(string $class) + { + $this->affichageDebogage("

Chargement automatique de classe $class

"); + // the current namespace prefix + $prefix = $class; + + // work backwards through the namespace names of the fully-qualified + // classe name to find a mapped file name + while (false !== $pos = strrpos($prefix, '\\')) { + + // retain the trailing namespace separator in the prefix + $prefix = substr($class, 0, $pos + 1); + + // the rest is the relative classe name + $relative_class = substr($class, $pos + 1); + + // try to load a mapped file for the prefix and relative classe + $mapped_file = $this->loadMappedFile($prefix, $relative_class); + if ($mapped_file) { + return $mapped_file; + } + + // remove the trailing namespace separator for the next iteration + // of strrpos() + $prefix = rtrim($prefix, '\\'); + } + + // never found a mapped file + $this->affichageDebogage("

Échec !

"); + return false; + } + + /** + * Load the mapped file for a namespace prefix and relative classe. + * + * @param string $prefix The namespace prefix. + * @param string $relative_class The relative classe name. + * @return mixed Boolean false if no mapped file can be loaded, or the + * name of the mapped file that was loaded. + */ + protected function loadMappedFile(string $prefix, string $relative_class) + { + // are there any base directories for this namespace prefix? + if (isset($this->prefixes[$prefix]) === false) { + return false; + } + + // look through base directories for this namespace prefix + foreach ($this->prefixes[$prefix] as $base_dir) { + + $this->affichageDebogage("Remplacement du préfixe $prefix par $base_dir
"); + + // replace the namespace prefix with the base directory, + // replace namespace separators with directory separators + // in the relative classe name, append with .php + $file = $base_dir + . str_replace('\\', '/', $relative_class) + . '.php'; + + // if the mapped file exists, require it + if ($this->requireFile($file)) { + // yes, we're done + return $file; + } + } + + // never found it + return false; + } + + /** + * If a file exists, require it from the file system. + * + * @param string $file The file to require. + * @return bool True if the file exists, false if not. + */ + protected function requireFile(string $file) : bool + { + if (file_exists($file)) { + $this->affichageDebogage("

Réussite : fichier chargé

$file

"); + require $file; + return true; + } + $this->affichageDebogage("

Échec : fichier introuvable

$file

"); + return false; + } +} \ No newline at end of file diff --git a/sql/llx_acm_couleur.sql b/sql/llx_acm_couleur.sql new file mode 100644 index 0000000..000fc58 --- /dev/null +++ b/sql/llx_acm_couleur.sql @@ -0,0 +1,5 @@ +CREATE TABLE IF NOT EXISTS llx_acm_couleur ( + rid integer NOT NULL auto_increment PRIMARY KEY, + nom varchar(32) UNIQUE NOT NULL, + codeHexa varchar(7) NOT NULL +); diff --git a/sql/llx_acm_feries.sql b/sql/llx_acm_feries.sql new file mode 100644 index 0000000..9c99ce0 --- /dev/null +++ b/sql/llx_acm_feries.sql @@ -0,0 +1,8 @@ +CREATE TABLE IF NOT EXISTS llx_acm_feries ( + rid integer NOT NULL auto_increment PRIMARY KEY, + nom varchar(32) NOT NULL UNIQUE, + regle varchar(32) NOT NULL DEFAULT 'fixe', + jour int NULL, + mois int NULL, + actif varchar(7) NOT NULL DEFAULT 'actif' +); diff --git a/view/.htaccess b/view/.htaccess new file mode 100644 index 0000000..a7a56f7 --- /dev/null +++ b/view/.htaccess @@ -0,0 +1 @@ +Require all denied \ No newline at end of file diff --git a/view/admin/dateGestion.php b/view/admin/dateGestion.php new file mode 100644 index 0000000..dcd6319 --- /dev/null +++ b/view/admin/dateGestion.php @@ -0,0 +1,135 @@ +loadLangs(array("admin", "ACM@ACM")); +/** @var $liste */ +/** @var $listeCouleur */ +?> + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ nom + + régle + + jour + + mois + + état + + +
+ trans($item['nom']) ?> + + + + + + + + + + + + + + + + + + + + +
+ aucune valeur dans la base de donnée +
+
+
+
+

Gestion des couleurs

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ " /> + + + " /> + + + " /> + +
+ " /> + + + " /> + + +
+ " /> + + + " /> + + + " /> + +
" />
+
+
diff --git a/view/admin/parametrageBase.php b/view/admin/parametrageBase.php new file mode 100644 index 0000000..e91012f --- /dev/null +++ b/view/admin/parametrageBase.php @@ -0,0 +1,80 @@ +loadLangs(array("admin", "ACM@ACM")); + +$csrfToken = function_exists('newToken') ? newToken() : $_SESSION['newtoken']; +/** @var $lien */ +$page_name = "ACMSettings"; +$backtopage = GETPOST('backtopage', 'alpha'); +$linkback = ''.$langs->trans("BackToModuleList").''; +print load_fiche_titre($langs->trans($page_name), $linkback, 'title_setup'); +?> + + + + + + + +
+

trans("ACMSetupTitre")?>

+ +
+ + + + \ No newline at end of file diff --git a/view/admin/suppression.php b/view/admin/suppression.php new file mode 100644 index 0000000..f612683 --- /dev/null +++ b/view/admin/suppression.php @@ -0,0 +1,34 @@ + +
+ + + + +
+ + + + + + + + + + + +
+ trans("ACMTexteDeSuppression")." ".$nom?> +
+ + + + + +
+ +
+
+
diff --git a/view/erreur.php b/view/erreur.php new file mode 100644 index 0000000..2e8baac --- /dev/null +++ b/view/erreur.php @@ -0,0 +1,9 @@ + +
+ + +
+
+ diff --git a/view/planningAbsence/acceuil.php b/view/planningAbsence/acceuil.php new file mode 100644 index 0000000..4f7b498 --- /dev/null +++ b/view/planningAbsence/acceuil.php @@ -0,0 +1,95 @@ +format('Y-m-d')); $dateSuv = new DateTime($semaine[0]->format('Y-m-d'));$datePrecMois = new DateTime($semaine[0]->format('Y-m-d')); $dateSuvMois = new DateTime($semaine[0]->format('Y-m-d')); +$datePrec->modify('-1 week'); $dateSuv->modify('+1 week');$datePrecMois->modify('-1 month'); $dateSuvMois->modify('+1 month'); +$datePrec = $datePrec->format("Y-m-d"); $dateSuv = $dateSuv->format("Y-m-d");$datePrecMois = $datePrecMois->format("Y-m-d"); $dateSuvMois = $dateSuvMois->format("Y-m-d"); + +?> + +

+ + + + + +

+ + + + + + + + + + + + + + + + + + + + + + $affichage"; + } + ?> + "; + foreach ($semaine as $jour) {?> + + "; + }?> + + +
+ trans("ACMLogin")?> + + format("d/m/Y") ?> +
+ trans("ACMAm")?> + + trans("ACMPm")?> +
+ + + + + + +
trans("ACMConge")?> trans("ACMMalade")?> trans("ACMRecupe")?>
\ No newline at end of file diff --git a/view/vueGenerale.php b/view/vueGenerale.php new file mode 100644 index 0000000..8358a02 --- /dev/null +++ b/view/vueGenerale.php @@ -0,0 +1,24 @@ +'; + + if ($message != "") print "

$message

"; + else if ($popup != "") print ''; + if (isset($cheminCorpsVue))require __DIR__ . "/{$cheminCorpsVue}"; + +print ""; +// End of page +llxFooter(); +?> +