/opt/backups/panels/cpanel_plugin/plugin
Edit: /opt/backups/panels/cpanel_plugin/plugin/backup_mgr.live.php (1125B)
header('Backup Manager');
// CSRF: hand the browser the cPanel session security token so the page's ajax
// (backup_mgr.js / file_browse.js -> post.live.php) can echo it back for
// verification. Emitted before the Flask-rendered body so the global is set
// before backup_mgr.js runs.
printf(
"\n",
json_encode((string) getenv('cp_security_token'))
);
$response = $cpanel->uapi(
'Backups',
'backups',
array('action' => 'index', 'args' => '')
);
if ($response['cpanelresult']['result']['status'] === 1) {
echo $response['cpanelresult']['result']['data'];
} else {
echo '
cPanel uapi call reported an error: '
. htmlspecialchars(json_encode($response['cpanelresult']['result']['errors']))
. '';
}
print $cpanel->footer();
$cpanel->end();
?>