cms.parametres-add-backup.php 522 B

1234567891011121314151617181920
  1. <?php
  2. if (core::ifGet("from")) {
  3. backup::create();
  4. file::cleanFilesByOrder(DIR_BACKUP, BACKUP_LIMIT);
  5. historique::recRef("/parametres.html");
  6. historique::add(array(
  7. "idType" => historique::getIdRef("ACTION"),
  8. "idUser" => session::getId(),
  9. "idPage" => historique::getIdRef("/parametres.html"),
  10. "log" => "Création d'un backup"
  11. ));
  12. header("Location: /parametres.html#parametres-restore");
  13. exit();
  14. } else {
  15. header('HTTP/1.0 401 Unauthorized');
  16. exit();
  17. }