stany.ferer 2 years ago
parent
commit
7e72c5bd63

+ 8 - 0
core/submit/cms.event-import-inscription.php

@@ -59,6 +59,14 @@ if (core::ifPost("from") AND core::getPost("from") == "event-import-inscription"
                     }
                 }
             }
+
+            historique::recRef("/evenement-".core::getPost("event").".html");
+            historique::add(array(
+                "idType" => historique::getIdRef("ACTION"),
+                "idUser" => session::getId(),
+                "idPage" => historique::getIdRef("/evenement-".core::getPost("event").".html"),
+                "log" => "Import des inscriptions"
+            ));
             
             header("Location: /evenement-".core::getPost("event").".html");
             exit();

+ 9 - 0
core/submit/cms.proweb-delete-excel.php

@@ -3,6 +3,15 @@
 if(core::ifPost("from")){
     if(proweb::deleteExcel(core::getPost("id"))){
         json::create("excel-proweb");
+
+        historique::recRef("/proweb-historique-excel.html");
+        historique::add(array(
+            "idType" => historique::getIdRef("ACTION"),
+            "idUser" => session::getId(),
+            "idPage" => historique::getIdRef("/proweb-historique-excel.html"),
+            "log" => "Suppression de ". core::getPost("file")
+        ));
+
         alert::recSuccess("Suppression de ". core::getPost("file"));
     } else {
         alert::recError("Erreur lors de la suppression de ". core::getPost("file"));

+ 9 - 0
core/submit/cms.proweb-import-salaries.php

@@ -129,6 +129,15 @@ if (core::ifPost("from") AND core::getPost("from") == $name["files"]) {
             
             json::create("excel-proweb");
             json::create($name["json"]);
+
+            historique::recRef("/proweb-export-csv.html");
+            historique::add(array(
+                "idType" => historique::getIdRef("ACTION"),
+                "idUser" => session::getId(),
+                "idPage" => historique::getIdRef("/proweb-export-csv.html"),
+                "log" => "Import du fichier " . $_FILES[$name["files"]]['name']
+            ));
+
             alert::recSuccess("Le fichier " . $_FILES[$name["files"]]['name'] . " a été chargé avec succès");
             header("Location: /".$name["returnOk"] . ".html");
             exit();

+ 9 - 0
core/submit/cms.rh-import-excel.php

@@ -73,6 +73,15 @@ if (core::ifPost("from") AND core::getPost("from") == "rh-import-excel") {
             }
 
             json::create("excel");
+
+            historique::recRef("/rh-historique-excel.html");
+            historique::add(array(
+                "idType" => historique::getIdRef("ACTION"),
+                "idUser" => session::getId(),
+                "idPage" => historique::getIdRef("/rh-historique-excel.html"),
+                "log" => "Import du fichier " . $_FILES[core::getPost("from")]['name']
+            ));
+
             alert::recSuccess("Le fichier " . $_FILES[core::getPost("from")]['name'] . " a été chargé avec succès");
             header("Location: /rh-historique-excel.html");
             exit();

+ 9 - 0
core/submit/cms.sftp-create-csv-salaries.php

@@ -2,6 +2,15 @@
 
 if(core::ifPost("from")){
     salaries::dataForSFTP();
+
+    historique::recRef("/proweb-export-csv.html");
+    historique::add(array(
+        "idType" => historique::getIdRef("ACTION"),
+        "idUser" => session::getId(),
+        "idPage" => historique::getIdRef("/proweb-export-csv.html"),
+        "log" => "Création du CSV"
+    ));
+
     alert::recSuccess("Le CSV à envoyer à ProWeb vient d'être créé.");
 }
 

+ 9 - 0
core/submit/cms.sftp-delete-file-local.php

@@ -2,6 +2,15 @@
 
 if(core::ifPost("from")){
     if (unlink(SFTP_LOCAL.core::getPost("file"))) { 
+
+        historique::recRef("/proweb-export-csv.html");
+        historique::add(array(
+            "idType" => historique::getIdRef("ACTION"),
+            "idUser" => session::getId(),
+            "idPage" => historique::getIdRef("/proweb-export-csv.html"),
+            "log" => "Suppression en local de ". core::getPost("file")
+        ));
+
         alert::recSuccess(core::getPost("file") . " a bien été supprimé");
     } else {
         alert::recError(core::getPost("file") . " n'a pas pu être supprimé");

+ 8 - 0
core/submit/cms.sftp-delete-file-remote.php

@@ -2,6 +2,14 @@
 
 if(core::ifPost("from")){
     sftp::deleteFormRemote(core::getPost("file"));
+
+    historique::recRef("/proweb-export-csv.html");
+    historique::add(array(
+        "idType" => historique::getIdRef("ACTION"),
+        "idUser" => session::getId(),
+        "idPage" => historique::getIdRef("/proweb-export-csv.html"),
+        "log" => "Suppression de ". core::getPost("file") . " sur " . SFTP_HOST
+    ));
 }
 
 header("Location: /proweb-export-csv.html");

+ 9 - 0
core/submit/cms.sftp-download-file-local.php

@@ -4,5 +4,14 @@ if(core::ifPost("from")){
     header('Content-type: application/octet-stream;');
     header('Content-Transfer-Encoding: base64');
     header('Content-Disposition: attachment; filename="'.core::getPost("file").'"');
+
+    historique::recRef("/proweb-export-csv.html");
+    historique::add(array(
+        "idType" => historique::getIdRef("ACTION"),
+        "idUser" => session::getId(),
+        "idPage" => historique::getIdRef("/proweb-export-csv.html"),
+        "log" => "Téléchargement du fichier local ". core::getPost("file")
+    ));
+
     readfile(SFTP_LOCAL.core::getPost("file"));
 }

+ 8 - 0
core/submit/cms.sftp-download-file-remote.php

@@ -2,6 +2,14 @@
 
 if(core::ifPost("from")){
     sftp::downloadFormRemote(core::getPost("file"));
+
+    historique::recRef("/proweb-export-csv.html");
+    historique::add(array(
+        "idType" => historique::getIdRef("ACTION"),
+        "idUser" => session::getId(),
+        "idPage" => historique::getIdRef("/proweb-export-csv.html"),
+        "log" => "Téléchargement du fichier ". core::getPost("file") . " sur " . SFTP_HOST
+    ));
     
     header('Content-type: application/octet-stream;');
     header('Content-Transfer-Encoding: base64');

+ 9 - 0
core/submit/cms.sftp-transfert-file-local.php

@@ -2,6 +2,15 @@
 
 if(core::ifPost("from")){
     if (sftp::sendFileToRemote(core::getPost("file"))) { 
+
+        historique::recRef("/proweb-export-csv.html");
+        historique::add(array(
+            "idType" => historique::getIdRef("ACTION"),
+            "idUser" => session::getId(),
+            "idPage" => historique::getIdRef("/proweb-export-csv.html"),
+            "log" => "Transfert du fichier ". core::getPost("file") . " sur " . SFTP_HOST
+        ));
+
         unlink(SFTP_LOCAL.core::getPost("file"));
     }
 }

+ 9 - 0
core/submit/cms.sociale-check-salarie.php

@@ -2,6 +2,15 @@
 
 if(core::ifPost("from")){
     $return = salaries::checkSalarieByMatricule(core::getPost("checkSalarie"));
+
+    historique::recRef("/sociale-check-salarie.html");
+    historique::add(array(
+        "idType" => historique::getIdRef("ACTION"),
+        "idUser" => session::getId(),
+        "idPage" => historique::getIdRef("/sociale-check-salarie.html"),
+        "log" => "Vérification sur un matricule de salarié"
+    ));
+
     $_SESSION["result-check-salarie"] = $return;  
 }