Файловый менеджер - Редактировать - /home/infrafs/INFRABIKEIT/wp-content/plugins/packages.zip
Назад
PK ��3\k�fN index.phpnu �[��� <?php //silentPK ��3\?½{A A controller.phpnu �[��� <?php defined('ABSPATH') || defined('DUPXABSPATH') || exit; DUP_Handler::init_error_handler(); DUP_Util::hasCapability('export'); global $wpdb; //COMMON HEADER DISPLAY require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php'); require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php'); $current_view = (isset($_REQUEST['action']) && $_REQUEST['action'] == 'detail') ? 'detail' : 'main'; $download_installer_nonce = wp_create_nonce('duplicator_download_installer'); ?> <script> jQuery(document).ready(function($) { Duplicator.Pack.DownloadInstaller = function (json) { var actionLocation = ajaxurl + '?action=duplicator_download_installer&id=' + json.id + '&hash='+ json.hash +'&nonce=' + '<?php echo $download_installer_nonce; ?>'; location.href = actionLocation; return false; }; Duplicator.Pack.DownloadFile = function(json) { var link = document.createElement('a'); link.target = "_blank"; link.download = json.filename; link.href= json.url; document.body.appendChild(link); // click event fire if (document.dispatchEvent) { // First create an event var click_ev = document.createEvent("MouseEvents"); // initialize the event click_ev.initEvent("click", true /* bubble */, true /* cancelable */); // trigger the event link.dispatchEvent(click_ev); } else if (document.fireEvent) { link.fireEvent('onclick'); } else if (link.click()) { link.click() } document.body.removeChild(link); return false; }; /* ---------------------------------------- * METHOD: Toggle links with sub-details */ Duplicator.Pack.ToggleSystemDetails = function(event) { if ($(this).parents('div').children(event.data.selector).is(":hidden")) { $(this).children('span').addClass('ui-icon-triangle-1-s').removeClass('ui-icon-triangle-1-e'); ; $(this).parents('div').children(event.data.selector).show(250); } else { $(this).children('span').addClass('ui-icon-triangle-1-e').removeClass('ui-icon-triangle-1-s'); $(this).parents('div').children(event.data.selector).hide(250); } } }); </script> <div class="wrap"> <?php switch ($current_view) { case 'main': include(DUPLICATOR_PLUGIN_PATH.'views/packages/main/controller.php'); break; case 'detail' : include(DUPLICATOR_PLUGIN_PATH.'views/packages/details/controller.php'); break; } ?> </div>PK ��3\ ���� � screen.phpnu �[��� <?php defined('ABSPATH') || defined('DUPXABSPATH') || exit; require_once DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.screen.base.php'; /* Because the default way is overwriting the option names in the hidden input wp_screen_options[option] I added all inputs via one option name and saved them with the update_user_meta function. Also, the set-screen-option is not being triggered inside the class, that's why it's here. -TG */ add_filter('set-screen-option', 'dup_packages_set_option', 10, 3); function dup_packages_set_option($status, $option, $value) { if('package_screen_options' == $option){ $user_id = get_current_user_id(); } return false; } class DUP_Package_Screen extends DUP_UI_Screen { public function __construct($page) { add_action('load-'.$page, array($this, 'Init')); } public function Init() { $active_tab = isset($_GET['tab']) ? $_GET['tab'] : 'list'; $active_tab = isset($_GET['action']) && $_GET['action'] == 'detail' ? 'detail' : $active_tab; $this->screen = get_current_screen(); switch (strtoupper($active_tab)) { case 'LIST': $content = $this->get_list_help(); break; case 'NEW1': $content = $this->get_step1_help(); break; case 'NEW2': $content = $this->get_step2_help(); break; case 'NEW3': $content = $this->get_step3_help(); break; case 'DETAIL': $content = $this->get_details_help(); break; default: $content = $this->get_list_help(); break; } $guide = '#guide-packs'; $faq = '#faq-package'; $content .= "<b>References:</b><br/>" . "<a href='".esc_url("https://snapcreek.com/duplicator/docs/guide/".$guide)."' target='_sc-guide'>User Guide</a> | " . "<a href='".esc_url("https://snapcreek.com/duplicator/docs/faqs-tech/".$faq)."' target='_sc-guide'>FAQs</a> | " . "<a href='https://snapcreek.com/duplicator/docs/quick-start/' target='_sc-guide'>Quick Start</a>"; $this->screen->add_help_tab( array( 'id' => 'dup_help_package_overview', 'title' => esc_html__('Overview','duplicator'), 'content' => "<p>{$content}</p>" ) ); $this->getSupportTab($guide, $faq); $this->getHelpSidbar(); } public function get_list_help() { return __("<b><i class='fa fa-archive'></i> Packages » All</b><br/> The 'Packages' section is the main interface for managing all the packages that have been created. " . "A Package consists of two core files, the 'archive.zip' and the 'installer.php' file. The archive file is a zip file containing all your WordPress files and a " . "copy of your WordPress database. The installer file is a php file that when browsed to via a web browser presents a wizard that redeploys/installs the website " . "by extracting the archive file and installing the database. To create a package, click the 'Create New' button and follow the prompts. <br/><br/>" . "<b><i class='fa fa-download'></i> Downloads</b><br/>" . "To download the package files click on the Installer and Archive buttons after creating a package. The archive file will have a copy of the installer inside of it named " . "installer-backup.php in case the original installer file is lost. To see the details of a package click on the <i class='fa fa-archive'></i> details button.<br/><br/>" . "<b><i class='far fa-file-archive'></i> Archive Types</b><br/>" . "An archive file can be saved as either a .zip file or .daf file. A zip file is a common archive format used to compress and group files. The daf file short for " . "'Duplicator Archive Format' is a custom format used specifically for working with larger packages and scale-ability issues on many shared hosting platforms. Both " . "formats work very similar. The main difference is that the daf file can only be extracted using the installer.php file or the " . "<a href='https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-052-q' target='_blank'>DAF extraction tool</a>. The zip file can be used by the installer.php " . "or other zip tools like winrar/7zip/winzip or other client-side tools. <br/><br/>" ,'duplicator'); } public function get_step1_help() { return __("<b>Packages New » 1 Setup</b> <br/>" . "The setup step allows for optional filtered directory paths, files, file extensions and database tables. To filter specific system files, click the 'Enable File Filters' " . "checkbox and add the full path of the file or directory, followed by a semicolon. For a file extension add the name (i.e. 'zip') followed by a semicolon. <br/><br/>" . "To exclude a database table, check the box labeled 'Enable Table Filters' and check the table name to exclude. To include only a copy of your database in the " . "archive file check the box labeled 'Archive Only the Database'. The installer.php file can optionally be pre-filled with data at install time but is not " . "required. <br/><br/>",'duplicator'); } public function get_step2_help() { $status1 = sprintf('%1$s Good %2$s', '<span class="badge badge-pass">', '</span>'); $status2 = sprintf('%1$s Notice %2$s', '<span class="badge badge-warn">', '</span>'); //TITLE $msg = sprintf('%1$s Packages » 2 Scan %2$s', '<b>', '</b><br/>'); //MESSAGE $msg .= sprintf( 'In Step-2 of the build process Duplicator scans your WordPress site files and database for any possible issues. Each section is expandable ' . 'and will show more details regarding the parameters of that section. The following indicators will be present for each section: %3$s' . '%1$s Indicates that no issues were detected. It is best to try and get all the values to display this status if possible, but not required. %3$s' . '%2$s Indicates a possible issue. A notice will not prevent the build from running however, if you do have issues then the section should be observed. %4$s', $status1, $status2, '<br/>', '<br/><br/>' ); return $msg; } public function get_step3_help() { return __("<b>Packages » 3 Build</b> <br/>" . "The final step in the build process where the installer script and archive of the website can be downloaded. To start the install process follow these steps: " . "<ol>" . "<li>Download the installer.php and archive.zip files to your local computer.</li>" . "<li>For localhost installs be sure you have PHP, Apache & MySQL installed on your local computer with software such as XAMPP, Instant WordPress or MAMP for MAC. " . "Place the package.zip and installer.php into any empty directory under your webroot then browse to the installer.php via your web browser to launch the install wizard.</li>" . "<li>For remote installs use FTP or cPanel to upload both the archive.zip and installer.php to your hosting provider. Place the files in a new empty directory under " . "your host's webroot accessible from a valid URL such as http://your-domain/your-wp-directory/installer.php to launch the install wizard. On some hosts the root directory " . "will be a something like public_html -or- www. If your're not sure contact your hosting provider. </li>" . "</ol>" . "For complete instructions see:<br/> <a href='https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_built_install_help4&utm_campaign=duplicator_free#quick-040-q' target='_blank'> How do I install this Package?</a><br/><br/>",'duplicator'); } public function get_details_help() { return __("<b>Packages » Details</b> <br/>" . "The details view will give you a full break-down of the package including any errors that may have occured during the install. <br/><br/>",'duplicator'); } } PK ��3\����� � main/s2.scan3.phpnu �[��� <?php defined('ABSPATH') || defined('DUPXABSPATH') || exit; /*IDE Helper*/ /* @var $Package DUP_Package */ function _duplicatorGetRootPath() { $txt = __('Root Path', 'duplicator'); $root = duplicator_get_abs_path(); $sroot = strlen($root) > 50 ? substr($root, 0, 50) . '...' : $root; echo "<div title=".str_replace('\\/', '/', json_encode($root))." class='divider'><i class='fa fa-folder-open'></i> {$sroot}</div>"; } $archive_type_label = DUP_Settings::Get('archive_build_mode') == DUP_Archive_Build_Mode::ZipArchive ? "ZipArchive" : "DupArchive"; $archive_type_extension = DUP_Settings::Get('archive_build_mode') == DUP_Archive_Build_Mode::ZipArchive ? "zip" : "daf"; $duparchive_max_limit = DUP_Util::readableByteSize(DUPLICATOR_MAX_DUPARCHIVE_SIZE); $skip_archive_scan = DUP_Settings::Get('skip_archive_scan'); ?> <!-- ================================================================ ARCHIVE --> <div class="details-title"> <i class="far fa-file-archive"></i> <?php esc_html_e('Archive', 'duplicator');?> <sup class="dup-small-ext-type"><?php echo esc_html($archive_type_extension); ?></sup> <div class="dup-more-details" onclick="Duplicator.Pack.showDetailsDlg()" title="<?php esc_attr_e('Show Scan Details', 'duplicator');?>"><i class="fa fa-window-maximize"></i></div> </div> <div class="scan-header scan-item-first"> <i class="fas fa-folder-open"></i> <?php esc_html_e("Files", 'duplicator'); ?> <div class="scan-header-details"> <div class="dup-scan-filter-status"> <?php if ($Package->Archive->ExportOnlyDB) { echo '<i class="fa fa-filter fa-sm"></i> '; esc_html_e('Database Only', 'duplicator'); } elseif ($Package->Archive->FilterOn) { echo '<i class="fa fa-filter fa-sm"></i> '; esc_html_e('Enabled', 'duplicator'); } ?> </div> <div id="data-arc-size1"></div> <i class="fa fa-question-circle data-size-help" data-tooltip-title="<?php esc_attr_e('Archive Size', 'duplicator'); ?>" data-tooltip="<?php esc_attr_e('This size includes only files BEFORE compression is applied. It does not include the size of the ' . 'database script or any applied filters. Once complete the package size will be smaller than this number.', 'duplicator'); ?>"></i> <div class="dup-data-size-uncompressed"><?php esc_html_e("uncompressed"); ?></div> </div> </div> <?php if ($Package->Archive->ExportOnlyDB) { ?> <div class="scan-item "> <div class='title' onclick="Duplicator.Pack.toggleScanItem(this);"> <div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Database Only', 'duplicator');?></div> <div id="only-db-scan-status"><div class="badge badge-warn"><?php esc_html_e("Notice", 'duplicator'); ?></div></div> </div> <div class="info"> <?php esc_html_e("Only the database and a copy of the installer will be included in the archive file. This notice simply indicates that the package " . "will not be capable of restoring a full WordPress site, but only the database. If this is the desired intention then this notice can be ignored.", 'duplicator'); ?> </div> </div> <?php } else if ($skip_archive_scan) { ?> <div class="scan-item "> <div class='title' onclick="Duplicator.Pack.toggleScanItem(this);"> <div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Skip archive scan enabled', 'duplicator');?></div> <div id="skip-archive-scan-status"><div class="badge badge-warn"><?php esc_html_e("Notice", 'duplicator'); ?></div></div> </div> <div class="info"> <?php esc_html_e("All file checks are skipped. This could cause problems during extraction if problematic files are included.", 'duplicator'); ?> <br><br> <b><?php esc_html_e(" Disable the advanced option to re-enable file controls.", 'duplicator'); ?></b> </div> </div> <?php } else { ?> <!-- ============ TOTAL SIZE --> <div class="scan-item"> <div class="title" onclick="Duplicator.Pack.toggleScanItem(this);"> <div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Size Checks', 'duplicator');?></div> <div id="data-arc-status-size"></div> </div> <div class="info" id="scan-itme-file-size"> <b><?php esc_html_e('Size', 'duplicator');?>:</b> <span id="data-arc-size2"></span> | <b><?php esc_html_e('File Count', 'duplicator');?>:</b> <span id="data-arc-files"></span> | <b><?php esc_html_e('Directory Count', 'duplicator');?>:</b> <span id="data-arc-dirs"></span> <br/> <?php _e('Compressing larger sites on <i>some budget hosts</i> may cause timeouts. ' , 'duplicator'); echo "<i> <a href='javascipt:void(0)' onclick='jQuery(\"#size-more-details\").toggle(100);return false;'>[" . esc_html__('more details...', 'duplicator') . "]</a></i>"; ?> <div id="size-more-details"> <?php echo "<b>" . esc_html__('Overview', 'duplicator') . ":</b><br/>"; $dup_byte_size = '<b>' . DUP_Util::byteSize(DUPLICATOR_SCAN_SIZE_DEFAULT) . '</b>'; printf(esc_html__('This notice is triggered at [%s] and can be ignored on most hosts. If during the build process you see a "Host Build Interrupt" message then this ' . 'host has strict processing limits. Below are some options you can take to overcome constraints set up on this host.', 'duplicator'), $dup_byte_size); echo '<br/><br/>'; echo "<b>" . esc_html__('Timeout Options', 'duplicator') . ":</b><br/>"; echo '<ul>'; echo '<li>' . esc_html__('Apply the "Quick Filters" below or click the back button to apply on previous page.', 'duplicator') . '</li>'; echo '<li>' . esc_html__('See the FAQ link to adjust this hosts timeout limits: ', 'duplicator') . " <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=pkg_s2scan3_tolimits#faq-trouble-100-q' target='_blank'>" . esc_html__('What can I try for Timeout Issues?', 'duplicator') . '</a></li>'; echo '<li>' . esc_html__('Consider trying multi-threaded support in ', 'duplicator'); echo "<a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=multithreaded_pro&utm_campaign=duplicator_pro' target='_blank'>" . esc_html__('Duplicator Pro.', 'duplicator') . "</a>"; echo '</li>'; echo '</ul>'; $hlptxt = sprintf(__('Files over %1$s are listed below. Larger files such as movies or zipped content can cause timeout issues on some budget hosts. If you are having ' . 'issues creating a package try excluding the directory paths below or go back to Step 1 and add them.', 'duplicator'), DUP_Util::byteSize(DUPLICATOR_SCAN_WARNFILESIZE)); ?> </div> <script id="hb-files-large" type="text/x-handlebars-template"> <div class="container"> <div class="hdrs"> <span style="font-weight:bold"> <?php esc_html_e('Quick Filters', 'duplicator'); ?> <sup><i class="fas fa-question-circle fa-sm" data-tooltip-title="<?php esc_attr_e("Large Files", 'duplicator'); ?>" data-tooltip="<?php echo esc_attr($hlptxt); ?>"></i></sup> </span> <div class='hdrs-up-down'> <i class="fa fa-caret-up fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'hide')" title="<?php esc_attr_e("Hide All", 'duplicator'); ?>"></i> <i class="fa fa-caret-down fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'show')" title="<?php esc_attr_e("Show All", 'duplicator'); ?>"></i> </div> </div> <div class="data"> <?php _duplicatorGetRootPath(); ?> {{#if ARC.FilterInfo.Files.Size}} {{#each ARC.FilterInfo.TreeSize as |directory|}} <div class="directory"> <i class="fa fa-caret-right fa-lg dup-nav" onclick="Duplicator.Pack.toggleDirPath(this)"></i> {{#if directory.iscore}} <i class="far fa-window-close chk-off" title="<?php esc_attr_e('Core WordPress directories should not be filtered. Use caution when excluding files.', 'duplicator'); ?>"></i> {{else}} <input type="checkbox" name="dir_paths[]" value="{{directory.dir}}" id="lf_dir_{{@index}}" onclick="Duplicator.Pack.filesOff(this)" /> {{/if}} <label for="lf_dir_{{@index}}" title="{{directory.dir}}"> <i class="size">[{{directory.size}}]</i> {{directory.sdir}}/ </label> <br/> <div class="files"> {{#each directory.files as |file|}} <input type="checkbox" name="file_paths[]" value="{{file.path}}" id="lf_file_{{directory.dir}}-{{@index}}" /> <label for="lf_file_{{directory.dir}}-{{@index}}" title="{{file.path}}"> <i class="size">[{{file.bytes}}]</i> {{file.name}} </label> <br/> {{/each}} </div> </div> {{/each}} {{else}} <?php if (! isset($_GET['retry'])) { _e('No large files found during this scan.', 'duplicator'); } else { echo "<div style='color:maroon'>"; _e('No large files found during this scan. If you\'re having issues building a package click the back button and try ' . 'adding a file filter to non-essential files paths like wp-content/uploads. These excluded files can then ' . 'be manually moved to the new location after you have ran the migration installer.', 'duplicator'); echo "</div>"; } ?> {{/if}} </div> </div> <div class="apply-btn" style="margin-bottom:5px;float:right"> <div class="apply-warn"> <?php esc_html_e('*Checking a directory will exclude all items recursively from that path down. Please use caution when filtering directories.', 'duplicator'); ?> </div> <button type="button" class="button-small duplicator-quick-filter-btn" disabled="disabled" onclick="Duplicator.Pack.applyFilters(this, 'large')"> <i class="fa fa-filter fa-sm"></i> <?php esc_html_e('Add Filters & Rescan', 'duplicator');?> </button> <button type="button" class="button-small" onclick="Duplicator.Pack.showPathsDlg('large')" title="<?php esc_attr_e('Copy Paths to Clipboard', 'duplicator');?>"> <i class="fa far fa-clipboard" aria-hidden="true"></i> </button> </div> <div style="clear:both"></div> </script> <div id="hb-files-large-result" class="hb-files-style"></div> </div> </div> <!-- ====================== ADDON SITES --> <div id="addonsites-block" class="scan-item"> <div class='title' onclick="Duplicator.Pack.toggleScanItem(this);"> <div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Addon Sites', 'duplicator');?></div> <div id="data-arc-status-addonsites"></div> </div> <div class="info"> <div style="margin-bottom:10px;"> <?php printf(__('An "Addon Site" is a separate WordPress site(s) residing in subdirectories within this site. If you confirm these to be separate sites, ' . 'then it is recommended that you exclude them by checking the corresponding boxes below and clicking the \'Add Filters & Rescan\' button. To backup the other sites ' . 'install the plugin on the sites needing to be backed-up.')); ?> </div> <script id="hb-addon-sites" type="text/x-handlebars-template"> <div class="container"> <div class="hdrs"> <span style="font-weight:bold"> <?php esc_html_e('Quick Filters', 'duplicator'); ?> </span> </div> <div class="data"> {{#if ARC.FilterInfo.Dirs.AddonSites.length}} {{#each ARC.FilterInfo.Dirs.AddonSites as |path|}} <div class="directory"> <input type="checkbox" name="dir_paths[]" value="{{path}}" id="as_dir_{{@index}}"/> <label for="as_dir_{{@index}}" title="{{path}}"> {{path}} </label> </div> {{/each}} {{else}} <?php esc_html_e('No add on sites found.'); ?> {{/if}} </div> </div> <div class="apply-btn"> <div class="apply-warn"> <?php esc_html_e('*Checking a directory will exclude all items in that path recursively.'); ?> </div> <button type="button" class="button-small duplicator-quick-filter-btn" disabled="disabled" onclick="Duplicator.Pack.applyFilters(this, 'addon')"> <i class="fa fa-filter fa-sm"></i> <?php esc_html_e('Add Filters & Rescan');?> </button> </div> </script> <div id="hb-addon-sites-result" class="hb-files-style"></div> </div> </div> <!-- ============ FILE NAME CHECKS --> <div class="scan-item"> <div class="title" onclick="Duplicator.Pack.toggleScanItem(this);"> <div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Name Checks', 'duplicator');?></div> <div id="data-arc-status-names"></div> </div> <div class="info"> <?php _e('Unicode and special characters such as "*?><:/\|", can be problematic on some hosts.', 'duplicator'); esc_html_e(' Only consider using this filter if the package build is failing. Select files that are not important to your site or you can migrate manually.', 'duplicator'); $txt = __('If this environment/system and the system where it will be installed are set up to support Unicode and long paths then these filters can be ignored. ' . 'If you run into issues with creating or installing a package, then is recommended to filter these paths.', 'duplicator'); ?> <script id="hb-files-utf8" type="text/x-handlebars-template"> <div class="container"> <div class="hdrs"> <span style="font-weight:bold"><?php esc_html_e('Quick Filters', 'duplicator');?></span> <sup><i class="fas fa-question-circle fa-sm" data-tooltip-title="<?php esc_attr_e("Name Checks", 'duplicator'); ?>" data-tooltip="<?php echo esc_attr($txt); ?>"></i></sup> <div class='hdrs-up-down'> <i class="fa fa-caret-up fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'hide')" title="<?php esc_attr_e("Hide All", 'duplicator'); ?>"></i> <i class="fa fa-caret-down fa-lg dup-nav-toggle" onclick="Duplicator.Pack.toggleAllDirPath(this, 'show')" title="<?php esc_attr_e("Show All", 'duplicator'); ?>"></i> </div> </div> <div class="data"> <?php _duplicatorGetRootPath(); ?> {{#if ARC.FilterInfo.TreeWarning}} {{#each ARC.FilterInfo.TreeWarning as |directory|}} <div class="directory"> {{#if directory.count}} <i class="fa fa-caret-right fa-lg dup-nav" onclick="Duplicator.Pack.toggleDirPath(this)"></i> {{else}} <i class="empty"></i> {{/if}} {{#if directory.iscore}} <i class="far fa-window-close chk-off" title="<?php esc_attr_e('Core WordPress directories should not be filtered. Use caution when excluding files.', 'duplicator'); ?>"></i> {{else}} <input type="checkbox" name="dir_paths[]" value="{{directory.dir}}" id="nc1_dir_{{@index}}" onclick="Duplicator.Pack.filesOff(this)" /> {{/if}} <label for="nc1_dir_{{@index}}" title="{{directory.dir}}"> <i class="count">({{directory.count}})</i> {{directory.sdir}}/ </label> <br/> <div class="files"> {{#each directory.files}} <input type="checkbox" name="file_paths[]" value="{{path}}" id="warn_file_{{directory.dir}}-{{@index}}" /> <label for="warn_file_{{directory.dir}}-{{@index}}" title="{{path}}"> {{name}} </label> <br/> {{/each}} </div> </div> {{/each}} {{else}} <?php esc_html_e('No file/directory name warnings found.', 'duplicator');?> {{/if}} </div> </div> <div class="apply-btn"> <div class="apply-warn"> <?php esc_html_e('*Checking a directory will exclude all items recursively from that path down. Please use caution when filtering directories.', 'duplicator'); ?> </div> <button type="button" class="button-small duplicator-quick-filter-btn" disabled="disabled" onclick="Duplicator.Pack.applyFilters(this, 'utf8')"> <i class="fa fa-filter fa-sm"></i> <?php esc_html_e('Add Filters & Rescan', 'duplicator');?> </button> <button type="button" class="button-small" onclick="Duplicator.Pack.showPathsDlg('utf8')" title="<?php esc_attr_e('Copy Paths to Clipboard', 'duplicator');?>"> <i class="fa far fa-clipboard" aria-hidden="true"></i> </button> </div> </script> <div id="hb-files-utf8-result" class="hb-files-style"></div> </div> </div> <!-- ====================== UNREADABLE FILES --> <div id="scan-unreadable-items" class="scan-item"> <div class='title' onclick="Duplicator.Pack.toggleScanItem(this);"> <div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Read Checks');?></div> <div id="data-arc-status-unreadablefiles"></div> </div> <div class="info"> <?php esc_html_e('PHP is unable to read the following items and they will NOT be included in the package. Please work with your host to adjust the permissions or resolve the ' . 'symbolic-link(s) shown in the lists below. If these items are not needed then this notice can be ignored.'); ?> <script id="unreadable-files" type="text/x-handlebars-template"> <div class="container"> <div class="data"> <b><?php esc_html_e('Unreadable Items:');?></b> <br/> <div class="directory"> {{#if ARC.UnreadableItems}} {{#each ARC.UnreadableItems as |uitem|}} <i class="fa fa-lock fa-xs"></i> {{uitem}} <br/> {{/each}} {{else}} <i><?php esc_html_e('No unreadable items found.');?><br/></i> {{/if}} </div> <b><?php esc_html_e('Recursive Links:');?> </b> <br/> <div class="directory"> {{#if ARC.RecursiveLinks}} {{#each ARC.RecursiveLinks as |link|}} <i class="fa fa-lock fa-xs"></i> {{link}} <br/> {{/each}} {{else}} <i><?php esc_html_e('No recursive sym-links found.');?><br/></i> {{/if}} </div> </div> </div> </script> <div id="unreadable-files-result" class="hb-files-style"></div> </div> </div> <?php } ?> <!-- ============ DATABASE --> <div id="dup-scan-db"> <div class="scan-header"> <i class="fas fa-database fa-sm"></i> <?php esc_html_e("Database", 'duplicator'); ?> <div class="scan-header-details"> <div class="dup-scan-filter-status"> <?php if ($Package->Database->FilterOn) { echo '<i class="fa fa-filter fa-sm"></i> '; esc_html_e('Enabled', 'duplicator'); } ?> </div> <div id="data-db-size1"></div> <i class="fa fa-question-circle data-size-help" data-tooltip-title="<?php esc_attr_e("Database Size:", 'duplicator'); ?>" data-tooltip="<?php esc_attr_e('The database size represents only the included tables. The process for gathering the size uses the query SHOW TABLE STATUS. ' . 'The overall size of the database file can impact the final size of the package.', 'duplicator'); ?>"></i> <div class="dup-data-size-uncompressed"><?php esc_html_e("uncompressed"); ?></div> </div> </div> <div class="scan-item"> <div class="title" onclick="Duplicator.Pack.toggleScanItem(this);"> <div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Overview', 'duplicator');?></div> <div id="data-db-status-size"></div> </div> <div class="info"> <?php echo '<b>' . esc_html__('TOTAL SIZE', 'duplicator') . ' ⇛ </b>'; ?> <b><?php esc_html_e('Size', 'duplicator');?>:</b> <span id="data-db-size2"></span> | <b><?php esc_html_e('Tables', 'duplicator');?>:</b> <span id="data-db-tablecount"></span> | <b><?php esc_html_e('Records', 'duplicator');?>:</b> <span id="data-db-rows"></span><br/> <?php $dup_scan_tbl_total_trigger_size = DUP_Util::byteSize(DUPLICATOR_SCAN_DB_ALL_SIZE) . ' OR ' . number_format(DUPLICATOR_SCAN_DB_ALL_ROWS); printf(__('Total size and row counts are approximate values. The thresholds that trigger notices are %1$s records total for the entire database. Larger databases ' . 'take more time to process. On some budget hosts that have cpu/memory/timeout limits this may cause issues.', 'duplicator'), $dup_scan_tbl_total_trigger_size); echo '<br/><hr size="1" />'; //TABLE DETAILS echo '<b>' . __('TABLE DETAILS:', 'duplicator') . '</b><br/>'; $dup_scan_tbl_trigger_size = DUP_Util::byteSize(DUPLICATOR_SCAN_DB_TBL_SIZE) . ', ' . number_format(DUPLICATOR_SCAN_DB_TBL_ROWS); printf(esc_html__('The notices for tables are %1$s records or names with upper-case characters. Individual tables will not trigger ' . 'a notice message, but can help narrow down issues if they occur later on.', 'duplicator'), $dup_scan_tbl_trigger_size); echo '<div id="dup-scan-db-info"><div id="data-db-tablelist"></div></div>'; //RECOMMENDATIONS echo '<br/><hr size="1" />'; echo '<b>' . esc_html__('RECOMMENDATIONS:', 'duplicator') . '</b><br/>'; echo '<div style="padding:5px">'; $lnk = '<a href="maint/repair.php" target="_blank">' . esc_html__('repair and optimization', 'duplicator') . '</a>'; printf(__('1. Run a %1$s on the table to improve the overall size and performance.', 'duplicator'), $lnk); echo '<br/><br/>'; _e('2. Remove post revisions and stale data from tables. Tables such as logs, statistical or other non-critical data should be cleared.', 'duplicator'); echo '<br/><br/>'; $lnk = '<a href="?page=duplicator-settings&tab=package" target="_blank">' . esc_html__('Enable mysqldump', 'duplicator') . '</a>'; printf(__('3. %1$s if this host supports the option.', 'duplicator'), $lnk); echo '<br/><br/>'; $lnk = '<a href="http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_lower_case_table_names" target="_blank">' . esc_html__('lower_case_table_names', 'duplicator') . '</a>'; printf(__('4. For table name case sensitivity issues either rename the table with lower case characters or be prepared to work with the %1$s system variable setting.', 'duplicator'), $lnk); echo '</div>'; ?> </div> </div> <?php $triggers = $GLOBALS['wpdb']->get_col("SHOW TRIGGERS", 1); if (count($triggers)) { ?> <div class="scan-item"> <div class='title' onclick="Duplicator.Pack.toggleScanItem(this);"> <div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Triggers', 'duplicator');?></div> <div id="data-arc-status-triggers"></div> </div> <div class="info"> <script id="hb-triggers-result" type="text/x-handlebars-template"> <div class="container"> <div class="data"> <span class="color:maroon"> <?php $lnk = '<a href="https://dev.mysql.com/doc/refman/8.0/en/triggers.html" target="_blank">' . esc_html__('triggers', 'duplicator') . '</a>'; printf(__('This database makes use of %1$s which can manually be imported at install time. Instructions and SQL statement queries will be ' . 'provided at install time for users to execute. No actions need to be performed at this time, this message is simply a notice.', 'duplicator'), $lnk); ?> </span> </div> </div> </script> <div id="triggers-result"></div> </div> </div> <?php } ?> <?php $procedures = $GLOBALS['wpdb']->get_col("SHOW PROCEDURE STATUS WHERE `Db` = '{$GLOBALS['wpdb']->dbname}'", 1); $functions = $GLOBALS['wpdb']->get_col("SHOW FUNCTION STATUS WHERE `Db` = '{$GLOBALS['wpdb']->dbname}'", 1); if (count($procedures) || count($functions)) { ?> <div id="showcreateprocfunc-block" class="scan-item"> <div class='title' onclick="Duplicator.Pack.toggleScanItem(this);"> <div class="text"><i class="fa fa-caret-right"></i> <?php esc_html_e('Object Access', 'duplicator');?></div> <div id="data-arc-status-showcreateprocfunc"></div> </div> <div class="info"> <script id="hb-showcreateprocfunc-result" type="text/x-handlebars-template"> <div class="container"> <div class="data"> {{#if ARC.Status.showCreateProcFunc}} <?php esc_html_e("The database user for this WordPress site has sufficient permissions to write stored procedures and functions to the sql file of the archive. [The command SHOW CREATE FUNCTION will work.]", 'duplicator'); ?> {{else}} <span style="color: red;"> <?php esc_html_e("The database user for this WordPress site does NOT sufficient permissions to write stored procedures or functions to the sql file of the archive. Stored procedures will not be added to the sql file.", 'duplicator'); ?> </span> {{/if}} </div> </div> </script> <div id="showcreateprocfunc-package-result"></div> </div> </div> <?php } ?> <!-- ============ TOTAL SIZE --> <div class="data-ll-section scan-header" style="display:none"> <i class="far fa-file-archive"></i> <?php esc_html_e("Total Size", 'duplicator'); ?> <div class="scan-header-details"> <div id="data-ll-totalsize"></div> <i class="fa fa-question-circle data-size-help" data-tooltip-title="<?php esc_attr_e("Total Size:", 'duplicator'); ?>" data-tooltip="<?php esc_attr_e('The total size of the site (files plus database).', 'duplicator'); ?>"></i> <div class="dup-data-size-uncompressed"><?php esc_html_e("uncompressed"); ?></div> </div> </div> <div class="data-ll-section scan-item" style="display: none"> <div style="padding: 7px; background-color:#F3B2B7; font-weight: bold "> <?php printf(__('The build can\'t continue because the total size of files and the database exceeds the %s limit that can be processed when creating a DupArchive package. ', 'duplicator'), $duparchive_max_limit); ?> <a href="javascript:void(0)" onclick="jQuery('#data-ll-status-recommendations').slideToggle('slow');"><?php esc_html_e('Click for recommendations.', 'duplicator'); ?></a> </div> <div class="info" id="data-ll-status-recommendations"> <?php echo '<b>'; $lnk = '<a href="admin.php?page=duplicator-settings&tab=package" target="_blank">' . esc_html__('Archive Engine', 'duplicator') . '</a>'; printf(esc_html__("The %s is set to create packages in the 'DupArchive' format. This custom format is used to overcome budget host constraints." . " With DupArchive, Duplicator is restricted to processing sites up to %s. To process larger sites, consider these recommendations. ", 'duplicator'), $lnk, $duparchive_max_limit, $duparchive_max_limit); echo '</b>'; echo '<br/><hr size="1" />'; echo '<b>' . esc_html__('RECOMMENDATIONS:', 'duplicator') . '</b><br/>'; echo '<div style="padding:5px">'; $new1_package_url = admin_url('admin.php?page=duplicator&tab=new1'); $new1_package_nonce_url = wp_nonce_url($new1_package_url, 'new1-package'); $lnk = '<a href="'.$new1_package_nonce_url.'">' . esc_html__('Step 1', 'duplicator') . '</a>'; printf(__('- Add data filters to get the package size under %s: ', 'duplicator'), $duparchive_max_limit); echo '<div style="padding:0 0 0 20px">'; _e("- In the 'Size Checks' section above consider adding filters (if notice is shown).", 'duplicator'); echo '<br/>'; printf(__("- In %s consider adding file/directory or database table filters.", 'duplicator'), $lnk); echo '</div>'; echo '<br/>'; $lnk = '<a href="https://snapcreek.com/duplicator/docs/quick-start?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=da_size_two_part&utm_campaign=duplicator_pro#quick-060-q" target="_blank">' . esc_html__('covered here.', 'duplicator') . '</a>'; printf(__("- Perform a two part install %s", 'duplicator'), $lnk); echo '<br/><br/>'; $lnk = '<a href="admin.php?page=duplicator-settings&tab=package" target="_blank">' . esc_html__('ZipArchive Engine', 'duplicator') . '</a>'; printf(__("- Switch to the %s which requires a capable hosting provider (VPS recommended).", 'duplicator'),$lnk); echo '<br/><br/>'; $lnk = '<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_da_size_limit&utm_campaign=duplicator_pro" target="_blank">' . esc_html__('Duplicator Pro', 'duplicator') . '</a>'; printf(__("- Consider upgrading to %s for large site support. (unlimited)", 'duplicator'), $lnk); echo '</div>'; ?> </div> </div> <?php echo '<div class="dup-pro-support"> '; esc_html_e('Migrate large, multi-gig sites with', 'duplicator'); echo ' <i><a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_size_warn_multigig&utm_campaign=duplicator_pro" target="_blank">' . esc_html__('Duplicator Pro', 'duplicator') . '!</a></i>'; echo '</div>'; ?> </div> <br/><br/> <!-- ========================================== DIALOGS: ========================================== --> <?php $alert1 = new DUP_UI_Dialog(); $alert1->height = 600; $alert1->width = 600; $alert1->title = __('Scan Details', 'duplicator'); $alert1->message = "<div id='arc-details-dlg'></div>"; $alert1->initAlert(); $alert2 = new DUP_UI_Dialog(); $alert2->height = 450; $alert2->width = 650; $alert2->title = __('Copy Quick Filter Paths', 'duplicator'); $alert2->message = "<div id='arc-paths-dlg'></div>"; $alert2->initAlert(); ?> <!-- ======================= DIALOG: Scan Results --> <div id="dup-archive-details" style="display:none"> <!-- PACKAGE --> <h2><i class="fa fa-archive fa-sm"></i> <?php esc_html_e('Package', 'duplicator');?></h2> <b><?php esc_html_e('Name', 'duplicator');?>:</b> <?php echo esc_html($Package->Name); ?><br/> <b><?php esc_html_e('Notes', 'duplicator');?>:</b> <?php echo esc_html($Package->Notes); ?> <br/> <b><?php esc_html_e('Archive Engine', 'duplicator');?>:</b> <a href="admin.php?page=duplicator-settings&tab=package" target="_blank"><?php echo esc_html($archive_type_label); ?></a> <br/><br/> <!-- DATABASE --> <h2><i class="fas fa-database fa-sm"></i> <?php esc_html_e('Database', 'duplicator');?></h2> <table id="db-area"> <tr><td><b><?php esc_html_e('Name:', 'duplicator');?></b></td><td><?php echo DB_NAME; ?> </td></tr> <tr><td><b><?php esc_html_e('Host:', 'duplicator');?></b></td><td><?php echo DB_HOST; ?> </td></tr> <tr> <td style="vertical-align: top"><b><?php esc_html_e('Build Mode:', 'duplicator');?></b></td> <td style="line-height:18px"> <a href="?page=duplicator-settings&tab=package" target="_blank"><?php echo esc_html($dbbuild_mode); ?></a> <?php if ($mysqlcompat_on) :?> <br/> <small style="font-style:italic; color:maroon"> <i class="fa fa-exclamation-circle"></i> <?php esc_html_e('MySQL Compatibility Mode Enabled', 'duplicator'); ?> <a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php esc_html_e('details', 'duplicator'); ?>]</a> </small> <?php endif;?> </td> </tr> </table><br/> <!-- FILE FILTERS --> <h2 style="border: none"> <i class="fa fa-filter fa-sm"></i> <?php esc_html_e('File Filters', 'duplicator');?>: <small><?php echo ($Package->Archive->FilterOn) ? __('Enabled', 'duplicator') : __('Disabled', 'duplicator') ;?></small> </h2> <div class="filter-area"> <b><i class="fa fa-folder-open"></i> <?php echo duplicator_get_abs_path();?></b> <script id="hb-filter-file-list" type="text/x-handlebars-template"> <div class="file-info"> <b>[<?php esc_html_e('Directories', 'duplicator'); ?>]</b> <div class="file-info"> {{#if ARC.FilterInfo.Dirs.Instance}} {{#each ARC.FilterInfo.Dirs.Instance as |dir|}} {{stripWPRoot dir}}/<br/> {{/each}} {{else}} <?php _e('No custom directory filters set.', 'duplicator');?> {{/if}} </div> <b>[<?php esc_html_e('Extensions', 'duplicator');?>]</b><br/> <div class="file-info"> <?php if (strlen( $Package->Archive->FilterExts)) { echo esc_html($Package->Archive->FilterExts); } else { _e('No file extension filters have been set.', 'duplicator'); } ?> </div> <b>[<?php esc_html_e('Files', 'duplicator'); ?>]</b> <div class="file-info"> {{#if ARC.FilterInfo.Files.Instance}} {{#each ARC.FilterInfo.Files.Instance as |file|}} {{stripWPRoot file}}<br/> {{/each}} {{else}} <?php _e('No custom file filters set.', 'duplicator');?> {{/if}} </div> <b>[<?php esc_html_e('Auto Directory Filters', 'duplicator'); ?>]</b> <div class="file-info"> {{#each ARC.FilterInfo.Dirs.Core as |dir|}} {{stripWPRoot dir}}/<br/> {{/each}} <br/> <b>[<?php esc_html_e('Auto File Filters', 'duplicator'); ?>]</b><br/> {{#each ARC.FilterInfo.Files.Global as |file|}} {{stripWPRoot file}}<br/> {{/each}} </div> </div> </script> <div class="hb-filter-file-list-result"></div> </div> <small> <?php esc_html_e('Path filters will be skipped during the archive process when enabled.', 'duplicator'); ?> <a href="<?php echo wp_nonce_url(DUPLICATOR_SITE_URL . '/wp-admin/admin-ajax.php?action=duplicator_package_scan', 'duplicator_package_scan', 'nonce'); ?>" target="dup_report"> <?php esc_html_e('[view json result report]', 'duplicator');?> </a> <br/> <?php esc_html_e('Auto filters are applied to prevent archiving other backup sets.', 'duplicator'); ?> </small><br/> </div> <!-- ======================= DIALOG: PATHS COPY & PASTE --> <div id="dup-archive-paths" style="display:none"> <b><i class="fa fa-folder"></i> <?php esc_html_e('Directories', 'duplicator');?></b> <div class="copy-button"> <button type="button" class="button-small" onclick="Duplicator.Pack.copyText(this, '#arc-paths-dlg textarea.path-dirs')"> <i class="fa far fa-clipboard"></i> <?php esc_html_e('Click to Copy', 'duplicator');?> </button> </div> <textarea class="path-dirs"></textarea> <br/><br/> <b><i class="far fa-copy fa-sm"></i> <?php esc_html_e('Files', 'duplicator');?></b> <div class="copy-button"> <button type="button" class="button-small" onclick="Duplicator.Pack.copyText(this, '#arc-paths-dlg textarea.path-files')"> <i class="fa far fa-clipboard"></i> <?php esc_html_e('Click to Copy', 'duplicator');?> </button> </div> <textarea class="path-files"></textarea> <br/> <small><?php esc_html_e('Copy the paths above and apply them as needed on Step 1 > Archive > Files section.', 'duplicator');?></small> </div> <script> jQuery(document).ready(function($) { Handlebars.registerHelper('stripWPRoot', function(path) { return path.replace(<?php echo str_replace('\\/', '/', json_encode(duplicator_get_abs_path())); ?>, ''); }); //Uncheck file names if directory is checked Duplicator.Pack.filesOff = function (dir) { var $checks = $(dir).parent('div.directory').find('div.files input[type="checkbox"]'); $(dir).is(':checked') ? $.each($checks, function() {$(this).attr({disabled : true, checked : false, title : '<?php esc_html_e('Directory applied filter set.', 'duplicator');?>'});}) : $.each($checks, function() {$(this).removeAttr('disabled checked title');}); $('div.apply-warn').show(300); } //Opens a dialog to show scan details Duplicator.Pack.showDetailsDlg = function () { $('#arc-details-dlg').html($('#dup-archive-details').html()); <?php $alert1->showAlert(); ?> Duplicator.UI.loadQtip(); return; } //Opens a dialog to show scan details Duplicator.Pack.showPathsDlg = function (type) { var id = (type == 'large') ? '#hb-files-large-result' : '#hb-files-utf8-result' var dirFilters = []; var fileFilters = []; $(id + " input[name='dir_paths[]']:checked").each(function() {dirFilters.push($(this).val());}); $(id + " input[name='file_paths[]']:checked").each(function() {fileFilters.push($(this).val());}); var $dirs = $('#dup-archive-paths textarea.path-dirs'); var $files = $('#dup-archive-paths textarea.path-files'); (dirFilters.length > 0) ? $dirs.text(dirFilters.join(";\n")) : $dirs.text("<?php esc_html_e('No directories have been selected!', 'duplicator');?>"); (fileFilters.length > 0) ? $files.text(fileFilters.join(";\n")) : $files.text("<?php esc_html_e('No files have been selected!', 'duplicator');?>"); $('#arc-paths-dlg').html($('#dup-archive-paths').html()); <?php $alert2->showAlert(); ?> return; } //Toggles a directory path to show files Duplicator.Pack.toggleDirPath = function(item) { var $dir = $(item).parents('div.directory'); var $files = $dir.find('div.files'); var $arrow = $dir.find('i.dup-nav'); if ($files.is(":hidden")) { $arrow.addClass('fa-caret-down').removeClass('fa-caret-right'); $files.show(); } else { $arrow.addClass('fa-caret-right').removeClass('fa-caret-down'); $files.hide(250); } } //Toggles a directory path to show files Duplicator.Pack.toggleAllDirPath = function(item, toggle) { var $dirs = $(item).parents('div.container').find('div.data div.directory'); (toggle == 'hide') ? $.each($dirs, function() {$(this).find('div.files').show(); $(this).find('i.dup-nav').trigger('click');}) : $.each($dirs, function() {$(this).find('div.files').hide(); $(this).find('i.dup-nav').trigger('click');}); } Duplicator.Pack.copyText = function(btn, query) { $(query).select(); try { document.execCommand('copy'); $(btn).css({color: '#fff', backgroundColor: 'green'}); $(btn).text("<?php esc_html_e('Copied to Clipboard!', 'duplicator');?>"); } catch(err) { alert("<?php esc_html_e('Manual copy of selected text required on this browser.', 'duplicator');?>") } } Duplicator.Pack.applyFilters = function(btn, type) { var $btn = $(btn); $btn.html('<i class="fas fa-circle-notch fa-spin"></i> <?php esc_html_e('Initializing Please Wait...', 'duplicator');?>'); $btn.attr('disabled', 'true'); //var id = (type == 'large') ? '#hb-files-large-result' : '#hb-files-utf8-result' var id = ''; switch(type){ case 'large': id = '#hb-files-large-result'; break; case 'utf8': id = '#hb-files-utf8-result'; break; case 'addon': id = '#hb-addon-sites-result'; break; } var dirFilters = []; var fileFilters = []; $(id + " input[name='dir_paths[]']:checked").each(function() {dirFilters.push($(this).val());}); $(id + " input[name='file_paths[]']:checked").each(function() {fileFilters.push($(this).val());}); var data = { action: 'DUP_CTRL_Package_addQuickFilters', nonce: '<?php echo wp_create_nonce('DUP_CTRL_Package_addQuickFilters'); ?>', dir_paths : dirFilters.join(";"), file_paths : fileFilters.join(";"), }; $.ajax({ type: "POST", cache: false, dataType: "text", url: ajaxurl, timeout: 100000, data: data, complete: function() { }, 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(data); alert("<?php esc_html_e('Error applying filters. Please go back to Step 1 to add filter manually!', 'duplicator');?>"); return false; } Duplicator.Pack.rescan(); }, error: function(data) { console.log(data); alert("<?php esc_html_e('Error applying filters. Please go back to Step 1 to add filter manually!', 'duplicator');?>"); } }); } Duplicator.Pack.initArchiveFilesData = function(data) { //TOTAL SIZE //var sizeChecks = data.ARC.Status.Size == 'Warn' || data.ARC.Status.Big == 'Warn' ? 'Warn' : 'Good'; $('#data-arc-status-size').html(Duplicator.Pack.setScanStatus(data.ARC.Status.Size)); $('#data-arc-status-names').html(Duplicator.Pack.setScanStatus(data.ARC.Status.Names)); $('#data-arc-status-unreadablefiles').html(Duplicator.Pack.setScanStatus(data.ARC.Status.UnreadableItems)); $('#data-arc-status-triggers').html(Duplicator.Pack.setScanStatus(data.DB.Status.Triggers)); $('#data-arc-status-migratepackage').html(Duplicator.Pack.setScanStatus(data.ARC.Status.MigratePackage)); + $('#data-arc-status-showcreateprocfunc').html(Duplicator.Pack.setScanStatus(data.ARC.Status.showCreateProcFuncStatus)); $('#data-arc-size1').text(data.ARC.Size || errMsg); $('#data-arc-size2').text(data.ARC.Size || errMsg); $('#data-arc-files').text(data.ARC.FileCount || errMsg); $('#data-arc-dirs').text(data.ARC.DirCount || errMsg); //LARGE FILES if ($('#hb-files-large').length > 0) { var template = $('#hb-files-large').html(); var templateScript = Handlebars.compile(template); var html = templateScript(data); $('#hb-files-large-result').html(html); } //ADDON SITES if ($('#hb-addon-sites').length > 0) { var template = $('#hb-addon-sites').html(); var templateScript = Handlebars.compile(template); var html = templateScript(data); $('#hb-addon-sites-result').html(html); } //NAME CHECKS if ($('#hb-files-utf8').length > 0) { var template = $('#hb-files-utf8').html(); var templateScript = Handlebars.compile(template); var html = templateScript(data); $('#hb-files-utf8-result').html(html); } //NAME CHECKS if ($('#unreadable-files').length > 0) { var template = $('#unreadable-files').html(); var templateScript = Handlebars.compile(template); var html = templateScript(data); $('#unreadable-files-result').html(html); } //SCANNER DETAILS: Dirs if ($('#hb-filter-file-list').length > 0) { var template = $('#hb-filter-file-list').html(); var templateScript = Handlebars.compile(template); var html = templateScript(data); $('div.hb-filter-file-list-result').html(html); } //MIGRATE PACKAGE if ($("#hb-migrate-package-result").length) { var template = $('#hb-migrate-package-result').html(); var templateScript = Handlebars.compile(template); var html = templateScript(data); $('#migrate-package-result').html(html); } //SHOW CREATE if ($("#hb-showcreateprocfunc-result").length) { var template = $('#hb-showcreateprocfunc-result').html(); var templateScript = Handlebars.compile(template); var html = templateScript(data); $('#showcreateprocfunc-package-result').html(html); } //TRIGGERS if ($("#hb-triggers-result").length) { var template = $('#hb-triggers-result').html(); var templateScript = Handlebars.compile(template); var html = templateScript(data); $('#triggers-result').html(html); } Duplicator.UI.loadQtip(); } Duplicator.Pack.initArchiveDBData = function(data) { var errMsg = "unable to read"; var color; var html = ""; var DB_TotalSize = 'Good'; var DB_TableRowMax = <?php echo DUPLICATOR_SCAN_DB_TBL_ROWS; ?>; var DB_TableSizeMax = <?php echo DUPLICATOR_SCAN_DB_TBL_SIZE; ?>; if (data.DB.Status.Success) { DB_TotalSize = data.DB.Status.DB_Rows == 'Warn' || data.DB.Status.DB_Size == 'Warn' ? 'Warn' : 'Good'; $('#data-db-status-size').html(Duplicator.Pack.setScanStatus(DB_TotalSize)); $('#data-db-size1').text(data.DB.Size || errMsg); $('#data-db-size2').text(data.DB.Size || errMsg); $('#data-db-rows').text(data.DB.Rows || errMsg); $('#data-db-tablecount').text(data.DB.TableCount || errMsg); //Table Details if (data.DB.TableList == undefined || data.DB.TableList.length == 0) { html = '<?php esc_html_e("Unable to report on any tables", 'duplicator') ?>'; } else { $.each(data.DB.TableList, function(i) { html += '<b>' + i + '</b><br/>'; html += '<table><tr>'; $.each(data.DB.TableList[i], function(key,val) { switch(key) { case 'Case': color = (val == 1) ? 'red' : 'black'; html += '<td style="color:' + color + '">Uppercase: ' + val + '</td>'; break; case 'Rows': color = (val > DB_TableRowMax) ? 'red' : 'black'; html += '<td style="color:' + color + '">Rows: ' + val + '</td>'; break; case 'USize': color = (parseInt(val) > DB_TableSizeMax) ? 'red' : 'black'; html += '<td style="color:' + color + '">Size: ' + data.DB.TableList[i]['Size'] + '</td>'; break; } }); html += '</tr></table>'; }); } $('#data-db-tablelist').html(html); } else { html = '<?php esc_html_e("Unable to report on database stats", 'duplicator') ?>'; $('#dup-scan-db').html(html); } } Duplicator.Pack.initLiteLimitData = function(data) { if(data.LL.Status.TotalSize == 'Fail') { $('.data-ll-section').show(); $('#dup-build-button').hide(); $('#dup-scan-warning-continue').hide(); //$('#data-ll-status-totalsize').html(Duplicator.Pack.setScanStatus(data.LL.Status.TotalSize)); $('#data-ll-totalsize').text(data.LL.TotalSize || errMsg); $('.dup-pro-support').hide(); } else { // $('#dup-scan-warning-continue').show(); $('#dup-build-button').show(); // $('#dup-build-button').prop("disabled",true); $('.data-ll-section').hide(); } } <?php if (isset($_GET['retry']) && $_GET['retry'] == '1' ) { echo "$('#scan-itme-file-size').show(300)"; } ?> // alert('before binding ' + $("#form-duplicator").length); $("#form-duplicator").on('change', "#hb-files-large-result input[type='checkbox'], #hb-files-utf8-result input[type='checkbox'], #hb-addon-sites-result input[type='checkbox']", function() { if ($("#hb-files-large-result input[type='checkbox']:checked").length) { var large_disabled_prop = false; } else { var large_disabled_prop = true; } $("#hb-files-large-result .duplicator-quick-filter-btn").prop("disabled", large_disabled_prop); if ($("#hb-files-utf8-result input[type='checkbox']:checked").length) { var utf8_disabled_prop = false; } else { var utf8_disabled_prop = true; } $("#hb-files-utf8-result .duplicator-quick-filter-btn").prop("disabled", utf8_disabled_prop); if ($("#hb-addon-sites-result input[type='checkbox']:checked").length) { var addon_disabled_prop = false; } else { var addon_disabled_prop = true; } $("#hb-addon-sites-result .duplicator-quick-filter-btn").prop("disabled", addon_disabled_prop); }); }); </script> PK ��3\%��f_= _= main/s1.setup1.phpnu �[��� <?php defined('ABSPATH') || defined('DUPXABSPATH') || exit; global $wpdb; //POST BACK: Rest Button if (isset($_POST['action'])) { $action = sanitize_text_field($_POST['action']); $action_result = DUP_Settings::DeleteWPOption($action); switch ($action) { case 'duplicator_package_active' : $action_result = DUP_Settings::DeleteWPOption($action); $action_response = __('Package settings have been reset.', 'duplicator'); break; } } DUP_Util::initSnapshotDirectory(); $Package = DUP_Package::getActive(); $dup_tests = array(); $dup_tests = DUP_Server::getRequirements(); //View State $ctrl_ui = new DUP_CTRL_UI(); $ctrl_ui->setResponseType('PHP'); $data = $ctrl_ui->GetViewStateList(); $ui_css_storage = (isset($data->payload['dup-pack-storage-panel']) && $data->payload['dup-pack-storage-panel']) ? 'display:block' : 'display:none'; $ui_css_archive = (isset($data->payload['dup-pack-archive-panel']) && $data->payload['dup-pack-archive-panel']) ? 'display:block' : 'display:none'; $ui_css_installer = (isset($data->payload['dup-pack-installer-panel']) && $data->payload['dup-pack-installer-panel']) ? 'display:block' : 'display:none'; $dup_intaller_files = implode(", ", array_keys(DUP_Server::getInstallerFiles())); $dbbuild_mode = (DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath()) ? 'mysqldump' : 'PHP'; $archive_build_mode = DUP_Settings::Get('archive_build_mode') == DUP_Archive_Build_Mode::ZipArchive ? 'zip' : 'daf'; //="No Selection", 1="Try Again", 2="Two-Part Install" $retry_state = isset($_GET['retry']) ? $_GET['retry'] : 0; ?> <style> /* REQUIREMENTS*/ div.dup-sys-section {margin:1px 0px 5px 0px} div.dup-sys-title {display:inline-block; width:250px; padding:1px; } div.dup-sys-title div {display:inline-block;float:right; } div.dup-sys-info {display:none; max-width: 98%; margin:4px 4px 12px 4px} div.dup-sys-pass {display:inline-block; color:green;font-weight:bold} div.dup-sys-fail {display:inline-block; color:#AF0000;font-weight:bold} div.dup-sys-contact {padding:5px 0px 0px 10px; font-size:11px; font-style:italic} span.dup-toggle {float:left; margin:0 2px 2px 0; } table.dup-sys-info-results td:first-child {width:200px} table.dup-sys-info-results td:nth-child(2) {width:100px; font-weight:bold} table.dup-sys-info-results td:nth-child(3) {font-style:italic} </style> <!-- ============================ TOOL BAR: STEPS --> <table id="dup-toolbar"> <tr valign="top"> <td style="white-space: nowrap"> <div id="dup-wiz"> <div id="dup-wiz-steps"> <div class="active-step"><a>1 <?php esc_html_e('Setup', 'duplicator'); ?></a></div> <div><a>2 <?php esc_html_e('Scan', 'duplicator'); ?> </a></div> <div><a>3 <?php esc_html_e('Build', 'duplicator'); ?> </a></div> </div> </div> <div id="dup-wiz-title" class="dup-guide-txt-color"> <i class="fab fa-wordpress"></i> <?php esc_html_e('Step 1: Choose the WordPress contents to backup.', 'duplicator'); ?> </div> </td> <td> </td> </tr> </table> <hr class="dup-toolbar-line"> <?php if (!empty($action_response)) : ?> <div id="message" class="notice notice-success is-dismissible"><p><?php echo esc_html($action_response); ?></p></div> <?php endif; ?> <!-- ============================ SYSTEM REQUIREMENTS --> <?php if (!$dup_tests['Success'] || $dup_tests['Warning']) : ?> <div class="dup-box"> <div class="dup-box-title"> <?php esc_html_e("Requirements:", 'duplicator'); echo ($dup_tests['Success']) ? ' <div class="dup-sys-pass">Pass</div>' : ' <div class="dup-sys-fail">Fail</div>'; ?> <div class="dup-box-arrow"></div> </div> <div class="dup-box-panel"> <div class="dup-sys-section"> <i><?php esc_html_e("System requirements must pass for the Duplicator to work properly. Click each link for details.", 'duplicator'); ?></i> </div> <!-- PHP SUPPORT --> <div class='dup-sys-req'> <div class='dup-sys-title'> <a><?php esc_html_e('PHP Support', 'duplicator'); ?></a> <div><?php echo esc_html($dup_tests['PHP']['ALL']); ?></div> </div> <div class="dup-sys-info dup-info-box"> <table class="dup-sys-info-results"> <tr> <td><?php printf("%s [%s]", esc_html__("PHP Version", 'duplicator'), phpversion()); ?></td> <td><?php echo esc_html($dup_tests['PHP']['VERSION']); ?></td> <td><?php esc_html_e('PHP versions 5.2.9+ or higher is required.')?></td> </tr> <?php if ($archive_build_mode == 'zip') : ?> <tr> <td><?php esc_html_e('Zip Archive Enabled', 'duplicator'); ?></td> <td><?php echo esc_html($dup_tests['PHP']['ZIP']); ?></td> <td> <?php printf("%s <a href='admin.php?page=duplicator-settings&tab=package'>%s</a> %s", esc_html__("ZipArchive extension is required or", 'duplicator'), esc_html__("Switch to DupArchive", 'duplicator'), esc_html__("to by-pass this requirement.", 'duplicator')); ?> </td> </tr> <?php endif; ?> <tr> <td><?php esc_html_e('Safe Mode Off', 'duplicator'); ?></td> <td><?php echo esc_html($dup_tests['PHP']['SAFE_MODE']); ?></td> <td><?php esc_html_e('Safe Mode should be set to Off in you php.ini file and is deprecated as of PHP 5.3.0.')?></td> </tr> <tr> <td><?php esc_html_e('Function', 'duplicator'); ?> <a href="http://php.net/manual/en/function.file-get-contents.php" target="_blank">file_get_contents</a></td> <td><?php echo esc_html($dup_tests['PHP']['FUNC_1']); ?></td> <td><?php echo ''; ?></td> </tr> <tr> <td><?php esc_html_e('Function', 'duplicator'); ?> <a href="http://php.net/manual/en/function.file-put-contents.php" target="_blank">file_put_contents</a></td> <td><?php echo esc_html($dup_tests['PHP']['FUNC_2']); ?></td> <td><?php echo ''; ?></td> </tr> <tr> <td><?php esc_html_e('Function', 'duplicator'); ?> <a href="http://php.net/manual/en/mbstring.installation.php" target="_blank">mb_strlen</a></td> <td><?php echo esc_html($dup_tests['PHP']['FUNC_3']); ?></td> <td><?php echo ''; ?></td> </tr> </table> <small> <?php esc_html_e("For any issues in this section please contact your hosting provider or server administrator. For additional information see our online documentation.", 'duplicator'); ?> </small> </div> </div> <!-- PERMISSIONS --> <div class='dup-sys-req'> <div class='dup-sys-title'> <a><?php esc_html_e('Required Paths', 'duplicator'); ?></a> <div> <?php if (!in_array('Fail', $dup_tests['IO'])) { echo in_array('Warn', $dup_tests['IO']) ? 'Warn' : 'Pass'; } else { echo 'Fail'; } ?> </div> </div> <div class="dup-sys-info dup-info-box"> <?php $abs_path = duplicator_get_abs_path(); printf("<b>%s</b> [%s] <br/>", $dup_tests['IO']['SSDIR'], DUP_Settings::getSsdirPath()); printf("<b>%s</b> [%s] <br/>", $dup_tests['IO']['SSTMP'], DUP_Settings::getSsdirTmpPath()); printf("<b>%s</b> [%s] <br/>", $dup_tests['IO']['WPROOT'], $abs_path); ?> <div style="font-size:11px; padding-top: 3px"> <?php if ($dup_tests['IO']['WPROOT'] == 'Warn') { echo sprintf(__('If the root WordPress path is not writable by PHP on some systems this can cause issues.', 'duplicator'), $abs_path); echo '<br/>'; } esc_html_e("If Duplicator does not have enough permissions then you will need to manually create the paths above. ", 'duplicator'); ?> </div> </div> </div> <!-- SERVER SUPPORT --> <div class='dup-sys-req'> <div class='dup-sys-title'> <a><?php esc_html_e('Server Support', 'duplicator'); ?></a> <div><?php echo esc_html($dup_tests['SRV']['ALL']); ?></div> </div> <div class="dup-sys-info dup-info-box"> <table class="dup-sys-info-results"> <tr> <td><?php printf("%s [%s]", esc_html__("MySQL Version", 'duplicator'), esc_html(DUP_DB::getVersion())); ?></td> <td><?php echo esc_html($dup_tests['SRV']['MYSQL_VER']); ?></td> </tr> <tr> <td><?php printf("%s", esc_html__("MySQLi Support", 'duplicator')); ?></td> <td><?php echo esc_html($dup_tests['SRV']['MYSQLi']); ?></td> </tr> </table> <small> <?php esc_html_e("MySQL version 5.0+ or better is required and the PHP MySQLi extension (note the trailing 'i') is also required. Contact your server administrator and request that mysqli extension and MySQL Server 5.0+ be installed.", 'duplicator'); echo " <i><a href='http://php.net/manual/en/mysqli.installation.php' target='_blank'>[" . esc_html__('more info', 'duplicator') . "]</a></i>"; ?> </small> <hr> <table class="dup-sys-info-results"> <tr> <td><a href="https://www.php.net/manual/en/mysqli.real-escape-string.php" target="_blank">mysqli_real_escape_string</a></td> <td><?php echo esc_html($dup_tests['SRV']['MYSQL_ESC']); ?></td> </tr> </table> <small> <?php esc_html_e("The function mysqli_real_escape_string is not working properly. Please consult host support and ask them to switch to a different PHP version or configuration."); ?> </small> </div> </div> <!-- RESERVED FILES --> <div class='dup-sys-req'> <div class='dup-sys-title'> <a><?php esc_html_e('Reserved Files', 'duplicator'); ?></a> <div><?php echo esc_html($dup_tests['RES']['INSTALL']); ?></div> </div> <div class="dup-sys-info dup-info-box"> <?php if ($dup_tests['RES']['INSTALL'] == 'Pass') : ?> <?php esc_html_e("None of the reserved files where found from a previous install. This means you are clear to create a new package.", 'duplicator'); echo " [".esc_html($dup_intaller_files)."]"; ?> <?php else: $duplicator_nonce = wp_create_nonce('duplicator_cleanup_page'); ?> <form method="post" action="admin.php?page=duplicator-tools&tab=diagnostics§ion=info&action=installer&_wpnonce=<?php echo esc_js($duplicator_nonce); ?>"> <b><?php esc_html_e('WordPress Root Path:', 'duplicator'); ?></b> <?php echo esc_html(duplicator_get_abs_path()); ?><br/> <?php esc_html_e("A reserved file(s) was found in the WordPress root directory. Reserved file names include [{$dup_intaller_files}]. To archive your data correctly please remove any of these files from your WordPress root directory. Then try creating your package again.", 'duplicator'); ?> <br/><input type='submit' class='button button-small' value='<?php esc_attr_e('Remove Files Now', 'duplicator') ?>' style='font-size:10px; margin-top:5px;' /> </form> <?php endif; ?> </div> </div> </div> </div><br/> <?php endif; ?> <!-- ============================ FORM PACKAGE OPTIONS --> <div style="padding:5px 5px 2px 5px"> <?php include('s1.setup2.php'); ?> </div> <!-- CACHE PROTECTION: If the back-button is used from the scanner page then we need to refresh page in-case any filters where set while on the scanner page --> <form id="cache_detection"> <input type="hidden" id="cache_state" name="cache_state" value="" /> </form> <script> jQuery(document).ready(function ($) { Duplicator.Pack.checkPageCache = function () { var $state = $('#cache_state'); if ($state.val() == "") { $state.val("fresh-load"); } else { $state.val("cached"); <?php $redirect = admin_url('admin.php?page=duplicator&tab=new1'); $redirect_nonce_url = wp_nonce_url($redirect, 'new1-package'); echo "window.location.href = '{$redirect_nonce_url}'"; ?> } } //INIT Duplicator.Pack.checkPageCache(); //Toggle for system requirement detail links $('.dup-sys-title a').each(function () { $(this).attr('href', 'javascript:void(0)'); $(this).click({selector: '.dup-sys-info'}, Duplicator.Pack.ToggleSystemDetails); $(this).prepend("<span class='ui-icon ui-icon-triangle-1-e dup-toggle' />"); }); //Color code Pass/Fail/Warn items $('.dup-sys-title div').each(function () { console.log($(this).text()); var state = $(this).text().trim(); $(this).removeClass(); $(this).addClass((state == 'Pass') ? 'dup-sys-pass' : 'dup-sys-fail'); }); }); </script>PK ��3\k�fN main/index.phpnu �[��� <?php //silentPK ��3\X��� main/s3.build.phpnu �[��� <?php defined('ABSPATH') || defined('DUPXABSPATH') || exit; //Nonce Check if (!isset($_POST['dup_form_opts_nonce_field']) || !wp_verify_nonce(sanitize_text_field($_POST['dup_form_opts_nonce_field']), 'dup_form_opts')) { DUP_UI_Notice::redirect('admin.php?page=duplicator&tab=new1&_wpnonce='.wp_create_nonce('new1-package')); } require_once (DUPLICATOR_PLUGIN_PATH.'classes/package/duparchive/class.pack.archive.duparchive.php'); $retry_nonuce = wp_create_nonce('new1-package'); $zip_build_nonce = wp_create_nonce('duplicator_package_build'); $duparchive_build_nonce = wp_create_nonce('duplicator_duparchive_package_build'); $active_package_present = true; //Help support Duplicator $atext0 = "<a target='_blank' href='https://wordpress.org/support/plugin/duplicator/reviews/?filter=5'>"; $atext0 .= __('Help review the plugin', 'duplicator') . '!</a>'; //Get even more power & features with Duplicator Pro $atext1 = __('Want more power? Try', 'duplicator'); $atext1 .= " <a target='_blank' href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_build_more_power&utm_campaign=duplicator_pro'>"; $atext1 .= __('Duplicator Pro', 'duplicator').'</a>!'; if (DUP_Settings::Get('installer_name_mode') == DUP_Settings::INSTALLER_NAME_MODE_SIMPLE) { $txtInstallHelpMsg = __("When clicking the Installer download button, the 'Save as' dialog will default the name to 'installer.php'. " . "To improve the security and get more information, goto: Settings ❯ Packages Tab ❯ Installer Name option.", 'duplicator'); } else { $txtInstallHelpMsg = __("When clicking the Installer download button, the 'Save as' dialog will save the name as '[name]_[hash]_[date]_installer.php'. " . "This is the secure and recommended option. For more information goto: Settings ❯ Packages Tab ❯ Installer Name Option. To quickly copy the hashed " . "installer name, to your clipboard use the copy icon link.", 'duplicator'); } $rand_txt = array(); $rand_txt[0] = $atext0; ?> <style> a#dup-create-new {margin-left:-5px} div#dup-progress-area {text-align:center; max-width:800px; min-height:200px; border:1px solid silver; border-radius:3px; margin:25px auto 10px auto; padding:0px; box-shadow:0 8px 6px -6px #999;} div.dup-progress-title {font-size:22px;padding:5px 0 20px 0; font-weight:bold} div#dup-progress-area div.inner {padding:10px; line-height:22px} div#dup-progress-area h2.title {background-color:#efefef; margin:0px} div#dup-progress-area span.label {font-weight:bold} div#dup-msg-success {color:#18592A; padding:5px;} div.dup-no-mu {font-size:13px; margin-top:15px; color:maroon; line-height:18px} sup.dup-new {font-weight:normal; color:#b10202; font-size:12px} div.dup-msg-success-stats{color:#999;margin:5px 0; font-size:11px; line-height:13px} div.dup-msg-success-links {margin:20px 5px 5px 5px; font-size:13px;} div#dup-progress-area div.done-title {font-size:18px; font-weight:bold; margin:0px 0px 10px 0px} div#dup-progress-area div.dup-panel-title {background-color:#dfdfdf;} div.hdr-pack-complete {font-size:14px; color:green; font-weight:bold} div#dup-create-area-nolink, div#dup-create-area-link {float:right; font-weight:bold; margin:0; padding:0} div#dup-create-area-link {display:none; margin-left:-5px} div#dup-progress-area div.dup-panel-panel { border-top:1px solid silver} fieldset.download-area {border:2px dashed #b5b5b5; padding:20px 20px 20px 20px; border-radius:4px; margin:auto; width:500px } fieldset.download-area legend {font-weight:bold; font-size:18px; margin:auto; color:#000} button#dup-btn-installer, button#dup-btn-archive { line-height:28px; min-width:175px; height:38px !important; padding-top:3px !important; } a#dup-link-download-both {min-width:200px; padding:3px;} div.one-click-download {margin:20px 0 10px 0; font-size:16px; font-weight:bold} div.one-click-download i.fa-bolt{padding-right:5px} div.one-click-download i.fa-file-archive-o{padding-right:5px} div.dup-button-footer {text-align:right; margin:20px 10px 0px 0px} button.button {font-size:16px !important; height:30px !important; font-weight:bold; padding:0px 10px 5px 10px !important; min-width:150px } span.dup-btn-size {font-size:11px;font-weight:normal} p.get-pro {font-size:13px; color:#222; border-top:1px solid #eeeeee; padding:5px 0 0 0; margin:0; font-style:italic} div.dup-howto-exe {font-size:14px; font-weight:bold; margin:25px 0 40px 0;line-height:20px; color:#000; padding-top:10px;} div.dup-howto-exe-title {font-size:18px; margin:0 0 8px 0; color:#000} div.dup-howto-exe-title a {text-decoration:none; outline:none; box-shadow:none} div.dup-howto-exe small {font-weight:normal; display:block; margin-top:-2px; font-style:italic; font-size:12px; color:#444 } div.dup-howto-exe a {margin-top:8px; display:inline-block} div.dup-howto-exe-info {display:none; border:1px dotted #b5b5b5; padding:20px; margin:auto; width:500px; background-color:#F0F0F1; border-radius:4px;} div.dup-howto-exe-info a i {display:inline-block; margin:0 2px 0 2px} div.dup-howto-exe-area {display: flex; justify-content: center;} div.dup-howto-exe-txt {text-align: left; font-size:16px} div.dup-howto-exe-txt sup.modes {font-weight: normal; color:#999; font-style: italic;} div.dup-howto-exe-txt small {padding:4px 0 4px 0} span#dup-installer-name {display:inline-block; color:silver; font-style: italic;} span#dup-installer-name a {text-decoration: none} span#dup-installer-name-help-icon {display:none} /*HOST TIMEOUT */ div#dup-msg-error {color:maroon; padding:5px;} div.dup-box-title {text-align:left; background-color:#F6F6F6} div.dup-box-title:hover { background-color:#efefef} div.dup-box-panel {text-align:left} div.no-top {border-top:none} div.dup-box-panel b.opt-title {font-size:18px} div.dup-msg-error-area {overflow-y:scroll; padding:5px 15px 15px 15px; height:100px; width:95%; border:1px solid #EEEEEE; border-radius:2px; line-height:22px; text-align: left; background-color: #FFFFF3} div#dup-logs {text-align:center; margin:auto; padding:5px; width:350px;} div#dup-logs a {display:inline-block;} span.sub-data {display:inline-block; padding-left:20px} </style> <!-- ========================================= TOOL BAR:STEPS --> <table id="dup-toolbar"> <tr valign="top"> <td style="white-space:nowrap"> <div id="dup-wiz"> <div id="dup-wiz-steps"> <div class="completed-step"><a>1 <?php esc_html_e('Setup', 'duplicator'); ?></a></div> <div class="completed-step"><a>2 <?php esc_html_e('Scan', 'duplicator'); ?> </a></div> <div class="active-step"><a>3 <?php esc_html_e('Build', 'duplicator'); ?> </a></div> </div> <div id="dup-wiz-title" class="dup-guide-txt-color"> <i class="fab fa-wordpress"></i> <?php esc_html_e('Step 3: Build and download the package files.', 'duplicator'); ?> </div> </div> </td> <td style="padding-bottom:4px"> <span> <a id="dup-packages-btn" href="?page=duplicator" class="button <?php echo ($active_package_present ? 'no-display' :''); ?>"> <?php esc_html_e("Packages",'duplicator'); ?> </a> </span> <?php $package_url = admin_url('admin.php?page=duplicator&tab=new1'); $package_nonce_url = wp_nonce_url($package_url, 'new1-package'); ?> <a id="dup-create-new" onclick="return !jQuery(this).hasClass('disabled');" href="<?php echo $package_nonce_url;?>" class="button <?php echo ($active_package_present ? 'no-display' :''); ?>"> <?php esc_html_e("Create New", 'duplicator'); ?> </a> </td> </tr> </table> <hr class="dup-toolbar-line"> <form id="form-duplicator" method="post" action="?page=duplicator"> <?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field', false); ?> <!-- PROGRESS BAR --> <div id="dup-progress-bar-area"> <div class="dup-progress-title"><?php esc_html_e('Building Package', 'duplicator'); ?> <i class="fa fa-cog fa-spin"></i> <span id="dup-progress-percent">0%</span></div> <div id="dup-progress-bar"></div> <b><?php esc_html_e('Please Wait...', 'duplicator'); ?></b><br/><br/> <i><?php esc_html_e('Keep this window open and do not close during the build process.', 'duplicator'); ?></i><br/> <i><?php esc_html_e('This may take several minutes to complete.', 'duplicator'); ?></i><br/> </div> <div id="dup-progress-area" class="dup-panel" style="display:none"> <div class="dup-panel-title"><b style="font-size:22px"><?php esc_html_e('Build Status', 'duplicator'); ?></b></div> <div class="dup-panel-panel"> <!-- ========================= SUCCESS MESSAGE --> <div id="dup-msg-success" style="display:none"> <div class="hdr-pack-complete"> <i class="far fa-check-square fa-lg"></i> <?php esc_html_e('Package Build Completed', 'duplicator'); ?> </div> <div class="dup-msg-success-stats"> <b><?php esc_html_e('Build Time', 'duplicator'); ?>:</b> <span id="data-time"></span><br/> </div><br/> <!-- DOWNLOAD FILES --> <fieldset class="download-area"> <legend> <i class="fa fa-download"></i> <?php esc_html_e("Download Package Files", 'duplicator') ?> </legend> <button id="dup-btn-installer" class="button button-primary button-large" title="<?php esc_attr_e("Click to download installer file", 'duplicator') ?>"> <i class="fa fa-bolt fa-sm"></i> <?php esc_html_e("Installer", 'duplicator') ?> </button> <button id="dup-btn-archive" class="button button-primary button-large" title="<?php esc_attr_e("Click to download archive file", 'duplicator') ?>"> <i class="far fa-file-archive"></i> <?php esc_html_e("Archive", 'duplicator') ?> <span id="dup-btn-archive-size" class="dup-btn-size"></span> </button> <div class="one-click-download"> <a href="javascript:void(0)" id="dup-link-download-both" title="<?php esc_attr_e("Click to download both files", 'duplicator') ?>" class="button"> <i class="fa fa-bolt fa-sm"></i><i class="far fa-file-archive"></i> <?php esc_html_e("Download Both Files", 'duplicator') ?> </a> <sup> <i class="fas fa-question-circle fa-sm" style='font-size:11px' data-tooltip-title="<?php esc_attr_e("Download Both Files:", 'duplicator'); ?>" data-tooltip="<?php esc_attr_e('Clicking this button will open the installer and archive download prompts one after the other with one click verses ' . 'downloading each file separately with two clicks. On some browsers you may have to disable pop-up warnings on this domain for this to ' . 'work correctly.', 'duplicator'); ?>"> </i> </sup> </div> <div style="margin-top:20px; font-size:11px"> <span id="dup-click-to-copy-installer-name" class="link-style no-decoration" data-dup-copy-text="<?php echo esc_attr(DUP_Installer::DEFAULT_INSTALLER_FILE_NAME_WITHOUT_HASH); ?>"> <?php esc_html_e("[Copy Installer Name to Clipboard]", 'duplicator'); ?> <i class="far fa-copy"></i> </span><br/> <span id="dup-installer-name" data-installer-name=""> <a href="javascript:void(0)" onclick="Duplicator.Pack.ShowInstallerName()"> <?php esc_html_e("[Show Installer Name]", 'duplicator'); ?> </a> </span> <span id="dup-installer-name-help-icon"> <i class="fas fa-question-circle fa-sm" data-tooltip-title="<?php esc_attr_e("Installer Name:", 'duplicator'); ?>" data-tooltip="<?php echo $txtInstallHelpMsg ?>"> </i> </span> </div> </fieldset> <?php if (is_multisite()) { echo '<div class="dup-no-mu">'; echo '<i class="fa fa-exclamation-triangle" aria-hidden="true"></i> '; esc_html_e('Notice:Duplicator Lite does not officially support WordPress multisite.', 'duplicator'); echo "<br/>"; esc_html_e('We strongly recommend upgrading to ', 'duplicator'); echo " <i><a href='https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_is_mu_warn6&utm_campaign=duplicator_pro' target='_blank'>[" . esc_html__('Duplicator Pro', 'duplicator') . "]</a></i>."; echo '</div>'; } ?> <div class="dup-howto-exe"> <div class="dup-howto-exe-title" onclick="Duplicator.Pack.ToggleHelpInstall(this)"> <a href="javascript:void(0)"> <i class="far fa-plus-square"></i> <?php esc_html_e('How to install this package?', 'duplicator'); ?> </a> </div> <div class="dup-howto-exe-info"> <div class="dup-howto-exe-area"> <div class="dup-howto-exe-txt"> <!-- CLASSIC --> <i class="far fa-save fa-sm fa-fw"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_built_install_help1_bwording2&utm_campaign=duplicator_free#quick-040-q" target="_blank"> <?php esc_html_e('Install to Empty Directory ', 'duplicator'); ?> </a> <sup class="modes"> <i class="fas fa-external-link-alt fa-xs"></i> </sup> <br/> <small> <?php _e('Install to an empty directory like a new WordPress install does.', 'duplicator'); ?> </small><br/> <!-- OVERWRITE --> <i class="far fa-window-close fa-sm fa-fw"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_built_install_help2_bwording2&utm_campaign=duplicator_free#quick-043-q" target="_blank"> <?php esc_html_e('Overwrite Site', 'duplicator'); ?> </a> <sup class="modes"> <i class="fas fa-external-link-alt fa-xs"></i> </sup> <br/> <small><?php _e("Quickly overwrite an existing WordPress site in a few clicks.", 'duplicator');?></small> <br/> <!-- IMPORT --> <i class="fas fa-arrow-alt-circle-down fa-sm fa-fw"></i> <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_built_install_help3_bwording2&utm_campaign=duplicator_free#quick-045-q" target="_blank"> <?php esc_html_e('Import Archive and Overwrite Site', 'duplicator'); ?> </a> <sup class="modes"> <i class="fas fa-external-link-alt fa-xs"></i> </sup> <br/> <small><?php _e("Drag-n-drop or use a URL for super-fast installs (requires Pro*)", 'duplicator');?></small> </div> </div> </div> </div> <p class="get-pro"> <?php echo $rand_txt[array_rand($rand_txt, 1)]; ?> </p> </div> <!-- ========================= ERROR MESSAGE --> <div id="dup-msg-error" style="display:none; color:#000"> <div class="done-title"><i class="fa fa-chain-broken"></i> <?php esc_html_e('Host Build Interrupt', 'duplicator'); ?></div> <b><?php esc_html_e('This server cannot complete the build due to host setup constraints, see the error message for more details.', 'duplicator'); ?></b><br/> <i><?php esc_html_e("If the error details are not specific consider the options below by clicking each section.", 'duplicator'); ?></i> <br/><br/> <!-- OPTION 1:Try DupArchive Engine --> <div class="dup-box"> <div class="dup-box-title"> <i class="far fa-check-circle fa-sm fa-fw"></i> <?php esc_html_e('Option 1: DupArchive', 'duplicator'); ?> <div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div> </div> <div class="dup-box-panel" id="dup-pack-build-try1" style="display:none"> <?php esc_html_e('Enable the DupArchive format which is specific to Duplicator and designed to perform better on constrained budget hosts.', 'duplicator'); ?> <br/><br/> <div style="font-style:italic"> <?php esc_html_e('Note:DupArchive on Duplicator only supports sites up to 500MB. If your site is over 500MB then use a file filter on step 1 to get the size ' . 'below 500MB or try the other options mentioned below. Alternatively, you may want to consider', 'duplicator'); ?> <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=build_interrupt&utm_campaign=duplicator_pro" target="_blank"> Duplicator Pro, </a> <?php esc_html_e(' which is capable of migrating sites much larger than 500MB.'); ?> </div><br/> <b><i class="far fa-file-alt fa-sm"></i> <?php esc_html_e('Overview', 'duplicator'); ?></b><br/> <?php esc_html_e('Please follow these steps:', 'duplicator'); ?> <ol> <li><?php esc_html_e('On the scanner step check to make sure your package is under 500MB. If not see additional options below.', 'duplicator'); ?></li> <li> <?php esc_html_e('Go to Duplicator > Settings > Packages Tab > Archive Engine >', 'duplicator'); ?> <a href="admin.php?page=duplicator-settings&tab=package"><?php esc_html_e('Enable DupArchive', 'duplicator'); ?></a> </li> <li><?php esc_html_e('Build a new package using the new engine format.', 'duplicator'); ?></li> </ol> <small style="font-style:italic"> <?php esc_html_e('Note:The DupArchive engine will generate an archive.daf file. This file is very similar to a .zip except that it can only be extracted by the ' . 'installer.php file or the', 'duplicator'); ?> <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-052-q" target="_blank"><?php esc_html_e('commandline extraction tool'); ?></a>. </small> </div> </div> <!-- OPTION 2:TRY AGAIN --> <div class="dup-box no-top"> <div class="dup-box-title"> <i class="fas fa-filter fa-sm fa-fw"></i> <?php esc_html_e('Option 2: File Filters', 'duplicator'); ?> <div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div> </div> <div class="dup-box-panel" style="display:none"> <?php esc_html_e('The first pass for reading files on some budget hosts maybe slow and have conflicts with strict timeout settings setup by the hosting provider. ' . 'In these cases, it is recommended to retry the build by adding file filters to larger files/directories.', 'duplicator'); echo ' <br/><br/>'; esc_html_e('For example, you could filter out the "/wp-content/uploads/" folder to create the package then move the files from that directory over manually. ' . 'If this work-flow is not desired or does not work please check-out the other options below.', 'duplicator'); ?> <br/><br/> <div style="text-align:center; margin:10px 0 2px 0"> <input type="button" class="button-large button-primary" value="<?php esc_attr_e('Retry Build With Filters', 'duplicator'); ?>" onclick="window.history.back()" /> </div> <div style="color:#777; padding:15px 5px 5px 5px"> <b> <?php esc_html_e('Notice', 'duplicator'); ?></b><br/> <?php printf('<b><i class="fa fa-folder-o"></i> %s %s</b> <br/> %s', esc_html__('Build Folder:'), DUP_Settings::getSsdirTmpPath(), __("On some servers the build will continue to run in the background. To validate if a build is still running; open the 'tmp' folder above and see " ."if the archive file is growing in size or check the main packages screen to see if the package completed. If it is not then your server " ."has strict timeout constraints.", 'duplicator') ); ?> </div> </div> </div> <!-- OPTION 3:Two-Part Install --> <div class="dup-box no-top"> <div class="dup-box-title"> <i class="fas fa-random fa-sm fa-fw"></i> <?php esc_html_e('Option 3: Two-Part Install', 'duplicator'); ?> <div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div> </div> <div class="dup-box-panel" style="display:none"> <?php esc_html_e('A two-part install minimizes server load and can avoid I/O and CPU issues encountered on some budget hosts. With this procedure you simply build a ' .'\'database-only\' archive, manually move the website files, and then run the installer to complete the process.', 'duplicator'); ?><br/><br/> <b><i class="far fa-file-alt fa-sm"></i><?php esc_html_e(' Overview', 'duplicator'); ?></b><br/> <?php esc_html_e('Please follow these steps:', 'duplicator'); ?><br/> <ol> <li><?php esc_html_e('Click the button below to go back to Step 1.', 'duplicator'); ?></li> <li><?php esc_html_e('On Step 1 the "Archive Only the Database" checkbox will be auto checked.', 'duplicator'); ?></li> <li> <?php esc_html_e('Complete the package build and follow the ', 'duplicator'); ?> <?php printf('%s "<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_2partlink2&utm_campaign=build_issues#quick-060-q" target="faq">%s</a>".', '', esc_html__('Quick Start Two-Part Install Instructions', 'duplicator')); ?> </li> </ol> <div style="text-align:center; margin:10px"> <input type="checkbox" id="dup-two-part-check" onclick="Duplicator.Pack.ToggleTwoPart()"> <label for="dup-two-part-check"><?php esc_html_e('Yes. I have read the above overview and would like to continue!', 'duplicator'); ?></label><br/><br/> <button id="dup-two-part-btn" type="button" class="button-large button-primary" disabled="true" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=2&_wpnonce=<?php echo $retry_nonuce; ?>'"> <i class="fa fa-random"></i> <?php esc_html_e('Start Two-Part Install Process', 'duplicator'); ?> </button> </div><br/> </div> </div> <!-- OPTION 4:DIAGNOSE SERVER --> <div class="dup-box no-top"> <div class="dup-box-title"> <i class="fas fa-cog fa-sm fa-fw"></i> <?php esc_html_e('Option 4: Configure Server', 'duplicator'); ?> <div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div> </div> <div class="dup-box-panel" id="dup-pack-build-try3" style="display:none"> <!-- <b class="opt-title"><?php esc_html_e('OPTION 4:', 'duplicator'); ?></b><br/>--> <?php esc_html_e('This option is available on some hosts that allow for users to adjust server configurations. With this option you will be directed to an ' . 'FAQ page that will show various recommendations you can take to improve/unlock constraints set up on this server.', 'duplicator'); ?><br/><br/> <div style="text-align:center; margin:10px; font-size:16px; font-weight:bold"> <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_diagnosebtn&utm_campaign=build_issues#faq-trouble-100-q" target="_blank"> [<?php esc_html_e('Diagnose Server Setup', 'duplicator'); ?>] </a> </div> <b><?php esc_html_e('RUNTIME DETAILS', 'duplicator'); ?>:</b><br/> <div class="dup-msg-error-area"> <div id="dup-msg-error-response-time"> <span class="label"><?php esc_html_e("Allowed Runtime:", 'duplicator'); ?></span> <span class="data"></span> </div> <div id="dup-msg-error-response-php"> <span class="label"><?php esc_html_e("PHP Max Execution", 'duplicator'); ?></span><br/> <span class="data sub-data"> <span class="label"><?php esc_html_e("Time", 'duplicator'); ?>:</span> <?php $try_value = @ini_get('max_execution_time'); $try_update = set_time_limit(0); echo "$try_value <a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'> (default)</a>"; ?> <i class="fa fa-question-circle data-size-help" data-tooltip-title="<?php esc_attr_e("PHP Max Execution Time", 'duplicator'); ?>" data-tooltip="<?php esc_attr_e('This value is represented in seconds. A value of 0 means no timeout limit is set for PHP.', 'duplicator'); ?>"></i> </span><br/> <span class="data sub-data"> <span class="label"><?php esc_html_e("Mode", 'duplicator'); ?>:</span> <?php $try_update = $try_update ? 'is dynamic' :'value is fixed'; echo "{$try_update}"; ?> <i class="fa fa-question-circle data-size-help" data-tooltip-title="<?php esc_attr_e("PHP Max Execution Mode", 'duplicator'); ?>" data-tooltip="<?php esc_html_e('If the value is [dynamic] then 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. <br/><br/> If this value is larger than the [Allowed Runtime] above then ' .'the web server has been enabled with a timeout cap and is overriding the PHP max time setting.', 'duplicator'); ?>"></i> </span> </div> <div id="dup-msg-error-response-status"> <span class="label"><?php esc_html_e("Server Status:", 'duplicator'); ?></span> <span class="data"><?php esc_html_e("unavailable", 'duplicator'); ?></span> </div> </div> </div> </div> <br/><br/> <!-- ERROR DETAILS--> <div class="dup-box no-top"> <div class="dup-box-title" id="dup-pack-build-err-info" > <i class="fas fa-file-contract fa-fw fa-sm"></i> <?php esc_html_e('System Details', 'duplicator'); ?> <div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div> </div> <div class="dup-box-panel" style="display:none"> <span class="label"><?php esc_html_e("Error Message:", 'duplicator'); ?></span> <div class="dup-msg-error-area"> <div id="dup-msg-error-response-text"> <span class="data"><?php esc_html_e("Error status unavailable.", 'duplicator'); ?></span> </div> </div> <div id="dup-logs" style="color:maroon; font-size:16px"> <br/> <i class="fas fa-file-contract fa-fw "></i> <a href='javascript:void(0)' style="color:maroon" onclick='Duplicator.OpenLogWindow(true)'> <?php esc_html_e('See Package Log For Complete Details', 'duplicator'); ?> </a> </div> </div> </div> <br/><br/> </div> </div> </div> </form> <script> jQuery(document).ready(function ($) { Duplicator.Pack.DupArchiveFailureCount = 0; Duplicator.Pack.DupArchiveMaxRetries = 10; Duplicator.Pack.DupArchiveRetryDelayInMs = 8000; Duplicator.Pack.DupArchiveStartTime = new Date().getTime(); Duplicator.Pack.StatusFrequency = 8000; /* ---------------------------------------- * METHOD:Performs Ajax post to create a new package * Timeout (10000000 = 166 minutes) */ Duplicator.Pack.CreateZip = function () { var startTime; var data = {action:'duplicator_package_build', nonce:'<?php echo esc_js($zip_build_nonce); ?>'} var statusInterval = setInterval(Duplicator.Pack.GetActivePackageStatus, Duplicator.Pack.StatusFrequency); $.ajax({ type:"POST", cache:false, dataType:"text", url:ajaxurl, timeout:0, // no timeout data:data, beforeSend:function () { startTime = new Date().getTime(); }, complete:function () { Duplicator.Pack.PostTransferCleanup(statusInterval, startTime); }, success:function (respData, textStatus, xHr) { try { var data = Duplicator.parseJSON(respData); } catch(err) { console.error(err); console.error('JSON parse failed for response data:' + respData); $('#dup-progress-bar-area').hide(); $('#dup-progress-area, #dup-msg-error').show(200); var status = xHr.status + ' -' + data.statusText; var response = (xHr.responseText != undefined && xHr.responseText.trim().length > 1) ? xHr.responseText.trim() : 'No client side error - see package log file'; $('#dup-msg-error-response-status span.data').html(status) $('#dup-msg-error-response-text span.data').html(response); console.log(xHr); return false; } if ((data != null) && (typeof (data) != 'undefined') && data.status == 1) { Duplicator.Pack.WireDownloadLinks(data); } else { var message = (typeof (data.error) != 'undefined' && data.error.length) ? data.error :'Error processing package'; Duplicator.Pack.DupArchiveProcessingFailed(message); } }, error:function (xHr) { $('#dup-progress-bar-area').hide(); $('#dup-progress-area, #dup-msg-error').show(200); var status = xHr.status + ' -' + data.statusText; var response = (xHr.responseText != undefined && xHr.responseText.trim().length > 1) ? xHr.responseText.trim() : 'No client side error - see package log file'; $('#dup-msg-error-response-status span.data').html(status) $('#dup-msg-error-response-text span.data').html(response); console.log(xHr); } }); return false; } /* ---------------------------------------- * METHOD:Performs Ajax post to create a new DupArchive-based package */ Duplicator.Pack.CreateDupArchive = function () { console.log('Duplicator.Pack.CreateDupArchive'); var data = {action:'duplicator_duparchive_package_build', nonce:'<?php echo esc_js($duparchive_build_nonce); ?>'} var statusInterval = setInterval(Duplicator.Pack.GetActivePackageStatus, Duplicator.Pack.StatusFrequency); $.ajax({ type:"POST", timeout:0, // no timeout dataType:"text", url:ajaxurl, data:data, complete:function () { Duplicator.Pack.PostTransferCleanup(statusInterval, Duplicator.Pack.DupArchiveStartTime); }, success:function (respData, textStatus, xHr) { try { var data = Duplicator.parseJSON(respData); } catch(err) { console.log(err); console.log('JSON parse failed for response data:' + respData); console.log('DupArchive AJAX error!'); console.log("jqHr:"); console.log(xHr); console.log("textStatus:"); console.log(textStatus); Duplicator.Pack.HandleDupArchiveInterruption(xHr.responseText); return false; } console.log("CreateDupArchive:AJAX success. Data equals:"); console.log(data); // DATA FIELDS // archive_offset, archive_size, failures, file_index, is_done, timestamp if ((data != null) && (typeof (data) != 'undefined') && ((data.status == 1) || (data.status == 3) || (data.status == 4))) { Duplicator.Pack.DupArchiveFailureCount = 0; // Status = 1 means complete, 4 means more to process console.log("CreateDupArchive:Passed"); var criticalFailureText = Duplicator.Pack.GetFailureText(data.failures, true); if (data.failures.length > 0) { console.log("CreateDupArchive:There are failures present. (" + data.failures.length) + ")"; } if ((criticalFailureText === '') && (data.status != 3)) { console.log("CreateDupArchive:No critical failures"); if (data.status == 1) { // Don't stop for non-critical failures - just display those at the end TODO:put these in the log not popup console.log("CreateDupArchive:archive has completed"); if (data.failures.length > 0) { console.log(data.failures); var errorMessage = "CreateDupArchive:Problems during package creation. These may be non-critical so continue with install.\n------\n"; var len = data.failures.length; for (var j = 0; j < len; j++) { failure = data.failures[j]; errorMessage += failure + "\n"; } alert(errorMessage); } Duplicator.Pack.WireDownloadLinks(data); } else { // data.Status == 4 console.log('CreateDupArchive:Archive not completed so continue ping DAWS in 500'); setTimeout(Duplicator.Pack.CreateDupArchive, 500); } } else { console.log("CreateDupArchive:critical failures present"); // If we get a critical failure it means it's something we can't recover from so no purpose in retrying, just fail immediately. var errorString = 'Error Processing Step 1<br/>'; errorString += criticalFailureText; Duplicator.Pack.DupArchiveProcessingFailed(errorString); } } else { // data is null or Status is warn or fail var errorString = ''; if(data == null) { errorString = "Data returned from web service is null."; } else { var errorString = ''; if(data.failures.length > 0) { errorString += Duplicator.Pack.GetFailureText(data.failures, false); } } Duplicator.Pack.HandleDupArchiveInterruption(errorString); } }, error:function (xHr, textStatus) { console.log('DupArchive AJAX error!'); console.log("jqHr:"); console.log(xHr); console.log("textStatus:"); console.log(textStatus); Duplicator.Pack.HandleDupArchiveInterruption(xHr.responseText); } }); }; /* ---------------------------------------- * METHOD:Retrieves package status and updates UI with build percentage */ Duplicator.Pack.GetActivePackageStatus = function () { var data = {action:'DUP_CTRL_Package_getActivePackageStatus', nonce:'<?php echo wp_create_nonce('DUP_CTRL_Package_getActivePackageStatus'); ?>'} console.log('####Duplicator.Pack.GetActivePackageStatus'); $.ajax({ type:"POST", url:ajaxurl, dataType:"text", timeout:0, // no timeout data:data, success:function (respData, textStatus, xHr) { try { var data = Duplicator.parseJSON(respData); } catch(err) { console.error(err); console.error('JSON parse failed for response data:' + respData); console.log('Error retrieving build status'); console.log(xHr); return false; } if(data.report.status == 1) { $('#dup-progress-percent').html(data.payload.status + "%"); } else { console.log('Error retrieving build status'); console.log(data); } }, error:function (xHr) { console.log('Error retrieving build status'); console.log(xHr); } }); return false; } Duplicator.Pack.PostTransferCleanup = function(statusInterval, startTime) { clearInterval(statusInterval); endTime = new Date().getTime(); var millis = (endTime - startTime); var minutes = Math.floor(millis / 60000); var seconds = ((millis % 60000) / 1000).toFixed(0); var status = minutes + ":" + (seconds < 10 ? '0' :'') + seconds; $('#dup-msg-error-response-time span.data').html(status); }; Duplicator.Pack.WireDownloadLinks = function(data) { var pack = data.package; var archive_json = { filename:pack.Archive.File, url:"<?php echo DUP_Settings::getSsdirUrl(); ?>" + "/" + pack.Archive.File }; var installer_json = { id:pack.ID, hash:pack.Hash }; $('#dup-progress-bar-area').hide(); $('#dup-progress-area, #dup-msg-success').show(300); $('#dup-btn-archive-size').append(' (' + data.archiveSize + ')') $('#data-name-hash').text(pack.NameHash || 'error read'); $('#data-time').text(data.runtime || 'unable to read time'); $('#dup-create-new').removeClass('no-display'); $('#dup-packages-btn').removeClass('no-display'); //Wire Up Downloads $('#dup-btn-installer').click(function() { Duplicator.Pack.DownloadInstaller(installer_json); return false; }); $('#dup-btn-archive').click(function() { Duplicator.Pack.DownloadFile(archive_json); return false; }); $('#dup-link-download-both').on("click", function () { $('#dup-btn-installer').trigger('click'); setTimeout(function(){ $('#dup-btn-archive').trigger('click'); }, 700); return false; }); $('#dup-click-to-copy-installer-name').data('dup-copy-text', data.instDownloadName); $('#dup-installer-name').data('data-installer-name', data.instDownloadName); }; Duplicator.Pack.HandleDupArchiveInterruption = function (errorText) { Duplicator.Pack.DupArchiveFailureCount++; if (Duplicator.Pack.DupArchiveFailureCount <= Duplicator.Pack.DupArchiveMaxRetries) { console.log("Failure count:" + Duplicator.Pack.DupArchiveFailureCount); // / rsr todo don’t worry about this right now Duplicator.Pack.DupArchiveThrottleDelay = 9; // Equivalent of 'low' server throttling (ms) console.log('Relaunching in ' + Duplicator.Pack.DupArchiveRetryDelayInMs); setTimeout(Duplicator.Pack.CreateDupArchive, Duplicator.Pack.DupArchiveRetryDelayInMs); } else { console.log('Too many failures.' + errorText); // Processing problem Duplicator.Pack.DupArchiveProcessingFailed("Too many retries when building DupArchive package. " + errorText); } }; Duplicator.Pack.DupArchiveProcessingFailed = function (errorText) { $('#dup-progress-bar-area').hide(); $('#dup-progress-area, #dup-msg-error').show(200); $('#dup-msg-error-response-text span.data').html(errorText); $('#dup-pack-build-err-info').trigger('click'); }; Duplicator.Pack.GetFailureText = function (failures, onlyCritical) { var retVal = ''; if ((failures !== null) && (typeof failures !== 'undefined')) { var len = failures.length; for (var j = 0; j < len; j++) { failure = failures[j]; if (!onlyCritical || failure.isCritical) { retVal += failure.description; retVal += "<br/>"; } } } return retVal; }; Duplicator.Pack.ToggleTwoPart = function () { var $btn = $('#dup-two-part-btn'); if ($('#dup-two-part-check').is(':checked')) { $btn.removeAttr("disabled"); } else { $btn.attr("disabled", true); } }; Duplicator.Pack.ToggleHelpInstall = function (div) { var $div = $(div); var $icon = $div.find('i.far') var $info = $('div.dup-howto-exe-info'); if ($icon.hasClass('fa-plus-square')) { $icon.attr('class', 'far fa-minus-square'); $info.show(); } else { $icon.attr('class', 'far fa-plus-square'); $info.hide(); } }; Duplicator.Pack.ShowInstallerName = function () { var txt = $('#dup-installer-name').data('data-installer-name'); $('#dup-installer-name').html(txt); $('#dup-installer-name-help-icon').show(); }; //Page Init: Duplicator.UI.AnimateProgressBar('dup-progress-bar'); <?php if (DUP_Settings::Get('archive_build_mode') == DUP_Archive_Build_Mode::ZipArchive):?> Duplicator.Pack.CreateZip(); <?php else:?> Duplicator.Pack.CreateDupArchive(); <?php endif; ?> }); </script>PK ��3\f\~.<