Version Description
Download this release
Release Info
Developer | cory@lamle.org |
Plugin | Duplicator – WordPress Migration Plugin |
Version | 1.2.34 |
Comparing to | |
See all releases |
Code changes from version 1.2.32 to 1.2.34
- classes/class.db.php +201 -160
- classes/package/class.pack.archive.php +32 -18
- classes/package/class.pack.php +4 -0
- classes/utilities/class.u.php +27 -0
- define.php +81 -64
- duplicator.php +347 -347
- installer/build/classes/class.engine.php +14 -2
- installer/build/classes/class.server.php +181 -181
- installer/build/classes/utilities/class.u.php +12 -0
- installer/build/view.step4.php +273 -261
- lib/forceutf8/Encoding.php +353 -348
- readme.txt +2 -2
- views/help/gopro.php +236 -236
- views/packages/details/detail.php +382 -382
- views/packages/main/s2.scan3.php +51 -1
- views/packages/main/s3.build.php +386 -386
- views/settings/storage.php +35 -35
- views/tools/cleanup.php +0 -188
- views/tools/diagnostics.php +0 -471
- views/tools/diagnostics/inc.settings.php +5 -0
- views/tools/diagnostics/information.php +25 -25
- views/tools/diagnostics/logging.php +210 -207
- views/tools/diagnostics/main.php +75 -75
- views/tools/diagnostics/support.php +122 -122
- views/tools/logging.php +0 -208
- views/tools/support.php +0 -123
classes/class.db.php
CHANGED
@@ -1,161 +1,202 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Lightweight abstraction layer for common simple database routines
|
4 |
-
*
|
5 |
-
* Standard: PSR-2
|
6 |
-
* @link http://www.php-fig.org/psr/psr-2
|
7 |
-
*
|
8 |
-
* @package Duplicator
|
9 |
-
* @subpackage classes/utilities
|
10 |
-
* @copyright (c) 2017, Snapcreek LLC
|
11 |
-
* @since 1.1.32
|
12 |
-
*
|
13 |
-
*/
|
14 |
-
|
15 |
-
// Exit if accessed directly
|
16 |
-
if (!defined('DUPLICATOR_VERSION')) {
|
17 |
-
exit;
|
18 |
-
}
|
19 |
-
|
20 |
-
class DUP_DB extends wpdb
|
21 |
-
{
|
22 |
-
|
23 |
-
public static $remove_placeholder_escape_exists = null;
|
24 |
-
|
25 |
-
public static function init()
|
26 |
-
{
|
27 |
-
global $wpdb;
|
28 |
-
|
29 |
-
self::$remove_placeholder_escape_exists = method_exists($wpdb, 'remove_placeholder_escape');
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Get the requested MySQL system variable
|
34 |
-
*
|
35 |
-
* @param string $name The database variable name to lookup
|
36 |
-
*
|
37 |
-
* @return string the server variable to query for
|
38 |
-
*/
|
39 |
-
public static function getVariable($name)
|
40 |
-
{
|
41 |
-
global $wpdb;
|
42 |
-
if (strlen($name)) {
|
43 |
-
$row = $wpdb->get_row("SHOW VARIABLES LIKE '{$name}'", ARRAY_N);
|
44 |
-
return isset($row[1]) ? $row[1] : null;
|
45 |
-
} else {
|
46 |
-
return null;
|
47 |
-
}
|
48 |
-
}
|
49 |
-
|
50 |
-
/**
|
51 |
-
* Gets the MySQL database version number
|
52 |
-
*
|
53 |
-
* @param bool $full True: Gets the full version
|
54 |
-
* False: Gets only the numeric portion i.e. 5.5.6 or 10.1.2 (for MariaDB)
|
55 |
-
*
|
56 |
-
* @return false|string 0 on failure, version number on success
|
57 |
-
*/
|
58 |
-
public static function getVersion($full = false)
|
59 |
-
{
|
60 |
-
global $wpdb;
|
61 |
-
|
62 |
-
if ($full) {
|
63 |
-
$version = self::getVariable('version');
|
64 |
-
} else {
|
65 |
-
$version = preg_replace('/[^0-9.].*/', '', self::getVariable('version'));
|
66 |
-
}
|
67 |
-
|
68 |
-
//Fall-back for servers that have restricted SQL for SHOW statement
|
69 |
-
if (empty($version)) {
|
70 |
-
$version = $wpdb->db_version();
|
71 |
-
}
|
72 |
-
|
73 |
-
return empty($version) ? 0 : $version;
|
74 |
-
}
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
161 |
DUP_DB::init();
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Lightweight abstraction layer for common simple database routines
|
4 |
+
*
|
5 |
+
* Standard: PSR-2
|
6 |
+
* @link http://www.php-fig.org/psr/psr-2
|
7 |
+
*
|
8 |
+
* @package Duplicator
|
9 |
+
* @subpackage classes/utilities
|
10 |
+
* @copyright (c) 2017, Snapcreek LLC
|
11 |
+
* @since 1.1.32
|
12 |
+
*
|
13 |
+
*/
|
14 |
+
|
15 |
+
// Exit if accessed directly
|
16 |
+
if (!defined('DUPLICATOR_VERSION')) {
|
17 |
+
exit;
|
18 |
+
}
|
19 |
+
|
20 |
+
class DUP_DB extends wpdb
|
21 |
+
{
|
22 |
+
|
23 |
+
public static $remove_placeholder_escape_exists = null;
|
24 |
+
|
25 |
+
public static function init()
|
26 |
+
{
|
27 |
+
global $wpdb;
|
28 |
+
|
29 |
+
self::$remove_placeholder_escape_exists = method_exists($wpdb, 'remove_placeholder_escape');
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Get the requested MySQL system variable
|
34 |
+
*
|
35 |
+
* @param string $name The database variable name to lookup
|
36 |
+
*
|
37 |
+
* @return string the server variable to query for
|
38 |
+
*/
|
39 |
+
public static function getVariable($name)
|
40 |
+
{
|
41 |
+
global $wpdb;
|
42 |
+
if (strlen($name)) {
|
43 |
+
$row = $wpdb->get_row("SHOW VARIABLES LIKE '{$name}'", ARRAY_N);
|
44 |
+
return isset($row[1]) ? $row[1] : null;
|
45 |
+
} else {
|
46 |
+
return null;
|
47 |
+
}
|
48 |
+
}
|
49 |
+
|
50 |
+
/**
|
51 |
+
* Gets the MySQL database version number
|
52 |
+
*
|
53 |
+
* @param bool $full True: Gets the full version
|
54 |
+
* False: Gets only the numeric portion i.e. 5.5.6 or 10.1.2 (for MariaDB)
|
55 |
+
*
|
56 |
+
* @return false|string 0 on failure, version number on success
|
57 |
+
*/
|
58 |
+
public static function getVersion($full = false)
|
59 |
+
{
|
60 |
+
global $wpdb;
|
61 |
+
|
62 |
+
if ($full) {
|
63 |
+
$version = self::getVariable('version');
|
64 |
+
} else {
|
65 |
+
$version = preg_replace('/[^0-9.].*/', '', self::getVariable('version'));
|
66 |
+
}
|
67 |
+
|
68 |
+
//Fall-back for servers that have restricted SQL for SHOW statement
|
69 |
+
if (empty($version)) {
|
70 |
+
$version = $wpdb->db_version();
|
71 |
+
}
|
72 |
+
|
73 |
+
return empty($version) ? 0 : $version;
|
74 |
+
}
|
75 |
+
|
76 |
+
/**
|
77 |
+
* Try to return the mysqldump path on Windows servers
|
78 |
+
*
|
79 |
+
* @return boolean|string
|
80 |
+
*/
|
81 |
+
public static function getWindowsMySqlDumpRealPath() {
|
82 |
+
if(function_exists('php_ini_loaded_file'))
|
83 |
+
{
|
84 |
+
$get_php_ini_path = php_ini_loaded_file();
|
85 |
+
if(file_exists($get_php_ini_path))
|
86 |
+
{
|
87 |
+
$search = array(
|
88 |
+
dirname(dirname($get_php_ini_path)).'/mysql/bin/mysqldump.exe',
|
89 |
+
dirname(dirname(dirname($get_php_ini_path))).'/mysql/bin/mysqldump.exe',
|
90 |
+
dirname(dirname($get_php_ini_path)).'/mysql/bin/mysqldump',
|
91 |
+
dirname(dirname(dirname($get_php_ini_path))).'/mysql/bin/mysqldump',
|
92 |
+
);
|
93 |
+
|
94 |
+
foreach($search as $mysqldump)
|
95 |
+
{
|
96 |
+
if(file_exists($mysqldump))
|
97 |
+
{
|
98 |
+
return str_replace("\\","/",$mysqldump);
|
99 |
+
}
|
100 |
+
}
|
101 |
+
}
|
102 |
+
}
|
103 |
+
|
104 |
+
unset($search);
|
105 |
+
unset($get_php_ini_path);
|
106 |
+
|
107 |
+
return false;
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Returns the mysqldump path if the server is enabled to execute it otherwise false
|
112 |
+
*
|
113 |
+
* @return boolean|string
|
114 |
+
*/
|
115 |
+
public static function getMySqlDumpPath()
|
116 |
+
{
|
117 |
+
|
118 |
+
//Is shell_exec possible
|
119 |
+
if (!DUP_Util::hasShellExec()) {
|
120 |
+
return false;
|
121 |
+
}
|
122 |
+
|
123 |
+
$custom_mysqldump_path = DUP_Settings::Get('package_mysqldump_path');
|
124 |
+
$custom_mysqldump_path = (strlen($custom_mysqldump_path)) ? $custom_mysqldump_path : '';
|
125 |
+
|
126 |
+
//Common Windows Paths
|
127 |
+
if (DUP_Util::isWindows()) {
|
128 |
+
$paths = array(
|
129 |
+
$custom_mysqldump_path,
|
130 |
+
self::getWindowsMySqlDumpRealPath(),
|
131 |
+
'C:/xampp/mysql/bin/mysqldump.exe',
|
132 |
+
'C:/Program Files/xampp/mysql/bin/mysqldump',
|
133 |
+
'C:/Program Files/MySQL/MySQL Server 6.0/bin/mysqldump',
|
134 |
+
'C:/Program Files/MySQL/MySQL Server 5.5/bin/mysqldump',
|
135 |
+
'C:/Program Files/MySQL/MySQL Server 5.4/bin/mysqldump',
|
136 |
+
'C:/Program Files/MySQL/MySQL Server 5.1/bin/mysqldump',
|
137 |
+
'C:/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump',
|
138 |
+
);
|
139 |
+
|
140 |
+
//Common Linux Paths
|
141 |
+
} else {
|
142 |
+
$path1 = '';
|
143 |
+
$path2 = '';
|
144 |
+
$mysqldump = `which mysqldump`;
|
145 |
+
if (DUP_Util::isExecutable($mysqldump)) {
|
146 |
+
$path1 = (!empty($mysqldump)) ? $mysqldump : '';
|
147 |
+
}
|
148 |
+
|
149 |
+
$mysqldump = dirname(`which mysql`)."/mysqldump";
|
150 |
+
if (DUP_Util::isExecutable($mysqldump)) {
|
151 |
+
$path2 = (!empty($mysqldump)) ? $mysqldump : '';
|
152 |
+
}
|
153 |
+
|
154 |
+
$paths = array(
|
155 |
+
$custom_mysqldump_path,
|
156 |
+
$path1,
|
157 |
+
$path2,
|
158 |
+
'/usr/local/bin/mysqldump',
|
159 |
+
'/usr/local/mysql/bin/mysqldump',
|
160 |
+
'/usr/mysql/bin/mysqldump',
|
161 |
+
'/usr/bin/mysqldump',
|
162 |
+
'/opt/local/lib/mysql6/bin/mysqldump',
|
163 |
+
'/opt/local/lib/mysql5/bin/mysqldump',
|
164 |
+
'/opt/local/lib/mysql4/bin/mysqldump',
|
165 |
+
);
|
166 |
+
}
|
167 |
+
|
168 |
+
// Find the one which works
|
169 |
+
foreach ($paths as $path) {
|
170 |
+
if(file_exists($path)) {
|
171 |
+
if (DUP_Util::isExecutable($path))
|
172 |
+
return $path;
|
173 |
+
}
|
174 |
+
}
|
175 |
+
|
176 |
+
return false;
|
177 |
+
}
|
178 |
+
|
179 |
+
/**
|
180 |
+
* Returns an escaped SQL string
|
181 |
+
*
|
182 |
+
* @param string $sql The SQL to escape
|
183 |
+
* @param bool $removePlaceholderEscape Patch for how the default WP function works.
|
184 |
+
*
|
185 |
+
* @return boolean|string
|
186 |
+
* @also see: https://make.wordpress.org/core/2017/10/31/changed-behaviour-of-esc_sql-in-wordpress-4-8-3/
|
187 |
+
*/
|
188 |
+
public static function escSQL($sql, $removePlaceholderEscape = false)
|
189 |
+
{
|
190 |
+
global $wpdb;
|
191 |
+
|
192 |
+
$removePlaceholderEscape = $removePlaceholderEscape && self::$remove_placeholder_escape_exists;
|
193 |
+
|
194 |
+
if ($removePlaceholderEscape) {
|
195 |
+
return $wpdb->remove_placeholder_escape(@esc_sql($sql));
|
196 |
+
} else {
|
197 |
+
return @esc_sql($sql);
|
198 |
+
}
|
199 |
+
}
|
200 |
+
}
|
201 |
+
|
202 |
DUP_DB::init();
|
classes/package/class.pack.archive.php
CHANGED
@@ -32,10 +32,12 @@ class DUP_Archive
|
|
32 |
public $File;
|
33 |
public $Format;
|
34 |
public $PackDir;
|
35 |
-
public $Size
|
36 |
-
public $Dirs
|
37 |
-
public $Files
|
38 |
public $FilterInfo;
|
|
|
|
|
39 |
//PROTECTED
|
40 |
protected $Package;
|
41 |
private $tmpFilterDirsAll = array();
|
@@ -464,22 +466,34 @@ class DUP_Archive
|
|
464 |
// if (is_dir($fullPath) && (is_link($fullPath) == false))
|
465 |
if (is_dir($fullPath)) {
|
466 |
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
478 |
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
} else {
|
484 |
if ( ! (in_array(pathinfo($file, PATHINFO_EXTENSION), $this->FilterExtsAll)
|
485 |
|| in_array($fullPath, $this->FilterFilesAll))) {
|
32 |
public $File;
|
33 |
public $Format;
|
34 |
public $PackDir;
|
35 |
+
public $Size = 0;
|
36 |
+
public $Dirs = array();
|
37 |
+
public $Files = array();
|
38 |
public $FilterInfo;
|
39 |
+
public $RecursiveLinks = array();
|
40 |
+
|
41 |
//PROTECTED
|
42 |
protected $Package;
|
43 |
private $tmpFilterDirsAll = array();
|
466 |
// if (is_dir($fullPath) && (is_link($fullPath) == false))
|
467 |
if (is_dir($fullPath)) {
|
468 |
|
469 |
+
$add = true;
|
470 |
+
if(!is_link($fullPath)){
|
471 |
+
foreach ($this->tmpFilterDirsAll as $key => $val) {
|
472 |
+
$trimmedFilterDir = rtrim($val, '/');
|
473 |
+
if ($fullPath == $trimmedFilterDir || strpos($fullPath, $trimmedFilterDir . '/') !== false) {
|
474 |
+
$add = false;
|
475 |
+
unset($this->tmpFilterDirsAll[$key]);
|
476 |
+
break;
|
477 |
+
}
|
478 |
+
}
|
479 |
+
}else{
|
480 |
+
//Convert relative path of link to absolute path
|
481 |
+
chdir($fullPath);
|
482 |
+
$link_path = realpath(readlink($fullPath));
|
483 |
+
chdir(dirname(__FILE__));
|
484 |
+
|
485 |
+
$link_pos = strpos($fullPath,$link_path);
|
486 |
+
if($link_pos === 0 && (strlen($link_path) < strlen($fullPath))){
|
487 |
+
$add = false;
|
488 |
+
$this->RecursiveLinks[] = $fullPath;
|
489 |
+
$this->FilterDirsAll[] = $fullPath;
|
490 |
+
}
|
491 |
+
}
|
492 |
|
493 |
+
if ($add) {
|
494 |
+
$this->getFileLists($fullPath);
|
495 |
+
$this->Dirs[] = $fullPath;
|
496 |
+
}
|
497 |
} else {
|
498 |
if ( ! (in_array(pathinfo($file, PATHINFO_EXTENSION), $this->FilterExtsAll)
|
499 |
|| in_array($fullPath, $this->FilterFilesAll))) {
|
classes/package/class.pack.php
CHANGED
@@ -117,8 +117,12 @@ class DUP_Package
|
|
117 |
$report['ARC']['FilterFilesAll'] = $this->Archive->FilterFilesAll;
|
118 |
$report['ARC']['FilterExtsAll'] = $this->Archive->FilterExtsAll;
|
119 |
$report['ARC']['FilterInfo'] = $this->Archive->FilterInfo;
|
|
|
|
|
120 |
$report['ARC']['Status']['Size'] = ($this->Archive->Size > DUPLICATOR_SCAN_SIZE_DEFAULT) ? 'Warn' : 'Good';
|
121 |
$report['ARC']['Status']['Names'] = (count($this->Archive->FilterInfo->Files->Warning) + count($this->Archive->FilterInfo->Dirs->Warning)) ? 'Warn' : 'Good';
|
|
|
|
|
122 |
//$report['ARC']['Status']['Big'] = count($this->Archive->FilterInfo->Files->Size) ? 'Warn' : 'Good';
|
123 |
$report['ARC']['Dirs'] = $this->Archive->Dirs;
|
124 |
$report['ARC']['Files'] = $this->Archive->Files;
|
117 |
$report['ARC']['FilterFilesAll'] = $this->Archive->FilterFilesAll;
|
118 |
$report['ARC']['FilterExtsAll'] = $this->Archive->FilterExtsAll;
|
119 |
$report['ARC']['FilterInfo'] = $this->Archive->FilterInfo;
|
120 |
+
$report['ARC']['RecursiveLinks'] = $this->Archive->RecursiveLinks;
|
121 |
+
$report['ARC']['UnreadableItems'] = array_merge($this->Archive->FilterInfo->Files->Unreadable,$this->Archive->FilterInfo->Dirs->Unreadable);
|
122 |
$report['ARC']['Status']['Size'] = ($this->Archive->Size > DUPLICATOR_SCAN_SIZE_DEFAULT) ? 'Warn' : 'Good';
|
123 |
$report['ARC']['Status']['Names'] = (count($this->Archive->FilterInfo->Files->Warning) + count($this->Archive->FilterInfo->Dirs->Warning)) ? 'Warn' : 'Good';
|
124 |
+
$report['ARC']['Status']['UnreadableItems'] = !empty($this->Archive->RecursiveLinks) || !empty($report['ARC']['UnreadableItems'])? 'Warn' : 'Good';
|
125 |
+
|
126 |
//$report['ARC']['Status']['Big'] = count($this->Archive->FilterInfo->Files->Size) ? 'Warn' : 'Good';
|
127 |
$report['ARC']['Dirs'] = $this->Archive->Dirs;
|
128 |
$report['ARC']['Files'] = $this->Archive->Files;
|
classes/utilities/class.u.php
CHANGED
@@ -684,6 +684,33 @@ class DUP_Util
|
|
684 |
public static function escSanitizeTextField($string)
|
685 |
{
|
686 |
return esc_html(sanitize_text_field($string));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
687 |
}
|
688 |
}
|
689 |
DUP_Util::init();
|
684 |
public static function escSanitizeTextField($string)
|
685 |
{
|
686 |
return esc_html(sanitize_text_field($string));
|
687 |
+
}
|
688 |
+
|
689 |
+
/**
|
690 |
+
* Finds if its a valid executable or not
|
691 |
+
* @param type $exe A non zero length executable path to find if that is executable or not.
|
692 |
+
* @param type $expectedValue expected value for the result
|
693 |
+
* @return boolean
|
694 |
+
*/
|
695 |
+
public static function isExecutable($cmd)
|
696 |
+
{
|
697 |
+
if (strlen($cmd) < 1) return false;
|
698 |
+
|
699 |
+
if (@is_executable($cmd)){
|
700 |
+
return true;
|
701 |
+
}
|
702 |
+
|
703 |
+
$output = shell_exec($cmd);
|
704 |
+
if (!is_null($output)) {
|
705 |
+
return true;
|
706 |
+
}
|
707 |
+
|
708 |
+
$output = shell_exec($cmd . ' -?');
|
709 |
+
if (!is_null($output)) {
|
710 |
+
return true;
|
711 |
+
}
|
712 |
+
|
713 |
+
return false;
|
714 |
}
|
715 |
}
|
716 |
DUP_Util::init();
|
define.php
CHANGED
@@ -1,64 +1,81 @@
|
|
1 |
-
<?php
|
2 |
-
//Prevent directly browsing to the file
|
3 |
-
if (function_exists('plugin_dir_url'))
|
4 |
-
{
|
5 |
-
define('DUPLICATOR_VERSION', '1.2.
|
6 |
-
define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
|
7 |
-
define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
|
8 |
-
define('DUPLICATOR_SITE_URL', get_site_url());
|
9 |
-
|
10 |
-
/* Paths should ALWAYS read "/"
|
11 |
-
uni: /home/path/file.txt
|
12 |
-
win: D:/home/path/file.txt
|
13 |
-
SSDIR = SnapShot Directory */
|
14 |
-
if (!defined('ABSPATH')) {
|
15 |
-
define('ABSPATH', dirname(__FILE__));
|
16 |
-
}
|
17 |
-
|
18 |
-
//PATH CONSTANTS
|
19 |
-
if (! defined('DUPLICATOR_WPROOTPATH')) {
|
20 |
-
define('DUPLICATOR_WPROOTPATH', str_replace('\\', '/', ABSPATH));
|
21 |
-
}
|
22 |
-
define('DUPLICATOR_SSDIR_NAME', 'wp-snapshots');
|
23 |
-
define('DUPLICATOR_PLUGIN_PATH', str_replace("\\", "/", plugin_dir_path(__FILE__)));
|
24 |
-
define('DUPLICATOR_SSDIR_PATH', str_replace("\\", "/", DUPLICATOR_WPROOTPATH . DUPLICATOR_SSDIR_NAME));
|
25 |
-
define('DUPLICATOR_SSDIR_PATH_TMP', DUPLICATOR_SSDIR_PATH . '/tmp');
|
26 |
-
define('DUPLICATOR_SSDIR_URL', DUPLICATOR_SITE_URL . "/" . DUPLICATOR_SSDIR_NAME);
|
27 |
-
define('DUPLICATOR_INSTALL_PHP', 'installer.php');
|
28 |
-
define('DUPLICATOR_INSTALL_BAK', 'installer-backup.php');
|
29 |
-
define('DUPLICATOR_INSTALL_SQL', 'installer-data.sql');
|
30 |
-
define('DUPLICATOR_INSTALL_LOG', 'installer-log.txt');
|
31 |
-
define('DUPLICATOR_INSTALL_DB', 'database.sql');
|
32 |
-
|
33 |
-
|
34 |
-
//GENERAL CONSTRAINTS
|
35 |
-
define('DUPLICATOR_PHP_MAX_MEMORY', '2048M');
|
36 |
-
define('DUPLICATOR_DB_MAX_TIME', 5000);
|
37 |
-
define('DUPLICATOR_DB_EOF_MARKER', 'DUPLICATOR_MYSQLDUMP_EOF');
|
38 |
-
//SCANNER CONSTRAINTS
|
39 |
-
define('DUPLICATOR_SCAN_SIZE_DEFAULT', 157286400); //150MB
|
40 |
-
define('DUPLICATOR_SCAN_WARNFILESIZE', 3145728); //3MB
|
41 |
-
define('DUPLICATOR_SCAN_CACHESIZE', 1048576); //1MB
|
42 |
-
define('DUPLICATOR_SCAN_DB_ALL_ROWS', 500000); //500k per DB
|
43 |
-
define('DUPLICATOR_SCAN_DB_ALL_SIZE', 52428800); //50MB DB
|
44 |
-
define('DUPLICATOR_SCAN_DB_TBL_ROWS', 100000); //100K rows per table
|
45 |
-
define('DUPLICATOR_SCAN_DB_TBL_SIZE', 10485760); //10MB Table
|
46 |
-
define('DUPLICATOR_SCAN_TIMEOUT', 150); //Seconds
|
47 |
-
define('DUPLICATOR_SCAN_MIN_WP', '4.7.0');
|
48 |
-
|
49 |
-
$GLOBALS['DUPLICATOR_SERVER_LIST'] = array('Apache','LiteSpeed', 'Nginx', 'Lighttpd', 'IIS', 'WebServerX', 'uWSGI');
|
50 |
-
$GLOBALS['DUPLICATOR_OPTS_DELETE'] = array('duplicator_ui_view_state', 'duplicator_package_active', 'duplicator_settings');
|
51 |
-
|
52 |
-
/* Used to flush a response every N items.
|
53 |
-
* Note: This value will cause the Zip file to double in size durning the creation process only*/
|
54 |
-
define("DUPLICATOR_ZIP_FLUSH_TRIGGER", 1000);
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
//Prevent directly browsing to the file
|
3 |
+
if (function_exists('plugin_dir_url'))
|
4 |
+
{
|
5 |
+
define('DUPLICATOR_VERSION', '1.2.34');
|
6 |
+
define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
|
7 |
+
define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
|
8 |
+
define('DUPLICATOR_SITE_URL', get_site_url());
|
9 |
+
|
10 |
+
/* Paths should ALWAYS read "/"
|
11 |
+
uni: /home/path/file.txt
|
12 |
+
win: D:/home/path/file.txt
|
13 |
+
SSDIR = SnapShot Directory */
|
14 |
+
if (!defined('ABSPATH')) {
|
15 |
+
define('ABSPATH', dirname(__FILE__));
|
16 |
+
}
|
17 |
+
|
18 |
+
//PATH CONSTANTS
|
19 |
+
if (! defined('DUPLICATOR_WPROOTPATH')) {
|
20 |
+
define('DUPLICATOR_WPROOTPATH', str_replace('\\', '/', ABSPATH));
|
21 |
+
}
|
22 |
+
define('DUPLICATOR_SSDIR_NAME', 'wp-snapshots');
|
23 |
+
define('DUPLICATOR_PLUGIN_PATH', str_replace("\\", "/", plugin_dir_path(__FILE__)));
|
24 |
+
define('DUPLICATOR_SSDIR_PATH', str_replace("\\", "/", DUPLICATOR_WPROOTPATH . DUPLICATOR_SSDIR_NAME));
|
25 |
+
define('DUPLICATOR_SSDIR_PATH_TMP', DUPLICATOR_SSDIR_PATH . '/tmp');
|
26 |
+
define('DUPLICATOR_SSDIR_URL', DUPLICATOR_SITE_URL . "/" . DUPLICATOR_SSDIR_NAME);
|
27 |
+
define('DUPLICATOR_INSTALL_PHP', 'installer.php');
|
28 |
+
define('DUPLICATOR_INSTALL_BAK', 'installer-backup.php');
|
29 |
+
define('DUPLICATOR_INSTALL_SQL', 'installer-data.sql');
|
30 |
+
define('DUPLICATOR_INSTALL_LOG', 'installer-log.txt');
|
31 |
+
define('DUPLICATOR_INSTALL_DB', 'database.sql');
|
32 |
+
|
33 |
+
|
34 |
+
//GENERAL CONSTRAINTS
|
35 |
+
define('DUPLICATOR_PHP_MAX_MEMORY', '2048M');
|
36 |
+
define('DUPLICATOR_DB_MAX_TIME', 5000);
|
37 |
+
define('DUPLICATOR_DB_EOF_MARKER', 'DUPLICATOR_MYSQLDUMP_EOF');
|
38 |
+
//SCANNER CONSTRAINTS
|
39 |
+
define('DUPLICATOR_SCAN_SIZE_DEFAULT', 157286400); //150MB
|
40 |
+
define('DUPLICATOR_SCAN_WARNFILESIZE', 3145728); //3MB
|
41 |
+
define('DUPLICATOR_SCAN_CACHESIZE', 1048576); //1MB
|
42 |
+
define('DUPLICATOR_SCAN_DB_ALL_ROWS', 500000); //500k per DB
|
43 |
+
define('DUPLICATOR_SCAN_DB_ALL_SIZE', 52428800); //50MB DB
|
44 |
+
define('DUPLICATOR_SCAN_DB_TBL_ROWS', 100000); //100K rows per table
|
45 |
+
define('DUPLICATOR_SCAN_DB_TBL_SIZE', 10485760); //10MB Table
|
46 |
+
define('DUPLICATOR_SCAN_TIMEOUT', 150); //Seconds
|
47 |
+
define('DUPLICATOR_SCAN_MIN_WP', '4.7.0');
|
48 |
+
|
49 |
+
$GLOBALS['DUPLICATOR_SERVER_LIST'] = array('Apache','LiteSpeed', 'Nginx', 'Lighttpd', 'IIS', 'WebServerX', 'uWSGI');
|
50 |
+
$GLOBALS['DUPLICATOR_OPTS_DELETE'] = array('duplicator_ui_view_state', 'duplicator_package_active', 'duplicator_settings');
|
51 |
+
|
52 |
+
/* Used to flush a response every N items.
|
53 |
+
* Note: This value will cause the Zip file to double in size durning the creation process only*/
|
54 |
+
define("DUPLICATOR_ZIP_FLUSH_TRIGGER", 1000);
|
55 |
+
|
56 |
+
/* Let's setup few things to cover all PHP versions */
|
57 |
+
if(!defined('PHP_VERSION'))
|
58 |
+
{
|
59 |
+
define('PHP_VERSION', phpversion());
|
60 |
+
}
|
61 |
+
if (!defined('PHP_VERSION_ID')) {
|
62 |
+
$version = explode('.', PHP_VERSION);
|
63 |
+
define('PHP_VERSION_ID', (($version[0] * 10000) + ($version[1] * 100) + $version[2]));
|
64 |
+
}
|
65 |
+
if (PHP_VERSION_ID < 50207) {
|
66 |
+
if(!(isset($version))) $version = explode('.', PHP_VERSION);
|
67 |
+
if(!defined('PHP_MAJOR_VERSION')) define('PHP_MAJOR_VERSION', $version[0]);
|
68 |
+
if(!defined('PHP_MINOR_VERSION')) define('PHP_MINOR_VERSION', $version[1]);
|
69 |
+
if(!defined('PHP_RELEASE_VERSION')) define('PHP_RELEASE_VERSION', $version[2]);
|
70 |
+
|
71 |
+
}
|
72 |
+
|
73 |
+
} else {
|
74 |
+
error_reporting(0);
|
75 |
+
$port = (!empty($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] != "off") ? "https://" : "http://";
|
76 |
+
$url = $port . $_SERVER["HTTP_HOST"];
|
77 |
+
header("HTTP/1.1 404 Not Found", true, 404);
|
78 |
+
header("Status: 404 Not Found");
|
79 |
+
exit();
|
80 |
+
}
|
81 |
+
?>
|
duplicator.php
CHANGED
@@ -1,348 +1,348 @@
|
|
1 |
-
<?php
|
2 |
-
/** ===============================================================================
|
3 |
-
Plugin Name: Duplicator
|
4 |
-
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
-
Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
|
6 |
-
Version: 1.2.
|
7 |
-
Author: Snap Creek
|
8 |
-
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
-
Text Domain: duplicator
|
10 |
-
License: GPLv2 or later
|
11 |
-
|
12 |
-
Copyright 2011-2017 SnapCreek LLC
|
13 |
-
|
14 |
-
This program is free software; you can redistribute it and/or modify
|
15 |
-
it under the terms of the GNU General Public License, version 2, as
|
16 |
-
published by the Free Software Foundation.
|
17 |
-
|
18 |
-
This program is distributed in the hope that it will be useful,
|
19 |
-
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
-
GNU General Public License for more details.
|
22 |
-
|
23 |
-
You should have received a copy of the GNU General Public License
|
24 |
-
along with this program; if not, write to the Free Software
|
25 |
-
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
-
|
27 |
-
SOURCE CONTRIBUTORS:
|
28 |
-
David Coveney of Interconnect IT Ltd
|
29 |
-
https://github.com/interconnectit/Search-Replace-DB/
|
30 |
-
================================================================================ */
|
31 |
-
|
32 |
-
require_once("define.php");
|
33 |
-
|
34 |
-
if (is_admin() == true)
|
35 |
-
{
|
36 |
-
//Classes
|
37 |
-
require_once 'classes/class.logging.php';
|
38 |
-
require_once 'classes/class.settings.php';
|
39 |
-
require_once 'classes/utilities/class.u.php';
|
40 |
-
require_once 'classes/class.db.php';
|
41 |
-
require_once 'classes/class.server.php';
|
42 |
-
require_once 'classes/ui/class.ui.viewstate.php';
|
43 |
-
require_once 'classes/ui/class.ui.notice.php';
|
44 |
-
require_once 'classes/package/class.pack.php';
|
45 |
-
require_once 'views/packages/screen.php';
|
46 |
-
|
47 |
-
//Controllers
|
48 |
-
require_once 'ctrls/ctrl.package.php';
|
49 |
-
require_once 'ctrls/ctrl.tools.php';
|
50 |
-
require_once 'ctrls/ctrl.ui.php';
|
51 |
-
|
52 |
-
/** ========================================================
|
53 |
-
* ACTIVATE/DEACTIVE/UPDATE HOOKS
|
54 |
-
* ===================================================== */
|
55 |
-
register_activation_hook(__FILE__, 'duplicator_activate');
|
56 |
-
register_deactivation_hook(__FILE__, 'duplicator_deactivate');
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Hooked into `register_activation_hook`. Routines used to activate the plugin
|
60 |
-
*
|
61 |
-
* @access global
|
62 |
-
* @return null
|
63 |
-
*/
|
64 |
-
function duplicator_activate()
|
65 |
-
{
|
66 |
-
global $wpdb;
|
67 |
-
|
68 |
-
//Only update database on version update
|
69 |
-
if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin"))
|
70 |
-
{
|
71 |
-
$table_name = $wpdb->prefix . "duplicator_packages";
|
72 |
-
|
73 |
-
//PRIMARY KEY must have 2 spaces before for dbDelta to work
|
74 |
-
//see: https://codex.wordpress.org/Creating_Tables_with_Plugins
|
75 |
-
$sql = "CREATE TABLE `{$table_name}` (
|
76 |
-
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
77 |
-
name VARCHAR(250) NOT NULL,
|
78 |
-
hash VARCHAR(50) NOT NULL,
|
79 |
-
status INT(11) NOT NULL,
|
80 |
-
created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
81 |
-
owner VARCHAR(60) NOT NULL,
|
82 |
-
package MEDIUMBLOB NOT NULL,
|
83 |
-
PRIMARY KEY (id),
|
84 |
-
KEY hash (hash))";
|
85 |
-
|
86 |
-
require_once(DUPLICATOR_WPROOTPATH . 'wp-admin/includes/upgrade.php');
|
87 |
-
@dbDelta($sql);
|
88 |
-
}
|
89 |
-
|
90 |
-
//WordPress Options Hooks
|
91 |
-
update_option('duplicator_version_plugin', DUPLICATOR_VERSION);
|
92 |
-
|
93 |
-
//Setup All Directories
|
94 |
-
DUP_Util::initSnapshotDirectory();
|
95 |
-
}
|
96 |
-
|
97 |
-
/**
|
98 |
-
* Hooked into `plugins_loaded`. Routines used to update the plugin
|
99 |
-
*
|
100 |
-
* @access global
|
101 |
-
* @return null
|
102 |
-
*/
|
103 |
-
function duplicator_update()
|
104 |
-
{
|
105 |
-
if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin")) {
|
106 |
-
duplicator_activate();
|
107 |
-
}
|
108 |
-
load_plugin_textdomain( 'duplicator' );
|
109 |
-
}
|
110 |
-
|
111 |
-
/**
|
112 |
-
* Hooked into `register_deactivation_hook`. Routines used to deactivae the plugin
|
113 |
-
* For uninstall see uninstall.php Wordpress by default will call the uninstall.php file
|
114 |
-
*
|
115 |
-
* @access global
|
116 |
-
* @return null
|
117 |
-
*/
|
118 |
-
function duplicator_deactivate()
|
119 |
-
{
|
120 |
-
//Logic has been added to uninstall.php
|
121 |
-
}
|
122 |
-
|
123 |
-
/** ========================================================
|
124 |
-
* ACTION HOOKS
|
125 |
-
* ===================================================== */
|
126 |
-
add_action('plugins_loaded', 'duplicator_update');
|
127 |
-
add_action('plugins_loaded', 'duplicator_wpfront_integrate');
|
128 |
-
add_action('admin_init', 'duplicator_init');
|
129 |
-
add_action('admin_menu', 'duplicator_menu');
|
130 |
-
add_action('admin_notices', array('DUP_UI_Notice', 'showReservedFilesNotice'));
|
131 |
-
|
132 |
-
//CTRL ACTIONS
|
133 |
-
add_action('wp_ajax_duplicator_package_scan', 'duplicator_package_scan');
|
134 |
-
add_action('wp_ajax_duplicator_package_build', 'duplicator_package_build');
|
135 |
-
add_action('wp_ajax_duplicator_package_delete', 'duplicator_package_delete');
|
136 |
-
$GLOBALS['CTRLS_DUP_CTRL_UI'] = new DUP_CTRL_UI();
|
137 |
-
$GLOBALS['CTRLS_DUP_CTRL_Tools'] = new DUP_CTRL_Tools();
|
138 |
-
$GLOBALS['CTRLS_DUP_CTRL_Package'] = new DUP_CTRL_Package();
|
139 |
-
|
140 |
-
/**
|
141 |
-
* User role editor integration
|
142 |
-
*
|
143 |
-
* @access global
|
144 |
-
* @return null
|
145 |
-
*/
|
146 |
-
function duplicator_wpfront_integrate()
|
147 |
-
{
|
148 |
-
if (DUP_Settings::Get('wpfront_integrate')) {
|
149 |
-
do_action('wpfront_user_role_editor_duplicator_init', array('export', 'manage_options', 'read'));
|
150 |
-
}
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Hooked into `admin_init`. Init routines for all admin pages
|
155 |
-
*
|
156 |
-
* @access global
|
157 |
-
* @return null
|
158 |
-
*/
|
159 |
-
function duplicator_init()
|
160 |
-
{
|
161 |
-
/* CSS */
|
162 |
-
wp_register_style('dup-jquery-ui', DUPLICATOR_PLUGIN_URL . 'assets/css/jquery-ui.css', null, "1.11.2");
|
163 |
-
wp_register_style('dup-font-awesome', DUPLICATOR_PLUGIN_URL . 'assets/css/font-awesome.min.css', null, '4.7.0');
|
164 |
-
wp_register_style('dup-plugin-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, DUPLICATOR_VERSION);
|
165 |
-
wp_register_style('dup-jquery-qtip',DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.css', null, '2.2.1');
|
166 |
-
/* JS */
|
167 |
-
wp_register_script('dup-handlebars', DUPLICATOR_PLUGIN_URL . 'assets/js/handlebars.min.js', array('jquery'), '4.0.10');
|
168 |
-
wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
|
169 |
-
wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
|
170 |
-
}
|
171 |
-
|
172 |
-
/**
|
173 |
-
* Redirects the clicked menu item to the correct location
|
174 |
-
*
|
175 |
-
* @access global
|
176 |
-
* @return null
|
177 |
-
*/
|
178 |
-
function duplicator_get_menu()
|
179 |
-
{
|
180 |
-
$current_page = isset($_REQUEST['page']) ? esc_html($_REQUEST['page']) : 'duplicator';
|
181 |
-
switch ($current_page)
|
182 |
-
{
|
183 |
-
case 'duplicator': include('views/packages/controller.php'); break;
|
184 |
-
case 'duplicator-settings': include('views/settings/controller.php'); break;
|
185 |
-
case 'duplicator-tools': include('views/tools/controller.php'); break;
|
186 |
-
case 'duplicator-debug': include('debug/main.php'); break;
|
187 |
-
case 'duplicator-gopro': include('views/help/gopro.php'); break;
|
188 |
-
}
|
189 |
-
}
|
190 |
-
|
191 |
-
/**
|
192 |
-
* Hooked into `admin_menu`. Loads all of the wp left nav admin menus for Duplicator
|
193 |
-
*
|
194 |
-
* @access global
|
195 |
-
* @return null
|
196 |
-
*/
|
197 |
-
function duplicator_menu()
|
198 |
-
{
|
199 |
-
$wpfront_caps_translator = 'wpfront_user_role_editor_duplicator_translate_capability';
|
200 |
-
$icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyMy4yNXB4IiBoZWlnaHQ9IjIyLjM3NXB4IiB2aWV3Qm94PSIwIDAgMjMuMjUgMjIuMzc1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyMy4yNSAyMi4zNzUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiM5Q0ExQTYiIGQ9Ik0xOC4wMTEsMS4xODhjLTEuOTk1LDAtMy42MTUsMS42MTgtMy42MTUsMy42MTRjMCwwLjA4NSwwLjAwOCwwLjE2NywwLjAxNiwwLjI1TDcuNzMzLDguMTg0QzcuMDg0LDcuNTY1LDYuMjA4LDcuMTgyLDUuMjQsNy4xODJjLTEuOTk2LDAtMy42MTUsMS42MTktMy42MTUsMy42MTRjMCwxLjk5NiwxLjYxOSwzLjYxMywzLjYxNSwzLjYxM2MwLjYyOSwwLDEuMjIyLTAuMTYyLDEuNzM3LTAuNDQ1bDIuODksMi40MzhjLTAuMTI2LDAuMzY4LTAuMTk4LDAuNzYzLTAuMTk4LDEuMTczYzAsMS45OTUsMS42MTgsMy42MTMsMy42MTQsMy42MTNjMS45OTUsMCwzLjYxNS0xLjYxOCwzLjYxNS0zLjYxM2MwLTEuOTk3LTEuNjItMy42MTQtMy42MTUtMy42MTRjLTAuNjMsMC0xLjIyMiwwLjE2Mi0xLjczNywwLjQ0M2wtMi44OS0yLjQzNWMwLjEyNi0wLjM2OCwwLjE5OC0wLjc2MywwLjE5OC0xLjE3M2MwLTAuMDg0LTAuMDA4LTAuMTY2LTAuMDEzLTAuMjVsNi42NzYtMy4xMzNjMC42NDgsMC42MTksMS41MjUsMS4wMDIsMi40OTUsMS4wMDJjMS45OTQsMCwzLjYxMy0xLjYxNywzLjYxMy0zLjYxM0MyMS42MjUsMi44MDYsMjAuMDA2LDEuMTg4LDE4LjAxMSwxLjE4OHoiLz48L3N2Zz4=';
|
201 |
-
|
202 |
-
//Main Menu
|
203 |
-
$perms = 'export';
|
204 |
-
$perms = apply_filters($wpfront_caps_translator, $perms);
|
205 |
-
$main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', $icon_svg);
|
206 |
-
//$main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', plugins_url('duplicator/assets/img/logo-menu.svg'));
|
207 |
-
|
208 |
-
$perms = 'export';
|
209 |
-
$perms = apply_filters($wpfront_caps_translator, $perms);
|
210 |
-
$lang_txt = __('Packages', 'duplicator');
|
211 |
-
$page_packages = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator', 'duplicator_get_menu');
|
212 |
-
$GLOBALS['DUP_PRO_Package_Screen'] = new DUP_Package_Screen($page_packages);
|
213 |
-
|
214 |
-
$perms = 'manage_options';
|
215 |
-
$perms = apply_filters($wpfront_caps_translator, $perms);
|
216 |
-
$lang_txt = __('Tools', 'duplicator');
|
217 |
-
$page_tools = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-tools', 'duplicator_get_menu');
|
218 |
-
|
219 |
-
$perms = 'manage_options';
|
220 |
-
$perms = apply_filters($wpfront_caps_translator, $perms);
|
221 |
-
$lang_txt = __('Settings', 'duplicator');
|
222 |
-
$page_settings = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-settings', 'duplicator_get_menu');
|
223 |
-
|
224 |
-
$perms = 'manage_options';
|
225 |
-
$lang_txt = __('Go Pro!', 'duplicator');
|
226 |
-
$go_pro_link = '<span style="color:#f18500">' . $lang_txt . '</span>';
|
227 |
-
$perms = apply_filters($wpfront_caps_translator, $perms);
|
228 |
-
$page_gopro = add_submenu_page('duplicator', $go_pro_link, $go_pro_link, $perms, 'duplicator-gopro', 'duplicator_get_menu');
|
229 |
-
|
230 |
-
$package_debug = DUP_Settings::Get('package_debug');
|
231 |
-
if ($package_debug != null && $package_debug == true)
|
232 |
-
{
|
233 |
-
$perms = 'manage_options';
|
234 |
-
$perms = apply_filters($wpfront_caps_translator, $perms);
|
235 |
-
$lang_txt = __('Debug', 'duplicator');
|
236 |
-
$page_debug = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-debug', 'duplicator_get_menu');
|
237 |
-
add_action('admin_print_scripts-' . $page_debug, 'duplicator_scripts');
|
238 |
-
add_action('admin_print_styles-' . $page_debug, 'duplicator_styles');
|
239 |
-
}
|
240 |
-
|
241 |
-
//Apply Scripts
|
242 |
-
add_action('admin_print_scripts-' . $page_packages, 'duplicator_scripts');
|
243 |
-
add_action('admin_print_scripts-' . $page_settings, 'duplicator_scripts');
|
244 |
-
add_action('admin_print_scripts-' . $page_tools, 'duplicator_scripts');
|
245 |
-
add_action('admin_print_scripts-' . $page_gopro, 'duplicator_scripts');
|
246 |
-
|
247 |
-
//Apply Styles
|
248 |
-
add_action('admin_print_styles-' . $page_packages, 'duplicator_styles');
|
249 |
-
add_action('admin_print_styles-' . $page_settings, 'duplicator_styles');
|
250 |
-
add_action('admin_print_styles-' . $page_tools, 'duplicator_styles');
|
251 |
-
add_action('admin_print_styles-' . $page_gopro, 'duplicator_styles');
|
252 |
-
|
253 |
-
}
|
254 |
-
|
255 |
-
/**
|
256 |
-
* Loads all required javascript libs/source for DupPro
|
257 |
-
*
|
258 |
-
* @access global
|
259 |
-
* @return null
|
260 |
-
*/
|
261 |
-
function duplicator_scripts()
|
262 |
-
{
|
263 |
-
wp_enqueue_script('jquery');
|
264 |
-
wp_enqueue_script('jquery-ui-core');
|
265 |
-
wp_enqueue_script('jquery-ui-progressbar');
|
266 |
-
wp_enqueue_script('dup-parsley');
|
267 |
-
wp_enqueue_script('dup-jquery-qtip');
|
268 |
-
|
269 |
-
}
|
270 |
-
|
271 |
-
/**
|
272 |
-
* Loads all CSS style libs/source for DupPro
|
273 |
-
*
|
274 |
-
* @access global
|
275 |
-
* @return null
|
276 |
-
*/
|
277 |
-
function duplicator_styles()
|
278 |
-
{
|
279 |
-
wp_enqueue_style('dup-jquery-ui');
|
280 |
-
wp_enqueue_style('dup-font-awesome');
|
281 |
-
wp_enqueue_style('dup-plugin-style');
|
282 |
-
wp_enqueue_style('dup-jquery-qtip');
|
283 |
-
}
|
284 |
-
|
285 |
-
|
286 |
-
/** ========================================================
|
287 |
-
* FILTERS
|
288 |
-
* ===================================================== */
|
289 |
-
add_filter('plugin_action_links', 'duplicator_manage_link', 10, 2);
|
290 |
-
add_filter('plugin_row_meta', 'duplicator_meta_links', 10, 2);
|
291 |
-
|
292 |
-
/**
|
293 |
-
* Adds the manage link in the plugins list
|
294 |
-
*
|
295 |
-
* @access global
|
296 |
-
* @return string The manage link in the plugins list
|
297 |
-
*/
|
298 |
-
function duplicator_manage_link($links, $file)
|
299 |
-
{
|
300 |
-
static $this_plugin;
|
301 |
-
if (!$this_plugin)
|
302 |
-
$this_plugin = plugin_basename(__FILE__);
|
303 |
-
|
304 |
-
if ($file == $this_plugin) {
|
305 |
-
$settings_link = '<a href="admin.php?page=duplicator">' . __("Manage", 'duplicator') . '</a>';
|
306 |
-
array_unshift($links, $settings_link);
|
307 |
-
}
|
308 |
-
return $links;
|
309 |
-
}
|
310 |
-
|
311 |
-
/**
|
312 |
-
* Adds links to the plugins manager page
|
313 |
-
*
|
314 |
-
* @access global
|
315 |
-
* @return string The meta help link data for the plugins manager
|
316 |
-
*/
|
317 |
-
function duplicator_meta_links($links, $file)
|
318 |
-
{
|
319 |
-
$plugin = plugin_basename(__FILE__);
|
320 |
-
// create link
|
321 |
-
if ($file == $plugin) {
|
322 |
-
$links[] = '<a href="admin.php?page=duplicator-gopro" title="' . __('Get Help', 'duplicator') . '" style="">' . __('Go Pro', 'duplicator') . '</a>';
|
323 |
-
return $links;
|
324 |
-
}
|
325 |
-
return $links;
|
326 |
-
}
|
327 |
-
|
328 |
-
|
329 |
-
/** ========================================================
|
330 |
-
* GENERAL
|
331 |
-
* ===================================================== */
|
332 |
-
|
333 |
-
/**
|
334 |
-
* Used for installer files to redirect if accessed directly
|
335 |
-
*
|
336 |
-
* @access global
|
337 |
-
* @return null
|
338 |
-
*/
|
339 |
-
function duplicator_secure_check()
|
340 |
-
{
|
341 |
-
$baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
|
342 |
-
header("HTTP/1.1 301 Moved Permanently");
|
343 |
-
header("Location: $baseURL");
|
344 |
-
exit;
|
345 |
-
}
|
346 |
-
|
347 |
-
}
|
348 |
?>
|
1 |
+
<?php
|
2 |
+
/** ===============================================================================
|
3 |
+
Plugin Name: Duplicator
|
4 |
+
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
+
Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
|
6 |
+
Version: 1.2.34
|
7 |
+
Author: Snap Creek
|
8 |
+
Author URI: http://www.snapcreek.com/duplicator/
|
9 |
+
Text Domain: duplicator
|
10 |
+
License: GPLv2 or later
|
11 |
+
|
12 |
+
Copyright 2011-2017 SnapCreek LLC
|
13 |
+
|
14 |
+
This program is free software; you can redistribute it and/or modify
|
15 |
+
it under the terms of the GNU General Public License, version 2, as
|
16 |
+
published by the Free Software Foundation.
|
17 |
+
|
18 |
+
This program is distributed in the hope that it will be useful,
|
19 |
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
20 |
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
21 |
+
GNU General Public License for more details.
|
22 |
+
|
23 |
+
You should have received a copy of the GNU General Public License
|
24 |
+
along with this program; if not, write to the Free Software
|
25 |
+
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
26 |
+
|
27 |
+
SOURCE CONTRIBUTORS:
|
28 |
+
David Coveney of Interconnect IT Ltd
|
29 |
+
https://github.com/interconnectit/Search-Replace-DB/
|
30 |
+
================================================================================ */
|
31 |
+
|
32 |
+
require_once("define.php");
|
33 |
+
|
34 |
+
if (is_admin() == true)
|
35 |
+
{
|
36 |
+
//Classes
|
37 |
+
require_once 'classes/class.logging.php';
|
38 |
+
require_once 'classes/class.settings.php';
|
39 |
+
require_once 'classes/utilities/class.u.php';
|
40 |
+
require_once 'classes/class.db.php';
|
41 |
+
require_once 'classes/class.server.php';
|
42 |
+
require_once 'classes/ui/class.ui.viewstate.php';
|
43 |
+
require_once 'classes/ui/class.ui.notice.php';
|
44 |
+
require_once 'classes/package/class.pack.php';
|
45 |
+
require_once 'views/packages/screen.php';
|
46 |
+
|
47 |
+
//Controllers
|
48 |
+
require_once 'ctrls/ctrl.package.php';
|
49 |
+
require_once 'ctrls/ctrl.tools.php';
|
50 |
+
require_once 'ctrls/ctrl.ui.php';
|
51 |
+
|
52 |
+
/** ========================================================
|
53 |
+
* ACTIVATE/DEACTIVE/UPDATE HOOKS
|
54 |
+
* ===================================================== */
|
55 |
+
register_activation_hook(__FILE__, 'duplicator_activate');
|
56 |
+
register_deactivation_hook(__FILE__, 'duplicator_deactivate');
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Hooked into `register_activation_hook`. Routines used to activate the plugin
|
60 |
+
*
|
61 |
+
* @access global
|
62 |
+
* @return null
|
63 |
+
*/
|
64 |
+
function duplicator_activate()
|
65 |
+
{
|
66 |
+
global $wpdb;
|
67 |
+
|
68 |
+
//Only update database on version update
|
69 |
+
if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin"))
|
70 |
+
{
|
71 |
+
$table_name = $wpdb->prefix . "duplicator_packages";
|
72 |
+
|
73 |
+
//PRIMARY KEY must have 2 spaces before for dbDelta to work
|
74 |
+
//see: https://codex.wordpress.org/Creating_Tables_with_Plugins
|
75 |
+
$sql = "CREATE TABLE `{$table_name}` (
|
76 |
+
id BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT,
|
77 |
+
name VARCHAR(250) NOT NULL,
|
78 |
+
hash VARCHAR(50) NOT NULL,
|
79 |
+
status INT(11) NOT NULL,
|
80 |
+
created DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
|
81 |
+
owner VARCHAR(60) NOT NULL,
|
82 |
+
package MEDIUMBLOB NOT NULL,
|
83 |
+
PRIMARY KEY (id),
|
84 |
+
KEY hash (hash))";
|
85 |
+
|
86 |
+
require_once(DUPLICATOR_WPROOTPATH . 'wp-admin/includes/upgrade.php');
|
87 |
+
@dbDelta($sql);
|
88 |
+
}
|
89 |
+
|
90 |
+
//WordPress Options Hooks
|
91 |
+
update_option('duplicator_version_plugin', DUPLICATOR_VERSION);
|
92 |
+
|
93 |
+
//Setup All Directories
|
94 |
+
DUP_Util::initSnapshotDirectory();
|
95 |
+
}
|
96 |
+
|
97 |
+
/**
|
98 |
+
* Hooked into `plugins_loaded`. Routines used to update the plugin
|
99 |
+
*
|
100 |
+
* @access global
|
101 |
+
* @return null
|
102 |
+
*/
|
103 |
+
function duplicator_update()
|
104 |
+
{
|
105 |
+
if (DUPLICATOR_VERSION != get_option("duplicator_version_plugin")) {
|
106 |
+
duplicator_activate();
|
107 |
+
}
|
108 |
+
load_plugin_textdomain( 'duplicator' );
|
109 |
+
}
|
110 |
+
|
111 |
+
/**
|
112 |
+
* Hooked into `register_deactivation_hook`. Routines used to deactivae the plugin
|
113 |
+
* For uninstall see uninstall.php Wordpress by default will call the uninstall.php file
|
114 |
+
*
|
115 |
+
* @access global
|
116 |
+
* @return null
|
117 |
+
*/
|
118 |
+
function duplicator_deactivate()
|
119 |
+
{
|
120 |
+
//Logic has been added to uninstall.php
|
121 |
+
}
|
122 |
+
|
123 |
+
/** ========================================================
|
124 |
+
* ACTION HOOKS
|
125 |
+
* ===================================================== */
|
126 |
+
add_action('plugins_loaded', 'duplicator_update');
|
127 |
+
add_action('plugins_loaded', 'duplicator_wpfront_integrate');
|
128 |
+
add_action('admin_init', 'duplicator_init');
|
129 |
+
add_action('admin_menu', 'duplicator_menu');
|
130 |
+
add_action('admin_notices', array('DUP_UI_Notice', 'showReservedFilesNotice'));
|
131 |
+
|
132 |
+
//CTRL ACTIONS
|
133 |
+
add_action('wp_ajax_duplicator_package_scan', 'duplicator_package_scan');
|
134 |
+
add_action('wp_ajax_duplicator_package_build', 'duplicator_package_build');
|
135 |
+
add_action('wp_ajax_duplicator_package_delete', 'duplicator_package_delete');
|
136 |
+
$GLOBALS['CTRLS_DUP_CTRL_UI'] = new DUP_CTRL_UI();
|
137 |
+
$GLOBALS['CTRLS_DUP_CTRL_Tools'] = new DUP_CTRL_Tools();
|
138 |
+
$GLOBALS['CTRLS_DUP_CTRL_Package'] = new DUP_CTRL_Package();
|
139 |
+
|
140 |
+
/**
|
141 |
+
* User role editor integration
|
142 |
+
*
|
143 |
+
* @access global
|
144 |
+
* @return null
|
145 |
+
*/
|
146 |
+
function duplicator_wpfront_integrate()
|
147 |
+
{
|
148 |
+
if (DUP_Settings::Get('wpfront_integrate')) {
|
149 |
+
do_action('wpfront_user_role_editor_duplicator_init', array('export', 'manage_options', 'read'));
|
150 |
+
}
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Hooked into `admin_init`. Init routines for all admin pages
|
155 |
+
*
|
156 |
+
* @access global
|
157 |
+
* @return null
|
158 |
+
*/
|
159 |
+
function duplicator_init()
|
160 |
+
{
|
161 |
+
/* CSS */
|
162 |
+
wp_register_style('dup-jquery-ui', DUPLICATOR_PLUGIN_URL . 'assets/css/jquery-ui.css', null, "1.11.2");
|
163 |
+
wp_register_style('dup-font-awesome', DUPLICATOR_PLUGIN_URL . 'assets/css/font-awesome.min.css', null, '4.7.0');
|
164 |
+
wp_register_style('dup-plugin-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, DUPLICATOR_VERSION);
|
165 |
+
wp_register_style('dup-jquery-qtip',DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.css', null, '2.2.1');
|
166 |
+
/* JS */
|
167 |
+
wp_register_script('dup-handlebars', DUPLICATOR_PLUGIN_URL . 'assets/js/handlebars.min.js', array('jquery'), '4.0.10');
|
168 |
+
wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
|
169 |
+
wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
|
170 |
+
}
|
171 |
+
|
172 |
+
/**
|
173 |
+
* Redirects the clicked menu item to the correct location
|
174 |
+
*
|
175 |
+
* @access global
|
176 |
+
* @return null
|
177 |
+
*/
|
178 |
+
function duplicator_get_menu()
|
179 |
+
{
|
180 |
+
$current_page = isset($_REQUEST['page']) ? esc_html($_REQUEST['page']) : 'duplicator';
|
181 |
+
switch ($current_page)
|
182 |
+
{
|
183 |
+
case 'duplicator': include('views/packages/controller.php'); break;
|
184 |
+
case 'duplicator-settings': include('views/settings/controller.php'); break;
|
185 |
+
case 'duplicator-tools': include('views/tools/controller.php'); break;
|
186 |
+
case 'duplicator-debug': include('debug/main.php'); break;
|
187 |
+
case 'duplicator-gopro': include('views/help/gopro.php'); break;
|
188 |
+
}
|
189 |
+
}
|
190 |
+
|
191 |
+
/**
|
192 |
+
* Hooked into `admin_menu`. Loads all of the wp left nav admin menus for Duplicator
|
193 |
+
*
|
194 |
+
* @access global
|
195 |
+
* @return null
|
196 |
+
*/
|
197 |
+
function duplicator_menu()
|
198 |
+
{
|
199 |
+
$wpfront_caps_translator = 'wpfront_user_role_editor_duplicator_translate_capability';
|
200 |
+
$icon_svg = 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPjxzdmcgdmVyc2lvbj0iMS4xIiBpZD0iQXJ0d29yayIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayIgeD0iMHB4IiB5PSIwcHgiIHdpZHRoPSIyMy4yNXB4IiBoZWlnaHQ9IjIyLjM3NXB4IiB2aWV3Qm94PSIwIDAgMjMuMjUgMjIuMzc1IiBlbmFibGUtYmFja2dyb3VuZD0ibmV3IDAgMCAyMy4yNSAyMi4zNzUiIHhtbDpzcGFjZT0icHJlc2VydmUiPjxwYXRoIGZpbGw9IiM5Q0ExQTYiIGQ9Ik0xOC4wMTEsMS4xODhjLTEuOTk1LDAtMy42MTUsMS42MTgtMy42MTUsMy42MTRjMCwwLjA4NSwwLjAwOCwwLjE2NywwLjAxNiwwLjI1TDcuNzMzLDguMTg0QzcuMDg0LDcuNTY1LDYuMjA4LDcuMTgyLDUuMjQsNy4xODJjLTEuOTk2LDAtMy42MTUsMS42MTktMy42MTUsMy42MTRjMCwxLjk5NiwxLjYxOSwzLjYxMywzLjYxNSwzLjYxM2MwLjYyOSwwLDEuMjIyLTAuMTYyLDEuNzM3LTAuNDQ1bDIuODksMi40MzhjLTAuMTI2LDAuMzY4LTAuMTk4LDAuNzYzLTAuMTk4LDEuMTczYzAsMS45OTUsMS42MTgsMy42MTMsMy42MTQsMy42MTNjMS45OTUsMCwzLjYxNS0xLjYxOCwzLjYxNS0zLjYxM2MwLTEuOTk3LTEuNjItMy42MTQtMy42MTUtMy42MTRjLTAuNjMsMC0xLjIyMiwwLjE2Mi0xLjczNywwLjQ0M2wtMi44OS0yLjQzNWMwLjEyNi0wLjM2OCwwLjE5OC0wLjc2MywwLjE5OC0xLjE3M2MwLTAuMDg0LTAuMDA4LTAuMTY2LTAuMDEzLTAuMjVsNi42NzYtMy4xMzNjMC42NDgsMC42MTksMS41MjUsMS4wMDIsMi40OTUsMS4wMDJjMS45OTQsMCwzLjYxMy0xLjYxNywzLjYxMy0zLjYxM0MyMS42MjUsMi44MDYsMjAuMDA2LDEuMTg4LDE4LjAxMSwxLjE4OHoiLz48L3N2Zz4=';
|
201 |
+
|
202 |
+
//Main Menu
|
203 |
+
$perms = 'export';
|
204 |
+
$perms = apply_filters($wpfront_caps_translator, $perms);
|
205 |
+
$main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', $icon_svg);
|
206 |
+
//$main_menu = add_menu_page('Duplicator Plugin', 'Duplicator', $perms, 'duplicator', 'duplicator_get_menu', plugins_url('duplicator/assets/img/logo-menu.svg'));
|
207 |
+
|
208 |
+
$perms = 'export';
|
209 |
+
$perms = apply_filters($wpfront_caps_translator, $perms);
|
210 |
+
$lang_txt = __('Packages', 'duplicator');
|
211 |
+
$page_packages = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator', 'duplicator_get_menu');
|
212 |
+
$GLOBALS['DUP_PRO_Package_Screen'] = new DUP_Package_Screen($page_packages);
|
213 |
+
|
214 |
+
$perms = 'manage_options';
|
215 |
+
$perms = apply_filters($wpfront_caps_translator, $perms);
|
216 |
+
$lang_txt = __('Tools', 'duplicator');
|
217 |
+
$page_tools = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-tools', 'duplicator_get_menu');
|
218 |
+
|
219 |
+
$perms = 'manage_options';
|
220 |
+
$perms = apply_filters($wpfront_caps_translator, $perms);
|
221 |
+
$lang_txt = __('Settings', 'duplicator');
|
222 |
+
$page_settings = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-settings', 'duplicator_get_menu');
|
223 |
+
|
224 |
+
$perms = 'manage_options';
|
225 |
+
$lang_txt = __('Go Pro!', 'duplicator');
|
226 |
+
$go_pro_link = '<span style="color:#f18500">' . $lang_txt . '</span>';
|
227 |
+
$perms = apply_filters($wpfront_caps_translator, $perms);
|
228 |
+
$page_gopro = add_submenu_page('duplicator', $go_pro_link, $go_pro_link, $perms, 'duplicator-gopro', 'duplicator_get_menu');
|
229 |
+
|
230 |
+
$package_debug = DUP_Settings::Get('package_debug');
|
231 |
+
if ($package_debug != null && $package_debug == true)
|
232 |
+
{
|
233 |
+
$perms = 'manage_options';
|
234 |
+
$perms = apply_filters($wpfront_caps_translator, $perms);
|
235 |
+
$lang_txt = __('Debug', 'duplicator');
|
236 |
+
$page_debug = add_submenu_page('duplicator', $lang_txt, $lang_txt, $perms, 'duplicator-debug', 'duplicator_get_menu');
|
237 |
+
add_action('admin_print_scripts-' . $page_debug, 'duplicator_scripts');
|
238 |
+
add_action('admin_print_styles-' . $page_debug, 'duplicator_styles');
|
239 |
+
}
|
240 |
+
|
241 |
+
//Apply Scripts
|
242 |
+
add_action('admin_print_scripts-' . $page_packages, 'duplicator_scripts');
|
243 |
+
add_action('admin_print_scripts-' . $page_settings, 'duplicator_scripts');
|
244 |
+
add_action('admin_print_scripts-' . $page_tools, 'duplicator_scripts');
|
245 |
+
add_action('admin_print_scripts-' . $page_gopro, 'duplicator_scripts');
|
246 |
+
|
247 |
+
//Apply Styles
|
248 |
+
add_action('admin_print_styles-' . $page_packages, 'duplicator_styles');
|
249 |
+
add_action('admin_print_styles-' . $page_settings, 'duplicator_styles');
|
250 |
+
add_action('admin_print_styles-' . $page_tools, 'duplicator_styles');
|
251 |
+
add_action('admin_print_styles-' . $page_gopro, 'duplicator_styles');
|
252 |
+
|
253 |
+
}
|
254 |
+
|
255 |
+
/**
|
256 |
+
* Loads all required javascript libs/source for DupPro
|
257 |
+
*
|
258 |
+
* @access global
|
259 |
+
* @return null
|
260 |
+
*/
|
261 |
+
function duplicator_scripts()
|
262 |
+
{
|
263 |
+
wp_enqueue_script('jquery');
|
264 |
+
wp_enqueue_script('jquery-ui-core');
|
265 |
+
wp_enqueue_script('jquery-ui-progressbar');
|
266 |
+
wp_enqueue_script('dup-parsley');
|
267 |
+
wp_enqueue_script('dup-jquery-qtip');
|
268 |
+
|
269 |
+
}
|
270 |
+
|
271 |
+
/**
|
272 |
+
* Loads all CSS style libs/source for DupPro
|
273 |
+
*
|
274 |
+
* @access global
|
275 |
+
* @return null
|
276 |
+
*/
|
277 |
+
function duplicator_styles()
|
278 |
+
{
|
279 |
+
wp_enqueue_style('dup-jquery-ui');
|
280 |
+
wp_enqueue_style('dup-font-awesome');
|
281 |
+
wp_enqueue_style('dup-plugin-style');
|
282 |
+
wp_enqueue_style('dup-jquery-qtip');
|
283 |
+
}
|
284 |
+
|
285 |
+
|
286 |
+
/** ========================================================
|
287 |
+
* FILTERS
|
288 |
+
* ===================================================== */
|
289 |
+
add_filter('plugin_action_links', 'duplicator_manage_link', 10, 2);
|
290 |
+
add_filter('plugin_row_meta', 'duplicator_meta_links', 10, 2);
|
291 |
+
|
292 |
+
/**
|
293 |
+
* Adds the manage link in the plugins list
|
294 |
+
*
|
295 |
+
* @access global
|
296 |
+
* @return string The manage link in the plugins list
|
297 |
+
*/
|
298 |
+
function duplicator_manage_link($links, $file)
|
299 |
+
{
|
300 |
+
static $this_plugin;
|
301 |
+
if (!$this_plugin)
|
302 |
+
$this_plugin = plugin_basename(__FILE__);
|
303 |
+
|
304 |
+
if ($file == $this_plugin) {
|
305 |
+
$settings_link = '<a href="admin.php?page=duplicator">' . __("Manage", 'duplicator') . '</a>';
|
306 |
+
array_unshift($links, $settings_link);
|
307 |
+
}
|
308 |
+
return $links;
|
309 |
+
}
|
310 |
+
|
311 |
+
/**
|
312 |
+
* Adds links to the plugins manager page
|
313 |
+
*
|
314 |
+
* @access global
|
315 |
+
* @return string The meta help link data for the plugins manager
|
316 |
+
*/
|
317 |
+
function duplicator_meta_links($links, $file)
|
318 |
+
{
|
319 |
+
$plugin = plugin_basename(__FILE__);
|
320 |
+
// create link
|
321 |
+
if ($file == $plugin) {
|
322 |
+
$links[] = '<a href="admin.php?page=duplicator-gopro" title="' . __('Get Help', 'duplicator') . '" style="">' . __('Go Pro', 'duplicator') . '</a>';
|
323 |
+
return $links;
|
324 |
+
}
|
325 |
+
return $links;
|
326 |
+
}
|
327 |
+
|
328 |
+
|
329 |
+
/** ========================================================
|
330 |
+
* GENERAL
|
331 |
+
* ===================================================== */
|
332 |
+
|
333 |
+
/**
|
334 |
+
* Used for installer files to redirect if accessed directly
|
335 |
+
*
|
336 |
+
* @access global
|
337 |
+
* @return null
|
338 |
+
*/
|
339 |
+
function duplicator_secure_check()
|
340 |
+
{
|
341 |
+
$baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
|
342 |
+
header("HTTP/1.1 301 Moved Permanently");
|
343 |
+
header("Location: $baseURL");
|
344 |
+
exit;
|
345 |
+
}
|
346 |
+
|
347 |
+
}
|
348 |
?>
|
installer/build/classes/class.engine.php
CHANGED
@@ -146,8 +146,20 @@ class DUPX_UpdateEngine
|
|
146 |
'err_all' => 0
|
147 |
);
|
148 |
|
149 |
-
|
150 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
$profile_start = DUPX_U::getMicrotime();
|
152 |
if (is_array($tables) && !empty($tables)) {
|
153 |
|
146 |
'err_all' => 0
|
147 |
);
|
148 |
|
149 |
+
// Let's use anonymous function after PHP5.3.0 - is faster than create_function()
|
150 |
+
// create_function() is removed from PHP 7.2
|
151 |
+
if(DUPX_U::isVersion('5.3.0')) {
|
152 |
+
// Use "try catch" to avoid PHP notice or error below PHP5.3.0
|
153 |
+
try {
|
154 |
+
$walk_function = function () use (&$str) {
|
155 |
+
$str = "`$str`";
|
156 |
+
};
|
157 |
+
}
|
158 |
+
catch (Exception $exc) {}
|
159 |
+
} else {
|
160 |
+
$walk_function = create_function('&$str', '$str = "`$str`";');
|
161 |
+
}
|
162 |
+
|
163 |
$profile_start = DUPX_U::getMicrotime();
|
164 |
if (is_array($tables) && !empty($tables)) {
|
165 |
|
installer/build/classes/class.server.php
CHANGED
@@ -1,182 +1,182 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
/**
|
4 |
-
* Lightweight abstraction layer for common simple server based routines
|
5 |
-
*
|
6 |
-
* Standard: PSR-2
|
7 |
-
* @link http://www.php-fig.org/psr/psr-2 Full Documentation
|
8 |
-
*
|
9 |
-
* @package SC\DUPX\Server
|
10 |
-
*
|
11 |
-
*/
|
12 |
-
class DUPX_Server
|
13 |
-
{
|
14 |
-
/**
|
15 |
-
* Returns true if safe mode is enabled
|
16 |
-
*/
|
17 |
-
public static $php_safe_mode_on = false;
|
18 |
-
|
19 |
-
/**
|
20 |
-
* The servers current PHP version
|
21 |
-
*/
|
22 |
-
public static $php_version = 0;
|
23 |
-
|
24 |
-
/**
|
25 |
-
* The minimum PHP version the installer will support
|
26 |
-
*/
|
27 |
-
public static $php_version_min = "5.2.7";
|
28 |
-
|
29 |
-
/**
|
30 |
-
* Is the current servers version of PHP safe to use with the installer
|
31 |
-
*/
|
32 |
-
public static $php_version_safe = false;
|
33 |
-
|
34 |
-
|
35 |
-
/**
|
36 |
-
* Is PHP 5.3 or better running
|
37 |
-
*/
|
38 |
-
public static $php_version_53_plus;
|
39 |
-
|
40 |
-
/**
|
41 |
-
* Used to init the static properties
|
42 |
-
*/
|
43 |
-
public static function init()
|
44 |
-
{
|
45 |
-
self::$php_safe_mode_on = in_array(strtolower(@ini_get('safe_mode')), array('on', 'yes', 'true', 1, "1"));
|
46 |
-
self::$php_version = phpversion();
|
47 |
-
self::$php_version_safe = (
|
48 |
-
self::$php_version_53_plus =
|
49 |
-
}
|
50 |
-
|
51 |
-
/**
|
52 |
-
* Is the directory provided writable by PHP
|
53 |
-
*
|
54 |
-
* @param string $path A physical directory path
|
55 |
-
*
|
56 |
-
* @return bool Returns true if PHP can write to the path provided
|
57 |
-
*/
|
58 |
-
public static function isDirWritable($path)
|
59 |
-
{
|
60 |
-
if (!@is_writeable($path)) return false;
|
61 |
-
|
62 |
-
if (is_dir($path)) {
|
63 |
-
if ($dh = @opendir($path)) {
|
64 |
-
closedir($dh);
|
65 |
-
} else {
|
66 |
-
return false;
|
67 |
-
}
|
68 |
-
}
|
69 |
-
return true;
|
70 |
-
}
|
71 |
-
|
72 |
-
/**
|
73 |
-
* Can this server process in shell_exec mode
|
74 |
-
*
|
75 |
-
* @return bool Returns true is the server can run shell_exec commands
|
76 |
-
*/
|
77 |
-
public static function hasShellExec()
|
78 |
-
{
|
79 |
-
if (array_intersect(array('shell_exec', 'escapeshellarg', 'escapeshellcmd', 'extension_loaded'), array_map('trim', explode(',', @ini_get('disable_functions'))))) return false;
|
80 |
-
|
81 |
-
//Suhosin: http://www.hardened-php.net/suhosin/
|
82 |
-
//Will cause PHP to silently fail.
|
83 |
-
if (extension_loaded('suhosin')) return false;
|
84 |
-
|
85 |
-
// Can we issue a simple echo command?
|
86 |
-
if (!@shell_exec('echo duplicator')) return false;
|
87 |
-
|
88 |
-
return true;
|
89 |
-
}
|
90 |
-
|
91 |
-
/**
|
92 |
-
* Returns the path where the zip command can be called on this server
|
93 |
-
*
|
94 |
-
* @return string The path to where the zip command can be processed
|
95 |
-
*/
|
96 |
-
public static function getUnzipPath()
|
97 |
-
{
|
98 |
-
$filepath = null;
|
99 |
-
if (self::hasShellExec()) {
|
100 |
-
if (shell_exec('hash unzip 2>&1') == NULL) {
|
101 |
-
$filepath = 'unzip';
|
102 |
-
} else {
|
103 |
-
$try_paths = array(
|
104 |
-
'/usr/bin/unzip',
|
105 |
-
'/opt/local/bin/unzip');
|
106 |
-
foreach ($try_paths as $path) {
|
107 |
-
if (file_exists($path)) {
|
108 |
-
$filepath = $path;
|
109 |
-
break;
|
110 |
-
}
|
111 |
-
}
|
112 |
-
}
|
113 |
-
}
|
114 |
-
return $filepath;
|
115 |
-
}
|
116 |
-
|
117 |
-
|
118 |
-
/**
|
119 |
-
* A safe method used to copy larger files
|
120 |
-
*
|
121 |
-
* @param string $source The path to the file being copied
|
122 |
-
* @param string $destination The path to the file being made
|
123 |
-
*
|
124 |
-
* @return bool True if the file was copied
|
125 |
-
*/
|
126 |
-
public static function copyFile($source, $destination)
|
127 |
-
{
|
128 |
-
try {
|
129 |
-
$sp = fopen($source, 'r');
|
130 |
-
$op = fopen($destination, 'w');
|
131 |
-
|
132 |
-
while (!feof($sp)) {
|
133 |
-
$buffer = fread($sp, 512); // use a buffer of 512 bytes
|
134 |
-
fwrite($op, $buffer);
|
135 |
-
}
|
136 |
-
// close handles
|
137 |
-
fclose($op);
|
138 |
-
fclose($sp);
|
139 |
-
return true;
|
140 |
-
|
141 |
-
} catch (Exception $ex) {
|
142 |
-
return false;
|
143 |
-
}
|
144 |
-
}
|
145 |
-
|
146 |
-
|
147 |
-
/**
|
148 |
-
* Returns an array of zip files found in the current executing directory
|
149 |
-
*
|
150 |
-
* @return array of zip files
|
151 |
-
*/
|
152 |
-
public static function getZipFiles()
|
153 |
-
{
|
154 |
-
$files = array();
|
155 |
-
foreach (glob("*.zip") as $name) {
|
156 |
-
if (file_exists($name)) {
|
157 |
-
$files[] = $name;
|
158 |
-
}
|
159 |
-
}
|
160 |
-
|
161 |
-
if (count($files) > 0) {
|
162 |
-
return $files;
|
163 |
-
}
|
164 |
-
|
165 |
-
//FALL BACK: Windows XP has bug with glob,
|
166 |
-
//add secondary check for PHP lameness
|
167 |
-
if ($dh = opendir('.')) {
|
168 |
-
while (false !== ($name = readdir($dh))) {
|
169 |
-
$ext = substr($name, strrpos($name, '.') + 1);
|
170 |
-
if (in_array($ext, array("zip"))) {
|
171 |
-
$files[] = $name;
|
172 |
-
}
|
173 |
-
}
|
174 |
-
closedir($dh);
|
175 |
-
}
|
176 |
-
|
177 |
-
return $files;
|
178 |
-
}
|
179 |
-
}
|
180 |
-
//INIT Class Properties
|
181 |
-
DUPX_Server::init();
|
182 |
?>
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Lightweight abstraction layer for common simple server based routines
|
5 |
+
*
|
6 |
+
* Standard: PSR-2
|
7 |
+
* @link http://www.php-fig.org/psr/psr-2 Full Documentation
|
8 |
+
*
|
9 |
+
* @package SC\DUPX\Server
|
10 |
+
*
|
11 |
+
*/
|
12 |
+
class DUPX_Server
|
13 |
+
{
|
14 |
+
/**
|
15 |
+
* Returns true if safe mode is enabled
|
16 |
+
*/
|
17 |
+
public static $php_safe_mode_on = false;
|
18 |
+
|
19 |
+
/**
|
20 |
+
* The servers current PHP version
|
21 |
+
*/
|
22 |
+
public static $php_version = 0;
|
23 |
+
|
24 |
+
/**
|
25 |
+
* The minimum PHP version the installer will support
|
26 |
+
*/
|
27 |
+
public static $php_version_min = "5.2.7";
|
28 |
+
|
29 |
+
/**
|
30 |
+
* Is the current servers version of PHP safe to use with the installer
|
31 |
+
*/
|
32 |
+
public static $php_version_safe = false;
|
33 |
+
|
34 |
+
|
35 |
+
/**
|
36 |
+
* Is PHP 5.3 or better running
|
37 |
+
*/
|
38 |
+
public static $php_version_53_plus;
|
39 |
+
|
40 |
+
/**
|
41 |
+
* Used to init the static properties
|
42 |
+
*/
|
43 |
+
public static function init()
|
44 |
+
{
|
45 |
+
self::$php_safe_mode_on = in_array(strtolower(@ini_get('safe_mode')), array('on', 'yes', 'true', 1, "1"));
|
46 |
+
self::$php_version = phpversion();
|
47 |
+
self::$php_version_safe = DUPX_U::isVersion(self::$php_version_min);
|
48 |
+
self::$php_version_53_plus = DUPX_U::isVersion('5.3.0');
|
49 |
+
}
|
50 |
+
|
51 |
+
/**
|
52 |
+
* Is the directory provided writable by PHP
|
53 |
+
*
|
54 |
+
* @param string $path A physical directory path
|
55 |
+
*
|
56 |
+
* @return bool Returns true if PHP can write to the path provided
|
57 |
+
*/
|
58 |
+
public static function isDirWritable($path)
|
59 |
+
{
|
60 |
+
if (!@is_writeable($path)) return false;
|
61 |
+
|
62 |
+
if (is_dir($path)) {
|
63 |
+
if ($dh = @opendir($path)) {
|
64 |
+
closedir($dh);
|
65 |
+
} else {
|
66 |
+
return false;
|
67 |
+
}
|
68 |
+
}
|
69 |
+
return true;
|
70 |
+
}
|
71 |
+
|
72 |
+
/**
|
73 |
+
* Can this server process in shell_exec mode
|
74 |
+
*
|
75 |
+
* @return bool Returns true is the server can run shell_exec commands
|
76 |
+
*/
|
77 |
+
public static function hasShellExec()
|
78 |
+
{
|
79 |
+
if (array_intersect(array('shell_exec', 'escapeshellarg', 'escapeshellcmd', 'extension_loaded'), array_map('trim', explode(',', @ini_get('disable_functions'))))) return false;
|
80 |
+
|
81 |
+
//Suhosin: http://www.hardened-php.net/suhosin/
|
82 |
+
//Will cause PHP to silently fail.
|
83 |
+
if (extension_loaded('suhosin')) return false;
|
84 |
+
|
85 |
+
// Can we issue a simple echo command?
|
86 |
+
if (!@shell_exec('echo duplicator')) return false;
|
87 |
+
|
88 |
+
return true;
|
89 |
+
}
|
90 |
+
|
91 |
+
/**
|
92 |
+
* Returns the path where the zip command can be called on this server
|
93 |
+
*
|
94 |
+
* @return string The path to where the zip command can be processed
|
95 |
+
*/
|
96 |
+
public static function getUnzipPath()
|
97 |
+
{
|
98 |
+
$filepath = null;
|
99 |
+
if (self::hasShellExec()) {
|
100 |
+
if (shell_exec('hash unzip 2>&1') == NULL) {
|
101 |
+
$filepath = 'unzip';
|
102 |
+
} else {
|
103 |
+
$try_paths = array(
|
104 |
+
'/usr/bin/unzip',
|
105 |
+
'/opt/local/bin/unzip');
|
106 |
+
foreach ($try_paths as $path) {
|
107 |
+
if (file_exists($path)) {
|
108 |
+
$filepath = $path;
|
109 |
+
break;
|
110 |
+
}
|
111 |
+
}
|
112 |
+
}
|
113 |
+
}
|
114 |
+
return $filepath;
|
115 |
+
}
|
116 |
+
|
117 |
+
|
118 |
+
/**
|
119 |
+
* A safe method used to copy larger files
|
120 |
+
*
|
121 |
+
* @param string $source The path to the file being copied
|
122 |
+
* @param string $destination The path to the file being made
|
123 |
+
*
|
124 |
+
* @return bool True if the file was copied
|
125 |
+
*/
|
126 |
+
public static function copyFile($source, $destination)
|
127 |
+
{
|
128 |
+
try {
|
129 |
+
$sp = fopen($source, 'r');
|
130 |
+
$op = fopen($destination, 'w');
|
131 |
+
|
132 |
+
while (!feof($sp)) {
|
133 |
+
$buffer = fread($sp, 512); // use a buffer of 512 bytes
|
134 |
+
fwrite($op, $buffer);
|
135 |
+
}
|
136 |
+
// close handles
|
137 |
+
fclose($op);
|
138 |
+
fclose($sp);
|
139 |
+
return true;
|
140 |
+
|
141 |
+
} catch (Exception $ex) {
|
142 |
+
return false;
|
143 |
+
}
|
144 |
+
}
|
145 |
+
|
146 |
+
|
147 |
+
/**
|
148 |
+
* Returns an array of zip files found in the current executing directory
|
149 |
+
*
|
150 |
+
* @return array of zip files
|
151 |
+
*/
|
152 |
+
public static function getZipFiles()
|
153 |
+
{
|
154 |
+
$files = array();
|
155 |
+
foreach (glob("*.zip") as $name) {
|
156 |
+
if (file_exists($name)) {
|
157 |
+
$files[] = $name;
|
158 |
+
}
|
159 |
+
}
|
160 |
+
|
161 |
+
if (count($files) > 0) {
|
162 |
+
return $files;
|
163 |
+
}
|
164 |
+
|
165 |
+
//FALL BACK: Windows XP has bug with glob,
|
166 |
+
//add secondary check for PHP lameness
|
167 |
+
if ($dh = opendir('.')) {
|
168 |
+
while (false !== ($name = readdir($dh))) {
|
169 |
+
$ext = substr($name, strrpos($name, '.') + 1);
|
170 |
+
if (in_array($ext, array("zip"))) {
|
171 |
+
$files[] = $name;
|
172 |
+
}
|
173 |
+
}
|
174 |
+
closedir($dh);
|
175 |
+
}
|
176 |
+
|
177 |
+
return $files;
|
178 |
+
}
|
179 |
+
}
|
180 |
+
//INIT Class Properties
|
181 |
+
DUPX_Server::init();
|
182 |
?>
|
installer/build/classes/utilities/class.u.php
CHANGED
@@ -273,5 +273,17 @@ class DUPX_U
|
|
273 |
return filter_var($input, FILTER_SANITIZE_STRING);
|
274 |
}
|
275 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
276 |
}
|
277 |
?>
|
273 |
return filter_var($input, FILTER_SANITIZE_STRING);
|
274 |
}
|
275 |
|
276 |
+
/**
|
277 |
+
* Check PHP version
|
278 |
+
*
|
279 |
+
* @param string $version PHP version we looking for
|
280 |
+
*
|
281 |
+
* @return boolean Returns true if version is same or above.
|
282 |
+
*/
|
283 |
+
public static function isVersion($version)
|
284 |
+
{
|
285 |
+
return (version_compare(PHP_VERSION, $version) >= 0);
|
286 |
+
}
|
287 |
+
|
288 |
}
|
289 |
?>
|
installer/build/view.step4.php
CHANGED
@@ -1,261 +1,273 @@
|
|
1 |
-
<?php
|
2 |
-
|
3 |
-
$_POST['url_new'] = isset($_POST['url_new']) ? DUPX_U::sanitize($_POST['url_new']) : '';
|
4 |
-
$_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : '';
|
5 |
-
$_POST['retain_config'] = isset($_POST['retain_config']) && $_POST['retain_config'] == '1' ? true : false;
|
6 |
-
$_POST['exe_safe_mode'] = isset($_POST['exe_safe_mode']) ? $_POST['exe_safe_mode'] : 0;
|
7 |
-
|
8 |
-
$admin_base = basename($GLOBALS['FW_WPLOGIN_URL']);
|
9 |
-
|
10 |
-
$safe_mode = $_POST['exe_safe_mode'];
|
11 |
-
$admin_redirect = rtrim($_POST['url_new'], "/") . "/wp-admin/admin.php?page=duplicator-tools&tab=diagnostics§ion=info&package={$_POST['archive_name']}&safe_mode={$safe_mode}";
|
12 |
-
$admin_redirect = urlencode($admin_redirect);
|
13 |
-
$admin_url_qry = (strpos($admin_base, '?') === false) ? '?' : '&';
|
14 |
-
$admin_login = rtrim($_POST['url_new'], '/') . "/{$admin_base}{$admin_url_qry}redirect_to={$admin_redirect}";
|
15 |
-
$url_new_rtrim = rtrim($_POST['url_new'], '/');
|
16 |
-
|
17 |
-
?>
|
18 |
-
|
19 |
-
<script>
|
20 |
-
/** Posts to page to remove install files */
|
21 |
-
DUPX.getAdminLogin = function() {
|
22 |
-
window.open('<?php echo $admin_login; ?>', 'wp-admin');
|
23 |
-
};
|
24 |
-
</script>
|
25 |
-
|
26 |
-
|
27 |
-
<!-- =========================================
|
28 |
-
VIEW: STEP 4 - INPUT -->
|
29 |
-
<form id='s4-input-form' method="post" class="content-form" style="line-height:20px">
|
30 |
-
<input type="hidden" name="url_new" id="url_new" value="<?php echo $url_new_rtrim; ?>" />
|
31 |
-
<div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
|
32 |
-
|
33 |
-
<div class="hdr-main">
|
34 |
-
Step <span class="step">4</span> of 4: Test Site
|
35 |
-
</div><br />
|
36 |
-
|
37 |
-
<table class="s4-final-step">
|
38 |
-
<tr style="vertical-align:top">
|
39 |
-
<td><a class="s4-final-btns" href="javascript:void(0)" onclick="DUPX.getAdminLogin()">Site Login</a></td>
|
40 |
-
<td>
|
41 |
-
<i>Login to finalize the setup</i>
|
42 |
-
<?php if ($_POST['retain_config']) :?>
|
43 |
-
<br/> <i>Update of Permalinks required see: Admin > Settings > Permalinks > Save</i>
|
44 |
-
<?php endif;?>
|
45 |
-
<br/><br/>
|
46 |
-
|
47 |
-
<!-- WARN: SAFE MODE MESSAGES -->
|
48 |
-
<div class="s4-warn" style="display:<?php echo ($safe_mode > 0 ? 'block' : 'none')?>">
|
49 |
-
<b>Safe Mode</b><br/>
|
50 |
-
Safe mode has <u>deactivated</u> all plugins. Please be sure to enable your plugins after logging in. <i>If you notice that problems arise when activating
|
51 |
-
the plugins then active them one-by-one to isolate the plugin that could be causing the issue.</i>
|
52 |
-
</div>
|
53 |
-
</td>
|
54 |
-
</tr>
|
55 |
-
<tr>
|
56 |
-
<td><a class="s4-final-btns" href="javascript:void(0)" onclick="$('#dup-step3-install-report').toggle(400)">Show Report</a></td>
|
57 |
-
<td>
|
58 |
-
<i>Optionally review the migration report</i><br/>
|
59 |
-
<i id="dup-step3-install-report-count">
|
60 |
-
<span data-bind="with: status.step2">Install Notices: (<span data-bind="text: query_errs"></span>)</span>
|
61 |
-
<span data-bind="with: status.step3">Update Notices: (<span data-bind="text: err_all"></span>)</span>
|
62 |
-
<span data-bind="with: status.step3" style="color:#888"><b>General Notices:</b> (<span data-bind="text: warn_all"></span>)</span>
|
63 |
-
</i>
|
64 |
-
</td>
|
65 |
-
</tr>
|
66 |
-
</table>
|
67 |
-
<br/><br/>
|
68 |
-
|
69 |
-
<div class="s4-go-back">
|
70 |
-
Additional Notes:
|
71 |
-
<ul style="margin-top: 1px">
|
72 |
-
<li>
|
73 |
-
Review the <a href="<?php echo $url_new_rtrim; ?>" target="_blank">front-end</a> or
|
74 |
-
re-run installer at <a href="<?php echo "{$url_new_rtrim}/installer.php"; ?>">step 1</a>
|
75 |
-
</li>
|
76 |
-
<li>The .htaccess file was reset. Resave plugins that write to this file.</li>
|
77 |
-
<li>
|
78 |
-
Visit the <a href="installer.php?help=1#troubleshoot" target="_blank">troubleshoot</a> section or
|
79 |
-
<a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst4_step4_troubleshoot' target='_blank'>online FAQs</a> for additional help.
|
80 |
-
</li>
|
81 |
-
</ul>
|
82 |
-
</div>
|
83 |
-
|
84 |
-
<!-- ========================
|
85 |
-
INSTALL REPORT -->
|
86 |
-
<div id="dup-step3-install-report" style='display:none'>
|
87 |
-
<table class='s4-report-results' style="width:100%">
|
88 |
-
<tr><th colspan="4">Database Report</th></tr>
|
89 |
-
<tr style="font-weight:bold">
|
90 |
-
<td style="width:150px"></td>
|
91 |
-
<td>Tables</td>
|
92 |
-
<td>Rows</td>
|
93 |
-
<td>Cells</td>
|
94 |
-
</tr>
|
95 |
-
<tr data-bind="with: status.step2">
|
96 |
-
<td>Created</td>
|
97 |
-
<td><span data-bind="text: table_count"></span></td>
|
98 |
-
<td><span data-bind="text: table_rows"></span></td>
|
99 |
-
<td>n/a</td>
|
100 |
-
</tr>
|
101 |
-
<tr data-bind="with: status.step3">
|
102 |
-
<td>Scanned</td>
|
103 |
-
<td><span data-bind="text: scan_tables"></span></td>
|
104 |
-
<td><span data-bind="text: scan_rows"></span></td>
|
105 |
-
<td><span data-bind="text: scan_cells"></span></td>
|
106 |
-
</tr>
|
107 |
-
<tr data-bind="with: status.step3">
|
108 |
-
<td>Updated</td>
|
109 |
-
<td><span data-bind="text: updt_tables"></span></td>
|
110 |
-
<td><span data-bind="text: updt_rows"></span></td>
|
111 |
-
<td><span data-bind="text: updt_cells"></span></td>
|
112 |
-
</tr>
|
113 |
-
</table>
|
114 |
-
<br/>
|
115 |
-
|
116 |
-
<table class='s4-report-errs' style="width:100%; border-top:none">
|
117 |
-
<tr><th colspan="4">Report Notices</th></tr>
|
118 |
-
<tr>
|
119 |
-
<td data-bind="with: status.step2">
|
120 |
-
<a href="javascript:void(0);" onclick="$('#dup-step3-errs-create').toggle(400)">Step 2: Install Notices (<span data-bind="text: query_errs"></span>)</a><br/>
|
121 |
-
</td>
|
122 |
-
<td data-bind="with: status.step3">
|
123 |
-
<a href="javascript:void(0);" onclick="$('#dup-step3-errs-upd').toggle(400)">Step 3: Update Notices (<span data-bind="text: err_all"></span>)</a>
|
124 |
-
</td>
|
125 |
-
<td data-bind="with: status.step3">
|
126 |
-
<a href="#dup-step3-errs-warn-anchor" onclick="$('#dup-step3-warnlist').toggle(400)">General Notices (<span data-bind="text: warn_all"></span>)</a>
|
127 |
-
</td>
|
128 |
-
</tr>
|
129 |
-
<tr><td colspan="4"></td></tr>
|
130 |
-
</table>
|
131 |
-
|
132 |
-
<div id="dup-step3-errs-create" class="s4-err-msg">
|
133 |
-
<div class="s4-err-title">STEP 2 - INSTALL NOTICES:</div>
|
134 |
-
<b data-bind="with: status.step2">ERRORS (<span data-bind="text: query_errs"></span>)</b><br/>
|
135 |
-
<div class="info-error">
|
136 |
-
Queries that error during the deploy step are logged to the <a href="installer-log.txt" target="dpro-installer">install-log.txt</a> file and
|
137 |
-
and marked with an **ERROR** status. If you experience a few errors (under 5), in many cases they can be ignored as long as your site is working correctly.
|
138 |
-
However if you see a large amount of errors or you experience an issue with your site then the error messages in the log file will need to be investigated.
|
139 |
-
<br/><br/>
|
140 |
-
|
141 |
-
<b>COMMON FIXES:</b>
|
142 |
-
<ul>
|
143 |
-
<li>
|
144 |
-
<b>Unknown collation:</b> See Online FAQ:
|
145 |
-
<a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step4_unknowncoll#faq-installer-110-q" target="_blank">What is Compatibility mode & 'Unknown collation' errors?</a>
|
146 |
-
</li>
|
147 |
-
<li>
|
148 |
-
<b>Query Limits:</b> Update MySQL server with the <a href="https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html" target="_blank">max_allowed_packet</a>
|
149 |
-
setting for larger payloads.
|
150 |
-
</li>
|
151 |
-
</ul>
|
152 |
-
|
153 |
-
</div>
|
154 |
-
</div>
|
155 |
-
|
156 |
-
<div id="dup-step3-errs-upd" class="s4-err-msg">
|
157 |
-
<div class="s4-err-title">STEP 3 - UPDATE NOTICES:</div>
|
158 |
-
<!-- MYSQL QUERY ERRORS -->
|
159 |
-
<b data-bind="with: status.step3">ERRORS (<span data-bind="text: errsql_sum"></span>) </b><br/>
|
160 |
-
<div class="info-error">
|
161 |
-
Update errors that show here are queries that could not be performed because the database server being used has issues running it. Please validate the query, if
|
162 |
-
it looks to be of concern please try to run the query manually. In many cases if your site performs well without any issues you can ignore the error.
|
163 |
-
</div>
|
164 |
-
<div class="content">
|
165 |
-
<div data-bind="foreach: status.step3.errsql"><div data-bind="text: $data"></div></div>
|
166 |
-
<div data-bind="visible: status.step3.errsql.length == 0">No MySQL query errors found</div>
|
167 |
-
</div>
|
168 |
-
<br/>
|
169 |
-
|
170 |
-
<!-- TABLE KEY ERRORS -->
|
171 |
-
<b data-bind="with: status.step3">TABLE KEY NOTICES (<span data-bind="text: errkey_sum"></span>)</b><br/>
|
172 |
-
<div class="info-notice">
|
173 |
-
Notices should be ignored unless issues are found after you have tested an installed site. This notice indicates that a primary key is required to run the
|
174 |
-
update engine. Below is a list of tables and the rows that were not updated. On some databases you can remove these notices by checking the box 'Enable Full Search'
|
175 |
-
under advanced options in step3 of the installer.
|
176 |
-
<br/><br/>
|
177 |
-
<small>
|
178 |
-
<b>Advanced Searching:</b><br/>
|
179 |
-
Use the following query to locate the table that was not updated: <br/>
|
180 |
-
<i>SELECT @row := @row + 1 as row, t.* FROM some_table t, (SELECT @row := 0) r</i>
|
181 |
-
</small>
|
182 |
-
</div>
|
183 |
-
<div class="content">
|
184 |
-
<div data-bind="foreach: status.step3.errkey"><div data-bind="text: $data"></div></div>
|
185 |
-
<div data-bind="visible: status.step3.errkey.length == 0">No missing primary key errors</div>
|
186 |
-
</div>
|
187 |
-
<br/>
|
188 |
-
|
189 |
-
<!-- SERIALIZE ERRORS -->
|
190 |
-
<b data-bind="with: status.step3">SERIALIZATION NOTICES (<span data-bind="text: errser_sum"></span>)</b><br/>
|
191 |
-
<div class="info-notice">
|
192 |
-
Notices should be ignored unless issues are found after you have tested an installed site. The SQL below will show data that may have not been
|
193 |
-
updated during the serialization process. Best practices for serialization notices is to just re-save the plugin/post/page in question.
|
194 |
-
</div>
|
195 |
-
<div class="content">
|
196 |
-
<div data-bind="foreach: status.step3.errser"><div data-bind="text: $data"></div></div>
|
197 |
-
<div data-bind="visible: status.step3.errser.length == 0">No serialization errors found</div>
|
198 |
-
</div>
|
199 |
-
<br/>
|
200 |
-
|
201 |
-
</div>
|
202 |
-
|
203 |
-
|
204 |
-
<!-- WARNINGS-->
|
205 |
-
<div id="dup-step3-warnlist" class="s4-err-msg">
|
206 |
-
<a href="#" id="dup-step3-errs-warn-anchor"></a>
|
207 |
-
<b>GENERAL NOTICES</b><br/>
|
208 |
-
<div class="info">
|
209 |
-
The following is a list of notices that may need to be fixed in order to finalize your setup. These values should only be investigated if your running into
|
210 |
-
issues with your site. For more details see the <a href="https://codex.wordpress.org/Editing_wp-config.php" target="_blank">WordPress Codex</a>.
|
211 |
-
</div>
|
212 |
-
<div class="content">
|
213 |
-
<div data-bind="foreach: status.step3.warnlist">
|
214 |
-
<div data-bind="text: $data"></div>
|
215 |
-
</div>
|
216 |
-
<div data-bind="visible: status.step3.warnlist.length == 0">
|
217 |
-
No notices found
|
218 |
-
</div>
|
219 |
-
</div>
|
220 |
-
</div><br/>
|
221 |
-
|
222 |
-
</div><br/>
|
223 |
-
|
224 |
-
<?php
|
225 |
-
$num = rand(1,2);
|
226 |
-
switch ($num) {
|
227 |
-
case 1:
|
228 |
-
$key = 'free_inst_s3btn1';
|
229 |
-
$txt = 'Want More Power?';
|
230 |
-
break;
|
231 |
-
case 2:
|
232 |
-
$key = 'free_inst_s3btn2';
|
233 |
-
$txt = 'Go Pro Today!';
|
234 |
-
break;
|
235 |
-
default :
|
236 |
-
$key = 'free_inst_s3btn2';
|
237 |
-
$txt = 'Go Pro Today!';
|
238 |
-
}
|
239 |
-
?>
|
240 |
-
|
241 |
-
<div class="s4-gopro-btn">
|
242 |
-
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content=<?php echo $key;?>" target="_blank">
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
$_POST['url_new'] = isset($_POST['url_new']) ? DUPX_U::sanitize($_POST['url_new']) : '';
|
4 |
+
$_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : '';
|
5 |
+
$_POST['retain_config'] = isset($_POST['retain_config']) && $_POST['retain_config'] == '1' ? true : false;
|
6 |
+
$_POST['exe_safe_mode'] = isset($_POST['exe_safe_mode']) ? $_POST['exe_safe_mode'] : 0;
|
7 |
+
|
8 |
+
$admin_base = basename($GLOBALS['FW_WPLOGIN_URL']);
|
9 |
+
|
10 |
+
$safe_mode = $_POST['exe_safe_mode'];
|
11 |
+
$admin_redirect = rtrim($_POST['url_new'], "/") . "/wp-admin/admin.php?page=duplicator-tools&tab=diagnostics§ion=info&package={$_POST['archive_name']}&safe_mode={$safe_mode}";
|
12 |
+
$admin_redirect = urlencode($admin_redirect);
|
13 |
+
$admin_url_qry = (strpos($admin_base, '?') === false) ? '?' : '&';
|
14 |
+
$admin_login = rtrim($_POST['url_new'], '/') . "/{$admin_base}{$admin_url_qry}redirect_to={$admin_redirect}";
|
15 |
+
$url_new_rtrim = rtrim($_POST['url_new'], '/');
|
16 |
+
|
17 |
+
?>
|
18 |
+
|
19 |
+
<script>
|
20 |
+
/** Posts to page to remove install files */
|
21 |
+
DUPX.getAdminLogin = function() {
|
22 |
+
window.open('<?php echo $admin_login; ?>', 'wp-admin');
|
23 |
+
};
|
24 |
+
</script>
|
25 |
+
|
26 |
+
|
27 |
+
<!-- =========================================
|
28 |
+
VIEW: STEP 4 - INPUT -->
|
29 |
+
<form id='s4-input-form' method="post" class="content-form" style="line-height:20px">
|
30 |
+
<input type="hidden" name="url_new" id="url_new" value="<?php echo $url_new_rtrim; ?>" />
|
31 |
+
<div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
|
32 |
+
|
33 |
+
<div class="hdr-main">
|
34 |
+
Step <span class="step">4</span> of 4: Test Site
|
35 |
+
</div><br />
|
36 |
+
|
37 |
+
<table class="s4-final-step">
|
38 |
+
<tr style="vertical-align:top">
|
39 |
+
<td><a class="s4-final-btns" href="javascript:void(0)" onclick="DUPX.getAdminLogin()">Site Login</a></td>
|
40 |
+
<td>
|
41 |
+
<i>Login to finalize the setup</i>
|
42 |
+
<?php if ($_POST['retain_config']) :?>
|
43 |
+
<br/> <i>Update of Permalinks required see: Admin > Settings > Permalinks > Save</i>
|
44 |
+
<?php endif;?>
|
45 |
+
<br/><br/>
|
46 |
+
|
47 |
+
<!-- WARN: SAFE MODE MESSAGES -->
|
48 |
+
<div class="s4-warn" style="display:<?php echo ($safe_mode > 0 ? 'block' : 'none')?>">
|
49 |
+
<b>Safe Mode</b><br/>
|
50 |
+
Safe mode has <u>deactivated</u> all plugins. Please be sure to enable your plugins after logging in. <i>If you notice that problems arise when activating
|
51 |
+
the plugins then active them one-by-one to isolate the plugin that could be causing the issue.</i>
|
52 |
+
</div>
|
53 |
+
</td>
|
54 |
+
</tr>
|
55 |
+
<tr>
|
56 |
+
<td><a class="s4-final-btns" href="javascript:void(0)" onclick="$('#dup-step3-install-report').toggle(400)">Show Report</a></td>
|
57 |
+
<td>
|
58 |
+
<i>Optionally review the migration report</i><br/>
|
59 |
+
<i id="dup-step3-install-report-count">
|
60 |
+
<span data-bind="with: status.step2">Install Notices: (<span data-bind="text: query_errs"></span>)</span>
|
61 |
+
<span data-bind="with: status.step3">Update Notices: (<span data-bind="text: err_all"></span>)</span>
|
62 |
+
<span data-bind="with: status.step3" style="color:#888"><b>General Notices:</b> (<span data-bind="text: warn_all"></span>)</span>
|
63 |
+
</i>
|
64 |
+
</td>
|
65 |
+
</tr>
|
66 |
+
</table>
|
67 |
+
<br/><br/>
|
68 |
+
|
69 |
+
<div class="s4-go-back">
|
70 |
+
Additional Notes:
|
71 |
+
<ul style="margin-top: 1px">
|
72 |
+
<li>
|
73 |
+
Review the <a href="<?php echo $url_new_rtrim; ?>" target="_blank">front-end</a> or
|
74 |
+
re-run installer at <a href="<?php echo "{$url_new_rtrim}/installer.php"; ?>">step 1</a>
|
75 |
+
</li>
|
76 |
+
<li>The .htaccess file was reset. Resave plugins that write to this file.</li>
|
77 |
+
<li>
|
78 |
+
Visit the <a href="installer.php?help=1#troubleshoot" target="_blank">troubleshoot</a> section or
|
79 |
+
<a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst4_step4_troubleshoot' target='_blank'>online FAQs</a> for additional help.
|
80 |
+
</li>
|
81 |
+
</ul>
|
82 |
+
</div>
|
83 |
+
|
84 |
+
<!-- ========================
|
85 |
+
INSTALL REPORT -->
|
86 |
+
<div id="dup-step3-install-report" style='display:none'>
|
87 |
+
<table class='s4-report-results' style="width:100%">
|
88 |
+
<tr><th colspan="4">Database Report</th></tr>
|
89 |
+
<tr style="font-weight:bold">
|
90 |
+
<td style="width:150px"></td>
|
91 |
+
<td>Tables</td>
|
92 |
+
<td>Rows</td>
|
93 |
+
<td>Cells</td>
|
94 |
+
</tr>
|
95 |
+
<tr data-bind="with: status.step2">
|
96 |
+
<td>Created</td>
|
97 |
+
<td><span data-bind="text: table_count"></span></td>
|
98 |
+
<td><span data-bind="text: table_rows"></span></td>
|
99 |
+
<td>n/a</td>
|
100 |
+
</tr>
|
101 |
+
<tr data-bind="with: status.step3">
|
102 |
+
<td>Scanned</td>
|
103 |
+
<td><span data-bind="text: scan_tables"></span></td>
|
104 |
+
<td><span data-bind="text: scan_rows"></span></td>
|
105 |
+
<td><span data-bind="text: scan_cells"></span></td>
|
106 |
+
</tr>
|
107 |
+
<tr data-bind="with: status.step3">
|
108 |
+
<td>Updated</td>
|
109 |
+
<td><span data-bind="text: updt_tables"></span></td>
|
110 |
+
<td><span data-bind="text: updt_rows"></span></td>
|
111 |
+
<td><span data-bind="text: updt_cells"></span></td>
|
112 |
+
</tr>
|
113 |
+
</table>
|
114 |
+
<br/>
|
115 |
+
|
116 |
+
<table class='s4-report-errs' style="width:100%; border-top:none">
|
117 |
+
<tr><th colspan="4">Report Notices</th></tr>
|
118 |
+
<tr>
|
119 |
+
<td data-bind="with: status.step2">
|
120 |
+
<a href="javascript:void(0);" onclick="$('#dup-step3-errs-create').toggle(400)">Step 2: Install Notices (<span data-bind="text: query_errs"></span>)</a><br/>
|
121 |
+
</td>
|
122 |
+
<td data-bind="with: status.step3">
|
123 |
+
<a href="javascript:void(0);" onclick="$('#dup-step3-errs-upd').toggle(400)">Step 3: Update Notices (<span data-bind="text: err_all"></span>)</a>
|
124 |
+
</td>
|
125 |
+
<td data-bind="with: status.step3">
|
126 |
+
<a href="#dup-step3-errs-warn-anchor" onclick="$('#dup-step3-warnlist').toggle(400)">General Notices (<span data-bind="text: warn_all"></span>)</a>
|
127 |
+
</td>
|
128 |
+
</tr>
|
129 |
+
<tr><td colspan="4"></td></tr>
|
130 |
+
</table>
|
131 |
+
|
132 |
+
<div id="dup-step3-errs-create" class="s4-err-msg">
|
133 |
+
<div class="s4-err-title">STEP 2 - INSTALL NOTICES:</div>
|
134 |
+
<b data-bind="with: status.step2">ERRORS (<span data-bind="text: query_errs"></span>)</b><br/>
|
135 |
+
<div class="info-error">
|
136 |
+
Queries that error during the deploy step are logged to the <a href="installer-log.txt" target="dpro-installer">install-log.txt</a> file and
|
137 |
+
and marked with an **ERROR** status. If you experience a few errors (under 5), in many cases they can be ignored as long as your site is working correctly.
|
138 |
+
However if you see a large amount of errors or you experience an issue with your site then the error messages in the log file will need to be investigated.
|
139 |
+
<br/><br/>
|
140 |
+
|
141 |
+
<b>COMMON FIXES:</b>
|
142 |
+
<ul>
|
143 |
+
<li>
|
144 |
+
<b>Unknown collation:</b> See Online FAQ:
|
145 |
+
<a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step4_unknowncoll#faq-installer-110-q" target="_blank">What is Compatibility mode & 'Unknown collation' errors?</a>
|
146 |
+
</li>
|
147 |
+
<li>
|
148 |
+
<b>Query Limits:</b> Update MySQL server with the <a href="https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html" target="_blank">max_allowed_packet</a>
|
149 |
+
setting for larger payloads.
|
150 |
+
</li>
|
151 |
+
</ul>
|
152 |
+
|
153 |
+
</div>
|
154 |
+
</div>
|
155 |
+
|
156 |
+
<div id="dup-step3-errs-upd" class="s4-err-msg">
|
157 |
+
<div class="s4-err-title">STEP 3 - UPDATE NOTICES:</div>
|
158 |
+
<!-- MYSQL QUERY ERRORS -->
|
159 |
+
<b data-bind="with: status.step3">ERRORS (<span data-bind="text: errsql_sum"></span>) </b><br/>
|
160 |
+
<div class="info-error">
|
161 |
+
Update errors that show here are queries that could not be performed because the database server being used has issues running it. Please validate the query, if
|
162 |
+
it looks to be of concern please try to run the query manually. In many cases if your site performs well without any issues you can ignore the error.
|
163 |
+
</div>
|
164 |
+
<div class="content">
|
165 |
+
<div data-bind="foreach: status.step3.errsql"><div data-bind="text: $data"></div></div>
|
166 |
+
<div data-bind="visible: status.step3.errsql.length == 0">No MySQL query errors found</div>
|
167 |
+
</div>
|
168 |
+
<br/>
|
169 |
+
|
170 |
+
<!-- TABLE KEY ERRORS -->
|
171 |
+
<b data-bind="with: status.step3">TABLE KEY NOTICES (<span data-bind="text: errkey_sum"></span>)</b><br/>
|
172 |
+
<div class="info-notice">
|
173 |
+
Notices should be ignored unless issues are found after you have tested an installed site. This notice indicates that a primary key is required to run the
|
174 |
+
update engine. Below is a list of tables and the rows that were not updated. On some databases you can remove these notices by checking the box 'Enable Full Search'
|
175 |
+
under advanced options in step3 of the installer.
|
176 |
+
<br/><br/>
|
177 |
+
<small>
|
178 |
+
<b>Advanced Searching:</b><br/>
|
179 |
+
Use the following query to locate the table that was not updated: <br/>
|
180 |
+
<i>SELECT @row := @row + 1 as row, t.* FROM some_table t, (SELECT @row := 0) r</i>
|
181 |
+
</small>
|
182 |
+
</div>
|
183 |
+
<div class="content">
|
184 |
+
<div data-bind="foreach: status.step3.errkey"><div data-bind="text: $data"></div></div>
|
185 |
+
<div data-bind="visible: status.step3.errkey.length == 0">No missing primary key errors</div>
|
186 |
+
</div>
|
187 |
+
<br/>
|
188 |
+
|
189 |
+
<!-- SERIALIZE ERRORS -->
|
190 |
+
<b data-bind="with: status.step3">SERIALIZATION NOTICES (<span data-bind="text: errser_sum"></span>)</b><br/>
|
191 |
+
<div class="info-notice">
|
192 |
+
Notices should be ignored unless issues are found after you have tested an installed site. The SQL below will show data that may have not been
|
193 |
+
updated during the serialization process. Best practices for serialization notices is to just re-save the plugin/post/page in question.
|
194 |
+
</div>
|
195 |
+
<div class="content">
|
196 |
+
<div data-bind="foreach: status.step3.errser"><div data-bind="text: $data"></div></div>
|
197 |
+
<div data-bind="visible: status.step3.errser.length == 0">No serialization errors found</div>
|
198 |
+
</div>
|
199 |
+
<br/>
|
200 |
+
|
201 |
+
</div>
|
202 |
+
|
203 |
+
|
204 |
+
<!-- WARNINGS-->
|
205 |
+
<div id="dup-step3-warnlist" class="s4-err-msg">
|
206 |
+
<a href="#" id="dup-step3-errs-warn-anchor"></a>
|
207 |
+
<b>GENERAL NOTICES</b><br/>
|
208 |
+
<div class="info">
|
209 |
+
The following is a list of notices that may need to be fixed in order to finalize your setup. These values should only be investigated if your running into
|
210 |
+
issues with your site. For more details see the <a href="https://codex.wordpress.org/Editing_wp-config.php" target="_blank">WordPress Codex</a>.
|
211 |
+
</div>
|
212 |
+
<div class="content">
|
213 |
+
<div data-bind="foreach: status.step3.warnlist">
|
214 |
+
<div data-bind="text: $data"></div>
|
215 |
+
</div>
|
216 |
+
<div data-bind="visible: status.step3.warnlist.length == 0">
|
217 |
+
No notices found
|
218 |
+
</div>
|
219 |
+
</div>
|
220 |
+
</div><br/>
|
221 |
+
|
222 |
+
</div><br/>
|
223 |
+
|
224 |
+
<?php
|
225 |
+
$num = rand(1,2);
|
226 |
+
switch ($num) {
|
227 |
+
case 1:
|
228 |
+
$key = 'free_inst_s3btn1';
|
229 |
+
$txt = 'Want More Power?';
|
230 |
+
break;
|
231 |
+
case 2:
|
232 |
+
$key = 'free_inst_s3btn2';
|
233 |
+
$txt = 'Go Pro Today!';
|
234 |
+
break;
|
235 |
+
default :
|
236 |
+
$key = 'free_inst_s3btn2';
|
237 |
+
$txt = 'Go Pro Today!';
|
238 |
+
}
|
239 |
+
?>
|
240 |
+
|
241 |
+
<div class="s4-gopro-btn">
|
242 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content=<?php echo $key;?>" target="_blank">
|
243 |
+
<?php echo $txt;?>
|
244 |
+
</a>
|
245 |
+
</div>
|
246 |
+
<br/><br/><br/>
|
247 |
+
</form>
|
248 |
+
|
249 |
+
<?php
|
250 |
+
//Sanitize
|
251 |
+
$json_result = true;
|
252 |
+
$json_data = utf8_decode(urldecode($_POST['json']));
|
253 |
+
$json_decode = json_decode($json_data);
|
254 |
+
if ($json_decode == NULL || $json_decode == FALSE) {
|
255 |
+
$json_data = "{'json reset invalid form value sent'}";
|
256 |
+
$json_result = false;
|
257 |
+
}
|
258 |
+
?>
|
259 |
+
|
260 |
+
<script>
|
261 |
+
<?php if ($json_result) : ?>
|
262 |
+
MyViewModel = function() {
|
263 |
+
this.status = <?php echo $json_data; ?>;
|
264 |
+
var errorCount = this.status.step2.query_errs || 0;
|
265 |
+
(errorCount >= 1 )
|
266 |
+
? $('#dup-step3-install-report-count').css('color', '#BE2323')
|
267 |
+
: $('#dup-step3-install-report-count').css('color', '#197713');
|
268 |
+
};
|
269 |
+
ko.applyBindings(new MyViewModel());
|
270 |
+
<?php else: ?>
|
271 |
+
console.log("Cross site script attempt detected, unable to create final report!");
|
272 |
+
<?php endif; ?>
|
273 |
+
</script>
|
lib/forceutf8/Encoding.php
CHANGED
@@ -1,349 +1,354 @@
|
|
1 |
-
<?php
|
2 |
-
/*
|
3 |
-
Copyright (c) 2008 Sebastián Grignoli
|
4 |
-
All rights reserved.
|
5 |
-
|
6 |
-
Redistribution and use in source and binary forms, with or without
|
7 |
-
modification, are permitted provided that the following conditions
|
8 |
-
are met:
|
9 |
-
1. Redistributions of source code must retain the above copyright
|
10 |
-
notice, this list of conditions and the following disclaimer.
|
11 |
-
2. Redistributions in binary form must reproduce the above copyright
|
12 |
-
notice, this list of conditions and the following disclaimer in the
|
13 |
-
documentation and/or other materials provided with the distribution.
|
14 |
-
3. Neither the name of copyright holders nor the names of its
|
15 |
-
contributors may be used to endorse or promote products derived
|
16 |
-
from this software without specific prior written permission.
|
17 |
-
|
18 |
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19 |
-
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
20 |
-
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
21 |
-
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS
|
22 |
-
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
23 |
-
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
24 |
-
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
25 |
-
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
26 |
-
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
27 |
-
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
28 |
-
POSSIBILITY OF SUCH DAMAGE.
|
29 |
-
*/
|
30 |
-
|
31 |
-
/**
|
32 |
-
* @author "Sebastián Grignoli" <grignoli@gmail.com>
|
33 |
-
* @package Encoding
|
34 |
-
* @version 2.0
|
35 |
-
* @link https://github.com/neitanod/forceutf8
|
36 |
-
* @example https://github.com/neitanod/forceutf8
|
37 |
-
* @license Revised BSD
|
38 |
-
*/
|
39 |
-
|
40 |
-
//namespace ForceUTF8;
|
41 |
-
if (!class_exists('DUP_Encoding'))
|
42 |
-
{
|
43 |
-
class DUP_Encoding {
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
"\xc2\
|
86 |
-
|
87 |
-
"\xc2\
|
88 |
-
"\xc2\
|
89 |
-
"\xc2\
|
90 |
-
"\xc2\
|
91 |
-
"\xc2\
|
92 |
-
"\xc2\
|
93 |
-
"\xc2\
|
94 |
-
"\xc2\
|
95 |
-
|
96 |
-
"\xc2\
|
97 |
-
|
98 |
-
|
99 |
-
"\xc2\
|
100 |
-
|
101 |
-
|
102 |
-
"\xc2\
|
103 |
-
"\xc2\
|
104 |
-
"\xc2\
|
105 |
-
"\xc2\
|
106 |
-
"\xc2\
|
107 |
-
"\xc2\
|
108 |
-
"\xc2\
|
109 |
-
"\xc2\
|
110 |
-
"\xc2\
|
111 |
-
|
112 |
-
"\xc2\
|
113 |
-
"\xc2\
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
"\
|
121 |
-
|
122 |
-
"\xe2\x80\
|
123 |
-
"\
|
124 |
-
"\xe2\x80\
|
125 |
-
"\
|
126 |
-
"\xe2\x80\
|
127 |
-
"\
|
128 |
-
"\
|
129 |
-
"\
|
130 |
-
|
131 |
-
"\
|
132 |
-
|
133 |
-
|
134 |
-
"\
|
135 |
-
|
136 |
-
|
137 |
-
"\xe2\x80\
|
138 |
-
"\xe2\x80\
|
139 |
-
"\xe2\x80\
|
140 |
-
"\xe2\x80\
|
141 |
-
"\
|
142 |
-
"\xe2\
|
143 |
-
"\
|
144 |
-
"\
|
145 |
-
"\
|
146 |
-
|
147 |
-
"\
|
148 |
-
"\xc5\
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
*
|
157 |
-
*
|
158 |
-
*
|
159 |
-
*
|
160 |
-
*
|
161 |
-
*
|
162 |
-
*
|
163 |
-
*
|
164 |
-
*
|
165 |
-
*
|
166 |
-
*
|
167 |
-
*
|
168 |
-
*
|
169 |
-
*
|
170 |
-
*
|
171 |
-
*
|
172 |
-
*
|
173 |
-
*
|
174 |
-
*
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
$
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
$
|
205 |
-
$
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
$
|
214 |
-
$
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
$
|
223 |
-
$
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
$
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
}
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
$
|
281 |
-
|
282 |
-
}
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
|
|
|
|
|
|
|
|
|
|
349 |
}
|
1 |
+
<?php
|
2 |
+
/*
|
3 |
+
Copyright (c) 2008 Sebastián Grignoli
|
4 |
+
All rights reserved.
|
5 |
+
|
6 |
+
Redistribution and use in source and binary forms, with or without
|
7 |
+
modification, are permitted provided that the following conditions
|
8 |
+
are met:
|
9 |
+
1. Redistributions of source code must retain the above copyright
|
10 |
+
notice, this list of conditions and the following disclaimer.
|
11 |
+
2. Redistributions in binary form must reproduce the above copyright
|
12 |
+
notice, this list of conditions and the following disclaimer in the
|
13 |
+
documentation and/or other materials provided with the distribution.
|
14 |
+
3. Neither the name of copyright holders nor the names of its
|
15 |
+
contributors may be used to endorse or promote products derived
|
16 |
+
from this software without specific prior written permission.
|
17 |
+
|
18 |
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
19 |
+
``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
|
20 |
+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
21 |
+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDERS OR CONTRIBUTORS
|
22 |
+
BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
23 |
+
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
24 |
+
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
25 |
+
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
26 |
+
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
27 |
+
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
28 |
+
POSSIBILITY OF SUCH DAMAGE.
|
29 |
+
*/
|
30 |
+
|
31 |
+
/**
|
32 |
+
* @author "Sebastián Grignoli" <grignoli@gmail.com>
|
33 |
+
* @package Encoding
|
34 |
+
* @version 2.0
|
35 |
+
* @link https://github.com/neitanod/forceutf8
|
36 |
+
* @example https://github.com/neitanod/forceutf8
|
37 |
+
* @license Revised BSD
|
38 |
+
*/
|
39 |
+
|
40 |
+
//namespace ForceUTF8;
|
41 |
+
if (!class_exists('DUP_Encoding'))
|
42 |
+
{
|
43 |
+
class DUP_Encoding {
|
44 |
+
|
45 |
+
const ICONV_TRANSLIT = "TRANSLIT";
|
46 |
+
const ICONV_IGNORE = "IGNORE";
|
47 |
+
const WITHOUT_ICONV = "";
|
48 |
+
|
49 |
+
protected static $win1252ToUtf8 = array(
|
50 |
+
128 => "\xe2\x82\xac",
|
51 |
+
|
52 |
+
130 => "\xe2\x80\x9a",
|
53 |
+
131 => "\xc6\x92",
|
54 |
+
132 => "\xe2\x80\x9e",
|
55 |
+
133 => "\xe2\x80\xa6",
|
56 |
+
134 => "\xe2\x80\xa0",
|
57 |
+
135 => "\xe2\x80\xa1",
|
58 |
+
136 => "\xcb\x86",
|
59 |
+
137 => "\xe2\x80\xb0",
|
60 |
+
138 => "\xc5\xa0",
|
61 |
+
139 => "\xe2\x80\xb9",
|
62 |
+
140 => "\xc5\x92",
|
63 |
+
142 => "\xc5\xbd",
|
64 |
+
145 => "\xe2\x80\x98",
|
65 |
+
146 => "\xe2\x80\x99",
|
66 |
+
147 => "\xe2\x80\x9c",
|
67 |
+
148 => "\xe2\x80\x9d",
|
68 |
+
149 => "\xe2\x80\xa2",
|
69 |
+
150 => "\xe2\x80\x93",
|
70 |
+
151 => "\xe2\x80\x94",
|
71 |
+
152 => "\xcb\x9c",
|
72 |
+
153 => "\xe2\x84\xa2",
|
73 |
+
154 => "\xc5\xa1",
|
74 |
+
155 => "\xe2\x80\xba",
|
75 |
+
156 => "\xc5\x93",
|
76 |
+
|
77 |
+
158 => "\xc5\xbe",
|
78 |
+
159 => "\xc5\xb8"
|
79 |
+
);
|
80 |
+
|
81 |
+
protected static $brokenUtf8ToUtf8 = array(
|
82 |
+
"\xc2\x80" => "\xe2\x82\xac",
|
83 |
+
|
84 |
+
"\xc2\x82" => "\xe2\x80\x9a",
|
85 |
+
"\xc2\x83" => "\xc6\x92",
|
86 |
+
"\xc2\x84" => "\xe2\x80\x9e",
|
87 |
+
"\xc2\x85" => "\xe2\x80\xa6",
|
88 |
+
"\xc2\x86" => "\xe2\x80\xa0",
|
89 |
+
"\xc2\x87" => "\xe2\x80\xa1",
|
90 |
+
"\xc2\x88" => "\xcb\x86",
|
91 |
+
"\xc2\x89" => "\xe2\x80\xb0",
|
92 |
+
"\xc2\x8a" => "\xc5\xa0",
|
93 |
+
"\xc2\x8b" => "\xe2\x80\xb9",
|
94 |
+
"\xc2\x8c" => "\xc5\x92",
|
95 |
+
|
96 |
+
"\xc2\x8e" => "\xc5\xbd",
|
97 |
+
|
98 |
+
|
99 |
+
"\xc2\x91" => "\xe2\x80\x98",
|
100 |
+
"\xc2\x92" => "\xe2\x80\x99",
|
101 |
+
"\xc2\x93" => "\xe2\x80\x9c",
|
102 |
+
"\xc2\x94" => "\xe2\x80\x9d",
|
103 |
+
"\xc2\x95" => "\xe2\x80\xa2",
|
104 |
+
"\xc2\x96" => "\xe2\x80\x93",
|
105 |
+
"\xc2\x97" => "\xe2\x80\x94",
|
106 |
+
"\xc2\x98" => "\xcb\x9c",
|
107 |
+
"\xc2\x99" => "\xe2\x84\xa2",
|
108 |
+
"\xc2\x9a" => "\xc5\xa1",
|
109 |
+
"\xc2\x9b" => "\xe2\x80\xba",
|
110 |
+
"\xc2\x9c" => "\xc5\x93",
|
111 |
+
|
112 |
+
"\xc2\x9e" => "\xc5\xbe",
|
113 |
+
"\xc2\x9f" => "\xc5\xb8"
|
114 |
+
);
|
115 |
+
|
116 |
+
protected static $utf8ToWin1252 = array(
|
117 |
+
"\xe2\x82\xac" => "\x80",
|
118 |
+
|
119 |
+
"\xe2\x80\x9a" => "\x82",
|
120 |
+
"\xc6\x92" => "\x83",
|
121 |
+
"\xe2\x80\x9e" => "\x84",
|
122 |
+
"\xe2\x80\xa6" => "\x85",
|
123 |
+
"\xe2\x80\xa0" => "\x86",
|
124 |
+
"\xe2\x80\xa1" => "\x87",
|
125 |
+
"\xcb\x86" => "\x88",
|
126 |
+
"\xe2\x80\xb0" => "\x89",
|
127 |
+
"\xc5\xa0" => "\x8a",
|
128 |
+
"\xe2\x80\xb9" => "\x8b",
|
129 |
+
"\xc5\x92" => "\x8c",
|
130 |
+
|
131 |
+
"\xc5\xbd" => "\x8e",
|
132 |
+
|
133 |
+
|
134 |
+
"\xe2\x80\x98" => "\x91",
|
135 |
+
"\xe2\x80\x99" => "\x92",
|
136 |
+
"\xe2\x80\x9c" => "\x93",
|
137 |
+
"\xe2\x80\x9d" => "\x94",
|
138 |
+
"\xe2\x80\xa2" => "\x95",
|
139 |
+
"\xe2\x80\x93" => "\x96",
|
140 |
+
"\xe2\x80\x94" => "\x97",
|
141 |
+
"\xcb\x9c" => "\x98",
|
142 |
+
"\xe2\x84\xa2" => "\x99",
|
143 |
+
"\xc5\xa1" => "\x9a",
|
144 |
+
"\xe2\x80\xba" => "\x9b",
|
145 |
+
"\xc5\x93" => "\x9c",
|
146 |
+
|
147 |
+
"\xc5\xbe" => "\x9e",
|
148 |
+
"\xc5\xb8" => "\x9f"
|
149 |
+
);
|
150 |
+
|
151 |
+
static function toUTF8($text){
|
152 |
+
/**
|
153 |
+
* Function \ForceUTF8\Encoding::toUTF8
|
154 |
+
*
|
155 |
+
* This function leaves UTF8 characters alone, while converting almost all non-UTF8 to UTF8.
|
156 |
+
*
|
157 |
+
* It assumes that the encoding of the original string is either Windows-1252 or ISO 8859-1.
|
158 |
+
*
|
159 |
+
* It may fail to convert characters to UTF-8 if they fall into one of these scenarios:
|
160 |
+
*
|
161 |
+
* 1) when any of these characters: ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞß
|
162 |
+
* are followed by any of these: ("group B")
|
163 |
+
* ¡¢£¤¥¦§¨©ª«¬®¯°±²³´µ¶•¸¹º»¼½¾¿
|
164 |
+
* For example: %ABREPRESENT%C9%BB. «REPRESENTÉ»
|
165 |
+
* The "«" (%AB) character will be converted, but the "É" followed by "»" (%C9%BB)
|
166 |
+
* is also a valid unicode character, and will be left unchanged.
|
167 |
+
*
|
168 |
+
* 2) when any of these: àáâãäåæçèéêëìíîï are followed by TWO chars from group B,
|
169 |
+
* 3) when any of these: ðñòó are followed by THREE chars from group B.
|
170 |
+
*
|
171 |
+
* @name toUTF8
|
172 |
+
* @param string $text Any string.
|
173 |
+
* @return string The same string, UTF8 encoded
|
174 |
+
*
|
175 |
+
*/
|
176 |
+
|
177 |
+
if(is_array($text))
|
178 |
+
{
|
179 |
+
foreach($text as $k => $v)
|
180 |
+
{
|
181 |
+
$text[$k] = self::toUTF8($v);
|
182 |
+
}
|
183 |
+
return $text;
|
184 |
+
}
|
185 |
+
|
186 |
+
if(!is_string($text)) {
|
187 |
+
return $text;
|
188 |
+
}
|
189 |
+
|
190 |
+
$max = self::strlen($text);
|
191 |
+
|
192 |
+
$buf = "";
|
193 |
+
for($i = 0; $i < $max; $i++){
|
194 |
+
$c1 = $text{$i};
|
195 |
+
if($c1>="\xc0"){ //Should be converted to UTF8, if it's not UTF8 already
|
196 |
+
$c2 = $i+1 >= $max? "\x00" : $text{$i+1};
|
197 |
+
$c3 = $i+2 >= $max? "\x00" : $text{$i+2};
|
198 |
+
$c4 = $i+3 >= $max? "\x00" : $text{$i+3};
|
199 |
+
if($c1 >= "\xc0" & $c1 <= "\xdf"){ //looks like 2 bytes UTF8
|
200 |
+
if($c2 >= "\x80" && $c2 <= "\xbf"){ //yeah, almost sure it's UTF8 already
|
201 |
+
$buf .= $c1 . $c2;
|
202 |
+
$i++;
|
203 |
+
} else { //not valid UTF8. Convert it.
|
204 |
+
$cc1 = (chr(ord($c1) / 64) | "\xc0");
|
205 |
+
$cc2 = ($c1 & "\x3f") | "\x80";
|
206 |
+
$buf .= $cc1 . $cc2;
|
207 |
+
}
|
208 |
+
} elseif($c1 >= "\xe0" & $c1 <= "\xef"){ //looks like 3 bytes UTF8
|
209 |
+
if($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf"){ //yeah, almost sure it's UTF8 already
|
210 |
+
$buf .= $c1 . $c2 . $c3;
|
211 |
+
$i = $i + 2;
|
212 |
+
} else { //not valid UTF8. Convert it.
|
213 |
+
$cc1 = (chr(ord($c1) / 64) | "\xc0");
|
214 |
+
$cc2 = ($c1 & "\x3f") | "\x80";
|
215 |
+
$buf .= $cc1 . $cc2;
|
216 |
+
}
|
217 |
+
} elseif($c1 >= "\xf0" & $c1 <= "\xf7"){ //looks like 4 bytes UTF8
|
218 |
+
if($c2 >= "\x80" && $c2 <= "\xbf" && $c3 >= "\x80" && $c3 <= "\xbf" && $c4 >= "\x80" && $c4 <= "\xbf"){ //yeah, almost sure it's UTF8 already
|
219 |
+
$buf .= $c1 . $c2 . $c3 . $c4;
|
220 |
+
$i = $i + 3;
|
221 |
+
} else { //not valid UTF8. Convert it.
|
222 |
+
$cc1 = (chr(ord($c1) / 64) | "\xc0");
|
223 |
+
$cc2 = ($c1 & "\x3f") | "\x80";
|
224 |
+
$buf .= $cc1 . $cc2;
|
225 |
+
}
|
226 |
+
} else { //doesn't look like UTF8, but should be converted
|
227 |
+
$cc1 = (chr(ord($c1) / 64) | "\xc0");
|
228 |
+
$cc2 = (($c1 & "\x3f") | "\x80");
|
229 |
+
$buf .= $cc1 . $cc2;
|
230 |
+
}
|
231 |
+
} elseif(($c1 & "\xc0") == "\x80"){ // needs conversion
|
232 |
+
if(isset(self::$win1252ToUtf8[ord($c1)])) { //found in Windows-1252 special cases
|
233 |
+
$buf .= self::$win1252ToUtf8[ord($c1)];
|
234 |
+
} else {
|
235 |
+
$cc1 = (chr(ord($c1) / 64) | "\xc0");
|
236 |
+
$cc2 = (($c1 & "\x3f") | "\x80");
|
237 |
+
$buf .= $cc1 . $cc2;
|
238 |
+
}
|
239 |
+
} else { // it doesn't need conversion
|
240 |
+
$buf .= $c1;
|
241 |
+
}
|
242 |
+
}
|
243 |
+
return $buf;
|
244 |
+
}
|
245 |
+
|
246 |
+
static function toWin1252($text, $option = self::WITHOUT_ICONV) {
|
247 |
+
if(is_array($text)) {
|
248 |
+
foreach($text as $k => $v) {
|
249 |
+
$text[$k] = self::toWin1252($v, $option);
|
250 |
+
}
|
251 |
+
return $text;
|
252 |
+
} else if(is_string($text)) {
|
253 |
+
return self::utf8_decode($text, $option);
|
254 |
+
} else {
|
255 |
+
return $text;
|
256 |
+
}
|
257 |
+
}
|
258 |
+
|
259 |
+
static function toISO8859($text) {
|
260 |
+
return self::toWin1252($text);
|
261 |
+
}
|
262 |
+
|
263 |
+
static function toLatin1($text) {
|
264 |
+
return self::toWin1252($text);
|
265 |
+
}
|
266 |
+
|
267 |
+
static function fixUTF8($text, $option = self::WITHOUT_ICONV){
|
268 |
+
if(is_array($text)) {
|
269 |
+
foreach($text as $k => $v) {
|
270 |
+
$text[$k] = self::fixUTF8($v, $option);
|
271 |
+
}
|
272 |
+
return $text;
|
273 |
+
}
|
274 |
+
|
275 |
+
$last = "";
|
276 |
+
while($last <> $text){
|
277 |
+
$last = $text;
|
278 |
+
$text = self::toUTF8(self::utf8_decode($text, $option));
|
279 |
+
}
|
280 |
+
$text = self::toUTF8(self::utf8_decode($text, $option));
|
281 |
+
return $text;
|
282 |
+
}
|
283 |
+
|
284 |
+
static function UTF8FixWin1252Chars($text){
|
285 |
+
// If you received an UTF-8 string that was converted from Windows-1252 as it was ISO8859-1
|
286 |
+
// (ignoring Windows-1252 chars from 80 to 9F) use this function to fix it.
|
287 |
+
// See: http://en.wikipedia.org/wiki/Windows-1252
|
288 |
+
|
289 |
+
return str_replace(array_keys(self::$brokenUtf8ToUtf8), array_values(self::$brokenUtf8ToUtf8), $text);
|
290 |
+
}
|
291 |
+
|
292 |
+
static function removeBOM($str=""){
|
293 |
+
if(substr($str, 0,3) == pack("CCC",0xef,0xbb,0xbf)) {
|
294 |
+
$str=substr($str, 3);
|
295 |
+
}
|
296 |
+
return $str;
|
297 |
+
}
|
298 |
+
|
299 |
+
protected static function strlen($text)
|
300 |
+
{
|
301 |
+
if((version_compare(PHP_VERSION, '7.2.0') >= 0)) {
|
302 |
+
return (function_exists('mb_strlen'))
|
303 |
+
? mb_strlen($text,'8bit')
|
304 |
+
: strlen($text);
|
305 |
+
} else {
|
306 |
+
return (function_exists('mb_strlen') && ((int) ini_get('mbstring.func_overload')) & 2)
|
307 |
+
? mb_strlen($text,'8bit')
|
308 |
+
: strlen($text);
|
309 |
+
}
|
310 |
+
}
|
311 |
+
|
312 |
+
public static function normalizeEncoding($encodingLabel)
|
313 |
+
{
|
314 |
+
$encoding = strtoupper($encodingLabel);
|
315 |
+
$encoding = preg_replace('/[^a-zA-Z0-9\s]/', '', $encoding);
|
316 |
+
$equivalences = array(
|
317 |
+
'ISO88591' => 'ISO-8859-1',
|
318 |
+
'ISO8859' => 'ISO-8859-1',
|
319 |
+
'ISO' => 'ISO-8859-1',
|
320 |
+
'LATIN1' => 'ISO-8859-1',
|
321 |
+
'LATIN' => 'ISO-8859-1',
|
322 |
+
'UTF8' => 'UTF-8',
|
323 |
+
'UTF' => 'UTF-8',
|
324 |
+
'WIN1252' => 'ISO-8859-1',
|
325 |
+
'WINDOWS1252' => 'ISO-8859-1'
|
326 |
+
);
|
327 |
+
|
328 |
+
if(empty($equivalences[$encoding])){
|
329 |
+
return 'UTF-8';
|
330 |
+
}
|
331 |
+
|
332 |
+
return $equivalences[$encoding];
|
333 |
+
}
|
334 |
+
|
335 |
+
public static function encode($encodingLabel, $text)
|
336 |
+
{
|
337 |
+
$encodingLabel = self::normalizeEncoding($encodingLabel);
|
338 |
+
if($encodingLabel == 'ISO-8859-1') return self::toLatin1($text);
|
339 |
+
return self::toUTF8($text);
|
340 |
+
}
|
341 |
+
|
342 |
+
protected static function utf8_decode($text, $option)
|
343 |
+
{
|
344 |
+
if ($option == self::WITHOUT_ICONV || !function_exists('iconv')) {
|
345 |
+
$o = utf8_decode(
|
346 |
+
str_replace(array_keys(self::$utf8ToWin1252), array_values(self::$utf8ToWin1252), self::toUTF8($text))
|
347 |
+
);
|
348 |
+
} else {
|
349 |
+
$o = iconv("UTF-8", "Windows-1252" . ($option == self::ICONV_TRANSLIT ? '//TRANSLIT' : ($option == self::ICONV_IGNORE ? '//IGNORE' : '')), $text);
|
350 |
+
}
|
351 |
+
return $o;
|
352 |
+
}
|
353 |
+
}
|
354 |
}
|
readme.txt
CHANGED
@@ -3,9 +3,9 @@ Contributors: corylamleorg, bobriley
|
|
3 |
Donate link: www.lifeinthegrid.com/partner
|
4 |
Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
|
5 |
Requires at least: 4.0
|
6 |
-
Tested up to: 4.9
|
7 |
Requires PHP: 5.2.17
|
8 |
-
Stable tag: 1.2.
|
9 |
License: GPLv2
|
10 |
|
11 |
WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
|
3 |
Donate link: www.lifeinthegrid.com/partner
|
4 |
Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, automate, copy site
|
5 |
Requires at least: 4.0
|
6 |
+
Tested up to: 4.9.4
|
7 |
Requires PHP: 5.2.17
|
8 |
+
Stable tag: 1.2.34
|
9 |
License: GPLv2
|
10 |
|
11 |
WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
|
views/help/gopro.php
CHANGED
@@ -1,237 +1,237 @@
|
|
1 |
-
<?php
|
2 |
-
DUP_Util::hasCapability('read');
|
3 |
-
|
4 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
5 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
6 |
-
?>
|
7 |
-
<style>
|
8 |
-
/*================================================
|
9 |
-
PAGE-SUPPORT:*/
|
10 |
-
div.dup-pro-area {
|
11 |
-
padding:10px 70px; max-width:750px; width:90%; margin:auto; text-align:center;
|
12 |
-
background:#fff; border-radius:20px;
|
13 |
-
box-shadow:inset 0px 0px 67px 20px rgba(241,241,241,1);
|
14 |
-
}
|
15 |
-
i.dup-gopro-help {color:#777 !important; margin-left:5px; font-size:14px; }
|
16 |
-
td.group-header {background-color:#D5D5D5; color: #000; font-size: 20px; padding:7px !important; font-weight: bold}
|
17 |
-
div.dup-compare-area {width:400px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow:0 8px 6px -6px #ccc;}
|
18 |
-
div.feature {background:#fff; padding:15px; margin:2px; text-align:center; min-height:20px}
|
19 |
-
div.feature a {font-size:18px; font-weight:bold;}
|
20 |
-
div.dup-compare-area div.feature div.info {display:none; padding:7px 7px 5px 7px; font-style:italic; color:#555; font-size:14px}
|
21 |
-
div.dup-gopro-header {text-align:center; margin:5px 0 15px 0; font-size:18px; line-height:30px}
|
22 |
-
div.dup-gopro-header b {font-size:35px}
|
23 |
-
button.dup-check-it-btn {box-shadow:5px 5px 5px 0px #999 !important; font-size:20px !important; height:45px !important; padding:7px 30px 7px 30px !important; color:white!important; background-color: #3e8f3e!important; font-weight: bold!important;
|
24 |
-
color: white;
|
25 |
-
font-weight: bold;}
|
26 |
-
|
27 |
-
#comparison-table { margin-top:25px; border-spacing:0px; width:100%}
|
28 |
-
#comparison-table th { color:#E21906;}
|
29 |
-
#comparison-table td, #comparison-table th { font-size:1.2rem; padding:11px; }
|
30 |
-
#comparison-table .feature-column { text-align:left; width:46%}
|
31 |
-
#comparison-table .check-column { text-align:center; width:27% }
|
32 |
-
#comparison-table tr:nth-child(2n+2) {background-color:#f6f6f6; }
|
33 |
-
</style>
|
34 |
-
|
35 |
-
<div class="dup-pro-area">
|
36 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50-nosnap.png" />
|
37 |
-
<div style="font-size:18px; font-style:italic; color:gray">
|
38 |
-
<?php _e('The simplicity of Duplicator', 'duplicator') ?>
|
39 |
-
<?php _e('with power for the professional.', 'duplicator') ?>
|
40 |
-
</div>
|
41 |
-
|
42 |
-
<table id="comparison-table">
|
43 |
-
<tr>
|
44 |
-
<th class="feature-column"><?php _e('Feature', 'duplicator') ?></th>
|
45 |
-
<th class="check-column"><?php _e('Free', 'duplicator') ?></th>
|
46 |
-
<th class="check-column"><?php _e('Professional', 'duplicator') ?></th>
|
47 |
-
</tr>
|
48 |
-
<!-- =====================
|
49 |
-
CORE FEATURES
|
50 |
-
<tr>
|
51 |
-
<td colspan="3" class="group-header"><?php _e('Core Features', 'duplicator') ?></td>
|
52 |
-
</tr> -->
|
53 |
-
<tr>
|
54 |
-
<td class="feature-column"><?php _e('Backup Files & Database', 'duplicator') ?></td>
|
55 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
56 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
57 |
-
</tr>
|
58 |
-
<tr>
|
59 |
-
<td class="feature-column"><?php _e('File Filters', 'duplicator') ?></td>
|
60 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
61 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
62 |
-
</tr>
|
63 |
-
<tr>
|
64 |
-
<td class="feature-column"><?php _e('Database Table Filters', 'duplicator') ?></td>
|
65 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
66 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
67 |
-
</tr>
|
68 |
-
<tr>
|
69 |
-
<td class="feature-column"><?php _e('Migration Wizard', 'duplicator') ?></td>
|
70 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
71 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
72 |
-
</tr>
|
73 |
-
<tr>
|
74 |
-
<td class="feature-column"><?php _e('Scheduled Backups', 'duplicator') ?></td>
|
75 |
-
<td class="check-column"></td>
|
76 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
77 |
-
</tr>
|
78 |
-
<!-- =====================
|
79 |
-
CLOUD STORAGE
|
80 |
-
<tr>
|
81 |
-
<td colspan="3" class="group-header"><?php _e('Cloud Storage', 'duplicator') ?></td>
|
82 |
-
</tr>-->
|
83 |
-
<tr>
|
84 |
-
<td class="feature-column">
|
85 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/amazon-64.png" style='height:16px; width:16px' />
|
86 |
-
<?php _e('Amazon S3 Storage', 'duplicator') ?>
|
87 |
-
</td>
|
88 |
-
<td class="check-column"></td>
|
89 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
90 |
-
</tr>
|
91 |
-
<tr>
|
92 |
-
<td class="feature-column">
|
93 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/dropbox-64.png" style='height:16px; width:16px' />
|
94 |
-
<?php _e('Dropbox Storage ', 'duplicator') ?>
|
95 |
-
</td>
|
96 |
-
<td class="check-column"></td>
|
97 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
98 |
-
</tr>
|
99 |
-
<tr>
|
100 |
-
<td class="feature-column">
|
101 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" style='height:16px; width:16px' />
|
102 |
-
<?php _e('Google Drive Storage', 'duplicator') ?>
|
103 |
-
</td>
|
104 |
-
<td class="check-column"></td>
|
105 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
106 |
-
</tr>
|
107 |
-
<tr>
|
108 |
-
<td class="feature-column">
|
109 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" style='height:16px; width:16px' />
|
110 |
-
<?php _e('Remote FTP Storage', 'duplicator') ?>
|
111 |
-
</td>
|
112 |
-
<td class="check-column"></td>
|
113 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
114 |
-
</tr>
|
115 |
-
|
116 |
-
<!-- =====================
|
117 |
-
ENHANCED PROCCESING
|
118 |
-
<tr>
|
119 |
-
<td colspan="3" class="group-header"><?php _e('Improved Processing', 'duplicator') ?></td>
|
120 |
-
</tr>-->
|
121 |
-
<tr>
|
122 |
-
<td class="feature-column"><?php _e('Large Site Support', 'duplicator') ?><sup>
|
123 |
-
<i class="fa fa-question-circle dup-gopro-help"
|
124 |
-
data-tooltip-title="<?php _e("Large Site Support", 'duplicator'); ?>"
|
125 |
-
data-tooltip="<?php _e('Advanced archive engine processes multi-gig sites - even on stubborn budget hosts!', 'duplicator'); ?>"/></i></sup>
|
126 |
-
</td>
|
127 |
-
<td class="check-column"></td>
|
128 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
129 |
-
</tr>
|
130 |
-
<tr>
|
131 |
-
<td class="feature-column"><?php _e('Multiple Archive Engines', 'duplicator') ?></td>
|
132 |
-
<td class="check-column"></td>
|
133 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
134 |
-
</tr>
|
135 |
-
<tr>
|
136 |
-
<td class="feature-column"><?php _e('Server Throttling', 'duplicator') ?></td>
|
137 |
-
<td class="check-column"></td>
|
138 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
139 |
-
</tr>
|
140 |
-
<tr>
|
141 |
-
<td class="feature-column"><?php _e('Background Processing', 'duplicator') ?></td>
|
142 |
-
<td class="check-column"></td>
|
143 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
144 |
-
</tr>
|
145 |
-
|
146 |
-
<!-- =====================
|
147 |
-
ROBUST INSTALLATION
|
148 |
-
<tr>
|
149 |
-
<td colspan="3" class="group-header"><?php _e('Robust Installation', 'duplicator') ?></td>
|
150 |
-
</tr>-->
|
151 |
-
<tr>
|
152 |
-
<td class="feature-column"><?php _e('Installer Passwords', 'duplicator') ?></td>
|
153 |
-
<td class="check-column"></td>
|
154 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
155 |
-
</tr>
|
156 |
-
<tr>
|
157 |
-
<td class="feature-column">
|
158 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/cpanel-48.png" style="width:16px; height:12px" />
|
159 |
-
<?php _e('cPanel Database API', 'duplicator') ?>
|
160 |
-
<sup>
|
161 |
-
<i class="fa fa-question-circle dup-gopro-help"
|
162 |
-
data-tooltip-title="<?php _e("cPanel", 'duplicator'); ?>"
|
163 |
-
data-tooltip="<?php _e('Create the database and database user directly in the installer. No need to browse to your host\'s cPanel application.', 'duplicator'); ?>"/></i></sup>
|
164 |
-
</td>
|
165 |
-
<td class="check-column"></td>
|
166 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
167 |
-
</tr>
|
168 |
-
|
169 |
-
|
170 |
-
<!-- =====================
|
171 |
-
MULTI-SITE
|
172 |
-
<tr>
|
173 |
-
<td colspan="3" class="group-header"><?php _e('Multisite', 'duplicator') ?></td>
|
174 |
-
</tr>-->
|
175 |
-
<tr>
|
176 |
-
<td class="feature-column"><?php _e('Multisite Network Migration', 'duplicator') ?></td>
|
177 |
-
<td class="check-column"></td>
|
178 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
179 |
-
</tr>
|
180 |
-
<tr>
|
181 |
-
<td class="feature-column"><?php _e('Multisite Subsite > Standalone', 'duplicator') ?><sup>
|
182 |
-
<i class="fa fa-question-circle dup-gopro-help"
|
183 |
-
data-tooltip-title="<?php _e("Multisite", 'duplicator'); ?>"
|
184 |
-
data-tooltip="<?php _e('Install an individual subsite from a Multisite as a standalone site.', 'duplicator'); ?>"/></i></sup>
|
185 |
-
</td>
|
186 |
-
<td class="check-column"></td>
|
187 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
188 |
-
</tr>
|
189 |
-
|
190 |
-
<tr>
|
191 |
-
<td class="feature-column"><?php _e('Custom Search & Replace', 'duplicator') ?></td>
|
192 |
-
<td class="check-column"></td>
|
193 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
194 |
-
</tr>
|
195 |
-
<!--tr>
|
196 |
-
<td class="feature-column"><?php _e('Duplicate Subsite in Network', 'duplicator') ?></td>
|
197 |
-
<td class="check-column"></td>
|
198 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
199 |
-
</tr-->
|
200 |
-
|
201 |
-
<!-- =====================
|
202 |
-
ENHANCED EXPERIENCE
|
203 |
-
<tr>
|
204 |
-
<td colspan="3" class="group-header"><?php _e('Enhanced Experience', 'duplicator') ?></td>
|
205 |
-
</tr>-->
|
206 |
-
<tr>
|
207 |
-
<td class="feature-column"><?php _e('Email Alerts', 'duplicator') ?></td>
|
208 |
-
<td class="check-column"></td>
|
209 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
210 |
-
</tr>
|
211 |
-
|
212 |
-
<tr>
|
213 |
-
<td class="feature-column"><?php _e('Manual Transfers', 'duplicator') ?></td>
|
214 |
-
<td class="check-column"></td>
|
215 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
216 |
-
</tr>
|
217 |
-
<tr>
|
218 |
-
<td class="feature-column"><?php _e('Active Customer Support', 'duplicator') ?></td>
|
219 |
-
<td class="check-column"></td>
|
220 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
221 |
-
</tr>
|
222 |
-
<tr>
|
223 |
-
<td class="feature-column"><?php _e('Plus Many Other Features...', 'duplicator') ?></td>
|
224 |
-
<td class="check-column"></td>
|
225 |
-
<td class="check-column"><i class="fa fa-check"></i></td>
|
226 |
-
</tr>
|
227 |
-
</table>
|
228 |
-
|
229 |
-
<br style="clear:both" />
|
230 |
-
<p style="text-align:center">
|
231 |
-
<button onclick="window.open('https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_go_pro&utm_campaign=duplicator_pro');" class="button button-large dup-check-it-btn" >
|
232 |
-
<?php _e('Check It Out!', 'duplicator') ?>
|
233 |
-
</button>
|
234 |
-
</p>
|
235 |
-
<br/><br/>
|
236 |
-
</div>
|
237 |
<br/><br/>
|
1 |
+
<?php
|
2 |
+
DUP_Util::hasCapability('read');
|
3 |
+
|
4 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
5 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
6 |
+
?>
|
7 |
+
<style>
|
8 |
+
/*================================================
|
9 |
+
PAGE-SUPPORT:*/
|
10 |
+
div.dup-pro-area {
|
11 |
+
padding:10px 70px; max-width:750px; width:90%; margin:auto; text-align:center;
|
12 |
+
background:#fff; border-radius:20px;
|
13 |
+
box-shadow:inset 0px 0px 67px 20px rgba(241,241,241,1);
|
14 |
+
}
|
15 |
+
i.dup-gopro-help {color:#777 !important; margin-left:5px; font-size:14px; }
|
16 |
+
td.group-header {background-color:#D5D5D5; color: #000; font-size: 20px; padding:7px !important; font-weight: bold}
|
17 |
+
div.dup-compare-area {width:400px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow:0 8px 6px -6px #ccc;}
|
18 |
+
div.feature {background:#fff; padding:15px; margin:2px; text-align:center; min-height:20px}
|
19 |
+
div.feature a {font-size:18px; font-weight:bold;}
|
20 |
+
div.dup-compare-area div.feature div.info {display:none; padding:7px 7px 5px 7px; font-style:italic; color:#555; font-size:14px}
|
21 |
+
div.dup-gopro-header {text-align:center; margin:5px 0 15px 0; font-size:18px; line-height:30px}
|
22 |
+
div.dup-gopro-header b {font-size:35px}
|
23 |
+
button.dup-check-it-btn {box-shadow:5px 5px 5px 0px #999 !important; font-size:20px !important; height:45px !important; padding:7px 30px 7px 30px !important; color:white!important; background-color: #3e8f3e!important; font-weight: bold!important;
|
24 |
+
color: white;
|
25 |
+
font-weight: bold;}
|
26 |
+
|
27 |
+
#comparison-table { margin-top:25px; border-spacing:0px; width:100%}
|
28 |
+
#comparison-table th { color:#E21906;}
|
29 |
+
#comparison-table td, #comparison-table th { font-size:1.2rem; padding:11px; }
|
30 |
+
#comparison-table .feature-column { text-align:left; width:46%}
|
31 |
+
#comparison-table .check-column { text-align:center; width:27% }
|
32 |
+
#comparison-table tr:nth-child(2n+2) {background-color:#f6f6f6; }
|
33 |
+
</style>
|
34 |
+
|
35 |
+
<div class="dup-pro-area">
|
36 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50-nosnap.png" />
|
37 |
+
<div style="font-size:18px; font-style:italic; color:gray">
|
38 |
+
<?php _e('The simplicity of Duplicator', 'duplicator') ?>
|
39 |
+
<?php _e('with power for the professional.', 'duplicator') ?>
|
40 |
+
</div>
|
41 |
+
|
42 |
+
<table id="comparison-table">
|
43 |
+
<tr>
|
44 |
+
<th class="feature-column"><?php _e('Feature', 'duplicator') ?></th>
|
45 |
+
<th class="check-column"><?php _e('Free', 'duplicator') ?></th>
|
46 |
+
<th class="check-column"><?php _e('Professional', 'duplicator') ?></th>
|
47 |
+
</tr>
|
48 |
+
<!-- =====================
|
49 |
+
CORE FEATURES
|
50 |
+
<tr>
|
51 |
+
<td colspan="3" class="group-header"><?php _e('Core Features', 'duplicator') ?></td>
|
52 |
+
</tr> -->
|
53 |
+
<tr>
|
54 |
+
<td class="feature-column"><?php _e('Backup Files & Database', 'duplicator') ?></td>
|
55 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
56 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
57 |
+
</tr>
|
58 |
+
<tr>
|
59 |
+
<td class="feature-column"><?php _e('File Filters', 'duplicator') ?></td>
|
60 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
61 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
62 |
+
</tr>
|
63 |
+
<tr>
|
64 |
+
<td class="feature-column"><?php _e('Database Table Filters', 'duplicator') ?></td>
|
65 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
66 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
67 |
+
</tr>
|
68 |
+
<tr>
|
69 |
+
<td class="feature-column"><?php _e('Migration Wizard', 'duplicator') ?></td>
|
70 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
71 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
72 |
+
</tr>
|
73 |
+
<tr>
|
74 |
+
<td class="feature-column"><?php _e('Scheduled Backups', 'duplicator') ?></td>
|
75 |
+
<td class="check-column"></td>
|
76 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
77 |
+
</tr>
|
78 |
+
<!-- =====================
|
79 |
+
CLOUD STORAGE
|
80 |
+
<tr>
|
81 |
+
<td colspan="3" class="group-header"><?php _e('Cloud Storage', 'duplicator') ?></td>
|
82 |
+
</tr>-->
|
83 |
+
<tr>
|
84 |
+
<td class="feature-column">
|
85 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/amazon-64.png" style='height:16px; width:16px' />
|
86 |
+
<?php _e('Amazon S3 Storage', 'duplicator') ?>
|
87 |
+
</td>
|
88 |
+
<td class="check-column"></td>
|
89 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
90 |
+
</tr>
|
91 |
+
<tr>
|
92 |
+
<td class="feature-column">
|
93 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/dropbox-64.png" style='height:16px; width:16px' />
|
94 |
+
<?php _e('Dropbox Storage ', 'duplicator') ?>
|
95 |
+
</td>
|
96 |
+
<td class="check-column"></td>
|
97 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
98 |
+
</tr>
|
99 |
+
<tr>
|
100 |
+
<td class="feature-column">
|
101 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" style='height:16px; width:16px' />
|
102 |
+
<?php _e('Google Drive Storage', 'duplicator') ?>
|
103 |
+
</td>
|
104 |
+
<td class="check-column"></td>
|
105 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
106 |
+
</tr>
|
107 |
+
<tr>
|
108 |
+
<td class="feature-column">
|
109 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" style='height:16px; width:16px' />
|
110 |
+
<?php _e('Remote FTP/SFTP Storage', 'duplicator') ?>
|
111 |
+
</td>
|
112 |
+
<td class="check-column"></td>
|
113 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
114 |
+
</tr>
|
115 |
+
|
116 |
+
<!-- =====================
|
117 |
+
ENHANCED PROCCESING
|
118 |
+
<tr>
|
119 |
+
<td colspan="3" class="group-header"><?php _e('Improved Processing', 'duplicator') ?></td>
|
120 |
+
</tr>-->
|
121 |
+
<tr>
|
122 |
+
<td class="feature-column"><?php _e('Large Site Support', 'duplicator') ?><sup>
|
123 |
+
<i class="fa fa-question-circle dup-gopro-help"
|
124 |
+
data-tooltip-title="<?php _e("Large Site Support", 'duplicator'); ?>"
|
125 |
+
data-tooltip="<?php _e('Advanced archive engine processes multi-gig sites - even on stubborn budget hosts!', 'duplicator'); ?>"/></i></sup>
|
126 |
+
</td>
|
127 |
+
<td class="check-column"></td>
|
128 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
129 |
+
</tr>
|
130 |
+
<tr>
|
131 |
+
<td class="feature-column"><?php _e('Multiple Archive Engines', 'duplicator') ?></td>
|
132 |
+
<td class="check-column"></td>
|
133 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
134 |
+
</tr>
|
135 |
+
<tr>
|
136 |
+
<td class="feature-column"><?php _e('Server Throttling', 'duplicator') ?></td>
|
137 |
+
<td class="check-column"></td>
|
138 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
139 |
+
</tr>
|
140 |
+
<tr>
|
141 |
+
<td class="feature-column"><?php _e('Background Processing', 'duplicator') ?></td>
|
142 |
+
<td class="check-column"></td>
|
143 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
144 |
+
</tr>
|
145 |
+
|
146 |
+
<!-- =====================
|
147 |
+
ROBUST INSTALLATION
|
148 |
+
<tr>
|
149 |
+
<td colspan="3" class="group-header"><?php _e('Robust Installation', 'duplicator') ?></td>
|
150 |
+
</tr>-->
|
151 |
+
<tr>
|
152 |
+
<td class="feature-column"><?php _e('Installer Passwords', 'duplicator') ?></td>
|
153 |
+
<td class="check-column"></td>
|
154 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
155 |
+
</tr>
|
156 |
+
<tr>
|
157 |
+
<td class="feature-column">
|
158 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/cpanel-48.png" style="width:16px; height:12px" />
|
159 |
+
<?php _e('cPanel Database API', 'duplicator') ?>
|
160 |
+
<sup>
|
161 |
+
<i class="fa fa-question-circle dup-gopro-help"
|
162 |
+
data-tooltip-title="<?php _e("cPanel", 'duplicator'); ?>"
|
163 |
+
data-tooltip="<?php _e('Create the database and database user directly in the installer. No need to browse to your host\'s cPanel application.', 'duplicator'); ?>"/></i></sup>
|
164 |
+
</td>
|
165 |
+
<td class="check-column"></td>
|
166 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
167 |
+
</tr>
|
168 |
+
|
169 |
+
|
170 |
+
<!-- =====================
|
171 |
+
MULTI-SITE
|
172 |
+
<tr>
|
173 |
+
<td colspan="3" class="group-header"><?php _e('Multisite', 'duplicator') ?></td>
|
174 |
+
</tr>-->
|
175 |
+
<tr>
|
176 |
+
<td class="feature-column"><?php _e('Multisite Network Migration', 'duplicator') ?></td>
|
177 |
+
<td class="check-column"></td>
|
178 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
179 |
+
</tr>
|
180 |
+
<tr>
|
181 |
+
<td class="feature-column"><?php _e('Multisite Subsite > Standalone', 'duplicator') ?><sup>
|
182 |
+
<i class="fa fa-question-circle dup-gopro-help"
|
183 |
+
data-tooltip-title="<?php _e("Multisite", 'duplicator'); ?>"
|
184 |
+
data-tooltip="<?php _e('Install an individual subsite from a Multisite as a standalone site.', 'duplicator'); ?>"/></i></sup>
|
185 |
+
</td>
|
186 |
+
<td class="check-column"></td>
|
187 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
188 |
+
</tr>
|
189 |
+
|
190 |
+
<tr>
|
191 |
+
<td class="feature-column"><?php _e('Custom Search & Replace', 'duplicator') ?></td>
|
192 |
+
<td class="check-column"></td>
|
193 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
194 |
+
</tr>
|
195 |
+
<!--tr>
|
196 |
+
<td class="feature-column"><?php _e('Duplicate Subsite in Network', 'duplicator') ?></td>
|
197 |
+
<td class="check-column"></td>
|
198 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
199 |
+
</tr-->
|
200 |
+
|
201 |
+
<!-- =====================
|
202 |
+
ENHANCED EXPERIENCE
|
203 |
+
<tr>
|
204 |
+
<td colspan="3" class="group-header"><?php _e('Enhanced Experience', 'duplicator') ?></td>
|
205 |
+
</tr>-->
|
206 |
+
<tr>
|
207 |
+
<td class="feature-column"><?php _e('Email Alerts', 'duplicator') ?></td>
|
208 |
+
<td class="check-column"></td>
|
209 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
210 |
+
</tr>
|
211 |
+
|
212 |
+
<tr>
|
213 |
+
<td class="feature-column"><?php _e('Manual Transfers', 'duplicator') ?></td>
|
214 |
+
<td class="check-column"></td>
|
215 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
216 |
+
</tr>
|
217 |
+
<tr>
|
218 |
+
<td class="feature-column"><?php _e('Active Customer Support', 'duplicator') ?></td>
|
219 |
+
<td class="check-column"></td>
|
220 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
221 |
+
</tr>
|
222 |
+
<tr>
|
223 |
+
<td class="feature-column"><?php _e('Plus Many Other Features...', 'duplicator') ?></td>
|
224 |
+
<td class="check-column"></td>
|
225 |
+
<td class="check-column"><i class="fa fa-check"></i></td>
|
226 |
+
</tr>
|
227 |
+
</table>
|
228 |
+
|
229 |
+
<br style="clear:both" />
|
230 |
+
<p style="text-align:center">
|
231 |
+
<button onclick="window.open('https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_go_pro&utm_campaign=duplicator_pro');" class="button button-large dup-check-it-btn" >
|
232 |
+
<?php _e('Check It Out!', 'duplicator') ?>
|
233 |
+
</button>
|
234 |
+
</p>
|
235 |
+
<br/><br/>
|
236 |
+
</div>
|
237 |
<br/><br/>
|
views/packages/details/detail.php
CHANGED
@@ -1,383 +1,383 @@
|
|
1 |
-
<?php
|
2 |
-
$view_state = DUP_UI_ViewState::getArray();
|
3 |
-
$ui_css_general = (isset($view_state['dup-package-dtl-general-panel']) && $view_state['dup-package-dtl-general-panel']) ? 'display:block' : 'display:none';
|
4 |
-
$ui_css_storage = (isset($view_state['dup-package-dtl-storage-panel']) && $view_state['dup-package-dtl-storage-panel']) ? 'display:block' : 'display:none';
|
5 |
-
$ui_css_archive = (isset($view_state['dup-package-dtl-archive-panel']) && $view_state['dup-package-dtl-archive-panel']) ? 'display:block' : 'display:none';
|
6 |
-
$ui_css_install = (isset($view_state['dup-package-dtl-install-panel']) && $view_state['dup-package-dtl-install-panel']) ? 'display:block' : 'display:none';
|
7 |
-
|
8 |
-
$link_sql = "{$package->StoreURL}{$package->NameHash}_database.sql";
|
9 |
-
$link_archive = "{$package->StoreURL}{$package->NameHash}_archive.zip";
|
10 |
-
$link_installer = "{$package->StoreURL}{$package->NameHash}_installer.php?get=1&file={$package->NameHash}_installer.php";
|
11 |
-
$link_log = "{$package->StoreURL}{$package->NameHash}.log";
|
12 |
-
$link_scan = "{$package->StoreURL}{$package->NameHash}_scan.json";
|
13 |
-
|
14 |
-
$debug_on = DUP_Settings::Get('package_debug');
|
15 |
-
$mysqldump_on = DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath();
|
16 |
-
$mysqlcompat_on = isset($
|
17 |
-
$mysqlcompat_on = ($mysqldump_on && $mysqlcompat_on) ? true : false;
|
18 |
-
$dbbuild_mode = ($mysqldump_on) ? 'mysqldump' : 'PHP';
|
19 |
-
?>
|
20 |
-
|
21 |
-
<style>
|
22 |
-
/*COMMON*/
|
23 |
-
div.toggle-box {float:right; margin: 5px 5px 5px 0}
|
24 |
-
div.dup-box {margin-top: 15px; font-size:14px; clear: both}
|
25 |
-
table.dup-dtl-data-tbl {width:100%}
|
26 |
-
table.dup-dtl-data-tbl tr {vertical-align: top}
|
27 |
-
table.dup-dtl-data-tbl tr:first-child td {margin:0; padding-top:0 !important;}
|
28 |
-
table.dup-dtl-data-tbl td {padding:0 5px 0 0; padding-top:10px !important;}
|
29 |
-
table.dup-dtl-data-tbl td:first-child {font-weight: bold; width:130px}
|
30 |
-
table.dup-sub-list td:first-child {white-space: nowrap; vertical-align: middle; width: 70px !important;}
|
31 |
-
table.dup-sub-list td {white-space: nowrap; vertical-align:top; padding:0 !important; font-size:12px}
|
32 |
-
div.dup-box-panel-hdr {font-size:14px; display:block; border-bottom: 1px dotted #efefef; margin:5px 0 5px 0; font-weight: bold; padding: 0 0 5px 0}
|
33 |
-
tr.sub-item td:first-child {padding:0 0 0 40px}
|
34 |
-
tr.sub-item td {font-size: 12px}
|
35 |
-
tr.sub-item-disabled td {color:gray}
|
36 |
-
|
37 |
-
/*STORAGE*/
|
38 |
-
div.dup-store-pro {font-size:12px; font-style:italic;}
|
39 |
-
div.dup-store-pro img {height:14px; width:14px; vertical-align: text-top}
|
40 |
-
div.dup-store-pro a {text-decoration: underline}
|
41 |
-
|
42 |
-
/*GENERAL*/
|
43 |
-
div#dup-name-info, div#dup-version-info {display: none; font-size:11px; line-height:20px; margin:4px 0 0 0}
|
44 |
-
div#dup-downloads-area {padding: 5px 0 5px 0; }
|
45 |
-
div#dup-downloads-msg {margin-bottom:-5px; font-style: italic}
|
46 |
-
div.sub-section {padding:7px 0 0 0}
|
47 |
-
textarea.file-info {width:100%; height:100px; font-size:12px }
|
48 |
-
</style>
|
49 |
-
|
50 |
-
<?php if ($package_id == 0) :?>
|
51 |
-
<div class="notice notice-error is-dismissible"><p><?php _e('Invlaid Package ID request. Please try again!', 'duplicator'); ?></p></div>
|
52 |
-
<?php endif; ?>
|
53 |
-
|
54 |
-
<div class="toggle-box">
|
55 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.OpenAll()">[open all]</a>
|
56 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.CloseAll()">[close all]</a>
|
57 |
-
</div>
|
58 |
-
|
59 |
-
<!-- ===============================
|
60 |
-
GENERAL -->
|
61 |
-
<div class="dup-box">
|
62 |
-
<div class="dup-box-title">
|
63 |
-
<i class="fa fa-archive"></i> <?php _e('General', 'duplicator') ?>
|
64 |
-
<div class="dup-box-arrow"></div>
|
65 |
-
</div>
|
66 |
-
<div class="dup-box-panel" id="dup-package-dtl-general-panel" style="<?php echo $ui_css_general ?>">
|
67 |
-
<table class='dup-dtl-data-tbl'>
|
68 |
-
<tr>
|
69 |
-
<td><?php _e('Name', 'duplicator') ?>:</td>
|
70 |
-
<td>
|
71 |
-
<a href="javascript:void(0);" onclick="jQuery('#dup-name-info').toggle()"><?php echo $package->Name ?></a>
|
72 |
-
<div id="dup-name-info">
|
73 |
-
<b><?php _e('ID', 'duplicator') ?>:</b> <?php echo $package->ID ?><br/>
|
74 |
-
<b><?php _e('Hash', 'duplicator') ?>:</b> <?php echo $package->Hash ?><br/>
|
75 |
-
<b><?php _e('Full Name', 'duplicator') ?>:</b> <?php echo $package->NameHash ?><br/>
|
76 |
-
</div>
|
77 |
-
</td>
|
78 |
-
</tr>
|
79 |
-
<tr>
|
80 |
-
<td><?php _e('Notes', 'duplicator') ?>:</td>
|
81 |
-
<td><?php echo strlen($package->Notes) ? $package->Notes : __('- no notes -', 'duplicator') ?></td>
|
82 |
-
</tr>
|
83 |
-
<tr>
|
84 |
-
<td><?php _e('Versions', 'duplicator') ?>:</td>
|
85 |
-
<td>
|
86 |
-
<a href="javascript:void(0);" onclick="jQuery('#dup-version-info').toggle()"><?php echo $package->Version ?></a>
|
87 |
-
<div id="dup-version-info">
|
88 |
-
<b><?php _e('WordPress', 'duplicator') ?>:</b> <?php echo strlen($package->VersionWP) ? $package->VersionWP : __('- unknown -', 'duplicator') ?><br/>
|
89 |
-
<b><?php _e('PHP', 'duplicator') ?>:</b> <?php echo strlen($package->VersionPHP) ? $package->VersionPHP : __('- unknown -', 'duplicator') ?><br/>
|
90 |
-
<b><?php _e('Mysql', 'duplicator') ?>:</b>
|
91 |
-
<?php echo strlen($package->VersionDB) ? $package->VersionDB : __('- unknown -', 'duplicator') ?> |
|
92 |
-
<?php echo strlen($package->Database->Comments) ? $package->Database->Comments : __('- unknown -', 'duplicator') ?><br/>
|
93 |
-
</div>
|
94 |
-
</td>
|
95 |
-
</tr>
|
96 |
-
<tr>
|
97 |
-
<td><?php _e('Runtime', 'duplicator') ?>:</td>
|
98 |
-
<td><?php echo strlen($package->Runtime) ? $package->Runtime : __("error running", 'duplicator'); ?></td>
|
99 |
-
</tr>
|
100 |
-
<tr>
|
101 |
-
<td><?php _e('Status', 'duplicator') ?>:</td>
|
102 |
-
<td><?php echo ($package->Status >= 100) ? __('completed', 'duplicator') : __('in-complete', 'duplicator') ?></td>
|
103 |
-
</tr>
|
104 |
-
<tr>
|
105 |
-
<td><?php _e('User', 'duplicator') ?>:</td>
|
106 |
-
<td><?php echo strlen($package->WPUser) ? $package->WPUser : __('- unknown -', 'duplicator') ?></td>
|
107 |
-
</tr>
|
108 |
-
<tr>
|
109 |
-
<td><?php _e('Files', 'duplicator') ?>: </td>
|
110 |
-
<td>
|
111 |
-
<div id="dup-downloads-area">
|
112 |
-
<?php if (!$err_found) :?>
|
113 |
-
|
114 |
-
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_installer; ?>', this);return false;"><i class="fa fa-bolt"></i> Installer</button>
|
115 |
-
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_archive; ?>', this);return false;"><i class="fa fa-file-archive-o"></i> Archive - <?php echo $package->ZipSize ?></button>
|
116 |
-
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_sql; ?>', this);return false;"><i class="fa fa-table"></i> SQL - <?php echo DUP_Util::byteSize($package->Database->Size) ?></button>
|
117 |
-
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_log; ?>', this);return false;"><i class="fa fa-list-alt"></i> Log </button>
|
118 |
-
<button class="button" onclick="Duplicator.Pack.ShowLinksDialog(<?php echo "'{$link_sql}','{$link_archive}','{$link_installer}','{$link_log}'" ;?>);" class="thickbox"><i class="fa fa-lock"></i> <?php _e("Share", 'duplicator')?></button>
|
119 |
-
<?php else: ?>
|
120 |
-
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_log; ?>', this);return false;"><i class="fa fa-list-alt"></i> Log </button>
|
121 |
-
<?php endif; ?>
|
122 |
-
</div>
|
123 |
-
<?php if (!$err_found) :?>
|
124 |
-
<table class="dup-sub-list">
|
125 |
-
<tr>
|
126 |
-
<td><?php _e('Archive', 'duplicator') ?>: </td>
|
127 |
-
<td><a href="<?php echo $link_archive ?>" target="_blank"><?php echo $package->Archive->File ?></a></td>
|
128 |
-
</tr>
|
129 |
-
<tr>
|
130 |
-
<td><?php _e('Installer', 'duplicator') ?>: </td>
|
131 |
-
<td><a href="<?php echo $link_installer ?>" target="_blank"><?php echo $package->Installer->File ?></a></td>
|
132 |
-
</tr>
|
133 |
-
<tr>
|
134 |
-
<td><?php _e('Database', 'duplicator') ?>: </td>
|
135 |
-
<td><a href="<?php echo $link_sql ?>" target="_blank"><?php echo $package->Database->File ?></a></td>
|
136 |
-
</tr>
|
137 |
-
</table>
|
138 |
-
<?php endif; ?>
|
139 |
-
</td>
|
140 |
-
</tr>
|
141 |
-
</table>
|
142 |
-
</div>
|
143 |
-
</div>
|
144 |
-
|
145 |
-
<!-- ==========================================
|
146 |
-
DIALOG: QUICK PATH -->
|
147 |
-
<?php add_thickbox(); ?>
|
148 |
-
<div id="dup-dlg-quick-path" title="<?php _e('Download Links', 'duplicator'); ?>" style="display:none">
|
149 |
-
<p>
|
150 |
-
<i class="fa fa-lock"></i>
|
151 |
-
<?php _e("The following links contain sensitive data. Please share with caution!", 'duplicator'); ?>
|
152 |
-
</p>
|
153 |
-
|
154 |
-
<div style="padding: 0px 15px 15px 15px;">
|
155 |
-
<a href="javascript:void(0)" style="display:inline-block; text-align:right" onclick="Duplicator.Pack.GetLinksText()">[Select All]</a> <br/>
|
156 |
-
<textarea id="dup-dlg-quick-path-data" style='border:1px solid silver; border-radius:3px; width:99%; height:225px; font-size:11px'></textarea><br/>
|
157 |
-
<i style='font-size:11px'><?php _e("The database SQL script is a quick link to your database backup script. An exact copy is also stored in the package.", 'duplicator'); ?></i>
|
158 |
-
</div>
|
159 |
-
</div>
|
160 |
-
|
161 |
-
<!-- ===============================
|
162 |
-
STORAGE -->
|
163 |
-
<div class="dup-box">
|
164 |
-
<div class="dup-box-title">
|
165 |
-
<i class="fa fa-database"></i> <?php _e('Storage', 'duplicator') ?>
|
166 |
-
<div class="dup-box-arrow"></div>
|
167 |
-
</div>
|
168 |
-
<div class="dup-box-panel" id="dup-package-dtl-storage-panel" style="<?php echo $ui_css_storage ?>">
|
169 |
-
<table class="widefat package-tbl">
|
170 |
-
<thead>
|
171 |
-
<tr>
|
172 |
-
<th style='width:150px'><?php _e('Name', 'duplicator') ?></th>
|
173 |
-
<th style='width:100px'><?php _e('Type', 'duplicator') ?></th>
|
174 |
-
<th style="white-space: nowrap"><?php _e('Location', 'duplicator') ?></th>
|
175 |
-
</tr>
|
176 |
-
</thead>
|
177 |
-
<tbody>
|
178 |
-
<tr class="package-row">
|
179 |
-
<td><i class="fa fa-server"></i> <?php _e('Default', 'duplicator');?></td>
|
180 |
-
<td><?php _e("Local", 'duplicator'); ?></td>
|
181 |
-
<td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
|
182 |
-
</tr>
|
183 |
-
<tr>
|
184 |
-
<td colspan="4">
|
185 |
-
<div class="dup-store-pro">
|
186 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/amazon-64.png" />
|
187 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/dropbox-64.png" />
|
188 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" />
|
189 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" />
|
190 |
-
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s and more storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP'); ?>
|
191 |
-
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage_detail&utm_campaign=duplicator_pro" target="_blank"><?php _e('Duplicator Pro', 'duplicator');?></a>
|
192 |
-
<i class="fa fa-lightbulb-o"
|
193 |
-
data-tooltip-title="<?php _e('Additional Storage:', 'duplicator'); ?>"
|
194 |
-
data-tooltip="<?php _e('Duplicator Pro allows you to create a package and then store it at a custom location on this server or to a cloud '
|
195 |
-
. 'based location such as Google Drive, Amazon, Dropbox or FTP.', 'duplicator'); ?>">
|
196 |
-
</i>
|
197 |
-
</div>
|
198 |
-
</td>
|
199 |
-
</tr>
|
200 |
-
</tbody>
|
201 |
-
</table>
|
202 |
-
</div>
|
203 |
-
</div>
|
204 |
-
|
205 |
-
|
206 |
-
<!-- ===============================
|
207 |
-
ARCHIVE -->
|
208 |
-
<?php
|
209 |
-
$css_db_filter_on = $package->Database->FilterOn == 1 ? '' : 'sub-item-disabled';
|
210 |
-
?>
|
211 |
-
<div class="dup-box">
|
212 |
-
<div class="dup-box-title">
|
213 |
-
<i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator') ?>
|
214 |
-
<div class="dup-box-arrow"></div>
|
215 |
-
</div>
|
216 |
-
<div class="dup-box-panel" id="dup-package-dtl-archive-panel" style="<?php echo $ui_css_archive ?>">
|
217 |
-
|
218 |
-
<!-- FILES -->
|
219 |
-
<div class="dup-box-panel-hdr"><i class="fa fa-files-o"></i> <?php _e('FILES', 'duplicator'); ?></div>
|
220 |
-
<table class='dup-dtl-data-tbl'>
|
221 |
-
<tr>
|
222 |
-
<td><?php _e('Build Mode', 'duplicator') ?>: </td>
|
223 |
-
<td><?php _e('ZipArchive', 'duplicator'); ?></td>
|
224 |
-
</tr>
|
225 |
-
|
226 |
-
<?php if ($package->Archive->ExportOnlyDB) : ?>
|
227 |
-
<tr>
|
228 |
-
<td><?php _e('Database Mode', 'duplicator') ?>: </td>
|
229 |
-
<td><?php _e('Archive Database Only Enabled', 'duplicator') ?></td>
|
230 |
-
</tr>
|
231 |
-
<?php else : ?>
|
232 |
-
<tr>
|
233 |
-
<td><?php _e('Filters', 'duplicator') ?>: </td>
|
234 |
-
<td>
|
235 |
-
<?php echo $package->Archive->FilterOn == 1 ? 'On' : 'Off'; ?>
|
236 |
-
<div class="sub-section">
|
237 |
-
<b><?php _e('Directories', 'duplicator') ?>:</b> <br/>
|
238 |
-
<?php
|
239 |
-
$txt = strlen($package->Archive->FilterDirs)
|
240 |
-
? str_replace(';', ";\n", $package->Archive->FilterDirs)
|
241 |
-
: __('- no filters -', 'duplicator');
|
242 |
-
?>
|
243 |
-
<textarea class='file-info' readonly="true"><?php echo $txt; ?></textarea>
|
244 |
-
</div>
|
245 |
-
|
246 |
-
<div class="sub-section">
|
247 |
-
<b><?php _e('Extensions', 'duplicator') ?>: </b><br/>
|
248 |
-
<?php
|
249 |
-
echo isset($package->Archive->FilterExts) && strlen($package->Archive->FilterExts)
|
250 |
-
? $package->Archive->FilterExts
|
251 |
-
: __('- no filters -', 'duplicator');
|
252 |
-
?>
|
253 |
-
</div>
|
254 |
-
|
255 |
-
<div class="sub-section">
|
256 |
-
<b><?php _e('Files', 'duplicator') ?>:</b><br/>
|
257 |
-
<?php
|
258 |
-
$txt = strlen($package->Archive->FilterFiles)
|
259 |
-
? str_replace(';', ";\n", $package->Archive->FilterFiles)
|
260 |
-
: __('- no filters -', 'duplicator');
|
261 |
-
?>
|
262 |
-
<textarea class='file-info' readonly="true"><?php echo $txt; ?></textarea>
|
263 |
-
</div>
|
264 |
-
</td>
|
265 |
-
</tr>
|
266 |
-
<?php endif; ?>
|
267 |
-
</table><br/>
|
268 |
-
|
269 |
-
<!-- DATABASE -->
|
270 |
-
<div class="dup-box-panel-hdr"><i class="fa fa-table"></i> <?php _e('DATABASE', 'duplicator'); ?></div>
|
271 |
-
<table class='dup-dtl-data-tbl'>
|
272 |
-
<tr>
|
273 |
-
<td><?php _e('Type', 'duplicator') ?>: </td>
|
274 |
-
<td><?php echo $package->Database->Type ?></td>
|
275 |
-
</tr>
|
276 |
-
<tr>
|
277 |
-
<td><?php _e('Build Mode', 'duplicator') ?>: </td>
|
278 |
-
<td>
|
279 |
-
<a href="?page=duplicator-settings" target="_blank"><?php echo $dbbuild_mode; ?></a>
|
280 |
-
<?php if ($mysqlcompat_on) : ?>
|
281 |
-
<br/>
|
282 |
-
<small style="font-style:italic; color:maroon">
|
283 |
-
<i class="fa fa-exclamation-circle"></i> <?php _e('MySQL Compatibility Mode Enabled', 'duplicator'); ?>
|
284 |
-
<a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php _e('details', 'duplicator'); ?>]</a>
|
285 |
-
</small>
|
286 |
-
<?php endif; ?>
|
287 |
-
</td>
|
288 |
-
</tr>
|
289 |
-
<tr>
|
290 |
-
<td><?php _e('Filters', 'duplicator') ?>: </td>
|
291 |
-
<td><?php echo $package->Database->FilterOn == 1 ? 'On' : 'Off'; ?></td>
|
292 |
-
</tr>
|
293 |
-
<tr class="sub-item <?php echo $css_db_filter_on ?>">
|
294 |
-
<td><?php _e('Tables', 'duplicator') ?>: </td>
|
295 |
-
<td>
|
296 |
-
<?php
|
297 |
-
echo isset($package->Database->FilterTables) && strlen($package->Database->FilterTables)
|
298 |
-
? str_replace(',', ' | ', $package->Database->FilterTables)
|
299 |
-
: __('- no filters -', 'duplicator');
|
300 |
-
?>
|
301 |
-
</td>
|
302 |
-
</tr>
|
303 |
-
</table>
|
304 |
-
</div>
|
305 |
-
</div>
|
306 |
-
|
307 |
-
|
308 |
-
<!-- ===============================
|
309 |
-
INSTALLER -->
|
310 |
-
<div class="dup-box" style="margin-bottom: 50px">
|
311 |
-
<div class="dup-box-title">
|
312 |
-
<i class="fa fa-bolt"></i> <?php _e('Installer', 'duplicator') ?>
|
313 |
-
<div class="dup-box-arrow"></div>
|
314 |
-
</div>
|
315 |
-
<div class="dup-box-panel" id="dup-package-dtl-install-panel" style="<?php echo $ui_css_install ?>">
|
316 |
-
<table class='dup-dtl-data-tbl'>
|
317 |
-
<tr>
|
318 |
-
<td><?php _e('Host', 'duplicator') ?>:</td>
|
319 |
-
<td><?php echo strlen($package->Installer->OptsDBHost) ? $package->Installer->OptsDBHost : __('- not set -', 'duplicator') ?></td>
|
320 |
-
</tr>
|
321 |
-
<tr>
|
322 |
-
<td><?php _e('Database', 'duplicator') ?>:</td>
|
323 |
-
<td><?php echo strlen($package->Installer->OptsDBName) ? $package->Installer->OptsDBName : __('- not set -', 'duplicator') ?></td>
|
324 |
-
</tr>
|
325 |
-
<tr>
|
326 |
-
<td><?php _e('User', 'duplicator') ?>:</td>
|
327 |
-
<td><?php echo strlen($package->Installer->OptsDBUser) ? $package->Installer->OptsDBUser : __('- not set -', 'duplicator') ?></td>
|
328 |
-
</tr>
|
329 |
-
</table>
|
330 |
-
</div>
|
331 |
-
</div>
|
332 |
-
|
333 |
-
<?php if ($debug_on) : ?>
|
334 |
-
<div style="margin:0">
|
335 |
-
<a href="javascript:void(0)" onclick="jQuery(this).parent().find('.dup-pack-debug').toggle()">[<?php _e('View Package Object', 'duplicator') ?>]</a><br/>
|
336 |
-
<pre class="dup-pack-debug" style="display:none"><?php @print_r($package); ?> </pre>
|
337 |
-
</div>
|
338 |
-
<?php endif; ?>
|
339 |
-
|
340 |
-
|
341 |
-
<script>
|
342 |
-
jQuery(document).ready(function($)
|
343 |
-
{
|
344 |
-
|
345 |
-
/* Shows the 'Download Links' dialog
|
346 |
-
* @param db The path to the sql file
|
347 |
-
* @param install The path to the install file
|
348 |
-
* @param pack The path to the package file */
|
349 |
-
Duplicator.Pack.ShowLinksDialog = function(db, install, pack, log)
|
350 |
-
{
|
351 |
-
var url = '#TB_inline?width=650&height=350&inlineId=dup-dlg-quick-path';
|
352 |
-
tb_show("<?php _e('Package File Links', 'duplicator') ?>", url);
|
353 |
-
|
354 |
-
var msg = <?php printf('"%s:\n" + db + "\n\n%s:\n" + install + "\n\n%s:\n" + pack + "\n\n%s:\n" + log;',
|
355 |
-
__("DATABASE", 'duplicator'),
|
356 |
-
__("PACKAGE", 'duplicator'),
|
357 |
-
__("INSTALLER", 'duplicator'),
|
358 |
-
__("LOG", 'duplicator'));
|
359 |
-
?>
|
360 |
-
$("#dup-dlg-quick-path-data").val(msg);
|
361 |
-
return false;
|
362 |
-
}
|
363 |
-
|
364 |
-
//LOAD: 'Download Links' Dialog and other misc setup
|
365 |
-
Duplicator.Pack.GetLinksText = function() {$('#dup-dlg-quick-path-data').select();};
|
366 |
-
|
367 |
-
Duplicator.Pack.OpenAll = function () {
|
368 |
-
$("div.dup-box").each(function() {
|
369 |
-
var panel_open = $(this).find('div.dup-box-panel').is(':visible');
|
370 |
-
if (! panel_open)
|
371 |
-
$( this ).find('div.dup-box-title').trigger("click");
|
372 |
-
});
|
373 |
-
};
|
374 |
-
|
375 |
-
Duplicator.Pack.CloseAll = function () {
|
376 |
-
$("div.dup-box").each(function() {
|
377 |
-
var panel_open = $(this).find('div.dup-box-panel').is(':visible');
|
378 |
-
if (panel_open)
|
379 |
-
$( this ).find('div.dup-box-title').trigger("click");
|
380 |
-
});
|
381 |
-
};
|
382 |
-
});
|
383 |
</script>
|
1 |
+
<?php
|
2 |
+
$view_state = DUP_UI_ViewState::getArray();
|
3 |
+
$ui_css_general = (isset($view_state['dup-package-dtl-general-panel']) && $view_state['dup-package-dtl-general-panel']) ? 'display:block' : 'display:none';
|
4 |
+
$ui_css_storage = (isset($view_state['dup-package-dtl-storage-panel']) && $view_state['dup-package-dtl-storage-panel']) ? 'display:block' : 'display:none';
|
5 |
+
$ui_css_archive = (isset($view_state['dup-package-dtl-archive-panel']) && $view_state['dup-package-dtl-archive-panel']) ? 'display:block' : 'display:none';
|
6 |
+
$ui_css_install = (isset($view_state['dup-package-dtl-install-panel']) && $view_state['dup-package-dtl-install-panel']) ? 'display:block' : 'display:none';
|
7 |
+
|
8 |
+
$link_sql = "{$package->StoreURL}{$package->NameHash}_database.sql";
|
9 |
+
$link_archive = "{$package->StoreURL}{$package->NameHash}_archive.zip";
|
10 |
+
$link_installer = "{$package->StoreURL}{$package->NameHash}_installer.php?get=1&file={$package->NameHash}_installer.php";
|
11 |
+
$link_log = "{$package->StoreURL}{$package->NameHash}.log";
|
12 |
+
$link_scan = "{$package->StoreURL}{$package->NameHash}_scan.json";
|
13 |
+
|
14 |
+
$debug_on = DUP_Settings::Get('package_debug');
|
15 |
+
$mysqldump_on = DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath();
|
16 |
+
$mysqlcompat_on = isset($package->Database->Compatible) && strlen($package->Database->Compatible);
|
17 |
+
$mysqlcompat_on = ($mysqldump_on && $mysqlcompat_on) ? true : false;
|
18 |
+
$dbbuild_mode = ($mysqldump_on) ? 'mysqldump' : 'PHP';
|
19 |
+
?>
|
20 |
+
|
21 |
+
<style>
|
22 |
+
/*COMMON*/
|
23 |
+
div.toggle-box {float:right; margin: 5px 5px 5px 0}
|
24 |
+
div.dup-box {margin-top: 15px; font-size:14px; clear: both}
|
25 |
+
table.dup-dtl-data-tbl {width:100%}
|
26 |
+
table.dup-dtl-data-tbl tr {vertical-align: top}
|
27 |
+
table.dup-dtl-data-tbl tr:first-child td {margin:0; padding-top:0 !important;}
|
28 |
+
table.dup-dtl-data-tbl td {padding:0 5px 0 0; padding-top:10px !important;}
|
29 |
+
table.dup-dtl-data-tbl td:first-child {font-weight: bold; width:130px}
|
30 |
+
table.dup-sub-list td:first-child {white-space: nowrap; vertical-align: middle; width: 70px !important;}
|
31 |
+
table.dup-sub-list td {white-space: nowrap; vertical-align:top; padding:0 !important; font-size:12px}
|
32 |
+
div.dup-box-panel-hdr {font-size:14px; display:block; border-bottom: 1px dotted #efefef; margin:5px 0 5px 0; font-weight: bold; padding: 0 0 5px 0}
|
33 |
+
tr.sub-item td:first-child {padding:0 0 0 40px}
|
34 |
+
tr.sub-item td {font-size: 12px}
|
35 |
+
tr.sub-item-disabled td {color:gray}
|
36 |
+
|
37 |
+
/*STORAGE*/
|
38 |
+
div.dup-store-pro {font-size:12px; font-style:italic;}
|
39 |
+
div.dup-store-pro img {height:14px; width:14px; vertical-align: text-top}
|
40 |
+
div.dup-store-pro a {text-decoration: underline}
|
41 |
+
|
42 |
+
/*GENERAL*/
|
43 |
+
div#dup-name-info, div#dup-version-info {display: none; font-size:11px; line-height:20px; margin:4px 0 0 0}
|
44 |
+
div#dup-downloads-area {padding: 5px 0 5px 0; }
|
45 |
+
div#dup-downloads-msg {margin-bottom:-5px; font-style: italic}
|
46 |
+
div.sub-section {padding:7px 0 0 0}
|
47 |
+
textarea.file-info {width:100%; height:100px; font-size:12px }
|
48 |
+
</style>
|
49 |
+
|
50 |
+
<?php if ($package_id == 0) :?>
|
51 |
+
<div class="notice notice-error is-dismissible"><p><?php _e('Invlaid Package ID request. Please try again!', 'duplicator'); ?></p></div>
|
52 |
+
<?php endif; ?>
|
53 |
+
|
54 |
+
<div class="toggle-box">
|
55 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.OpenAll()">[open all]</a>
|
56 |
+
<a href="javascript:void(0)" onclick="Duplicator.Pack.CloseAll()">[close all]</a>
|
57 |
+
</div>
|
58 |
+
|
59 |
+
<!-- ===============================
|
60 |
+
GENERAL -->
|
61 |
+
<div class="dup-box">
|
62 |
+
<div class="dup-box-title">
|
63 |
+
<i class="fa fa-archive"></i> <?php _e('General', 'duplicator') ?>
|
64 |
+
<div class="dup-box-arrow"></div>
|
65 |
+
</div>
|
66 |
+
<div class="dup-box-panel" id="dup-package-dtl-general-panel" style="<?php echo $ui_css_general ?>">
|
67 |
+
<table class='dup-dtl-data-tbl'>
|
68 |
+
<tr>
|
69 |
+
<td><?php _e('Name', 'duplicator') ?>:</td>
|
70 |
+
<td>
|
71 |
+
<a href="javascript:void(0);" onclick="jQuery('#dup-name-info').toggle()"><?php echo $package->Name ?></a>
|
72 |
+
<div id="dup-name-info">
|
73 |
+
<b><?php _e('ID', 'duplicator') ?>:</b> <?php echo $package->ID ?><br/>
|
74 |
+
<b><?php _e('Hash', 'duplicator') ?>:</b> <?php echo $package->Hash ?><br/>
|
75 |
+
<b><?php _e('Full Name', 'duplicator') ?>:</b> <?php echo $package->NameHash ?><br/>
|
76 |
+
</div>
|
77 |
+
</td>
|
78 |
+
</tr>
|
79 |
+
<tr>
|
80 |
+
<td><?php _e('Notes', 'duplicator') ?>:</td>
|
81 |
+
<td><?php echo strlen($package->Notes) ? $package->Notes : __('- no notes -', 'duplicator') ?></td>
|
82 |
+
</tr>
|
83 |
+
<tr>
|
84 |
+
<td><?php _e('Versions', 'duplicator') ?>:</td>
|
85 |
+
<td>
|
86 |
+
<a href="javascript:void(0);" onclick="jQuery('#dup-version-info').toggle()"><?php echo $package->Version ?></a>
|
87 |
+
<div id="dup-version-info">
|
88 |
+
<b><?php _e('WordPress', 'duplicator') ?>:</b> <?php echo strlen($package->VersionWP) ? $package->VersionWP : __('- unknown -', 'duplicator') ?><br/>
|
89 |
+
<b><?php _e('PHP', 'duplicator') ?>:</b> <?php echo strlen($package->VersionPHP) ? $package->VersionPHP : __('- unknown -', 'duplicator') ?><br/>
|
90 |
+
<b><?php _e('Mysql', 'duplicator') ?>:</b>
|
91 |
+
<?php echo strlen($package->VersionDB) ? $package->VersionDB : __('- unknown -', 'duplicator') ?> |
|
92 |
+
<?php echo strlen($package->Database->Comments) ? $package->Database->Comments : __('- unknown -', 'duplicator') ?><br/>
|
93 |
+
</div>
|
94 |
+
</td>
|
95 |
+
</tr>
|
96 |
+
<tr>
|
97 |
+
<td><?php _e('Runtime', 'duplicator') ?>:</td>
|
98 |
+
<td><?php echo strlen($package->Runtime) ? $package->Runtime : __("error running", 'duplicator'); ?></td>
|
99 |
+
</tr>
|
100 |
+
<tr>
|
101 |
+
<td><?php _e('Status', 'duplicator') ?>:</td>
|
102 |
+
<td><?php echo ($package->Status >= 100) ? __('completed', 'duplicator') : __('in-complete', 'duplicator') ?></td>
|
103 |
+
</tr>
|
104 |
+
<tr>
|
105 |
+
<td><?php _e('User', 'duplicator') ?>:</td>
|
106 |
+
<td><?php echo strlen($package->WPUser) ? $package->WPUser : __('- unknown -', 'duplicator') ?></td>
|
107 |
+
</tr>
|
108 |
+
<tr>
|
109 |
+
<td><?php _e('Files', 'duplicator') ?>: </td>
|
110 |
+
<td>
|
111 |
+
<div id="dup-downloads-area">
|
112 |
+
<?php if (!$err_found) :?>
|
113 |
+
|
114 |
+
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_installer; ?>', this);return false;"><i class="fa fa-bolt"></i> Installer</button>
|
115 |
+
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_archive; ?>', this);return false;"><i class="fa fa-file-archive-o"></i> Archive - <?php echo $package->ZipSize ?></button>
|
116 |
+
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_sql; ?>', this);return false;"><i class="fa fa-table"></i> SQL - <?php echo DUP_Util::byteSize($package->Database->Size) ?></button>
|
117 |
+
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_log; ?>', this);return false;"><i class="fa fa-list-alt"></i> Log </button>
|
118 |
+
<button class="button" onclick="Duplicator.Pack.ShowLinksDialog(<?php echo "'{$link_sql}','{$link_archive}','{$link_installer}','{$link_log}'" ;?>);" class="thickbox"><i class="fa fa-lock"></i> <?php _e("Share", 'duplicator')?></button>
|
119 |
+
<?php else: ?>
|
120 |
+
<button class="button" onclick="Duplicator.Pack.DownloadFile('<?php echo $link_log; ?>', this);return false;"><i class="fa fa-list-alt"></i> Log </button>
|
121 |
+
<?php endif; ?>
|
122 |
+
</div>
|
123 |
+
<?php if (!$err_found) :?>
|
124 |
+
<table class="dup-sub-list">
|
125 |
+
<tr>
|
126 |
+
<td><?php _e('Archive', 'duplicator') ?>: </td>
|
127 |
+
<td><a href="<?php echo $link_archive ?>" target="_blank"><?php echo $package->Archive->File ?></a></td>
|
128 |
+
</tr>
|
129 |
+
<tr>
|
130 |
+
<td><?php _e('Installer', 'duplicator') ?>: </td>
|
131 |
+
<td><a href="<?php echo $link_installer ?>" target="_blank"><?php echo $package->Installer->File ?></a></td>
|
132 |
+
</tr>
|
133 |
+
<tr>
|
134 |
+
<td><?php _e('Database', 'duplicator') ?>: </td>
|
135 |
+
<td><a href="<?php echo $link_sql ?>" target="_blank"><?php echo $package->Database->File ?></a></td>
|
136 |
+
</tr>
|
137 |
+
</table>
|
138 |
+
<?php endif; ?>
|
139 |
+
</td>
|
140 |
+
</tr>
|
141 |
+
</table>
|
142 |
+
</div>
|
143 |
+
</div>
|
144 |
+
|
145 |
+
<!-- ==========================================
|
146 |
+
DIALOG: QUICK PATH -->
|
147 |
+
<?php add_thickbox(); ?>
|
148 |
+
<div id="dup-dlg-quick-path" title="<?php _e('Download Links', 'duplicator'); ?>" style="display:none">
|
149 |
+
<p>
|
150 |
+
<i class="fa fa-lock"></i>
|
151 |
+
<?php _e("The following links contain sensitive data. Please share with caution!", 'duplicator'); ?>
|
152 |
+
</p>
|
153 |
+
|
154 |
+
<div style="padding: 0px 15px 15px 15px;">
|
155 |
+
<a href="javascript:void(0)" style="display:inline-block; text-align:right" onclick="Duplicator.Pack.GetLinksText()">[Select All]</a> <br/>
|
156 |
+
<textarea id="dup-dlg-quick-path-data" style='border:1px solid silver; border-radius:3px; width:99%; height:225px; font-size:11px'></textarea><br/>
|
157 |
+
<i style='font-size:11px'><?php _e("The database SQL script is a quick link to your database backup script. An exact copy is also stored in the package.", 'duplicator'); ?></i>
|
158 |
+
</div>
|
159 |
+
</div>
|
160 |
+
|
161 |
+
<!-- ===============================
|
162 |
+
STORAGE -->
|
163 |
+
<div class="dup-box">
|
164 |
+
<div class="dup-box-title">
|
165 |
+
<i class="fa fa-database"></i> <?php _e('Storage', 'duplicator') ?>
|
166 |
+
<div class="dup-box-arrow"></div>
|
167 |
+
</div>
|
168 |
+
<div class="dup-box-panel" id="dup-package-dtl-storage-panel" style="<?php echo $ui_css_storage ?>">
|
169 |
+
<table class="widefat package-tbl">
|
170 |
+
<thead>
|
171 |
+
<tr>
|
172 |
+
<th style='width:150px'><?php _e('Name', 'duplicator') ?></th>
|
173 |
+
<th style='width:100px'><?php _e('Type', 'duplicator') ?></th>
|
174 |
+
<th style="white-space: nowrap"><?php _e('Location', 'duplicator') ?></th>
|
175 |
+
</tr>
|
176 |
+
</thead>
|
177 |
+
<tbody>
|
178 |
+
<tr class="package-row">
|
179 |
+
<td><i class="fa fa-server"></i> <?php _e('Default', 'duplicator');?></td>
|
180 |
+
<td><?php _e("Local", 'duplicator'); ?></td>
|
181 |
+
<td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
|
182 |
+
</tr>
|
183 |
+
<tr>
|
184 |
+
<td colspan="4">
|
185 |
+
<div class="dup-store-pro">
|
186 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/amazon-64.png" />
|
187 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/dropbox-64.png" />
|
188 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" />
|
189 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" />
|
190 |
+
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s and more storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP'); ?>
|
191 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage_detail&utm_campaign=duplicator_pro" target="_blank"><?php _e('Duplicator Pro', 'duplicator');?></a>
|
192 |
+
<i class="fa fa-lightbulb-o"
|
193 |
+
data-tooltip-title="<?php _e('Additional Storage:', 'duplicator'); ?>"
|
194 |
+
data-tooltip="<?php _e('Duplicator Pro allows you to create a package and then store it at a custom location on this server or to a cloud '
|
195 |
+
. 'based location such as Google Drive, Amazon, Dropbox or FTP.', 'duplicator'); ?>">
|
196 |
+
</i>
|
197 |
+
</div>
|
198 |
+
</td>
|
199 |
+
</tr>
|
200 |
+
</tbody>
|
201 |
+
</table>
|
202 |
+
</div>
|
203 |
+
</div>
|
204 |
+
|
205 |
+
|
206 |
+
<!-- ===============================
|
207 |
+
ARCHIVE -->
|
208 |
+
<?php
|
209 |
+
$css_db_filter_on = $package->Database->FilterOn == 1 ? '' : 'sub-item-disabled';
|
210 |
+
?>
|
211 |
+
<div class="dup-box">
|
212 |
+
<div class="dup-box-title">
|
213 |
+
<i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator') ?>
|
214 |
+
<div class="dup-box-arrow"></div>
|
215 |
+
</div>
|
216 |
+
<div class="dup-box-panel" id="dup-package-dtl-archive-panel" style="<?php echo $ui_css_archive ?>">
|
217 |
+
|
218 |
+
<!-- FILES -->
|
219 |
+
<div class="dup-box-panel-hdr"><i class="fa fa-files-o"></i> <?php _e('FILES', 'duplicator'); ?></div>
|
220 |
+
<table class='dup-dtl-data-tbl'>
|
221 |
+
<tr>
|
222 |
+
<td><?php _e('Build Mode', 'duplicator') ?>: </td>
|
223 |
+
<td><?php _e('ZipArchive', 'duplicator'); ?></td>
|
224 |
+
</tr>
|
225 |
+
|
226 |
+
<?php if ($package->Archive->ExportOnlyDB) : ?>
|
227 |
+
<tr>
|
228 |
+
<td><?php _e('Database Mode', 'duplicator') ?>: </td>
|
229 |
+
<td><?php _e('Archive Database Only Enabled', 'duplicator') ?></td>
|
230 |
+
</tr>
|
231 |
+
<?php else : ?>
|
232 |
+
<tr>
|
233 |
+
<td><?php _e('Filters', 'duplicator') ?>: </td>
|
234 |
+
<td>
|
235 |
+
<?php echo $package->Archive->FilterOn == 1 ? 'On' : 'Off'; ?>
|
236 |
+
<div class="sub-section">
|
237 |
+
<b><?php _e('Directories', 'duplicator') ?>:</b> <br/>
|
238 |
+
<?php
|
239 |
+
$txt = strlen($package->Archive->FilterDirs)
|
240 |
+
? str_replace(';', ";\n", $package->Archive->FilterDirs)
|
241 |
+
: __('- no filters -', 'duplicator');
|
242 |
+
?>
|
243 |
+
<textarea class='file-info' readonly="true"><?php echo $txt; ?></textarea>
|
244 |
+
</div>
|
245 |
+
|
246 |
+
<div class="sub-section">
|
247 |
+
<b><?php _e('Extensions', 'duplicator') ?>: </b><br/>
|
248 |
+
<?php
|
249 |
+
echo isset($package->Archive->FilterExts) && strlen($package->Archive->FilterExts)
|
250 |
+
? $package->Archive->FilterExts
|
251 |
+
: __('- no filters -', 'duplicator');
|
252 |
+
?>
|
253 |
+
</div>
|
254 |
+
|
255 |
+
<div class="sub-section">
|
256 |
+
<b><?php _e('Files', 'duplicator') ?>:</b><br/>
|
257 |
+
<?php
|
258 |
+
$txt = strlen($package->Archive->FilterFiles)
|
259 |
+
? str_replace(';', ";\n", $package->Archive->FilterFiles)
|
260 |
+
: __('- no filters -', 'duplicator');
|
261 |
+
?>
|
262 |
+
<textarea class='file-info' readonly="true"><?php echo $txt; ?></textarea>
|
263 |
+
</div>
|
264 |
+
</td>
|
265 |
+
</tr>
|
266 |
+
<?php endif; ?>
|
267 |
+
</table><br/>
|
268 |
+
|
269 |
+
<!-- DATABASE -->
|
270 |
+
<div class="dup-box-panel-hdr"><i class="fa fa-table"></i> <?php _e('DATABASE', 'duplicator'); ?></div>
|
271 |
+
<table class='dup-dtl-data-tbl'>
|
272 |
+
<tr>
|
273 |
+
<td><?php _e('Type', 'duplicator') ?>: </td>
|
274 |
+
<td><?php echo $package->Database->Type ?></td>
|
275 |
+
</tr>
|
276 |
+
<tr>
|
277 |
+
<td><?php _e('Build Mode', 'duplicator') ?>: </td>
|
278 |
+
<td>
|
279 |
+
<a href="?page=duplicator-settings" target="_blank"><?php echo $dbbuild_mode; ?></a>
|
280 |
+
<?php if ($mysqlcompat_on) : ?>
|
281 |
+
<br/>
|
282 |
+
<small style="font-style:italic; color:maroon">
|
283 |
+
<i class="fa fa-exclamation-circle"></i> <?php _e('MySQL Compatibility Mode Enabled', 'duplicator'); ?>
|
284 |
+
<a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php _e('details', 'duplicator'); ?>]</a>
|
285 |
+
</small>
|
286 |
+
<?php endif; ?>
|
287 |
+
</td>
|
288 |
+
</tr>
|
289 |
+
<tr>
|
290 |
+
<td><?php _e('Filters', 'duplicator') ?>: </td>
|
291 |
+
<td><?php echo $package->Database->FilterOn == 1 ? 'On' : 'Off'; ?></td>
|
292 |
+
</tr>
|
293 |
+
<tr class="sub-item <?php echo $css_db_filter_on ?>">
|
294 |
+
<td><?php _e('Tables', 'duplicator') ?>: </td>
|
295 |
+
<td>
|
296 |
+
<?php
|
297 |
+
echo isset($package->Database->FilterTables) && strlen($package->Database->FilterTables)
|
298 |
+
? str_replace(',', ' | ', $package->Database->FilterTables)
|
299 |
+
: __('- no filters -', 'duplicator');
|
300 |
+
?>
|
301 |
+
</td>
|
302 |
+
</tr>
|
303 |
+
</table>
|
304 |
+
</div>
|
305 |
+
</div>
|
306 |
+
|
307 |
+
|
308 |
+
<!-- ===============================
|
309 |
+
INSTALLER -->
|
310 |
+
<div class="dup-box" style="margin-bottom: 50px">
|
311 |
+
<div class="dup-box-title">
|
312 |
+
<i class="fa fa-bolt"></i> <?php _e('Installer', 'duplicator') ?>
|
313 |
+
<div class="dup-box-arrow"></div>
|
314 |
+
</div>
|
315 |
+
<div class="dup-box-panel" id="dup-package-dtl-install-panel" style="<?php echo $ui_css_install ?>">
|
316 |
+
<table class='dup-dtl-data-tbl'>
|
317 |
+
<tr>
|
318 |
+
<td><?php _e('Host', 'duplicator') ?>:</td>
|
319 |
+
<td><?php echo strlen($package->Installer->OptsDBHost) ? $package->Installer->OptsDBHost : __('- not set -', 'duplicator') ?></td>
|
320 |
+
</tr>
|
321 |
+
<tr>
|
322 |
+
<td><?php _e('Database', 'duplicator') ?>:</td>
|
323 |
+
<td><?php echo strlen($package->Installer->OptsDBName) ? $package->Installer->OptsDBName : __('- not set -', 'duplicator') ?></td>
|
324 |
+
</tr>
|
325 |
+
<tr>
|
326 |
+
<td><?php _e('User', 'duplicator') ?>:</td>
|
327 |
+
<td><?php echo strlen($package->Installer->OptsDBUser) ? $package->Installer->OptsDBUser : __('- not set -', 'duplicator') ?></td>
|
328 |
+
</tr>
|
329 |
+
</table>
|
330 |
+
</div>
|
331 |
+
</div>
|
332 |
+
|
333 |
+
<?php if ($debug_on) : ?>
|
334 |
+
<div style="margin:0">
|
335 |
+
<a href="javascript:void(0)" onclick="jQuery(this).parent().find('.dup-pack-debug').toggle()">[<?php _e('View Package Object', 'duplicator') ?>]</a><br/>
|
336 |
+
<pre class="dup-pack-debug" style="display:none"><?php @print_r($package); ?> </pre>
|
337 |
+
</div>
|
338 |
+
<?php endif; ?>
|
339 |
+
|
340 |
+
|
341 |
+
<script>
|
342 |
+
jQuery(document).ready(function($)
|
343 |
+
{
|
344 |
+
|
345 |
+
/* Shows the 'Download Links' dialog
|
346 |
+
* @param db The path to the sql file
|
347 |
+
* @param install The path to the install file
|
348 |
+
* @param pack The path to the package file */
|
349 |
+
Duplicator.Pack.ShowLinksDialog = function(db, install, pack, log)
|
350 |
+
{
|
351 |
+
var url = '#TB_inline?width=650&height=350&inlineId=dup-dlg-quick-path';
|
352 |
+
tb_show("<?php _e('Package File Links', 'duplicator') ?>", url);
|
353 |
+
|
354 |
+
var msg = <?php printf('"%s:\n" + db + "\n\n%s:\n" + install + "\n\n%s:\n" + pack + "\n\n%s:\n" + log;',
|
355 |
+
__("DATABASE", 'duplicator'),
|
356 |
+
__("PACKAGE", 'duplicator'),
|
357 |
+
__("INSTALLER", 'duplicator'),
|
358 |
+
__("LOG", 'duplicator'));
|
359 |
+
?>
|
360 |
+
$("#dup-dlg-quick-path-data").val(msg);
|
361 |
+
return false;
|
362 |
+
}
|
363 |
+
|
364 |
+
//LOAD: 'Download Links' Dialog and other misc setup
|
365 |
+
Duplicator.Pack.GetLinksText = function() {$('#dup-dlg-quick-path-data').select();};
|
366 |
+
|
367 |
+
Duplicator.Pack.OpenAll = function () {
|
368 |
+
$("div.dup-box").each(function() {
|
369 |
+
var panel_open = $(this).find('div.dup-box-panel').is(':visible');
|
370 |
+
if (! panel_open)
|
371 |
+
$( this ).find('div.dup-box-title').trigger("click");
|
372 |
+
});
|
373 |
+
};
|
374 |
+
|
375 |
+
Duplicator.Pack.CloseAll = function () {
|
376 |
+
$("div.dup-box").each(function() {
|
377 |
+
var panel_open = $(this).find('div.dup-box-panel').is(':visible');
|
378 |
+
if (panel_open)
|
379 |
+
$( this ).find('div.dup-box-title').trigger("click");
|
380 |
+
});
|
381 |
+
};
|
382 |
+
});
|
383 |
</script>
|
views/packages/main/s2.scan3.php
CHANGED
@@ -281,6 +281,49 @@ FILE NAME CHECKS -->
|
|
281 |
<div id="hb-files-utf8-result" class="hb-files-style"></div>
|
282 |
</div>
|
283 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
284 |
|
285 |
|
286 |
<!-- ============
|
@@ -647,7 +690,8 @@ jQuery(document).ready(function($)
|
|
647 |
//var sizeChecks = data.ARC.Status.Size == 'Warn' || data.ARC.Status.Big == 'Warn' ? 'Warn' : 'Good';
|
648 |
$('#data-arc-status-size').html(Duplicator.Pack.setScanStatus(data.ARC.Status.Size));
|
649 |
$('#data-arc-status-names').html(Duplicator.Pack.setScanStatus(data.ARC.Status.Names));
|
650 |
-
|
|
|
651 |
$('#data-arc-size2').text(data.ARC.Size || errMsg);
|
652 |
$('#data-arc-files').text(data.ARC.FileCount || errMsg);
|
653 |
$('#data-arc-dirs').text(data.ARC.DirCount || errMsg);
|
@@ -670,6 +714,12 @@ jQuery(document).ready(function($)
|
|
670 |
var html = templateScript(data);
|
671 |
$('#hb-files-utf8-result').html(html);
|
672 |
|
|
|
|
|
|
|
|
|
|
|
|
|
673 |
//SCANNER DETAILS: Dirs
|
674 |
var template = $('#hb-filter-file-list').html();
|
675 |
var templateScript = Handlebars.compile(template);
|
281 |
<div id="hb-files-utf8-result" class="hb-files-style"></div>
|
282 |
</div>
|
283 |
</div>
|
284 |
+
<!-- ======================
|
285 |
+
UNREADABLE FILES -->
|
286 |
+
<div id="scan-unreadable-items" class="scan-item scan-item-last">
|
287 |
+
<div class='title' onclick="Duplicator.Pack.toggleScanItem(this);">
|
288 |
+
<div class="text"><i class="fa fa-caret-right"></i> <?php _e('Read Checks');?></div>
|
289 |
+
<div id="data-arc-status-unreadablefiles"></div>
|
290 |
+
</div>
|
291 |
+
<div class="info">
|
292 |
+
<?php
|
293 |
+
_e('PHP is unable to read the following items and they will <u>not</u> be included in the package. Please work with your host to adjust the permissions or resolve the '
|
294 |
+
. 'symbolic-link(s) shown in the lists below. If these items are not needed then this notice can be ignored.');
|
295 |
+
?>
|
296 |
+
<script id="unreadable-files" type="text/x-handlebars-template">
|
297 |
+
<div class="container">
|
298 |
+
<div class="data">
|
299 |
+
<b><?php _e('Unreadable Items:');?></b> <br/>
|
300 |
+
<div class="directory">
|
301 |
+
{{#if ARC.UnreadableItems}}
|
302 |
+
{{#each ARC.UnreadableItems as |uitem|}}
|
303 |
+
<i class="fa fa-lock"></i> {{uitem}} <br/>
|
304 |
+
{{/each}}
|
305 |
+
{{else}}
|
306 |
+
<i><?php _e('No unreadable items found.<br>');?></i>
|
307 |
+
{{/if}}
|
308 |
+
</div>
|
309 |
+
|
310 |
+
<b><?php _e('Recursive Links:');?></b> <br/>
|
311 |
+
<div class="directory">
|
312 |
+
{{#if ARC.RecursiveLinks}}
|
313 |
+
{{#each ARC.RecursiveLinks as |link|}}
|
314 |
+
<i class="fa fa-lock"></i> {{link}} <br/>
|
315 |
+
{{/each}}
|
316 |
+
{{else}}
|
317 |
+
<i><?php _e('No recursive sym-links found.<br>');?></i>
|
318 |
+
{{/if}}
|
319 |
+
</div>
|
320 |
+
</div>
|
321 |
+
</div>
|
322 |
+
</script>
|
323 |
+
<div id="unreadable-files-result" class="hb-files-style"></div>
|
324 |
+
</div>
|
325 |
+
</div>
|
326 |
+
|
327 |
|
328 |
|
329 |
<!-- ============
|
690 |
//var sizeChecks = data.ARC.Status.Size == 'Warn' || data.ARC.Status.Big == 'Warn' ? 'Warn' : 'Good';
|
691 |
$('#data-arc-status-size').html(Duplicator.Pack.setScanStatus(data.ARC.Status.Size));
|
692 |
$('#data-arc-status-names').html(Duplicator.Pack.setScanStatus(data.ARC.Status.Names));
|
693 |
+
$('#data-arc-status-unreadablefiles').html(Duplicator.Pack.setScanStatus(data.ARC.Status.UnreadableItems));
|
694 |
+
$('#data-arc-size1').text(data.ARC.Size || errMsg);
|
695 |
$('#data-arc-size2').text(data.ARC.Size || errMsg);
|
696 |
$('#data-arc-files').text(data.ARC.FileCount || errMsg);
|
697 |
$('#data-arc-dirs').text(data.ARC.DirCount || errMsg);
|
714 |
var html = templateScript(data);
|
715 |
$('#hb-files-utf8-result').html(html);
|
716 |
|
717 |
+
//NAME CHECKS
|
718 |
+
var template = $('#unreadable-files').html();
|
719 |
+
var templateScript = Handlebars.compile(template);
|
720 |
+
var html = templateScript(data);
|
721 |
+
$('#unreadable-files-result').html(html);
|
722 |
+
|
723 |
//SCANNER DETAILS: Dirs
|
724 |
var template = $('#hb-filter-file-list').html();
|
725 |
var templateScript = Handlebars.compile(template);
|
views/packages/main/s3.build.php
CHANGED
@@ -1,387 +1,387 @@
|
|
1 |
-
<?php
|
2 |
-
//Nonce Check
|
3 |
-
if (! isset( $_POST['dup_form_opts_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_form_opts_nonce_field'], 'dup_form_opts' ) ) {
|
4 |
-
DUP_UI_Notice::redirect('admin.php?page=duplicator&tab=new1');
|
5 |
-
}
|
6 |
-
|
7 |
-
$Package = DUP_Package::getActive();
|
8 |
-
$ajax_nonce = wp_create_nonce('dup_package_build');
|
9 |
-
|
10 |
-
//Help support Duplicator
|
11 |
-
$atext0 =
|
12 |
-
$atext0 .= __('review the plugin', 'duplicator') . '
|
13 |
-
|
14 |
-
//Get even more power & features with Duplicator Pro
|
15 |
-
$atext1 = __('Want more power? Try', 'duplicator');
|
16 |
-
$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'>";
|
17 |
-
$atext1 .= __('Duplicator Pro', 'duplicator') . '
|
18 |
-
|
19 |
-
$rand_txt = array();
|
20 |
-
$rand_txt[0] = $atext0;
|
21 |
-
//$rand_txt[1] = $atext1;
|
22 |
-
?>
|
23 |
-
|
24 |
-
<style>
|
25 |
-
div#dup-progress-area {text-align:center; max-width:800px; min-height:200px; border:1px solid silver; border-radius:5px; margin:25px auto 10px auto; padding:0px; box-shadow: 0 8px 6px -6px #999;}
|
26 |
-
div.dup-progress-title {font-size:22px;padding:5px 0 20px 0; font-weight: bold}
|
27 |
-
div#dup-progress-area div.inner {padding:10px; line-height:22px}
|
28 |
-
div#dup-progress-area h2.title {background-color:#efefef; margin:0px}
|
29 |
-
div#dup-progress-area span.label {font-weight:bold}
|
30 |
-
div#dup-msg-success {color:#18592A; padding:5px;}
|
31 |
-
|
32 |
-
div.dup-msg-success-stats{color:#999;margin:5px 0; font-size:11px; line-height:13px}
|
33 |
-
div.dup-msg-success-links {margin:20px 5px 5px 5px; font-size: 13px;}
|
34 |
-
div#dup-progress-area div.done-title {font-size:18px; font-weight:bold; margin:0px 0px 10px 0px}
|
35 |
-
div#dup-progress-area div.dup-panel-title {background-color: #dfdfdf;}
|
36 |
-
div.hdr-pack-complete {font-size:18px; color:green; font-weight: bold}
|
37 |
-
|
38 |
-
div#dup-create-area-nolink, div#dup-create-area-link {float:right; font-weight: bold; margin: 0; padding: 0}
|
39 |
-
div#dup-create-area-link {display:none; margin-left: -5px}
|
40 |
-
div#dup-progress-area div.dup-panel-panel { border-top: 1px solid silver}
|
41 |
-
fieldset.download-area {border:2px dashed #dfdfdf; padding:20px 20px 10px 20px; border-radius:9px; margin: auto; width:400px }
|
42 |
-
fieldset.download-area legend {font-weight: bold; font-size: 16px}
|
43 |
-
button#dup-btn-installer, button#dup-btn-archive {min-width: 150px}
|
44 |
-
div.one-click-download {margin:15px 0 10px 0; font-size:16px; font-weight: bold}
|
45 |
-
div.one-click-download i.fa-bolt{padding-right: 5px}
|
46 |
-
div.one-click-download i.fa-file-archive-o{padding-right: 5px}
|
47 |
-
|
48 |
-
div.dup-button-footer {text-align:right; margin:20px 10px 0px 0px}
|
49 |
-
button.button {font-size:16px !important; height:30px !important; font-weight:bold; padding:0px 10px 5px 10px !important; min-width: 150px }
|
50 |
-
span.dup-btn-size {font-size:11px;font-weight: normal}
|
51 |
-
p.get-pro {font-size:13px; color:#
|
52 |
-
div.dup-howto-exe {font-size:16px; font-style: italic; font-weight: bold; margin:45px 0 45px 0}
|
53 |
-
|
54 |
-
/*HOST TIMEOUT */
|
55 |
-
div#dup-msg-error {color:maroon; padding:5px;}
|
56 |
-
div.dup-box-title {text-align: left; background-color:#F6F6F6}
|
57 |
-
div.dup-box-title:hover { background-color:#efefef}
|
58 |
-
div.dup-box-panel {text-align: left}
|
59 |
-
div.no-top {border-top: none}
|
60 |
-
div.dup-box-panel b.opt-title {font-size:18px}
|
61 |
-
div.dup-msg-error-area {overflow-y: scroll; padding:5px 15px 15px 15px; max-height:170px; width:95%; border: 1px solid silver; border-radius: 4px; line-height: 22px}
|
62 |
-
div#dup-logs {text-align:center; margin:auto; padding:5px; width:350px;}
|
63 |
-
div#dup-logs a {display:inline-block;}
|
64 |
-
span.sub-data {display: inline-block; padding-left:20px}
|
65 |
-
</style>
|
66 |
-
|
67 |
-
<!-- =========================================
|
68 |
-
TOOL BAR: STEPS -->
|
69 |
-
<table id="dup-toolbar">
|
70 |
-
<tr valign="top">
|
71 |
-
<td style="white-space: nowrap">
|
72 |
-
<div id="dup-wiz">
|
73 |
-
<div id="dup-wiz-steps">
|
74 |
-
<div class="completed-step"><a>1-<?php _e('Setup', 'duplicator'); ?></a></div>
|
75 |
-
<div class="completed-step"><a>2-<?php _e('Scan', 'duplicator'); ?> </a></div>
|
76 |
-
<div class="active-step"><a>3-<?php _e('Build', 'duplicator'); ?> </a></div>
|
77 |
-
</div>
|
78 |
-
<div id="dup-wiz-title">
|
79 |
-
<?php _e('Step 3: Build Package', 'duplicator'); ?>
|
80 |
-
</div>
|
81 |
-
</div>
|
82 |
-
</td>
|
83 |
-
<td style="padding-bottom:4px">
|
84 |
-
<div id="dup-create-area-nolink"><?php _e("Create New", 'duplicator'); ?></div>
|
85 |
-
<div id="dup-create-area-link"><a href="admin.php?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a></div>
|
86 |
-
<div style="float:right;margin: 0px 5px;"><a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("Packages", 'duplicator'); ?></a></div>
|
87 |
-
</td>
|
88 |
-
</tr>
|
89 |
-
</table>
|
90 |
-
<hr class="dup-toolbar-line">
|
91 |
-
|
92 |
-
|
93 |
-
<form id="form-duplicator" method="post" action="?page=duplicator">
|
94 |
-
<?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field', false); ?>
|
95 |
-
|
96 |
-
<!-- PROGRESS BAR -->
|
97 |
-
<div id="dup-progress-bar-area">
|
98 |
-
<div class="dup-progress-title"><i class="fa fa-cog fa-spin"></i> <?php _e('Building Package', 'duplicator'); ?></div>
|
99 |
-
<div id="dup-progress-bar"></div>
|
100 |
-
<b><?php _e('Please Wait...', 'duplicator'); ?></b><br/><br/>
|
101 |
-
<i><?php _e('Keep this window open during the build process.', 'duplicator'); ?></i><br/>
|
102 |
-
<i><?php _e('This may take several minutes.', 'duplicator'); ?></i><br/>
|
103 |
-
</div>
|
104 |
-
|
105 |
-
<div id="dup-progress-area" class="dup-panel" style="display:none">
|
106 |
-
<div class="dup-panel-title"><b style="font-size:22px"><?php _e('Build Status', 'duplicator'); ?></b></div>
|
107 |
-
<div class="dup-panel-panel">
|
108 |
-
|
109 |
-
<!-- =========================
|
110 |
-
SUCCESS MESSAGE -->
|
111 |
-
<div id="dup-msg-success" style="display:none">
|
112 |
-
<div class="hdr-pack-complete">
|
113 |
-
<i class="fa fa-check-square-o fa-lg"></i> <?php _e('Package Completed', 'duplicator'); ?>
|
114 |
-
</div>
|
115 |
-
|
116 |
-
<div class="dup-msg-success-stats">
|
117 |
-
<!--b><?php _e('Name', 'duplicator'); ?>:</b> <span id="data-name-hash"></span><br/-->
|
118 |
-
<b><?php _e('Process Time', 'duplicator'); ?>:</b> <span id="data-time"></span><br/>
|
119 |
-
</div><br/>
|
120 |
-
|
121 |
-
<!-- DOWNLOAD FILES -->
|
122 |
-
<fieldset class="download-area">
|
123 |
-
<legend>
|
124 |
-
<?php _e("Download Files", 'duplicator') ?> <i class="fa fa-download"></i>
|
125 |
-
</legend>
|
126 |
-
<button id="dup-btn-installer" class="button button-primary button-large" title="<?php _e("Click to download installer file", 'duplicator') ?>">
|
127 |
-
<i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?>
|
128 |
-
</button>
|
129 |
-
<button id="dup-btn-archive" class="button button-primary button-large" title="<?php _e("Click to download archive file", 'duplicator') ?>">
|
130 |
-
<i class="fa fa-file-archive-o"></i> <?php _e("Archive", 'duplicator') ?>
|
131 |
-
<span id="dup-btn-archive-size" class="dup-btn-size"></span>
|
132 |
-
</button>
|
133 |
-
<div class="one-click-download">
|
134 |
-
<a href="javascript:void(0)" id="dup-link-download-both" title="<?php _e("Click to download both files", 'duplicator') ?>"><i class="fa fa-bolt"></i><i class="fa fa-file-archive-o"></i><?php _e("One-Click Download", 'duplicator') ?></a>
|
135 |
-
<sup><i class="fa fa-question-circle" style='font-size:11px'
|
136 |
-
data-tooltip-title="<?php _e("One Click:", 'duplicator'); ?>"
|
137 |
-
data-tooltip="<?php _e('Clicking this link will open both the installer and archive download prompts at the same time. '
|
138 |
-
. 'On some browsers you may have to disable pop-up warnings on this domain for this to work correctly.', 'duplicator'); ?>">
|
139 |
-
</i></sup>
|
140 |
-
</div>
|
141 |
-
</fieldset>
|
142 |
-
|
143 |
-
<div class="dup-howto-exe">
|
144 |
-
<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_built_install_help&utm_campaign=duplicator_free#quick-040-q" target="_blank">
|
145 |
-
<?php _e('How do I install this Package?', 'duplicator'); ?>
|
146 |
-
</a>
|
147 |
-
</div>
|
148 |
-
|
149 |
-
<p class="get-pro">
|
150 |
-
<?php echo $rand_txt[array_rand($rand_txt, 1)]; ?>
|
151 |
-
</p>
|
152 |
-
</div>
|
153 |
-
|
154 |
-
<!-- =========================
|
155 |
-
ERROR MESSAGE -->
|
156 |
-
<div id="dup-msg-error" style="display:none; color:#000">
|
157 |
-
<div class="done-title"><i class="fa fa-chain-broken"></i> <?php _e('Host Build Interrupt', 'duplicator'); ?></div>
|
158 |
-
<b><?php _e('This server cannot complete the build due to setup constraints.', 'duplicator'); ?></b><br/>
|
159 |
-
<i><?php _e("To help get you past this hosts limitation consider these three options:", 'duplicator'); ?></i>
|
160 |
-
<br/><br/><br/>
|
161 |
-
|
162 |
-
<!-- OPTION 1: TRY AGAIN -->
|
163 |
-
<div class="dup-box">
|
164 |
-
<div class="dup-box-title">
|
165 |
-
<i class="fa fa-reply"></i> <?php _e('Try Again', 'duplicator'); ?>
|
166 |
-
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
167 |
-
</div>
|
168 |
-
<div class="dup-box-panel" id="dup-pack-build-try1" style="display:none">
|
169 |
-
<b class="opt-title"><?php _e('OPTION 1:', 'duplicator'); ?></b><br/>
|
170 |
-
|
171 |
-
<?php _e('The first pass for reading files on some budget hosts is slow and may conflict with strict timeout settings '
|
172 |
-
. 'set up by the hosting provider. If this is the case its recommended to retry the build. <i>If the problem persists then consider the other options below.</i>', 'duplicator'); ?><br/><br/>
|
173 |
-
|
174 |
-
<div style="text-align: center; margin: 10px">
|
175 |
-
<input type="button" class="button-large button-primary" value="<?php _e('Retry Package Build', 'duplicator'); ?>" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=1'" />
|
176 |
-
</div>
|
177 |
-
|
178 |
-
<div style="color:#777; padding: 15px 5px 5px 5px">
|
179 |
-
<b> <?php _e('Notice', 'duplicator'); ?></b><br/>
|
180 |
-
<?php printf('<b><i class="fa fa-folder-o"></i> %s %s</b> <br/> %s',
|
181 |
-
__('Build Folder:'),
|
182 |
-
DUPLICATOR_SSDIR_PATH_TMP,
|
183 |
-
__("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 "
|
184 |
-
. "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 "
|
185 |
-
. "has strict timeout constraints.", 'duplicator')
|
186 |
-
);
|
187 |
-
?>
|
188 |
-
</div>
|
189 |
-
</div>
|
190 |
-
</div>
|
191 |
-
|
192 |
-
<!-- OPTION 2: Two-Part Install -->
|
193 |
-
<div class="dup-box no-top">
|
194 |
-
<div class="dup-box-title">
|
195 |
-
<i class="fa fa-random"></i> <?php _e('Two-Part Install', 'duplicator'); ?>
|
196 |
-
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
197 |
-
</div>
|
198 |
-
<div class="dup-box-panel" id="dup-pack-build-try2" style="display:none">
|
199 |
-
<b class="opt-title"><?php _e('OPTION 2:', 'duplicator'); ?></b><br/>
|
200 |
-
|
201 |
-
<?php _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 '
|
202 |
-
. '\'database-only\' archive, manually move the website files, and then run the installer to complete the process.', 'duplicator'); ?><br/><br/>
|
203 |
-
|
204 |
-
<b><?php _e('<i class="fa fa-file-text-o"></i> Overview', 'duplicator'); ?></b><br/>
|
205 |
-
<?php _e('Please follow these steps:', 'duplicator'); ?><br/>
|
206 |
-
<ol>
|
207 |
-
<li><?php _e('Click the button below to go back to Step 1.', 'duplicator'); ?></li>
|
208 |
-
<li><?php _e('On Step 1 the "Archive Only the Database" checkbox will be auto checked.', 'duplicator'); ?></li>
|
209 |
-
<li>
|
210 |
-
<?php _e('Complete the package build and follow the ', 'duplicator'); ?>
|
211 |
-
<?php
|
212 |
-
printf('%s "<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_2partlink&utm_campaign=build_issues#quick-060-q" target="faq">%s</a>".',
|
213 |
-
__('', 'duplicator'),
|
214 |
-
__('Quick Start Two-Part Install Instructions', 'duplicator'));
|
215 |
-
?>
|
216 |
-
</li>
|
217 |
-
</ol> <br/>
|
218 |
-
|
219 |
-
<div style="text-align: center; margin: 10px">
|
220 |
-
<input type="checkbox" id="dup-two-part-check" onclick="Duplicator.Pack.ToggleTwoPart()">
|
221 |
-
<label for="dup-two-part-check"><?php _e('Yes. I have read the above overview and would like to continue!', 'duplicator'); ?></label><br/><br/>
|
222 |
-
<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'">
|
223 |
-
<i class="fa fa-random"></i> <?php _e('Start Two-Part Install Process', 'duplicator'); ?>
|
224 |
-
</button>
|
225 |
-
</div><br/>
|
226 |
-
</div>
|
227 |
-
</div>
|
228 |
-
|
229 |
-
<!-- OPTION 3: DIAGNOSE SERVER -->
|
230 |
-
<div class="dup-box no-top">
|
231 |
-
<div class="dup-box-title">
|
232 |
-
<i class="fa fa-cog"></i> <?php _e('Configure Server', 'duplicator'); ?>
|
233 |
-
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
234 |
-
</div>
|
235 |
-
<div class="dup-box-panel" id="dup-pack-build-try3" style="display:none">
|
236 |
-
<b class="opt-title"><?php _e('OPTION 3:', 'duplicator'); ?></b><br/>
|
237 |
-
<?php _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 '
|
238 |
-
. 'various recommendations you can take to improve/unlock constraints set up on this server.', 'duplicator'); ?><br/><br/>
|
239 |
-
|
240 |
-
<div style="text-align: center; margin: 10px; font-size:16px; font-weight: bold">
|
241 |
-
<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">
|
242 |
-
[<?php _e('Diagnose Server Setup', 'duplicator'); ?>]
|
243 |
-
</a>
|
244 |
-
</div>
|
245 |
-
|
246 |
-
<b><?php _e('RUNTIME DETAILS', 'duplicator'); ?>:</b><br/>
|
247 |
-
<div class="dup-msg-error-area">
|
248 |
-
<div id="dup-msg-error-response-time">
|
249 |
-
<span class="label"><?php _e("Allowed Runtime:", 'duplicator'); ?></span>
|
250 |
-
<span class="data"></span>
|
251 |
-
</div>
|
252 |
-
<div id="dup-msg-error-response-php">
|
253 |
-
<span class="label"><?php _e("PHP Max Execution", 'duplicator'); ?></span><br/>
|
254 |
-
<span class="data sub-data">
|
255 |
-
<span class="label"><?php _e("Time", 'duplicator'); ?>:</span>
|
256 |
-
<?php
|
257 |
-
$try_value = @ini_get('max_execution_time');
|
258 |
-
$try_update = set_time_limit(0);
|
259 |
-
echo "$try_value <a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'> (default)</a>";
|
260 |
-
?>
|
261 |
-
<i class="fa fa-question-circle data-size-help"
|
262 |
-
data-tooltip-title="<?php _e("PHP Max Execution Time", 'duplicator'); ?>"
|
263 |
-
data-tooltip="<?php _e('This value is represented in seconds. A value of 0 means no timeout limit is set for PHP.', 'duplicator'); ?>"></i>
|
264 |
-
</span><br/>
|
265 |
-
|
266 |
-
<span class="data sub-data">
|
267 |
-
<span class="label"><?php _e("Mode", 'duplicator'); ?>:</span>
|
268 |
-
<?php
|
269 |
-
$try_update = $try_update ? 'is dynamic' : 'value is fixed';
|
270 |
-
echo "{$try_update}";
|
271 |
-
?>
|
272 |
-
<i class="fa fa-question-circle data-size-help"
|
273 |
-
data-tooltip-title="<?php _e("PHP Max Execution Mode", 'duplicator'); ?>"
|
274 |
-
data-tooltip="<?php _e('If the value is [dynamic] then its possible for PHP to run longer than the default. '
|
275 |
-
. '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 '
|
276 |
-
. 'the web server has been enabled with a timeout cap and is overriding the PHP max time setting.', 'duplicator'); ?>"></i>
|
277 |
-
</span>
|
278 |
-
</div>
|
279 |
-
|
280 |
-
<div id="dup-msg-error-response-status">
|
281 |
-
<span class="label"><?php _e("Server Status:", 'duplicator'); ?></span>
|
282 |
-
<span class="data"></span>
|
283 |
-
</div>
|
284 |
-
<div id="dup-msg-error-response-text">
|
285 |
-
<span class="label"><?php _e("Error Message:", 'duplicator'); ?></span><br/>
|
286 |
-
<span class="data"></span>
|
287 |
-
</div>
|
288 |
-
</div>
|
289 |
-
|
290 |
-
<!-- LOGS -->
|
291 |
-
<div id="dup-logs">
|
292 |
-
<br/>
|
293 |
-
<i class="fa fa-list-alt"></i>
|
294 |
-
<a href='javascript:void(0)' style="color:#000" onclick='Duplicator.OpenLogWindow(true)'><?php _e('Read Package Log File', 'duplicator');?></a>
|
295 |
-
<br/><br/>
|
296 |
-
</div>
|
297 |
-
</div>
|
298 |
-
</div>
|
299 |
-
<br/><br/><br/>
|
300 |
-
</div>
|
301 |
-
|
302 |
-
</div>
|
303 |
-
</div>
|
304 |
-
|
305 |
-
</form>
|
306 |
-
|
307 |
-
<script>
|
308 |
-
jQuery(document).ready(function($) {
|
309 |
-
/* ----------------------------------------
|
310 |
-
* METHOD: Performs Ajax post to create a new package
|
311 |
-
* Timeout (10000000 = 166 minutes) */
|
312 |
-
Duplicator.Pack.Create = function() {
|
313 |
-
|
314 |
-
var startTime;
|
315 |
-
var endTime;
|
316 |
-
|
317 |
-
var data = {action : 'duplicator_package_build', nonce: '<?php echo $ajax_nonce; ?>'}
|
318 |
-
|
319 |
-
$.ajax({
|
320 |
-
type: "POST",
|
321 |
-
url: ajaxurl,
|
322 |
-
dataType: "json",
|
323 |
-
timeout: 10000000,
|
324 |
-
data: data,
|
325 |
-
beforeSend: function() {startTime = new Date().getTime();},
|
326 |
-
complete: function() {
|
327 |
-
endTime = new Date().getTime();
|
328 |
-
var millis = (endTime - startTime);
|
329 |
-
var minutes = Math.floor(millis / 60000);
|
330 |
-
var seconds = ((millis % 60000) / 1000).toFixed(0);
|
331 |
-
var status = minutes + ":" + (seconds < 10 ? '0' : '') + seconds;
|
332 |
-
$('#dup-msg-error-response-time span.data').html(status);
|
333 |
-
$('#dup-create-area-nolink').hide();
|
334 |
-
$('#dup-create-area-link').show();
|
335 |
-
},
|
336 |
-
success: function(data) {
|
337 |
-
$('#dup-progress-bar-area').hide();
|
338 |
-
$('#dup-progress-area, #dup-msg-success').show(300);
|
339 |
-
|
340 |
-
var Pack = data.Package;
|
341 |
-
var InstallURL = Pack.StoreURL + Pack.Installer.File + "?get=1&file=" + Pack.Installer.File;
|
342 |
-
var ArchiveURL = Pack.StoreURL + Pack.Archive.File + "?get=1";
|
343 |
-
|
344 |
-
$('#dup-btn-archive-size').append(' (' + data.ZipSize + ')')
|
345 |
-
$('#data-name-hash').text(Pack.NameHash || 'error read');
|
346 |
-
$('#data-time').text(data.Runtime || 'unable to read time');
|
347 |
-
|
348 |
-
//Wire Up Downloads
|
349 |
-
$('#dup-btn-installer').on("click", {name: InstallURL }, Duplicator.Pack.DownloadFile );
|
350 |
-
$('#dup-btn-archive').on("click", {name: ArchiveURL }, Duplicator.Pack.DownloadFile );
|
351 |
-
|
352 |
-
$('#dup-link-download-both').on("click", function() {
|
353 |
-
window.open(InstallURL);
|
354 |
-
window.open(ArchiveURL);
|
355 |
-
|
356 |
-
});
|
357 |
-
|
358 |
-
|
359 |
-
},
|
360 |
-
error: function(data) {
|
361 |
-
$('#dup-progress-bar-area').hide();
|
362 |
-
$('#dup-progress-area, #dup-msg-error').show(200);
|
363 |
-
var status = data.status + ' -' + data.statusText;
|
364 |
-
var response = (data.responseText != undefined && data.responseText.trim().length > 1) ? data.responseText.trim() : 'No client side error - see package log file';
|
365 |
-
$('#dup-msg-error-response-status span.data').html(status)
|
366 |
-
$('#dup-msg-error-response-text span.data').html(response);
|
367 |
-
console.log(data);
|
368 |
-
}
|
369 |
-
});
|
370 |
-
return false;
|
371 |
-
}
|
372 |
-
|
373 |
-
Duplicator.Pack.ToggleTwoPart = function() {
|
374 |
-
var $btn = $('#dup-two-part-btn');
|
375 |
-
if ($('#dup-two-part-check').is(':checked')) {
|
376 |
-
$btn.removeAttr("disabled");
|
377 |
-
} else {
|
378 |
-
$btn.attr("disabled", true);
|
379 |
-
}
|
380 |
-
};
|
381 |
-
|
382 |
-
//Page Init:
|
383 |
-
Duplicator.UI.AnimateProgressBar('dup-progress-bar');
|
384 |
-
Duplicator.Pack.Create();
|
385 |
-
|
386 |
-
});
|
387 |
</script>
|
1 |
+
<?php
|
2 |
+
//Nonce Check
|
3 |
+
if (! isset( $_POST['dup_form_opts_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_form_opts_nonce_field'], 'dup_form_opts' ) ) {
|
4 |
+
DUP_UI_Notice::redirect('admin.php?page=duplicator&tab=new1');
|
5 |
+
}
|
6 |
+
|
7 |
+
$Package = DUP_Package::getActive();
|
8 |
+
$ajax_nonce = wp_create_nonce('dup_package_build');
|
9 |
+
|
10 |
+
//Help support Duplicator
|
11 |
+
$atext0 = "<a target='_blank' href='https://wordpress.org/support/plugin/duplicator/reviews/?filter=5'>";
|
12 |
+
$atext0 .= __('Help review the plugin', 'duplicator') . '!</a>';
|
13 |
+
|
14 |
+
//Get even more power & features with Duplicator Pro
|
15 |
+
$atext1 = __('Want more power? Try', 'duplicator');
|
16 |
+
$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'>";
|
17 |
+
$atext1 .= __('Duplicator Pro', 'duplicator') . '!</a>';
|
18 |
+
|
19 |
+
$rand_txt = array();
|
20 |
+
$rand_txt[0] = $atext0;
|
21 |
+
//$rand_txt[1] = $atext1;
|
22 |
+
?>
|
23 |
+
|
24 |
+
<style>
|
25 |
+
div#dup-progress-area {text-align:center; max-width:800px; min-height:200px; border:1px solid silver; border-radius:5px; margin:25px auto 10px auto; padding:0px; box-shadow: 0 8px 6px -6px #999;}
|
26 |
+
div.dup-progress-title {font-size:22px;padding:5px 0 20px 0; font-weight: bold}
|
27 |
+
div#dup-progress-area div.inner {padding:10px; line-height:22px}
|
28 |
+
div#dup-progress-area h2.title {background-color:#efefef; margin:0px}
|
29 |
+
div#dup-progress-area span.label {font-weight:bold}
|
30 |
+
div#dup-msg-success {color:#18592A; padding:5px;}
|
31 |
+
|
32 |
+
div.dup-msg-success-stats{color:#999;margin:5px 0; font-size:11px; line-height:13px}
|
33 |
+
div.dup-msg-success-links {margin:20px 5px 5px 5px; font-size: 13px;}
|
34 |
+
div#dup-progress-area div.done-title {font-size:18px; font-weight:bold; margin:0px 0px 10px 0px}
|
35 |
+
div#dup-progress-area div.dup-panel-title {background-color: #dfdfdf;}
|
36 |
+
div.hdr-pack-complete {font-size:18px; color:green; font-weight: bold}
|
37 |
+
|
38 |
+
div#dup-create-area-nolink, div#dup-create-area-link {float:right; font-weight: bold; margin: 0; padding: 0}
|
39 |
+
div#dup-create-area-link {display:none; margin-left: -5px}
|
40 |
+
div#dup-progress-area div.dup-panel-panel { border-top: 1px solid silver}
|
41 |
+
fieldset.download-area {border:2px dashed #dfdfdf; padding:20px 20px 10px 20px; border-radius:9px; margin: auto; width:400px }
|
42 |
+
fieldset.download-area legend {font-weight: bold; font-size: 16px}
|
43 |
+
button#dup-btn-installer, button#dup-btn-archive {min-width: 150px}
|
44 |
+
div.one-click-download {margin:15px 0 10px 0; font-size:16px; font-weight: bold}
|
45 |
+
div.one-click-download i.fa-bolt{padding-right: 5px}
|
46 |
+
div.one-click-download i.fa-file-archive-o{padding-right: 5px}
|
47 |
+
|
48 |
+
div.dup-button-footer {text-align:right; margin:20px 10px 0px 0px}
|
49 |
+
button.button {font-size:16px !important; height:30px !important; font-weight:bold; padding:0px 10px 5px 10px !important; min-width: 150px }
|
50 |
+
span.dup-btn-size {font-size:11px;font-weight: normal}
|
51 |
+
p.get-pro {font-size:13px; color:#222; border-top:1px solid #eeeeee; padding:5px 0 0 0; margin:0; font-style:italic}
|
52 |
+
div.dup-howto-exe {font-size:16px; font-style: italic; font-weight: bold; margin:45px 0 45px 0}
|
53 |
+
|
54 |
+
/*HOST TIMEOUT */
|
55 |
+
div#dup-msg-error {color:maroon; padding:5px;}
|
56 |
+
div.dup-box-title {text-align: left; background-color:#F6F6F6}
|
57 |
+
div.dup-box-title:hover { background-color:#efefef}
|
58 |
+
div.dup-box-panel {text-align: left}
|
59 |
+
div.no-top {border-top: none}
|
60 |
+
div.dup-box-panel b.opt-title {font-size:18px}
|
61 |
+
div.dup-msg-error-area {overflow-y: scroll; padding:5px 15px 15px 15px; max-height:170px; width:95%; border: 1px solid silver; border-radius: 4px; line-height: 22px}
|
62 |
+
div#dup-logs {text-align:center; margin:auto; padding:5px; width:350px;}
|
63 |
+
div#dup-logs a {display:inline-block;}
|
64 |
+
span.sub-data {display: inline-block; padding-left:20px}
|
65 |
+
</style>
|
66 |
+
|
67 |
+
<!-- =========================================
|
68 |
+
TOOL BAR: STEPS -->
|
69 |
+
<table id="dup-toolbar">
|
70 |
+
<tr valign="top">
|
71 |
+
<td style="white-space: nowrap">
|
72 |
+
<div id="dup-wiz">
|
73 |
+
<div id="dup-wiz-steps">
|
74 |
+
<div class="completed-step"><a>1-<?php _e('Setup', 'duplicator'); ?></a></div>
|
75 |
+
<div class="completed-step"><a>2-<?php _e('Scan', 'duplicator'); ?> </a></div>
|
76 |
+
<div class="active-step"><a>3-<?php _e('Build', 'duplicator'); ?> </a></div>
|
77 |
+
</div>
|
78 |
+
<div id="dup-wiz-title">
|
79 |
+
<?php _e('Step 3: Build Package', 'duplicator'); ?>
|
80 |
+
</div>
|
81 |
+
</div>
|
82 |
+
</td>
|
83 |
+
<td style="padding-bottom:4px">
|
84 |
+
<div id="dup-create-area-nolink"><?php _e("Create New", 'duplicator'); ?></div>
|
85 |
+
<div id="dup-create-area-link"><a href="admin.php?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a></div>
|
86 |
+
<div style="float:right;margin: 0px 5px;"><a href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("Packages", 'duplicator'); ?></a></div>
|
87 |
+
</td>
|
88 |
+
</tr>
|
89 |
+
</table>
|
90 |
+
<hr class="dup-toolbar-line">
|
91 |
+
|
92 |
+
|
93 |
+
<form id="form-duplicator" method="post" action="?page=duplicator">
|
94 |
+
<?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field', false); ?>
|
95 |
+
|
96 |
+
<!-- PROGRESS BAR -->
|
97 |
+
<div id="dup-progress-bar-area">
|
98 |
+
<div class="dup-progress-title"><i class="fa fa-cog fa-spin"></i> <?php _e('Building Package', 'duplicator'); ?></div>
|
99 |
+
<div id="dup-progress-bar"></div>
|
100 |
+
<b><?php _e('Please Wait...', 'duplicator'); ?></b><br/><br/>
|
101 |
+
<i><?php _e('Keep this window open during the build process.', 'duplicator'); ?></i><br/>
|
102 |
+
<i><?php _e('This may take several minutes.', 'duplicator'); ?></i><br/>
|
103 |
+
</div>
|
104 |
+
|
105 |
+
<div id="dup-progress-area" class="dup-panel" style="display:none">
|
106 |
+
<div class="dup-panel-title"><b style="font-size:22px"><?php _e('Build Status', 'duplicator'); ?></b></div>
|
107 |
+
<div class="dup-panel-panel">
|
108 |
+
|
109 |
+
<!-- =========================
|
110 |
+
SUCCESS MESSAGE -->
|
111 |
+
<div id="dup-msg-success" style="display:none">
|
112 |
+
<div class="hdr-pack-complete">
|
113 |
+
<i class="fa fa-check-square-o fa-lg"></i> <?php _e('Package Completed', 'duplicator'); ?>
|
114 |
+
</div>
|
115 |
+
|
116 |
+
<div class="dup-msg-success-stats">
|
117 |
+
<!--b><?php _e('Name', 'duplicator'); ?>:</b> <span id="data-name-hash"></span><br/-->
|
118 |
+
<b><?php _e('Process Time', 'duplicator'); ?>:</b> <span id="data-time"></span><br/>
|
119 |
+
</div><br/>
|
120 |
+
|
121 |
+
<!-- DOWNLOAD FILES -->
|
122 |
+
<fieldset class="download-area">
|
123 |
+
<legend>
|
124 |
+
<?php _e("Download Files", 'duplicator') ?> <i class="fa fa-download"></i>
|
125 |
+
</legend>
|
126 |
+
<button id="dup-btn-installer" class="button button-primary button-large" title="<?php _e("Click to download installer file", 'duplicator') ?>">
|
127 |
+
<i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?>
|
128 |
+
</button>
|
129 |
+
<button id="dup-btn-archive" class="button button-primary button-large" title="<?php _e("Click to download archive file", 'duplicator') ?>">
|
130 |
+
<i class="fa fa-file-archive-o"></i> <?php _e("Archive", 'duplicator') ?>
|
131 |
+
<span id="dup-btn-archive-size" class="dup-btn-size"></span>
|
132 |
+
</button>
|
133 |
+
<div class="one-click-download">
|
134 |
+
<a href="javascript:void(0)" id="dup-link-download-both" title="<?php _e("Click to download both files", 'duplicator') ?>"><i class="fa fa-bolt"></i><i class="fa fa-file-archive-o"></i><?php _e("One-Click Download", 'duplicator') ?></a>
|
135 |
+
<sup><i class="fa fa-question-circle" style='font-size:11px'
|
136 |
+
data-tooltip-title="<?php _e("One Click:", 'duplicator'); ?>"
|
137 |
+
data-tooltip="<?php _e('Clicking this link will open both the installer and archive download prompts at the same time. '
|
138 |
+
. 'On some browsers you may have to disable pop-up warnings on this domain for this to work correctly.', 'duplicator'); ?>">
|
139 |
+
</i></sup>
|
140 |
+
</div>
|
141 |
+
</fieldset>
|
142 |
+
|
143 |
+
<div class="dup-howto-exe">
|
144 |
+
<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=package_built_install_help&utm_campaign=duplicator_free#quick-040-q" target="_blank">
|
145 |
+
<?php _e('How do I install this Package?', 'duplicator'); ?>
|
146 |
+
</a>
|
147 |
+
</div>
|
148 |
+
|
149 |
+
<p class="get-pro">
|
150 |
+
<?php echo $rand_txt[array_rand($rand_txt, 1)]; ?>
|
151 |
+
</p>
|
152 |
+
</div>
|
153 |
+
|
154 |
+
<!-- =========================
|
155 |
+
ERROR MESSAGE -->
|
156 |
+
<div id="dup-msg-error" style="display:none; color:#000">
|
157 |
+
<div class="done-title"><i class="fa fa-chain-broken"></i> <?php _e('Host Build Interrupt', 'duplicator'); ?></div>
|
158 |
+
<b><?php _e('This server cannot complete the build due to setup constraints.', 'duplicator'); ?></b><br/>
|
159 |
+
<i><?php _e("To help get you past this hosts limitation consider these three options:", 'duplicator'); ?></i>
|
160 |
+
<br/><br/><br/>
|
161 |
+
|
162 |
+
<!-- OPTION 1: TRY AGAIN -->
|
163 |
+
<div class="dup-box">
|
164 |
+
<div class="dup-box-title">
|
165 |
+
<i class="fa fa-reply"></i> <?php _e('Try Again', 'duplicator'); ?>
|
166 |
+
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
167 |
+
</div>
|
168 |
+
<div class="dup-box-panel" id="dup-pack-build-try1" style="display:none">
|
169 |
+
<b class="opt-title"><?php _e('OPTION 1:', 'duplicator'); ?></b><br/>
|
170 |
+
|
171 |
+
<?php _e('The first pass for reading files on some budget hosts is slow and may conflict with strict timeout settings '
|
172 |
+
. 'set up by the hosting provider. If this is the case its recommended to retry the build. <i>If the problem persists then consider the other options below.</i>', 'duplicator'); ?><br/><br/>
|
173 |
+
|
174 |
+
<div style="text-align: center; margin: 10px">
|
175 |
+
<input type="button" class="button-large button-primary" value="<?php _e('Retry Package Build', 'duplicator'); ?>" onclick="window.location = 'admin.php?page=duplicator&tab=new1&retry=1'" />
|
176 |
+
</div>
|
177 |
+
|
178 |
+
<div style="color:#777; padding: 15px 5px 5px 5px">
|
179 |
+
<b> <?php _e('Notice', 'duplicator'); ?></b><br/>
|
180 |
+
<?php printf('<b><i class="fa fa-folder-o"></i> %s %s</b> <br/> %s',
|
181 |
+
__('Build Folder:'),
|
182 |
+
DUPLICATOR_SSDIR_PATH_TMP,
|
183 |
+
__("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 "
|
184 |
+
. "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 "
|
185 |
+
. "has strict timeout constraints.", 'duplicator')
|
186 |
+
);
|
187 |
+
?>
|
188 |
+
</div>
|
189 |
+
</div>
|
190 |
+
</div>
|
191 |
+
|
192 |
+
<!-- OPTION 2: Two-Part Install -->
|
193 |
+
<div class="dup-box no-top">
|
194 |
+
<div class="dup-box-title">
|
195 |
+
<i class="fa fa-random"></i> <?php _e('Two-Part Install', 'duplicator'); ?>
|
196 |
+
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
197 |
+
</div>
|
198 |
+
<div class="dup-box-panel" id="dup-pack-build-try2" style="display:none">
|
199 |
+
<b class="opt-title"><?php _e('OPTION 2:', 'duplicator'); ?></b><br/>
|
200 |
+
|
201 |
+
<?php _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 '
|
202 |
+
. '\'database-only\' archive, manually move the website files, and then run the installer to complete the process.', 'duplicator'); ?><br/><br/>
|
203 |
+
|
204 |
+
<b><?php _e('<i class="fa fa-file-text-o"></i> Overview', 'duplicator'); ?></b><br/>
|
205 |
+
<?php _e('Please follow these steps:', 'duplicator'); ?><br/>
|
206 |
+
<ol>
|
207 |
+
<li><?php _e('Click the button below to go back to Step 1.', 'duplicator'); ?></li>
|
208 |
+
<li><?php _e('On Step 1 the "Archive Only the Database" checkbox will be auto checked.', 'duplicator'); ?></li>
|
209 |
+
<li>
|
210 |
+
<?php _e('Complete the package build and follow the ', 'duplicator'); ?>
|
211 |
+
<?php
|
212 |
+
printf('%s "<a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_2partlink&utm_campaign=build_issues#quick-060-q" target="faq">%s</a>".',
|
213 |
+
__('', 'duplicator'),
|
214 |
+
__('Quick Start Two-Part Install Instructions', 'duplicator'));
|
215 |
+
?>
|
216 |
+
</li>
|
217 |
+
</ol> <br/>
|
218 |
+
|
219 |
+
<div style="text-align: center; margin: 10px">
|
220 |
+
<input type="checkbox" id="dup-two-part-check" onclick="Duplicator.Pack.ToggleTwoPart()">
|
221 |
+
<label for="dup-two-part-check"><?php _e('Yes. I have read the above overview and would like to continue!', 'duplicator'); ?></label><br/><br/>
|
222 |
+
<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'">
|
223 |
+
<i class="fa fa-random"></i> <?php _e('Start Two-Part Install Process', 'duplicator'); ?>
|
224 |
+
</button>
|
225 |
+
</div><br/>
|
226 |
+
</div>
|
227 |
+
</div>
|
228 |
+
|
229 |
+
<!-- OPTION 3: DIAGNOSE SERVER -->
|
230 |
+
<div class="dup-box no-top">
|
231 |
+
<div class="dup-box-title">
|
232 |
+
<i class="fa fa-cog"></i> <?php _e('Configure Server', 'duplicator'); ?>
|
233 |
+
<div class="dup-box-arrow"><i class="fa fa-caret-down"></i></div>
|
234 |
+
</div>
|
235 |
+
<div class="dup-box-panel" id="dup-pack-build-try3" style="display:none">
|
236 |
+
<b class="opt-title"><?php _e('OPTION 3:', 'duplicator'); ?></b><br/>
|
237 |
+
<?php _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 '
|
238 |
+
. 'various recommendations you can take to improve/unlock constraints set up on this server.', 'duplicator'); ?><br/><br/>
|
239 |
+
|
240 |
+
<div style="text-align: center; margin: 10px; font-size:16px; font-weight: bold">
|
241 |
+
<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">
|
242 |
+
[<?php _e('Diagnose Server Setup', 'duplicator'); ?>]
|
243 |
+
</a>
|
244 |
+
</div>
|
245 |
+
|
246 |
+
<b><?php _e('RUNTIME DETAILS', 'duplicator'); ?>:</b><br/>
|
247 |
+
<div class="dup-msg-error-area">
|
248 |
+
<div id="dup-msg-error-response-time">
|
249 |
+
<span class="label"><?php _e("Allowed Runtime:", 'duplicator'); ?></span>
|
250 |
+
<span class="data"></span>
|
251 |
+
</div>
|
252 |
+
<div id="dup-msg-error-response-php">
|
253 |
+
<span class="label"><?php _e("PHP Max Execution", 'duplicator'); ?></span><br/>
|
254 |
+
<span class="data sub-data">
|
255 |
+
<span class="label"><?php _e("Time", 'duplicator'); ?>:</span>
|
256 |
+
<?php
|
257 |
+
$try_value = @ini_get('max_execution_time');
|
258 |
+
$try_update = set_time_limit(0);
|
259 |
+
echo "$try_value <a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'> (default)</a>";
|
260 |
+
?>
|
261 |
+
<i class="fa fa-question-circle data-size-help"
|
262 |
+
data-tooltip-title="<?php _e("PHP Max Execution Time", 'duplicator'); ?>"
|
263 |
+
data-tooltip="<?php _e('This value is represented in seconds. A value of 0 means no timeout limit is set for PHP.', 'duplicator'); ?>"></i>
|
264 |
+
</span><br/>
|
265 |
+
|
266 |
+
<span class="data sub-data">
|
267 |
+
<span class="label"><?php _e("Mode", 'duplicator'); ?>:</span>
|
268 |
+
<?php
|
269 |
+
$try_update = $try_update ? 'is dynamic' : 'value is fixed';
|
270 |
+
echo "{$try_update}";
|
271 |
+
?>
|
272 |
+
<i class="fa fa-question-circle data-size-help"
|
273 |
+
data-tooltip-title="<?php _e("PHP Max Execution Mode", 'duplicator'); ?>"
|
274 |
+
data-tooltip="<?php _e('If the value is [dynamic] then its possible for PHP to run longer than the default. '
|
275 |
+
. '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 '
|
276 |
+
. 'the web server has been enabled with a timeout cap and is overriding the PHP max time setting.', 'duplicator'); ?>"></i>
|
277 |
+
</span>
|
278 |
+
</div>
|
279 |
+
|
280 |
+
<div id="dup-msg-error-response-status">
|
281 |
+
<span class="label"><?php _e("Server Status:", 'duplicator'); ?></span>
|
282 |
+
<span class="data"></span>
|
283 |
+
</div>
|
284 |
+
<div id="dup-msg-error-response-text">
|
285 |
+
<span class="label"><?php _e("Error Message:", 'duplicator'); ?></span><br/>
|
286 |
+
<span class="data"></span>
|
287 |
+
</div>
|
288 |
+
</div>
|
289 |
+
|
290 |
+
<!-- LOGS -->
|
291 |
+
<div id="dup-logs">
|
292 |
+
<br/>
|
293 |
+
<i class="fa fa-list-alt"></i>
|
294 |
+
<a href='javascript:void(0)' style="color:#000" onclick='Duplicator.OpenLogWindow(true)'><?php _e('Read Package Log File', 'duplicator');?></a>
|
295 |
+
<br/><br/>
|
296 |
+
</div>
|
297 |
+
</div>
|
298 |
+
</div>
|
299 |
+
<br/><br/><br/>
|
300 |
+
</div>
|
301 |
+
|
302 |
+
</div>
|
303 |
+
</div>
|
304 |
+
|
305 |
+
</form>
|
306 |
+
|
307 |
+
<script>
|
308 |
+
jQuery(document).ready(function($) {
|
309 |
+
/* ----------------------------------------
|
310 |
+
* METHOD: Performs Ajax post to create a new package
|
311 |
+
* Timeout (10000000 = 166 minutes) */
|
312 |
+
Duplicator.Pack.Create = function() {
|
313 |
+
|
314 |
+
var startTime;
|
315 |
+
var endTime;
|
316 |
+
|
317 |
+
var data = {action : 'duplicator_package_build', nonce: '<?php echo $ajax_nonce; ?>'}
|
318 |
+
|
319 |
+
$.ajax({
|
320 |
+
type: "POST",
|
321 |
+
url: ajaxurl,
|
322 |
+
dataType: "json",
|
323 |
+
timeout: 10000000,
|
324 |
+
data: data,
|
325 |
+
beforeSend: function() {startTime = new Date().getTime();},
|
326 |
+
complete: function() {
|
327 |
+
endTime = new Date().getTime();
|
328 |
+
var millis = (endTime - startTime);
|
329 |
+
var minutes = Math.floor(millis / 60000);
|
330 |
+
var seconds = ((millis % 60000) / 1000).toFixed(0);
|
331 |
+
var status = minutes + ":" + (seconds < 10 ? '0' : '') + seconds;
|
332 |
+
$('#dup-msg-error-response-time span.data').html(status);
|
333 |
+
$('#dup-create-area-nolink').hide();
|
334 |
+
$('#dup-create-area-link').show();
|
335 |
+
},
|
336 |
+
success: function(data) {
|
337 |
+
$('#dup-progress-bar-area').hide();
|
338 |
+
$('#dup-progress-area, #dup-msg-success').show(300);
|
339 |
+
|
340 |
+
var Pack = data.Package;
|
341 |
+
var InstallURL = Pack.StoreURL + Pack.Installer.File + "?get=1&file=" + Pack.Installer.File;
|
342 |
+
var ArchiveURL = Pack.StoreURL + Pack.Archive.File + "?get=1";
|
343 |
+
|
344 |
+
$('#dup-btn-archive-size').append(' (' + data.ZipSize + ')')
|
345 |
+
$('#data-name-hash').text(Pack.NameHash || 'error read');
|
346 |
+
$('#data-time').text(data.Runtime || 'unable to read time');
|
347 |
+
|
348 |
+
//Wire Up Downloads
|
349 |
+
$('#dup-btn-installer').on("click", {name: InstallURL }, Duplicator.Pack.DownloadFile );
|
350 |
+
$('#dup-btn-archive').on("click", {name: ArchiveURL }, Duplicator.Pack.DownloadFile );
|
351 |
+
|
352 |
+
$('#dup-link-download-both').on("click", function() {
|
353 |
+
window.open(InstallURL);
|
354 |
+
window.open(ArchiveURL);
|
355 |
+
|
356 |
+
});
|
357 |
+
|
358 |
+
|
359 |
+
},
|
360 |
+
error: function(data) {
|
361 |
+
$('#dup-progress-bar-area').hide();
|
362 |
+
$('#dup-progress-area, #dup-msg-error').show(200);
|
363 |
+
var status = data.status + ' -' + data.statusText;
|
364 |
+
var response = (data.responseText != undefined && data.responseText.trim().length > 1) ? data.responseText.trim() : 'No client side error - see package log file';
|
365 |
+
$('#dup-msg-error-response-status span.data').html(status)
|
366 |
+
$('#dup-msg-error-response-text span.data').html(response);
|
367 |
+
console.log(data);
|
368 |
+
}
|
369 |
+
});
|
370 |
+
return false;
|
371 |
+
}
|
372 |
+
|
373 |
+
Duplicator.Pack.ToggleTwoPart = function() {
|
374 |
+
var $btn = $('#dup-two-part-btn');
|
375 |
+
if ($('#dup-two-part-check').is(':checked')) {
|
376 |
+
$btn.removeAttr("disabled");
|
377 |
+
} else {
|
378 |
+
$btn.attr("disabled", true);
|
379 |
+
}
|
380 |
+
};
|
381 |
+
|
382 |
+
//Page Init:
|
383 |
+
Duplicator.UI.AnimateProgressBar('dup-progress-bar');
|
384 |
+
Duplicator.Pack.Create();
|
385 |
+
|
386 |
+
});
|
387 |
</script>
|
views/settings/storage.php
CHANGED
@@ -1,35 +1,35 @@
|
|
1 |
-
<style>
|
2 |
-
div.panel {padding: 20px 5px 10px 10px;}
|
3 |
-
div.area {font-size:16px; text-align: center; line-height: 30px; width:500px; margin:auto}
|
4 |
-
ul.li {padding:2px}
|
5 |
-
</style>
|
6 |
-
|
7 |
-
<div class="panel">
|
8 |
-
|
9 |
-
<br/>
|
10 |
-
<div class="area">
|
11 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
12 |
-
<h2>
|
13 |
-
<?php _e('Store your packages in multiple<br/> locations with Duplicator Pro', 'duplicator') ?>
|
14 |
-
</h2>
|
15 |
-
|
16 |
-
<div style='text-align: left; margin:auto; width:200px'>
|
17 |
-
<ul>
|
18 |
-
<li><i class="fa fa-amazon"></i> <?php _e('Amazon S3', 'duplicator'); ?></li>
|
19 |
-
<li><i class="fa fa-dropbox"></i> <?php _e(' Dropbox', 'duplicator'); ?></li>
|
20 |
-
<li><i class="fa fa-google"></i> <?php _e('Google Drive', 'duplicator'); ?></li>
|
21 |
-
<li><i class="fa fa-upload"></i> <?php _e('FTP', 'duplicator'); ?></li>
|
22 |
-
<li><i class="fa fa-folder-open-o"></i> <?php _e('Custom Directory', 'duplicator'); ?></li>
|
23 |
-
</ul>
|
24 |
-
</div>
|
25 |
-
<?php
|
26 |
-
_e('Set up a one-time storage location and automatically <br/> push the package to your destination.', 'duplicator');
|
27 |
-
?>
|
28 |
-
</div><br/>
|
29 |
-
|
30 |
-
<p style="text-align:center">
|
31 |
-
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_settings_storage&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
32 |
-
<?php _e('Learn More', 'duplicator') ?>
|
33 |
-
</a>
|
34 |
-
</p>
|
35 |
-
</div>
|
1 |
+
<style>
|
2 |
+
div.panel {padding: 20px 5px 10px 10px;}
|
3 |
+
div.area {font-size:16px; text-align: center; line-height: 30px; width:500px; margin:auto}
|
4 |
+
ul.li {padding:2px}
|
5 |
+
</style>
|
6 |
+
|
7 |
+
<div class="panel">
|
8 |
+
|
9 |
+
<br/>
|
10 |
+
<div class="area">
|
11 |
+
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/logo-dpro-300x50.png" />
|
12 |
+
<h2>
|
13 |
+
<?php _e('Store your packages in multiple<br/> locations with Duplicator Pro', 'duplicator') ?>
|
14 |
+
</h2>
|
15 |
+
|
16 |
+
<div style='text-align: left; margin:auto; width:200px'>
|
17 |
+
<ul>
|
18 |
+
<li><i class="fa fa-amazon"></i> <?php _e('Amazon S3', 'duplicator'); ?></li>
|
19 |
+
<li><i class="fa fa-dropbox"></i> <?php _e(' Dropbox', 'duplicator'); ?></li>
|
20 |
+
<li><i class="fa fa-google"></i> <?php _e('Google Drive', 'duplicator'); ?></li>
|
21 |
+
<li><i class="fa fa-upload"></i> <?php _e('FTP & SFTP', 'duplicator'); ?></li>
|
22 |
+
<li><i class="fa fa-folder-open-o"></i> <?php _e('Custom Directory', 'duplicator'); ?></li>
|
23 |
+
</ul>
|
24 |
+
</div>
|
25 |
+
<?php
|
26 |
+
_e('Set up a one-time storage location and automatically <br/> push the package to your destination.', 'duplicator');
|
27 |
+
?>
|
28 |
+
</div><br/>
|
29 |
+
|
30 |
+
<p style="text-align:center">
|
31 |
+
<a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_settings_storage&utm_campaign=duplicator_pro" target="_blank" class="button button-primary button-large dup-check-it-btn" >
|
32 |
+
<?php _e('Learn More', 'duplicator') ?>
|
33 |
+
</a>
|
34 |
+
</p>
|
35 |
+
</div>
|
views/tools/cleanup.php
DELETED
@@ -1,188 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$nonce = wp_create_nonce('duplicator_cleanup_page');
|
3 |
-
$ajax_nonce = wp_create_nonce('DUP_CTRL_Tools_deleteInstallerFiles');
|
4 |
-
$_GET['action'] = isset($_GET['action']) ? $_GET['action'] : 'display';
|
5 |
-
|
6 |
-
if (isset($_GET['action'])) {
|
7 |
-
if (($_GET['action'] == 'installer') || ($_GET['action'] == 'legacy') || ($_GET['action'] == 'tmp-cache')) {
|
8 |
-
$verify_nonce = $_REQUEST['_wpnonce'];
|
9 |
-
if (!wp_verify_nonce($verify_nonce, 'duplicator_cleanup_page')) {
|
10 |
-
exit; // Get out of here bad nounce!
|
11 |
-
}
|
12 |
-
}
|
13 |
-
}
|
14 |
-
|
15 |
-
switch ($_GET['action']) {
|
16 |
-
case 'installer' :
|
17 |
-
$action_response = __('Installer file cleanup ran!', 'duplicator');
|
18 |
-
$css_hide_msg = 'div.error {display:none}';
|
19 |
-
break;
|
20 |
-
case 'legacy':
|
21 |
-
DUP_Settings::LegacyClean();
|
22 |
-
$action_response = __('Legacy data removed.', 'duplicator');
|
23 |
-
break;
|
24 |
-
case 'tmp-cache':
|
25 |
-
DUP_Package::tempFileCleanup(true);
|
26 |
-
$action_response = __('Build cache removed.', 'duplicator');
|
27 |
-
break;
|
28 |
-
}
|
29 |
-
|
30 |
-
$installer_files = DUP_Server::getInstallerFiles();
|
31 |
-
$package_name = (isset($_GET['package'])) ? esc_html($_GET['package']) : '';
|
32 |
-
$package_path = (isset($_GET['package'])) ? DUPLICATOR_WPROOTPATH . esc_html($_GET['package']) : '';
|
33 |
-
|
34 |
-
$txt_found = __('File Found', 'duplicator');
|
35 |
-
$txt_removed = __('File Removed', 'duplicator');
|
36 |
-
$txt_archive_msg = __("<b>Archive File:</b> The archive file has a unique hashed name when downloaded. Leaving the archive file on your server does not impose a security"
|
37 |
-
. " risk if the file was not renamed. It is still recommended to remove the archive file after install,"
|
38 |
-
. " especially if it was renamed.", 'duplicator');
|
39 |
-
?>
|
40 |
-
|
41 |
-
<style>
|
42 |
-
<?php echo isset($css_hide_msg) ? $css_hide_msg : ''; ?>
|
43 |
-
div.success {color:#4A8254}
|
44 |
-
div.failed {color:red}
|
45 |
-
table.dup-reset-opts td:first-child {font-weight: bold}
|
46 |
-
table.dup-reset-opts td {padding:10px}
|
47 |
-
form#dup-settings-form {padding: 0px 10px 0px 10px}
|
48 |
-
button.dup-fixed-btn {min-width: 150px; text-align: center}
|
49 |
-
div#dup-tools-delete-moreinfo {display: none; padding: 5px 0 0 20px; border:1px solid silver; background-color: #fff; border-radius: 5px; padding:10px; margin:5px; width:750px }
|
50 |
-
</style>
|
51 |
-
|
52 |
-
<form id="dup-settings-form" action="?page=duplicator-tools&tab=cleanup" method="post">
|
53 |
-
|
54 |
-
<?php if ($_GET['action'] != 'display') : ?>
|
55 |
-
<div id="message" class="notice notice-success is-dismissible">
|
56 |
-
<p><b><?php echo $action_response; ?></b></p>
|
57 |
-
<?php if ( $_GET['action'] == 'installer') : ?>
|
58 |
-
<?php
|
59 |
-
$html = "";
|
60 |
-
|
61 |
-
//REMOVE CORE INSTALLER FILES
|
62 |
-
$installer_files = DUP_Server::getInstallerFiles();
|
63 |
-
foreach ($installer_files as $file => $path) {
|
64 |
-
@unlink($path);
|
65 |
-
echo (file_exists($path))
|
66 |
-
? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$txt_found} - {$path} </div>"
|
67 |
-
: "<div class='success'> <i class='fa fa-check'></i> {$txt_removed} - {$path} </div>";
|
68 |
-
}
|
69 |
-
|
70 |
-
//No way to know exact name of archive file except from installer.
|
71 |
-
//The only place where the package can be removed is from installer
|
72 |
-
//So just show a message if removing from plugin.
|
73 |
-
if (file_exists($package_path)) {
|
74 |
-
$path_parts = pathinfo($package_name);
|
75 |
-
$path_parts = (isset($path_parts['extension'])) ? $path_parts['extension'] : '';
|
76 |
-
if ($path_parts == "zip" && !is_dir($package_path)) {
|
77 |
-
$html .= (@unlink($package_path))
|
78 |
-
? "<div class='success'><i class='fa fa-check'></i> {$txt_removed} - {$package_path}</div>"
|
79 |
-
: "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$txt_found} - {$package_path}</div>";
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
echo $html;
|
84 |
-
?><br/>
|
85 |
-
|
86 |
-
<div style="font-style: italic; max-width:900px">
|
87 |
-
<b><?php _e('Security Notes', 'duplicator')?>:</b>
|
88 |
-
<?php _e('If the installer files do not successfully get removed with this action, then they WILL need to be removed manually through your hosts control panel, '
|
89 |
-
. ' file system or FTP. Please remove all installer files listed above to avoid leaving open security issues on your server.', 'duplicator')?>
|
90 |
-
<br/><br/>
|
91 |
-
<?php echo $txt_archive_msg; ?>
|
92 |
-
<br/><br/>
|
93 |
-
</div>
|
94 |
-
|
95 |
-
<?php endif; ?>
|
96 |
-
</div>
|
97 |
-
<?php endif; ?>
|
98 |
-
|
99 |
-
|
100 |
-
<h2><?php _e('Data Cleanup', 'duplicator')?></h2><hr size="1"/>
|
101 |
-
<table class="dup-reset-opts">
|
102 |
-
<tr style="vertical-align:text-top">
|
103 |
-
<td>
|
104 |
-
<button id="dup-remove-installer-files-btn" type="button" class="button button-small dup-fixed-btn" onclick="Duplicator.Tools.deleteInstallerFiles();">
|
105 |
-
<?php _e("Remove Installation Files", 'duplicator'); ?>
|
106 |
-
</button>
|
107 |
-
</td>
|
108 |
-
<td>
|
109 |
-
<?php _e("Removes all reserved installer files.", 'duplicator'); ?>
|
110 |
-
<a href="javascript:void(0)" onclick="jQuery('#dup-tools-delete-moreinfo').toggle()">[<?php _e("more info", 'duplicator'); ?>]</a><br/>
|
111 |
-
|
112 |
-
<div id="dup-tools-delete-moreinfo">
|
113 |
-
<?php
|
114 |
-
_e("Clicking on the 'Remove Installation Files' button will remove the files used by Duplicator to install this site. "
|
115 |
-
. "These files should not be left on production systems for security reasons.", 'duplicator');
|
116 |
-
echo "<br/><br/>";
|
117 |
-
|
118 |
-
foreach($installer_files as $file => $path) {
|
119 |
-
echo (file_exists($path))
|
120 |
-
? "<div class='failed'><i class='fa fa-exclamation-triangle'></i> {$txt_found} - {$file}</div>"
|
121 |
-
: "<div class='success'><i class='fa fa-check'></i> {$txt_removed} - {$file}</div>";
|
122 |
-
}
|
123 |
-
echo "<br/>";
|
124 |
-
echo $txt_archive_msg;
|
125 |
-
?>
|
126 |
-
</div>
|
127 |
-
</td>
|
128 |
-
</tr>
|
129 |
-
<tr>
|
130 |
-
<td>
|
131 |
-
<button type="button" class="button button-small dup-fixed-btn" onclick="Duplicator.Tools.ConfirmClearBuildCache()">
|
132 |
-
<?php _e("Clear Build Cache", 'duplicator'); ?>
|
133 |
-
</button>
|
134 |
-
</td>
|
135 |
-
<td><?php _e("Removes all build data from:", 'duplicator'); ?> [<?php echo DUPLICATOR_SSDIR_PATH_TMP ?>].</td>
|
136 |
-
</tr>
|
137 |
-
</table>
|
138 |
-
</form>
|
139 |
-
|
140 |
-
<!-- ================
|
141 |
-
THICK-BOX DIALOG: -->
|
142 |
-
<?php
|
143 |
-
$confirm2 = new DUP_UI_Dialog();
|
144 |
-
$confirm2->title = __('Clear Build Cache?', 'duplicator');
|
145 |
-
$confirm2->message = __('This process will remove all build cache files. Be sure no packages are currently building or else they will be cancelled.', 'duplicator');
|
146 |
-
$confirm2->jscallback = 'Duplicator.Tools.ClearBuildCache()';
|
147 |
-
$confirm2->initConfirm();
|
148 |
-
?>
|
149 |
-
|
150 |
-
<script>
|
151 |
-
Duplicator.Tools.deleteInstallerFiles = function()
|
152 |
-
{
|
153 |
-
var data = {
|
154 |
-
action: 'DUP_CTRL_Tools_deleteInstallerFiles',
|
155 |
-
nonce: '<?php echo $ajax_nonce; ?>',
|
156 |
-
'archive-name': '<?php echo $package_name; ?>'
|
157 |
-
};
|
158 |
-
|
159 |
-
jQuery.ajax({
|
160 |
-
type: "POST",
|
161 |
-
url: ajaxurl,
|
162 |
-
dataType: "json",
|
163 |
-
data: data,
|
164 |
-
complete: function() {
|
165 |
-
<?php
|
166 |
-
$url = "?page=duplicator-tools&tab=cleanup&action=installer&_wpnonce={$nonce}&package={$package_name}";
|
167 |
-
echo "window.location = '{$url}';";
|
168 |
-
?>
|
169 |
-
},
|
170 |
-
error: function(data) {console.log(data)},
|
171 |
-
done: function(data) {console.log(data)}
|
172 |
-
});
|
173 |
-
}
|
174 |
-
|
175 |
-
jQuery(document).ready(function($)
|
176 |
-
{
|
177 |
-
Duplicator.Tools.ConfirmClearBuildCache = function ()
|
178 |
-
{
|
179 |
-
<?php $confirm2->showConfirm(); ?>
|
180 |
-
}
|
181 |
-
|
182 |
-
Duplicator.Tools.ClearBuildCache = function ()
|
183 |
-
{
|
184 |
-
window.location = '?page=duplicator-tools&tab=cleanup&action=tmp-cache&_wpnonce=<?php echo $nonce; ?>';
|
185 |
-
}
|
186 |
-
});
|
187 |
-
</script>
|
188 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/tools/diagnostics.php
DELETED
@@ -1,471 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
3 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
4 |
-
|
5 |
-
global $wp_version;
|
6 |
-
global $wpdb;
|
7 |
-
|
8 |
-
class DUP_ScanChecker
|
9 |
-
{
|
10 |
-
public $FileCount = 0;
|
11 |
-
public $DirCount = 0;
|
12 |
-
public $LimitReached = false;
|
13 |
-
public $MaxFiles = 1000000;
|
14 |
-
public $MaxDirs = 75000;
|
15 |
-
|
16 |
-
public function GetDirContents($dir, &$results = array())
|
17 |
-
{
|
18 |
-
if ($this->FileCount > $this->MaxFiles || $this->DirCount > $this->MaxDirs)
|
19 |
-
{
|
20 |
-
$this->LimitReached = true;
|
21 |
-
return $results;
|
22 |
-
}
|
23 |
-
|
24 |
-
$files = @scandir($dir);
|
25 |
-
if (is_array($files))
|
26 |
-
{
|
27 |
-
foreach($files as $key => $value)
|
28 |
-
{
|
29 |
-
$path = realpath($dir.DIRECTORY_SEPARATOR.$value);
|
30 |
-
if ($path) {
|
31 |
-
if(!is_dir($path)) {
|
32 |
-
if (!is_readable($path))
|
33 |
-
{
|
34 |
-
$results[] = $path;
|
35 |
-
}
|
36 |
-
else if ($this->_is_link($path))
|
37 |
-
{
|
38 |
-
$results[] = $path;
|
39 |
-
}
|
40 |
-
$this->FileCount++;
|
41 |
-
}
|
42 |
-
else if($value != "." && $value != "..")
|
43 |
-
{
|
44 |
-
if (! $this->_is_link($path))
|
45 |
-
{
|
46 |
-
$this->GetDirContents($path, $results);
|
47 |
-
}
|
48 |
-
|
49 |
-
if (!is_readable($path))
|
50 |
-
{
|
51 |
-
$results[] = $path;
|
52 |
-
}
|
53 |
-
else if ($this->_is_link($path)) {
|
54 |
-
$results[] = $path;
|
55 |
-
}
|
56 |
-
$this->DirCount++;
|
57 |
-
}
|
58 |
-
}
|
59 |
-
}
|
60 |
-
}
|
61 |
-
return $results;
|
62 |
-
}
|
63 |
-
|
64 |
-
//Supports windows and linux
|
65 |
-
private function _is_link($target)
|
66 |
-
{
|
67 |
-
if (defined('PHP_WINDOWS_VERSION_BUILD')) {
|
68 |
-
if(file_exists($target) && @readlink($target) != $target) {
|
69 |
-
return true;
|
70 |
-
}
|
71 |
-
} elseif (is_link($target)) {
|
72 |
-
return true;
|
73 |
-
}
|
74 |
-
return false;
|
75 |
-
}
|
76 |
-
}
|
77 |
-
|
78 |
-
ob_start();
|
79 |
-
phpinfo();
|
80 |
-
$serverinfo = ob_get_contents();
|
81 |
-
ob_end_clean();
|
82 |
-
|
83 |
-
$serverinfo = preg_replace( '%^.*<body>(.*)</body>.*$%ms', '$1', $serverinfo);
|
84 |
-
$serverinfo = preg_replace( '%^.*<title>(.*)</title>.*$%ms','$1', $serverinfo);
|
85 |
-
$action_response = null;
|
86 |
-
$dbvar_maxtime = DUP_Util::MysqlVariableValue('wait_timeout');
|
87 |
-
$dbvar_maxpacks = DUP_Util::MysqlVariableValue('max_allowed_packet');
|
88 |
-
$dbvar_maxtime = is_null($dbvar_maxtime) ? __("unknow", 'duplicator') : $dbvar_maxtime;
|
89 |
-
$dbvar_maxpacks = is_null($dbvar_maxpacks) ? __("unknow", 'duplicator') : $dbvar_maxpacks;
|
90 |
-
|
91 |
-
$space = @disk_total_space(DUPLICATOR_WPROOTPATH);
|
92 |
-
$space_free = @disk_free_space(DUPLICATOR_WPROOTPATH);
|
93 |
-
$perc = @round((100/$space)*$space_free,2);
|
94 |
-
$mysqldumpPath = DUP_Database::GetMySqlDumpPath();
|
95 |
-
$mysqlDumpSupport = ($mysqldumpPath) ? $mysqldumpPath : 'Path Not Found';
|
96 |
-
|
97 |
-
$view_state = DUP_UI::GetViewStateArray();
|
98 |
-
$ui_css_srv_panel = (isset($view_state['dup-settings-diag-srv-panel']) && $view_state['dup-settings-diag-srv-panel']) ? 'display:block' : 'display:none';
|
99 |
-
$ui_css_opts_panel = (isset($view_state['dup-settings-diag-opts-panel']) && $view_state['dup-settings-diag-opts-panel']) ? 'display:block' : 'display:none';
|
100 |
-
|
101 |
-
$scan_run = (isset($_POST['action']) && $_POST['action'] == 'duplicator_recursion') ? true :false;
|
102 |
-
|
103 |
-
$client_ip_address = DUP_Server::GetClientIP();
|
104 |
-
|
105 |
-
//POST BACK
|
106 |
-
if (isset($_POST['action'])) {
|
107 |
-
$action_result = DUP_Settings::DeleteWPOption($_POST['action']);
|
108 |
-
switch ($_POST['action'])
|
109 |
-
{
|
110 |
-
case 'duplicator_settings' : $action_response = __('Plugin settings reset.', 'duplicator'); break;
|
111 |
-
case 'duplicator_ui_view_state' : $action_response = __('View state settings reset.', 'duplicator'); break;
|
112 |
-
case 'duplicator_package_active' : $action_response = __('Active package settings reset.', 'duplicator'); break;
|
113 |
-
case 'clear_legacy_data':
|
114 |
-
DUP_Settings::LegacyClean();
|
115 |
-
$action_response = __('Legacy data removed.', 'duplicator');
|
116 |
-
break;
|
117 |
-
}
|
118 |
-
}
|
119 |
-
?>
|
120 |
-
|
121 |
-
<style>
|
122 |
-
div#message {margin:0px 0px 10px 0px}
|
123 |
-
div#dup-server-info-area { padding:10px 5px; }
|
124 |
-
div#dup-server-info-area table { padding:1px; background:#dfdfdf; -webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px; width:100% !important; box-shadow:0 8px 6px -6px #777; }
|
125 |
-
div#dup-server-info-area td, th {padding:3px; background:#fff; -webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}
|
126 |
-
div#dup-server-info-area tr.h img { display:none; }
|
127 |
-
div#dup-server-info-area tr.h td{ background:none; }
|
128 |
-
div#dup-server-info-area tr.h th{ text-align:center; background-color:#efefef; }
|
129 |
-
div#dup-server-info-area td.e{ font-weight:bold }
|
130 |
-
td.dup-settings-diag-header {background-color:#D8D8D8; font-weight: bold; border-style: none; color:black}
|
131 |
-
.widefat th {font-weight:bold; }
|
132 |
-
.widefat td {padding:2px 2px 2px 8px}
|
133 |
-
.widefat td:nth-child(1) {width:10px;}
|
134 |
-
.widefat td:nth-child(2) {padding-left: 20px; width:100% !important}
|
135 |
-
textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
|
136 |
-
</style>
|
137 |
-
|
138 |
-
<form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics' ); ?>" method="post">
|
139 |
-
<?php wp_nonce_field( 'duplicator_settings_page' ); ?>
|
140 |
-
<input type="hidden" id="dup-settings-form-action" name="action" value="">
|
141 |
-
<br/>
|
142 |
-
|
143 |
-
<?php if (! empty($action_response)) : ?>
|
144 |
-
<div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
|
145 |
-
<?php endif; ?>
|
146 |
-
|
147 |
-
<!-- ==============================
|
148 |
-
SERVER SETTINGS -->
|
149 |
-
<div class="dup-box">
|
150 |
-
<div class="dup-box-title">
|
151 |
-
<i class="fa fa-tachometer"></i>
|
152 |
-
<?php _e("Server Settings", 'duplicator') ?>
|
153 |
-
<div class="dup-box-arrow"></div>
|
154 |
-
</div>
|
155 |
-
<div class="dup-box-panel" id="dup-settings-diag-srv-panel" style="<?php echo $ui_css_srv_panel?>">
|
156 |
-
<table class="widefat" cellspacing="0">
|
157 |
-
<tr>
|
158 |
-
<td class='dup-settings-diag-header' colspan="2"><?php _e("General", 'duplicator'); ?></td>
|
159 |
-
</tr>
|
160 |
-
<tr>
|
161 |
-
<td><?php _e("Duplicator Version", 'duplicator'); ?></td>
|
162 |
-
<td><?php echo DUPLICATOR_VERSION ?></td>
|
163 |
-
</tr>
|
164 |
-
<tr>
|
165 |
-
<td><?php _e("Operating System", 'duplicator'); ?></td>
|
166 |
-
<td><?php echo PHP_OS ?></td>
|
167 |
-
</tr>
|
168 |
-
<tr>
|
169 |
-
<td><?php _e("Timezone", 'duplicator'); ?></td>
|
170 |
-
<td><?php echo date_default_timezone_get() ; ?> <small><i>This is a <a href='options-general.php'>WordPress setting</a></i></small></td>
|
171 |
-
</tr>
|
172 |
-
<tr>
|
173 |
-
<td><?php _e("Server Time", 'duplicator'); ?></td>
|
174 |
-
<td><?php echo date("Y-m-d H:i:s"); ?></td>
|
175 |
-
</tr>
|
176 |
-
<tr>
|
177 |
-
<td><?php _e("Web Server", 'duplicator'); ?></td>
|
178 |
-
<td><?php echo $_SERVER['SERVER_SOFTWARE'] ?></td>
|
179 |
-
</tr>
|
180 |
-
<tr>
|
181 |
-
<td><?php _e("APC Enabled", 'duplicator'); ?></td>
|
182 |
-
<td><?php echo DUP_Util::RunAPC() ? 'Yes' : 'No' ?></td>
|
183 |
-
</tr>
|
184 |
-
<tr>
|
185 |
-
<td><?php _e("Root Path", 'duplicator'); ?></td>
|
186 |
-
<td><?php echo DUPLICATOR_WPROOTPATH ?></td>
|
187 |
-
</tr>
|
188 |
-
<tr>
|
189 |
-
<td><?php _e("ABSPATH", 'duplicator'); ?></td>
|
190 |
-
<td><?php echo ABSPATH ?></td>
|
191 |
-
</tr>
|
192 |
-
<tr>
|
193 |
-
<td><?php _e("Plugins Path", 'duplicator'); ?></td>
|
194 |
-
<td><?php echo DUP_Util::SafePath(WP_PLUGIN_DIR) ?></td>
|
195 |
-
</tr>
|
196 |
-
<tr>
|
197 |
-
<td><?php _e("Loaded PHP INI", 'duplicator'); ?></td>
|
198 |
-
<td><?php echo php_ini_loaded_file() ;?></td>
|
199 |
-
</tr>
|
200 |
-
<tr>
|
201 |
-
<td><?php _e("Server IP", 'duplicator'); ?></td>
|
202 |
-
<td><?php echo $_SERVER['SERVER_ADDR'];?></td>
|
203 |
-
</tr>
|
204 |
-
<tr>
|
205 |
-
<td><?php _e("Client IP", 'duplicator'); ?></td>
|
206 |
-
<td><?php echo $client_ip_address;?></td>
|
207 |
-
</tr>
|
208 |
-
<tr>
|
209 |
-
<td class='dup-settings-diag-header' colspan="2">WordPress</td>
|
210 |
-
</tr>
|
211 |
-
<tr>
|
212 |
-
<td><?php _e("Version", 'duplicator'); ?></td>
|
213 |
-
<td><?php echo $wp_version ?></td>
|
214 |
-
</tr>
|
215 |
-
<tr>
|
216 |
-
<td><?php _e("Language", 'duplicator'); ?></td>
|
217 |
-
<td><?php echo get_bloginfo('language') ?></td>
|
218 |
-
</tr>
|
219 |
-
<tr>
|
220 |
-
<td><?php _e("Charset", 'duplicator'); ?></td>
|
221 |
-
<td><?php echo get_bloginfo('charset') ?></td>
|
222 |
-
</tr>
|
223 |
-
<tr>
|
224 |
-
<td><?php _e("Memory Limit ", 'duplicator'); ?></td>
|
225 |
-
<td><?php echo WP_MEMORY_LIMIT ?> (<?php _e("Max", 'duplicator'); echo ' ' . WP_MAX_MEMORY_LIMIT; ?>)</td>
|
226 |
-
</tr>
|
227 |
-
<tr>
|
228 |
-
<td class='dup-settings-diag-header' colspan="2">PHP</td>
|
229 |
-
</tr>
|
230 |
-
<tr>
|
231 |
-
<td><?php _e("Version", 'duplicator'); ?></td>
|
232 |
-
<td><?php echo phpversion() ?></td>
|
233 |
-
</tr>
|
234 |
-
<tr>
|
235 |
-
<td>SAPI</td>
|
236 |
-
<td><?php echo PHP_SAPI ?></td>
|
237 |
-
</tr>
|
238 |
-
<tr>
|
239 |
-
<td><?php _e("User", 'duplicator'); ?></td>
|
240 |
-
<td><?php echo DUP_Util::GetCurrentUser(); ?></td>
|
241 |
-
</tr>
|
242 |
-
<tr>
|
243 |
-
<td><?php _e("Process", 'duplicator'); ?></td>
|
244 |
-
<td><?php echo DUP_Util::GetProcessOwner(); ?></td>
|
245 |
-
</tr>
|
246 |
-
<tr>
|
247 |
-
<td><a href="http://php.net/manual/en/features.safe-mode.php" target="_blank"><?php _e("Safe Mode", 'duplicator'); ?></a></td>
|
248 |
-
<td>
|
249 |
-
<?php echo (((strtolower(@ini_get('safe_mode')) == 'on') || (strtolower(@ini_get('safe_mode')) == 'yes') ||
|
250 |
-
(strtolower(@ini_get('safe_mode')) == 'true') || (ini_get("safe_mode") == 1 )))
|
251 |
-
? __('On', 'duplicator') : __('Off', 'duplicator');
|
252 |
-
?>
|
253 |
-
</td>
|
254 |
-
</tr>
|
255 |
-
<tr>
|
256 |
-
<td><a href="http://www.php.net/manual/en/ini.core.php#ini.memory-limit" target="_blank"><?php _e("Memory Limit", 'duplicator'); ?></a></td>
|
257 |
-
<td><?php echo @ini_get('memory_limit') ?></td>
|
258 |
-
</tr>
|
259 |
-
<tr>
|
260 |
-
<td><?php _e("Memory In Use", 'duplicator'); ?></td>
|
261 |
-
<td><?php echo size_format(@memory_get_usage(TRUE), 2) ?></td>
|
262 |
-
</tr>
|
263 |
-
<tr>
|
264 |
-
<td><a href="http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank"><?php _e("Max Execution Time", 'duplicator'); ?></a></td>
|
265 |
-
<td><?php echo @ini_get( 'max_execution_time' ); ?></td>
|
266 |
-
</tr>
|
267 |
-
<tr>
|
268 |
-
<td><a href="http://us3.php.net/shell_exec" target="_blank"><?php _e("Shell Exec", 'duplicator'); ?></a></td>
|
269 |
-
<td><?php echo (DUP_Util::IsShellExecAvailable()) ? _e("Is Supported", 'duplicator') : _e("Not Supported", 'duplicator'); ?></td>
|
270 |
-
</tr>
|
271 |
-
<tr>
|
272 |
-
<td><?php _e("Shell Exec Zip", 'duplicator'); ?></td>
|
273 |
-
<td><?php echo (DUP_Util::GetZipPath() != null) ? _e("Is Supported", 'duplicator') : _e("Not Supported", 'duplicator'); ?></td>
|
274 |
-
</tr>
|
275 |
-
<tr>
|
276 |
-
<td class='dup-settings-diag-header' colspan="2">MySQL</td>
|
277 |
-
</tr>
|
278 |
-
<tr>
|
279 |
-
<td><?php _e("Version", 'duplicator'); ?></td>
|
280 |
-
<td><?php echo $wpdb->db_version() ?></td>
|
281 |
-
</tr>
|
282 |
-
<tr>
|
283 |
-
<td><?php _e("Charset", 'duplicator'); ?></td>
|
284 |
-
<td><?php echo DB_CHARSET ?></td>
|
285 |
-
</tr>
|
286 |
-
<tr>
|
287 |
-
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_wait_timeout" target="_blank"><?php _e("Wait Timeout", 'duplicator'); ?></a></td>
|
288 |
-
<td><?php echo $dbvar_maxtime ?></td>
|
289 |
-
</tr>
|
290 |
-
<tr>
|
291 |
-
<td style="white-space:nowrap"><a href="http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html#sysvar_max_allowed_packet" target="_blank"><?php _e("Max Allowed Packets", 'duplicator'); ?></a></td>
|
292 |
-
<td><?php echo $dbvar_maxpacks ?></td>
|
293 |
-
</tr>
|
294 |
-
<tr>
|
295 |
-
<td><a href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html" target="_blank"><?php _e("msyqldump Path", 'duplicator'); ?></a></td>
|
296 |
-
<td><?php echo $mysqlDumpSupport ?></td>
|
297 |
-
</tr>
|
298 |
-
<tr>
|
299 |
-
<td class='dup-settings-diag-header' colspan="2"><?php _e("Server Disk", 'duplicator'); ?></td>
|
300 |
-
</tr>
|
301 |
-
<tr valign="top">
|
302 |
-
<td><?php _e('Free space', 'hyper-cache'); ?></td>
|
303 |
-
<td><?php echo $perc;?>% -- <?php echo DUP_Util::ByteSize($space_free);?> from <?php echo DUP_Util::ByteSize($space);?><br/>
|
304 |
-
<small>
|
305 |
-
<?php _e("Note: This value is the physical servers hard-drive allocation.", 'duplicator'); ?> <br/>
|
306 |
-
<?php _e("On shared hosts check your control panel for the 'TRUE' disk space quota value.", 'duplicator'); ?>
|
307 |
-
</small>
|
308 |
-
</td>
|
309 |
-
</tr>
|
310 |
-
|
311 |
-
</table><br/>
|
312 |
-
|
313 |
-
</div> <!-- end .dup-box-panel -->
|
314 |
-
</div> <!-- end .dup-box -->
|
315 |
-
<br/>
|
316 |
-
|
317 |
-
<!-- ==============================
|
318 |
-
OPTIONS DATA -->
|
319 |
-
<div class="dup-box">
|
320 |
-
<div class="dup-box-title">
|
321 |
-
<i class="fa fa-th-list"></i>
|
322 |
-
<?php _e("Stored Data", 'duplicator'); ?>
|
323 |
-
<div class="dup-box-arrow"></div>
|
324 |
-
</div>
|
325 |
-
<div class="dup-box-panel" id="dup-settings-diag-opts-panel" style="<?php echo $ui_css_opts_panel?>">
|
326 |
-
<div style="padding:0px 20px 0px 25px">
|
327 |
-
<h3 class="title" style="margin-left:-15px"><?php _e("Options Values", 'duplicator') ?> </h3>
|
328 |
-
|
329 |
-
<table class="widefat" cellspacing="0">
|
330 |
-
<tr>
|
331 |
-
<th>Key</th>
|
332 |
-
<th>Value</th>
|
333 |
-
</tr>
|
334 |
-
<?php
|
335 |
-
$sql = "SELECT * FROM `{$wpdb->prefix}options` WHERE `option_name` LIKE '%duplicator_%' ORDER BY option_name";
|
336 |
-
foreach( $wpdb->get_results("{$sql}") as $key => $row) { ?>
|
337 |
-
<tr>
|
338 |
-
<td>
|
339 |
-
<?php
|
340 |
-
echo (in_array($row->option_name, $GLOBALS['DUPLICATOR_OPTS_DELETE']))
|
341 |
-
? "<a href='javascript:void(0)' onclick='Duplicator.Settings.DeleteOption(this)'>{$row->option_name}</a>"
|
342 |
-
: $row->option_name;
|
343 |
-
?>
|
344 |
-
</td>
|
345 |
-
<td><textarea class="dup-opts-read" readonly="readonly"><?php echo $row->option_value?></textarea></td>
|
346 |
-
</tr>
|
347 |
-
<?php } ?>
|
348 |
-
</table>
|
349 |
-
</div>
|
350 |
-
|
351 |
-
</div> <!-- end .dup-box-panel -->
|
352 |
-
</div> <!-- end .dup-box -->
|
353 |
-
<br/>
|
354 |
-
|
355 |
-
|
356 |
-
<!-- ==============================
|
357 |
-
SCAN VALIDATOR -->
|
358 |
-
<div class="dup-box">
|
359 |
-
<div class="dup-box-title">
|
360 |
-
<i class="fa fa-check-square-o"></i>
|
361 |
-
<?php _e("Scan Validator", 'duplicator'); ?>
|
362 |
-
<div class="dup-box-arrow"></div>
|
363 |
-
</div>
|
364 |
-
<div class="dup-box-panel" style="display: <?php echo $scan_run ? 'block' : 'none'; ?>">
|
365 |
-
<?php
|
366 |
-
_e("This utility will help to find unreadable files and sys-links in your environment that can lead to issues during the scan process. ", "duplicator");
|
367 |
-
_e("The utility will also show how many files and directories you have in your system. This process may take several minutes to run. ", "duplicator");
|
368 |
-
_e("If there is a recursive loop on your system then the process has a built in check to stop after a large set of files and directories have been scanned. ", "duplicator");
|
369 |
-
_e("A message will show indicated that that a scan depth has been reached. ", "duplicator");
|
370 |
-
?>
|
371 |
-
<br/><br/>
|
372 |
-
|
373 |
-
<?php if ($scan_run) : ?>
|
374 |
-
<div id="duplicator-scan-results-1">
|
375 |
-
<i class="fa fa-circle-o-notch fa-spin fa-lg fa-fw"></i>
|
376 |
-
<b style="font-size: 14px"><?php _e('Scan integrity validation detection is running please wait...', 'duplicator'); ?></b>
|
377 |
-
<br/><br/>
|
378 |
-
</div>
|
379 |
-
<?php else :?>
|
380 |
-
<button id="scan-run-btn" class="button button-large button-primary" onclick="Duplicator.Settings.Recursion()"><?php _e("Run Scan Integrity Validation", "duplicator"); ?></button>
|
381 |
-
<?php endif; ?>
|
382 |
-
|
383 |
-
</div>
|
384 |
-
</div>
|
385 |
-
<br/>
|
386 |
-
|
387 |
-
<!-- ==============================
|
388 |
-
PHP INFORMATION -->
|
389 |
-
<div class="dup-box">
|
390 |
-
<div class="dup-box-title">
|
391 |
-
<i class="fa fa-info-circle"></i>
|
392 |
-
<?php _e("PHP Information", 'duplicator'); ?>
|
393 |
-
<div class="dup-box-arrow"></div>
|
394 |
-
</div>
|
395 |
-
<div class="dup-box-panel" style="display:none">
|
396 |
-
<div id="dup-phpinfo" style="width:95%">
|
397 |
-
<?php echo "<div id='dup-server-info-area'>{$serverinfo}</div>"; ?>
|
398 |
-
</div><br/>
|
399 |
-
</div>
|
400 |
-
</div>
|
401 |
-
<br/>
|
402 |
-
|
403 |
-
<div id="duplicator-scan-results-2" style="display:none">
|
404 |
-
<?php
|
405 |
-
if ($scan_run)
|
406 |
-
{
|
407 |
-
$ScanChecker = new DUP_ScanChecker();
|
408 |
-
$Files = $ScanChecker->GetDirContents(DUPLICATOR_WPROOTPATH);
|
409 |
-
$MaxFiles = number_format($ScanChecker->MaxFiles);
|
410 |
-
$MaxDirs= number_format($ScanChecker->MaxDirs);
|
411 |
-
|
412 |
-
if ($ScanChecker->LimitReached) {
|
413 |
-
echo "<i style='color:red'>Recursion limit reached of {$MaxFiles} files & {$MaxDirs} directories.</i> <br/>";
|
414 |
-
}
|
415 |
-
|
416 |
-
echo "Dirs Scanned: " . number_format($ScanChecker->DirCount) . " <br/>";
|
417 |
-
echo "Files Scanned: " . number_format($ScanChecker->FileCount) . " <br/>";
|
418 |
-
echo "Found Items: <br/>";
|
419 |
-
|
420 |
-
if (count($Files))
|
421 |
-
{
|
422 |
-
$count = 0;
|
423 |
-
foreach($Files as $file)
|
424 |
-
{
|
425 |
-
$count++;
|
426 |
-
echo " {$count}. {$file} <br/>";
|
427 |
-
}
|
428 |
-
} else {
|
429 |
-
echo " No items found in scan <br/>";
|
430 |
-
}
|
431 |
-
|
432 |
-
echo "<br/><a href='admin.php?page=duplicator-tools&tab=diagnostics'>" . __("Try Scan Again", "duplicator") . "</a>";
|
433 |
-
|
434 |
-
}
|
435 |
-
?>
|
436 |
-
</div>
|
437 |
-
</form>
|
438 |
-
|
439 |
-
<script>
|
440 |
-
jQuery(document).ready(function($) {
|
441 |
-
|
442 |
-
Duplicator.Settings.DeleteOption = function (anchor)
|
443 |
-
{
|
444 |
-
var key = $(anchor).text();
|
445 |
-
var result = confirm('<?php _e("Delete this option value", "duplicator"); ?> [' + key + '] ?');
|
446 |
-
if (! result) return;
|
447 |
-
|
448 |
-
jQuery('#dup-settings-form-action').val(key);
|
449 |
-
jQuery('#dup-settings-form').submit();
|
450 |
-
}
|
451 |
-
|
452 |
-
Duplicator.Settings.Recursion = function()
|
453 |
-
{
|
454 |
-
var result = confirm('<?php _e('This will run the scan validation check. This may take several minutes.\nDo you want to Continue?', 'duplicator'); ?>');
|
455 |
-
if (! result) return;
|
456 |
-
|
457 |
-
jQuery('#dup-settings-form-action').val('duplicator_recursion');
|
458 |
-
jQuery('#scan-run-btn').html('<i class="fa fa-circle-o-notch fa-spin fa-fw"></i> Running Please Wait...');
|
459 |
-
jQuery('#dup-settings-form').submit();
|
460 |
-
|
461 |
-
}
|
462 |
-
|
463 |
-
<?php
|
464 |
-
if ($scan_run) {
|
465 |
-
echo "$('#duplicator-scan-results-1').html($('#duplicator-scan-results-2').html())";
|
466 |
-
}
|
467 |
-
?>
|
468 |
-
});
|
469 |
-
</script>
|
470 |
-
|
471 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/tools/diagnostics/inc.settings.php
CHANGED
@@ -11,6 +11,7 @@
|
|
11 |
$mysqlDumpSupport = ($mysqldumpPath) ? $mysqldumpPath : 'Path Not Found';
|
12 |
|
13 |
$client_ip_address = DUP_Server::getClientIP();
|
|
|
14 |
?>
|
15 |
|
16 |
<!-- ==============================
|
@@ -155,6 +156,10 @@ SERVER SETTINGS -->
|
|
155 |
<tr>
|
156 |
<td><a href="https://suhosin.org/stories/index.html" target="_blank"><?php _e("Suhosin Extension", 'duplicator'); ?></a></td>
|
157 |
<td><?php echo extension_loaded('suhosin') ? _e("Enabled", 'duplicator') : _e("Disabled", 'duplicator'); ?></td>
|
|
|
|
|
|
|
|
|
158 |
</tr>
|
159 |
<tr>
|
160 |
<td class='dup-settings-diag-header' colspan="2">MySQL</td>
|
11 |
$mysqlDumpSupport = ($mysqldumpPath) ? $mysqldumpPath : 'Path Not Found';
|
12 |
|
13 |
$client_ip_address = DUP_Server::getClientIP();
|
14 |
+
$error_log_path = ini_get('error_log');
|
15 |
?>
|
16 |
|
17 |
<!-- ==============================
|
156 |
<tr>
|
157 |
<td><a href="https://suhosin.org/stories/index.html" target="_blank"><?php _e("Suhosin Extension", 'duplicator'); ?></a></td>
|
158 |
<td><?php echo extension_loaded('suhosin') ? _e("Enabled", 'duplicator') : _e("Disabled", 'duplicator'); ?></td>
|
159 |
+
</tr>
|
160 |
+
<tr>
|
161 |
+
<td><?php _e("Error Log File ", 'duplicator'); ?></td>
|
162 |
+
<td><?php echo $error_log_path; ?></td>
|
163 |
</tr>
|
164 |
<tr>
|
165 |
<td class='dup-settings-diag-header' colspan="2">MySQL</td>
|
views/tools/diagnostics/information.php
CHANGED
@@ -1,25 +1,25 @@
|
|
1 |
-
<form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics§ion=info' ); ?>" method="post">
|
2 |
-
<?php wp_nonce_field( 'duplicator_settings_page', '_wpnonce', false ); ?>
|
3 |
-
<input type="hidden" id="dup-settings-form-action" name="action" value="">
|
4 |
-
|
5 |
-
<?php if (! empty($action_response)) : ?>
|
6 |
-
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo $action_response; ?></p></div>
|
7 |
-
<?php endif; ?>
|
8 |
-
|
9 |
-
<style>
|
10 |
-
<?php echo isset($css_hide_msg) ? $css_hide_msg : ''; ?>
|
11 |
-
div.success {color:#4A8254}
|
12 |
-
div.failed {color:red}
|
13 |
-
table.dup-reset-opts td:first-child {font-weight: bold}
|
14 |
-
table.dup-reset-opts td {padding:10px}
|
15 |
-
button.dup-fixed-btn {min-width: 150px; text-align: center}
|
16 |
-
div#dup-tools-delete-moreinfo {display: none; padding: 5px 0 0 20px; border:1px solid silver; background-color: #fff; border-radius: 5px; padding:10px; margin:5px; width:750px }
|
17 |
-
</style>
|
18 |
-
|
19 |
-
<?php
|
20 |
-
include_once 'inc.data.php';
|
21 |
-
include_once 'inc.settings.php';
|
22 |
-
include_once 'inc.validator.php';
|
23 |
-
include_once 'inc.phpinfo.php';
|
24 |
-
?>
|
25 |
-
</form>
|
1 |
+
<form id="dup-settings-form" action="<?php echo admin_url( 'admin.php?page=duplicator-tools&tab=diagnostics§ion=info' ); ?>" method="post">
|
2 |
+
<?php wp_nonce_field( 'duplicator_settings_page', '_wpnonce', false ); ?>
|
3 |
+
<input type="hidden" id="dup-settings-form-action" name="action" value="">
|
4 |
+
|
5 |
+
<?php if (! empty($action_response)) : ?>
|
6 |
+
<div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo $action_response; ?></p></div>
|
7 |
+
<?php endif; ?>
|
8 |
+
|
9 |
+
<style>
|
10 |
+
<?php echo isset($css_hide_msg) ? $css_hide_msg : ''; ?>
|
11 |
+
div.success {color:#4A8254}
|
12 |
+
div.failed {color:red}
|
13 |
+
table.dup-reset-opts td:first-child {font-weight: bold}
|
14 |
+
table.dup-reset-opts td {padding:10px}
|
15 |
+
button.dup-fixed-btn {min-width: 150px; text-align: center}
|
16 |
+
div#dup-tools-delete-moreinfo {display: none; padding: 5px 0 0 20px; border:1px solid silver; background-color: #fff; border-radius: 5px; padding:10px; margin:5px; width:750px }
|
17 |
+
</style>
|
18 |
+
|
19 |
+
<?php
|
20 |
+
include_once 'inc.data.php';
|
21 |
+
include_once 'inc.settings.php';
|
22 |
+
include_once 'inc.validator.php';
|
23 |
+
include_once 'inc.phpinfo.php';
|
24 |
+
?>
|
25 |
+
</form>
|
views/tools/diagnostics/logging.php
CHANGED
@@ -1,208 +1,211 @@
|
|
1 |
-
<?php
|
2 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
3 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
$
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
td#dup-log-panel-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
div.dup-log-
|
48 |
-
div.dup-log-
|
49 |
-
div.dup-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
$panelR.
|
65 |
-
$panelL.css({width: '
|
66 |
-
}
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
$('#auto').val(
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
$(
|
119 |
-
$(
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
$(
|
131 |
-
|
132 |
-
<?php
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
<?php
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
<?php
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
<
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
</
|
|
|
|
|
|
|
208 |
|
1 |
+
<?php
|
2 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
3 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
4 |
+
|
5 |
+
function _duplicatorSortFiles($a,$b) {
|
6 |
+
return filemtime($b) - filemtime($a);
|
7 |
+
}
|
8 |
+
|
9 |
+
$logs = glob(DUPLICATOR_SSDIR_PATH . '/*.log') ;
|
10 |
+
if ($logs != false && count($logs)) {
|
11 |
+
usort($logs, '_duplicatorSortFiles');
|
12 |
+
@chmod(DUP_Util::safePath($logs[0]), 0644);
|
13 |
+
}
|
14 |
+
|
15 |
+
$logname = (isset($_GET['logname'])) ? trim(sanitize_text_field($_GET['logname'])) : "";
|
16 |
+
$refresh = (isset($_POST['refresh']) && $_POST['refresh'] == 1) ? 1 : 0;
|
17 |
+
$auto = (isset($_POST['auto']) && $_POST['auto'] == 1) ? 1 : 0;
|
18 |
+
|
19 |
+
//Check for invalid file
|
20 |
+
if (!empty($logname))
|
21 |
+
{
|
22 |
+
$validFiles = array_map('basename', $logs);
|
23 |
+
if (validate_file($logname, $validFiles) > 0) {
|
24 |
+
unset($logname);
|
25 |
+
}
|
26 |
+
unset($validFiles);
|
27 |
+
}
|
28 |
+
|
29 |
+
if (!isset($logname) || !$logname) {
|
30 |
+
$logname = (count($logs) > 0) ? basename($logs[0]) : "";
|
31 |
+
}
|
32 |
+
|
33 |
+
$logurl = get_site_url(null, '', is_ssl() ? 'https' : 'http') . '/' . DUPLICATOR_SSDIR_NAME . '/' . $logname;
|
34 |
+
$logfound = (strlen($logname) > 0) ? true :false;
|
35 |
+
?>
|
36 |
+
|
37 |
+
<style>
|
38 |
+
div#dup-refresh-count {display: inline-block}
|
39 |
+
table#dup-log-panels {width:100%; }
|
40 |
+
td#dup-log-panel-left {width:75%;}
|
41 |
+
td#dup-log-panel-left div.name {float:left; margin: 0px 0px 5px 5px;}
|
42 |
+
td#dup-log-panel-left div.opts {float:right;}
|
43 |
+
td#dup-log-panel-right {vertical-align: top; padding-left:15px; max-width: 375px}
|
44 |
+
iframe#dup-log-content {padding:5px; background: #fff; min-height:500px; width:99%; border:1px solid silver}
|
45 |
+
|
46 |
+
/* OPTIONS */
|
47 |
+
div.dup-log-hdr {font-weight: bold; font-size:16px; padding:2px; }
|
48 |
+
div.dup-log-hdr small{font-weight:normal; font-style: italic}
|
49 |
+
div.dup-log-file-list {font-family:monospace;}
|
50 |
+
div.dup-log-file-list a, span.dup-log{display: inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 375px; overflow:hidden}
|
51 |
+
div.dup-log-file-list span {color:green}
|
52 |
+
div.dup-opts-items {border:1px solid silver; background: #efefef; padding: 5px; border-radius: 4px; margin:2px 0px 10px -2px;}
|
53 |
+
label#dup-auto-refresh-lbl {display: inline-block;}
|
54 |
+
</style>
|
55 |
+
|
56 |
+
<script>
|
57 |
+
jQuery(document).ready(function($)
|
58 |
+
{
|
59 |
+
Duplicator.Tools.FullLog = function() {
|
60 |
+
var $panelL = $('#dup-log-panel-left');
|
61 |
+
var $panelR = $('#dup-log-panel-right');
|
62 |
+
|
63 |
+
if ($panelR.is(":visible") ) {
|
64 |
+
$panelR.hide(400);
|
65 |
+
$panelL.css({width: '100%'});
|
66 |
+
} else {
|
67 |
+
$panelR.show(200);
|
68 |
+
$panelL.css({width: '75%'});
|
69 |
+
}
|
70 |
+
}
|
71 |
+
|
72 |
+
Duplicator.Tools.Refresh = function() {
|
73 |
+
$('#refresh').val(1);
|
74 |
+
$('#dup-form-logs').submit();
|
75 |
+
}
|
76 |
+
|
77 |
+
Duplicator.Tools.RefreshAuto = function() {
|
78 |
+
if ( $("#dup-auto-refresh").is(":checked")) {
|
79 |
+
$('#auto').val(1);
|
80 |
+
startTimer();
|
81 |
+
} else {
|
82 |
+
$('#auto').val(0);
|
83 |
+
}
|
84 |
+
}
|
85 |
+
|
86 |
+
Duplicator.Tools.GetLog = function(log) {
|
87 |
+
window.location = log;
|
88 |
+
}
|
89 |
+
|
90 |
+
Duplicator.Tools.WinResize = function() {
|
91 |
+
var height = $(window).height() - 215;
|
92 |
+
$("#dup-log-content").css({height: height + 'px'});
|
93 |
+
}
|
94 |
+
|
95 |
+
var duration = 10;
|
96 |
+
var count = duration;
|
97 |
+
var timerInterval;
|
98 |
+
function timer() {
|
99 |
+
count = count - 1;
|
100 |
+
$("#dup-refresh-count").html(count.toString());
|
101 |
+
if (! $("#dup-auto-refresh").is(":checked")) {
|
102 |
+
clearInterval(timerInterval);
|
103 |
+
$("#dup-refresh-count").text(count.toString().trim());
|
104 |
+
return;
|
105 |
+
}
|
106 |
+
|
107 |
+
if (count <= 0) {
|
108 |
+
count = duration + 1;
|
109 |
+
Duplicator.Tools.Refresh();
|
110 |
+
}
|
111 |
+
}
|
112 |
+
|
113 |
+
function startTimer() {
|
114 |
+
timerInterval = setInterval(timer, 1000);
|
115 |
+
}
|
116 |
+
|
117 |
+
//INIT Events
|
118 |
+
$(window).resize(Duplicator.Tools.WinResize);
|
119 |
+
$('#dup-options').click(Duplicator.Tools.FullLog);
|
120 |
+
$("#dup-refresh").click(Duplicator.Tools.Refresh);
|
121 |
+
$("#dup-auto-refresh").click(Duplicator.Tools.RefreshAuto);
|
122 |
+
$("#dup-refresh-count").html(duration.toString());
|
123 |
+
|
124 |
+
//INIT
|
125 |
+
Duplicator.Tools.WinResize();
|
126 |
+
<?php if ($refresh) : ?>
|
127 |
+
//Scroll to Bottom
|
128 |
+
$("#dup-log-content").load(function () {
|
129 |
+
var $contents = $('#dup-log-content').contents();
|
130 |
+
$contents.scrollTop($contents.height());
|
131 |
+
});
|
132 |
+
<?php if ($auto) : ?>
|
133 |
+
$("#dup-auto-refresh").prop('checked', true);
|
134 |
+
Duplicator.Tools.RefreshAuto();
|
135 |
+
<?php endif; ?>
|
136 |
+
<?php endif; ?>
|
137 |
+
});
|
138 |
+
</script>
|
139 |
+
|
140 |
+
<form id="dup-form-logs" method="post" action="">
|
141 |
+
<input type="hidden" id="refresh" name="refresh" value="<?php echo ($refresh) ? 1 : 0 ?>" />
|
142 |
+
<input type="hidden" id="auto" name="auto" value="<?php echo ($auto) ? 1 : 0 ?>" />
|
143 |
+
|
144 |
+
<?php if (! $logfound) : ?>
|
145 |
+
<div style="padding:20px">
|
146 |
+
<h2><?php _e("Log file not found or unreadable", 'duplicator') ?>.</h2>
|
147 |
+
<?php _e("Try to create a package, since no log files were found in the snapshots directory with the extension *.log", 'duplicator') ?>.<br/><br/>
|
148 |
+
<?php _e("Reasons for log file not showing", 'duplicator') ?>: <br/>
|
149 |
+
- <?php _e("The web server does not support returning .log file extentions", 'duplicator') ?>. <br/>
|
150 |
+
- <?php _e("The snapshots directory does not have the correct permissions to write files. Try setting the permissions to 755", 'duplicator') ?>. <br/>
|
151 |
+
- <?php _e("The process that PHP runs under does not have enough permissions to create files. Please contact your hosting provider for more details", 'duplicator') ?>. <br/>
|
152 |
+
</div>
|
153 |
+
<?php else: ?>
|
154 |
+
<table id="dup-log-panels">
|
155 |
+
<tr>
|
156 |
+
<td id="dup-log-panel-left">
|
157 |
+
<div class="name">
|
158 |
+
<i class='fa fa-list-alt'></i> <b><?php echo basename($logurl); ?></b> |
|
159 |
+
<i style="cursor: pointer"
|
160 |
+
data-tooltip-title="<?php _e("Host Recommendation:", 'duplicator'); ?>"
|
161 |
+
data-tooltip="<?php _e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
|
162 |
+
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
163 |
+
<?php
|
164 |
+
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
165 |
+
__("Consider our recommended", 'duplicator'),
|
166 |
+
__("host list", 'duplicator'),
|
167 |
+
__("if you’re unhappy with your current provider", 'duplicator'));
|
168 |
+
?>
|
169 |
+
</i>
|
170 |
+
</div>
|
171 |
+
<div class="opts"><a href="javascript:void(0)" id="dup-options"><?php _e("Options", 'duplicator') ?> <i class="fa fa-angle-double-right"></i></a> </div>
|
172 |
+
<br style="clear:both" />
|
173 |
+
<iframe id="dup-log-content" src="<?php echo $logurl ?>" ></iframe>
|
174 |
+
</td>
|
175 |
+
<td id="dup-log-panel-right">
|
176 |
+
<h2><?php _e("Options", 'duplicator') ?> </h2>
|
177 |
+
<div class="dup-opts-items">
|
178 |
+
<input type="button" class="button button-small" id="dup-refresh" value="<?php _e("Refresh", 'duplicator') ?>" />
|
179 |
+
<input type='checkbox' id="dup-auto-refresh" style="margin-top:1px" />
|
180 |
+
<label id="dup-auto-refresh-lbl" for="dup-auto-refresh">
|
181 |
+
<?php _e("Auto Refresh", 'duplicator') ?>
|
182 |
+
[<div id="dup-refresh-count"></div>]
|
183 |
+
</label>
|
184 |
+
</div>
|
185 |
+
|
186 |
+
<div class="dup-log-hdr">
|
187 |
+
<?php _e("Package Logs", 'duplicator') ?>
|
188 |
+
<small><?php _e("Top 20", 'duplicator') ?></small>
|
189 |
+
</div>
|
190 |
+
|
191 |
+
<div class="dup-log-file-list">
|
192 |
+
<?php
|
193 |
+
$count=0;
|
194 |
+
$active = basename($logurl);
|
195 |
+
foreach ($logs as $log) {
|
196 |
+
$time = date('m/d/y h:i:s', filemtime($log));
|
197 |
+
$name = esc_html(basename($log));
|
198 |
+
$url = '?page=duplicator-tools&tab=diagnostics§ion=log&logname=' . $name;
|
199 |
+
echo ($active == $name)
|
200 |
+
? "<span class='dup-log' title='{$name}'>{$time}-{$name}</span>"
|
201 |
+
: "<a href='javascript:void(0)' title='{$name}' onclick='Duplicator.Tools.GetLog(\"{$url}\")'>{$time}-{$name}</a>";
|
202 |
+
if ($count > 20) break;
|
203 |
+
}
|
204 |
+
?>
|
205 |
+
</div>
|
206 |
+
</td>
|
207 |
+
</tr>
|
208 |
+
</table>
|
209 |
+
<?php endif; ?>
|
210 |
+
</form>
|
211 |
|
views/tools/diagnostics/main.php
CHANGED
@@ -1,76 +1,76 @@
|
|
1 |
-
<?php
|
2 |
-
wp_enqueue_script('dup-handlebars');
|
3 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
4 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
5 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/utilities/class.u.scancheck.php');
|
6 |
-
|
7 |
-
global $wp_version;
|
8 |
-
global $wpdb;
|
9 |
-
|
10 |
-
$action_response = null;
|
11 |
-
|
12 |
-
$ctrl_ui = new DUP_CTRL_UI();
|
13 |
-
$ctrl_ui->setResponseType('PHP');
|
14 |
-
$data = $ctrl_ui->GetViewStateList();
|
15 |
-
|
16 |
-
$ui_css_srv_panel = (isset($data->payload['dup-settings-diag-srv-panel']) && $data->payload['dup-settings-diag-srv-panel']) ? 'display:block' : 'display:none';
|
17 |
-
$ui_css_opts_panel = (isset($data->payload['dup-settings-diag-opts-panel']) && $data->payload['dup-settings-diag-opts-panel']) ? 'display:block' : 'display:none';
|
18 |
-
|
19 |
-
|
20 |
-
//POST BACK
|
21 |
-
if (isset($_POST['action'])) {
|
22 |
-
$action_result = DUP_Settings::DeleteWPOption($_POST['action']);
|
23 |
-
switch ($_POST['action'])
|
24 |
-
{
|
25 |
-
case 'duplicator_settings' : $action_response = __('Plugin settings reset.', 'duplicator'); break;
|
26 |
-
case 'duplicator_ui_view_state' : $action_response = __('View state settings reset.', 'duplicator'); break;
|
27 |
-
case 'duplicator_package_active' : $action_response = __('Active package settings reset.', 'duplicator'); break;
|
28 |
-
case 'clear_legacy_data':
|
29 |
-
DUP_Settings::LegacyClean();
|
30 |
-
$action_response = __('Legacy data removed.', 'duplicator');
|
31 |
-
break;
|
32 |
-
}
|
33 |
-
}
|
34 |
-
?>
|
35 |
-
|
36 |
-
<style>
|
37 |
-
div#message {margin:0px 0px 10px 0px}
|
38 |
-
div#dup-server-info-area { padding:10px 5px; }
|
39 |
-
div#dup-server-info-area table { padding:1px; background:#dfdfdf; -webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px; width:100% !important; box-shadow:0 8px 6px -6px #777; }
|
40 |
-
div#dup-server-info-area td, th {padding:3px; background:#fff; -webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}
|
41 |
-
div#dup-server-info-area tr.h img { display:none; }
|
42 |
-
div#dup-server-info-area tr.h td{ background:none; }
|
43 |
-
div#dup-server-info-area tr.h th{ text-align:center; background-color:#efefef; }
|
44 |
-
div#dup-server-info-area td.e{ font-weight:bold }
|
45 |
-
td.dup-settings-diag-header {background-color:#D8D8D8; font-weight: bold; border-style: none; color:black}
|
46 |
-
.widefat th {font-weight:bold; }
|
47 |
-
.widefat td {padding:2px 2px 2px 8px}
|
48 |
-
.widefat td:nth-child(1) {width:10px;}
|
49 |
-
.widefat td:nth-child(2) {padding-left: 20px; width:100% !important}
|
50 |
-
textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
|
51 |
-
</style>
|
52 |
-
|
53 |
-
|
54 |
-
<?php
|
55 |
-
$section = isset($_GET['section']) ? $_GET['section'] : 'info';
|
56 |
-
$txt_diagnostic = __('Information', 'duplicator');
|
57 |
-
$txt_log = __('Logs', 'duplicator');
|
58 |
-
$txt_support = __('Support', 'duplicator');;
|
59 |
-
$tools_url = 'admin.php?page=duplicator-tools&tab=diagnostics';
|
60 |
-
|
61 |
-
switch ($section) {
|
62 |
-
case 'info':
|
63 |
-
echo "<div class='lite-sub-tabs'><b>{$txt_diagnostic}</b> | <a href='{$tools_url}§ion=log'>{$txt_log}</a> | <a href='{$tools_url}§ion=support'>{$txt_support}</a></div>";
|
64 |
-
include(dirname(__FILE__) . '/information.php');
|
65 |
-
break;
|
66 |
-
case 'log':
|
67 |
-
echo "<div class='lite-sub-tabs'><a href='{$tools_url}§ion=info'>{$txt_diagnostic}</a> | <b>{$txt_log}</b> | <a href='{$tools_url}§ion=support'>{$txt_support}</a></div>";
|
68 |
-
include(dirname(__FILE__) . '/logging.php');
|
69 |
-
break;
|
70 |
-
case 'support':
|
71 |
-
echo "<div class='lite-sub-tabs'><a href='{$tools_url}§ion=info'>{$txt_diagnostic}</a> | <a href='{$tools_url}§ion=log'>{$txt_log}</a> | <b>{$txt_support}</b> </div>";
|
72 |
-
include(dirname(__FILE__) . '/support.php');
|
73 |
-
|
74 |
-
break;
|
75 |
-
}
|
76 |
?>
|
1 |
+
<?php
|
2 |
+
wp_enqueue_script('dup-handlebars');
|
3 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
4 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
5 |
+
require_once(DUPLICATOR_PLUGIN_PATH . '/classes/utilities/class.u.scancheck.php');
|
6 |
+
|
7 |
+
global $wp_version;
|
8 |
+
global $wpdb;
|
9 |
+
|
10 |
+
$action_response = null;
|
11 |
+
|
12 |
+
$ctrl_ui = new DUP_CTRL_UI();
|
13 |
+
$ctrl_ui->setResponseType('PHP');
|
14 |
+
$data = $ctrl_ui->GetViewStateList();
|
15 |
+
|
16 |
+
$ui_css_srv_panel = (isset($data->payload['dup-settings-diag-srv-panel']) && $data->payload['dup-settings-diag-srv-panel']) ? 'display:block' : 'display:none';
|
17 |
+
$ui_css_opts_panel = (isset($data->payload['dup-settings-diag-opts-panel']) && $data->payload['dup-settings-diag-opts-panel']) ? 'display:block' : 'display:none';
|
18 |
+
|
19 |
+
|
20 |
+
//POST BACK
|
21 |
+
if (isset($_POST['action'])) {
|
22 |
+
$action_result = DUP_Settings::DeleteWPOption($_POST['action']);
|
23 |
+
switch ($_POST['action'])
|
24 |
+
{
|
25 |
+
case 'duplicator_settings' : $action_response = __('Plugin settings reset.', 'duplicator'); break;
|
26 |
+
case 'duplicator_ui_view_state' : $action_response = __('View state settings reset.', 'duplicator'); break;
|
27 |
+
case 'duplicator_package_active' : $action_response = __('Active package settings reset.', 'duplicator'); break;
|
28 |
+
case 'clear_legacy_data':
|
29 |
+
DUP_Settings::LegacyClean();
|
30 |
+
$action_response = __('Legacy data removed.', 'duplicator');
|
31 |
+
break;
|
32 |
+
}
|
33 |
+
}
|
34 |
+
?>
|
35 |
+
|
36 |
+
<style>
|
37 |
+
div#message {margin:0px 0px 10px 0px}
|
38 |
+
div#dup-server-info-area { padding:10px 5px; }
|
39 |
+
div#dup-server-info-area table { padding:1px; background:#dfdfdf; -webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px; width:100% !important; box-shadow:0 8px 6px -6px #777; }
|
40 |
+
div#dup-server-info-area td, th {padding:3px; background:#fff; -webkit-border-radius:2px;-moz-border-radius:2px;border-radius:2px;}
|
41 |
+
div#dup-server-info-area tr.h img { display:none; }
|
42 |
+
div#dup-server-info-area tr.h td{ background:none; }
|
43 |
+
div#dup-server-info-area tr.h th{ text-align:center; background-color:#efefef; }
|
44 |
+
div#dup-server-info-area td.e{ font-weight:bold }
|
45 |
+
td.dup-settings-diag-header {background-color:#D8D8D8; font-weight: bold; border-style: none; color:black}
|
46 |
+
.widefat th {font-weight:bold; }
|
47 |
+
.widefat td {padding:2px 2px 2px 8px}
|
48 |
+
.widefat td:nth-child(1) {width:10px;}
|
49 |
+
.widefat td:nth-child(2) {padding-left: 20px; width:100% !important}
|
50 |
+
textarea.dup-opts-read {width:100%; height:40px; font-size:12px}
|
51 |
+
</style>
|
52 |
+
|
53 |
+
|
54 |
+
<?php
|
55 |
+
$section = isset($_GET['section']) ? $_GET['section'] : 'info';
|
56 |
+
$txt_diagnostic = __('Information', 'duplicator');
|
57 |
+
$txt_log = __('Logs', 'duplicator');
|
58 |
+
$txt_support = __('Support', 'duplicator');;
|
59 |
+
$tools_url = 'admin.php?page=duplicator-tools&tab=diagnostics';
|
60 |
+
|
61 |
+
switch ($section) {
|
62 |
+
case 'info':
|
63 |
+
echo "<div class='lite-sub-tabs'><b>{$txt_diagnostic}</b> | <a href='{$tools_url}§ion=log'>{$txt_log}</a> | <a href='{$tools_url}§ion=support'>{$txt_support}</a></div>";
|
64 |
+
include(dirname(__FILE__) . '/information.php');
|
65 |
+
break;
|
66 |
+
case 'log':
|
67 |
+
echo "<div class='lite-sub-tabs'><a href='{$tools_url}§ion=info'>{$txt_diagnostic}</a> | <b>{$txt_log}</b> | <a href='{$tools_url}§ion=support'>{$txt_support}</a></div>";
|
68 |
+
include(dirname(__FILE__) . '/logging.php');
|
69 |
+
break;
|
70 |
+
case 'support':
|
71 |
+
echo "<div class='lite-sub-tabs'><a href='{$tools_url}§ion=info'>{$txt_diagnostic}</a> | <a href='{$tools_url}§ion=log'>{$txt_log}</a> | <b>{$txt_support}</b> </div>";
|
72 |
+
include(dirname(__FILE__) . '/support.php');
|
73 |
+
|
74 |
+
break;
|
75 |
+
}
|
76 |
?>
|
views/tools/diagnostics/support.php
CHANGED
@@ -1,123 +1,123 @@
|
|
1 |
-
<style>
|
2 |
-
div.dup-support-all {font-size:13px; line-height:20px}
|
3 |
-
div.dup-support-txts-links {width:100%;font-size:14px; font-weight:bold; line-height:26px; text-align:center}
|
4 |
-
div.dup-support-hlp-area {width:375px; height:160px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
|
5 |
-
table.dup-support-hlp-hdrs {border-collapse:collapse; width:100%; border-bottom:1px solid #dfdfdf}
|
6 |
-
table.dup-support-hlp-hdrs {background-color:#efefef;}
|
7 |
-
div.dup-support-hlp-hdrs {
|
8 |
-
font-weight:bold; font-size:17px; height: 35px; padding:5px 5px 5px 10px;
|
9 |
-
background-image:-ms-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
10 |
-
background-image:-moz-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
11 |
-
background-image:-o-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
12 |
-
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #FFFFFF), color-stop(1, #DEDEDE));
|
13 |
-
background-image:-webkit-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
14 |
-
background-image:linear-gradient(to bottom, #FFFFFF 0%, #DEDEDE 100%);
|
15 |
-
}
|
16 |
-
div.dup-support-hlp-hdrs div {padding:5px; margin:4px 20px 0px -20px; text-align: center;}
|
17 |
-
div.dup-support-hlp-txt{padding:10px 4px 4px 4px; text-align:center}
|
18 |
-
</style>
|
19 |
-
|
20 |
-
|
21 |
-
<div class="wrap dup-wrap dup-support-all">
|
22 |
-
|
23 |
-
<div style="width:800px; margin:auto; margin-top: 20px">
|
24 |
-
<table>
|
25 |
-
<tr>
|
26 |
-
<td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
|
27 |
-
<td valign="top" style="padding-top:10px; font-size:13px">
|
28 |
-
<?php
|
29 |
-
_e("Migrating WordPress is a complex process and the logic to make all the magic happen smoothly may not work quickly with every site. With over 30,000 plugins and a very complex server eco-system some migrations may run into issues. This is why the Duplicator includes a detailed knowledgebase that can help with many common issues. Resources to additional support, approved hosting, and alternatives to fit your needs can be found below.", 'duplicator');
|
30 |
-
?>
|
31 |
-
</td>
|
32 |
-
</tr>
|
33 |
-
</table>
|
34 |
-
<br/><br/>
|
35 |
-
|
36 |
-
<!-- HELP LINKS -->
|
37 |
-
<div class="dup-support-hlp-area">
|
38 |
-
<div class="dup-support-hlp-hdrs">
|
39 |
-
<i class="fa fa-cube fa-2x pull-left"></i>
|
40 |
-
<div><?php _e('Knowledgebase', 'duplicator') ?></div>
|
41 |
-
</div>
|
42 |
-
<div class="dup-support-hlp-txt">
|
43 |
-
<?php _e('Complete Online Documentation', 'duplicator'); ?><br/>
|
44 |
-
<select id="dup-support-kb-lnks" style="margin-top:18px; font-size:16px; min-width: 170px">
|
45 |
-
<option> <?php _e('Choose A Section', 'duplicator') ?> </option>
|
46 |
-
<option value="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_qs"><?php _e('Quick Start', 'duplicator') ?></option>
|
47 |
-
<option value="https://snapcreek.com/duplicator/docs/guide/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_guide"><?php _e('User Guide', 'duplicator') ?></option>
|
48 |
-
<option value="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_FAQs"><?php _e('FAQs', 'duplicator') ?></option>
|
49 |
-
<option value="https://snapcreek.com/duplicator/docs/changelog/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_changelog&lite"><?php _e('Change Log', 'duplicator') ?></option>
|
50 |
-
</select>
|
51 |
-
</div>
|
52 |
-
</div>
|
53 |
-
|
54 |
-
<!-- ONLINE SUPPORT -->
|
55 |
-
<div class="dup-support-hlp-area">
|
56 |
-
<div class="dup-support-hlp-hdrs">
|
57 |
-
<i class="fa fa-lightbulb-o fa-2x pull-left"></i>
|
58 |
-
<div><?php _e('Online Support', 'duplicator') ?></div>
|
59 |
-
</div>
|
60 |
-
<div class="dup-support-hlp-txt">
|
61 |
-
<?php _e("Get Help From IT Professionals", 'duplicator'); ?>
|
62 |
-
<br/>
|
63 |
-
<div class="dup-support-txts-links" style="margin:10px 0 10px 0">
|
64 |
-
<button class="button button-primary button-large" onclick="Duplicator.OpenSupportWindow();return false;">
|
65 |
-
<?php _e('Get Support!', 'duplicator') ?>
|
66 |
-
</button> <br/>
|
67 |
-
</div>
|
68 |
-
<small>Pro Users <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_prousers_here" target="_blank">Support Here</a></small>
|
69 |
-
</div>
|
70 |
-
</div>
|
71 |
-
<br style="clear:both" /><br/><br/>
|
72 |
-
|
73 |
-
|
74 |
-
<!-- APPROVED HOSTING -->
|
75 |
-
<div class="dup-support-hlp-area">
|
76 |
-
|
77 |
-
<div class="dup-support-hlp-hdrs">
|
78 |
-
<i class="fa fa-bolt fa-2x pull-left"></i>
|
79 |
-
<div><?php _e('Approved Hosting', 'duplicator') ?></div>
|
80 |
-
</div>
|
81 |
-
<div class="dup-support-hlp-txt">
|
82 |
-
<?php _e('Servers That Work With Duplicator', 'duplicator'); ?>
|
83 |
-
<br/><br/>
|
84 |
-
<div class="dup-support-txts-links">
|
85 |
-
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_servers#faq-resource-040-q', 'litg');"><?php _e('Trusted Providers!', 'duplicator') ?></button>
|
86 |
-
</div>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<!-- ALTERNATIVES -->
|
91 |
-
<div class="dup-support-hlp-area">
|
92 |
-
|
93 |
-
<div class="dup-support-hlp-hdrs">
|
94 |
-
<i class="fa fa-code-fork fa-2x pull-left"></i>
|
95 |
-
<div><?php _e('Alternatives', 'duplicator') ?></div>
|
96 |
-
</div>
|
97 |
-
<div class="dup-support-hlp-txt">
|
98 |
-
<?php _e('Other Commercial Resources', 'duplicator'); ?>
|
99 |
-
<br/><br/>
|
100 |
-
<div class="dup-support-txts-links">
|
101 |
-
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_pro_sln#faq-resource-050-q', 'litg');"><?php _e('Pro Solutions!', 'duplicator') ?></button>
|
102 |
-
</div>
|
103 |
-
</div>
|
104 |
-
</div>
|
105 |
-
</div>
|
106 |
-
</div><br/><br/><br/><br/>
|
107 |
-
|
108 |
-
<script>
|
109 |
-
jQuery(document).ready(function($) {
|
110 |
-
|
111 |
-
Duplicator.OpenSupportWindow = function() {
|
112 |
-
var url = 'https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_window#faq-resource';
|
113 |
-
window.open(url, 'litg');
|
114 |
-
}
|
115 |
-
|
116 |
-
//ATTACHED EVENTS
|
117 |
-
jQuery('#dup-support-kb-lnks').change(function() {
|
118 |
-
if (jQuery(this).val() != "null")
|
119 |
-
window.open(jQuery(this).val())
|
120 |
-
});
|
121 |
-
|
122 |
-
});
|
123 |
</script>
|
1 |
+
<style>
|
2 |
+
div.dup-support-all {font-size:13px; line-height:20px}
|
3 |
+
div.dup-support-txts-links {width:100%;font-size:14px; font-weight:bold; line-height:26px; text-align:center}
|
4 |
+
div.dup-support-hlp-area {width:375px; height:160px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
|
5 |
+
table.dup-support-hlp-hdrs {border-collapse:collapse; width:100%; border-bottom:1px solid #dfdfdf}
|
6 |
+
table.dup-support-hlp-hdrs {background-color:#efefef;}
|
7 |
+
div.dup-support-hlp-hdrs {
|
8 |
+
font-weight:bold; font-size:17px; height: 35px; padding:5px 5px 5px 10px;
|
9 |
+
background-image:-ms-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
10 |
+
background-image:-moz-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
11 |
+
background-image:-o-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
12 |
+
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #FFFFFF), color-stop(1, #DEDEDE));
|
13 |
+
background-image:-webkit-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
14 |
+
background-image:linear-gradient(to bottom, #FFFFFF 0%, #DEDEDE 100%);
|
15 |
+
}
|
16 |
+
div.dup-support-hlp-hdrs div {padding:5px; margin:4px 20px 0px -20px; text-align: center;}
|
17 |
+
div.dup-support-hlp-txt{padding:10px 4px 4px 4px; text-align:center}
|
18 |
+
</style>
|
19 |
+
|
20 |
+
|
21 |
+
<div class="wrap dup-wrap dup-support-all">
|
22 |
+
|
23 |
+
<div style="width:800px; margin:auto; margin-top: 20px">
|
24 |
+
<table>
|
25 |
+
<tr>
|
26 |
+
<td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
|
27 |
+
<td valign="top" style="padding-top:10px; font-size:13px">
|
28 |
+
<?php
|
29 |
+
_e("Migrating WordPress is a complex process and the logic to make all the magic happen smoothly may not work quickly with every site. With over 30,000 plugins and a very complex server eco-system some migrations may run into issues. This is why the Duplicator includes a detailed knowledgebase that can help with many common issues. Resources to additional support, approved hosting, and alternatives to fit your needs can be found below.", 'duplicator');
|
30 |
+
?>
|
31 |
+
</td>
|
32 |
+
</tr>
|
33 |
+
</table>
|
34 |
+
<br/><br/>
|
35 |
+
|
36 |
+
<!-- HELP LINKS -->
|
37 |
+
<div class="dup-support-hlp-area">
|
38 |
+
<div class="dup-support-hlp-hdrs">
|
39 |
+
<i class="fa fa-cube fa-2x pull-left"></i>
|
40 |
+
<div><?php _e('Knowledgebase', 'duplicator') ?></div>
|
41 |
+
</div>
|
42 |
+
<div class="dup-support-hlp-txt">
|
43 |
+
<?php _e('Complete Online Documentation', 'duplicator'); ?><br/>
|
44 |
+
<select id="dup-support-kb-lnks" style="margin-top:18px; font-size:16px; min-width: 170px">
|
45 |
+
<option> <?php _e('Choose A Section', 'duplicator') ?> </option>
|
46 |
+
<option value="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_qs"><?php _e('Quick Start', 'duplicator') ?></option>
|
47 |
+
<option value="https://snapcreek.com/duplicator/docs/guide/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_guide"><?php _e('User Guide', 'duplicator') ?></option>
|
48 |
+
<option value="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_FAQs"><?php _e('FAQs', 'duplicator') ?></option>
|
49 |
+
<option value="https://snapcreek.com/duplicator/docs/changelog/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_changelog&lite"><?php _e('Change Log', 'duplicator') ?></option>
|
50 |
+
</select>
|
51 |
+
</div>
|
52 |
+
</div>
|
53 |
+
|
54 |
+
<!-- ONLINE SUPPORT -->
|
55 |
+
<div class="dup-support-hlp-area">
|
56 |
+
<div class="dup-support-hlp-hdrs">
|
57 |
+
<i class="fa fa-lightbulb-o fa-2x pull-left"></i>
|
58 |
+
<div><?php _e('Online Support', 'duplicator') ?></div>
|
59 |
+
</div>
|
60 |
+
<div class="dup-support-hlp-txt">
|
61 |
+
<?php _e("Get Help From IT Professionals", 'duplicator'); ?>
|
62 |
+
<br/>
|
63 |
+
<div class="dup-support-txts-links" style="margin:10px 0 10px 0">
|
64 |
+
<button class="button button-primary button-large" onclick="Duplicator.OpenSupportWindow();return false;">
|
65 |
+
<?php _e('Get Support!', 'duplicator') ?>
|
66 |
+
</button> <br/>
|
67 |
+
</div>
|
68 |
+
<small>Pro Users <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_prousers_here" target="_blank">Support Here</a></small>
|
69 |
+
</div>
|
70 |
+
</div>
|
71 |
+
<br style="clear:both" /><br/><br/>
|
72 |
+
|
73 |
+
|
74 |
+
<!-- APPROVED HOSTING -->
|
75 |
+
<div class="dup-support-hlp-area">
|
76 |
+
|
77 |
+
<div class="dup-support-hlp-hdrs">
|
78 |
+
<i class="fa fa-bolt fa-2x pull-left"></i>
|
79 |
+
<div><?php _e('Approved Hosting', 'duplicator') ?></div>
|
80 |
+
</div>
|
81 |
+
<div class="dup-support-hlp-txt">
|
82 |
+
<?php _e('Servers That Work With Duplicator', 'duplicator'); ?>
|
83 |
+
<br/><br/>
|
84 |
+
<div class="dup-support-txts-links">
|
85 |
+
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_servers#faq-resource-040-q', 'litg');"><?php _e('Trusted Providers!', 'duplicator') ?></button>
|
86 |
+
</div>
|
87 |
+
</div>
|
88 |
+
</div>
|
89 |
+
|
90 |
+
<!-- ALTERNATIVES -->
|
91 |
+
<div class="dup-support-hlp-area">
|
92 |
+
|
93 |
+
<div class="dup-support-hlp-hdrs">
|
94 |
+
<i class="fa fa-code-fork fa-2x pull-left"></i>
|
95 |
+
<div><?php _e('Alternatives', 'duplicator') ?></div>
|
96 |
+
</div>
|
97 |
+
<div class="dup-support-hlp-txt">
|
98 |
+
<?php _e('Other Commercial Resources', 'duplicator'); ?>
|
99 |
+
<br/><br/>
|
100 |
+
<div class="dup-support-txts-links">
|
101 |
+
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_pro_sln#faq-resource-050-q', 'litg');"><?php _e('Pro Solutions!', 'duplicator') ?></button>
|
102 |
+
</div>
|
103 |
+
</div>
|
104 |
+
</div>
|
105 |
+
</div>
|
106 |
+
</div><br/><br/><br/><br/>
|
107 |
+
|
108 |
+
<script>
|
109 |
+
jQuery(document).ready(function($) {
|
110 |
+
|
111 |
+
Duplicator.OpenSupportWindow = function() {
|
112 |
+
var url = 'https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_window#faq-resource';
|
113 |
+
window.open(url, 'litg');
|
114 |
+
}
|
115 |
+
|
116 |
+
//ATTACHED EVENTS
|
117 |
+
jQuery('#dup-support-kb-lnks').change(function() {
|
118 |
+
if (jQuery(this).val() != "null")
|
119 |
+
window.open(jQuery(this).val())
|
120 |
+
});
|
121 |
+
|
122 |
+
});
|
123 |
</script>
|
views/tools/logging.php
DELETED
@@ -1,208 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/assets/js/javascript.php');
|
3 |
-
require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
|
4 |
-
|
5 |
-
$logs = glob(DUPLICATOR_SSDIR_PATH . '/*.log') ;
|
6 |
-
if ($logs != false && count($logs))
|
7 |
-
{
|
8 |
-
usort($logs, create_function('$a,$b', 'return filemtime($b) - filemtime($a);'));
|
9 |
-
@chmod(DUP_Util::safePath($logs[0]), 0644);
|
10 |
-
}
|
11 |
-
|
12 |
-
$logname = (isset($_GET['logname'])) ? trim(sanitize_text_field($_GET['logname'])) : "";
|
13 |
-
$refresh = (isset($_POST['refresh']) && $_POST['refresh'] == 1) ? 1 : 0;
|
14 |
-
$auto = (isset($_POST['auto']) && $_POST['auto'] == 1) ? 1 : 0;
|
15 |
-
|
16 |
-
//Check for invalid file
|
17 |
-
if (!empty($logname))
|
18 |
-
{
|
19 |
-
$validFiles = array_map('basename', $logs);
|
20 |
-
if (validate_file($logname, $validFiles) > 0) {
|
21 |
-
unset($logname);
|
22 |
-
}
|
23 |
-
unset($validFiles);
|
24 |
-
}
|
25 |
-
|
26 |
-
if (!isset($logname) || !$logname) {
|
27 |
-
$logname = (count($logs) > 0) ? basename($logs[0]) : "";
|
28 |
-
}
|
29 |
-
|
30 |
-
$logurl = get_site_url(null, '', is_ssl() ? 'https' : 'http') . '/' . DUPLICATOR_SSDIR_NAME . '/' . $logname;
|
31 |
-
$logfound = (strlen($logname) > 0) ? true :false;
|
32 |
-
?>
|
33 |
-
|
34 |
-
<style>
|
35 |
-
div#dup-refresh-count {display: inline-block}
|
36 |
-
table#dup-log-panels {width:100%; }
|
37 |
-
td#dup-log-panel-left {width:75%;}
|
38 |
-
td#dup-log-panel-left div.name {float:left; margin: 0px 0px 5px 5px;}
|
39 |
-
td#dup-log-panel-left div.opts {float:right;}
|
40 |
-
td#dup-log-panel-right {vertical-align: top; padding-left:15px; max-width: 375px}
|
41 |
-
iframe#dup-log-content {padding:5px; background: #fff; min-height:500px; width:99%; border:1px solid silver}
|
42 |
-
|
43 |
-
/* OPTIONS */
|
44 |
-
div.dup-log-hdr {font-weight: bold; font-size:16px; padding:2px; }
|
45 |
-
div.dup-log-hdr small{font-weight:normal; font-style: italic}
|
46 |
-
div.dup-log-file-list {font-family:monospace;}
|
47 |
-
div.dup-log-file-list a, span.dup-log{display: inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 375px; overflow:hidden}
|
48 |
-
div.dup-log-file-list span {color:green}
|
49 |
-
div.dup-opts-items {border:1px solid silver; background: #efefef; padding: 5px; border-radius: 4px; margin:2px 0px 10px -2px;}
|
50 |
-
label#dup-auto-refresh-lbl {display: inline-block;}
|
51 |
-
</style>
|
52 |
-
|
53 |
-
<script>
|
54 |
-
jQuery(document).ready(function($)
|
55 |
-
{
|
56 |
-
Duplicator.Tools.FullLog = function() {
|
57 |
-
var $panelL = $('#dup-log-panel-left');
|
58 |
-
var $panelR = $('#dup-log-panel-right');
|
59 |
-
|
60 |
-
if ($panelR.is(":visible") ) {
|
61 |
-
$panelR.hide(400);
|
62 |
-
$panelL.css({width: '100%'});
|
63 |
-
} else {
|
64 |
-
$panelR.show(200);
|
65 |
-
$panelL.css({width: '75%'});
|
66 |
-
}
|
67 |
-
}
|
68 |
-
|
69 |
-
Duplicator.Tools.Refresh = function() {
|
70 |
-
$('#refresh').val(1);
|
71 |
-
$('#dup-form-logs').submit();
|
72 |
-
}
|
73 |
-
|
74 |
-
Duplicator.Tools.RefreshAuto = function() {
|
75 |
-
if ( $("#dup-auto-refresh").is(":checked")) {
|
76 |
-
$('#auto').val(1);
|
77 |
-
startTimer();
|
78 |
-
} else {
|
79 |
-
$('#auto').val(0);
|
80 |
-
}
|
81 |
-
}
|
82 |
-
|
83 |
-
Duplicator.Tools.GetLog = function(log) {
|
84 |
-
window.location = log;
|
85 |
-
}
|
86 |
-
|
87 |
-
Duplicator.Tools.WinResize = function() {
|
88 |
-
var height = $(window).height() - 170;
|
89 |
-
$("#dup-log-content").css({height: height + 'px'});
|
90 |
-
}
|
91 |
-
|
92 |
-
var duration = 10;
|
93 |
-
var count = duration;
|
94 |
-
var timerInterval;
|
95 |
-
function timer() {
|
96 |
-
count = count - 1;
|
97 |
-
$("#dup-refresh-count").html(count.toString());
|
98 |
-
if (! $("#dup-auto-refresh").is(":checked")) {
|
99 |
-
clearInterval(timerInterval);
|
100 |
-
$("#dup-refresh-count").text(count.toString().trim());
|
101 |
-
return;
|
102 |
-
}
|
103 |
-
|
104 |
-
if (count <= 0) {
|
105 |
-
count = duration + 1;
|
106 |
-
Duplicator.Tools.Refresh();
|
107 |
-
}
|
108 |
-
}
|
109 |
-
|
110 |
-
function startTimer() {
|
111 |
-
timerInterval = setInterval(timer, 1000);
|
112 |
-
}
|
113 |
-
|
114 |
-
//INIT Events
|
115 |
-
$(window).resize(Duplicator.Tools.WinResize);
|
116 |
-
$('#dup-options').click(Duplicator.Tools.FullLog);
|
117 |
-
$("#dup-refresh").click(Duplicator.Tools.Refresh);
|
118 |
-
$("#dup-auto-refresh").click(Duplicator.Tools.RefreshAuto);
|
119 |
-
$("#dup-refresh-count").html(duration.toString());
|
120 |
-
|
121 |
-
//INIT
|
122 |
-
Duplicator.Tools.WinResize();
|
123 |
-
<?php if ($refresh) : ?>
|
124 |
-
//Scroll to Bottom
|
125 |
-
$("#dup-log-content").load(function () {
|
126 |
-
var $contents = $('#dup-log-content').contents();
|
127 |
-
$contents.scrollTop($contents.height());
|
128 |
-
});
|
129 |
-
<?php if ($auto) : ?>
|
130 |
-
$("#dup-auto-refresh").prop('checked', true);
|
131 |
-
Duplicator.Tools.RefreshAuto();
|
132 |
-
<?php endif; ?>
|
133 |
-
<?php endif; ?>
|
134 |
-
});
|
135 |
-
</script>
|
136 |
-
|
137 |
-
<form id="dup-form-logs" method="post" action="">
|
138 |
-
<input type="hidden" id="refresh" name="refresh" value="<?php echo ($refresh) ? 1 : 0 ?>" />
|
139 |
-
<input type="hidden" id="auto" name="auto" value="<?php echo ($auto) ? 1 : 0 ?>" />
|
140 |
-
|
141 |
-
<?php if (! $logfound) : ?>
|
142 |
-
<div style="padding:20px">
|
143 |
-
<h2><?php _e("Log file not found or unreadable", 'duplicator') ?>.</h2>
|
144 |
-
<?php _e("Try to create a package, since no log files were found in the snapshots directory with the extension *.log", 'duplicator') ?>.<br/><br/>
|
145 |
-
<?php _e("Reasons for log file not showing", 'duplicator') ?>: <br/>
|
146 |
-
- <?php _e("The web server does not support returning .log file extentions", 'duplicator') ?>. <br/>
|
147 |
-
- <?php _e("The snapshots directory does not have the correct permissions to write files. Try setting the permissions to 755", 'duplicator') ?>. <br/>
|
148 |
-
- <?php _e("The process that PHP runs under does not have enough permissions to create files. Please contact your hosting provider for more details", 'duplicator') ?>. <br/>
|
149 |
-
</div>
|
150 |
-
<?php else: ?>
|
151 |
-
<table id="dup-log-panels">
|
152 |
-
<tr>
|
153 |
-
<td id="dup-log-panel-left">
|
154 |
-
<div class="name">
|
155 |
-
<i class='fa fa-list-alt'></i> <b><?php echo basename($logurl); ?></b> |
|
156 |
-
<i style="cursor: pointer"
|
157 |
-
data-tooltip-title="<?php _e("Host Recommendation:", 'duplicator'); ?>"
|
158 |
-
data-tooltip="<?php _e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
|
159 |
-
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
160 |
-
<?php
|
161 |
-
printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
|
162 |
-
__("Consider our recommended", 'duplicator'),
|
163 |
-
__("host list", 'duplicator'),
|
164 |
-
__("if you’re unhappy with your current provider", 'duplicator'));
|
165 |
-
?>
|
166 |
-
</i>
|
167 |
-
</div>
|
168 |
-
<div class="opts"><a href="javascript:void(0)" id="dup-options"><?php _e("Options", 'duplicator') ?> <i class="fa fa-angle-double-right"></i></a> </div>
|
169 |
-
<br style="clear:both" />
|
170 |
-
<iframe id="dup-log-content" src="<?php echo $logurl ?>" ></iframe>
|
171 |
-
</td>
|
172 |
-
<td id="dup-log-panel-right">
|
173 |
-
<h2><?php _e("Options", 'duplicator') ?> </h2>
|
174 |
-
<div class="dup-opts-items">
|
175 |
-
<input type="button" class="button button-small" id="dup-refresh" value="<?php _e("Refresh", 'duplicator') ?>" />
|
176 |
-
<input type='checkbox' id="dup-auto-refresh" style="margin-top:1px" />
|
177 |
-
<label id="dup-auto-refresh-lbl" for="dup-auto-refresh">
|
178 |
-
<?php _e("Auto Refresh", 'duplicator') ?>
|
179 |
-
[<div id="dup-refresh-count"></div>]
|
180 |
-
</label>
|
181 |
-
</div>
|
182 |
-
|
183 |
-
<div class="dup-log-hdr">
|
184 |
-
<?php _e("Package Logs", 'duplicator') ?>
|
185 |
-
<small><?php _e("Top 20", 'duplicator') ?></small>
|
186 |
-
</div>
|
187 |
-
|
188 |
-
<div class="dup-log-file-list">
|
189 |
-
<?php
|
190 |
-
$count=0;
|
191 |
-
$active = basename($logurl);
|
192 |
-
foreach ($logs as $log) {
|
193 |
-
$time = date('m/d/y h:i:s', filemtime($log));
|
194 |
-
$name = esc_html(basename($log));
|
195 |
-
$url = '?page=duplicator-tools&logname=' . $name;
|
196 |
-
echo ($active == $name)
|
197 |
-
? "<span class='dup-log' title='{$name}'>{$time}-{$name}</span>"
|
198 |
-
: "<a href='javascript:void(0)' title='{$name}' onclick='Duplicator.Tools.GetLog(\"{$url}\")'>{$time}-{$name}</a>";
|
199 |
-
if ($count > 20) break;
|
200 |
-
}
|
201 |
-
?>
|
202 |
-
</div>
|
203 |
-
</td>
|
204 |
-
</tr>
|
205 |
-
</table>
|
206 |
-
<?php endif; ?>
|
207 |
-
</form>
|
208 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/tools/support.php
DELETED
@@ -1,123 +0,0 @@
|
|
1 |
-
<style>
|
2 |
-
div.dup-support-all {font-size:13px; line-height:20px}
|
3 |
-
div.dup-support-txts-links {width:100%;font-size:14px; font-weight:bold; line-height:26px; text-align:center}
|
4 |
-
div.dup-support-hlp-area {width:375px; height:160px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
|
5 |
-
table.dup-support-hlp-hdrs {border-collapse:collapse; width:100%; border-bottom:1px solid #dfdfdf}
|
6 |
-
table.dup-support-hlp-hdrs {background-color:#efefef;}
|
7 |
-
div.dup-support-hlp-hdrs {
|
8 |
-
font-weight:bold; font-size:17px; height: 35px; padding:5px 5px 5px 10px;
|
9 |
-
background-image:-ms-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
10 |
-
background-image:-moz-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
11 |
-
background-image:-o-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
12 |
-
background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0, #FFFFFF), color-stop(1, #DEDEDE));
|
13 |
-
background-image:-webkit-linear-gradient(top, #FFFFFF 0%, #DEDEDE 100%);
|
14 |
-
background-image:linear-gradient(to bottom, #FFFFFF 0%, #DEDEDE 100%);
|
15 |
-
}
|
16 |
-
div.dup-support-hlp-hdrs div {padding:5px; margin:4px 20px 0px -20px; text-align: center;}
|
17 |
-
div.dup-support-hlp-txt{padding:10px 4px 4px 4px; text-align:center}
|
18 |
-
</style>
|
19 |
-
|
20 |
-
|
21 |
-
<div class="wrap dup-wrap dup-support-all">
|
22 |
-
|
23 |
-
<div style="width:800px; margin:auto; margin-top: 20px">
|
24 |
-
<table>
|
25 |
-
<tr>
|
26 |
-
<td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
|
27 |
-
<td valign="top" style="padding-top:10px; font-size:13px">
|
28 |
-
<?php
|
29 |
-
_e("Migrating WordPress is a complex process and the logic to make all the magic happen smoothly may not work quickly with every site. With over 30,000 plugins and a very complex server eco-system some migrations may run into issues. This is why the Duplicator includes a detailed knowledgebase that can help with many common issues. Resources to additional support, approved hosting, and alternatives to fit your needs can be found below.", 'duplicator');
|
30 |
-
?>
|
31 |
-
</td>
|
32 |
-
</tr>
|
33 |
-
</table>
|
34 |
-
<br/><br/>
|
35 |
-
|
36 |
-
<!-- HELP LINKS -->
|
37 |
-
<div class="dup-support-hlp-area">
|
38 |
-
<div class="dup-support-hlp-hdrs">
|
39 |
-
<i class="fa fa-cube fa-2x pull-left"></i>
|
40 |
-
<div><?php _e('Knowledgebase', 'duplicator') ?></div>
|
41 |
-
</div>
|
42 |
-
<div class="dup-support-hlp-txt">
|
43 |
-
<?php _e('Complete Online Documentation', 'duplicator'); ?><br/>
|
44 |
-
<select id="dup-support-kb-lnks" style="margin-top:18px; font-size:16px; min-width: 170px">
|
45 |
-
<option> <?php _e('Choose A Section', 'duplicator') ?> </option>
|
46 |
-
<option value="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_qs"><?php _e('Quick Start', 'duplicator') ?></option>
|
47 |
-
<option value="https://snapcreek.com/duplicator/docs/guide/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_guide"><?php _e('User Guide', 'duplicator') ?></option>
|
48 |
-
<option value="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_FAQs"><?php _e('FAQs', 'duplicator') ?></option>
|
49 |
-
<option value="https://snapcreek.com/duplicator/docs/changelog/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_changelog&lite"><?php _e('Change Log', 'duplicator') ?></option>
|
50 |
-
</select>
|
51 |
-
</div>
|
52 |
-
</div>
|
53 |
-
|
54 |
-
<!-- ONLINE SUPPORT -->
|
55 |
-
<div class="dup-support-hlp-area">
|
56 |
-
<div class="dup-support-hlp-hdrs">
|
57 |
-
<i class="fa fa-lightbulb-o fa-2x pull-left"></i>
|
58 |
-
<div><?php _e('Online Support', 'duplicator') ?></div>
|
59 |
-
</div>
|
60 |
-
<div class="dup-support-hlp-txt">
|
61 |
-
<?php _e("Get Help From IT Professionals", 'duplicator'); ?>
|
62 |
-
<br/>
|
63 |
-
<div class="dup-support-txts-links" style="margin:10px 0 10px 0">
|
64 |
-
<button class="button button-primary button-large" onclick="Duplicator.OpenSupportWindow();return false;">
|
65 |
-
<?php _e('Get Support!', 'duplicator') ?>
|
66 |
-
</button> <br/>
|
67 |
-
</div>
|
68 |
-
<small>Pro Users <a href="https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_prousers_here" target="_blank">Support Here</a></small>
|
69 |
-
</div>
|
70 |
-
</div>
|
71 |
-
<br style="clear:both" /><br/><br/>
|
72 |
-
|
73 |
-
|
74 |
-
<!-- APPROVED HOSTING -->
|
75 |
-
<div class="dup-support-hlp-area">
|
76 |
-
|
77 |
-
<div class="dup-support-hlp-hdrs">
|
78 |
-
<i class="fa fa-bolt fa-2x pull-left"></i>
|
79 |
-
<div><?php _e('Approved Hosting', 'duplicator') ?></div>
|
80 |
-
</div>
|
81 |
-
<div class="dup-support-hlp-txt">
|
82 |
-
<?php _e('Servers That Work With Duplicator', 'duplicator'); ?>
|
83 |
-
<br/><br/>
|
84 |
-
<div class="dup-support-txts-links">
|
85 |
-
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_servers#faq-resource-040-q', 'litg');"><?php _e('Trusted Providers!', 'duplicator') ?></button>
|
86 |
-
</div>
|
87 |
-
</div>
|
88 |
-
</div>
|
89 |
-
|
90 |
-
<!-- ALTERNATIVES -->
|
91 |
-
<div class="dup-support-hlp-area">
|
92 |
-
|
93 |
-
<div class="dup-support-hlp-hdrs">
|
94 |
-
<i class="fa fa-code-fork fa-2x pull-left"></i>
|
95 |
-
<div><?php _e('Alternatives', 'duplicator') ?></div>
|
96 |
-
</div>
|
97 |
-
<div class="dup-support-hlp-txt">
|
98 |
-
<?php _e('Other Commercial Resources', 'duplicator'); ?>
|
99 |
-
<br/><br/>
|
100 |
-
<div class="dup-support-txts-links">
|
101 |
-
<button class="button button-primary button-large" onclick="window.open('https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_pro_sln#faq-resource-050-q', 'litg');"><?php _e('Pro Solutions!', 'duplicator') ?></button>
|
102 |
-
</div>
|
103 |
-
</div>
|
104 |
-
</div>
|
105 |
-
</div>
|
106 |
-
</div><br/><br/><br/><br/>
|
107 |
-
|
108 |
-
<script>
|
109 |
-
jQuery(document).ready(function($) {
|
110 |
-
|
111 |
-
Duplicator.OpenSupportWindow = function() {
|
112 |
-
var url = 'https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=support_window#faq-resource';
|
113 |
-
window.open(url, 'litg');
|
114 |
-
}
|
115 |
-
|
116 |
-
//ATTACHED EVENTS
|
117 |
-
jQuery('#dup-support-kb-lnks').change(function() {
|
118 |
-
if (jQuery(this).val() != "null")
|
119 |
-
window.open(jQuery(this).val())
|
120 |
-
});
|
121 |
-
|
122 |
-
});
|
123 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|