HEX
Server: LiteSpeed
System: Linux venus 5.15.0-153-generic #163-Ubuntu SMP Thu Aug 7 16:37:18 UTC 2025 x86_64
User: axxoncom (1007)
PHP: 8.3.19
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: /home/axxoncom/domains/mitafoods.com/private_html/wp-content/plugins/backup-backup/uninstall.php
<?php

  // Namespace
  namespace BMI\Plugin\Uninstaller;

  // Exit on direct access
  if (!defined('ABSPATH')) exit;

  // Get config file
  $configFile = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'backup-migration-config.php';

  if (!file_exists($configFile)) {
    return;
  }

  $config = file_get_contents($configFile);
  $config = json_decode(substr($config, 8), true);


  $deleteBackups = $config['OTHER:UNINSTALL:BACKUPS'];
  $deleteConfigs = $config['OTHER:UNINSTALL:CONFIGS'];


  if ($deleteBackups === 'true' || $deleteBackups === true) {
      $backupsPath = $config['STORAGE::LOCAL::PATH'];
      $backupsPath = $backupsPath . DIRECTORY_SEPARATOR . 'backups';

    if (file_exists($backupsPath) && is_dir($backupsPath)) {

      $files = scandir($backupsPath);
      for ($i = 0; $i < sizeof($files); ++$i) {

        $file = $backupsPath . DIRECTORY_SEPARATOR . $files[$i];
        if (is_file($file) && !in_array($files[$i], ['.', '..'])) {
          @unlink($file);
        }

      }

      $files = scandir($backupsPath);
      if (sizeof($files) <= 2) rmdir($backupsPath);

    }
  }

  if ($deleteConfigs === 'true' || $deleteConfigs === true) {
    $configFile = WP_CONTENT_DIR . DIRECTORY_SEPARATOR . 'backup-migration-config.php';

    if (file_exists($configFile)) {
      @unlink($configFile);
    }

    global $wpdb;


    $free_options = $wpdb->get_results( "SELECT option_name FROM $wpdb->options WHERE option_name LIKE 'bmi_%'" );

    foreach( $free_options as $option ) {
        delete_option( $option->option_name );
    }
    
  }