cms.sftp-delete-file-local.php 721 B

123456789101112131415161718192021
  1. <?php
  2. if(core::ifPost("from")){
  3. if (unlink(SFTP_LOCAL.core::getPost("file")) AND salaries::deleteExcelJsonForSFTP(salaries::lastExcel())) {
  4. historique::recRef("/proweb-export-csv.html");
  5. historique::add(array(
  6. "idType" => historique::getIdRef("ACTION"),
  7. "idUser" => session::getId(),
  8. "idPage" => historique::getIdRef("/proweb-export-csv.html"),
  9. "log" => "Suppression en local de ". core::getPost("file")
  10. ));
  11. alert::recSuccess(core::getPost("file") . " a bien été supprimé");
  12. } else {
  13. alert::recError(core::getPost("file") . " n'a pas pu être supprimé");
  14. }
  15. }
  16. header("Location: /proweb-export-csv.html");
  17. exit();