HEX
Server: Apache
System: Linux flamboyant-gauss.194-164-62-186.plesk.page 6.8.0-55-generic #57-Ubuntu SMP PREEMPT_DYNAMIC Wed Feb 12 23:42:21 UTC 2025 x86_64
User: gamesamphora (10001)
PHP: 7.4.33
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/amphoragames.com/httpdocs/en/wp-content/plugins/backwpup/parts/backups/progress.php
<?php
use BackWPup\Utils\BackWPupHelpers;

$job_object = BackWPup_Job::get_working_data();
$abort_url = '';
$lobfiledata = $logfiledata ?? '';
if (current_user_can('backwpup_jobs_start') && is_object($job_object)) {
//read existing logfile
    $logfiledata = file_get_contents($job_object->logfile);
    preg_match('/<body[^>]*>/si', $logfiledata, $match);
    if (!empty($match[0])) {
        $startpos = strpos($logfiledata, $match[0]) + strlen($match[0]);
    } else {
        $startpos = 0;
    }
    $endpos = stripos($logfiledata, '</body>');
    if (empty($endpos)) {
        $endpos = strlen($logfiledata);
    }
    $length = strlen($logfiledata) - (strlen($logfiledata) - $endpos) - $startpos;
    $abort_url = wp_nonce_url(network_admin_url('admin.php') . '?page=backwpupjobs&action=abort', 'abort-job');
}

BackWPupHelpers::component("heading", [
  "level" => 1,
  "title" => __("We are creating a backup of your site…", 'backwpup'),
  "class" => "max-md:text-center",
  "identifier" => "backupgeneration-progress-box-title",
]);
?>

<?php BackWPupHelpers::component("progress-box", [
    "class" => "backupgeneration-progress-box",
    "abortUrl" => $abort_url,
]); ?>
<input type="hidden" name="logpos" id="logpos" value="<?php echo strlen($logfiledata ?? ''); ?>" />
<input type="hidden" name="next_job_id" id="next_job_id" value="" />
<div id="tb-showworking" style="display:none;">
  <div id="showworking"><?php echo substr($logfiledata ?? '', $startpos ?? 0, $length ?? 0); ?></div>
</div>