Changed source root directory

This commit is contained in:
2026-03-05 16:30:11 +01:00
parent dc85447ee1
commit 538f85d7a2
5868 changed files with 749734 additions and 99 deletions

View File

@@ -0,0 +1,115 @@
<?php
use Duplicator\Utils\Support\SupportToolkit;
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
?>
<!-- ==============================
OPTIONS DATA -->
<div class="dup-box">
<div class="dup-box-title">
<i class="fa fa-th-list"></i>
<?php esc_html_e("Utils", 'duplicator'); ?>
<div class="dup-box-arrow"></div>
</div>
<div class="dup-box-panel" id="dup-settings-diag-opts-panel" style="<?php echo esc_html($ui_css_opts_panel); ?>">
<table class="dup-reset-opts">
<tr style="vertical-align:text-top">
<td>
<button id="dup-remove-installer-files-btn" type="button" class="button button-small dup-fixed-btn" onclick="Duplicator.Tools.deleteInstallerFiles();">
<?php esc_html_e("Remove Installation Files", 'duplicator'); ?>
</button>
</td>
<td>
<?php esc_html_e("Removes all reserved installer files.", 'duplicator'); ?>
<a href="javascript:void(0)" onclick="jQuery('#dup-tools-delete-moreinfo').toggle()">[<?php esc_html_e("more info", 'duplicator'); ?>]</a><br/>
<div id="dup-tools-delete-moreinfo">
<?php
esc_html_e("Clicking on the 'Remove Installation Files' button will attempt to remove the installer files used by Duplicator. These files should not "
. "be left on production systems for security reasons. Below are the files that should be removed.", 'duplicator');
echo "<br/><br/>";
$installer_files = array_keys($installer_files);
array_push($installer_files, '[HASH]_archive.zip/daf');
echo '<i>' . implode('<br/>', $installer_files) . '</i>';
echo "<br/><br/>";
?>
</div>
</td>
</tr>
<tr>
<td>
<button type="button" class="button button-small dup-fixed-btn" onclick="Duplicator.Tools.ConfirmClearBuildCache()">
<?php esc_html_e("Clear Build Cache", 'duplicator'); ?>
</button>
</td>
<td><?php esc_html_e("Removes all build data from:", 'duplicator'); ?> [<?php echo DUP_Settings::getSsdirTmpPath() ?>].</td>
</tr>
<tr>
<td>
<button
type="button"
id="dup-download-diagnostic-data-btn"
class="button button-small dup-fixed-btn"
<?php disabled(!SupportToolkit::isAvailable()); ?>
>
<?php esc_html_e('Get Diagnostic Data', 'duplicator-pro'); ?>
</button>
</td>
<td>
<?php esc_html_e('Downloads a ZIP archive with all relevant diagnostic information.', 'duplicator-pro'); ?>
<?php if (!SupportToolkit::isAvailable()) : ?>
<i
class="fa fa-question-circle data-size-help"
data-tooltip-title="Diagnostic Data"
data-tooltip="<?php esc_attr_e('The ZipArchive extensions is required to create the diagnostic data.', 'duplicator-pro'); ?>"
aria-expanded="false">
</i>
<?php endif; ?>
</td>
</tr>
</table>
</div>
</div>
<br/>
<!-- ==========================================
THICK-BOX DIALOGS: -->
<?php
$confirmClearBuildCache = new DUP_UI_Dialog();
$confirmClearBuildCache->title = __('Clear Build Cache?', 'duplicator');
$confirmClearBuildCache->message = __('This process will remove all build cache files. Be sure no backups are currently building or else they will be cancelled.', 'duplicator');
$confirmClearBuildCache->jscallback = 'Duplicator.Tools.ClearBuildCache()';
$confirmClearBuildCache->initConfirm();
?>
<script>
jQuery(document).ready(function($)
{
Duplicator.Tools.ConfirmClearBuildCache = function ()
{
<?php $confirmClearBuildCache->showConfirm(); ?>
}
Duplicator.Tools.ClearBuildCache = function ()
{
window.location = '?page=duplicator-tools&tab=diagnostics&action=tmp-cache&_wpnonce=<?php echo esc_js($nonce); ?>';
}
$('#dup-download-diagnostic-data-btn').click(function () {
window.location = <?php echo json_encode(SupportToolkit::getSupportToolkitDownloadUrl()); ?>;
});
});
Duplicator.Tools.deleteInstallerFiles = function()
{
<?php
$url = DUP_CTRL_Tools::getCleanFilesAcrtionUrl();
echo "window.location = '{$url}';";
?>
}
</script>

View File

@@ -0,0 +1,38 @@
<?php
use Duplicator\Libs\Snap\SnapUtil;
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
ob_start();
SnapUtil::phpinfo();
$serverinfo = ob_get_contents();
ob_end_clean();
if (strlen($serverinfo) < 100) {
$serverinfo = 'The <a href="https://www.php.net/manual/en/function.phpinfo.php" target="_blank">phpinfo function</a> is not supported on this server, '
. 'for more details contact your hosting provider.';
} else {
$serverinfo = preg_replace('%^.*<body>(.*)</body>.*$%ms', '$1', $serverinfo);
$serverinfo = preg_replace('%^.*<title>(.*)</title>.*$%ms', '$1', $serverinfo);
}
?>
<!-- ==============================
PHP INFORMATION -->
<div class="dup-box">
<div class="dup-box-title">
<i class="fa fa-info-circle"></i>
<?php esc_html_e("PHP Information", 'duplicator'); ?>
<div class="dup-box-arrow"></div>
</div>
<div class="dup-box-panel" style="display:none">
<div id="dup-phpinfo" style="width:95%">
<?php
echo "<div id='dup-server-info-area'>{$serverinfo}</div>";
$serverinfo = null;
?>
</div><br/>
</div>
</div>
<br/>

View File

@@ -0,0 +1,25 @@
<?php
use Duplicator\Core\Views\TplMng;
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
?>
<!-- ==============================
SERVER SETTINGS -->
<div class="dup-box">
<div class="dup-box-title">
<i class="fas fa-tachometer-alt"></i>
<?php esc_html_e("Server Settings", 'duplicator') ?>
<div class="dup-box-arrow"></div>
</div>
<div class="dup-box-panel" id="dup-settings-diag-srv-panel" style="<?php echo esc_html($ui_css_srv_panel); ?>">
<?php TplMng::getInstance()->render(
'parts/tools/server_settings_table',
[
'serverSettings' => DUP_Server::getServerSettingsData(),
]
); ?>
</div> <!-- end .dup-box-panel -->
</div> <!-- end .dup-box -->
<br/>

View File

@@ -0,0 +1,164 @@
<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
$action = isset($_POST['action']) ? sanitize_text_field($_POST['action']) : '';
$scan_run = ($action == 'duplicator_recursion') ? true : false;
$ajax_nonce = wp_create_nonce('DUP_CTRL_Tools_runScanValidator');
?>
<style>
div#hb-result {padding: 10px 5px 0 5px; line-height:20px; font-size: 12px}
</style>
<!-- ==========================================
THICK-BOX DIALOGS: -->
<?php
$confirm1 = new DUP_UI_Dialog();
$confirm1->title = __('Run Validator', 'duplicator');
$confirm1->message = __('This will run the scan validation check. This may take several minutes. Do you want to Continue?', 'duplicator');
$confirm1->progressOn = false;
$confirm1->jscallback = 'Duplicator.Tools.runScanValidator()';
$confirm1->initConfirm();
?>
<!-- ==============================
SCAN VALIDATOR -->
<div class="dup-box">
<div class="dup-box-title">
<i class="far fa-check-square"></i>
<?php esc_html_e("Scan Validator", 'duplicator'); ?>
<div class="dup-box-arrow"></div>
</div>
<div class="dup-box-panel" style="display: <?php echo $scan_run ? 'block' : 'none'; ?>">
<?php
esc_html_e(
"This utility will help to find unreadable files and sym-links in your environment that can lead to issues during the scan process.
The utility will also show how many files and directories you have in your system. This process may take several minutes to run.
If there is a recursive loop on your system then the process has a built in check to stop after a large set of files and directories have been scanned.
A message will show indicated that a scan depth has been reached. If you have issues with the Backup scanner (step 2) during the build process then try to add
the paths below to your file filters to allow the scanner to finish.",
"duplicator"
);
?>
<br/><br/>
<button id="scan-run-btn" type="button" class="button button-large button-primary" onclick="Duplicator.Tools.ConfirmScanValidator()">
<?php esc_html_e("Run Scan Integrity Validation", "duplicator"); ?>
</button>
<script id="hb-template" type="text/x-handlebars-template">
<b>Scan Path:</b> <?php echo esc_html(duplicator_get_abs_path()); ?> <br/>
<b>Scan Results</b><br/>
<table>
<tr>
<td><b>Files:</b></td>
<td>{{payload.fileCount}} </td>
<td> &nbsp; </td>
<td><b>Dirs:</b></td>
<td>{{payload.dirCount}} </td>
</tr>
</table>
<br/>
<b>Unreadable Dirs/Files:</b> <br/>
{{#if payload.unreadable}}
{{#each payload.unreadable}}
&nbsp; &nbsp; {{@index}} : {{this}}<br/>
{{/each}}
{{else}}
<i>No Unreadable items found</i> <br/>
{{/if}}
<br/>
<b>Symbolic Links:</b> <br/>
{{#if payload.symLinks}}
{{#each payload.symLinks}}
&nbsp; &nbsp; {{@index}} : {{this}}<br/>
{{/each}}
{{else}}
<i>No Sym-links found</i> <br/>
<small> <?php esc_html_e("Note: Symlinks are not discoverable on Windows OS with PHP", "duplicator"); ?></small> <br/>
{{/if}}
<br/>
<b>Directory Name Checks:</b> <br/>
{{#if payload.nameTestDirs}}
{{#each payload.nameTestDirs}}
&nbsp; &nbsp; {{@index}} : {{this}}<br/>
{{/each}}
{{else}}
<i>No name check warnings located for directory paths</i> <br/>
{{/if}}
<br/>
<b>File Name Checks:</b> <br/>
{{#if payload.nameTestFiles}}
{{#each payload.nameTestFiles}}
&nbsp; &nbsp; {{@index}} : {{this}}<br/>
{{/each}}
{{else}}
<i>No name check warnings located for directory paths</i> <br/>
{{/if}}
<br/>
</script>
<div id="hb-result"></div>
</div>
</div>
<br/>
<script>
jQuery(document).ready(function($)
{
Duplicator.Tools.ConfirmScanValidator = function()
{
<?php $confirm1->showConfirm(); ?>
}
//Run request to: admin-ajax.php?action=DUP_CTRL_Tools_runScanValidator
Duplicator.Tools.runScanValidator = function()
{
tb_remove();
var data = {
action : 'DUP_CTRL_Tools_runScanValidator',
nonce: '<?php echo esc_js($ajax_nonce); ?>',
recursive_scan: 1
};
$('#hb-result').html('<?php esc_html_e("Scanning Environment... This may take a few minutes.", "duplicator"); ?>');
$('#scan-run-btn').html('<i class="fas fa-circle-notch fa-spin fa-fw"></i> Running Please Wait...');
$.ajax({
type: "POST",
dataType: "text",
url: ajaxurl,
data: data,
success: function(respData) {
try {
var data = Duplicator.parseJSON(respData);
} catch(err) {
console.error(err);
console.error('JSON parse failed for response data: ' + respData);
console.log(respData);
return false;
}
Duplicator.Tools.IntScanValidator(data);
},
error: function(data) {console.log(data)},
done: function(data) {console.log(data)}
});
}
//Process Ajax Template
Duplicator.Tools.IntScanValidator= function(data)
{
var template = $('#hb-template').html();
var templateScript = Handlebars.compile(template);
var html = templateScript(data);
$('#hb-result').html(html);
$('#scan-run-btn').html('<?php esc_html_e("Run Scan Integrity Validation", "duplicator"); ?>');
}
});
</script>

View File

@@ -0,0 +1,68 @@
<?php
use Duplicator\Core\Controllers\ControllersManager;
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
wp_enqueue_script('dup-handlebars');
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/utilities/class.u.scancheck.php');
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/class.io.php');
$installer_files = DUP_Server::getInstallerFiles();
$package_name = (isset($_GET['package'])) ? esc_html($_GET['package']) : '';
$abs_path = duplicator_get_abs_path();
// For auto detect archive file name logic
if (empty($package_name)) {
$installer_file_path = $abs_path . '/' . 'installer.php';
if (file_exists($installer_file_path)) {
$installer_file_data = file_get_contents($installer_file_path);
if (preg_match("/const ARCHIVE_FILENAME = '(.*?)';/", $installer_file_data, $match)) {
$temp_archive_file = esc_html($match[1]);
$temp_archive_file_path = $abs_path . '/' . $temp_archive_file;
if (file_exists($temp_archive_file_path)) {
$package_name = $temp_archive_file;
}
}
}
}
$package_path = empty($package_name) ? '' : $abs_path . '/' . $package_name;
$txt_found = __('File Found: Unable to remove', 'duplicator');
$txt_removed = __('Removed', 'duplicator');
$nonce = wp_create_nonce('duplicator_cleanup_page');
$section = (isset($_GET['section'])) ? $_GET['section'] : '';
if ($section == "info" || $section == '') {
$_GET['action'] = isset($_GET['action']) ? $_GET['action'] : '';
switch ($_GET['action']) {
case 'tmp-cache':
if (!wp_verify_nonce($_REQUEST['_wpnonce'], 'duplicator_cleanup_page')) {
exit; // Get out of here bad nounce!
}
DUP_Package::tempFileCleanup(true);
?>
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box">
<p><b><?php _e('Build cache removed.', 'duplicator'); ?></b></p>
</div>
<?php
break;
}
}
$actionUrl = ControllersManager::getMenuLink(
ControllersManager::TOOLS_SUBMENU_SLUG,
'diagnostics',
null,
['section' => 'info']
);
?>
<form id="dup-settings-form" action="<?php echo esc_url($actionUrl); ?>" method="post">
<?php
wp_nonce_field('duplicator_settings_page', '_wpnonce', false);
include_once 'inc.data.php';
include_once 'inc.settings.php';
include_once 'inc.validator.php';
include_once 'inc.phpinfo.php';
?>
</form>

View File

@@ -0,0 +1,240 @@
<?php
use Duplicator\Utils\LinkManager;
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
function _duplicatorSortFiles($a, $b)
{
return filemtime($b) - filemtime($a);
}
$logs = glob(DUP_Settings::getSsdirLogsPath() . '/*.log') ;
if ($logs != false && count($logs)) {
usort($logs, '_duplicatorSortFiles');
@chmod(DUP_Util::safePath($logs[0]), 0644);
}
$logname = (isset($_GET['logname'])) ? trim(sanitize_text_field($_GET['logname'])) : "";
$refresh = (isset($_POST['refresh']) && $_POST['refresh'] == 1) ? 1 : 0;
$auto = (isset($_POST['auto']) && $_POST['auto'] == 1) ? 1 : 0;
//Check for invalid file
if (!empty($logname)) {
$validFiles = array_map('basename', $logs);
if (validate_file($logname, $validFiles) > 0) {
unset($logname);
}
unset($validFiles);
}
if (!isset($logname) || !$logname) {
$logname = (count($logs) > 0) ? basename($logs[0]) : "";
}
$logurl = DUP_Settings::getSsdirLogsUrl() . '/' . $logname;
$logfound = (strlen($logname) > 0) ? true : false;
?>
<style>
div#dup-refresh-count {display: inline-block}
table#dup-log-panels {width:100%; }
td#dup-log-panel-left {width:75%;}
td#dup-log-panel-left div.name {float:left; margin: 0px 0px 5px 5px;}
td#dup-log-panel-left div.opts {float:right;}
td#dup-log-panel-right {vertical-align: top; padding-left:15px; max-width: 375px}
#dup-log-content {
padding:5px;
background: #fff;
min-height:500px;
width: calc(100vw - 630px);
border:1px solid silver;
overflow:scroll;
word-wrap: break-word;
margin:0;
line-height: 2;
}
/* OPTIONS */
div.dup-log-hdr {font-weight: bold; font-size:16px; padding:2px; }
div.dup-log-hdr small{font-weight:normal; font-style: italic}
div.dup-log-file-list {font-family:monospace;}
div.dup-log-file-list a, span.dup-log{display: inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 375px; overflow:hidden}
div.dup-log-file-list span {color:green}
div.dup-opts-items {border:1px solid silver; background: #efefef; padding: 5px; border-radius: 4px; margin:2px 0px 10px -2px;}
label#dup-auto-refresh-lbl {display: inline-block;}
</style>
<script>
jQuery(document).ready(function($)
{
Duplicator.Tools.FullLog = function() {
var $panelL = $('#dup-log-panel-left');
var $panelR = $('#dup-log-panel-right');
if ($panelR.is(":visible") ) {
$panelR.hide(400);
$panelL.css({width: '100%'});
} else {
$panelR.show(200);
$panelL.css({width: '75%'});
}
}
Duplicator.Tools.Refresh = function() {
$('#refresh').val(1);
$('#dup-form-logs').submit();
}
Duplicator.Tools.RefreshAuto = function() {
if ( $("#dup-auto-refresh").is(":checked")) {
$('#auto').val(1);
startTimer();
} else {
$('#auto').val(0);
}
}
Duplicator.Tools.GetLog = function(log) {
window.location = log;
}
Duplicator.Tools.WinResize = function() {
var height = $(window).height() - 225;
$("#dup-log-content").css({height: height + 'px'});
}
Duplicator.Tools.readLogfile = function() {
$.get(<?php echo str_replace('\\/', '/', json_encode($logurl)); ?>, function(data) {
$('#dup-log-content').text(data);
}, 'text');
};
var duration = 10;
var count = duration;
var timerInterval;
function timer() {
count = count - 1;
$("#dup-refresh-count").html(count.toString());
if (! $("#dup-auto-refresh").is(":checked")) {
clearInterval(timerInterval);
$("#dup-refresh-count").text(count.toString().trim());
return;
}
if (count <= 0) {
count = duration + 1;
Duplicator.Tools.Refresh();
}
}
function startTimer() {
timerInterval = setInterval(timer, 1000);
}
//INIT Events
$(window).resize(Duplicator.Tools.WinResize);
$('#dup-options').click(Duplicator.Tools.FullLog);
$("#dup-refresh").click(Duplicator.Tools.Refresh);
$("#dup-auto-refresh").click(Duplicator.Tools.RefreshAuto);
$("#dup-refresh-count").html(duration.toString());
// READ LOG FILE
Duplicator.Tools.readLogfile();
//INIT
Duplicator.Tools.WinResize();
<?php if ($refresh) : ?>
//Scroll to Bottom
$("#dup-log-content").load(function () {
var $contents = $('#dup-log-content').contents();
$contents.scrollTop($contents.height());
});
<?php if ($auto) : ?>
$("#dup-auto-refresh").prop('checked', true);
Duplicator.Tools.RefreshAuto();
<?php endif; ?>
<?php endif; ?>
});
</script>
<form id="dup-form-logs" method="post" action="">
<input type="hidden" id="refresh" name="refresh" value="<?php echo ($refresh) ? 1 : 0 ?>" />
<input type="hidden" id="auto" name="auto" value="<?php echo ($auto) ? 1 : 0 ?>" />
<?php if (! $logfound) : ?>
<div style="padding:20px">
<h2><?php esc_html_e("Log file not found or unreadable", 'duplicator') ?>.</h2>
<?php esc_html_e("Try to create a Backup, since no log files were found in the snapshots directory with the extension *.log", 'duplicator') ?>.<br/><br/>
<?php esc_html_e("Reasons for log file not showing", 'duplicator') ?>: <br/>
- <?php esc_html_e("The web server does not support returning .log file extentions", 'duplicator') ?>. <br/>
- <?php esc_html_e("The snapshots directory does not have the correct permissions to write files. Try setting the permissions to 755", 'duplicator') ?>. <br/>
- <?php esc_html_e("The process that PHP runs under does not have enough permissions to create files. Please contact your hosting provider for more details", 'duplicator') ?>. <br/>
</div>
<?php else : ?>
<table id="dup-log-panels">
<tr>
<td id="dup-log-panel-left">
<div class="name">
<i class='fas fa-file-contract fa-fw'></i> <b><?php echo basename($logurl); ?></b> &nbsp; | &nbsp;
<i style="cursor: pointer"
data-tooltip-title="<?php esc_attr_e("Host Recommendation:", 'duplicator'); ?>"
data-tooltip="<?php esc_attr_e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
<i class="far fa-lightbulb" aria-hidden="true"></i>
<?php
$faqUrl = esc_url(LinkManager::getDocUrl('what-host-providers-are-recommended-for-duplicator', 'tools-logging'));
printf(
_x(
'Consider our recommended %1$shost list%2$s if youre unhappy with your current provider',
'%1$s and %2$s are <a> tags',
'duplicator'
),
'<a target="_blank" href="' . $faqUrl . '">',
'</a>'
);
?>
</i>
</div>
<div class="opts"><a href="javascript:void(0)" id="dup-options"><?php esc_html_e("Options", 'duplicator') ?> <i class="fa fa-angle-double-right"></i></a> &nbsp;</div>
<br style="clear:both" />
<pre id="dup-log-content"></pre>
</td>
<td id="dup-log-panel-right">
<h2><?php esc_html_e("Options", 'duplicator') ?> </h2>
<div class="dup-opts-items">
<input type="button" class="button button-small" id="dup-refresh" value="<?php esc_attr_e("Refresh", 'duplicator') ?>" /> &nbsp;
<input type='checkbox' id="dup-auto-refresh" style="margin-top:1px" />
<label id="dup-auto-refresh-lbl" for="dup-auto-refresh">
<?php esc_attr_e("Auto Refresh", 'duplicator') ?>
[<div id="dup-refresh-count"></div>]
</label>
</div>
<div class="dup-log-hdr">
<?php esc_html_e("Backup Logs", 'duplicator') ?>
<small><?php esc_html_e("Top 20", 'duplicator') ?></small>
</div>
<div class="dup-log-file-list">
<?php
$count = 0;
$active = basename($logurl);
foreach ($logs as $log) {
$time = date('m/d/y h:i:s', filemtime($log));
$name = basename($log);
$url = '?page=duplicator-tools&tab=diagnostics&section=log&logname=' . esc_html($name);
echo ($active == $name)
? "<span class='dup-log' title='" . esc_attr($name) . "'>" . esc_html($time) . "-" . esc_html($name) . "</span>"
: "<a href='javascript:void(0)' title='" . esc_attr($name) . "' onclick='Duplicator.Tools.GetLog(\"" . esc_js($url) . "\")'>" . esc_html($time) . "-" . esc_html($name) . "</a>";
if ($count > 20) {
break;
}
}
?>
</div>
</td>
</tr>
</table>
<?php endif; ?>
</form>

View File

@@ -0,0 +1,80 @@
<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
?>
<style>
div.success {color:#4A8254}
div.failed {color:red}
table.dup-reset-opts td:first-child {font-weight: bold}
table.dup-reset-opts td {padding:10px}
button.dup-fixed-btn {min-width: 150px; text-align: center}
div#dup-tools-delete-moreinfo {display: none; padding: 5px 0 0 20px; border:1px solid silver; background-color: #fff; border-radius:3px; padding:10px; margin:5px; width:750px }
div.dup-alert-no-files-msg {padding:10px 0 10px 0}
div.dup-alert-secure-note {font-style: italic; max-width:800px; padding:15px 0 20px 0}
div#message {margin:0px 0px 10px 0px}
div#dup-server-info-area { padding:10px 5px; }
div#dup-server-info-area table { padding:1px; background:#dfdfdf; -webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px; width:100% !important; box-shadow:0 8px 6px -6px #777; }
div#dup-server-info-area td, th {padding:3px; background:#fff; -webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}
div#dup-server-info-area tr.h img { display:none; }
div#dup-server-info-area tr.h td{ background:none; }
div#dup-server-info-area tr.h th{ text-align:center; background-color:#efefef; }
div#dup-server-info-area td.e{ font-weight:bold }
td.dup-settings-diag-header {background-color:#D8D8D8; font-weight: bold; border-style: none; color:black}
.widefat th {font-weight:bold; }
.widefat td {padding:2px 2px 2px 8px}
.widefat td:nth-child(1) {width:120px;}
.widefat td:nth-child(2) {padding-left: 20px;}
textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
div.lite-sub-tabs {padding: 10px 0 10px 0; font-size: 14px}
</style>
<?php
$action_response = null;
$ctrl_ui = new DUP_CTRL_UI();
$ctrl_ui->setResponseType('PHP');
$data = $ctrl_ui->GetViewStateList();
$ui_css_srv_panel = (isset($data->payload['dup-settings-diag-srv-panel']) && $data->payload['dup-settings-diag-srv-panel']) ? 'display:block' : 'display:none';
$ui_css_opts_panel = (isset($data->payload['dup-settings-diag-opts-panel']) && $data->payload['dup-settings-diag-opts-panel']) ? 'display:block' : 'display:none';
$section = isset($_GET['section']) ? $_GET['section'] : 'info';
$txt_diagnostic = __('Information', 'duplicator');
$txt_log = __('Logs', 'duplicator');
$txt_support = __('Support', 'duplicator');
;
$tools_url = 'admin.php?page=duplicator-tools&tab=diagnostics';
switch ($section) {
case 'info':
echo "<div class='lite-sub-tabs'><b>" .
esc_html($txt_diagnostic) .
"</b> &nbsp;|&nbsp; <a href='" . esc_url($tools_url . "&section=log") . "'>" .
esc_html($txt_log) . "</a> &nbsp;|&nbsp; <a href='" .
esc_url($tools_url . "&section=support") . "'>" .
esc_html($txt_support) . "</a></div>";
include(__DIR__ . '/information.php');
break;
case 'log':
echo "<div class='lite-sub-tabs'><a href='" .
esc_url($tools_url . "&section=info") . "'>" .
esc_html($txt_diagnostic) . "</a> &nbsp;|&nbsp;<b>" .
esc_html($txt_log) . "</b> &nbsp;|&nbsp; <a href='" .
esc_url($tools_url . "&section=support") . "'>" .
esc_html($txt_support) . "</a></div>";
include(__DIR__ . '/logging.php');
break;
case 'support':
echo "<div class='lite-sub-tabs'><a href='" .
esc_url($tools_url . "&section=info") . "'>" .
esc_html($txt_diagnostic) . "</a> &nbsp;|&nbsp; <a href='" .
esc_url($tools_url . "&section=log") . "'>" .
esc_html($txt_log) . "</a> &nbsp;|&nbsp; <b>" .
esc_html($txt_support) . "</b> </div>";
include(__DIR__ . '/support.php');
break;
}
?>

View File

@@ -0,0 +1,120 @@
<?php
use Duplicator\Utils\LinkManager;
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
?>
<style>
div.dup-support-all {font-size:13px; line-height:20px}
div.dup-support-txts-links {width:100%;font-size:14px; font-weight:bold; line-height:26px; text-align:center}
div.dup-support-hlp-area {width:375px; height:180px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
table.dup-support-hlp-hdrs {border-collapse:collapse; width:100%; border-bottom:1px solid #dfdfdf}
table.dup-support-hlp-hdrs {background-color:#efefef;}
div.dup-support-hlp-hdrs {
font-weight:bold; font-size:17px; height: 35px; padding:5px 5px 5px 10px;
background-image:-ms-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
background-image:-moz-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
background-image:-o-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #FFFFFF), color-stop(1, #DEDEDE));
background-image:-webkit-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
background-image:linear-gradient(to bottom, #FFFFFF 0%, #DEDEDE 100%);
}
div.dup-support-hlp-hdrs div {padding:5px; margin:4px 20px 0px -20px; text-align: center;}
div.dup-support-hlp-txt{padding:10px; text-align:center}
</style>
<div class="wrap dup-wrap dup-support-all">
<div style="width:800px; margin:auto; margin-top: 20px">
<table>
<tr>
<td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
<td valign="top" style="padding-top:10px; font-size:13px">
<?php
esc_html_e(
"Migrating WordPress is a complex process and the logic to make all the magic happen smoothly may not work quickly with every site. " .
" With over 30,000 plugins and a very complex server eco-system some migrations may run into issues. This is why the Duplicator includes a detailed knowledgebase that can help with many common issues. " .
" Resources to additional support, approved hosting, and alternatives to fit your needs can be found below.",
'duplicator'
);
?>
</td>
</tr>
</table>
<br/><br/>
<!-- HELP LINKS -->
<div class="dup-support-hlp-area">
<div class="dup-support-hlp-hdrs">
<i class="fas fa-cube fa-2x fa-pull-left"></i>
<div><?php esc_html_e('Knowledgebase', 'duplicator') ?></div>
</div>
<div class="dup-support-hlp-txt">
<?php esc_html_e('Complete Online Documentation', 'duplicator'); ?>
<br/>
<select id="dup-support-kb-lnks" style="margin-top:18px; font-size:16px; min-width: 170px">
<option disabled selected>
<?php esc_html_e('Choose A Section', 'duplicator') ?>
</option>
<option
value="<?php echo esc_url(LinkManager::getCategoryUrl(LinkManager::QUICK_START_CAT, 'tools_support', 'Quick Start')); ?>
">
<?php esc_html_e('Quick Start', 'duplicator') ?>
</option>
<option value="<?php echo esc_url(LinkManager::getDocUrl('', 'tools_support', 'User Guide')); ?>">
<?php esc_html_e('User Guide', 'duplicator'); ?>
</option>
<option
value="<?php echo esc_url(LinkManager::getCategoryUrl(LinkManager::TROUBLESHOOTING_CAT, 'tools_support', 'FAQs')); ?>
">
<?php esc_html_e('FAQs', 'duplicator'); ?>
</option>
<option value="<?php echo esc_url(LinkManager::getDocUrl('changelog', 'tools_support', 'Change Log')); ?>">
<?php esc_html_e('Change Log', 'duplicator') ?>
</option>
</select>
</div>
</div>
<!-- ONLINE SUPPORT -->
<div class="dup-support-hlp-area">
<div class="dup-support-hlp-hdrs">
<i class="far fa-lightbulb fa-2x fa-pull-left"></i>
<div><?php esc_html_e('Premium Support', 'duplicator') ?></div>
</div>
<div class="dup-support-hlp-txt">
<?php esc_html_e("Having a problem with your back up or migrations? Upgrade to get our Premium Support.", 'duplicator'); ?>
<br/>
<div class="dup-support-txts-links" style="margin:10px 0 10px 0">
<a href="<?php echo esc_url(\Duplicator\Utils\LinkManager::getCampaignUrl('duplicator_tools-support_tab', 'Upgrade Now')); ?>" target="_blank" class="dup-btn dup-btn-md dup-btn-green" >
<?php esc_html_e('Upgrade Now', 'duplicator') ?>
</a> <br/>
</div>
<small>
<?php
printf(
esc_html_x(
'Free Users %1$sSupport Forum%2$s',
'1 and 2 are opening and closing anchor or link tags',
'duplicator'
),
'<a href="https://wordpress.org/support/plugin/duplicator/" target="_blank">',
'</a>'
);
?>
</small>
</div>
</div>
</div>
</div>
<script>
jQuery(document).ready(function ($) {
//ATTACHED EVENTS
jQuery('#dup-support-kb-lnks').change(function () {
if (jQuery(this).val() != "null")
window.open(jQuery(this).val())
});
});
</script>