403Webshell
Server IP : 146.59.209.152  /  Your IP : 216.73.216.46
Web Server : Apache
System : Linux webm005.cluster131.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : infrafs ( 43850)
PHP Version : 8.2.29
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/i/n/f/infrafs/INFRABIKEIT/wp-content/plugins/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/i/n/f/infrafs/INFRABIKEIT/wp-content/plugins/tools.tar
Lite/Requirements.php000064400000010255151332110610010631 0ustar00<?php
/**
 * Class that collects the functions of initial checks on the requirements to run the plugin
 *
 * Standard: PSR-2
 * @link http://www.php-fig.org/psr/psr-2
 *
 * @package Duplicator
 * @copyright (c) 2021, Snapcreek LLC
 *
 */

namespace Duplicator\Lite;

defined('ABSPATH') || exit;

class Requirements
{
    const DUP_PRO_PLUGIN_KEY = 'duplicator-pro/duplicator-pro.php';

    /**
     * 
     * @var string // current plugin file full path
     */
    protected static $pluginFile = '';

    /**
     * 
     * @var string // message on deactivation
     */
    protected static $deactivationMessage = '';

    /**
     * This function checks the requirements to run Duplicator.
     * At this point WordPress is not yet completely initialized so functionality is limited.
     * It need to hook into "admin_init" to get the full functionality of WordPress.
     * 
     * @param string $pluginFile    // main plugin file path
     * @return boolean              // true if plugin can be executed
     */
    public static function canRun($pluginFile)
    {
        $result           = true;
        self::$pluginFile = $pluginFile;

        if ($result === true && self::isPluginActive(self::DUP_PRO_PLUGIN_KEY)) {
            add_action('admin_init', array(__CLASS__, 'addProEnableNotice'));
            $pluginUrl = (is_multisite() ? network_admin_url('plugins.php') : admin_url('plugins.php'));
            self::$deactivationMessage = __('Can\'t enable Duplicator LITE if the PRO version is enabled.', 'duplicator') . '<br/>'
                . __('Please deactivate Duplicator PRO, then reactivate LITE version from the ', 'duplicator')
                . "<a href='" . $pluginUrl . "'>" . __('plugins page', 'duplicator') . ".</a>";
            $result = false;
        }

        if ($result === false) {
            register_activation_hook($pluginFile, array(__CLASS__, 'deactivateOnActivation'));
        }

        return $result;
    }

    /**
     * 
     * @param string $plugin
     * @return boolean // return true if plugin key is active and plugin file exists
     */
    protected static function isPluginActive($plugin)
    {
        $isActive = false;
        if (in_array($plugin, (array) get_option('active_plugins', array()))) {
            $isActive = true;
        }

        if (is_multisite()) {
            $plugins = get_site_option('active_sitewide_plugins');
            if (isset($plugins[$plugin])) {
                $isActive = true;
            }
        }

        return ($isActive && file_exists(WP_PLUGIN_DIR . '/' . $plugin));
    }

    /**
     * display admin notice only if user can manage plugins.
     */
    public static function addProEnableNotice()
    {
        if (current_user_can('activate_plugins')) {
            add_action('admin_notices', array(__CLASS__, 'proEnabledNotice'));
        }
    }

    /**
     * display admin notice 
     */
    public static function addMultisiteNotice()
    {
        if (current_user_can('activate_plugins')) {
            add_action('admin_notices', array(__CLASS__, 'multisiteNotice'));
        }
    }

    /**
     * deactivate current plugin on activation
     */
    public static function deactivateOnActivation()
    {
        deactivate_plugins(plugin_basename(self::$pluginFile));
        wp_die(self::$deactivationMessage);
    }

    /**
     * Display admin notice if duplicator pro is enabled
     */
    public static function proEnabledNotice()
    {
        $pluginUrl = (is_multisite() ? network_admin_url('plugins.php') : admin_url('plugins.php'));
        ?>
        <div class="error notice">
            <p>
                <span class="dashicons dashicons-warning"></span>
                <b><?php _e('Duplicator Notice:', 'duplicator'); ?></b>
                <?php _e('The "Duplicator Lite" and "Duplicator Pro" plugins cannot both be active at the same time.  ', 'duplicator'); ?>
            </p>
            <p>
                <?php _e('To use "Duplicator LITE" please deactivate "Duplicator PRO" from the ', 'duplicator-pro'); ?>
                <a href="<?php echo esc_url($pluginUrl); ?>">
                    <?php _e('plugins page', 'duplicator'); ?>.
                </a>
            </p>
        </div>
        <?php
    }
}
DuplicatorPhpVersionCheck.php000064400000004323151332110610012332 0ustar00<?php
/**
 * These functions are performed before including any other Duplicator file so
 * do not use any Duplicator library or feature and use code compatible with PHP 5.2
 *
 */
defined('ABSPATH') || exit;

// In the future it will be included on both PRO and LITE so you need to check if the define exists.
if (!class_exists('DuplicatorPhpVersionCheck')) {

    class DuplicatorPhpVersionCheck
    {

        protected static $minVer       = null;
        protected static $suggestedVer = null;

        public static function check($minVer, $suggestedVer)
        {
            self::$minVer       = $minVer;
            self::$suggestedVer = $suggestedVer;

            if (version_compare(PHP_VERSION, self::$minVer, '<')) {
                if (is_multisite()) {
                    add_action('network_admin_notices', array(__CLASS__, 'notice'));
                } else {
                    add_action('admin_notices', array(__CLASS__, 'notice'));
                }
                return false;
            } else {
                return true;
            }
        }

        public static function notice()
        {
            ?>
            <div class="error notice">
                <p>
                    <?php
                    $str = 'DUPLICATOR: '.__('Your system is running a very old version of PHP (%s) that is no longer supported by Duplicator.  ', 'duplicator');
                    printf($str, PHP_VERSION);
                    
                    $str = __('Please ask your host or server administrator to update to PHP %1s or greater.') . '<br/>';
                    $str .= __('If this is not possible, please visit the FAQ link titled ', 'duplicator');
                    $str .= '<a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-licensing-017-q" target="blank">';
                    $str .= __('"What version of PHP Does Duplicator Support?"', 'duplicator');
                    $str .= '</a>';
                    $str .= __(' for instructions on how to download a previous version of Duplicator compatible with PHP %2s.', 'duplicator');
                    printf($str, self::$suggestedVer, PHP_VERSION);
                    ?>
                </p>
            </div>
            <?php
        }
    }
}
diagnostics/information.php000064400000024170151333067470012126 0ustar00<?php
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'] : 'display';

	if (isset($_REQUEST['_wpnonce'])) {
		if (($_GET['action'] == 'installer') || ($_GET['action'] == 'tmp-cache')) {
			if (! wp_verify_nonce($_REQUEST['_wpnonce'], 'duplicator_cleanup_page')) {
				exit; // Get out of here bad nounce!
			}
		}
	}

	switch ($_GET['action']) {
		case 'installer' :
			$action_response = __('Installer file cleanup ran!', 'duplicator');
			break;
		case 'tmp-cache':
			DUP_Package::tempFileCleanup(true);
			$action_response = __('Build cache removed.', 'duplicator');
			break;
	}

	 if ($_GET['action'] != 'display')  :	?>
		<div id="message" class="notice notice-success is-dismissible  dup-wpnotice-box">
			<p><b><?php echo esc_html($action_response); ?></b></p>
			<?php 
                if ( $_GET['action'] == 'installer') :
                    $remove_error = false;

					// Move installer log before cleanup
    				DUP_Util::initSnapshotDirectory();
					$installer_log_path = DUPLICATOR_INSTALLER_DIRECTORY.'/dup-installer-log__'.DUPLICATOR_INSTALLER_HASH_PATTERN.'.txt';
					$glob_files = glob($installer_log_path);
					if (!empty($glob_files)) {
						foreach ($glob_files as $glob_file) {
							$installer_log_file_path = $glob_file;
							DUP_IO::copyFile($installer_log_file_path, DUP_Settings::getSsdirInstallerPath());
						}
					}

					$html = "";
					//REMOVE CORE INSTALLER FILES
					$installer_files = DUP_Server::getInstallerFiles();
					$removed_files = false;
					foreach ($installer_files as $filename => $path) {
						$file_path = '';
						if (stripos($filename, '[hash]') !== false) {
							$glob_files = glob($path);
                            
							if (!empty($glob_files)) {
                                if(count($glob_files) > 10) {                                
                                    throw new Exception('Trying to delete too many files. Please contact Duplicator support.');
                                }
                                
								foreach ($glob_files as $glob_file) {
									$file_path = $glob_file;
									DUP_IO::deleteFile($file_path);
									$removed_files = true;
								}
							}
						} else if (is_file($path)) {
							$file_path = $path;
							DUP_IO::deleteFile($path);
							$removed_files = true;
						} else if (is_dir($path)) {
							$file_path = $path;

							// Extra protection to ensure we only are deleting the installer directory
							if(DUP_STR::contains($path, 'dup-installer')) {
								DUP_IO::deleteTree($path);
								$removed_files = true;
							}
						}                            

						if (!empty($file_path)) {
                            if (file_exists($file_path)) {
                                echo "<div class='failed'><i class='fa fa-exclamation-triangle fa-sm'></i> {$txt_found} - ".esc_html($file_path)."  </div>";
                                $remove_error = true;
                            } else {
                                echo "<div class='success'> <i class='fa fa-check'></i> {$txt_removed} - ".esc_html($file_path)."	</div>";
                            }
						}
					}

					//No way to know exact name of archive file except from installer.
					//The only place where the package can be removed is from installer
					//So just show a message if removing from plugin.
					if (file_exists($package_path)) {
						$path_parts	 = pathinfo($package_name);
						$path_parts	 = (isset($path_parts['extension'])) ? $path_parts['extension'] : '';
						$valid_ext = ($path_parts == "zip" || $path_parts == "daf");
						if ($valid_ext && !is_dir($package_path)) {
							$html .= (@unlink($package_path))
										? "<div class='success'><i class='fa fa-check'></i> ".esc_html($txt_removed)." - ".esc_html($package_path)."</div>"
										: "<div class='failed'><i class='fa fa-exclamation-triangle fa-sm'></i> ".esc_html($txt_found)." - ".esc_html($package_path)."</div>";
						}
					}
					echo $html;

					if (!$removed_files) {
						echo '<div class="dup-alert-no-files-msg success">'
								. '<i class="fa fa-check"></i> <b>' . esc_html__('No Duplicator installer files found on this WordPress Site.', 'duplicator') . '</b>'
							. '</div>';
					}
				 ?>

				<div class="dup-alert-secure-note">
					<?php
						echo '<b><i class="fa fa-shield-alt"></i> ' . esc_html__('Security Notes', 'duplicator') . ':</b>&nbsp;';
						_e('If the installer files do not successfully get removed with this action, then they WILL need to be removed manually through your hosts control panel  '
						 . 'or FTP.  Please remove all installer files to avoid any security issues on this site.  For more details please visit '
						 . 'the FAQ link <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-295-q" target="_blank">Which files need to be removed after an install?</a>', 'duplicator');

						echo '<br/><br/>';

                        if ($remove_error) {
                            echo  __('Some of the installer files did not get removed, ', 'duplicator').
                                    '<a href="#" onclick="Duplicator.Tools.deleteInstallerFiles(); return false;" >'.
                                    __('please retry the installer cleanup process', 'duplicator').
                                    '</a>.'.
                                    __(' If this process continues please see the previous FAQ link.', 'duplicator').
                                    '<br><br>';
                        }

						echo '<b><i class="fa fa-thumbs-up"></i> ' . esc_html__('Help Support Duplicator', 'duplicator') . ':</b>&nbsp;';
						_e('The Duplicator team has worked many years to make moving a WordPress site a much easier process.  Show your support with a '
						 . '<a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="_blank">5 star review</a>!  We would be thrilled if you could!', 'duplicator');
					?>
				</div>

			<?php endif; ?>
		</div>
	<?php endif;
	if(isset($_GET['action']) && $_GET['action']=="installer" && get_option("duplicator_exe_safe_mode")){
		$safe_title = __('This site has been successfully migrated!');
		$safe_msg = __('Please test the entire site to validate the migration process!');

		switch(get_option("duplicator_exe_safe_mode")){

			//safe_mode basic
			case 1:
				$safe_msg = __('NOTICE: Safe mode (Basic) was enabled during install, be sure to re-enable all your plugins.');
			break;

			//safe_mode advance
			case 2:
				$safe_msg = __('NOTICE: Safe mode (Advanced) was enabled during install, be sure to re-enable all your plugins.');

				$temp_theme = null;
				$active_theme = wp_get_theme();
				$available_themes = wp_get_themes();
				foreach($available_themes as $theme){
					if($temp_theme == null && $theme->stylesheet != $active_theme->stylesheet){
						$temp_theme = array('stylesheet' => $theme->stylesheet, 'template' => $theme->template);
						break;
					}
				}

				if($temp_theme != null){
					//switch to another theme then backto default
					switch_theme($temp_theme['template'], $temp_theme['stylesheet']);
					switch_theme($active_theme->template, $active_theme->stylesheet);
				}

			break;
		}

		if (! DUP_Server::hasInstallerFiles()) {
			echo  "<div class='notice notice-success cleanup-notice'><p><b class='title'><i class='fa fa-check-circle'></i> ".esc_html($safe_title)."</b> "
				. "<div class='notice-safemode'>".esc_html($safe_msg)."</p></div></div>";
		}

		delete_option("duplicator_exe_safe_mode");
	}
}
?>


<form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics&section=info' ); ?>" method="post">
	<?php wp_nonce_field( 'duplicator_settings_page', '_wpnonce', false ); ?>
	<input type="hidden" id="dup-remove-options-value" name="remove-options" value="">

	<?php
		if (isset($_POST['remove-options'])) {
			$remove_options = sanitize_text_field($_POST['remove-options']);
			$action_result = DUP_Settings::DeleteWPOption($remove_options);
			switch ($remove_options)
			{
				case 'duplicator_settings'		 : 	$remove_response = __('Plugin settings reset.', 'duplicator');		break;
				case 'duplicator_ui_view_state'  : 	$remove_response = __('View state settings reset.', 'duplicator');	 break;
				case 'duplicator_package_active' : 	$remove_response = __('Active package settings reset.', 'duplicator'); break;
			}
		}

		if (! empty($remove_response))  {
			echo "<div id='message' class='notice notice-success is-dismissible dup-wpnotice-box'><p>".esc_html($remove_response)."</p></div>";
		}

		include_once 'inc.data.php';
		include_once 'inc.settings.php';
		include_once 'inc.validator.php';
		include_once 'inc.phpinfo.php';
	?>
</form>
diagnostics/logging.php000064400000020276151333067470011232 0ustar00<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');

function _duplicatorSortFiles($a,$b) {
	return filemtime($b) - filemtime($a);
}

$logs = glob(DUP_Settings::getSsdirPath() . '/*.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::getSsdirUrl().'/'.$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 package, 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
								printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
								esc_html__("Consider our recommended", 'duplicator'),
								esc_html__("host list", 'duplicator'),
								esc_html__("if you’re unhappy with your current provider", 'duplicator'));
							?>
					</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("Package 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>
diagnostics/inc.settings.php000064400000022365151333067470012215 0ustar00<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
	$dbvar_maxtime  = DUP_DB::getVariable('wait_timeout');
	$dbvar_maxpacks = DUP_DB::getVariable('max_allowed_packet');
	$dbvar_maxtime  = is_null($dbvar_maxtime)  ? __("unknow", 'duplicator') : $dbvar_maxtime;
	$dbvar_maxpacks = is_null($dbvar_maxpacks) ? __("unknow", 'duplicator') : $dbvar_maxpacks;

	$abs_path = duplicator_get_abs_path();
	$space = @disk_total_space($abs_path);
	$space_free = @disk_free_space($abs_path);
	$perc = @round((100/$space)*$space_free,2);
	$mysqldumpPath = DUP_DB::getMySqlDumpPath();
	$mysqlDumpSupport = ($mysqldumpPath) ? $mysqldumpPath : 'Path Not Found';

	$client_ip_address = DUP_Server::getClientIP();
	$error_log_path = ini_get('error_log');
?>

<!-- ==============================
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); ?>">
	<table class="widefat" cellspacing="0">
		<tr>
			<td class='dup-settings-diag-header' colspan="2"><?php esc_html_e("General", 'duplicator'); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Duplicator Version", 'duplicator'); ?></td>
			<td>
				<?php echo esc_html(DUPLICATOR_VERSION); ?> -
				<?php echo esc_html(DUPLICATOR_VERSION_BUILD); ?>
			</td>
		</tr>
		<tr>
			<td><?php esc_html_e("Operating System", 'duplicator'); ?></td>
			<td><?php echo esc_html(PHP_OS) ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Timezone", 'duplicator'); ?></td>
			<td><?php echo esc_html(date_default_timezone_get()); ?> &nbsp; <small><i>This is a <a href='options-general.php'>WordPress setting</a></i></small></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Server Time", 'duplicator'); ?></td>
			<td><?php echo date("Y-m-d H:i:s"); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Web Server", 'duplicator'); ?></td>
			<td><?php echo esc_html($_SERVER['SERVER_SOFTWARE']); ?></td>
		</tr>
		<?php
		$abs_path = duplicator_get_abs_path();
		?>
		<tr>
			<td><?php esc_html_e("Root Path", 'duplicator'); ?></td>
			<td><?php echo esc_html($abs_path); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("ABSPATH", 'duplicator'); ?></td>
			<td><?php echo esc_html($abs_path); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Plugins Path", 'duplicator'); ?></td>
			<td><?php echo esc_html(DUP_Util::safePath(WP_PLUGIN_DIR)); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Loaded PHP INI", 'duplicator'); ?></td>
			<td><?php echo esc_html(php_ini_loaded_file()); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Server IP", 'duplicator'); ?></td>
			<?php
			if (isset($_SERVER['SERVER_ADDR'])) {
				$server_address = $_SERVER['SERVER_ADDR'];
			} elseif (isset($_SERVER['SERVER_NAME']) && function_exists('gethostbyname')) {
				$server_address = gethostbyname($_SERVER['SERVER_NAME']);
			} else {
				$server_address = __("Can't detect", 'duplicator');
			}
			?>
			<td><?php echo esc_html($server_address); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Client IP", 'duplicator'); ?></td>
			<td><?php echo esc_html($client_ip_address);?></td>
		</tr>
		<tr>
			<td class='dup-settings-diag-header' colspan="2">WordPress</td>
		</tr>
		<tr>
			<td><?php esc_html_e("Version", 'duplicator'); ?></td>
			<td><?php echo esc_html($wp_version); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Language", 'duplicator'); ?></td>
			<td><?php bloginfo('language'); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Charset", 'duplicator'); ?></td>
			<td><?php bloginfo('charset'); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Memory Limit ", 'duplicator'); ?></td>
			<td><?php echo esc_html(WP_MEMORY_LIMIT); ?> (<?php esc_html_e("Max", 'duplicator'); echo '&nbsp;' . esc_html(WP_MAX_MEMORY_LIMIT); ?>)</td>
		</tr>
		<tr>
			<td class='dup-settings-diag-header' colspan="2">PHP</td>
		</tr>
		<tr>
			<td><?php esc_html_e("Version", 'duplicator'); ?></td>
			<td><?php echo esc_html(phpversion()); ?></td>
		</tr>
		<tr>
			<td>SAPI</td>
			<td><?php echo esc_html(PHP_SAPI); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("User", 'duplicator'); ?></td>
			<td><?php echo DUP_Util::getCurrentUser(); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Process", 'duplicator'); ?></td>
			<td><?php echo esc_html(DUP_Util::getProcessOwner()); ?></td>
		</tr>
		<tr>
			<td><a href="http://php.net/manual/en/features.safe-mode.php" target="_blank"><?php esc_html_e("Safe Mode", 'duplicator'); ?></a></td>
			<td>
			<?php echo (((strtolower(@ini_get('safe_mode')) == 'on')	  ||  (strtolower(@ini_get('safe_mode')) == 'yes') ||
						 (strtolower(@ini_get('safe_mode')) == 'true') ||  (ini_get("safe_mode") == 1 )))
						 ? esc_html__('On', 'duplicator') : esc_html__('Off', 'duplicator');
			?>
			</td>
		</tr>
		<tr>
			<td><a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit" target="_blank"><?php esc_html_e("Memory Limit", 'duplicator'); ?></a></td>
			<td><?php echo @ini_get('memory_limit') ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Memory In Use", 'duplicator'); ?></td>
			<td><?php echo size_format(@memory_get_usage(TRUE), 2) ?></td>
		</tr>
		<tr>
			<td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php esc_html_e("Max Execution Time", 'duplicator'); ?></a></td>
			<td>
				<?php
					echo @ini_get('max_execution_time');
					$try_update = set_time_limit(0);
					$try_update = $try_update ? 'is dynamic' : 'value is fixed';
					echo " (default) - {$try_update}";
				?>
				<i class="fa fa-question-circle data-size-help"
					data-tooltip-title="<?php esc_attr_e("Max Execution Time", 'duplicator'); ?>"
					data-tooltip="<?php esc_attr_e('If the value shows dynamic then this means its possible for PHP to run longer than the default.  '
						. 'If the value is fixed then PHP will not be allowed to run longer than the default.', 'duplicator'); ?>"></i>
			</td>
		</tr>
		<tr>
			<td><a href="http://us3.php.net/shell_exec" target="_blank"><?php esc_html_e("Shell Exec", 'duplicator'); ?></a></td>
			<td><?php echo (DUP_Util::hasShellExec()) ? esc_html__("Is Supported", 'duplicator') : esc_html__("Not Supported", 'duplicator'); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Shell Exec Zip", 'duplicator'); ?></td>
			<td><?php echo (DUP_Util::getZipPath() != null) ? esc_html__("Is Supported", 'duplicator') : esc_html__("Not Supported", 'duplicator'); ?></td>
		</tr>
        <tr>
            <td><a href="https://suhosin.org/stories/index.html" target="_blank"><?php esc_html_e("Suhosin Extension", 'duplicator'); ?></a></td>
            <td><?php echo extension_loaded('suhosin') ? esc_html__("Enabled", 'duplicator') : esc_html__("Disabled", 'duplicator'); ?></td>
        </tr>
		<tr>
			<td><?php esc_html_e("Architecture ", 'duplicator'); ?></td>
			<td>                    
				<?php echo DUP_Util::getArchitectureString(); ?>
			</td>
		</tr>
		<tr>
            <td><?php esc_html_e("Error Log File ", 'duplicator'); ?></td>
            <td><?php echo esc_html($error_log_path); ?></td>
        </tr>
		<tr>
			<td class='dup-settings-diag-header' colspan="2">MySQL</td>
		</tr>
		<tr>
			<td><?php esc_html_e("Version", 'duplicator'); ?></td>
			<td><?php echo esc_html(DUP_DB::getVersion()); ?></td>
		</tr>
        <tr>
			<td><?php esc_html_e("Comments", 'duplicator'); ?></td>
            <td><?php echo esc_html(DUP_DB::getVariable('version_comment')); ?></td>
		</tr>
		<tr>
			<td><?php esc_html_e("Charset", 'duplicator'); ?></td>
			<td><?php echo defined('DB_CHARSET') ? DB_CHARSET : 'DB_CHARSET not set' ; ?></td>
		</tr>
		<tr>
			<td><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout" target="_blank"><?php esc_html_e("Wait Timeout", 'duplicator'); ?></a></td>
			<td><?php echo esc_html($dbvar_maxtime); ?></td>
		</tr>
		<tr>
			<td style="white-space:nowrap"><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet" target="_blank"><?php esc_html_e("Max Allowed Packets", 'duplicator'); ?></a></td>
			<td><?php echo esc_html($dbvar_maxpacks); ?></td>
		</tr>
		<tr>
			<td><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank"><?php esc_html_e("msyqldump Path", 'duplicator'); ?></a></td>
			<td><?php echo esc_html($mysqlDumpSupport); ?></td>
		</tr>
		 <tr>
			 <td class='dup-settings-diag-header' colspan="2"><?php esc_html_e("Server Disk", 'duplicator'); ?></td>
		 </tr>
		 <tr valign="top">
			 <td><?php esc_html_e('Free space', 'hyper-cache'); ?></td>
			 <td><?php echo esc_html($perc);?>% -- <?php echo esc_html(DUP_Util::byteSize($space_free));?> from <?php echo esc_html(DUP_Util::byteSize($space));?><br/>
				  <small>
					  <?php esc_html_e("Note: This value is the physical servers hard-drive allocation.", 'duplicator'); ?> <br/>
					  <?php esc_html_e("On shared hosts check your control panel for the 'TRUE' disk space quota value.", 'duplicator'); ?>
				  </small>
			 </td>
		 </tr>

	</table><br/>

</div> <!-- end .dup-box-panel -->
</div> <!-- end .dup-box -->
<br/>diagnostics/inc.data.php000064400000012001151333067470011250 0ustar00<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
	$sql = "SELECT * FROM `{$wpdb->prefix}options` WHERE  `option_name` LIKE  '%duplicator_%' AND  `option_name` NOT LIKE '%duplicator_pro%' ORDER BY option_name";
?>

<!-- ==============================
OPTIONS DATA -->
<div class="dup-box">
	<div class="dup-box-title">
		<i class="fa fa-th-list"></i>
		<?php esc_html_e("Stored Data", '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); ?>">
		<div style="padding-left:10px">
			<h3 class="title"><?php esc_html_e('Data Cleanup', 'duplicator') ?></h3>
			<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>
			</table>
		</div>
		<div style="padding:0px 20px 0px 25px">
			<h3 class="title" style="margin-left:-15px"><?php esc_html_e("Options Values", 'duplicator') ?> </h3>
			<table class="widefat" cellspacing="0">
				<thead>
					<tr>
						<th>Key</th>
						<th>Value</th>
					</tr>
				</thead>
				<tbody>
				<?php
					foreach( $wpdb->get_results("{$sql}") as $key => $row) { ?>
					<tr>
						<td>
							<?php
								 echo (in_array($row->option_name, $GLOBALS['DUPLICATOR_OPTS_DELETE']))
									? "<a href='javascript:void(0)' onclick='Duplicator.Settings.ConfirmDeleteOption(this)'>".esc_html($row->option_name)."</a>"
									: $row->option_name;
							?>
						</td>
						<td><textarea class="dup-opts-read" readonly="readonly"><?php echo esc_textarea($row->option_value); ?></textarea></td>
					</tr>
				<?php } ?>
				</tbody>
			</table>
		</div>

	</div>
</div>
<br/>

<!-- ==========================================
THICK-BOX DIALOGS: -->
<?php
	$confirm1 = new DUP_UI_Dialog();
	$confirm1->title			= __('Delete Option?', 'duplicator');
	$confirm1->message			= __('Delete the option value just selected?', 'duplicator');
	$confirm1->progressText	= __('Removing Option, Please Wait...', 'duplicator');
	$confirm1->jscallback		= 'Duplicator.Settings.DeleteOption()';
	$confirm1->initConfirm();

	$confirm2 = new DUP_UI_Dialog();
	$confirm2->title			= __('Clear Build Cache?', 'duplicator');
	$confirm2->message			= __('This process will remove all build cache files.  Be sure no packages are currently building or else they will be cancelled.', 'duplicator');
	$confirm2->jscallback		= 'Duplicator.Tools.ClearBuildCache()';
	$confirm2->initConfirm();
?>

<script>
jQuery(document).ready(function($)
{
	Duplicator.Settings.ConfirmDeleteOption = function (anchor)
	{
		var key = $(anchor).text();
		var msg_id = '<?php echo esc_js($confirm1->getMessageID()); ?>';
		var msg    = '<?php esc_html_e('Delete the option value', 'duplicator');?>' + ' [' + key + '] ?';
		jQuery('#dup-remove-options-value').val(key);
		jQuery('#' + msg_id).html(msg)
		<?php $confirm1->showConfirm(); ?>
	}

	Duplicator.Settings.DeleteOption = function ()
	{
		jQuery('#dup-settings-form').submit();
	}

	Duplicator.Tools.ConfirmClearBuildCache = function ()
	{
		 <?php $confirm2->showConfirm(); ?>
	}

	Duplicator.Tools.ClearBuildCache = function ()
	{
		window.location = '?page=duplicator-tools&tab=diagnostics&action=tmp-cache&_wpnonce=<?php echo esc_js($nonce); ?>';
	}
});


Duplicator.Tools.deleteInstallerFiles = function()
{
	<?php
	$url = "?page=duplicator-tools&tab=diagnostics&action=installer&_wpnonce=".esc_js($nonce)."&package=".esc_js($package_name);
	echo "window.location = '{$url}';";
	?>
}
</script>
diagnostics/inc.phpinfo.php000064400000001447151333067470012016 0ustar00<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
	ob_start();
	phpinfo();
	$serverinfo = ob_get_contents();
	ob_end_clean();

	$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/>
diagnostics/support.php000064400000016430151333067470011315 0ustar00<?php
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:160px; 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 4px 4px 4px; 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> <?php esc_html_e('Choose A Section', 'duplicator') ?> </option>
                    <option value="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_qs"><?php esc_html_e('Quick Start',
	'duplicator') ?></option>
                    <option value="https://snapcreek.com/duplicator/docs/guide/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_guide"><?php esc_html_e('User Guide',
	'duplicator') ?></option>
                    <option value="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_FAQs"><?php esc_html_e('FAQs',
	'duplicator') ?></option>
                    <option value="https://snapcreek.com/duplicator/docs/changelog/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_changelog&lite"><?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('Online Support', 'duplicator') ?></div>
            </div>
            <div class="dup-support-hlp-txt">
<?php esc_html_e("Get Help From IT Professionals", 'duplicator'); ?>
                <br/>
                <div class="dup-support-txts-links" style="margin:10px 0 10px 0">
                    <button class="button  button-primary button-large" onclick="Duplicator.OpenSupportWindow();return false;">
<?php esc_html_e('Get Support!', 'duplicator') ?>
					</button> <br/>
                </div>
				<small>Pro Users <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_prousers_here" target="_blank">Support Here</a></small>
            </div>
        </div>
        <br style="clear:both" /><br/><br/>


        <!-- APPROVED HOSTING -->
        <div class="dup-support-hlp-area">

            <div class="dup-support-hlp-hdrs">
                <i class="fa fa-bolt fa-sm fa-2x fa-pull-left"></i>
                <div><?php esc_html_e('Approved Hosting', 'duplicator') ?></div>
            </div>
            <div class="dup-support-hlp-txt">
<?php esc_html_e('Servers That Work With Duplicator', 'duplicator'); ?>
                <br/><br/>
                <div class="dup-support-txts-links">
                    <button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_servers#faq-resource-040-q', 'litg');"><?php esc_html_e('Trusted Providers!',
	'duplicator') ?></button> &nbsp;
                </div>
            </div>
        </div>

        <!-- ALTERNATIVES -->
        <div class="dup-support-hlp-area">

            <div class="dup-support-hlp-hdrs">
                <i class="fas fa-code-branch fa-2x fa-pull-left"></i>
                <div><?php esc_html_e('Alternatives', 'duplicator') ?></div>
            </div>
            <div class="dup-support-hlp-txt">
<?php esc_html_e('Other Commercial Resources', 'duplicator'); ?>
                <br/><br/>
                <div class="dup-support-txts-links">
                    <button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_pro_sln#faq-resource-050-q', 'litg');"><?php esc_html_e('Pro Solutions!',
	'duplicator') ?></button> &nbsp;
                </div>
            </div>
        </div>
    </div>
</div><br/><br/><br/><br/>

<script>
	jQuery(document).ready(function ($) {

		Duplicator.OpenSupportWindow = function () {
			var url = 'https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_window#faq-resource';
			window.open(url, 'litg');
		}

		//ATTACHED EVENTS
		jQuery('#dup-support-kb-lnks').change(function () {
			if (jQuery(this).val() != "null")
				window.open(jQuery(this).val())
		});

	});
</script>diagnostics/main.php000064400000007027151333067470010527 0ustar00<?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:10px;}
	.widefat td:nth-child(2) {padding-left: 20px; width:100% !important}
	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(dirname(__FILE__) . '/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(dirname(__FILE__) . '/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(dirname(__FILE__) . '/support.php');
        break;
}
?>diagnostics/inc.validator.php000064400000012431151333067470012333 0ustar00<?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 sys-links in your environment  that can lead to issues during the scan process.  ", "duplicator");
			esc_html_e("The utility will also shows how many files and directories you have in your system.  This process may take several minutes to run.  ", "duplicator");
			esc_html_e("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.  ", "duplicator");
			esc_html_e("A message will show indicated that that a scan depth has been reached. If you have issues with the package 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>

index.php000064400000000016151333067470006372 0ustar00<?php
//silentrecovery.php000064400000002037151333067470007126 0ustar00<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
?>

<style>
	div.panel {padding: 20px 5px 10px 10px; text-align: center; }
</style>


<div class="panel">
    <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png"  />

    <div class="txt-call-action-title">
        <i class="fas fa-undo-alt"></i>
        <?php echo esc_html__('Recovery Points are available in Duplicator Pro.', 'duplicator'); ?>
    </div>

    <div class="txt-call-action-sub">
		<?php
            esc_html_e('Recovery Points allow you to quickly revert your website to a specific point in time.', 'duplicator');
            echo '<br/>';
            esc_html_e('Upgrade plugins or make risky site changes with confidence!', 'duplicator');
		?>
    </div>

    <a class="dup-btn-call-action" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_tools_recovery_checkitout&utm_campaign=duplicator_pro" target="_blank">
        <?php esc_html_e('Check It Out!', 'duplicator') ?>
    </a>
</div>controller.php000064400000003041151333067470007447 0ustar00<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.dialog.php');
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');

global $wpdb;
global $wp_version;

DUP_Handler::init_error_handler();
DUP_Util::hasCapability('manage_options');
$current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'diagnostics';
if ('d' == $current_tab) {
	$current_tab = 'diagnostics';
}
?>

<div class="wrap">	
    <?php duplicator_header(__("Tools", 'duplicator')) ?>

    <h2 class="nav-tab-wrapper">  
        <a href="?page=duplicator-tools&tab=diagnostics" class="nav-tab <?php echo ($current_tab == 'diagnostics') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('General', 'duplicator'); ?></a>
		<a href="?page=duplicator-tools&tab=templates" class="nav-tab <?php echo ($current_tab == 'templates') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('Templates', 'duplicator'); ?></a>
        <a href="?page=duplicator-tools&tab=recovery" class="nav-tab <?php echo ($current_tab == 'recovery') ? 'nav-tab-active' : '' ?>"> <?php esc_html_e('Recovery', 'duplicator'); ?></a>
    </h2>

    <?php
		switch ($current_tab) {
			case 'diagnostics': include(DUPLICATOR_PLUGIN_PATH.'views/tools/diagnostics/main.php');
				break;
            case 'templates': include(DUPLICATOR_PLUGIN_PATH."views/tools/templates.php");
				break;
			case 'recovery': include(DUPLICATOR_PLUGIN_PATH."views/tools/recovery.php");
				break;
		}
	?>
</div>
templates.php000064400000002133151333067470007263 0ustar00<?php
defined('ABSPATH') || defined('DUPXABSPATH') || exit;
?>
<style>
	div.panel {padding: 20px 5px 10px 10px; text-align: center; }
</style>

<div class="panel">
    <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png"  />

    <div class="txt-call-action-title">
        <i class="far fa-clone"></i>
        <?php echo esc_html__('Templates are available in Duplicator Pro.', 'duplicator');  ?>
    </div>
    <div class="txt-call-action-sub">
        <?php
            esc_html_e('Templates allow you to customize what you want to include in your site and store it as a re-usable profile.', 'duplicator');
            echo '<br/>';
            esc_html_e('Save time and create a template that can be applied to a schedule or a custom package setup.', 'duplicator');
        ?>
    </div>

    <a class="dup-btn-call-action" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_tools_templates_checkitout&utm_campaign=duplicator_pro" target="_blank">
        <?php esc_html_e('Check It Out!', 'duplicator') ?>
    </a>
</div>



Youez - 2016 - github.com/yon3zu
LinuXploit