index.php 870 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. error_reporting(NULL);
  3. $TAB = 'BACKUP';
  4. // Main include
  5. include($_SERVER['DOCUMENT_ROOT']."/inc/main.php");
  6. // Header
  7. include($_SERVER['DOCUMENT_ROOT'].'/templates/header.html');
  8. // Panel
  9. top_panel($user,$TAB);
  10. // Data
  11. if (empty($_GET['backup'])){
  12. v_exec('v-list-user-backups', [$user, 'json'], false, $output);
  13. $data = json_decode($output, true);
  14. $data = array_reverse($data, true);
  15. include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup.html');
  16. } else {
  17. v_exec('v-list-user-backup', [$user, $_GET['backup'], 'json'], false, $output);
  18. $data = json_decode($output, true);
  19. $data = array_reverse($data, true);
  20. include($_SERVER['DOCUMENT_ROOT'].'/templates/admin/list_backup_detail.html');
  21. }
  22. // Back uri
  23. $_SESSION['back'] = $_SERVER['REQUEST_URI'];
  24. // Footer
  25. include($_SERVER['DOCUMENT_ROOT'].'/templates/footer.html');