cms.sftp-transfert-file-local.php 564 B

12345678910111213141516171819
  1. <?php
  2. if(core::ifPost("from")){
  3. if (sftp::sendFileToRemote(core::getPost("file"))) {
  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" => "Transfert du fichier ". core::getPost("file") . " sur " . SFTP_HOST
  10. ));
  11. unlink(SFTP_LOCAL.core::getPost("file"));
  12. }
  13. }
  14. header("Location: /proweb-export-csv.html");
  15. exit();