Version Description
Download this release
Release Info
Developer | cory@lamle.org |
Plugin | Duplicator – WordPress Migration Plugin |
Version | 1.1.10 |
Comparing to | |
See all releases |
Code changes from version 1.1.8 to 1.1.10
- classes/package.database.php +53 -10
- classes/package.php +4 -8
- define.php +10 -6
- duplicator.php +1 -1
- installer/build/ajax.step2.php +4 -2
- installer/build/assets/inc.css.php +186 -185
- installer/build/main.installer.php +1 -1
- installer/build/view.step1.php +508 -505
- readme.txt +1 -1
- views/packages/list-nodata.php +0 -42
- views/packages/list.base.php +0 -353
- views/packages/main/controller.php +3 -3
- views/packages/main/new1.inc.form.php +1 -1
- views/packages/{new1.base.php → main/new1.setup.php} +26 -121
- views/packages/{new2.base.php → main/new2.scan.php} +694 -641
- views/packages/{new3.base.php → main/new3.build.php} +203 -204
- views/packages/main/packages.php +270 -258
- views/packages/new1.inc.form.php +0 -349
- views/settings/general.php +253 -236
- views/tools/cleanup.php +22 -14
- views/tools/logging.php +15 -2
classes/package.database.php
CHANGED
@@ -103,36 +103,79 @@ class DUP_Database {
|
|
103 |
$tables = $wpdb->get_results("SHOW TABLE STATUS", ARRAY_A);
|
104 |
$info = array();
|
105 |
$info['Status']['Success'] = is_null($tables) ? false : true;
|
106 |
-
|
107 |
-
$info['Status']['
|
|
|
|
|
|
|
|
|
|
|
108 |
|
109 |
$info['Size'] = 0;
|
110 |
$info['Rows'] = 0;
|
111 |
$info['TableCount'] = 0;
|
112 |
$info['TableList'] = array();
|
|
|
|
|
|
|
113 |
|
114 |
-
//
|
115 |
-
foreach ($tables as $table)
|
116 |
-
|
117 |
$name = $table["Name"];
|
118 |
-
if ($this->FilterOn && is_array($filterTables))
|
|
|
119 |
if (in_array($name, $filterTables)) {
|
120 |
continue;
|
121 |
}
|
122 |
}
|
|
|
123 |
$size = ($table["Data_length"] + $table["Index_length"]);
|
|
|
124 |
|
125 |
$info['Size'] += $size;
|
126 |
$info['Rows'] += ($table["Rows"]);
|
127 |
-
$info['TableList'][$name]['
|
|
|
128 |
$info['TableList'][$name]['Size'] = DUP_Util::ByteSize($size);
|
129 |
$tblCount++;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
130 |
}
|
131 |
|
132 |
-
$info['Status']['
|
133 |
-
$info['Status']['
|
134 |
-
$info['
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
return $info;
|
137 |
}
|
138 |
|
103 |
$tables = $wpdb->get_results("SHOW TABLE STATUS", ARRAY_A);
|
104 |
$info = array();
|
105 |
$info['Status']['Success'] = is_null($tables) ? false : true;
|
106 |
+
//DB_Case for the database name is never checked on
|
107 |
+
$info['Status']['DB_Case'] = 'Good';
|
108 |
+
$info['Status']['DB_Rows'] = 'Good';
|
109 |
+
$info['Status']['DB_Size'] = 'Good';
|
110 |
+
$info['Status']['TBL_Case'] = 'Good';
|
111 |
+
$info['Status']['TBL_Rows'] = 'Good';
|
112 |
+
$info['Status']['TBL_Size'] = 'Good';
|
113 |
|
114 |
$info['Size'] = 0;
|
115 |
$info['Rows'] = 0;
|
116 |
$info['TableCount'] = 0;
|
117 |
$info['TableList'] = array();
|
118 |
+
$tblCaseFound = 0;
|
119 |
+
$tblRowsFound = 0;
|
120 |
+
$tblSizeFound = 0;
|
121 |
|
122 |
+
//Grab Table Stats
|
123 |
+
foreach ($tables as $table)
|
124 |
+
{
|
125 |
$name = $table["Name"];
|
126 |
+
if ($this->FilterOn && is_array($filterTables))
|
127 |
+
{
|
128 |
if (in_array($name, $filterTables)) {
|
129 |
continue;
|
130 |
}
|
131 |
}
|
132 |
+
|
133 |
$size = ($table["Data_length"] + $table["Index_length"]);
|
134 |
+
$rows = empty($table["Rows"]) ? '0' : $table["Rows"];
|
135 |
|
136 |
$info['Size'] += $size;
|
137 |
$info['Rows'] += ($table["Rows"]);
|
138 |
+
$info['TableList'][$name]['Case'] = preg_match('/[A-Z]/', $name) ? 1 : 0;
|
139 |
+
$info['TableList'][$name]['Rows'] = number_format($rows);
|
140 |
$info['TableList'][$name]['Size'] = DUP_Util::ByteSize($size);
|
141 |
$tblCount++;
|
142 |
+
|
143 |
+
//Table Uppercase
|
144 |
+
if ($info['TableList'][$name]['Case']) {
|
145 |
+
if (! $tblCaseFound) {
|
146 |
+
$tblCaseFound = 1;
|
147 |
+
}
|
148 |
+
}
|
149 |
+
|
150 |
+
//Table Row Count
|
151 |
+
if ($rows > DUPLICATOR_SCAN_DB_TBL_ROWS) {
|
152 |
+
if (! $tblRowsFound) {
|
153 |
+
$tblRowsFound = 1;
|
154 |
+
}
|
155 |
+
}
|
156 |
+
|
157 |
+
//Table Size
|
158 |
+
if ($size > DUPLICATOR_SCAN_DB_TBL_SIZE) {
|
159 |
+
if (! $tblSizeFound) {
|
160 |
+
$tblSizeFound = 1;
|
161 |
+
}
|
162 |
+
}
|
163 |
}
|
164 |
|
165 |
+
$info['Status']['DB_Case'] = preg_match('/[A-Z]/', $wpdb->dbname) ? 'Warn' : 'Good';
|
166 |
+
$info['Status']['DB_Rows'] = ($info['Rows'] > DUPLICATOR_SCAN_DB_ALL_ROWS) ? 'Warn' : 'Good';
|
167 |
+
$info['Status']['DB_Size'] = ($info['Size'] > DUPLICATOR_SCAN_DB_ALL_SIZE) ? 'Warn' : 'Good';
|
168 |
|
169 |
+
|
170 |
+
$info['Status']['TBL_Case'] = ($tblCaseFound) ? 'Warn' : 'Good';
|
171 |
+
$info['Status']['TBL_Rows'] = ($tblRowsFound) ? 'Warn' : 'Good';
|
172 |
+
$info['Status']['TBL_Size'] = ($tblSizeFound) ? 'Warn' : 'Good';
|
173 |
+
|
174 |
+
$info['Size'] = DUP_Util::ByteSize($info['Size']) or "unknown";
|
175 |
+
$info['Rows'] = number_format($info['Rows']) or "unknown";
|
176 |
+
$info['TableList'] = $info['TableList'] or "unknown";
|
177 |
+
$info['TableCount'] = $tblCount;
|
178 |
+
|
179 |
return $info;
|
180 |
}
|
181 |
|
classes/package.php
CHANGED
@@ -123,15 +123,10 @@ class DUP_Package {
|
|
123 |
$report['ARC']['Dirs'] = $this->Archive->Dirs;
|
124 |
$report['ARC']['Files'] = $this->Archive->Files;
|
125 |
|
126 |
-
|
127 |
//DATABASE
|
128 |
$db = $this->Database->Stats();
|
129 |
-
$report['DB']
|
130 |
-
|
131 |
-
$report['DB']['Rows'] = number_format($db['Rows']) or "unknown";
|
132 |
-
$report['DB']['TableCount'] = $db['TableCount'] or "unknown";
|
133 |
-
$report['DB']['TableList'] = $db['TableList'] or "unknown";
|
134 |
-
|
135 |
$warnings = array($report['SRV']['WEB']['ALL'],
|
136 |
$report['SRV']['PHP']['ALL'],
|
137 |
$report['SRV']['WP']['ALL'],
|
@@ -139,7 +134,8 @@ class DUP_Package {
|
|
139 |
$report['ARC']['Status']['Names'],
|
140 |
$report['ARC']['Status']['Big'],
|
141 |
$db['Status']['Size'],
|
142 |
-
$db['Status']['Rows']
|
|
|
143 |
|
144 |
$warn_counts = array_count_values($warnings);
|
145 |
|
123 |
$report['ARC']['Dirs'] = $this->Archive->Dirs;
|
124 |
$report['ARC']['Files'] = $this->Archive->Files;
|
125 |
|
|
|
126 |
//DATABASE
|
127 |
$db = $this->Database->Stats();
|
128 |
+
$report['DB'] = $db;
|
129 |
+
|
|
|
|
|
|
|
|
|
130 |
$warnings = array($report['SRV']['WEB']['ALL'],
|
131 |
$report['SRV']['PHP']['ALL'],
|
132 |
$report['SRV']['WP']['ALL'],
|
134 |
$report['ARC']['Status']['Names'],
|
135 |
$report['ARC']['Status']['Big'],
|
136 |
$db['Status']['Size'],
|
137 |
+
$db['Status']['Rows'],
|
138 |
+
$db['Status']['Case']);
|
139 |
|
140 |
$warn_counts = array_count_values($warnings);
|
141 |
|
define.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
if (function_exists('plugin_dir_url')) {
|
4 |
|
5 |
|
6 |
-
define('DUPLICATOR_VERSION', '1.1.
|
7 |
define("DUPLICATOR_HOMEPAGE", "http://lifeinthegrid.com/labs/duplicator");
|
8 |
define("DUPLICATOR_GIVELINK", "http://lifeinthegrid.com/partner");
|
9 |
define("DUPLICATOR_HELPLINK", "http://lifeinthegrid.com/duplicator-docs");
|
@@ -32,17 +32,21 @@ if (function_exists('plugin_dir_url')) {
|
|
32 |
define("DUPLICATOR_INSTALL_LOG", 'installer-log.txt');
|
33 |
define("DUPLICATOR_INSTALL_DB", 'database.sql');
|
34 |
|
35 |
-
//
|
36 |
-
define("DUPLICATOR_PHP_MAX_MEMORY", '
|
37 |
define("DUPLICATOR_DB_MAX_TIME", 5000);
|
38 |
define("DUPLICATOR_DB_EOF_MARKER", 'DUPLICATOR_MYSQLDUMP_EOF');
|
|
|
39 |
define("DUPLICATOR_SCAN_SITE", 157286400); //150MB
|
40 |
define("DUPLICATOR_SCAN_WARNFILESIZE", 3145728); //3MB
|
41 |
define("DUPLICATOR_SCAN_CACHESIZE", 524288); //512K
|
42 |
-
define("
|
43 |
-
define("
|
|
|
|
|
44 |
define("DUPLICATOR_SCAN_TIMEOUT", 150); //Seconds
|
45 |
-
define("DUPLICATOR_SCAN_MIN_WP", "3.
|
|
|
46 |
$GLOBALS['DUPLICATOR_SERVER_LIST'] = array('Apache','LiteSpeed', 'Nginx', 'Lighttpd', 'IIS', 'WebServerX', 'uWSGI');
|
47 |
$GLOBALS['DUPLICATOR_OPTS_DELETE'] = array('duplicator_ui_view_state', 'duplicator_package_active', 'duplicator_settings');
|
48 |
|
3 |
if (function_exists('plugin_dir_url')) {
|
4 |
|
5 |
|
6 |
+
define('DUPLICATOR_VERSION', '1.1.10');
|
7 |
define("DUPLICATOR_HOMEPAGE", "http://lifeinthegrid.com/labs/duplicator");
|
8 |
define("DUPLICATOR_GIVELINK", "http://lifeinthegrid.com/partner");
|
9 |
define("DUPLICATOR_HELPLINK", "http://lifeinthegrid.com/duplicator-docs");
|
32 |
define("DUPLICATOR_INSTALL_LOG", 'installer-log.txt');
|
33 |
define("DUPLICATOR_INSTALL_DB", 'database.sql');
|
34 |
|
35 |
+
//GENERAL CONSTRAINTS
|
36 |
+
define("DUPLICATOR_PHP_MAX_MEMORY", '2048M');
|
37 |
define("DUPLICATOR_DB_MAX_TIME", 5000);
|
38 |
define("DUPLICATOR_DB_EOF_MARKER", 'DUPLICATOR_MYSQLDUMP_EOF');
|
39 |
+
//SCANNER CONSTRAINTS
|
40 |
define("DUPLICATOR_SCAN_SITE", 157286400); //150MB
|
41 |
define("DUPLICATOR_SCAN_WARNFILESIZE", 3145728); //3MB
|
42 |
define("DUPLICATOR_SCAN_CACHESIZE", 524288); //512K
|
43 |
+
define("DUPLICATOR_SCAN_DB_ALL_ROWS", 1000000); //1 rows million per DB
|
44 |
+
define("DUPLICATOR_SCAN_DB_ALL_SIZE", 52428800); //50MB DB
|
45 |
+
define("DUPLICATOR_SCAN_DB_TBL_ROWS", 100000); //100K rows per table
|
46 |
+
define("DUPLICATOR_SCAN_DB_TBL_SIZE", 10485760); //10MB Table
|
47 |
define("DUPLICATOR_SCAN_TIMEOUT", 150); //Seconds
|
48 |
+
define("DUPLICATOR_SCAN_MIN_WP", "3.9.0");
|
49 |
+
|
50 |
$GLOBALS['DUPLICATOR_SERVER_LIST'] = array('Apache','LiteSpeed', 'Nginx', 'Lighttpd', 'IIS', 'WebServerX', 'uWSGI');
|
51 |
$GLOBALS['DUPLICATOR_OPTS_DELETE'] = array('duplicator_ui_view_state', 'duplicator_package_active', 'duplicator_settings');
|
52 |
|
duplicator.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
Description: Create a backup of your WordPress files and database. Duplicate and move an entire site from one location to another in a few steps. Create a full snapshot of your site at any point in time.
|
6 |
-
Version: 1.1.
|
7 |
Author: LifeInTheGrid
|
8 |
Author URI: http://www.lifeinthegrid.com
|
9 |
Text Domain: duplicator
|
3 |
Plugin Name: Duplicator
|
4 |
Plugin URI: http://www.lifeinthegrid.com/duplicator/
|
5 |
Description: Create a backup of your WordPress files and database. Duplicate and move an entire site from one location to another in a few steps. Create a full snapshot of your site at any point in time.
|
6 |
+
Version: 1.1.10
|
7 |
Author: LifeInTheGrid
|
8 |
Author URI: http://www.lifeinthegrid.com
|
9 |
Text Domain: duplicator
|
installer/build/ajax.step2.php
CHANGED
@@ -97,9 +97,11 @@ $path_new_json = str_replace('"', "", json_encode($_POST['path_new']));
|
|
97 |
|
98 |
array_push($GLOBALS['REPLACE_LIST'],
|
99 |
array('search' => $_POST['url_old'], 'replace' => $_POST['url_new']),
|
100 |
-
array('search' => $url_old_json, 'replace' => $url_new_json),
|
101 |
array('search' => $_POST['path_old'], 'replace' => $_POST['path_new']),
|
102 |
-
array('search' => $
|
|
|
|
|
|
|
103 |
array('search' => rtrim(DupUtil::unset_safe_path($_POST['path_old']), '\\'), 'replace' => rtrim($_POST['path_new'], '/'))
|
104 |
);
|
105 |
|
97 |
|
98 |
array_push($GLOBALS['REPLACE_LIST'],
|
99 |
array('search' => $_POST['url_old'], 'replace' => $_POST['url_new']),
|
|
|
100 |
array('search' => $_POST['path_old'], 'replace' => $_POST['path_new']),
|
101 |
+
array('search' => $url_old_json, 'replace' => $url_new_json),
|
102 |
+
array('search' => $path_old_json, 'replace' => $path_new_json),
|
103 |
+
array('search' => urlencode($_POST['path_old']), 'replace' => urlencode($_POST['path_new'])),
|
104 |
+
array('search' => urlencode($_POST['url_old']), 'replace' => urlencode($_POST['url_new'])),
|
105 |
array('search' => rtrim(DupUtil::unset_safe_path($_POST['path_old']), '\\'), 'replace' => rtrim($_POST['path_new'], '/'))
|
106 |
);
|
107 |
|
installer/build/assets/inc.css.php
CHANGED
@@ -1,186 +1,187 @@
|
|
1 |
-
<?php
|
2 |
-
// Exit if accessed directly
|
3 |
-
if (! defined('DUPLICATOR_INIT')) {
|
4 |
-
$_baseURL = strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] :$_SERVER['HTTP_HOST'];
|
5 |
-
$_baseURL = "http://" . $_baseURL;
|
6 |
-
header("HTTP/1.1 301 Moved Permanently");
|
7 |
-
header("Location:$_baseURL");
|
8 |
-
exit;
|
9 |
-
}
|
10 |
-
?>
|
11 |
-
<style>
|
12 |
-
body {font-family:"Open Sans",sans-serif;}
|
13 |
-
body,td,th {font-size:13px;color:#000;}
|
14 |
-
fieldset {border:1px solid silver; border-radius:5px; padding:10px}
|
15 |
-
h3 {margin:1px; padding:1px; font-size:14px;}
|
16 |
-
a {color:#222}
|
17 |
-
a:hover{color:gray}
|
18 |
-
input[type=text] { width:500px; border-radius:3px; height:17px; font-size:12px; border:1px solid silver;}
|
19 |
-
input.readonly {background-color:#efefef;}
|
20 |
-
i.small {font-size:11px}
|
21 |
-
|
22 |
-
/* ============================
|
23 |
-
COMMON VIEW ELEMENTS*/
|
24 |
-
div#content {border:1px solid #CDCDCD; width:750px; min-height:550px; margin:auto; margin-top:18px; border-radius:5px; box-shadow:0 8px 6px -6px #333;}
|
25 |
-
div#content-inner {padding:10px 30px; min-height:550px}
|
26 |
-
form.content-form {min-height:550px; position:relative; line-height:17px}
|
27 |
-
div.dup-logfile-link {float:right; font-weight:normal; font-size:12px}
|
28 |
-
|
29 |
-
/* WIZARD STEPS */
|
30 |
-
table.header-wizard {border-top-left-radius:5px; border-top-right-radius:5px; width:100%; box-shadow:0 6px 4px -4px #777; background-color:#F1F1F1}
|
31 |
-
div#dup-wiz {padding:0px; margin:7px 0 10px 20px; height:20px }
|
32 |
-
div#dup-wiz-steps {margin:0px 0 0 10px; padding:0px; clear:both; font-weight:bold;font-size:12px; min-width:250px }
|
33 |
-
#dup-wiz span {display:block;float:left; text-align:center; width:15px; margin:3px 4px 0 0px; line-height:15px; color:#ccc; border:1px solid #CCCCCC; border-radius:4px;}
|
34 |
-
/* WIZ-DEFAULT*/
|
35 |
-
#dup-wiz a { position:relative; display:block; width:auto; height:24px; margin-right:18px; padding:0px 10px 0 3px; float:left; line-height:24px; color:#000; background:#E4E4E4; }
|
36 |
-
#dup-wiz a:before { width:0px; height:0px; border-top:12px solid #E4E4E4; border-bottom:12px solid #E4E4E4; border-left:12px solid transparent; position:absolute; content:""; top:0px; left:-12px; }
|
37 |
-
#dup-wiz a:after { width:0; height:0; border-top:12px solid transparent; border-bottom:12px solid transparent; border-left:12px solid #E4E4E4; position:absolute; content:""; top:0px; right:-12px; }
|
38 |
-
/* WIZ-COMPLETED */
|
39 |
-
#dup-wiz .completed-step a {color:#ccc; background:#999;}
|
40 |
-
#dup-wiz .completed-step a:before {border-top:12px solid #999; border-bottom:12px solid #999;}
|
41 |
-
#dup-wiz .completed-step a:after {border-left:12px solid #999;}
|
42 |
-
#dup-wiz .completed-step span {color:#ccc;}
|
43 |
-
/* WIZ-ACTIVE */
|
44 |
-
#dup-wiz .active-step a {color:#fff; background:#999;}
|
45 |
-
#dup-wiz .active-step a:before {border-top:12px solid #999; border-bottom:12px solid #999;}
|
46 |
-
#dup-wiz .active-step a:after {border-left:12px solid #999;}
|
47 |
-
#dup-wiz .active-step span {color:#fff;}
|
48 |
-
|
49 |
-
/*Help */
|
50 |
-
select#dup-hlp-lnk {border-radius:3px; font-size:11px; margin:3px 5px 0 0px; background-color:#efefef; border:1px solid silver}
|
51 |
-
div.dup-help-page {padding:5px 0 0 5px}
|
52 |
-
div.dup-help-page fieldset {margin-bottom:25px}
|
53 |
-
div#dup-main-help h3 {background-color:#dfdfdf; border:1px solid silver; border-radius:5px; padding:3px; margin-bottom:8px}
|
54 |
-
|
55 |
-
div#progress-area {padding:5px; margin:150px 0 0 0px; text-align:center;}
|
56 |
-
div#ajaxerr-data {padding:5px; height:350px; width:99%; border:1px solid silver; border-radius:5px; background-color:#efefef; font-size:12px; overflow-y:scroll}
|
57 |
-
div.title-header {padding:2px; border-bottom:1px solid silver; font-weight:bold; margin-bottom:5px;}
|
58 |
-
div.hdr-main {font-size:18px; padding:0 0 5px 0; border-bottom:1px solid #999; font-weight:bold; margin:5px 0 10px 0;}
|
59 |
-
div.hdr-sub {font-size:14px; padding:2px 2px 2px 0; border-bottom:1px solid #dfdfdf; font-weight:bold; margin-bottom:5px;}
|
60 |
-
|
61 |
-
/*BOXES:Expandable sections */
|
62 |
-
div.dup-box {padding:0px; display:block; background-color:#fff; border:1px solid #e5e5e5; box-shadow:0 1px 1px rgba(0,0,0,.04);}
|
63 |
-
div.dup-box-title {font-size:14px; padding:5px 0 0 10px; font-weight:bold; cursor:pointer; height:23px; margin:0px; background-color:#F9F9F9}
|
64 |
-
div.dup-box-title:hover {background-color:#efefef;}
|
65 |
-
div.dup-box-arrow {text-decoration:none!important; float:right; width:27px; height:30px; font-size:16px; cursor:pointer; padding:1px 0 0 0px; white-space:nowrap}
|
66 |
-
div.dup-box-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0px; background-color:#F9F9F9; box-shadow:0 8px 6px -6px #999;}
|
67 |
-
|
68 |
-
/* ============================
|
69 |
-
STEP 1 VIEW */
|
70 |
-
table.s1-opts {width:100%; border:0px;}
|
71 |
-
table.s1-opts td{white-space:nowrap; padding:3px;}
|
72 |
-
table.s1-opts td:first-child{width:125px;}
|
73 |
-
table.s1-opts-dbhost td {padding:0; margin:0}
|
74 |
-
table.s1-advopts td:first-child{width:125px; font-weight:bold}
|
75 |
-
|
76 |
-
i#dup-step1-sys-req-msg {font-weight:normal; display:block; padding:0px 0 0 20px;}
|
77 |
-
div.circle-pass, div.circle-fail {display:block;width:13px;height:13px;border-radius:50px;font-size:20px;color:#fff;line-height:100px;text-align:center;text-decoration:none;box-shadow:1px 1px 2px #000;background:#207D1D;opacity:0.95; display:inline-block;}
|
78 |
-
div.circle-fail {background:#9A0D1D !important;}
|
79 |
-
select#logging {font-size:11px}
|
80 |
-
div.dup-step1-modes {padding:0px 15px 0 0px;}
|
81 |
-
div#dup-step1-dbconn {margin:auto; text-align:center; margin:15px 0 20px 0px}
|
82 |
-
|
83 |
-
input#dup-step1-dbconn-btn {font-size:11px; height:20px; border:1px solid gray; border-radius:3px; cursor:pointer}
|
84 |
-
input#dup-step1-dbport-btn {font-size:11px; height:20px; border:1px solid gray; border-radius:3px; cursor:pointer; width:80px}
|
85 |
-
div.dup-db-test label{display:inline-block; width:150px; font-weight:bold; white-space:nowrap;}
|
86 |
-
div.dup-db-test small{display:block; margin:5px 0 5px 0px; font-style:italic; color:#444}
|
87 |
-
div#dbconn-test-msg {font-size:12px}
|
88 |
-
div#dup-step1-dbconn-status {border:1px solid silver; border-radius:3px; background-color:#f9f9f9; padding:2px 5px; margin-top:10px; height:125px; overflow-y: scroll}
|
89 |
-
|
90 |
-
/*Warning Area and Message */
|
91 |
-
div
|
92 |
-
div#dup-step1-warning
|
93 |
-
div#dup-step1-warning-
|
94 |
-
div#dup-step1-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
td.dup-step1-dialog-data-details
|
100 |
-
.dup-
|
101 |
-
.dup-
|
102 |
-
.dup-
|
103 |
-
|
104 |
-
|
105 |
-
div.
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
table.table-inputs-step2
|
111 |
-
|
112 |
-
div
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
div.s3-
|
118 |
-
|
119 |
-
table.s3-report-
|
120 |
-
table.s3-report-errs
|
121 |
-
table.s3-report-
|
122 |
-
table.s3-report-results
|
123 |
-
table.s3-report-results td
|
124 |
-
|
125 |
-
|
126 |
-
div.s3-err-msg
|
127 |
-
div.s3-err-msg div.
|
128 |
-
div.s3-err-msg div.info-
|
129 |
-
|
130 |
-
table.s3-final-step
|
131 |
-
table.s3-final-step td
|
132 |
-
|
133 |
-
div.s3-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
div.s3-gopro-btn
|
140 |
-
|
141 |
-
background:
|
142 |
-
background: -
|
143 |
-
background: linear-gradient(
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
background:
|
149 |
-
background: -
|
150 |
-
background: linear-gradient(
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
div.dup-footer-buttons
|
158 |
-
|
159 |
-
|
160 |
-
background-
|
161 |
-
background-image:-
|
162 |
-
background-image
|
163 |
-
|
164 |
-
|
165 |
-
div.dup-footer-buttons
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
.top_testresult
|
172 |
-
.
|
173 |
-
.
|
174 |
-
.
|
175 |
-
.
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
|
|
186 |
</style>
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if (! defined('DUPLICATOR_INIT')) {
|
4 |
+
$_baseURL = strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] :$_SERVER['HTTP_HOST'];
|
5 |
+
$_baseURL = "http://" . $_baseURL;
|
6 |
+
header("HTTP/1.1 301 Moved Permanently");
|
7 |
+
header("Location:$_baseURL");
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
?>
|
11 |
+
<style>
|
12 |
+
body {font-family:"Open Sans",sans-serif;}
|
13 |
+
body,td,th {font-size:13px;color:#000;}
|
14 |
+
fieldset {border:1px solid silver; border-radius:5px; padding:10px}
|
15 |
+
h3 {margin:1px; padding:1px; font-size:14px;}
|
16 |
+
a {color:#222}
|
17 |
+
a:hover{color:gray}
|
18 |
+
input[type=text] { width:500px; border-radius:3px; height:17px; font-size:12px; border:1px solid silver;}
|
19 |
+
input.readonly {background-color:#efefef;}
|
20 |
+
i.small {font-size:11px}
|
21 |
+
|
22 |
+
/* ============================
|
23 |
+
COMMON VIEW ELEMENTS*/
|
24 |
+
div#content {border:1px solid #CDCDCD; width:750px; min-height:550px; margin:auto; margin-top:18px; border-radius:5px; box-shadow:0 8px 6px -6px #333;}
|
25 |
+
div#content-inner {padding:10px 30px; min-height:550px}
|
26 |
+
form.content-form {min-height:550px; position:relative; line-height:17px}
|
27 |
+
div.dup-logfile-link {float:right; font-weight:normal; font-size:12px}
|
28 |
+
|
29 |
+
/* WIZARD STEPS */
|
30 |
+
table.header-wizard {border-top-left-radius:5px; border-top-right-radius:5px; width:100%; box-shadow:0 6px 4px -4px #777; background-color:#F1F1F1}
|
31 |
+
div#dup-wiz {padding:0px; margin:7px 0 10px 20px; height:20px }
|
32 |
+
div#dup-wiz-steps {margin:0px 0 0 10px; padding:0px; clear:both; font-weight:bold;font-size:12px; min-width:250px }
|
33 |
+
#dup-wiz span {display:block;float:left; text-align:center; width:15px; margin:3px 4px 0 0px; line-height:15px; color:#ccc; border:1px solid #CCCCCC; border-radius:4px;}
|
34 |
+
/* WIZ-DEFAULT*/
|
35 |
+
#dup-wiz a { position:relative; display:block; width:auto; height:24px; margin-right:18px; padding:0px 10px 0 3px; float:left; line-height:24px; color:#000; background:#E4E4E4; }
|
36 |
+
#dup-wiz a:before { width:0px; height:0px; border-top:12px solid #E4E4E4; border-bottom:12px solid #E4E4E4; border-left:12px solid transparent; position:absolute; content:""; top:0px; left:-12px; }
|
37 |
+
#dup-wiz a:after { width:0; height:0; border-top:12px solid transparent; border-bottom:12px solid transparent; border-left:12px solid #E4E4E4; position:absolute; content:""; top:0px; right:-12px; }
|
38 |
+
/* WIZ-COMPLETED */
|
39 |
+
#dup-wiz .completed-step a {color:#ccc; background:#999;}
|
40 |
+
#dup-wiz .completed-step a:before {border-top:12px solid #999; border-bottom:12px solid #999;}
|
41 |
+
#dup-wiz .completed-step a:after {border-left:12px solid #999;}
|
42 |
+
#dup-wiz .completed-step span {color:#ccc;}
|
43 |
+
/* WIZ-ACTIVE */
|
44 |
+
#dup-wiz .active-step a {color:#fff; background:#999;}
|
45 |
+
#dup-wiz .active-step a:before {border-top:12px solid #999; border-bottom:12px solid #999;}
|
46 |
+
#dup-wiz .active-step a:after {border-left:12px solid #999;}
|
47 |
+
#dup-wiz .active-step span {color:#fff;}
|
48 |
+
|
49 |
+
/*Help */
|
50 |
+
select#dup-hlp-lnk {border-radius:3px; font-size:11px; margin:3px 5px 0 0px; background-color:#efefef; border:1px solid silver}
|
51 |
+
div.dup-help-page {padding:5px 0 0 5px}
|
52 |
+
div.dup-help-page fieldset {margin-bottom:25px}
|
53 |
+
div#dup-main-help h3 {background-color:#dfdfdf; border:1px solid silver; border-radius:5px; padding:3px; margin-bottom:8px}
|
54 |
+
|
55 |
+
div#progress-area {padding:5px; margin:150px 0 0 0px; text-align:center;}
|
56 |
+
div#ajaxerr-data {padding:5px; height:350px; width:99%; border:1px solid silver; border-radius:5px; background-color:#efefef; font-size:12px; overflow-y:scroll}
|
57 |
+
div.title-header {padding:2px; border-bottom:1px solid silver; font-weight:bold; margin-bottom:5px;}
|
58 |
+
div.hdr-main {font-size:18px; padding:0 0 5px 0; border-bottom:1px solid #999; font-weight:bold; margin:5px 0 10px 0;}
|
59 |
+
div.hdr-sub {font-size:14px; padding:2px 2px 2px 0; border-bottom:1px solid #dfdfdf; font-weight:bold; margin-bottom:5px;}
|
60 |
+
|
61 |
+
/*BOXES:Expandable sections */
|
62 |
+
div.dup-box {padding:0px; display:block; background-color:#fff; border:1px solid #e5e5e5; box-shadow:0 1px 1px rgba(0,0,0,.04);}
|
63 |
+
div.dup-box-title {font-size:14px; padding:5px 0 0 10px; font-weight:bold; cursor:pointer; height:23px; margin:0px; background-color:#F9F9F9}
|
64 |
+
div.dup-box-title:hover {background-color:#efefef;}
|
65 |
+
div.dup-box-arrow {text-decoration:none!important; float:right; width:27px; height:30px; font-size:16px; cursor:pointer; padding:1px 0 0 0px; white-space:nowrap}
|
66 |
+
div.dup-box-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0px; background-color:#F9F9F9; box-shadow:0 8px 6px -6px #999;}
|
67 |
+
|
68 |
+
/* ============================
|
69 |
+
STEP 1 VIEW */
|
70 |
+
table.s1-opts {width:100%; border:0px;}
|
71 |
+
table.s1-opts td{white-space:nowrap; padding:3px;}
|
72 |
+
table.s1-opts td:first-child{width:125px;}
|
73 |
+
table.s1-opts-dbhost td {padding:0; margin:0}
|
74 |
+
table.s1-advopts td:first-child{width:125px; font-weight:bold}
|
75 |
+
|
76 |
+
i#dup-step1-sys-req-msg {font-weight:normal; display:block; padding:0px 0 0 20px;}
|
77 |
+
div.circle-pass, div.circle-fail {display:block;width:13px;height:13px;border-radius:50px;font-size:20px;color:#fff;line-height:100px;text-align:center;text-decoration:none;box-shadow:1px 1px 2px #000;background:#207D1D;opacity:0.95; display:inline-block;}
|
78 |
+
div.circle-fail {background:#9A0D1D !important;}
|
79 |
+
select#logging {font-size:11px}
|
80 |
+
div.dup-step1-modes {padding:0px 15px 0 0px;}
|
81 |
+
div#dup-step1-dbconn {margin:auto; text-align:center; margin:15px 0 20px 0px}
|
82 |
+
|
83 |
+
input#dup-step1-dbconn-btn {font-size:11px; height:20px; border:1px solid gray; border-radius:3px; cursor:pointer}
|
84 |
+
input#dup-step1-dbport-btn {font-size:11px; height:20px; border:1px solid gray; border-radius:3px; cursor:pointer; width:80px}
|
85 |
+
div.dup-db-test label{display:inline-block; width:150px; font-weight:bold; white-space:nowrap;}
|
86 |
+
div.dup-db-test small{display:block; margin:5px 0 5px 0px; font-style:italic; color:#444}
|
87 |
+
div#dbconn-test-msg {font-size:12px}
|
88 |
+
div#dup-step1-dbconn-status {border:1px solid silver; border-radius:3px; background-color:#f9f9f9; padding:2px 5px; margin-top:10px; height:125px; overflow-y: scroll}
|
89 |
+
|
90 |
+
/*Warning Area and Message */
|
91 |
+
div.dup-step1-gopro {color: black;font-style: italic;margin-top: 11px; text-align:center;margin-top:30px; padding:5px}
|
92 |
+
div#dup-step1-warning {padding:5px;font-size:11px; color:gray; line-height:12px;font-style:italic; overflow-y:scroll; height:75px; border:1px solid #dfdfdf; background-color:#fff; border-radius:3px}
|
93 |
+
div#dup-step1-warning-check {padding:5px; font-size:12px; font-weight:normal; font-style:italic;}
|
94 |
+
div#dup-step1-warning-emptydb {display:none; color:#AF2222; margin:0px 0 0 20px}
|
95 |
+
div#dup-step1-tryagain {padding-top:50px; text-align:center; width:100%; font-size:16px; color:#444; font-weight:bold;}
|
96 |
+
|
97 |
+
/*Dialog*/
|
98 |
+
div#dup-step1-dialog-data {height:90%; font-size:11px; padding:5px; line-height:16px; }
|
99 |
+
td.dup-step1-dialog-data-details {padding:0px 0 0 30px; border-radius:4px; line-height:14px; font-size:11px; display:none}
|
100 |
+
td.dup-step1-dialog-data-details b {width:50px;display:inline-block}
|
101 |
+
.dup-pass {display:inline-block; color:green;}
|
102 |
+
.dup-ok {display:inline-block; color:#5860C7;}
|
103 |
+
.dup-fail {display:inline-block; color:#AF0000;}
|
104 |
+
hr.dup-dots { border:none; border-top:1px dotted silver; height:1px; width:100%;}
|
105 |
+
div.dup-ui-error {padding-top:2px; font-size:14px}
|
106 |
+
div.help {color:#555; font-style:italic; font-size:11px}
|
107 |
+
|
108 |
+
/* ============================
|
109 |
+
STEP 2 VIEW */
|
110 |
+
table.table-inputs-step2{width:100%; border:0px;}
|
111 |
+
table.table-inputs-step2 td{white-space:nowrap; padding:2px;}
|
112 |
+
div#dup-step2-adv-opts {margin-top:5px; }
|
113 |
+
div.dup-step2-allnonelinks {font-size:11px; float:right;}
|
114 |
+
|
115 |
+
/* ============================
|
116 |
+
STEP 3 VIEW */
|
117 |
+
div.s3-final-title {color:#BE2323;}
|
118 |
+
div.s3-connect {font-size:12px; text-align:center; font-style:italic; position:absolute; bottom:10px; padding:10px; width:100%; margin-top:20px}
|
119 |
+
table.s3-report-results,
|
120 |
+
table.s3-report-errs {border-collapse:collapse; border:1px solid #dfdfdf; }
|
121 |
+
table.s3-report-errs td {text-align:center; width:33%}
|
122 |
+
table.s3-report-results th, table.s3-report-errs th {background-color:#efefef; padding:0px; font-size:12px; padding:0px}
|
123 |
+
table.s3-report-results td, table.s3-report-errs td {padding:0px; white-space:nowrap; border:1px solid #dfdfdf; text-align:center; font-size:11px}
|
124 |
+
table.s3-report-results td:first-child {text-align:left; font-weight:bold; padding-left:3px}
|
125 |
+
|
126 |
+
div.s3-err-msg {padding:8px; display:none; border:1px dashed #999; margin:10px 0 20px 0px; border-radius:5px;}
|
127 |
+
div.s3-err-msg div.content{padding:5px; font-size:11px; line-height:17px; max-height:125px; overflow-y:scroll; border:1px solid silver; margin:3px; }
|
128 |
+
div.s3-err-msg div.info-error{padding:7px; background-color:#EAA9AA; border:1px solid silver; border-radius:5px; font-size:12px; line-height:16px }
|
129 |
+
div.s3-err-msg div.info-notice{padding:7px; background-color:#FCFEC5; border:1px solid silver; border-radius:5px; font-size:12px; line-height:16px;}
|
130 |
+
table.s3-final-step {width:100%;}
|
131 |
+
table.s3-final-step td {padding:5px 15px 5px 5px}
|
132 |
+
table.s3-final-step td:first-child {white-space:nowrap; font-weight:bold}
|
133 |
+
div.s3-go-back {border-bottom:1px dotted #dfdfdf; border-top:1px dotted #dfdfdf; margin:auto; text-align:center}
|
134 |
+
div.s3-btns-msg {text-align: center; font-size:10px; color:#777; margin:5px 0 15px 0}
|
135 |
+
a.s3-final-btns {display: block; width:135; padding:5px; line-height: 1.4; background-color:#F1F1F1; border:1px solid silver;
|
136 |
+
color: #000; box-shadow: 5px 5px 5px -5px #949494; text-decoration: none; text-align: center; border-radius: 4px;
|
137 |
+
}
|
138 |
+
a.s3-final-btns:hover {background-color: #dfdfdf;}
|
139 |
+
div.s3-gopro-btn {text-align:center; font-family: 'Oswald', sans-serif; font-size:14px; margin:auto; width:200px}
|
140 |
+
div.s3-gopro-btn a {
|
141 |
+
background: #e2e2e2;
|
142 |
+
background: -moz-linear-gradient(top, #e2e2e2 0%, #dbdbdb 50%, #d1d1d1 51%, #fefefe 100%);
|
143 |
+
background: -webkit-linear-gradient(top, #e2e2e2 0%,#dbdbdb 50%,#d1d1d1 51%,#fefefe 100%);
|
144 |
+
background: linear-gradient(to bottom, #e2e2e2 0%,#dbdbdb 50%,#d1d1d1 51%,#fefefe 100%);
|
145 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#e2e2e2', endColorstr='#fefefe',GradientType=0 );
|
146 |
+
}
|
147 |
+
div.s3-gopro-btn a:hover {
|
148 |
+
background: #ebf1f6;
|
149 |
+
background: -moz-linear-gradient(top, #ebf1f6 0%, #abd3ee 50%, #89c3eb 51%, #d5ebfb 100%);
|
150 |
+
background: -webkit-linear-gradient(top, #ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);
|
151 |
+
background: linear-gradient(to bottom, #ebf1f6 0%,#abd3ee 50%,#89c3eb 51%,#d5ebfb 100%);
|
152 |
+
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ebf1f6', endColorstr='#d5ebfb',GradientType=0 );
|
153 |
+
}
|
154 |
+
|
155 |
+
/* ============================
|
156 |
+
BUTTONS */
|
157 |
+
div.dup-footer-buttons {position:absolute; bottom:20px; padding:10px; width:100%; text-align:right;}
|
158 |
+
div.dup-footer-buttons input, button {
|
159 |
+
color:#000; font-size:12px; border-radius:5px; padding:6px 8px 4px 8px; border:1px solid #999;
|
160 |
+
background-color:#F1F1F1;
|
161 |
+
background-image:-ms-linear-gradient(top, #F9F9F9, #ECECEC);
|
162 |
+
background-image:-moz-linear-gradient(top, #F9F9F9, #ECECEC);
|
163 |
+
background-image:linear-gradient(top, #F9F9F9, #ECECEC);
|
164 |
+
}
|
165 |
+
div.dup-footer-buttons input[disabled=disabled]{background-color:#F4F4F4; color:silver; border:1px solid silver;}
|
166 |
+
div.dup-footer-buttons input, button {cursor:pointer; border:1px solid #000; }
|
167 |
+
|
168 |
+
/*!
|
169 |
+
* password indicator
|
170 |
+
*/
|
171 |
+
.top_testresult{font-weight:bold; font-size:11px; color:#222; padding:1px 1px 1px 4px; margin:4px 0 0 0px; width:495px; dislay:inline-block}
|
172 |
+
.top_testresult span{margin:0;}
|
173 |
+
.top_shortPass{background:#edabab; border:1px solid #bc0000;display:block;}
|
174 |
+
.top_badPass{background:#edabab;border:1px solid #bc0000;display:block;}
|
175 |
+
.top_goodPass{background:#ffffe0; border:1px solid #e6db55; display:block;}
|
176 |
+
.top_strongPass{background:#d3edab; border:1px solid #73bc00; display:block;}
|
177 |
+
|
178 |
+
|
179 |
+
/*================================================
|
180 |
+
PARSLEY:Overrides*/
|
181 |
+
input.parsley-error, textarea.parsley-error, select.parsley-error {
|
182 |
+
color:#B94A48 !important;
|
183 |
+
background-color:#F2DEDE !important;
|
184 |
+
border:1px solid #EED3D7 !important;
|
185 |
+
}
|
186 |
+
ul.parsley-errors-list {margin:1px 0 0 -40px; list-style-type:none; font-size:10px}
|
187 |
</style>
|
installer/build/main.installer.php
CHANGED
@@ -1,6 +1,6 @@
|
|
1 |
<?php
|
2 |
/*
|
3 |
-
Copyright 2011-
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
1 |
<?php
|
2 |
/*
|
3 |
+
Copyright 2011-16 lifeinthegrid.com
|
4 |
|
5 |
This program is free software; you can redistribute it and/or modify
|
6 |
it under the terms of the GNU General Public License, version 2, as
|
installer/build/view.step1.php
CHANGED
@@ -1,505 +1,508 @@
|
|
1 |
-
<?php
|
2 |
-
// Exit if accessed directly
|
3 |
-
if (! defined('DUPLICATOR_INIT')) {
|
4 |
-
$_baseURL = strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
|
5 |
-
$_baseURL = "http://" . $_baseURL;
|
6 |
-
header("HTTP/1.1 301 Moved Permanently");
|
7 |
-
header("Location: $_baseURL");
|
8 |
-
exit;
|
9 |
-
}
|
10 |
-
//DETECT ARCHIVE FILES
|
11 |
-
$zip_files = DupUtil::get_zip_files();
|
12 |
-
$zip_count = count($zip_files);
|
13 |
-
|
14 |
-
if ($zip_count > 1) {
|
15 |
-
$zip_name = "Too many zip files in directory";
|
16 |
-
} else if ($zip_count == 1) {
|
17 |
-
$zip_name = $zip_files[0];
|
18 |
-
} else {
|
19 |
-
$zip_name = "No package file found";
|
20 |
-
}
|
21 |
-
|
22 |
-
$req01a = @is_writeable($GLOBALS["CURRENT_ROOT_PATH"]) ? 'Pass' : 'Fail';
|
23 |
-
if (is_dir($GLOBALS["CURRENT_ROOT_PATH"])) {
|
24 |
-
if ($dh = @opendir($GLOBALS["CURRENT_ROOT_PATH"])) {
|
25 |
-
closedir($dh);
|
26 |
-
} else {
|
27 |
-
$req01a = 'Fail';
|
28 |
-
}
|
29 |
-
}
|
30 |
-
$req01b = ($zip_count == 1) ? 'Pass' : 'Fail';
|
31 |
-
$req01 = ($req01a == 'Pass' && $req01b == 'Pass') ? 'Pass' : 'Fail';
|
32 |
-
$safe_ini = strtolower(@ini_get('safe_mode'));
|
33 |
-
$req02 = $safe_ini != 'on' || $safe_ini != 'yes' || $safe_ini != 'true' || ini_get("safe_mode") != 1 ? 'Pass' : 'Fail';
|
34 |
-
$req03 = function_exists('mysqli_connect') ? 'Pass' : 'Fail';
|
35 |
-
$php_compare = version_compare(phpversion(), '5.2.9');
|
36 |
-
$req04 = $php_compare >= 0 ? 'Pass' : 'Fail';
|
37 |
-
$total_req = ($req01 == 'Pass' && $req02 == 'Pass' && $req03 == 'Pass' && $req04 == 'Pass') ? 'Pass' : 'Fail';
|
38 |
-
?>
|
39 |
-
|
40 |
-
<script type="text/javascript">
|
41 |
-
/** **********************************************
|
42 |
-
* METHOD: Performs Ajax post to extract files and create db
|
43 |
-
* Timeout (10000000 = 166 minutes) */
|
44 |
-
Duplicator.runDeployment = function() {
|
45 |
-
|
46 |
-
var $form = $('#dup-step1-input-form');
|
47 |
-
$form.parsley().validate();
|
48 |
-
if (!$form.parsley().isValid()) {
|
49 |
-
return;
|
50 |
-
}
|
51 |
-
|
52 |
-
|
53 |
-
var msg = "Continue installation with the following settings?\n\n";
|
54 |
-
msg += "Server: " + $("#dbhost").val() + "\nDatabase: " + $("#dbname").val() + "\n\n";
|
55 |
-
msg += "WARNING: Be sure these database parameters are correct!\n";
|
56 |
-
msg += "Entering the wrong information WILL overwrite an existing database.\n";
|
57 |
-
msg += "Make sure to have backups of all your data before proceeding.\n\n";
|
58 |
-
|
59 |
-
var answer = confirm(msg);
|
60 |
-
if (answer) {
|
61 |
-
$.ajax({
|
62 |
-
type: "POST",
|
63 |
-
timeout: 10000000,
|
64 |
-
dataType: "json",
|
65 |
-
url: window.location.href,
|
66 |
-
data: $form.serialize(),
|
67 |
-
beforeSend: function() {
|
68 |
-
Duplicator.showProgressBar();
|
69 |
-
$form.hide();
|
70 |
-
$('#dup-step1-result-form').show();
|
71 |
-
},
|
72 |
-
success: function(data, textStatus, xhr){
|
73 |
-
if (typeof(data) != 'undefined' && data.pass == 1) {
|
74 |
-
$("#ajax-dbhost").val($("#dbhost").val());
|
75 |
-
$("#ajax-dbport").val($("#dbport").val());
|
76 |
-
$("#ajax-dbuser").val($("#dbuser").val());
|
77 |
-
$("#ajax-dbpass").val($("#dbpass").val());
|
78 |
-
$("#ajax-dbname").val($("#dbname").val());
|
79 |
-
$("#ajax-dbcharset").val($("#dbcharset").val());
|
80 |
-
$("#ajax-dbcollate").val($("#dbcollate").val());
|
81 |
-
$("#ajax-logging").val($("input:radio[name=logging]:checked").val());
|
82 |
-
$("#ajax-json").val(escape(JSON.stringify(data)));
|
83 |
-
setTimeout(function() {$('#dup-step1-result-form').submit();}, 1000);
|
84 |
-
$('#progress-area').fadeOut(700);
|
85 |
-
} else {
|
86 |
-
Duplicator.hideProgressBar();
|
87 |
-
}
|
88 |
-
},
|
89 |
-
error: function(xhr) {
|
90 |
-
var status = "<b>server code:</b> " + xhr.status + "<br/><b>status:</b> " + xhr.statusText + "<br/><b>response:</b> " + xhr.responseText;
|
91 |
-
$('#ajaxerr-data').html(status);
|
92 |
-
Duplicator.hideProgressBar();
|
93 |
-
}
|
94 |
-
});
|
95 |
-
}
|
96 |
-
};
|
97 |
-
|
98 |
-
/** **********************************************
|
99 |
-
* METHOD: Accetps Useage Warning */
|
100 |
-
Duplicator.acceptWarning = function() {
|
101 |
-
if ($("#accept-warnings").is(':checked')) {
|
102 |
-
$("#dup-step1-deploy-btn").removeAttr("disabled");
|
103 |
-
} else {
|
104 |
-
$("#dup-step1-deploy-btn").attr("disabled", "true");
|
105 |
-
}
|
106 |
-
};
|
107 |
-
|
108 |
-
/** **********************************************
|
109 |
-
* METHOD: Go back on AJAX result view */
|
110 |
-
Duplicator.hideErrorResult = function() {
|
111 |
-
$('#dup-step1-result-form').hide();
|
112 |
-
$('#dup-step1-input-form').show(200);
|
113 |
-
};
|
114 |
-
|
115 |
-
/** **********************************************
|
116 |
-
* METHOD: Shows results of database connection
|
117 |
-
* Timeout (45000 = 45 secs) */
|
118 |
-
Duplicator.dlgTestDB = function () {
|
119 |
-
$.ajax({
|
120 |
-
type: "POST",
|
121 |
-
timeout: 45000,
|
122 |
-
url: window.location.href + '?' + 'dbtest=1',
|
123 |
-
data: $('#dup-step1-input-form').serialize(),
|
124 |
-
success: function(data){ $('#dbconn-test-msg').html(data); },
|
125 |
-
error: function(data){ alert('An error occurred while testing the database connection! Contact your server admin to make sure the connection inputs are correct!'); }
|
126 |
-
});
|
127 |
-
|
128 |
-
$('#dbconn-test-msg').html("Attempting Connection. Please wait...");
|
129 |
-
$("#dup-step1-dbconn-status").show(500);
|
130 |
-
|
131 |
-
};
|
132 |
-
|
133 |
-
Duplicator.showDeleteWarning = function () {
|
134 |
-
($('#dbaction-empty').prop('checked'))
|
135 |
-
? $('#dup-step1-warning-emptydb').show(300)
|
136 |
-
: $('#dup-step1-warning-emptydb').hide(300);
|
137 |
-
};
|
138 |
-
|
139 |
-
Duplicator.togglePort = function () {
|
140 |
-
|
141 |
-
$('#dup-step1-dbport-btn').hide();
|
142 |
-
$('#dbport').show();
|
143 |
-
}
|
144 |
-
|
145 |
-
|
146 |
-
//DOCUMENT LOAD
|
147 |
-
$(document).ready(function() {
|
148 |
-
$('#dup-step1-dialog-data').appendTo('#dup-step1-result-container');
|
149 |
-
$( "input[name='dbaction']").click(Duplicator.showDeleteWarning);
|
150 |
-
Duplicator.acceptWarning();
|
151 |
-
Duplicator.showDeleteWarning();
|
152 |
-
});
|
153 |
-
</script>
|
154 |
-
|
155 |
-
|
156 |
-
<!-- =========================================
|
157 |
-
VIEW: STEP 1- INPUT -->
|
158 |
-
<form id='dup-step1-input-form' method="post" class="content-form" data-parsley-validate="true" data-parsley-excluded="input[type=hidden], [disabled], :hidden">
|
159 |
-
<input type="hidden" name="action_ajax" value="1" />
|
160 |
-
<input type="hidden" name="action_step" value="1" />
|
161 |
-
<input type="hidden" name="package_name" value="<?php echo $zip_name ?>" />
|
162 |
-
|
163 |
-
<!--div class="dup-logfile-link">
|
164 |
-
<select name="logging" id="logging">
|
165 |
-
<option value="1" selected="selected">Light Logging</option>
|
166 |
-
<option value="2">Detailed Logging</option>
|
167 |
-
</select>
|
168 |
-
</div-->
|
169 |
-
<div class="hdr-main">
|
170 |
-
Step 1: Deploy Files & Database
|
171 |
-
</div>
|
172 |
-
|
173 |
-
<!-- CHECKS: FAIL -->
|
174 |
-
<?php if ( $total_req == 'Fail') : ?>
|
175 |
-
|
176 |
-
<div class="dup-box">
|
177 |
-
<div class="dup-box-title">
|
178 |
-
<div id="system-circle" class="circle-fail"></div> Requirements: Fail
|
179 |
-
<div class="dup-box-arrow"></div>
|
180 |
-
</div>
|
181 |
-
<div class="dup-box-panel" style="display:none">
|
182 |
-
<div id="dup-step1-result-container"></div>
|
183 |
-
</div>
|
184 |
-
</div><br/>
|
185 |
-
|
186 |
-
<i id="dup-step1-sys-req-msg">
|
187 |
-
This installation will not be able to proceed until the system requirements pass. Please validate your system requirements by clicking on the button above.
|
188 |
-
In order to get these values to pass please contact your server administrator, hosting provider or visit the online FAQ.
|
189 |
-
</i><br/>
|
190 |
-
|
191 |
-
<div style="line-height:28px; font-size:14px; padding:0px 0px 0px 30px; font-weight:normal">
|
192 |
-
<b>Helpful Resources:</b><br/>
|
193 |
-
» <a href="http://lifeinthegrid.com/duplicator-faq" target="_blank">Common FAQs</a> <br/>
|
194 |
-
» <a href="http://lifeinthegrid.com/duplicator-guide" target="_blank">User Guide</a> <br/>
|
195 |
-
» <a href="http://lifeinthegrid.com/duplicator-hosts" target="_blank">Approved Hosts</a> <br/>
|
196 |
-
</div><br/>
|
197 |
-
|
198 |
-
<!-- CHECKS: PASS -->
|
199 |
-
<?php else : ?>
|
200 |
-
|
201 |
-
|
202 |
-
<div class="dup-box">
|
203 |
-
<div class="dup-box-title">
|
204 |
-
<div id="system-circle" class="circle-pass"></div> Requirements: Pass
|
205 |
-
<div class="dup-box-arrow"></div>
|
206 |
-
</div>
|
207 |
-
<div class="dup-box-panel" style="display:none">
|
208 |
-
<div id="dup-step1-result-container"></div>
|
209 |
-
</div>
|
210 |
-
</div><br/>
|
211 |
-
|
212 |
-
<div class="title-header">
|
213 |
-
MySQL Database
|
214 |
-
</div>
|
215 |
-
<table class="s1-opts">
|
216 |
-
<tr>
|
217 |
-
<td>Action</td>
|
218 |
-
<td>
|
219 |
-
<div class="dup-step1-modes">
|
220 |
-
<input type="radio" name="dbaction" id="dbaction-create" value="create" checked="checked" />
|
221 |
-
<label for="dbaction-create">Create New Database</label>
|
222 |
-
</div>
|
223 |
-
<div class="dup-step1-modes">
|
224 |
-
<input type="radio" name="dbaction" id="dbaction-empty" value="empty" />
|
225 |
-
<label for="dbaction-empty">Connect and Remove All Data</label>
|
226 |
-
</div>
|
227 |
-
</td>
|
228 |
-
</tr>
|
229 |
-
<tr>
|
230 |
-
<td>Host</td>
|
231 |
-
<td>
|
232 |
-
<table class="s1-opts-dbhost">
|
233 |
-
<tr>
|
234 |
-
<td><input type="text" name="dbhost" id="dbhost" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBHOST']); ?>" placeholder="localhost" style="width:410px" /></td>
|
235 |
-
<td style="vertical-align:top">
|
236 |
-
<input id="dup-step1-dbport-btn" type="button" onclick="Duplicator.togglePort()" style="" value="Port: <?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
|
237 |
-
<input name="dbport" id="dbport" type="text" style="width:80px; display:none" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
|
238 |
-
</td>
|
239 |
-
</tr>
|
240 |
-
</table>
|
241 |
-
</td>
|
242 |
-
</tr>
|
243 |
-
<tr>
|
244 |
-
<td>Name</td>
|
245 |
-
<td><input type="text" name="dbname" id="dbname" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBNAME']); ?>" placeholder="new or existing database name" /></td>
|
246 |
-
</tr>
|
247 |
-
<tr>
|
248 |
-
<td>User</td>
|
249 |
-
<td><input type="text" name="dbuser" id="dbuser" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBUSER']); ?>" placeholder="valid database username" /></td>
|
250 |
-
</tr>
|
251 |
-
<tr>
|
252 |
-
<td>Password</td>
|
253 |
-
<td><input type="text" name="dbpass" id="dbpass" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPASS']); ?>" placeholder="valid database user password" /></td>
|
254 |
-
</tr>
|
255 |
-
</table>
|
256 |
-
|
257 |
-
|
258 |
-
<!-- =========================================
|
259 |
-
DIALOG: DB CONNECTION CHECK -->
|
260 |
-
<div id="dup-step1-dbconn">
|
261 |
-
<input id="dup-step1-dbconn-btn" type="button" onclick="Duplicator.dlgTestDB()" style="" value="Test Connection" />
|
262 |
-
<div id="dup-step1-dbconn-status" style="display:none">
|
263 |
-
<div style="padding: 0px 10px 10px 10px;">
|
264 |
-
<div id="dbconn-test-msg" style="min-height:80px"></div>
|
265 |
-
</div>
|
266 |
-
<small><a href="javascript:void()" onclick="$('#dup-step1-dbconn-status').hide(1000)">Hide Connection Details</a></small>
|
267 |
-
</div>
|
268 |
-
</div>
|
269 |
-
|
270 |
-
<!-- !!DO NOT CHANGE/EDIT OR REMOVE THIS SECTION!!
|
271 |
-
If your interested in Private Label Rights please contact us at the URL below to discuss
|
272 |
-
customizations to product labeling: http://lifeinthegrid.com -->
|
273 |
-
<a href="javascript:void(0)" onclick="$('#dup-step1-cpanel').toggle(250)"><b>Need Setup Help...</b></a>
|
274 |
-
<div id='dup-step1-cpanel' style="display:none">
|
275 |
-
<div style="padding:10px 0px 0px 10px;line-height:22px">
|
276 |
-
» Check out the <a href="http://lifeinthegrid.com/duplicator-tutorials" target="_blank">video tutorials & guides</a> <br/>
|
277 |
-
» Get help from our <a href="http://lifeinthegrid.com/labs/duplicator/resources/" target="_blank">resources page</a>
|
278 |
-
</div>
|
279 |
-
</div><br/><br/>
|
280 |
-
|
281 |
-
<a href="javascript:void(0)" onclick="$('#dup-step1-adv-opts').toggle(250)"><b>Advanced Options...</b></a>
|
282 |
-
<div id='dup-step1-adv-opts' style="display:none">
|
283 |
-
<table class="s1-opts">
|
284 |
-
<tr><td><input type="checkbox" name="zip_manual" id="zip_manual" value="1" /> <label for="zip_manual">Manual package extraction</label></td></tr>
|
285 |
-
<tr><td><input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label></td></tr>
|
286 |
-
</table>
|
287 |
-
|
288 |
-
|
289 |
-
<table class="s1-opts s1-advopts">
|
290 |
-
<tr>
|
291 |
-
<td>Logging</td>
|
292 |
-
<td colspan="2">
|
293 |
-
<input type="radio" name="logging" id="logging-light" value="1" checked="true"> <label for="logging-light">Light</label>
|
294 |
-
<input type="radio" name="logging" id="logging-detailed" value="2"> <label for="logging-detailed">Detailed</label>
|
295 |
-
<input type="radio" name="logging" id="logging-debug" value="3"> <label for="logging-debug">Debug</label>
|
296 |
-
</td>
|
297 |
-
</tr>
|
298 |
-
<tr>
|
299 |
-
<td>Config Cache</td>
|
300 |
-
<td style="width:125px"><input type="checkbox" name="cache_wp" id="cache_wp" <?php echo ($GLOBALS['FW_CACHE_WP']) ? "checked='checked'" : ""; ?> /> <label for="cache_wp">Keep Enabled</label></td>
|
301 |
-
<td><input type="checkbox" name="cache_path" id="cache_path" <?php echo ($GLOBALS['FW_CACHE_PATH']) ? "checked='checked'" : ""; ?> /> <label for="cache_path">Keep Home Path</label></td>
|
302 |
-
</tr>
|
303 |
-
<tr>
|
304 |
-
<td>Config SSL</td>
|
305 |
-
<td><input type="checkbox" name="ssl_admin" id="ssl_admin" <?php echo ($GLOBALS['FW_SSL_ADMIN']) ? "checked='checked'" : ""; ?> /> <label for="ssl_admin">Enforce on Admin</label></td>
|
306 |
-
<td><input type="checkbox" name="ssl_login" id="ssl_login" <?php echo ($GLOBALS['FW_SSL_LOGIN']) ? "checked='checked'" : ""; ?> /> <label for="ssl_login">Enforce on Login</label></td>
|
307 |
-
</tr>
|
308 |
-
</table>
|
309 |
-
|
310 |
-
<table class="s1-opts s1-advopts">
|
311 |
-
<tr><td style="width:130px">MySQL Charset</td><td><input type="text" name="dbcharset" id="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" /> </td></tr>
|
312 |
-
<tr><td>MySQL Collation </td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
|
313 |
-
</table>
|
314 |
-
<small><i>For an overview of these settings see the <a href="?help=1" target="_blank">help page</a></i></small><br/>
|
315 |
-
|
316 |
-
</div>
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
database
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
Manual
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
</
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
<input type="hidden" name="
|
374 |
-
<input type="hidden" name="
|
375 |
-
<input type="hidden" name="
|
376 |
-
<input type="hidden" name="
|
377 |
-
<input type="hidden" name="
|
378 |
-
<input type="hidden" name="
|
379 |
-
<input type="hidden" name="
|
380 |
-
<input type="hidden" name="
|
381 |
-
|
382 |
-
|
383 |
-
<
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
</
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
<b>
|
420 |
-
|
421 |
-
|
422 |
-
<
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
<td
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
</
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
<td
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
<td
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
<?php
|
464 |
-
<td><b>Web Server:</b>
|
465 |
-
<td><div class='dup-
|
466 |
-
<?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], '
|
467 |
-
<td><b>Web Server:</b>
|
468 |
-
<td><div class='dup-ok'>OK</div></td>
|
469 |
-
<?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], '
|
470 |
-
<td><b>Web Server:</b>
|
471 |
-
<td><div class='dup-ok'>OK</div></td>
|
472 |
-
<?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], '
|
473 |
-
<td><b>Web Server:</b>
|
474 |
-
<td><div class='dup-ok'>OK</div></td>
|
475 |
-
<?php
|
476 |
-
<td><b>Web Server:</b>
|
477 |
-
<td><div class='dup-
|
478 |
-
<?php
|
479 |
-
|
480 |
-
|
481 |
-
<?php
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
<td><b>Open Base Dir:</b>
|
489 |
-
<td><div class='dup-
|
490 |
-
<?php
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
<
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
</
|
503 |
-
|
504 |
-
|
505 |
-
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
// Exit if accessed directly
|
3 |
+
if (! defined('DUPLICATOR_INIT')) {
|
4 |
+
$_baseURL = strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
|
5 |
+
$_baseURL = "http://" . $_baseURL;
|
6 |
+
header("HTTP/1.1 301 Moved Permanently");
|
7 |
+
header("Location: $_baseURL");
|
8 |
+
exit;
|
9 |
+
}
|
10 |
+
//DETECT ARCHIVE FILES
|
11 |
+
$zip_files = DupUtil::get_zip_files();
|
12 |
+
$zip_count = count($zip_files);
|
13 |
+
|
14 |
+
if ($zip_count > 1) {
|
15 |
+
$zip_name = "Too many zip files in directory";
|
16 |
+
} else if ($zip_count == 1) {
|
17 |
+
$zip_name = $zip_files[0];
|
18 |
+
} else {
|
19 |
+
$zip_name = "No package file found";
|
20 |
+
}
|
21 |
+
|
22 |
+
$req01a = @is_writeable($GLOBALS["CURRENT_ROOT_PATH"]) ? 'Pass' : 'Fail';
|
23 |
+
if (is_dir($GLOBALS["CURRENT_ROOT_PATH"])) {
|
24 |
+
if ($dh = @opendir($GLOBALS["CURRENT_ROOT_PATH"])) {
|
25 |
+
closedir($dh);
|
26 |
+
} else {
|
27 |
+
$req01a = 'Fail';
|
28 |
+
}
|
29 |
+
}
|
30 |
+
$req01b = ($zip_count == 1) ? 'Pass' : 'Fail';
|
31 |
+
$req01 = ($req01a == 'Pass' && $req01b == 'Pass') ? 'Pass' : 'Fail';
|
32 |
+
$safe_ini = strtolower(@ini_get('safe_mode'));
|
33 |
+
$req02 = $safe_ini != 'on' || $safe_ini != 'yes' || $safe_ini != 'true' || ini_get("safe_mode") != 1 ? 'Pass' : 'Fail';
|
34 |
+
$req03 = function_exists('mysqli_connect') ? 'Pass' : 'Fail';
|
35 |
+
$php_compare = version_compare(phpversion(), '5.2.9');
|
36 |
+
$req04 = $php_compare >= 0 ? 'Pass' : 'Fail';
|
37 |
+
$total_req = ($req01 == 'Pass' && $req02 == 'Pass' && $req03 == 'Pass' && $req04 == 'Pass') ? 'Pass' : 'Fail';
|
38 |
+
?>
|
39 |
+
|
40 |
+
<script type="text/javascript">
|
41 |
+
/** **********************************************
|
42 |
+
* METHOD: Performs Ajax post to extract files and create db
|
43 |
+
* Timeout (10000000 = 166 minutes) */
|
44 |
+
Duplicator.runDeployment = function() {
|
45 |
+
|
46 |
+
var $form = $('#dup-step1-input-form');
|
47 |
+
$form.parsley().validate();
|
48 |
+
if (!$form.parsley().isValid()) {
|
49 |
+
return;
|
50 |
+
}
|
51 |
+
|
52 |
+
|
53 |
+
var msg = "Continue installation with the following settings?\n\n";
|
54 |
+
msg += "Server: " + $("#dbhost").val() + "\nDatabase: " + $("#dbname").val() + "\n\n";
|
55 |
+
msg += "WARNING: Be sure these database parameters are correct!\n";
|
56 |
+
msg += "Entering the wrong information WILL overwrite an existing database.\n";
|
57 |
+
msg += "Make sure to have backups of all your data before proceeding.\n\n";
|
58 |
+
|
59 |
+
var answer = confirm(msg);
|
60 |
+
if (answer) {
|
61 |
+
$.ajax({
|
62 |
+
type: "POST",
|
63 |
+
timeout: 10000000,
|
64 |
+
dataType: "json",
|
65 |
+
url: window.location.href,
|
66 |
+
data: $form.serialize(),
|
67 |
+
beforeSend: function() {
|
68 |
+
Duplicator.showProgressBar();
|
69 |
+
$form.hide();
|
70 |
+
$('#dup-step1-result-form').show();
|
71 |
+
},
|
72 |
+
success: function(data, textStatus, xhr){
|
73 |
+
if (typeof(data) != 'undefined' && data.pass == 1) {
|
74 |
+
$("#ajax-dbhost").val($("#dbhost").val());
|
75 |
+
$("#ajax-dbport").val($("#dbport").val());
|
76 |
+
$("#ajax-dbuser").val($("#dbuser").val());
|
77 |
+
$("#ajax-dbpass").val($("#dbpass").val());
|
78 |
+
$("#ajax-dbname").val($("#dbname").val());
|
79 |
+
$("#ajax-dbcharset").val($("#dbcharset").val());
|
80 |
+
$("#ajax-dbcollate").val($("#dbcollate").val());
|
81 |
+
$("#ajax-logging").val($("input:radio[name=logging]:checked").val());
|
82 |
+
$("#ajax-json").val(escape(JSON.stringify(data)));
|
83 |
+
setTimeout(function() {$('#dup-step1-result-form').submit();}, 1000);
|
84 |
+
$('#progress-area').fadeOut(700);
|
85 |
+
} else {
|
86 |
+
Duplicator.hideProgressBar();
|
87 |
+
}
|
88 |
+
},
|
89 |
+
error: function(xhr) {
|
90 |
+
var status = "<b>server code:</b> " + xhr.status + "<br/><b>status:</b> " + xhr.statusText + "<br/><b>response:</b> " + xhr.responseText;
|
91 |
+
$('#ajaxerr-data').html(status);
|
92 |
+
Duplicator.hideProgressBar();
|
93 |
+
}
|
94 |
+
});
|
95 |
+
}
|
96 |
+
};
|
97 |
+
|
98 |
+
/** **********************************************
|
99 |
+
* METHOD: Accetps Useage Warning */
|
100 |
+
Duplicator.acceptWarning = function() {
|
101 |
+
if ($("#accept-warnings").is(':checked')) {
|
102 |
+
$("#dup-step1-deploy-btn").removeAttr("disabled");
|
103 |
+
} else {
|
104 |
+
$("#dup-step1-deploy-btn").attr("disabled", "true");
|
105 |
+
}
|
106 |
+
};
|
107 |
+
|
108 |
+
/** **********************************************
|
109 |
+
* METHOD: Go back on AJAX result view */
|
110 |
+
Duplicator.hideErrorResult = function() {
|
111 |
+
$('#dup-step1-result-form').hide();
|
112 |
+
$('#dup-step1-input-form').show(200);
|
113 |
+
};
|
114 |
+
|
115 |
+
/** **********************************************
|
116 |
+
* METHOD: Shows results of database connection
|
117 |
+
* Timeout (45000 = 45 secs) */
|
118 |
+
Duplicator.dlgTestDB = function () {
|
119 |
+
$.ajax({
|
120 |
+
type: "POST",
|
121 |
+
timeout: 45000,
|
122 |
+
url: window.location.href + '?' + 'dbtest=1',
|
123 |
+
data: $('#dup-step1-input-form').serialize(),
|
124 |
+
success: function(data){ $('#dbconn-test-msg').html(data); },
|
125 |
+
error: function(data){ alert('An error occurred while testing the database connection! Contact your server admin to make sure the connection inputs are correct!'); }
|
126 |
+
});
|
127 |
+
|
128 |
+
$('#dbconn-test-msg').html("Attempting Connection. Please wait...");
|
129 |
+
$("#dup-step1-dbconn-status").show(500);
|
130 |
+
|
131 |
+
};
|
132 |
+
|
133 |
+
Duplicator.showDeleteWarning = function () {
|
134 |
+
($('#dbaction-empty').prop('checked'))
|
135 |
+
? $('#dup-step1-warning-emptydb').show(300)
|
136 |
+
: $('#dup-step1-warning-emptydb').hide(300);
|
137 |
+
};
|
138 |
+
|
139 |
+
Duplicator.togglePort = function () {
|
140 |
+
|
141 |
+
$('#dup-step1-dbport-btn').hide();
|
142 |
+
$('#dbport').show();
|
143 |
+
}
|
144 |
+
|
145 |
+
|
146 |
+
//DOCUMENT LOAD
|
147 |
+
$(document).ready(function() {
|
148 |
+
$('#dup-step1-dialog-data').appendTo('#dup-step1-result-container');
|
149 |
+
$( "input[name='dbaction']").click(Duplicator.showDeleteWarning);
|
150 |
+
Duplicator.acceptWarning();
|
151 |
+
Duplicator.showDeleteWarning();
|
152 |
+
});
|
153 |
+
</script>
|
154 |
+
|
155 |
+
|
156 |
+
<!-- =========================================
|
157 |
+
VIEW: STEP 1- INPUT -->
|
158 |
+
<form id='dup-step1-input-form' method="post" class="content-form" data-parsley-validate="true" data-parsley-excluded="input[type=hidden], [disabled], :hidden">
|
159 |
+
<input type="hidden" name="action_ajax" value="1" />
|
160 |
+
<input type="hidden" name="action_step" value="1" />
|
161 |
+
<input type="hidden" name="package_name" value="<?php echo $zip_name ?>" />
|
162 |
+
|
163 |
+
<!--div class="dup-logfile-link">
|
164 |
+
<select name="logging" id="logging">
|
165 |
+
<option value="1" selected="selected">Light Logging</option>
|
166 |
+
<option value="2">Detailed Logging</option>
|
167 |
+
</select>
|
168 |
+
</div-->
|
169 |
+
<div class="hdr-main">
|
170 |
+
Step 1: Deploy Files & Database
|
171 |
+
</div>
|
172 |
+
|
173 |
+
<!-- CHECKS: FAIL -->
|
174 |
+
<?php if ( $total_req == 'Fail') : ?>
|
175 |
+
|
176 |
+
<div class="dup-box">
|
177 |
+
<div class="dup-box-title">
|
178 |
+
<div id="system-circle" class="circle-fail"></div> Requirements: Fail
|
179 |
+
<div class="dup-box-arrow"></div>
|
180 |
+
</div>
|
181 |
+
<div class="dup-box-panel" style="display:none">
|
182 |
+
<div id="dup-step1-result-container"></div>
|
183 |
+
</div>
|
184 |
+
</div><br/>
|
185 |
+
|
186 |
+
<i id="dup-step1-sys-req-msg">
|
187 |
+
This installation will not be able to proceed until the system requirements pass. Please validate your system requirements by clicking on the button above.
|
188 |
+
In order to get these values to pass please contact your server administrator, hosting provider or visit the online FAQ.
|
189 |
+
</i><br/>
|
190 |
+
|
191 |
+
<div style="line-height:28px; font-size:14px; padding:0px 0px 0px 30px; font-weight:normal">
|
192 |
+
<b>Helpful Resources:</b><br/>
|
193 |
+
» <a href="http://lifeinthegrid.com/duplicator-faq" target="_blank">Common FAQs</a> <br/>
|
194 |
+
» <a href="http://lifeinthegrid.com/duplicator-guide" target="_blank">User Guide</a> <br/>
|
195 |
+
» <a href="http://lifeinthegrid.com/duplicator-hosts" target="_blank">Approved Hosts</a> <br/>
|
196 |
+
</div><br/>
|
197 |
+
|
198 |
+
<!-- CHECKS: PASS -->
|
199 |
+
<?php else : ?>
|
200 |
+
|
201 |
+
|
202 |
+
<div class="dup-box">
|
203 |
+
<div class="dup-box-title">
|
204 |
+
<div id="system-circle" class="circle-pass"></div> Requirements: Pass
|
205 |
+
<div class="dup-box-arrow"></div>
|
206 |
+
</div>
|
207 |
+
<div class="dup-box-panel" style="display:none">
|
208 |
+
<div id="dup-step1-result-container"></div>
|
209 |
+
</div>
|
210 |
+
</div><br/>
|
211 |
+
|
212 |
+
<div class="title-header">
|
213 |
+
MySQL Database
|
214 |
+
</div>
|
215 |
+
<table class="s1-opts">
|
216 |
+
<tr>
|
217 |
+
<td>Action</td>
|
218 |
+
<td>
|
219 |
+
<div class="dup-step1-modes">
|
220 |
+
<input type="radio" name="dbaction" id="dbaction-create" value="create" checked="checked" />
|
221 |
+
<label for="dbaction-create">Create New Database</label>
|
222 |
+
</div>
|
223 |
+
<div class="dup-step1-modes">
|
224 |
+
<input type="radio" name="dbaction" id="dbaction-empty" value="empty" />
|
225 |
+
<label for="dbaction-empty">Connect and Remove All Data</label>
|
226 |
+
</div>
|
227 |
+
</td>
|
228 |
+
</tr>
|
229 |
+
<tr>
|
230 |
+
<td>Host</td>
|
231 |
+
<td>
|
232 |
+
<table class="s1-opts-dbhost">
|
233 |
+
<tr>
|
234 |
+
<td><input type="text" name="dbhost" id="dbhost" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBHOST']); ?>" placeholder="localhost" style="width:410px" /></td>
|
235 |
+
<td style="vertical-align:top">
|
236 |
+
<input id="dup-step1-dbport-btn" type="button" onclick="Duplicator.togglePort()" style="" value="Port: <?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
|
237 |
+
<input name="dbport" id="dbport" type="text" style="width:80px; display:none" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
|
238 |
+
</td>
|
239 |
+
</tr>
|
240 |
+
</table>
|
241 |
+
</td>
|
242 |
+
</tr>
|
243 |
+
<tr>
|
244 |
+
<td>Name</td>
|
245 |
+
<td><input type="text" name="dbname" id="dbname" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBNAME']); ?>" placeholder="new or existing database name" /></td>
|
246 |
+
</tr>
|
247 |
+
<tr>
|
248 |
+
<td>User</td>
|
249 |
+
<td><input type="text" name="dbuser" id="dbuser" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBUSER']); ?>" placeholder="valid database username" /></td>
|
250 |
+
</tr>
|
251 |
+
<tr>
|
252 |
+
<td>Password</td>
|
253 |
+
<td><input type="text" name="dbpass" id="dbpass" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPASS']); ?>" placeholder="valid database user password" /></td>
|
254 |
+
</tr>
|
255 |
+
</table>
|
256 |
+
|
257 |
+
|
258 |
+
<!-- =========================================
|
259 |
+
DIALOG: DB CONNECTION CHECK -->
|
260 |
+
<div id="dup-step1-dbconn">
|
261 |
+
<input id="dup-step1-dbconn-btn" type="button" onclick="Duplicator.dlgTestDB()" style="" value="Test Connection" />
|
262 |
+
<div id="dup-step1-dbconn-status" style="display:none">
|
263 |
+
<div style="padding: 0px 10px 10px 10px;">
|
264 |
+
<div id="dbconn-test-msg" style="min-height:80px"></div>
|
265 |
+
</div>
|
266 |
+
<small><a href="javascript:void()" onclick="$('#dup-step1-dbconn-status').hide(1000)">Hide Connection Details</a></small>
|
267 |
+
</div>
|
268 |
+
</div>
|
269 |
+
|
270 |
+
<!-- !!DO NOT CHANGE/EDIT OR REMOVE THIS SECTION!!
|
271 |
+
If your interested in Private Label Rights please contact us at the URL below to discuss
|
272 |
+
customizations to product labeling: http://lifeinthegrid.com -->
|
273 |
+
<a href="javascript:void(0)" onclick="$('#dup-step1-cpanel').toggle(250)"><b>Need Setup Help...</b></a>
|
274 |
+
<div id='dup-step1-cpanel' style="display:none">
|
275 |
+
<div style="padding:10px 0px 0px 10px;line-height:22px">
|
276 |
+
» Check out the <a href="http://lifeinthegrid.com/duplicator-tutorials" target="_blank">video tutorials & guides</a> <br/>
|
277 |
+
» Get help from our <a href="http://lifeinthegrid.com/labs/duplicator/resources/" target="_blank">resources page</a>
|
278 |
+
</div>
|
279 |
+
</div><br/><br/>
|
280 |
+
|
281 |
+
<a href="javascript:void(0)" onclick="$('#dup-step1-adv-opts').toggle(250)"><b>Advanced Options...</b></a>
|
282 |
+
<div id='dup-step1-adv-opts' style="display:none">
|
283 |
+
<table class="s1-opts">
|
284 |
+
<tr><td><input type="checkbox" name="zip_manual" id="zip_manual" value="1" /> <label for="zip_manual">Manual package extraction</label></td></tr>
|
285 |
+
<tr><td><input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label></td></tr>
|
286 |
+
</table>
|
287 |
+
|
288 |
+
|
289 |
+
<table class="s1-opts s1-advopts">
|
290 |
+
<tr>
|
291 |
+
<td>Logging</td>
|
292 |
+
<td colspan="2">
|
293 |
+
<input type="radio" name="logging" id="logging-light" value="1" checked="true"> <label for="logging-light">Light</label>
|
294 |
+
<input type="radio" name="logging" id="logging-detailed" value="2"> <label for="logging-detailed">Detailed</label>
|
295 |
+
<input type="radio" name="logging" id="logging-debug" value="3"> <label for="logging-debug">Debug</label>
|
296 |
+
</td>
|
297 |
+
</tr>
|
298 |
+
<tr>
|
299 |
+
<td>Config Cache</td>
|
300 |
+
<td style="width:125px"><input type="checkbox" name="cache_wp" id="cache_wp" <?php echo ($GLOBALS['FW_CACHE_WP']) ? "checked='checked'" : ""; ?> /> <label for="cache_wp">Keep Enabled</label></td>
|
301 |
+
<td><input type="checkbox" name="cache_path" id="cache_path" <?php echo ($GLOBALS['FW_CACHE_PATH']) ? "checked='checked'" : ""; ?> /> <label for="cache_path">Keep Home Path</label></td>
|
302 |
+
</tr>
|
303 |
+
<tr>
|
304 |
+
<td>Config SSL</td>
|
305 |
+
<td><input type="checkbox" name="ssl_admin" id="ssl_admin" <?php echo ($GLOBALS['FW_SSL_ADMIN']) ? "checked='checked'" : ""; ?> /> <label for="ssl_admin">Enforce on Admin</label></td>
|
306 |
+
<td><input type="checkbox" name="ssl_login" id="ssl_login" <?php echo ($GLOBALS['FW_SSL_LOGIN']) ? "checked='checked'" : ""; ?> /> <label for="ssl_login">Enforce on Login</label></td>
|
307 |
+
</tr>
|
308 |
+
</table>
|
309 |
+
|
310 |
+
<table class="s1-opts s1-advopts">
|
311 |
+
<tr><td style="width:130px">MySQL Charset</td><td><input type="text" name="dbcharset" id="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" /> </td></tr>
|
312 |
+
<tr><td>MySQL Collation </td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
|
313 |
+
</table>
|
314 |
+
<small><i>For an overview of these settings see the <a href="?help=1" target="_blank">help page</a></i></small><br/>
|
315 |
+
|
316 |
+
</div>
|
317 |
+
|
318 |
+
|
319 |
+
<div class="dup-step1-gopro">
|
320 |
+
*Create the database and users <b>from the installer</b> with <a target="_blank" href="https://snapcreek.com/?free-install-step1">Duplicator Pro!</a> - Requires cPanel.
|
321 |
+
</div>
|
322 |
+
|
323 |
+
<!-- NOTICES -->
|
324 |
+
<div id="dup-step1-warning">
|
325 |
+
<b>WARNINGS & NOTICES</b>
|
326 |
+
<p>
|
327 |
+
<b>Disclaimer:</b>
|
328 |
+
This plugin require above average technical knowledge. Please use it at your own risk and always back up your database and files beforehand using another backup
|
329 |
+
system besides the Duplicator. If you're not sure about how to use this tool then please enlist the guidance of a technical professional. <u>Always</u> test
|
330 |
+
this installer in a sandbox environment before trying to deploy into a production setting.
|
331 |
+
</p>
|
332 |
+
<p>
|
333 |
+
<b>Database:</b>
|
334 |
+
Do not connect to an existing database unless you are 100% sure you want to remove all of it's data. Connecting to a database
|
335 |
+
that already exists will permanently DELETE all data in that database. This tool is designed to populate and fill a database with NEW data from a duplicated
|
336 |
+
database using the SQL script in the package name above.
|
337 |
+
</p>
|
338 |
+
<p>
|
339 |
+
<b>Setup:</b>
|
340 |
+
Only the archive and installer.php file should be in the install directory, unless you have manually extracted the package and checked the
|
341 |
+
'Manual Package Extraction' checkbox. All other files will be OVERWRITTEN during install. Make sure you have full backups of all your databases and files
|
342 |
+
before continuing with an installation.</p>
|
343 |
+
<p>
|
344 |
+
<b>Manual Extraction:</b>
|
345 |
+
Manual extraction requires that all contents in the package are extracted to the same directory as the installer.php file.
|
346 |
+
Manual extraction is only needed when your server does not support the ZipArchive extension. Please see the online help for more details.
|
347 |
+
</p>
|
348 |
+
<p>
|
349 |
+
<b>After Install:</b>When you are done with the installation remove the installer.php, installer-data.sql and the installer-log.txt files from your directory.
|
350 |
+
These files contain sensitive information and should not remain on a production system.
|
351 |
+
</p><br/>
|
352 |
+
</div>
|
353 |
+
|
354 |
+
<div id="dup-step1-warning-check">
|
355 |
+
<input id="accept-warnings" name="accpet-warnings" type="checkbox" onclick="Duplicator.acceptWarning()" /> <label for="accept-warnings">I have read all warnings & notices</label><br/>
|
356 |
+
<div id="dup-step1-warning-emptydb">
|
357 |
+
The remove action will delete <u>all</u> tables and data from the database!
|
358 |
+
</div>
|
359 |
+
</div><br/><br/><br/>
|
360 |
+
|
361 |
+
<div class="dup-footer-buttons">
|
362 |
+
<input id="dup-step1-deploy-btn" type="button" value=" Run Deployment " onclick="Duplicator.runDeployment()" />
|
363 |
+
</div>
|
364 |
+
|
365 |
+
<?php endif; ?>
|
366 |
+
</form>
|
367 |
+
|
368 |
+
|
369 |
+
<!-- =========================================
|
370 |
+
VIEW: STEP 1 - AJAX RESULT
|
371 |
+
Auto Posts to view.step2.php -->
|
372 |
+
<form id='dup-step1-result-form' method="post" class="content-form" style="display:none">
|
373 |
+
<input type="hidden" name="action_step" value="2" />
|
374 |
+
<input type="hidden" name="package_name" value="<?php echo $zip_name ?>" />
|
375 |
+
<input type="hidden" name="logging" id="ajax-logging" />
|
376 |
+
<input type="hidden" name="dbhost" id="ajax-dbhost" />
|
377 |
+
<input type="hidden" name="dbport" id="ajax-dbport" />
|
378 |
+
<input type="hidden" name="dbuser" id="ajax-dbuser" />
|
379 |
+
<input type="hidden" name="dbpass" id="ajax-dbpass" />
|
380 |
+
<input type="hidden" name="dbname" id="ajax-dbname" />
|
381 |
+
<input type="hidden" name="json" id="ajax-json" />
|
382 |
+
<input type="hidden" name="dbcharset" id="ajax-dbcharset" />
|
383 |
+
<input type="hidden" name="dbcollate" id="ajax-dbcollate" />
|
384 |
+
|
385 |
+
<div class="dup-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
|
386 |
+
<div class="hdr-main">
|
387 |
+
Step 1: Deploy Files & Database
|
388 |
+
</div>
|
389 |
+
|
390 |
+
<!-- PROGRESS BAR -->
|
391 |
+
<div id="progress-area">
|
392 |
+
<div style="width:500px; margin:auto">
|
393 |
+
<h3>Processing Files & Database Please Wait...</h3>
|
394 |
+
<div id="progress-bar"></div>
|
395 |
+
<i>This may take several minutes</i>
|
396 |
+
</div>
|
397 |
+
</div>
|
398 |
+
|
399 |
+
<!-- AJAX SYSTEM ERROR -->
|
400 |
+
<div id="ajaxerr-area" style="display:none">
|
401 |
+
<p>Please try again an issue has occurred.</p>
|
402 |
+
<div style="padding: 0px 10px 10px 0px;">
|
403 |
+
<div id="ajaxerr-data">An unknown issue has occurred with the file and database setup process. Please see the installer-log.txt file for more details.</div>
|
404 |
+
<div style="text-align:center; margin:10px auto 0px auto">
|
405 |
+
<input type="button" onclick='Duplicator.hideErrorResult()' value="« Try Again" /><br/><br/>
|
406 |
+
<i style='font-size:11px'>See online help for more details at <a href='http://lifeinthegrid.com/support' target='_blank'>support.lifeinthegrid.com</a></i>
|
407 |
+
</div>
|
408 |
+
</div>
|
409 |
+
</div>
|
410 |
+
</form>
|
411 |
+
|
412 |
+
|
413 |
+
<!-- =========================================
|
414 |
+
PANEL: SERVER CHECKS -->
|
415 |
+
<div id="dup-step1-dialog" title="System Status" style="display:none">
|
416 |
+
<div id="dup-step1-dialog-data" style="padding: 0px 10px 10px 10px;">
|
417 |
+
|
418 |
+
<b>Archive Name:</b> <?php echo $zip_name; ?> <br/>
|
419 |
+
<b>Package Notes:</b> <?php echo empty($GLOBALS['FW_PACKAGE_NOTES']) ? 'No notes provided for this pakcage.' : $GLOBALS['FW_PACKAGE_NOTES']; ?><br/><br/>
|
420 |
+
|
421 |
+
<!-- SYSTEM REQUIREMENTS -->
|
422 |
+
<b>REQUIREMENTS</b> <i style='font-size:11px'>click links for details</i>
|
423 |
+
<hr size="1"/>
|
424 |
+
<table style="width:100%">
|
425 |
+
<tr>
|
426 |
+
<td style="width:300px"><a href="javascript:void(0)" onclick="$('#dup-SRV01').toggle(400)">Root Directory</a></td>
|
427 |
+
<td class="<?php echo ($req01 == 'Pass') ? 'dup-pass' : 'dup-fail' ?>"><?php echo $req01; ?></td>
|
428 |
+
</tr>
|
429 |
+
<tr>
|
430 |
+
<td colspan="2" id="dup-SRV01" class='dup-step1-dialog-data-details'>
|
431 |
+
<?php
|
432 |
+
echo "<i>Path: {$GLOBALS['CURRENT_ROOT_PATH']} </i><br/>";
|
433 |
+
printf("<b>[%s]</b> %s <br/>", $req01a, "Is Writable by PHP");
|
434 |
+
printf("<b>[%s]</b> %s <br/>", $req01b, "Contains only one zip file<div style='padding-left:70px'>Result = {$zip_name} <br/> <i>Note: Manual extraction still requires the archive.zip file</i> </div> ");
|
435 |
+
?>
|
436 |
+
</td>
|
437 |
+
</tr>
|
438 |
+
<tr>
|
439 |
+
<td><a href="http://us2.php.net/manual/en/mysqli.installation.php" target="_blank">MySQLi Support</a></td>
|
440 |
+
<td class="<?php echo ($req03 == 'Pass') ? 'dup-pass' : 'dup-fail' ?>"><?php echo $req03; ?></td>
|
441 |
+
</tr>
|
442 |
+
<tr>
|
443 |
+
<td>Safe Mode Off</td>
|
444 |
+
<td class="<?php echo ($req02 == 'Pass') ? 'dup-pass' : 'dup-fail' ?>"><?php echo $req02; ?></td>
|
445 |
+
</tr>
|
446 |
+
<tr>
|
447 |
+
<td valign="top">
|
448 |
+
PHP Version: <?php echo phpversion(); ?><br/>
|
449 |
+
<i style="font-size:10px">(PHP 5.2.9+ is required)</i>
|
450 |
+
</td>
|
451 |
+
<td class="<?php echo ($req04 == 'Pass') ? 'dup-pass' : 'dup-fail' ?>"><?php echo $req04; ?> </td>
|
452 |
+
</tr>
|
453 |
+
</table>
|
454 |
+
|
455 |
+
<!-- SYSTEM CHECKS -->
|
456 |
+
<b>CHECKS</b><hr style='margin-top:-2px' size="1"/>
|
457 |
+
<table style="width:100%">
|
458 |
+
<tr>
|
459 |
+
<td style="width:300px"></td>
|
460 |
+
<td></td>
|
461 |
+
</tr>
|
462 |
+
<tr>
|
463 |
+
<?php if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') !== false): ?>
|
464 |
+
<td><b>Web Server:</b> Apache</td>
|
465 |
+
<td><div class='dup-pass'>Good</div></td>
|
466 |
+
<?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false): ?>
|
467 |
+
<td><b>Web Server:</b> LiteSpeed</td>
|
468 |
+
<td><div class='dup-ok'>OK</div></td>
|
469 |
+
<?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false): ?>
|
470 |
+
<td><b>Web Server:</b> Nginx</td>
|
471 |
+
<td><div class='dup-ok'>OK</div></td>
|
472 |
+
<?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'lighttpd') !== false): ?>
|
473 |
+
<td><b>Web Server:</b> Lighthttpd</td>
|
474 |
+
<td><div class='dup-ok'>OK</div></td>
|
475 |
+
<?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'iis') !== false): ?>
|
476 |
+
<td><b>Web Server:</b> Microsoft IIS</td>
|
477 |
+
<td><div class='dup-ok'>OK</div></td>
|
478 |
+
<?php else: ?>
|
479 |
+
<td><b>Web Server:</b> Not detected</td>
|
480 |
+
<td><div class='dup-fail'>Caution</div></td>
|
481 |
+
<?php endif; ?>
|
482 |
+
</tr>
|
483 |
+
<tr>
|
484 |
+
<?php
|
485 |
+
$open_basedir_set = ini_get("open_basedir");
|
486 |
+
if (empty($open_basedir_set)):
|
487 |
+
?>
|
488 |
+
<td><b>Open Base Dir:</b> Off
|
489 |
+
<td><div class='dup-pass'>Good</div>
|
490 |
+
<?php else: ?>
|
491 |
+
<td><b>Open Base Dir:</b> On</td>
|
492 |
+
<td><div class='dup-fail'>Caution</div></td>
|
493 |
+
<?php endif; ?>
|
494 |
+
</tr>
|
495 |
+
</table>
|
496 |
+
|
497 |
+
<hr class='dup-dots' />
|
498 |
+
<!-- SAPI -->
|
499 |
+
<b>PHP SAPI:</b> <?php echo php_sapi_name(); ?><br/>
|
500 |
+
<b>PHP ZIP Archive:</b> <?php echo class_exists('ZipArchive') ? 'Is Installed' : 'Not Installed'; ?> <br/>
|
501 |
+
<b>CDN Accessible:</b> <?php echo ( DupUtil::is_url_active("ajax.aspnetcdn.com", 443) && DupUtil::is_url_active("ajax.googleapis.com", 443)) ? 'Yes' : 'No'; ?> <br/>
|
502 |
+
Need an <a href='http://lifeinthegrid.com/duplicator-hosts' target='_blank'>approved</a> Duplicator hosting provider?
|
503 |
+
|
504 |
+
</div>
|
505 |
+
</div>
|
506 |
+
|
507 |
+
|
508 |
+
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: www.lifeinthegrid.com/partner
|
|
4 |
Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.5.2
|
7 |
-
Stable tag: 1.1.
|
8 |
License: GPLv2
|
9 |
|
10 |
Duplicate, clone, backup, move and transfer an entire site from one location to another.
|
4 |
Tags: backup, restore, move, migrate, localhost, synchronize, duplicate, clone, automate, niche
|
5 |
Requires at least: 4.0
|
6 |
Tested up to: 4.5.2
|
7 |
+
Stable tag: 1.1.10
|
8 |
License: GPLv2
|
9 |
|
10 |
Duplicate, clone, backup, move and transfer an entire site from one location to another.
|
views/packages/list-nodata.php
DELETED
@@ -1,42 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$show_notice01 = false; //DUP_UI::GetViewStateValue('dup-notice01-chk');
|
3 |
-
?>
|
4 |
-
|
5 |
-
<div id='dup-list-alert-nodata'>
|
6 |
-
<i class="fa fa-archive"></i>
|
7 |
-
<?php _e("No Packages Found.", 'duplicator'); ?><br/>
|
8 |
-
<?php _e("Click the 'Create New' button to build a package.", 'duplicator'); ?> <br/><br/>
|
9 |
-
|
10 |
-
<i>
|
11 |
-
<?php
|
12 |
-
printf("%s <a href='admin.php?page=duplicator-help'>%s</a> %s",
|
13 |
-
__("Please visit the", 'duplicator'),
|
14 |
-
__("help page", 'duplicator'),
|
15 |
-
__("for additional support", 'duplicator'));
|
16 |
-
?>
|
17 |
-
</i>
|
18 |
-
|
19 |
-
<!-- NOTICE01: 0.5.0 and 0.5.6: Removed in 0.5.8 -->
|
20 |
-
<?php if( $show_notice01) : ?>
|
21 |
-
<div id="dup-notice-01" class='dup-notice-msg'>
|
22 |
-
<i class="fa fa-exclamation-triangle fa-lg"></i>
|
23 |
-
<?php
|
24 |
-
_e("Older packages prior to 0.5.0 are no longer supported in this version.", 'duplicator');
|
25 |
-
|
26 |
-
printf(" %s <a href='admin.php?page=duplicator-help'>%s</a> %s",
|
27 |
-
__("To get an older package please visit the", 'duplicator'),
|
28 |
-
__("help page", 'duplicator'),
|
29 |
-
__("and look for the Change Log link for additional instructions.", 'duplicator'));
|
30 |
-
?><br/>
|
31 |
-
<label for="dup-notice01-chk">
|
32 |
-
<input type="checkbox" class="dup-notice-chk" id="dup-notice01-chk" name="dup-notice01-chk" onclick="Duplicator.UI.SaveViewStateByPost('dup-notice01-chk', 1); jQuery('#dup-notice-01').hide()" />
|
33 |
-
<?php _e("Hide this message", 'duplicator'); ?>
|
34 |
-
</label>
|
35 |
-
</div><br/><br/>
|
36 |
-
<?php else : ?>
|
37 |
-
<div style="height:75px"> </div>
|
38 |
-
<?php endif; ?>
|
39 |
-
</div>
|
40 |
-
|
41 |
-
|
42 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/packages/list.base.php
DELETED
@@ -1,353 +0,0 @@
|
|
1 |
-
<?php
|
2 |
-
$qryResult = $wpdb->get_results("SELECT * FROM `{$wpdb->prefix}duplicator_packages` ORDER BY id DESC", ARRAY_A);
|
3 |
-
$qryStatus = $wpdb->get_results("SELECT status FROM `{$wpdb->prefix}duplicator_packages` WHERE status >= 100", ARRAY_A);
|
4 |
-
$totalElements = count($qryResult);
|
5 |
-
$statusCount = count($qryStatus);
|
6 |
-
$package_debug = DUP_Settings::Get('package_debug');
|
7 |
-
|
8 |
-
$ajax_nonce = wp_create_nonce('package_list');
|
9 |
-
?>
|
10 |
-
|
11 |
-
<style>
|
12 |
-
div#dup-list-alert-nodata {padding:50px 20px;text-align:center; font-size:20px; line-height:26px}
|
13 |
-
div.dup-notice-msg {border:1px solid silver; padding: 10px; border-radius: 5px; width: 550px;
|
14 |
-
margin:40px auto 0px auto; font-size:12px; text-align: left; word-break:normal;
|
15 |
-
background: #fefcea;
|
16 |
-
background: -moz-linear-gradient(top, #fefcea 0%, #efe5a2 100%);
|
17 |
-
background: -ms-linear-gradient(top, #fefcea 0%,#efe5a2 100%);
|
18 |
-
background: linear-gradient(to bottom, #fefcea 0%,#efe5a2 100%);
|
19 |
-
}
|
20 |
-
input#dup-bulk-action-all {margin:0px;padding:0px 0px 0px 5px;}
|
21 |
-
button.dup-button-selected {border:1px solid #000 !important; background-color:#dfdfdf !important;}
|
22 |
-
div.dup-details-area-error {padding:10px; background-color:#FEF6F3; width:98%; border:1px solid silver; border-radius: 3px }
|
23 |
-
|
24 |
-
/* Table package details */
|
25 |
-
table.dup-pack-table {word-break:break-all;}
|
26 |
-
table.dup-pack-table th {white-space:nowrap !important;}
|
27 |
-
table.dup-pack-table td.pack-name {text-overflow:ellipsis; white-space:nowrap}
|
28 |
-
table.dup-pack-table input[name="delete_confirm"] {margin-left:15px}
|
29 |
-
table.dup-pack-table td.fail {border-left: 4px solid #d54e21;}
|
30 |
-
table.dup-pack-table td.pass {border-left: 4px solid #2ea2cc;}
|
31 |
-
tr.dup-pack-info td {white-space:nowrap; padding:12px 30px 0px 7px;}
|
32 |
-
tr.dup-pack-info td.get-btns {text-align:right; padding:3px 5px 6px 0px !important;}
|
33 |
-
td.dup-pack-details {display:none; padding:5px 0px 15px 15px; line-height:22px;}
|
34 |
-
textarea.dup-pack-debug {width:98%; height:300px; font-size:11px; display:none}
|
35 |
-
</style>
|
36 |
-
|
37 |
-
<form id="form-duplicator" method="post">
|
38 |
-
|
39 |
-
<?php if($statusCount >= 3) : ?>
|
40 |
-
<div style="font-size:13px; position: absolute; top:10px; right:20px">
|
41 |
-
<a href="admin.php?page=duplicator-about" style="color:maroon"><i><i class="fa fa-check-circle"></i> <?php _e("Help Support Duplicator", 'duplicator') ?></i> </a>
|
42 |
-
</div>
|
43 |
-
<?php endif; ?>
|
44 |
-
|
45 |
-
<!-- ====================
|
46 |
-
TOOL-BAR -->
|
47 |
-
<table id="dup-toolbar">
|
48 |
-
<tr valign="top">
|
49 |
-
<td style="white-space: nowrap">
|
50 |
-
<div class="alignleft actions">
|
51 |
-
<select id="dup-pack-bulk-actions">
|
52 |
-
<option value="-1" selected="selected"><?php _e("Bulk Actions", 'duplicator') ?></option>
|
53 |
-
<option value="delete" title="<?php _e("Delete selected package(s)", 'duplicator') ?>"><?php _e("Delete", 'duplicator') ?></option>
|
54 |
-
</select>
|
55 |
-
<input type="button" id="dup-pack-bulk-apply" class="button action" value="<?php _e("Apply", 'duplicator') ?>" onclick="Duplicator.Pack.Delete()">
|
56 |
-
</div>
|
57 |
-
<br class="clear">
|
58 |
-
</td>
|
59 |
-
<td align="center">
|
60 |
-
<a href="?page=duplicator-tools" id="btn-logs-dialog" class="button" title="<?php _e("Package Logs", 'duplicator') ?>..."><i class="fa fa-list-alt"></i>
|
61 |
-
</td>
|
62 |
-
<td class="dup-toolbar-btns">
|
63 |
-
<span><i class="fa fa-archive"></i> <?php _e("All Packages", 'duplicator'); ?></span>
|
64 |
-
<a id="dup-pro-create-new" href="?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a>
|
65 |
-
</td>
|
66 |
-
</tr>
|
67 |
-
</table>
|
68 |
-
|
69 |
-
|
70 |
-
<?php if($totalElements == 0) : ?>
|
71 |
-
|
72 |
-
<!-- ====================
|
73 |
-
NO-DATA MESSAGES-->
|
74 |
-
<table class="widefat dup-pack-table">
|
75 |
-
<thead><tr><th> </th></tr></thead>
|
76 |
-
<tbody><tr><td><?php include (DUPLICATOR_PLUGIN_PATH . "views/packages/list-nodata.php") ?> </td></tr></tbody>
|
77 |
-
<tfoot><tr><th> </th></tr></tfoot>
|
78 |
-
</table>
|
79 |
-
|
80 |
-
<?php else : ?>
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
<!-- ====================
|
85 |
-
LIST ALL PACKAGES -->
|
86 |
-
<table class="widefat dup-pack-table">
|
87 |
-
<thead>
|
88 |
-
<tr>
|
89 |
-
<th><input type="checkbox" id="dup-bulk-action-all" title="<?php _e("Select all packages", 'duplicator') ?>" style="margin-left:15px" onclick="Duplicator.Pack.SetDeleteAll()" /></th>
|
90 |
-
<th><?php _e("Details", 'duplicator') ?></th>
|
91 |
-
<th><?php _e("Created", 'duplicator') ?></th>
|
92 |
-
<th><?php _e("Size", 'duplicator') ?></th>
|
93 |
-
<th style="width:90%;"><?php _e("Name", 'duplicator') ?></th>
|
94 |
-
<th style="text-align:center;" colspan="2">
|
95 |
-
<?php _e("Package", 'duplicator')?>
|
96 |
-
</th>
|
97 |
-
</tr>
|
98 |
-
</thead>
|
99 |
-
<?php
|
100 |
-
|
101 |
-
$rowCount = 0;
|
102 |
-
$totalSize = 0;
|
103 |
-
$rows = $qryResult;
|
104 |
-
foreach ($rows as $row) {
|
105 |
-
$Package = unserialize($row['package']);
|
106 |
-
|
107 |
-
if (is_object($Package)) {
|
108 |
-
$pack_name = $Package->Name;
|
109 |
-
$pack_archive_size = $Package->Archive->Size;
|
110 |
-
$pack_version = $Package->Version;
|
111 |
-
$pack_notes = $Package->Notes;
|
112 |
-
$pack_storeurl = $Package->StoreURL;
|
113 |
-
$pack_namehash = $Package->NameHash;
|
114 |
-
} else {
|
115 |
-
$pack_archive_size = 0;
|
116 |
-
$pack_version = 'unknown';
|
117 |
-
$pack_notes = 'unknown';
|
118 |
-
$pack_storeurl = 'unknown';
|
119 |
-
$pack_name = 'unknown';
|
120 |
-
$pack_namehash = 'unknown';
|
121 |
-
}
|
122 |
-
|
123 |
-
$detail_id = "duplicator-detail-row-{$rowCount}";
|
124 |
-
$plugin_version = empty($pack_version) ? 'unknown' : $pack_version;
|
125 |
-
$plugin_compat = version_compare($plugin_version, '0.5.0');
|
126 |
-
$notes = empty($pack_notes) ? __("(No Notes Taken)", 'duplicator') : $pack_notes;
|
127 |
-
|
128 |
-
//Links
|
129 |
-
$uniqueid = "{$row['name']}_{$row['hash']}";
|
130 |
-
$sqlfilelink = $pack_storeurl . "{$uniqueid}_database.sql";
|
131 |
-
$packagepath = $pack_storeurl . "{$uniqueid}_archive.zip";
|
132 |
-
$installerpath = $pack_storeurl . "{$uniqueid}_installer.php";
|
133 |
-
$logfilelink = $pack_storeurl . "{$uniqueid}.log";
|
134 |
-
$reportfilelink = $pack_storeurl . "{$uniqueid}_scan.json";
|
135 |
-
$installfilelink = "{$installerpath}?get=1&file={$uniqueid}_installer.php";
|
136 |
-
$logfilename = "{$uniqueid}.log";
|
137 |
-
$css_alt = ($rowCount % 2 != 0) ? '' : 'alternate';
|
138 |
-
?>
|
139 |
-
|
140 |
-
<!-- COMPLETE -->
|
141 |
-
<?php if ($row['status'] >= 100) : ?>
|
142 |
-
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
143 |
-
<td class="pass"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id'] ;?>" /></td>
|
144 |
-
<td><a href="javascript:void(0);" onclick="return Duplicator.Pack.ToggleDetail('<?php echo $detail_id ;?>');">[<?php echo __("View", 'duplicator') . ' ' . $row['id'];?>]</a></td>
|
145 |
-
<td><?php echo date( "m-d-y G:i", strtotime($row['created']));?></td>
|
146 |
-
<td><?php echo DUP_Util::ByteSize($pack_archive_size); ?></td>
|
147 |
-
<td class='pack-name'><?php echo $pack_name ;?></td>
|
148 |
-
<td class="get-btns">
|
149 |
-
<button id="<?php echo "{$uniqueid}_installer.php" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $installfilelink; ?>', this); return false;"><i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?></button>
|
150 |
-
</td>
|
151 |
-
<td class="get-btns">
|
152 |
-
<button id="<?php echo "{$uniqueid}_archive.zip" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $packagepath; ?>', this); return false;"><i class="fa fa-file-archive-o"></i> <?php _e("Archive", 'duplicator') ?></button>
|
153 |
-
</td>
|
154 |
-
</tr>
|
155 |
-
<tr>
|
156 |
-
<td colspan="8" id="<?php echo $detail_id; ?>" class="dup-pack-details <?php echo $css_alt ?>">
|
157 |
-
<b><?php _e("Version", 'duplicator') ?>:</b> <?php echo $plugin_version ?> |
|
158 |
-
<b><?php _e("User", 'duplicator') ?>:</b> <?php echo $row['owner']; ?> |
|
159 |
-
<b><?php _e("Hash", 'duplicator')?>:</b> <?php echo $pack_namehash ;?> <br/>
|
160 |
-
<b><?php _e("Notes", 'duplicator')?>:</b> <?php echo $notes ?>
|
161 |
-
<div style="height:7px"> </div>
|
162 |
-
<button class="button" onclick="Duplicator.Pack.ShowLinksDialog(<?php echo "'{$sqlfilelink}', '{$packagepath}', '{$installfilelink}', '{$logfilelink}', '{$reportfilelink}' " ;?>); return false;" class="thickbox"><i class="fa fa-lock"></i> <?php _e("Links", 'duplicator')?></button>
|
163 |
-
<button class="button" onclick="window.open(<?php echo "'{$sqlfilelink}', '_blank'" ;?>); return false;"><i class="fa fa-table"></i> <?php _e("SQL", 'duplicator')?></button>
|
164 |
-
<button class="button" onclick="Duplicator.OpenLogWindow(<?php echo "'{$logfilename}'" ;?>); return false;"><i class="fa fa-list-alt"></i> <?php _e("Log", 'duplicator')?></button>
|
165 |
-
<?php if ($package_debug) : ?>
|
166 |
-
<div style="margin-top:7px">
|
167 |
-
<a href="javascript:void(0)" onclick="window.open(<?php echo "'{$reportfilelink}', '_blank'" ;?>); return false;">[<?php _e("Open Scan Report", 'duplicator')?>]</a>
|
168 |
-
<a href="javascript:void(0)" onclick="jQuery(this).parent().find('.dup-pack-debug').toggle()">[<?php _e("View Package Object", 'duplicator')?>]</a><br/>
|
169 |
-
<textarea class="dup-pack-debug"><?php @print_r($Package); ?> </textarea>
|
170 |
-
</div>
|
171 |
-
<?php endif; ?>
|
172 |
-
</td>
|
173 |
-
</tr>
|
174 |
-
|
175 |
-
<!-- NOT COMPLETE -->
|
176 |
-
<?php else : ?>
|
177 |
-
|
178 |
-
<?php
|
179 |
-
$size = 0;
|
180 |
-
$tmpSearch = glob(DUPLICATOR_SSDIR_PATH_TMP . "/{$pack_namehash}_*");
|
181 |
-
if (is_array($tmpSearch)) {
|
182 |
-
$result = array_map('filesize', $tmpSearch);
|
183 |
-
$size = array_sum($result);
|
184 |
-
}
|
185 |
-
$pack_archive_size = $size;
|
186 |
-
?>
|
187 |
-
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
188 |
-
<td class="fail"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id'] ;?>" /></td>
|
189 |
-
<td><a href="javascript:void(0);" onclick="return Duplicator.Pack.ToggleDetail('<?php echo $detail_id ;?>');">[<?php echo __("View", 'duplicator') . ' ' . $row['id'];?>]</a></td>
|
190 |
-
<td><?php echo date( "m-d-y G:i", strtotime($row['created']));?></td>
|
191 |
-
<td><?php echo DUP_Util::ByteSize($size); ?></td>
|
192 |
-
<td class='pack-name'><?php echo $pack_name ;?></td>
|
193 |
-
<td class="get-btns" colspan="2">
|
194 |
-
<span style='display:inline-block; padding:7px 40px 0px 0px'>
|
195 |
-
<a href="javascript:void(0);" onclick="return Duplicator.Pack.ToggleDetail('<?php echo $detail_id ;?>');"><?php _e("View Error Details", 'duplicator') ?>...</a>
|
196 |
-
</span>
|
197 |
-
</td>
|
198 |
-
</tr>
|
199 |
-
<tr>
|
200 |
-
<td colspan="8" id="<?php echo $detail_id; ?>" class="dup-pack-details <?php echo $css_alt ?>">
|
201 |
-
<div class="dup-details-area-error">
|
202 |
-
<b><?php _e("Version", 'duplicator') ?>:</b> <?php echo $plugin_version ?> |
|
203 |
-
<b><?php _e("User", 'duplicator') ?>:</b> <?php echo $row['owner']; ?> |
|
204 |
-
<b><?php _e("Hash", 'duplicator')?>:</b> <?php echo $pack_name ;?> <br/>
|
205 |
-
|
206 |
-
<?php if ($pack_name == 'unknown') : ?>
|
207 |
-
<b><?php _e("Unrecoverable Error! Please remove this package.", 'duplicator')?></b><br/>
|
208 |
-
<?php else : ?>
|
209 |
-
<b><?php _e("Notes", 'duplicator')?>:</b> <?php echo $notes ?> <br/>
|
210 |
-
<?php
|
211 |
-
printf("%s <u><a href='http://lifeinthegrid.com/duplicator-docs' target='_blank'>%s</a></u>",
|
212 |
-
__("This package has encountered errors. Click 'View Log' for more details. For additional support see the ", 'duplicator'),
|
213 |
-
__("online knowledgebase", 'duplicator'));
|
214 |
-
?><div style="height:7px"> </div>
|
215 |
-
<button class='button' onclick="Duplicator.OpenLogWindow(<?php echo "'{$logfilename}'" ;?>); return false;"><?php _e("View Log", 'duplicator')?></button>
|
216 |
-
<?php if ($package_debug) : ?>
|
217 |
-
<div style="margin-top:7px">
|
218 |
-
<a href="javascript:void(0)" onclick="jQuery(this).parent().find('.dup-pack-debug').toggle()">[View Package Object]</a><br/>
|
219 |
-
<textarea class="dup-pack-debug"><?php print_r($Package);?> </textarea>
|
220 |
-
</div>
|
221 |
-
<?php endif; ?>
|
222 |
-
<?php endif; ?>
|
223 |
-
|
224 |
-
|
225 |
-
</div>
|
226 |
-
</td>
|
227 |
-
</tr>
|
228 |
-
<?php endif; ?>
|
229 |
-
<?php
|
230 |
-
$totalSize = $totalSize + $pack_archive_size;
|
231 |
-
$rowCount++;
|
232 |
-
}
|
233 |
-
?>
|
234 |
-
<tfoot>
|
235 |
-
<tr>
|
236 |
-
<th colspan="8" style='text-align:right; font-size:12px'>
|
237 |
-
<?php echo _e("Packages", 'duplicator') . ': ' . $totalElements; ?> |
|
238 |
-
<?php echo _e("Total Size", 'duplicator') . ': ' . DUP_Util::ByteSize($totalSize); ?>
|
239 |
-
</th>
|
240 |
-
</tr>
|
241 |
-
</tfoot>
|
242 |
-
</table>
|
243 |
-
<?php endif; ?>
|
244 |
-
</form>
|
245 |
-
|
246 |
-
|
247 |
-
<!--form id="dup-paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank" style="display:none">
|
248 |
-
<input name="cmd" type="hidden" value="_s-xclick" />
|
249 |
-
<input name="hosted_button_id" type="hidden" value="EYJ7AV43RTZJL" />
|
250 |
-
<img src="https://www.paypalobjects.com/WEBSCR-640-20110401-1/en_US/i/scr/pixel.gif" border="0" alt="" width="1" height="1" />
|
251 |
-
</form-->
|
252 |
-
|
253 |
-
|
254 |
-
<!-- ==========================================
|
255 |
-
DIALOG: QUICK PATH -->
|
256 |
-
<?php add_thickbox(); ?>
|
257 |
-
<div id="dup-dlg-quick-path" title="<?php _e('Download Links', 'duplicator'); ?>" style="display:none">
|
258 |
-
<p>
|
259 |
-
<i class="fa fa-lock"></i>
|
260 |
-
<?php _e("The following links contain sensitive data. Please share with caution!", 'duplicator'); ?>
|
261 |
-
</p>
|
262 |
-
|
263 |
-
<div style="padding: 0px 15px 15px 15px;">
|
264 |
-
<a href="javascript:void(0)" style="display:inline-block; text-align:right" onclick="Duplicator.Pack.GetLinksText()">[Select All]</a> <br/>
|
265 |
-
<textarea id="dup-dlg-quick-path-data" style='border:1px solid silver; border-radius:3px; width:99%; height:225px; font-size:11px'></textarea><br/>
|
266 |
-
<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>
|
267 |
-
</div>
|
268 |
-
</div>
|
269 |
-
|
270 |
-
<script type="text/javascript">
|
271 |
-
jQuery(document).ready(function($) {
|
272 |
-
|
273 |
-
/* ----------------------------------------
|
274 |
-
* METHOD: Shows hides the package detail items
|
275 |
-
* @param id The id to toggle */
|
276 |
-
Duplicator.Pack.ToggleDetail = function(id) {
|
277 |
-
$('#' + id).toggle();
|
278 |
-
return false;
|
279 |
-
}
|
280 |
-
|
281 |
-
/* ----------------------------------------
|
282 |
-
* METHOD: Removes all selected package sets
|
283 |
-
* @param event To prevent bubbling */
|
284 |
-
Duplicator.Pack.Delete = function (event) {
|
285 |
-
var arr = new Array;
|
286 |
-
var count = 0;
|
287 |
-
|
288 |
-
if ($("#dup-pack-bulk-actions").val() != "delete") {
|
289 |
-
alert("<?php _e('Please select an action from the bulk action drop down menu to perform a specific action.', 'duplicator') ?>");
|
290 |
-
return;
|
291 |
-
}
|
292 |
-
$("input[name=delete_confirm]").each(function() {
|
293 |
-
if (this.checked) { arr[count++] = this.id; }
|
294 |
-
});
|
295 |
-
var list = arr.join(',');
|
296 |
-
if (list.length == 0) {
|
297 |
-
alert("<?php _e('Please select at least one package to delete.', 'duplicator') ?>");
|
298 |
-
return;
|
299 |
-
}
|
300 |
-
|
301 |
-
if (confirm("<?php _e('Are you sure, you want to delete the selected package(s)?', 'duplicator') ?>")){
|
302 |
-
|
303 |
-
$.ajax({
|
304 |
-
type: "POST",
|
305 |
-
url: ajaxurl,
|
306 |
-
dataType: "json",
|
307 |
-
data: {action : 'duplicator_package_delete', duplicator_delid : list, nonce: '<?php echo $ajax_nonce; ?>' },
|
308 |
-
success: function(data) {
|
309 |
-
//console.log(data); //Debug return
|
310 |
-
Duplicator.ReloadWindow(data);
|
311 |
-
}
|
312 |
-
});
|
313 |
-
}
|
314 |
-
if (event)
|
315 |
-
event.preventDefault();
|
316 |
-
};
|
317 |
-
|
318 |
-
/* ----------------------------------------
|
319 |
-
* METHOD: Toogles the Bulk Action Check boxes */
|
320 |
-
Duplicator.Pack.SetDeleteAll = function() {
|
321 |
-
var state = $('input#dup-bulk-action-all').is(':checked') ? 1 : 0;
|
322 |
-
$("input[name=delete_confirm]").each(function() {
|
323 |
-
this.checked = (state) ? true : false;
|
324 |
-
});
|
325 |
-
}
|
326 |
-
|
327 |
-
/* ----------------------------------------
|
328 |
-
* METHOD: Shows the 'Download Links' dialog
|
329 |
-
* @param db The path to the sql file
|
330 |
-
* @param install The path to the install file
|
331 |
-
* @param pack The path to the package file */
|
332 |
-
Duplicator.Pack.ShowLinksDialog = function(db, install, pack, log, report) {
|
333 |
-
|
334 |
-
var url = '#TB_inline?width=650&height=350&inlineId=dup-dlg-quick-path';
|
335 |
-
tb_show("<?php _e('Package File Links', 'duplicator') ?>", url);
|
336 |
-
|
337 |
-
var msg = <?php printf('"%s:\n" + db + "\n\n%s:\n" + install + "\n\n%s:\n" + pack + "\n\n%s:\n" + log + "\n\n%s:\n" + report;',
|
338 |
-
__("DATABASE", 'duplicator'),
|
339 |
-
__("PACKAGE", 'duplicator'),
|
340 |
-
__("INSTALLER", 'duplicator'),
|
341 |
-
__("LOG", 'duplicator'),
|
342 |
-
__("REPORT", 'duplicator'));
|
343 |
-
?>
|
344 |
-
$("#dup-dlg-quick-path-data").val(msg);
|
345 |
-
return false;
|
346 |
-
}
|
347 |
-
|
348 |
-
//LOAD: 'Download Links' Dialog and other misc setup
|
349 |
-
Duplicator.Pack.GetLinksText = function() {$('#dup-dlg-quick-path-data').select();};
|
350 |
-
|
351 |
-
});
|
352 |
-
</script>
|
353 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/packages/main/controller.php
CHANGED
@@ -38,15 +38,15 @@ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'list';
|
|
38 |
break;
|
39 |
case 'new1':
|
40 |
duplicator_header(__("Packages » New", 'duplicator'));
|
41 |
-
include('new1.
|
42 |
break;
|
43 |
case 'new2':
|
44 |
duplicator_header(__("Packages » New", 'duplicator'));
|
45 |
-
include('new2.
|
46 |
break;
|
47 |
case 'new3':
|
48 |
duplicator_header(__("Packages » New", 'duplicator'));
|
49 |
-
include('new3.
|
50 |
break;
|
51 |
}
|
52 |
?>
|
38 |
break;
|
39 |
case 'new1':
|
40 |
duplicator_header(__("Packages » New", 'duplicator'));
|
41 |
+
include('new1.setup.php');
|
42 |
break;
|
43 |
case 'new2':
|
44 |
duplicator_header(__("Packages » New", 'duplicator'));
|
45 |
+
include('new2.scan.php');
|
46 |
break;
|
47 |
case 'new3':
|
48 |
duplicator_header(__("Packages » New", 'duplicator'));
|
49 |
+
include('new3.build.php');
|
50 |
break;
|
51 |
}
|
52 |
?>
|
views/packages/main/new1.inc.form.php
CHANGED
@@ -90,7 +90,7 @@ STORAGE -->
|
|
90 |
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s and other storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP'); ?>
|
91 |
<a href="http://snapcreek.com/duplicator/?free-storage" target="_blank"><?php _e('Professional', 'duplicator');?></a>
|
92 |
<i class="fa fa-lightbulb-o"
|
93 |
-
data-tooltip-title="<?php _e("Additional Storage:", 'duplicator'
|
94 |
data-tooltip="<?php _e('Professional allows you to create a package and then store it at a custom location on this server or to a cloud '
|
95 |
. 'based location such as Google Drive, Amazon, Dropbox or FTP.', 'duplicator'); ?>">
|
96 |
</i>
|
90 |
<?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s and other storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP'); ?>
|
91 |
<a href="http://snapcreek.com/duplicator/?free-storage" target="_blank"><?php _e('Professional', 'duplicator');?></a>
|
92 |
<i class="fa fa-lightbulb-o"
|
93 |
+
data-tooltip-title="<?php _e("Additional Storage:", 'duplicator'); ?>"
|
94 |
data-tooltip="<?php _e('Professional allows you to create a package and then store it at a custom location on this server or to a cloud '
|
95 |
. 'based location such as Google Drive, Amazon, Dropbox or FTP.', 'duplicator'); ?>">
|
96 |
</i>
|
views/packages/{new1.base.php → main/new1.setup.php}
RENAMED
@@ -18,8 +18,6 @@ if (isset($_POST['action']))
|
|
18 |
DUP_Util::InitSnapshotDirectory();
|
19 |
|
20 |
$Package = DUP_Package::GetActive();
|
21 |
-
$package_hash = $Package->MakeHash();
|
22 |
-
|
23 |
$dup_tests = array();
|
24 |
$dup_tests = DUP_Server::GetRequirements();
|
25 |
$default_name = DUP_Package::GetDefaultName();
|
@@ -45,42 +43,9 @@ $dbbuild_mode = (DUP_Settings::Get('package_mysqldump') && DUP_Database::GetMySq
|
|
45 |
div.dup-sys-contact {padding:5px 0px 0px 10px; font-size:11px; font-style:italic}
|
46 |
span.dup-toggle {float:left; margin:0 2px 2px 0; }
|
47 |
table.dup-sys-info-results td:first-child {width:200px}
|
48 |
-
|
49 |
-
/* -----------------------------
|
50 |
-
PACKAGE OPTS*/
|
51 |
-
form#dup-form-opts label {line-height:22px}
|
52 |
-
form#dup-form-opts input[type=checkbox] {margin-top:3px}
|
53 |
-
form#dup-form-opts fieldset {border-radius:4px; border-top:1px solid #dfdfdf; line-height:20px}
|
54 |
-
form#dup-form-opts fieldset{padding:10px 15px 15px 15px; min-height:275px; margin:0 10px 10px 10px}
|
55 |
-
form#dup-form-opts textarea, input[type="text"] {width:100%}
|
56 |
-
form#dup-form-opts textarea#filter-dirs {height:85px}
|
57 |
-
form#dup-form-opts textarea#filter-exts {height:27px}
|
58 |
-
textarea#package_notes {height:37px;}
|
59 |
-
div.dup-notes-add {float:right; margin:-4px 2px 4px 0;}
|
60 |
-
div#dup-notes-area {display:none}
|
61 |
-
|
62 |
-
/*ARCHIVE SECTION*/
|
63 |
-
form#dup-form-opts div.tabs-panel{max-height:550px; padding:10px; min-height:280px}
|
64 |
-
form#dup-form-opts ul li.tabs{font-weight:bold}
|
65 |
-
ul.category-tabs li {padding:4px 15px 4px 15px}
|
66 |
-
select#archive-format {min-width:100px; margin:1px 0px 4px 0px}
|
67 |
-
span#dup-archive-filter-file {color:#A62426; display:none}
|
68 |
-
span#dup-archive-filter-db {color:#A62426; display:none}
|
69 |
-
div#dup-file-filter-items, div#dup-db-filter-items {padding:2px 0px 0px 15px; font-stretch:ultra-condensed; font-family: Calibri; }
|
70 |
-
label.dup-enable-filters {display:inline-block; margin:-5px 0px 5px 0px}
|
71 |
-
div.dup-quick-links {font-size:11px; float:right; display:inline-block; margin-top:2px; font-style:italic}
|
72 |
-
div.dup-tabs-opts-help {font-style:italic; font-size:11px; margin:10px 0px 0px 10px; color:#777}
|
73 |
-
table#dup-dbtables td {padding:1px 15px 1px 4px}
|
74 |
-
table.dbmysql-compatibility td{padding:2px 20px 2px 2px}
|
75 |
-
|
76 |
-
/*INSTALLER SECTION*/
|
77 |
-
div.dup-installer-header-1 {font-weight:bold; padding-bottom:2px; width:100%}
|
78 |
-
div.dup-installer-header-2 {font-weight:bold; border-bottom:1px solid #dfdfdf; padding-bottom:2px; width:100%}
|
79 |
-
label.chk-labels {display:inline-block; margin-top:1px}
|
80 |
-
table.dup-installer-tbl {width:95%; margin-left:20px}
|
81 |
</style>
|
82 |
|
83 |
-
<!--
|
84 |
TOOL BAR: STEPS -->
|
85 |
<table id="dup-toolbar">
|
86 |
<tr valign="top">
|
@@ -104,20 +69,17 @@ TOOL BAR: STEPS -->
|
|
104 |
</table>
|
105 |
<hr style="margin-bottom:8px">
|
106 |
|
107 |
-
|
108 |
-
|
109 |
<?php if (!empty($action_response)) : ?>
|
110 |
<div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
|
111 |
<?php endif; ?>
|
112 |
|
113 |
-
<!--
|
114 |
-
|
115 |
-
<div class="dup-box">
|
116 |
<div class="dup-box-title dup-box-title-fancy">
|
117 |
-
<i class="fa fa-check-square-o"></i>
|
118 |
<?php
|
119 |
-
|
120 |
-
|
121 |
?>
|
122 |
<div class="dup-box-arrow"></div>
|
123 |
</div>
|
@@ -222,7 +184,10 @@ META-BOX1: SYSTEM REQUIREMENTS -->
|
|
222 |
</div>
|
223 |
<div class="dup-sys-info dup-info-box">
|
224 |
<?php if ($dup_tests['RES']['INSTALL'] == 'Pass') : ?>
|
225 |
-
<?php
|
|
|
|
|
|
|
226 |
<?php else:
|
227 |
$duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
|
228 |
?>
|
@@ -237,7 +202,7 @@ META-BOX1: SYSTEM REQUIREMENTS -->
|
|
237 |
<!-- ONLINE SUPPORT -->
|
238 |
<div class="dup-sys-contact">
|
239 |
<?php
|
240 |
-
printf("
|
241 |
?>
|
242 |
</div>
|
243 |
|
@@ -245,85 +210,25 @@ META-BOX1: SYSTEM REQUIREMENTS -->
|
|
245 |
</div><br/>
|
246 |
|
247 |
|
248 |
-
<!--
|
249 |
FORM PACKAGE OPTIONS -->
|
250 |
<div style="padding:5px 5px 2px 5px">
|
251 |
<?php include('new1.inc.form.php'); ?>
|
252 |
</div>
|
253 |
|
254 |
<script type="text/javascript">
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
/* METHOD: Enable/Disable the file filter elements */
|
271 |
-
Duplicator.Pack.ToggleFileFilters = function () {
|
272 |
-
var $filterItems = $('#dup-file-filter-items');
|
273 |
-
if ($("#filter-on").is(':checked')) {
|
274 |
-
$filterItems.removeAttr('disabled').css({color: '#000'});
|
275 |
-
$('#filter-exts,#filter-dirs').removeAttr('readonly').css({color: '#000'});
|
276 |
-
$('#dup-archive-filter-file').show();
|
277 |
-
} else {
|
278 |
-
$filterItems.attr('disabled', 'disabled').css({color: '#999'});
|
279 |
-
$('#filter-dirs, #filter-exts').attr('readonly', 'readonly').css({color: '#999'});
|
280 |
-
$('#dup-archive-filter-file').hide();
|
281 |
-
}
|
282 |
-
};
|
283 |
-
|
284 |
-
/* METHOD: Appends a path to the directory filter */
|
285 |
-
Duplicator.Pack.ToggleDBFilters = function () {
|
286 |
-
var $filterItems = $('#dup-db-filter-items');
|
287 |
-
|
288 |
-
if ($("#dbfilter-on").is(':checked')) {
|
289 |
-
$filterItems.removeAttr('disabled').css({color: '#000'});
|
290 |
-
$('#dup-dbtables input').removeAttr('readonly').css({color: '#000'});
|
291 |
-
$('#dup-archive-filter-db').show();
|
292 |
-
} else {
|
293 |
-
$filterItems.attr('disabled', 'disabled').css({color: '#999'});
|
294 |
-
$('#dup-dbtables input').attr('readonly', 'readonly').css({color: '#999'});
|
295 |
-
$('#dup-archive-filter-db').hide();
|
296 |
-
}
|
297 |
-
};
|
298 |
-
|
299 |
-
|
300 |
-
/* METHOD: Appends a path to the directory filter */
|
301 |
-
Duplicator.Pack.AddExcludePath = function (path) {
|
302 |
-
var text = $("#filter-dirs").val() + path + ';\n';
|
303 |
-
$("#filter-dirs").val(text);
|
304 |
-
};
|
305 |
-
|
306 |
-
/* METHOD: Appends a path to the extention filter */
|
307 |
-
Duplicator.Pack.AddExcludeExts = function (path) {
|
308 |
-
var text = $("#filter-exts").val() + path + ';';
|
309 |
-
$("#filter-exts").val(text);
|
310 |
-
};
|
311 |
-
|
312 |
-
|
313 |
-
//Init: Toogle for system requirment detial links
|
314 |
-
$('.dup-sys-title a').each(function () {
|
315 |
-
$(this).attr('href', 'javascript:void(0)');
|
316 |
-
$(this).click({selector: '.dup-sys-info'}, Duplicator.Pack.ToggleSystemDetails);
|
317 |
-
$(this).prepend("<span class='ui-icon ui-icon-triangle-1-e dup-toggle' />");
|
318 |
-
});
|
319 |
-
|
320 |
-
//Init: Color code Pass/Fail/Warn items
|
321 |
-
$('.dup-sys-title div').each(function () {
|
322 |
-
$(this).addClass(($(this).text() == 'Pass') ? 'dup-sys-pass' : 'dup-sys-fail');
|
323 |
-
});
|
324 |
-
|
325 |
-
//Init: Toggle OptionTabs
|
326 |
-
Duplicator.Pack.ToggleFileFilters();
|
327 |
-
Duplicator.Pack.ToggleDBFilters();
|
328 |
-
});
|
329 |
</script>
|
18 |
DUP_Util::InitSnapshotDirectory();
|
19 |
|
20 |
$Package = DUP_Package::GetActive();
|
|
|
|
|
21 |
$dup_tests = array();
|
22 |
$dup_tests = DUP_Server::GetRequirements();
|
23 |
$default_name = DUP_Package::GetDefaultName();
|
43 |
div.dup-sys-contact {padding:5px 0px 0px 10px; font-size:11px; font-style:italic}
|
44 |
span.dup-toggle {float:left; margin:0 2px 2px 0; }
|
45 |
table.dup-sys-info-results td:first-child {width:200px}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
46 |
</style>
|
47 |
|
48 |
+
<!-- ============================
|
49 |
TOOL BAR: STEPS -->
|
50 |
<table id="dup-toolbar">
|
51 |
<tr valign="top">
|
69 |
</table>
|
70 |
<hr style="margin-bottom:8px">
|
71 |
|
|
|
|
|
72 |
<?php if (!empty($action_response)) : ?>
|
73 |
<div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
|
74 |
<?php endif; ?>
|
75 |
|
76 |
+
<!-- ============================
|
77 |
+
SYSTEM REQUIREMENTS -->
|
78 |
+
<div class="dup-box dup-box-fancy">
|
79 |
<div class="dup-box-title dup-box-title-fancy">
|
|
|
80 |
<?php
|
81 |
+
_e("Requirements:", 'duplicator');
|
82 |
+
echo ($dup_tests['Success']) ? ' <div class="dup-sys-pass">Pass</div>' : ' <div class="dup-sys-fail">Fail</div>';
|
83 |
?>
|
84 |
<div class="dup-box-arrow"></div>
|
85 |
</div>
|
184 |
</div>
|
185 |
<div class="dup-sys-info dup-info-box">
|
186 |
<?php if ($dup_tests['RES']['INSTALL'] == 'Pass') : ?>
|
187 |
+
<?php
|
188 |
+
_e("None of the reserved files where found from a previous install. This means you are clear to create a new package.", 'duplicator');
|
189 |
+
echo " [{$dup_intaller_files}]";
|
190 |
+
?>
|
191 |
<?php else:
|
192 |
$duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
|
193 |
?>
|
202 |
<!-- ONLINE SUPPORT -->
|
203 |
<div class="dup-sys-contact">
|
204 |
<?php
|
205 |
+
printf("%s <a href='admin.php?page=duplicator-help'>[%s]</a>", __("For additional help please see the ", 'duplicator'), __("help page", 'duplicator'));
|
206 |
?>
|
207 |
</div>
|
208 |
|
210 |
</div><br/>
|
211 |
|
212 |
|
213 |
+
<!-- ============================
|
214 |
FORM PACKAGE OPTIONS -->
|
215 |
<div style="padding:5px 5px 2px 5px">
|
216 |
<?php include('new1.inc.form.php'); ?>
|
217 |
</div>
|
218 |
|
219 |
<script type="text/javascript">
|
220 |
+
jQuery(document).ready(function ($)
|
221 |
+
{
|
222 |
+
//Init: Toogle for system requirment detial links
|
223 |
+
$('.dup-sys-title a').each(function () {
|
224 |
+
$(this).attr('href', 'javascript:void(0)');
|
225 |
+
$(this).click({selector: '.dup-sys-info'}, Duplicator.Pack.ToggleSystemDetails);
|
226 |
+
$(this).prepend("<span class='ui-icon ui-icon-triangle-1-e dup-toggle' />");
|
227 |
+
});
|
228 |
+
|
229 |
+
//Init: Color code Pass/Fail/Warn items
|
230 |
+
$('.dup-sys-title div').each(function () {
|
231 |
+
$(this).addClass(($(this).text() == 'Pass') ? 'dup-sys-pass' : 'dup-sys-fail');
|
232 |
+
});
|
233 |
+
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
</script>
|
views/packages/{new2.base.php → main/new2.scan.php}
RENAMED
@@ -1,642 +1,695 @@
|
|
1 |
-
<?php
|
2 |
-
require_once (DUPLICATOR_PLUGIN_PATH . 'classes/package.php');
|
3 |
-
require_once (DUPLICATOR_PLUGIN_PATH . 'classes/utility.php');
|
4 |
-
|
5 |
-
if(empty($_POST))
|
6 |
-
{
|
7 |
-
//F5 Refresh Check
|
8 |
-
$redirect = admin_url('admin.php?page=duplicator&tab=new1');
|
9 |
-
echo "<script>window.location.href = '{$redirect}'</script>";
|
10 |
-
exit;
|
11 |
-
}
|
12 |
-
|
13 |
-
global $wp_version;
|
14 |
-
$Package = new DUP_Package();
|
15 |
-
|
16 |
-
$
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
div
|
37 |
-
div.dup-
|
38 |
-
|
39 |
-
div
|
40 |
-
div
|
41 |
-
div
|
42 |
-
|
43 |
-
div.dup-
|
44 |
-
div.dup-scan-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
div
|
52 |
-
div
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
div#
|
59 |
-
|
60 |
-
|
61 |
-
div#
|
62 |
-
div#
|
63 |
-
|
64 |
-
div#
|
65 |
-
|
66 |
-
|
67 |
-
div
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
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 |
-
<div
|
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 |
-
|
162 |
-
echo '
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
echo
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
//
|
202 |
-
echo '<
|
203 |
-
echo '<small>';
|
204 |
-
|
205 |
-
echo '</small>';
|
206 |
-
|
207 |
-
//
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
echo '
|
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 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
<
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
<
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
</div
|
464 |
-
|
465 |
-
|
466 |
-
<
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
Duplicator.Pack.
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
|
527 |
-
|
528 |
-
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
$('#
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
$(
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
//****************
|
577 |
-
//
|
578 |
-
$('#data-
|
579 |
-
$('#data-
|
580 |
-
|
581 |
-
$('#data-
|
582 |
-
$('#data-
|
583 |
-
$('#data-
|
584 |
-
$('#data-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
html
|
613 |
-
}
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
|
636 |
-
$(
|
637 |
-
$(
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
642 |
</script>
|
1 |
+
<?php
|
2 |
+
require_once (DUPLICATOR_PLUGIN_PATH . 'classes/package.php');
|
3 |
+
require_once (DUPLICATOR_PLUGIN_PATH . 'classes/utility.php');
|
4 |
+
|
5 |
+
if(empty($_POST))
|
6 |
+
{
|
7 |
+
//F5 Refresh Check
|
8 |
+
$redirect = admin_url('admin.php?page=duplicator&tab=new1');
|
9 |
+
echo "<script>window.location.href = '{$redirect}'</script>";
|
10 |
+
exit;
|
11 |
+
}
|
12 |
+
|
13 |
+
global $wp_version;
|
14 |
+
$Package = new DUP_Package();
|
15 |
+
|
16 |
+
if(isset($_POST['package-hash']))
|
17 |
+
{
|
18 |
+
// If someone is trying to pass the hasn into us that is illegal so stop it immediately.
|
19 |
+
die('Unauthorized');
|
20 |
+
}
|
21 |
+
|
22 |
+
$Package->SaveActive($_POST);
|
23 |
+
$Package = DUP_Package::GetActive();
|
24 |
+
|
25 |
+
$mysqldump_on = DUP_Settings::Get('package_mysqldump') && DUP_Database::GetMySqlDumpPath();
|
26 |
+
$mysqlcompat_on = isset($Package->Database->Compatible) && strlen($Package->Database->Compatible);
|
27 |
+
$mysqlcompat_on = ($mysqldump_on && $mysqlcompat_on) ? true : false;
|
28 |
+
$dbbuild_mode = ($mysqldump_on) ? 'mysqldump (fast)' : 'PHP (slow)';
|
29 |
+
|
30 |
+
$zip_check = DUP_Util::GetZipPath();
|
31 |
+
?>
|
32 |
+
|
33 |
+
<style>
|
34 |
+
/* ============----------
|
35 |
+
PROGRESS ARES-CHECKS */
|
36 |
+
div#dup-progress-area {text-align:center; max-width:650px; min-height:200px; margin:0px auto 0px auto; padding:0px;}
|
37 |
+
div.dup-progress-title {font-size:22px;padding:5px 0 20px 0; font-weight: bold}
|
38 |
+
div#dup-msg-success {color:#18592A; padding:5px; text-align: left}
|
39 |
+
div#dup-msg-success-subtitle {font-style: italic; margin:7px 0px}
|
40 |
+
div#dup-msg-error {color:#A62426; padding:5px; max-width: 790px;}
|
41 |
+
div#dup-msg-error-response-text { max-height:350px; overflow-y:scroll; border:1px solid silver; border-radius: 3px; padding:8px;background:#fff}
|
42 |
+
|
43 |
+
div.dup-panel {margin-bottom: 25px}
|
44 |
+
div.dup-scan-filter-status {display:inline; float: right; font-size:11px; margin-right:10px; color:#AF0000; font-style: italic}
|
45 |
+
/* SERVER-CHECKS */
|
46 |
+
div.dup-scan-title {display:inline-block; padding:1px; font-weight: bold;}
|
47 |
+
div.dup-scan-title a {display:inline-block; min-width:200px; padding:3px; }
|
48 |
+
div.dup-scan-title a:focus {outline: 1px solid #fff; box-shadow: none}
|
49 |
+
div.dup-scan-title div {display:inline-block; }
|
50 |
+
div.dup-scan-info {display:none; padding:5px 20px 10px 10px}
|
51 |
+
div.dup-scan-good {display:inline-block; color:green;font-weight: bold;}
|
52 |
+
div.dup-scan-warn {display:inline-block; color:#AF0000;font-weight: bold;}
|
53 |
+
span.dup-toggle {float:left; margin:0 2px 2px 0; }
|
54 |
+
/*DATABASE*/
|
55 |
+
table#dup-scan-db-details {line-height: 14px; margin:15px 0px 0px 5px; width:98%}
|
56 |
+
table#dup-scan-db-details td {padding:0px;}
|
57 |
+
table#dup-scan-db-details td:first-child {font-weight: bold; white-space: nowrap; width:90px}
|
58 |
+
div#dup-scan-db-info {margin:0px 0px 0px 10px}
|
59 |
+
div#data-db-tablelist {max-height: 300px; overflow-y: scroll; border: 1px dashed silver; padding: 5px; margin-top:5px}
|
60 |
+
div#data-db-tablelist div{padding:0px 0px 0px 15px;}
|
61 |
+
div#data-db-tablelist span{display:inline-block; min-width: 75px}
|
62 |
+
div#data-db-size1 {display: inline-block; float:right; font-size:11px; margin-right: 15px; font-style: italic}
|
63 |
+
/*FILES */
|
64 |
+
div#data-arc-size1 {display: inline-block; float:right; font-size:11px; margin-right: 15px; font-style: italic}
|
65 |
+
div#data-arc-names-data, div#data-arc-big-data {word-wrap: break-word;font-size:10px; border:1px dashed silver; padding:5px; display: none}
|
66 |
+
|
67 |
+
div#dup-scan-warning-continue {display:none; text-align: center; padding: 0 0 15px 0}
|
68 |
+
div#dup-scan-warning-continue div.msg1 label{font-size:16px; color:maroon}
|
69 |
+
div#dup-scan-warning-continue div.msg2 {padding:2px}
|
70 |
+
div#dup-scan-warning-continue div.msg2 label {font-size:11px !important}
|
71 |
+
|
72 |
+
/*Footer*/
|
73 |
+
div.dup-button-footer {text-align:center; margin:0}
|
74 |
+
button.button {font-size:15px !important; height:30px !important; font-weight:bold; padding:3px 5px 5px 5px !important;}
|
75 |
+
</style>
|
76 |
+
|
77 |
+
<!-- =========================================
|
78 |
+
TOOL BAR: STEPS -->
|
79 |
+
<table id="dup-toolbar">
|
80 |
+
<tr valign="top">
|
81 |
+
<td style="white-space: nowrap">
|
82 |
+
<div id="dup-wiz">
|
83 |
+
<div id="dup-wiz-steps">
|
84 |
+
<div class="completed-step"><a><span>1</span> <?php _e('Setup', 'duplicator'); ?></a></div>
|
85 |
+
<div class="active-step"><a><span>2</span> <?php _e('Scan', 'duplicator'); ?> </a></div>
|
86 |
+
<div><a><span>3</span> <?php _e('Build', 'duplicator'); ?> </a></div>
|
87 |
+
</div>
|
88 |
+
<div id="dup-wiz-title">
|
89 |
+
<?php _e('Step 2: System Scan', 'duplicator'); ?>
|
90 |
+
</div>
|
91 |
+
</div>
|
92 |
+
</td>
|
93 |
+
<td class="dup-toolbar-btns">
|
94 |
+
<a id="dup-pro-create-new" href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e('All Packages', 'duplicator'); ?></a>
|
95 |
+
<span> <?php _e('Create New', 'duplicator'); ?></span>
|
96 |
+
</td>
|
97 |
+
</tr>
|
98 |
+
</table>
|
99 |
+
<hr style="margin-bottom:10px">
|
100 |
+
|
101 |
+
|
102 |
+
<form id="form-duplicator" method="post" action="?page=duplicator&tab=new3">
|
103 |
+
<div id="dup-progress-area">
|
104 |
+
<!-- PROGRESS BAR -->
|
105 |
+
<div id="dup-progress-bar-area">
|
106 |
+
<div class="dup-progress-title"><i class="fa fa-spinner fa-spin"></i> <?php _e('Scanning Site', 'duplicator'); ?></div>
|
107 |
+
<div id="dup-progress-bar"></div>
|
108 |
+
<b><?php _e('Please Wait...', 'duplicator'); ?></b>
|
109 |
+
</div>
|
110 |
+
|
111 |
+
<!-- SUCCESS MESSAGE -->
|
112 |
+
<div id="dup-msg-success" style="display:none">
|
113 |
+
<div style="text-align:center">
|
114 |
+
<div class="dup-hdr-success"><i class="fa fa-check-square-o fa-lg"></i> <?php _e('Scan Complete', 'duplicator'); ?></div>
|
115 |
+
<div id="dup-msg-success-subtitle">
|
116 |
+
<?php _e('Process Time:', 'duplicator'); ?> <span id="data-rpt-scantime"></span>
|
117 |
+
</div>
|
118 |
+
</div><br/>
|
119 |
+
|
120 |
+
<!-- ================================================================
|
121 |
+
META-BOX: SERVER
|
122 |
+
================================================================ -->
|
123 |
+
<div class="dup-panel">
|
124 |
+
<div class="dup-panel-title">
|
125 |
+
<i class="fa fa-hdd-o"></i> <?php _e("Server", 'duplicator'); ?>
|
126 |
+
<div style="float:right; margin:-1px 10px 0px 0px">
|
127 |
+
<small><a href="?page=duplicator-tools&tab=diagnostics" target="_blank"><?php _e('Diagnostics', 'duplicator');?></a></small>
|
128 |
+
</div>
|
129 |
+
|
130 |
+
</div>
|
131 |
+
<div class="dup-panel-panel">
|
132 |
+
<!-- ============
|
133 |
+
WEB SERVER -->
|
134 |
+
<div>
|
135 |
+
<div class='dup-scan-title'>
|
136 |
+
<a><?php _e('Web Server', 'duplicator');?></a> <div id="data-srv-web-all"></div>
|
137 |
+
</div>
|
138 |
+
<div class='dup-scan-info dup-info-box'>
|
139 |
+
<?php
|
140 |
+
$web_servers = implode(', ', $GLOBALS['DUPLICATOR_SERVER_LIST']);
|
141 |
+
echo '<span id="data-srv-web-model"></span> <b>' . __('Web Server', 'duplicator') . ":</b> '{$_SERVER['SERVER_SOFTWARE']}'";
|
142 |
+
echo '<small>';
|
143 |
+
_e("Supported web servers:", 'duplicator');
|
144 |
+
echo "{$web_servers}";
|
145 |
+
echo '</small>';
|
146 |
+
?>
|
147 |
+
</div>
|
148 |
+
</div>
|
149 |
+
<!-- ============
|
150 |
+
PHP SETTINGS -->
|
151 |
+
<div>
|
152 |
+
<div class='dup-scan-title'>
|
153 |
+
<a><?php _e('PHP Setup', 'duplicator');?></a> <div id="data-srv-php-all"></div>
|
154 |
+
</div>
|
155 |
+
<div class='dup-scan-info dup-info-box'>
|
156 |
+
<?php
|
157 |
+
//OPEN_BASEDIR
|
158 |
+
$test = ini_get("open_basedir");
|
159 |
+
echo '<span id="data-srv-php-openbase"></span> <b>' . __('Open Base Dir', 'duplicator') . ":</b> '{$test}' <br/>";
|
160 |
+
echo '<small>';
|
161 |
+
_e('Issues might occur when [open_basedir] is enabled. Work with your server admin to disable this value in the php.ini file if you’re having issues building a package.', 'duplicator');
|
162 |
+
echo " <i><a href='http://www.php.net/manual/en/ini.core.php#ini.open-basedir' target='_blank'>[" . __('details', 'duplicator') . "]</a></i><br/>";
|
163 |
+
echo '</small>';
|
164 |
+
|
165 |
+
//MAX_EXECUTION_TIME
|
166 |
+
$test = (set_time_limit(0)) ? 0 : ini_get("max_execution_time");
|
167 |
+
echo '<hr size="1" /><span id="data-srv-php-maxtime"></span> <b>' . __('Max Execution Time', 'duplicator') . ":</b> '{$test}' <br/>";
|
168 |
+
echo '<small>';
|
169 |
+
printf(__('Issues might occur for larger packages when the [max_execution_time] value in the php.ini is too low. The minimum recommended timeout is "%1$s" seconds or higher. An attempt is made to override this value if the server allows it. A value of 0 (recommended) indicates that PHP has no time limits.', 'duplicator'), DUPLICATOR_SCAN_TIMEOUT);
|
170 |
+
echo '<br/><br/>';
|
171 |
+
_e('Note: Timeouts can also be set at the web server layer, so if the PHP max timeout passes and you still see a build interrupt messages, then your web server could be killing the process. If you are limited on processing time, consider using the database or file filters to shrink the size of your overall package. However use caution as excluding the wrong resources can cause your install to not work properly.', 'duplicator');
|
172 |
+
echo " <i><a href='http://www.php.net/manual/en/info.configuration.php#ini.max-execution-time' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
173 |
+
|
174 |
+
if ($zip_check != null) {
|
175 |
+
echo '<br/><br/>';
|
176 |
+
echo '<span style="font-weight:bold">';
|
177 |
+
_e('Get faster builds with Duplicator Pro.', 'duplicator');
|
178 |
+
echo '</span>';
|
179 |
+
echo " <i><a href='http://snapcreek.com/duplicator?free-max-execution-time-warn' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
180 |
+
}
|
181 |
+
|
182 |
+
echo '</small>';
|
183 |
+
|
184 |
+
//MYSQLI
|
185 |
+
echo '<hr size="1" /><span id="data-srv-php-mysqli"></span> <b>' . __('MySQLi', 'duplicator') . "</b> <br/>";
|
186 |
+
echo '<small>';
|
187 |
+
_e('Creating the package does not require the mysqli module. However the installer.php file requires that the PHP module mysqli be installed on the server it is deployed on.', 'duplicator');
|
188 |
+
echo " <i><a href='http://php.net/manual/en/mysqli.installation.php' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
189 |
+
echo '</small>';
|
190 |
+
?>
|
191 |
+
</div>
|
192 |
+
</div>
|
193 |
+
<!-- ============
|
194 |
+
WORDPRESS SETTINGS -->
|
195 |
+
<div>
|
196 |
+
<div class='dup-scan-title'>
|
197 |
+
<a><?php _e('WordPress', 'duplicator');?></a> <div id="data-srv-wp-all"></div>
|
198 |
+
</div>
|
199 |
+
<div class='dup-scan-info dup-info-box'>
|
200 |
+
<?php
|
201 |
+
//VERSION CHECK
|
202 |
+
echo '<span id="data-srv-wp-version"></span> <b>' . __('WordPress Version', 'duplicator') . ":</b> '{$wp_version}' <br/>";
|
203 |
+
echo '<small>';
|
204 |
+
printf(__('It is recommended to have a version of WordPress that is greater than %1$s', 'duplicator'), DUPLICATOR_SCAN_MIN_WP);
|
205 |
+
echo '</small>';
|
206 |
+
|
207 |
+
//CORE FILES
|
208 |
+
echo '<hr size="1" /><span id="data-srv-wp-core"></span> <b>' . __('Core Files', 'duplicator') . "</b> <br/>";
|
209 |
+
echo '<small>';
|
210 |
+
_e("If the scanner is unable to locate the wp-config.php file in the root directory, then you will need to manually copy it to its new location.", 'duplicator');
|
211 |
+
echo '</small>';
|
212 |
+
|
213 |
+
//CACHE DIR
|
214 |
+
$cache_path = $cache_path = DUP_Util::SafePath(WP_CONTENT_DIR) . '/cache';
|
215 |
+
$cache_size = DUP_Util::ByteSize(DUP_Util::GetDirectorySize($cache_path));
|
216 |
+
echo '<hr size="1" /><span id="data-srv-wp-cache"></span> <b>' . __('Cache Path', 'duplicator') . ":</b> '{$cache_path}' ({$cache_size}) <br/>";
|
217 |
+
echo '<small>';
|
218 |
+
_e("Cached data will lead to issues at install time and increases your archive size. It is recommended to empty your cache directory at build time. Use caution when removing data from the cache directory. If you have a cache plugin review the documentation for how to empty it; simply removing files might cause errors on your site. The cache size minimum threshold is currently set at ", 'duplicator');
|
219 |
+
echo DUP_Util::ByteSize(DUPLICATOR_SCAN_CACHESIZE) . '.';
|
220 |
+
echo '</small>';
|
221 |
+
|
222 |
+
?>
|
223 |
+
</div>
|
224 |
+
</div>
|
225 |
+
</div><!-- end .dup-panel -->
|
226 |
+
</div><!-- end .dup-panel-panel -->
|
227 |
+
|
228 |
+
<h2 style="font-size:18px; font-weight:bold; margin:-15px 0 0 10px"><i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator');?> </h2>
|
229 |
+
|
230 |
+
<!-- ================================================================
|
231 |
+
FILES
|
232 |
+
================================================================ -->
|
233 |
+
<div class="dup-panel">
|
234 |
+
<div class="dup-panel-title">
|
235 |
+
<i class="fa fa-files-o"></i>
|
236 |
+
<?php _e("Files", 'duplicator'); ?>
|
237 |
+
<div id="data-arc-size1"></div>
|
238 |
+
<div class="dup-scan-filter-status">
|
239 |
+
<?php
|
240 |
+
if ($Package->Archive->FilterOn) {
|
241 |
+
echo '<i class="fa fa-filter"></i> '; _e('Enabled', 'duplicator');
|
242 |
+
}
|
243 |
+
?>
|
244 |
+
</div>
|
245 |
+
</div>
|
246 |
+
<div class="dup-panel-panel">
|
247 |
+
|
248 |
+
<!-- ============
|
249 |
+
TOTAL SIZE -->
|
250 |
+
<div>
|
251 |
+
<div class='dup-scan-title'>
|
252 |
+
<a><?php _e('Total Size', 'duplicator');?></a> <div id="data-arc-status-size"></div>
|
253 |
+
</div>
|
254 |
+
<div class='dup-scan-info dup-info-box'>
|
255 |
+
<b><?php _e('Size', 'duplicator');?>:</b> <span id="data-arc-size2"></span> |
|
256 |
+
<b><?php _e('File Count', 'duplicator');?>:</b> <span id="data-arc-files"></span> |
|
257 |
+
<b><?php _e('Directory Count', 'duplicator');?>:</b> <span id="data-arc-dirs"></span>
|
258 |
+
<small>
|
259 |
+
<?php
|
260 |
+
printf(__('Total size represents all files minus any filters that have been setup. The current thresholds that triggers a warning is %1$s for the total size. Some budget hosts limit the amount of time a PHP/Web request process can run. When working with larger sites this can cause timeout issues. Consider using a file filter in step 1 to shrink and filter the overall size of your package.', 'duplicator'),
|
261 |
+
DUP_Util::ByteSize(DUPLICATOR_SCAN_SITE),
|
262 |
+
DUP_Util::ByteSize(DUPLICATOR_SCAN_WARNFILESIZE));
|
263 |
+
|
264 |
+
if ($zip_check != null) {
|
265 |
+
echo '<br/><br/>';
|
266 |
+
echo '<span style="font-weight:bold">';
|
267 |
+
_e('Package support up to 2GB available in Duplicator Pro.', 'duplicator');
|
268 |
+
echo '</span>';
|
269 |
+
echo " <i><a href='http://snapcreek.com/duplicator?free-size-warn' target='_blank'>[" . __('details', 'duplicator') . "]</a></i>";
|
270 |
+
}
|
271 |
+
|
272 |
+
?>
|
273 |
+
</small>
|
274 |
+
</div>
|
275 |
+
</div>
|
276 |
+
|
277 |
+
<!-- ============
|
278 |
+
FILE NAME LENGTHS -->
|
279 |
+
<div>
|
280 |
+
<div class='dup-scan-title'>
|
281 |
+
<a><?php _e('Name Checks', 'duplicator');?></a> <div id="data-arc-status-names"></div>
|
282 |
+
</div>
|
283 |
+
<div class='dup-scan-info dup-info-box'>
|
284 |
+
<small>
|
285 |
+
<?php
|
286 |
+
_e('File or directory names may cause issues when working across different environments and servers. Names that are over 250 characters, contain special characters (such as * ? > < : / \ |) or are unicode might cause issues in a remote enviroment. It is recommended to remove or filter these files before building the archive if you have issues at install time.', 'duplicator');
|
287 |
+
?>
|
288 |
+
</small><br/>
|
289 |
+
<a href="javascript:void(0)" onclick="jQuery('#data-arc-names-data').toggle()">[<?php _e('Show Paths', 'duplicator');?>]</a>
|
290 |
+
<div id="data-arc-names-data"></div>
|
291 |
+
</div>
|
292 |
+
</div>
|
293 |
+
|
294 |
+
<!-- ============
|
295 |
+
LARGE FILES -->
|
296 |
+
<div>
|
297 |
+
<div class='dup-scan-title'>
|
298 |
+
<a><?php _e('Large Files', 'duplicator');?></a> <div id="data-arc-status-big"></div>
|
299 |
+
</div>
|
300 |
+
<div class='dup-scan-info dup-info-box'>
|
301 |
+
<small>
|
302 |
+
<?php
|
303 |
+
printf(__('Large files such as movies or other backuped data can cause issues with timeouts. The current check for large files is %1$s per file. If your having issues creating a package consider excluding these files with the files filter and manually moving them to your new location.', 'duplicator'),
|
304 |
+
DUP_Util::ByteSize(DUPLICATOR_SCAN_WARNFILESIZE));
|
305 |
+
?>
|
306 |
+
</small><br/>
|
307 |
+
<a href="javascript:void(0)" onclick="jQuery('#data-arc-big-data').toggle()">[<?php _e('Show Paths', 'duplicator');?>]</a>
|
308 |
+
<div id="data-arc-big-data"></div>
|
309 |
+
</div>
|
310 |
+
</div>
|
311 |
+
|
312 |
+
<!-- ============
|
313 |
+
VIEW FILTERS -->
|
314 |
+
<?php if ($Package->Archive->FilterOn) : ?>
|
315 |
+
<div>
|
316 |
+
<div class='dup-scan-title'>
|
317 |
+
<a style='font-weight: normal'><?php _e('Archive Details', 'duplicator');?></a>
|
318 |
+
</div>
|
319 |
+
<div class='dup-scan-info dup-info-box'>
|
320 |
+
<b>[<?php _e('Root Directory', 'duplicator');?>]</b><br/>
|
321 |
+
<?php echo DUPLICATOR_WPROOTPATH;?>
|
322 |
+
<br/><br/>
|
323 |
+
|
324 |
+
<b>[<?php _e('Excluded Directories', 'duplicator');?>]</b><br/>
|
325 |
+
<?php
|
326 |
+
if (strlen( $Package->Archive->FilterDirs)) {
|
327 |
+
echo str_replace(";", "<br/>", $Package->Archive->FilterDirs);
|
328 |
+
} else {
|
329 |
+
_e('No directory filters have been set.', 'duplicator');
|
330 |
+
}
|
331 |
+
?>
|
332 |
+
<br/>
|
333 |
+
|
334 |
+
<b>[<?php _e('Excluded File Extensions', 'duplicator');?>]</b><br/>
|
335 |
+
<?php
|
336 |
+
if (strlen( $Package->Archive->FilterExts)) {
|
337 |
+
echo $Package->Archive->FilterExts;
|
338 |
+
} else {
|
339 |
+
_e('No file extension filters have been set.', 'duplicator');
|
340 |
+
}
|
341 |
+
?>
|
342 |
+
<small>
|
343 |
+
<?php
|
344 |
+
_e('The root directory is where Duplicator starts archiving files. The excluded sections will be skipped during the archive process. ', 'duplicator');
|
345 |
+
_e('All results are stored in a json file. ', 'duplicator');
|
346 |
+
?>
|
347 |
+
<a href="<?php echo DUPLICATOR_SITE_URL ?>/wp-admin/admin-ajax.php?action=duplicator_package_scan" target="dup_report"><?php _e('[view json report]', 'duplicator');?></a>
|
348 |
+
</small><br/>
|
349 |
+
</div>
|
350 |
+
</div>
|
351 |
+
<?php endif; ?>
|
352 |
+
</div><!-- end .dup-panel -->
|
353 |
+
<br/>
|
354 |
+
|
355 |
+
<!-- ================================================================
|
356 |
+
DATABASE
|
357 |
+
================================================================ -->
|
358 |
+
<div class="dup-panel-title">
|
359 |
+
<i class="fa fa-table"></i>
|
360 |
+
<?php _e("Database", 'duplicator'); ?>
|
361 |
+
<div id="data-db-size1"></div>
|
362 |
+
<div class="dup-scan-filter-status">
|
363 |
+
<?php
|
364 |
+
if ($Package->Database->FilterOn) {
|
365 |
+
echo '<i class="fa fa-filter"></i> '; _e('Enabled', 'duplicator');
|
366 |
+
}
|
367 |
+
?>
|
368 |
+
</div>
|
369 |
+
</div>
|
370 |
+
<div class="dup-panel-panel" id="dup-scan-db">
|
371 |
+
|
372 |
+
<!-- ============
|
373 |
+
TOTAL SIZE -->
|
374 |
+
<div>
|
375 |
+
<div class='dup-scan-title'>
|
376 |
+
<a><?php _e('Total Size', 'duplicator');?></a>
|
377 |
+
<div id="data-db-status-size"></div>
|
378 |
+
</div>
|
379 |
+
<div class='dup-scan-info dup-info-box'>
|
380 |
+
<b><?php _e('Size', 'duplicator');?>:</b> <span id="data-db-size2"></span> |
|
381 |
+
<b><?php _e('Tables', 'duplicator');?>:</b> <span id="data-db-tablecount"></span> |
|
382 |
+
<b><?php _e('Records', 'duplicator');?>:</b> <span id="data-db-rows"></span>
|
383 |
+
<br/><br/>
|
384 |
+
<?php
|
385 |
+
//OVERVIEW
|
386 |
+
echo '<b>' . __('Overview:', 'duplicator') . '</b><br/>';
|
387 |
+
printf(__('Total size and row count for all database tables are approximate values. The thresholds that trigger warnings are %1$s OR %2$s records total for the entire database. The larger the databases the more time it takes to process and execute. This can cause issues with budget hosts that have cpu/memory limits, and timeout constraints.', 'duplicator'),
|
388 |
+
DUP_Util::ByteSize(DUPLICATOR_SCAN_DB_ALL_SIZE),
|
389 |
+
number_format(DUPLICATOR_SCAN_DB_ALL_ROWS));
|
390 |
+
|
391 |
+
//OPTIONS
|
392 |
+
echo '<br/><br/>';
|
393 |
+
echo '<b>' . __('Options:', 'duplicator') . '</b><br/>';
|
394 |
+
$lnk = '<a href="maint/repair.php" target="_blank">' . __('Repair and Optimization', 'duplicator') . '</a>';
|
395 |
+
printf(__('1. Running a %1$s on your database will help to improve the overall size, performance and efficiency of the database.', 'duplicator'), $lnk);
|
396 |
+
echo '<br/><br/>';
|
397 |
+
$lnk = '<a href="?page=duplicator-settings" target="_blank">' . __('Duplicator Settings', 'duplicator') . '</a>';
|
398 |
+
printf(__('2. If your server supports shell_exec and mysqldump it is recommended to enable this option from the %1$s menu.', 'duplicator'), $lnk);
|
399 |
+
echo '<br/><br/>';
|
400 |
+
_e('3. Consider removing data from tables that store logging, statistical or other non-critical information about your site.', 'duplicator');
|
401 |
+
?>
|
402 |
+
</div>
|
403 |
+
</div>
|
404 |
+
|
405 |
+
<!-- ============
|
406 |
+
TABLE DETAILS -->
|
407 |
+
<div>
|
408 |
+
<div class='dup-scan-title'>
|
409 |
+
<a><?php _e('Table Details', 'duplicator');?></a>
|
410 |
+
<div id="data-db-status-details"></div>
|
411 |
+
</div>
|
412 |
+
<div class='dup-scan-info dup-info-box'>
|
413 |
+
|
414 |
+
<?php
|
415 |
+
//OVERVIEW
|
416 |
+
echo '<b>' . __('Overview:', 'duplicator') . '</b><br/>';
|
417 |
+
printf(__('The thresholds that trigger warnings for individual tables are %1$s OR %2$s records OR tables names with upper-case characters. The larger the table the more time it takes to process and execute. This can cause issues with budget hosts that have cpu/memory limits, and timeout constraints.', 'duplicator'),
|
418 |
+
DUP_Util::ByteSize(DUPLICATOR_SCAN_DB_TBL_SIZE),
|
419 |
+
number_format(DUPLICATOR_SCAN_DB_TBL_ROWS));
|
420 |
+
|
421 |
+
//OPTIONS
|
422 |
+
echo '<br/><br/>';
|
423 |
+
echo '<b>' . __('Options:', 'duplicator') . '</b><br/>';
|
424 |
+
$lnk = '<a href="maint/repair.php" target="_blank">' . __('Repair and Optimization', 'duplicator') . '</a>';
|
425 |
+
printf(__('1. Run a %1$s on the table to improve the overall size and performance.', 'duplicator'), $lnk);
|
426 |
+
echo '<br/><br/>';
|
427 |
+
_e('2. Remove stale date from tables such as logging, statistical or other non-critical data.', 'duplicator');
|
428 |
+
echo '<br/><br/>';
|
429 |
+
$lnk = '<a href="http://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_lower_case_table_names" target="_blank">' . __('lower_case_table_names', 'duplicator') . '</a>';
|
430 |
+
printf(__('3. For table name case sensitivity issues either rename the table with lower case characters or be pre-paired to work with the %1$s system variable setting.', 'duplicator'), $lnk);
|
431 |
+
echo '<br/><br/>';
|
432 |
+
|
433 |
+
echo '<b>' . __('Tables:', 'duplicator') . '</b><br/>';
|
434 |
+
?>
|
435 |
+
|
436 |
+
|
437 |
+
|
438 |
+
<div id="dup-scan-db-info">
|
439 |
+
<div id="data-db-tablelist"></div>
|
440 |
+
</div>
|
441 |
+
</div>
|
442 |
+
</div>
|
443 |
+
|
444 |
+
<table id="dup-scan-db-details">
|
445 |
+
<tr><td><b><?php _e('Name:', 'duplicator');?></b></td><td><?php echo DB_NAME ;?> </td></tr>
|
446 |
+
<tr><td><b><?php _e('Host:', 'duplicator');?></b></td><td><?php echo DB_HOST ;?> </td></tr>
|
447 |
+
<tr>
|
448 |
+
<td style="vertical-align: top"><b><?php _e('Build Mode:', 'duplicator');?></b></td>
|
449 |
+
<td style="line-height:18px">
|
450 |
+
<a href="?page=duplicator-settings" target="_blank"><?php echo $dbbuild_mode ;?></a>
|
451 |
+
<?php if ($mysqlcompat_on) :?>
|
452 |
+
<br/>
|
453 |
+
<small style="font-style:italic; color:maroon">
|
454 |
+
<i class="fa fa-exclamation-circle"></i> <?php _e('MySQL Compatibility Mode Enabled', 'duplicator'); ?>
|
455 |
+
<a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php _e('details', 'duplicator'); ?>]</a>
|
456 |
+
</small>
|
457 |
+
<?php endif;?>
|
458 |
+
</td>
|
459 |
+
</tr>
|
460 |
+
</table>
|
461 |
+
|
462 |
+
</div><!-- end .dup-panel -->
|
463 |
+
</div><!-- end .dup-panel-panel -->
|
464 |
+
|
465 |
+
<!-- WARNING CONTINUE -->
|
466 |
+
<div id="dup-scan-warning-continue">
|
467 |
+
<div class="msg1">
|
468 |
+
<input type="checkbox" id="dup-scan-warning-continue-checkbox" onclick="Duplicator.Pack.WarningContinue(this)"/>
|
469 |
+
<label for="dup-scan-warning-continue-checkbox"><?php _e('A warning status was detected, are you sure you want to continue?', 'duplicator');?></label>
|
470 |
+
</div>
|
471 |
+
<div class="msg2">
|
472 |
+
<label for="dup-scan-warning-continue-checkbox">
|
473 |
+
<?php
|
474 |
+
_e("Scan checks are not required to pass, however they could cause issues on some systems.", 'duplicator');
|
475 |
+
echo '<br/>';
|
476 |
+
_e("Please review the details for each warning by clicking on the detail link.", 'duplicator');
|
477 |
+
?>
|
478 |
+
</label>
|
479 |
+
</div>
|
480 |
+
</div>
|
481 |
+
|
482 |
+
</div>
|
483 |
+
|
484 |
+
|
485 |
+
|
486 |
+
<!-- ERROR MESSAGE -->
|
487 |
+
<div id="dup-msg-error" style="display:none">
|
488 |
+
<div class="dup-hdr-error"><i class="fa fa-exclamation-circle"></i> <?php _e('Scan Error', 'duplicator'); ?></div>
|
489 |
+
<i><?php _e('Please try again!', 'duplicator'); ?></i><br/>
|
490 |
+
<div style="text-align:left">
|
491 |
+
<b><?php _e("Server Status:", 'duplicator'); ?></b>
|
492 |
+
<div id="dup-msg-error-response-status" style="display:inline-block"></div><br/>
|
493 |
+
|
494 |
+
<b><?php _e("Error Message:", 'duplicator'); ?></b>
|
495 |
+
<div id="dup-msg-error-response-text"></div>
|
496 |
+
</div>
|
497 |
+
</div>
|
498 |
+
</div> <!-- end #dup-progress-area -->
|
499 |
+
|
500 |
+
<div class="dup-button-footer" style="display:none">
|
501 |
+
<input type="button" value="◄ <?php _e("Back", 'duplicator') ?>" onclick="window.location.assign('?page=duplicator&tab=new1')" class="button button-large" />
|
502 |
+
<input type="button" value="<?php _e("Rescan", 'duplicator') ?>" onclick="Duplicator.Pack.Rescan()" class="button button-large" />
|
503 |
+
<input type="submit" value="<?php _e("Build", 'duplicator') ?> ►" class="button button-primary button-large" id="dup-build-button" />
|
504 |
+
</div>
|
505 |
+
</form>
|
506 |
+
|
507 |
+
<script type="text/javascript">
|
508 |
+
jQuery(document).ready(function($) {
|
509 |
+
|
510 |
+
/* Performs Ajax post to create check system */
|
511 |
+
Duplicator.Pack.Scan = function() {
|
512 |
+
var data = {action : 'duplicator_package_scan'}
|
513 |
+
|
514 |
+
$.ajax({
|
515 |
+
type: "POST",
|
516 |
+
url: ajaxurl,
|
517 |
+
dataType: "json",
|
518 |
+
timeout: 10000000,
|
519 |
+
data: data,
|
520 |
+
complete: function() {$('.dup-button-footer').show()},
|
521 |
+
success: function(data) {
|
522 |
+
Duplicator.Pack.LoadScanData(data)
|
523 |
+
//Imacros testing required
|
524 |
+
$('#dup-automation-imacros').html('<input type="hidden" id="dup-finished" value="done" />');
|
525 |
+
},
|
526 |
+
error: function(data) {
|
527 |
+
$('#dup-progress-bar-area').hide();
|
528 |
+
var status = data.status + ' -' + data.statusText;
|
529 |
+
$('#dup-msg-error-response-status').html(status)
|
530 |
+
$('#dup-msg-error-response-text').html(data.responseText);
|
531 |
+
$('#dup-msg-error').show(200);
|
532 |
+
console.log(data);
|
533 |
+
}
|
534 |
+
});
|
535 |
+
}
|
536 |
+
|
537 |
+
Duplicator.Pack.Rescan = function() {
|
538 |
+
$('#dup-msg-success,#dup-msg-error,.dup-button-footer').hide();
|
539 |
+
$('#dup-progress-bar-area').show();
|
540 |
+
Duplicator.Pack.Scan();
|
541 |
+
}
|
542 |
+
|
543 |
+
Duplicator.Pack.WarningContinue = function(checkbox) {
|
544 |
+
($(checkbox).is(':checked'))
|
545 |
+
? $('#dup-build-button').prop('disabled',false).addClass('button-primary')
|
546 |
+
: $('#dup-build-button').prop('disabled',true).removeClass('button-primary');
|
547 |
+
|
548 |
+
}
|
549 |
+
|
550 |
+
Duplicator.Pack.LoadScanStatus = function(status) {
|
551 |
+
var result;
|
552 |
+
switch (status) {
|
553 |
+
case false : result = '<div class="dup-scan-warn"><i class="fa fa-exclamation-triangle"></i></div>'; break;
|
554 |
+
case 'Warn' : result = '<div class="dup-scan-warn"><i class="fa fa-exclamation-triangle"></i> Warn</div>'; break;
|
555 |
+
case true : result = '<div class="dup-scan-good"><i class="fa fa-check"></i></div>'; break;
|
556 |
+
case 'Good' : result = '<div class="dup-scan-good"><i class="fa fa-check"></i> Good</div>'; break;
|
557 |
+
default :
|
558 |
+
result = 'unable to read';
|
559 |
+
}
|
560 |
+
return result;
|
561 |
+
}
|
562 |
+
|
563 |
+
/* Load Scan Data */
|
564 |
+
Duplicator.Pack.LoadScanData = function(data) {
|
565 |
+
|
566 |
+
var errMsg = "unable to read";
|
567 |
+
$('#dup-progress-bar-area').hide();
|
568 |
+
|
569 |
+
//****************
|
570 |
+
//REPORT
|
571 |
+
var base = $('#data-rpt-scanfile').attr('href');
|
572 |
+
$('#data-rpt-scanfile').attr('href', base + '&scanfile=' + data.RPT.ScanFile);
|
573 |
+
$('#data-rpt-scantime').text(data.RPT.ScanTime || 0);
|
574 |
+
|
575 |
+
|
576 |
+
//****************
|
577 |
+
//SERVER
|
578 |
+
$('#data-srv-web-model').html(Duplicator.Pack.LoadScanStatus(data.SRV.WEB.model));
|
579 |
+
$('#data-srv-web-all').html(Duplicator.Pack.LoadScanStatus(data.SRV.WEB.ALL));
|
580 |
+
|
581 |
+
$('#data-srv-php-openbase').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.openbase));
|
582 |
+
$('#data-srv-php-maxtime').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.maxtime));
|
583 |
+
$('#data-srv-php-mysqli').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.mysqli));
|
584 |
+
$('#data-srv-php-openssl').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.openssl));
|
585 |
+
$('#data-srv-php-all').html(Duplicator.Pack.LoadScanStatus(data.SRV.PHP.ALL));
|
586 |
+
|
587 |
+
$('#data-srv-wp-version').html(Duplicator.Pack.LoadScanStatus(data.SRV.WP.version));
|
588 |
+
$('#data-srv-wp-core').html(Duplicator.Pack.LoadScanStatus(data.SRV.WP.core));
|
589 |
+
$('#data-srv-wp-cache').html(Duplicator.Pack.LoadScanStatus(data.SRV.WP.cache));
|
590 |
+
$('#data-srv-wp-all').html(Duplicator.Pack.LoadScanStatus(data.SRV.WP.ALL));
|
591 |
+
|
592 |
+
//****************
|
593 |
+
//DATABASE
|
594 |
+
var html = "";
|
595 |
+
var DB_TotalSize = 'Good';
|
596 |
+
var DB_TableDetails = 'Good';
|
597 |
+
var DB_TableRowMax = <?php echo DUPLICATOR_SCAN_DB_TBL_ROWS; ?>;
|
598 |
+
var DB_TableSizeMax = <?php echo DUPLICATOR_SCAN_DB_TBL_SIZE; ?>;
|
599 |
+
if (data.DB.Status.Success)
|
600 |
+
{
|
601 |
+
DB_TotalSize = data.DB.Status.DB_Rows == 'Warn' || data.DB.Status.DB_Size == 'Warn' ? 'Warn' : 'Good';
|
602 |
+
DB_TableDetails = data.DB.Status.TBL_Rows == 'Warn' || data.DB.Status.TBL_Size == 'Warn' || data.DB.Status.TBL_Case == 'Warn' ? 'Warn' : 'Good';
|
603 |
+
|
604 |
+
$('#data-db-status-size').html(Duplicator.Pack.LoadScanStatus(DB_TotalSize));
|
605 |
+
$('#data-db-status-details').html(Duplicator.Pack.LoadScanStatus(DB_TableDetails));
|
606 |
+
$('#data-db-size1').text(data.DB.Size || errMsg);
|
607 |
+
$('#data-db-size2').text(data.DB.Size || errMsg);
|
608 |
+
$('#data-db-rows').text(data.DB.Rows || errMsg);
|
609 |
+
$('#data-db-tablecount').text(data.DB.TableCount || errMsg);
|
610 |
+
//Table Details
|
611 |
+
if (data.DB.TableList == undefined || data.DB.TableList.length == 0) {
|
612 |
+
html = '<?php _e("Unable to report on any tables", 'duplicator') ?>';
|
613 |
+
} else {
|
614 |
+
$.each(data.DB.TableList, function(i) {
|
615 |
+
html += '<b>' + i + '</b><br/>';
|
616 |
+
$.each(data.DB.TableList[i], function(key,val) {
|
617 |
+
html += (key == 'Case' && val == 1) || (key == 'Rows' && val > DB_TableRowMax) || (key == 'Size' && parseInt(val) > DB_TableSizeMax)
|
618 |
+
? '<div style="color:red"><span>' + key + ':</span>' + val + '</div>'
|
619 |
+
: '<div><span>' + key + ':</span>' + val + '</div>';
|
620 |
+
});
|
621 |
+
});
|
622 |
+
}
|
623 |
+
$('#data-db-tablelist').append(html);
|
624 |
+
} else {
|
625 |
+
html = '<?php _e("Unable to report on database stats", 'duplicator') ?>';
|
626 |
+
$('#dup-scan-db').html(html);
|
627 |
+
}
|
628 |
+
|
629 |
+
//****************
|
630 |
+
//ARCHIVE
|
631 |
+
$('#data-arc-status-size').html(Duplicator.Pack.LoadScanStatus(data.ARC.Status.Size));
|
632 |
+
$('#data-arc-status-names').html(Duplicator.Pack.LoadScanStatus(data.ARC.Status.Names));
|
633 |
+
$('#data-arc-status-big').html(Duplicator.Pack.LoadScanStatus(data.ARC.Status.Big));
|
634 |
+
$('#data-arc-size1').text(data.ARC.Size || errMsg);
|
635 |
+
$('#data-arc-size2').text(data.ARC.Size || errMsg);
|
636 |
+
$('#data-arc-files').text(data.ARC.FileCount || errMsg);
|
637 |
+
$('#data-arc-dirs').text(data.ARC.DirCount || errMsg);
|
638 |
+
|
639 |
+
|
640 |
+
|
641 |
+
//Name Checks
|
642 |
+
html = '';
|
643 |
+
//Dirs
|
644 |
+
if (data.ARC.FilterInfo.Dirs.Warning !== undefined && data.ARC.FilterInfo.Dirs.Warning.length > 0) {
|
645 |
+
$.each(data.ARC.FilterInfo.Dirs.Warning, function (key, val) {
|
646 |
+
html += '<?php _e("DIR", 'duplicator') ?> ' + key + ':<br/>[' + val + ']<br/>';
|
647 |
+
});
|
648 |
+
}
|
649 |
+
//Files
|
650 |
+
if (data.ARC.FilterInfo.Files.Warning !== undefined && data.ARC.FilterInfo.Files.Warning.length > 0) {
|
651 |
+
$.each(data.ARC.FilterInfo.Files.Warning, function (key, val) {
|
652 |
+
html += '<?php _e("FILE", 'duplicator') ?> ' + key + ':<br/>[' + val + ']<br/>';
|
653 |
+
});
|
654 |
+
}
|
655 |
+
html = (html.length == 0) ? '<?php _e("No name warning issues found.", 'duplicator') ?>' : html;
|
656 |
+
|
657 |
+
|
658 |
+
$('#data-arc-names-data').html(html);
|
659 |
+
|
660 |
+
//Large Files
|
661 |
+
html = '<?php _e("No large files found.", 'duplicator') ?>';
|
662 |
+
if (data.ARC.FilterInfo.Files.Size !== undefined && data.ARC.FilterInfo.Files.Size.length > 0) {
|
663 |
+
html = '';
|
664 |
+
$.each(data.ARC.FilterInfo.Files.Size, function (key, val) {
|
665 |
+
html += '<?php _e("FILE", 'duplicator') ?> ' + key + ':<br/>' + val + '<br/>';
|
666 |
+
});
|
667 |
+
}
|
668 |
+
$('#data-arc-big-data').html(html);
|
669 |
+
$('#dup-msg-success').show();
|
670 |
+
|
671 |
+
//Waring Check
|
672 |
+
var warnCount = data.RPT.Warnings || 0;
|
673 |
+
if (warnCount > 0) {
|
674 |
+
$('#dup-scan-warning-continue').show();
|
675 |
+
$('#dup-build-button').prop("disabled",true).removeClass('button-primary');
|
676 |
+
} else {
|
677 |
+
$('#dup-scan-warning-continue').hide();
|
678 |
+
$('#dup-build-button').prop("disabled",false).addClass('button-primary');
|
679 |
+
}
|
680 |
+
|
681 |
+
}
|
682 |
+
|
683 |
+
//Page Init:
|
684 |
+
Duplicator.UI.AnimateProgressBar('dup-progress-bar');
|
685 |
+
Duplicator.Pack.Scan();
|
686 |
+
|
687 |
+
//Init: Toogle for system requirment detial links
|
688 |
+
$('.dup-scan-title a').each(function() {
|
689 |
+
$(this).attr('href', 'javascript:void(0)');
|
690 |
+
$(this).click({selector : '.dup-scan-info'}, Duplicator.Pack.ToggleSystemDetails);
|
691 |
+
$(this).prepend("<span class='ui-icon ui-icon-triangle-1-e dup-toggle' />");
|
692 |
+
});
|
693 |
+
|
694 |
+
});
|
695 |
</script>
|
views/packages/{new3.base.php → main/new3.build.php}
RENAMED
@@ -1,205 +1,204 @@
|
|
1 |
-
<?php
|
2 |
-
require_once (DUPLICATOR_PLUGIN_PATH . 'classes/package.php');
|
3 |
-
$Package = DUP_Package::GetActive();
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
div
|
11 |
-
div
|
12 |
-
div#dup-progress-area
|
13 |
-
div#dup-progress-area
|
14 |
-
div#dup-
|
15 |
-
div#dup-msg-success
|
16 |
-
div#dup-msg-
|
17 |
-
div
|
18 |
-
div.dup-msg-
|
19 |
-
div.dup-msg-success-
|
20 |
-
div
|
21 |
-
div#dup-
|
22 |
-
div#dup-
|
23 |
-
div#dup-logs {text-
|
24 |
-
div
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
<
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
<div class="completed-step"><a><span>
|
38 |
-
<div class="
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
<
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
<div
|
60 |
-
<
|
61 |
-
<
|
62 |
-
<i><?php _e('
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
<div class="dup-panel-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
<b><?php _e('
|
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 |
-
<span class="
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
<span class="
|
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 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
$('#dup-progress-
|
170 |
-
|
171 |
-
|
172 |
-
var Pack =
|
173 |
-
var
|
174 |
-
|
175 |
-
|
176 |
-
$('#
|
177 |
-
$('#data-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
$('#dup-btn-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
$('#dup-progress-
|
189 |
-
|
190 |
-
var
|
191 |
-
|
192 |
-
$('#dup-msg-error-response-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
Duplicator.
|
202 |
-
|
203 |
-
|
204 |
-
});
|
205 |
</script>
|
1 |
+
<?php
|
2 |
+
require_once (DUPLICATOR_PLUGIN_PATH . 'classes/package.php');
|
3 |
+
$Package = DUP_Package::GetActive();
|
4 |
+
$ajax_nonce = wp_create_nonce('dup_package_build');
|
5 |
+
|
6 |
+
?>
|
7 |
+
|
8 |
+
<style>
|
9 |
+
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;}
|
10 |
+
div.dup-progress-title {font-size:22px;padding:5px 0 20px 0; font-weight: bold}
|
11 |
+
div#dup-progress-area div.inner {padding:10px; line-height:22px}
|
12 |
+
div#dup-progress-area h2.title {background-color:#efefef; margin:0px}
|
13 |
+
div#dup-progress-area span.label {font-weight:bold}
|
14 |
+
div#dup-msg-success {color:#18592A; padding:5px;}
|
15 |
+
div#dup-msg-success fieldset,
|
16 |
+
div#dup-msg-error fieldset {text-align:left; width:95%; border:1px solid #dfdfdf; border-radius:5px;}
|
17 |
+
div.dup-msg-error-area {overflow-y: scroll; padding:5px 15px 5px 15px; max-height:150px; max-width: 700px}
|
18 |
+
div.dup-msg-success-stats{color:#999;margin:10px 0px 0px 0px}
|
19 |
+
div.dup-msg-success-links {margin:20px 5px 5px 5px; font-size: 14px; font-weight: bold}
|
20 |
+
div#dup-msg-error {color:#A62426; padding:5px;}
|
21 |
+
div#dup-progress-area div.done-title {font-size:22px; font-weight:bold; margin:0px 0px 10px 0px}
|
22 |
+
div#dup-logs {text-align:center; margin:auto; padding:5px; width:350px;}
|
23 |
+
div#dup-logs a {font-size:15px; text-decoration:none !important; display:inline-block; margin:20px 0px 5px 0px}
|
24 |
+
div.dup-button-footer {text-align:right; margin:20px 10px 0px 0px}
|
25 |
+
button.button {font-size:16px !important; height:30px !important; font-weight:bold; padding:0px 10px 5px 10px !important; min-width: 150px }
|
26 |
+
span.dup-btn-size {font-size:11px;font-weight: normal}
|
27 |
+
</style>
|
28 |
+
|
29 |
+
<!-- =========================================
|
30 |
+
TOOL BAR: STEPS -->
|
31 |
+
<table id="dup-toolbar">
|
32 |
+
<tr valign="top">
|
33 |
+
<td style="white-space: nowrap">
|
34 |
+
<div id="dup-wiz">
|
35 |
+
<div id="dup-wiz-steps">
|
36 |
+
<div class="completed-step"><a><span>1</span> <?php _e('Setup', 'duplicator'); ?></a></div>
|
37 |
+
<div class="completed-step"><a><span>2</span> <?php _e('Scan', 'duplicator'); ?> </a></div>
|
38 |
+
<div class="active-step"><a><span>3</span> <?php _e('Build', 'duplicator'); ?> </a></div>
|
39 |
+
</div>
|
40 |
+
<div id="dup-wiz-title">
|
41 |
+
<?php _e('Step 3: Build Package', 'duplicator'); ?>
|
42 |
+
</div>
|
43 |
+
</div>
|
44 |
+
</td>
|
45 |
+
<td class="dup-toolbar-btns">
|
46 |
+
<a id="dup-pro-create-new" href="?page=duplicator" class="add-new-h2"><i class="fa fa-archive"></i> <?php _e("All Packages", 'duplicator'); ?></a>
|
47 |
+
<span> <?php _e("Create New", 'duplicator'); ?></span>
|
48 |
+
</td>
|
49 |
+
</tr>
|
50 |
+
</table>
|
51 |
+
<hr style="margin-bottom:10px">
|
52 |
+
|
53 |
+
|
54 |
+
<form id="form-duplicator" method="post" action="?page=duplicator">
|
55 |
+
|
56 |
+
<!-- PROGRESS BAR -->
|
57 |
+
<div id="dup-progress-bar-area">
|
58 |
+
<div class="dup-progress-title"><i class="fa fa-cog fa-spin"></i> <?php _e('Building Package', 'duplicator'); ?></div>
|
59 |
+
<div id="dup-progress-bar"></div>
|
60 |
+
<b><?php _e('Please Wait...', 'duplicator'); ?></b><br/><br/>
|
61 |
+
<i><?php _e('Keep this window open during the build process.', 'duplicator'); ?></i><br/>
|
62 |
+
<i><?php _e('This may take several minutes.', 'duplicator'); ?></i><br/>
|
63 |
+
</div>
|
64 |
+
|
65 |
+
<div id="dup-progress-area" class="dup-panel" style="display:none">
|
66 |
+
<div class="dup-panel-title dup-box-title-fancy"><b style="font-size:18px"><?php _e('Build Status', 'duplicator'); ?></b></div>
|
67 |
+
<div class="dup-panel-panel">
|
68 |
+
|
69 |
+
<!-- =========================
|
70 |
+
SUCCESS MESSAGE -->
|
71 |
+
<div id="dup-msg-success" style="display:none">
|
72 |
+
<div class="dup-hdr-success">
|
73 |
+
<i class="fa fa-check-square-o fa-lg"></i> <?php _e('Package Completed', 'duplicator'); ?>
|
74 |
+
</div>
|
75 |
+
|
76 |
+
<div class="dup-msg-success-stats">
|
77 |
+
<b><?php _e('Name', 'duplicator'); ?>:</b> <span id="data-name-hash"></span><br/>
|
78 |
+
<b><?php _e('Process Time', 'duplicator'); ?>:</b> <span id="data-time"></span><br/>
|
79 |
+
</div><br/>
|
80 |
+
|
81 |
+
<button id="dup-btn-installer" class="button button-primary button-large">
|
82 |
+
<i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?>
|
83 |
+
<span id="dup-btn-installer-size" class="dup-btn-size"></span>
|
84 |
+
</button>
|
85 |
+
<button id="dup-btn-archive" class="button button-primary button-large">
|
86 |
+
<i class="fa fa-file-archive-o"></i> <?php _e("Archive", 'duplicator') ?>
|
87 |
+
<span id="dup-btn-archive-size" class="dup-btn-size"></span>
|
88 |
+
</button>
|
89 |
+
<div style='margin: 7px 0 20px 0'>
|
90 |
+
<small><i><?php _e("click buttons to download", 'duplicator') ?></i></small>
|
91 |
+
</div>
|
92 |
+
<div class="dup-msg-success-links">
|
93 |
+
<?php printf("<a href='?page=duplicator'>[ %s ]</a>", __('All Packages', 'duplicator'));?>
|
94 |
+
</div><br/>
|
95 |
+
|
96 |
+
<!-- Used for iMacros testing do not remove -->
|
97 |
+
<div id="dup-automation-imacros"></div>
|
98 |
+
</div>
|
99 |
+
|
100 |
+
<!-- =========================
|
101 |
+
ERROR MESSAGE -->
|
102 |
+
<div id="dup-msg-error" style="display:none">
|
103 |
+
<div class="done-title"><i class="fa fa-chain-broken"></i> <?php _e('Build Interrupt', 'duplicator'); ?></div>
|
104 |
+
<b><?php _e('The current build has experienced an issue.', 'duplicator'); ?></b><br/>
|
105 |
+
|
106 |
+
<i><?php _e('Please try the process again.', 'duplicator'); ?></i><br/><br/>
|
107 |
+
|
108 |
+
<input type="button" style="margin-right:10px;" class="button" value="<?php _e('Diagnose', 'duplicator'); ?>" onclick="window.open('http://lifeinthegrid.com/support/knowledgebase.php?article=12#faq-trouble-timeout', '_blank');return false;" />
|
109 |
+
<input type="button" class="button" value="<?php _e('Try Again', 'duplicator'); ?>" onclick="window.location = 'admin.php?page=duplicator&tab=new1'" />
|
110 |
+
<fieldset>
|
111 |
+
<legend><b><i class="fa fa-exclamation"></i> <?php _e('Details', 'duplicator'); ?></b></legend>
|
112 |
+
<div class="dup-msg-error-area">
|
113 |
+
<div id="dup-msg-error-response-status">
|
114 |
+
<span class="label"><?php _e("Server Status:", 'duplicator'); ?></span>
|
115 |
+
<span class="data"></span>
|
116 |
+
</div>
|
117 |
+
<div id="dup-msg-error-response-text">
|
118 |
+
<span class="label"><?php _e("Error Message:", 'duplicator'); ?></span><br/>
|
119 |
+
<span class="data"></span>
|
120 |
+
</div>
|
121 |
+
</div>
|
122 |
+
</fieldset><br/>
|
123 |
+
|
124 |
+
<fieldset style="color:#777">
|
125 |
+
<legend><b> <?php _e('Notice', 'duplicator'); ?></b></legend>
|
126 |
+
<div class="dup-msg-error-area">
|
127 |
+
<?php printf('<b><i class="fa fa-folder-o"></i> %s %s</b> <br/> %s',
|
128 |
+
__('Build Folder:'),
|
129 |
+
DUPLICATOR_SSDIR_PATH_TMP,
|
130 |
+
__("Some servers close connections quickly; yet the build can continue to run in the background. To validate if a build is still running; open the 'tmp' folder above and see if the archive file is growing in size. If it is not then your server has strict timeout constraints. Please visit the support page for additional resources.", 'duplicator')
|
131 |
+
);
|
132 |
+
?> <br/>
|
133 |
+
</div>
|
134 |
+
</fieldset>
|
135 |
+
|
136 |
+
<!-- LOGS -->
|
137 |
+
<div id="dup-logs">
|
138 |
+
<div style="font-weight:bold">
|
139 |
+
<i class="fa fa-list-alt"></i> <a href='javascript:void(0)' style="color:#A62426" onclick='Duplicator.OpenLogWindow()'> <?php _e('Package Log', 'duplicator');?> </a>
|
140 |
+
</div>
|
141 |
+
<br/>
|
142 |
+
</div>
|
143 |
+
|
144 |
+
</div>
|
145 |
+
|
146 |
+
</div>
|
147 |
+
</div>
|
148 |
+
</form>
|
149 |
+
|
150 |
+
<script type="text/javascript">
|
151 |
+
jQuery(document).ready(function($) {
|
152 |
+
/* ----------------------------------------
|
153 |
+
* METHOD: Performs Ajax post to create a new package
|
154 |
+
* Timeout (10000000 = 166 minutes) */
|
155 |
+
Duplicator.Pack.Create = function() {
|
156 |
+
|
157 |
+
var data = {action : 'duplicator_package_build', nonce: '<?php echo $ajax_nonce; ?>'}
|
158 |
+
|
159 |
+
$.ajax({
|
160 |
+
type: "POST",
|
161 |
+
url: ajaxurl,
|
162 |
+
dataType: "json",
|
163 |
+
timeout: 10000000,
|
164 |
+
data: data,
|
165 |
+
beforeSend: function() {},
|
166 |
+
complete: function() {},
|
167 |
+
success: function(data) {
|
168 |
+
$('#dup-progress-bar-area').hide();
|
169 |
+
$('#dup-progress-area, #dup-msg-success').show(300);
|
170 |
+
|
171 |
+
var Pack = data.Package;
|
172 |
+
var InstallURL = Pack.StoreURL + Pack.Installer.File + "?get=1&file=" + Pack.Installer.File;
|
173 |
+
var ArchiveURL = Pack.StoreURL + Pack.Archive.File + "?get=1";
|
174 |
+
|
175 |
+
$('#dup-btn-archive-size').append(' (' + data.ZipSize + ')')
|
176 |
+
$('#data-name-hash').text(Pack.NameHash || 'error read');
|
177 |
+
$('#data-time').text(data.Runtime || 'unable to read time');
|
178 |
+
|
179 |
+
//Wire Up Downloads
|
180 |
+
$('#dup-btn-installer').on("click", {name: InstallURL }, Duplicator.Pack.DownloadFile );
|
181 |
+
$('#dup-btn-archive').on("click", {name: ArchiveURL }, Duplicator.Pack.DownloadFile );
|
182 |
+
//Imacros testing required
|
183 |
+
$('#dup-automation-imacros').html('<input type="hidden" id="dup-finished" value="done" />');
|
184 |
+
|
185 |
+
},
|
186 |
+
error: function(data) {
|
187 |
+
$('#dup-progress-bar-area').hide();
|
188 |
+
$('#dup-progress-area, #dup-msg-error').show(200);
|
189 |
+
var status = data.status + ' -' + data.statusText;
|
190 |
+
var response = (data.responseText != undefined && data.responseText.length > 1) ? data.responseText : 'Unknown Error - See Log File';
|
191 |
+
$('#dup-msg-error-response-status span.data').html(status)
|
192 |
+
$('#dup-msg-error-response-text span.data').html(response);
|
193 |
+
console.log(data);
|
194 |
+
}
|
195 |
+
});
|
196 |
+
return false;
|
197 |
+
}
|
198 |
+
|
199 |
+
//Page Init:
|
200 |
+
Duplicator.UI.AnimateProgressBar('dup-progress-bar');
|
201 |
+
Duplicator.Pack.Create();
|
202 |
+
|
203 |
+
});
|
|
|
204 |
</script>
|
views/packages/main/packages.php
CHANGED
@@ -1,259 +1,271 @@
|
|
1 |
-
<?php
|
2 |
-
$qryResult = $wpdb->get_results("SELECT * FROM `{$wpdb->prefix}duplicator_packages` ORDER BY id DESC", ARRAY_A);
|
3 |
-
$qryStatus = $wpdb->get_results("SELECT status FROM `{$wpdb->prefix}duplicator_packages` WHERE status >= 100", ARRAY_A);
|
4 |
-
$totalElements = count($qryResult);
|
5 |
-
$statusCount = count($qryStatus);
|
6 |
-
$package_debug = DUP_Settings::Get('package_debug');
|
7 |
-
$ajax_nonce = wp_create_nonce('package_list');
|
8 |
-
?>
|
9 |
-
|
10 |
-
<style>
|
11 |
-
div#dup-list-alert-nodata {padding:50px 20px;text-align:center; font-size:20px; line-height:26px}
|
12 |
-
div.dup-notice-msg {border:1px solid silver; padding: 10px; border-radius: 5px; width: 550px;
|
13 |
-
margin:40px auto 0px auto; font-size:12px; text-align: left; word-break:normal;
|
14 |
-
background: #fefcea;
|
15 |
-
background: -moz-linear-gradient(top, #fefcea 0%, #efe5a2 100%);
|
16 |
-
background: -ms-linear-gradient(top, #fefcea 0%,#efe5a2 100%);
|
17 |
-
background: linear-gradient(to bottom, #fefcea 0%,#efe5a2 100%);
|
18 |
-
}
|
19 |
-
input#dup-bulk-action-all {margin:0px;padding:0px 0px 0px 5px;}
|
20 |
-
button.dup-button-selected {border:1px solid #000 !important; background-color:#dfdfdf !important;}
|
21 |
-
|
22 |
-
/* Table package details */
|
23 |
-
table.dup-pack-table {word-break:break-all;}
|
24 |
-
table.dup-pack-table th {white-space:nowrap !important;}
|
25 |
-
table.dup-pack-table td.pack-name {text-overflow:ellipsis; white-space:nowrap}
|
26 |
-
table.dup-pack-table input[name="delete_confirm"] {margin-left:15px}
|
27 |
-
table.dup-pack-table td.fail {border-left: 4px solid #d54e21;}
|
28 |
-
table.dup-pack-table td.pass {border-left: 4px solid #2ea2cc;}
|
29 |
-
tr.dup-pack-info td {white-space:nowrap; padding:12px 30px 0px 7px;}
|
30 |
-
tr.dup-pack-info td.get-btns {text-align:right; padding:3px 5px 6px 0px !important;}
|
31 |
-
textarea.dup-pack-debug {width:98%; height:300px; font-size:11px; display:none}
|
32 |
-
td.error-msg a {color:maroon}
|
33 |
-
td.error-msg a i {color:maroon}
|
34 |
-
td.error-msg span {display:inline-block; padding:7px 18px 0px 0px; color:maroon}
|
35 |
-
</style>
|
36 |
-
|
37 |
-
<form id="form-duplicator" method="post">
|
38 |
-
|
39 |
-
<?php if($statusCount >= 3) : ?>
|
40 |
-
<div style="font-size:13px; position: absolute; top:10px; right:20px">
|
41 |
-
<a href="admin.php?page=duplicator-about" style="color:maroon"><i><i class="fa fa-check-circle"></i> <?php _e("Help Support Duplicator", 'duplicator') ?></i> </a>
|
42 |
-
</div>
|
43 |
-
<?php endif; ?>
|
44 |
-
|
45 |
-
<!-- ====================
|
46 |
-
TOOL-BAR -->
|
47 |
-
<table id="dup-toolbar">
|
48 |
-
<tr valign="top">
|
49 |
-
<td style="white-space: nowrap">
|
50 |
-
<div class="alignleft actions">
|
51 |
-
<select id="dup-pack-bulk-actions">
|
52 |
-
<option value="-1" selected="selected"><?php _e("Bulk Actions", 'duplicator') ?></option>
|
53 |
-
<option value="delete" title="<?php _e("Delete selected package(s)", 'duplicator') ?>"><?php _e("Delete", 'duplicator') ?></option>
|
54 |
-
</select>
|
55 |
-
<input type="button" id="dup-pack-bulk-apply" class="button action" value="<?php _e("Apply", 'duplicator') ?>" onclick="Duplicator.Pack.Delete()">
|
56 |
-
</div>
|
57 |
-
<br class="clear">
|
58 |
-
</td>
|
59 |
-
<td align="center">
|
60 |
-
<a href="?page=duplicator-tools" id="btn-logs-dialog" class="button" title="<?php _e("Package Logs", 'duplicator') ?>..."><i class="fa fa-list-alt"></i>
|
61 |
-
</td>
|
62 |
-
<td class="dup-toolbar-btns">
|
63 |
-
<span><i class="fa fa-archive"></i> <?php _e("All Packages", 'duplicator'); ?></span>
|
64 |
-
<a id="dup-pro-create-new" href="?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a>
|
65 |
-
</td>
|
66 |
-
</tr>
|
67 |
-
</table>
|
68 |
-
|
69 |
-
|
70 |
-
<?php if($totalElements == 0) : ?>
|
71 |
-
<!-- ====================
|
72 |
-
NO-DATA MESSAGES-->
|
73 |
-
<table class="widefat dup-pack-table">
|
74 |
-
<thead><tr><th> </th></tr></thead>
|
75 |
-
<tbody>
|
76 |
-
<tr>
|
77 |
-
<td>
|
78 |
-
<div id='dup-list-alert-nodata'>
|
79 |
-
<i class="fa fa-archive"></i>
|
80 |
-
<?php _e("No Packages Found.", 'duplicator'); ?><br/>
|
81 |
-
<?php _e("Click the 'Create New' button to build a package.", 'duplicator'); ?>
|
82 |
-
|
83 |
-
<?php
|
84 |
-
printf("%s <a href='
|
85 |
-
__("
|
86 |
-
__("
|
87 |
-
__("for
|
88 |
-
?>
|
89 |
-
|
90 |
-
<div style="height:75px"> </div>
|
91 |
-
</div>
|
92 |
-
</td>
|
93 |
-
</tr>
|
94 |
-
</tbody>
|
95 |
-
<tfoot><tr><th> </th></tr></tfoot>
|
96 |
-
</table>
|
97 |
-
<?php else : ?>
|
98 |
-
<!-- ====================
|
99 |
-
LIST ALL PACKAGES -->
|
100 |
-
<table class="widefat dup-pack-table">
|
101 |
-
<thead>
|
102 |
-
<tr>
|
103 |
-
<th><input type="checkbox" id="dup-bulk-action-all" title="<?php _e("Select all packages", 'duplicator') ?>" style="margin-left:15px" onclick="Duplicator.Pack.SetDeleteAll()" /></th>
|
104 |
-
<th><?php _e("Created", 'duplicator') ?></th>
|
105 |
-
<th><?php _e("Size", 'duplicator') ?></th>
|
106 |
-
<th style="width:90%;"><?php _e("Name", 'duplicator') ?></th>
|
107 |
-
<th style="text-align:center;" colspan="2">
|
108 |
-
<?php _e("Package", 'duplicator')?>
|
109 |
-
</th>
|
110 |
-
</tr>
|
111 |
-
</thead>
|
112 |
-
<?php
|
113 |
-
$rowCount = 0;
|
114 |
-
$totalSize = 0;
|
115 |
-
$rows = $qryResult;
|
116 |
-
foreach ($rows as $row) {
|
117 |
-
$Package = unserialize($row['package']);
|
118 |
-
|
119 |
-
if (is_object($Package)) {
|
120 |
-
$pack_name = $Package->Name;
|
121 |
-
$pack_archive_size = $Package->Archive->Size;
|
122 |
-
$pack_storeurl = $Package->StoreURL;
|
123 |
-
$pack_namehash = $Package->NameHash;
|
124 |
-
} else {
|
125 |
-
$pack_archive_size = 0;
|
126 |
-
$pack_storeurl = 'unknown';
|
127 |
-
$pack_name = 'unknown';
|
128 |
-
$pack_namehash = 'unknown';
|
129 |
-
}
|
130 |
-
|
131 |
-
//Links
|
132 |
-
$uniqueid = "{$row['name']}_{$row['hash']}";
|
133 |
-
$packagepath = $pack_storeurl . "{$uniqueid}_archive.zip";
|
134 |
-
$installerpath = $pack_storeurl . "{$uniqueid}_installer.php";
|
135 |
-
$installfilelink = "{$installerpath}?get=1&file={$uniqueid}_installer.php";
|
136 |
-
$css_alt = ($rowCount % 2 != 0) ? '' : 'alternate';
|
137 |
-
?>
|
138 |
-
|
139 |
-
<!-- COMPLETE -->
|
140 |
-
<?php if ($row['status'] >= 100) : ?>
|
141 |
-
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
142 |
-
<td class="pass"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id'] ;?>" /></td>
|
143 |
-
<td><?php echo date( "m-d-y G:i", strtotime($row['created']));?></td>
|
144 |
-
<td><?php echo DUP_Util::ByteSize($pack_archive_size); ?></td>
|
145 |
-
<td class='pack-name'><?php echo $pack_name ;?></td>
|
146 |
-
<td class="get-btns">
|
147 |
-
<button id="<?php echo "{$uniqueid}_installer.php" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $installfilelink; ?>', this); return false;">
|
148 |
-
<i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?>
|
149 |
-
</button>
|
150 |
-
<button id="<?php echo "{$uniqueid}_archive.zip" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $packagepath; ?>', this); return false;">
|
151 |
-
<i class="fa fa-file-archive-o"></i> <?php _e("Archive", 'duplicator') ?>
|
152 |
-
</button>
|
153 |
-
<button type="button" class="button no-select" title="<?php _e("Package Details", 'duplicator') ?>" onclick="Duplicator.Pack.OpenPackageDetails(<?php echo "{$row['id']}"; ?>);">
|
154 |
-
<i class="fa fa-archive" ></i>
|
155 |
-
</button>
|
156 |
-
</td>
|
157 |
-
</tr>
|
158 |
-
|
159 |
-
<!-- NOT COMPLETE -->
|
160 |
-
<?php else : ?>
|
161 |
-
|
162 |
-
<?php
|
163 |
-
$size = 0;
|
164 |
-
$tmpSearch = glob(DUPLICATOR_SSDIR_PATH_TMP . "/{$pack_namehash}_*");
|
165 |
-
if (is_array($tmpSearch)) {
|
166 |
-
$result = array_map('filesize', $tmpSearch);
|
167 |
-
$size = array_sum($result);
|
168 |
-
}
|
169 |
-
$pack_archive_size = $size;
|
170 |
-
$error_url = "?page=duplicator&action=detail&tab=detail&id={$row['id']}";
|
171 |
-
?>
|
172 |
-
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
173 |
-
<td class="fail"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id'] ;?>" /></td>
|
174 |
-
<td><?php echo date( "m-d-y G:i", strtotime($row['created']));?></td>
|
175 |
-
<td><?php echo DUP_Util::ByteSize($size); ?></td>
|
176 |
-
<td class='pack-name'><?php echo $pack_name ;?></td>
|
177 |
-
<td class="get-btns error-msg" colspan="2">
|
178 |
-
<span>
|
179 |
-
<i class="fa fa-exclamation-triangle"></i>
|
180 |
-
<a href="<?php echo $error_url; ?>"><?php _e("Error Processing", 'duplicator') ?></a>
|
181 |
-
</span>
|
182 |
-
<a class="button no-select" title="<?php _e("Package Details", 'duplicator') ?>" href="<?php echo $error_url; ?>">
|
183 |
-
<i class="fa fa-archive"></i>
|
184 |
-
</a>
|
185 |
-
</td>
|
186 |
-
</tr>
|
187 |
-
<?php endif; ?>
|
188 |
-
<?php
|
189 |
-
$totalSize = $totalSize + $pack_archive_size;
|
190 |
-
$rowCount++;
|
191 |
-
}
|
192 |
-
?>
|
193 |
-
<tfoot>
|
194 |
-
<tr>
|
195 |
-
<th colspan="
|
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 |
-
if (
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
</script>
|
1 |
+
<?php
|
2 |
+
$qryResult = $wpdb->get_results("SELECT * FROM `{$wpdb->prefix}duplicator_packages` ORDER BY id DESC", ARRAY_A);
|
3 |
+
$qryStatus = $wpdb->get_results("SELECT status FROM `{$wpdb->prefix}duplicator_packages` WHERE status >= 100", ARRAY_A);
|
4 |
+
$totalElements = count($qryResult);
|
5 |
+
$statusCount = count($qryStatus);
|
6 |
+
$package_debug = DUP_Settings::Get('package_debug');
|
7 |
+
$ajax_nonce = wp_create_nonce('package_list');
|
8 |
+
?>
|
9 |
+
|
10 |
+
<style>
|
11 |
+
div#dup-list-alert-nodata {padding:50px 20px;text-align:center; font-size:20px; line-height:26px}
|
12 |
+
div.dup-notice-msg {border:1px solid silver; padding: 10px; border-radius: 5px; width: 550px;
|
13 |
+
margin:40px auto 0px auto; font-size:12px; text-align: left; word-break:normal;
|
14 |
+
background: #fefcea;
|
15 |
+
background: -moz-linear-gradient(top, #fefcea 0%, #efe5a2 100%);
|
16 |
+
background: -ms-linear-gradient(top, #fefcea 0%,#efe5a2 100%);
|
17 |
+
background: linear-gradient(to bottom, #fefcea 0%,#efe5a2 100%);
|
18 |
+
}
|
19 |
+
input#dup-bulk-action-all {margin:0px;padding:0px 0px 0px 5px;}
|
20 |
+
button.dup-button-selected {border:1px solid #000 !important; background-color:#dfdfdf !important;}
|
21 |
+
|
22 |
+
/* Table package details */
|
23 |
+
table.dup-pack-table {word-break:break-all;}
|
24 |
+
table.dup-pack-table th {white-space:nowrap !important;}
|
25 |
+
table.dup-pack-table td.pack-name {text-overflow:ellipsis; white-space:nowrap}
|
26 |
+
table.dup-pack-table input[name="delete_confirm"] {margin-left:15px}
|
27 |
+
table.dup-pack-table td.fail {border-left: 4px solid #d54e21;}
|
28 |
+
table.dup-pack-table td.pass {border-left: 4px solid #2ea2cc;}
|
29 |
+
tr.dup-pack-info td {white-space:nowrap; padding:12px 30px 0px 7px;}
|
30 |
+
tr.dup-pack-info td.get-btns {text-align:right; padding:3px 5px 6px 0px !important;}
|
31 |
+
textarea.dup-pack-debug {width:98%; height:300px; font-size:11px; display:none}
|
32 |
+
td.error-msg a {color:maroon}
|
33 |
+
td.error-msg a i {color:maroon}
|
34 |
+
td.error-msg span {display:inline-block; padding:7px 18px 0px 0px; color:maroon}
|
35 |
+
</style>
|
36 |
+
|
37 |
+
<form id="form-duplicator" method="post">
|
38 |
+
|
39 |
+
<?php if($statusCount >= 3) : ?>
|
40 |
+
<div style="font-size:13px; position: absolute; top:10px; right:20px">
|
41 |
+
<a href="admin.php?page=duplicator-about" style="color:maroon"><i><i class="fa fa-check-circle"></i> <?php _e("Help Support Duplicator", 'duplicator') ?></i> </a>
|
42 |
+
</div>
|
43 |
+
<?php endif; ?>
|
44 |
+
|
45 |
+
<!-- ====================
|
46 |
+
TOOL-BAR -->
|
47 |
+
<table id="dup-toolbar">
|
48 |
+
<tr valign="top">
|
49 |
+
<td style="white-space: nowrap">
|
50 |
+
<div class="alignleft actions">
|
51 |
+
<select id="dup-pack-bulk-actions">
|
52 |
+
<option value="-1" selected="selected"><?php _e("Bulk Actions", 'duplicator') ?></option>
|
53 |
+
<option value="delete" title="<?php _e("Delete selected package(s)", 'duplicator') ?>"><?php _e("Delete", 'duplicator') ?></option>
|
54 |
+
</select>
|
55 |
+
<input type="button" id="dup-pack-bulk-apply" class="button action" value="<?php _e("Apply", 'duplicator') ?>" onclick="Duplicator.Pack.Delete()">
|
56 |
+
</div>
|
57 |
+
<br class="clear">
|
58 |
+
</td>
|
59 |
+
<td align="center">
|
60 |
+
<a href="?page=duplicator-tools" id="btn-logs-dialog" class="button" title="<?php _e("Package Logs", 'duplicator') ?>..."><i class="fa fa-list-alt"></i>
|
61 |
+
</td>
|
62 |
+
<td class="dup-toolbar-btns">
|
63 |
+
<span><i class="fa fa-archive"></i> <?php _e("All Packages", 'duplicator'); ?></span>
|
64 |
+
<a id="dup-pro-create-new" href="?page=duplicator&tab=new1" class="add-new-h2"><?php _e("Create New", 'duplicator'); ?></a>
|
65 |
+
</td>
|
66 |
+
</tr>
|
67 |
+
</table>
|
68 |
+
|
69 |
+
|
70 |
+
<?php if($totalElements == 0) : ?>
|
71 |
+
<!-- ====================
|
72 |
+
NO-DATA MESSAGES-->
|
73 |
+
<table class="widefat dup-pack-table">
|
74 |
+
<thead><tr><th> </th></tr></thead>
|
75 |
+
<tbody>
|
76 |
+
<tr>
|
77 |
+
<td>
|
78 |
+
<div id='dup-list-alert-nodata'>
|
79 |
+
<i class="fa fa-archive"></i>
|
80 |
+
<?php _e("No Packages Found.", 'duplicator'); ?><br/>
|
81 |
+
<?php _e("Click the 'Create New' button to build a package.", 'duplicator'); ?>
|
82 |
+
<!--div style='font-style: italic'>
|
83 |
+
<?php
|
84 |
+
/*printf("%s <a target='_blank' href='//www.bluehost.com/track/snapcreek/?page=wordpress'>%s</a> %s",
|
85 |
+
__("Duplicator recommends ", 'duplicator'),
|
86 |
+
__("Bluehost", 'duplicator'),
|
87 |
+
__("for a more optimized experience!", 'duplicator'));*/
|
88 |
+
?>
|
89 |
+
</div-->
|
90 |
+
<div style="height:75px"> </div>
|
91 |
+
</div>
|
92 |
+
</td>
|
93 |
+
</tr>
|
94 |
+
</tbody>
|
95 |
+
<tfoot><tr><th> </th></tr></tfoot>
|
96 |
+
</table>
|
97 |
+
<?php else : ?>
|
98 |
+
<!-- ====================
|
99 |
+
LIST ALL PACKAGES -->
|
100 |
+
<table class="widefat dup-pack-table">
|
101 |
+
<thead>
|
102 |
+
<tr>
|
103 |
+
<th><input type="checkbox" id="dup-bulk-action-all" title="<?php _e("Select all packages", 'duplicator') ?>" style="margin-left:15px" onclick="Duplicator.Pack.SetDeleteAll()" /></th>
|
104 |
+
<th><?php _e("Created", 'duplicator') ?></th>
|
105 |
+
<th><?php _e("Size", 'duplicator') ?></th>
|
106 |
+
<th style="width:90%;"><?php _e("Name", 'duplicator') ?></th>
|
107 |
+
<th style="text-align:center;" colspan="2">
|
108 |
+
<?php _e("Package", 'duplicator')?>
|
109 |
+
</th>
|
110 |
+
</tr>
|
111 |
+
</thead>
|
112 |
+
<?php
|
113 |
+
$rowCount = 0;
|
114 |
+
$totalSize = 0;
|
115 |
+
$rows = $qryResult;
|
116 |
+
foreach ($rows as $row) {
|
117 |
+
$Package = unserialize($row['package']);
|
118 |
+
|
119 |
+
if (is_object($Package)) {
|
120 |
+
$pack_name = $Package->Name;
|
121 |
+
$pack_archive_size = $Package->Archive->Size;
|
122 |
+
$pack_storeurl = $Package->StoreURL;
|
123 |
+
$pack_namehash = $Package->NameHash;
|
124 |
+
} else {
|
125 |
+
$pack_archive_size = 0;
|
126 |
+
$pack_storeurl = 'unknown';
|
127 |
+
$pack_name = 'unknown';
|
128 |
+
$pack_namehash = 'unknown';
|
129 |
+
}
|
130 |
+
|
131 |
+
//Links
|
132 |
+
$uniqueid = "{$row['name']}_{$row['hash']}";
|
133 |
+
$packagepath = $pack_storeurl . "{$uniqueid}_archive.zip";
|
134 |
+
$installerpath = $pack_storeurl . "{$uniqueid}_installer.php";
|
135 |
+
$installfilelink = "{$installerpath}?get=1&file={$uniqueid}_installer.php";
|
136 |
+
$css_alt = ($rowCount % 2 != 0) ? '' : 'alternate';
|
137 |
+
?>
|
138 |
+
|
139 |
+
<!-- COMPLETE -->
|
140 |
+
<?php if ($row['status'] >= 100) : ?>
|
141 |
+
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
142 |
+
<td class="pass"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id'] ;?>" /></td>
|
143 |
+
<td><?php echo date( "m-d-y G:i", strtotime($row['created']));?></td>
|
144 |
+
<td><?php echo DUP_Util::ByteSize($pack_archive_size); ?></td>
|
145 |
+
<td class='pack-name'><?php echo $pack_name ;?></td>
|
146 |
+
<td class="get-btns">
|
147 |
+
<button id="<?php echo "{$uniqueid}_installer.php" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $installfilelink; ?>', this); return false;">
|
148 |
+
<i class="fa fa-bolt"></i> <?php _e("Installer", 'duplicator') ?>
|
149 |
+
</button>
|
150 |
+
<button id="<?php echo "{$uniqueid}_archive.zip" ?>" class="button no-select" onclick="Duplicator.Pack.DownloadFile('<?php echo $packagepath; ?>', this); return false;">
|
151 |
+
<i class="fa fa-file-archive-o"></i> <?php _e("Archive", 'duplicator') ?>
|
152 |
+
</button>
|
153 |
+
<button type="button" class="button no-select" title="<?php _e("Package Details", 'duplicator') ?>" onclick="Duplicator.Pack.OpenPackageDetails(<?php echo "{$row['id']}"; ?>);">
|
154 |
+
<i class="fa fa-archive" ></i>
|
155 |
+
</button>
|
156 |
+
</td>
|
157 |
+
</tr>
|
158 |
+
|
159 |
+
<!-- NOT COMPLETE -->
|
160 |
+
<?php else : ?>
|
161 |
+
|
162 |
+
<?php
|
163 |
+
$size = 0;
|
164 |
+
$tmpSearch = glob(DUPLICATOR_SSDIR_PATH_TMP . "/{$pack_namehash}_*");
|
165 |
+
if (is_array($tmpSearch)) {
|
166 |
+
$result = array_map('filesize', $tmpSearch);
|
167 |
+
$size = array_sum($result);
|
168 |
+
}
|
169 |
+
$pack_archive_size = $size;
|
170 |
+
$error_url = "?page=duplicator&action=detail&tab=detail&id={$row['id']}";
|
171 |
+
?>
|
172 |
+
<tr class="dup-pack-info <?php echo $css_alt ?>">
|
173 |
+
<td class="fail"><input name="delete_confirm" type="checkbox" id="<?php echo $row['id'] ;?>" /></td>
|
174 |
+
<td><?php echo date( "m-d-y G:i", strtotime($row['created']));?></td>
|
175 |
+
<td><?php echo DUP_Util::ByteSize($size); ?></td>
|
176 |
+
<td class='pack-name'><?php echo $pack_name ;?></td>
|
177 |
+
<td class="get-btns error-msg" colspan="2">
|
178 |
+
<span>
|
179 |
+
<i class="fa fa-exclamation-triangle"></i>
|
180 |
+
<a href="<?php echo $error_url; ?>"><?php _e("Error Processing", 'duplicator') ?></a>
|
181 |
+
</span>
|
182 |
+
<a class="button no-select" title="<?php _e("Package Details", 'duplicator') ?>" href="<?php echo $error_url; ?>">
|
183 |
+
<i class="fa fa-archive"></i>
|
184 |
+
</a>
|
185 |
+
</td>
|
186 |
+
</tr>
|
187 |
+
<?php endif; ?>
|
188 |
+
<?php
|
189 |
+
$totalSize = $totalSize + $pack_archive_size;
|
190 |
+
$rowCount++;
|
191 |
+
}
|
192 |
+
?>
|
193 |
+
<tfoot>
|
194 |
+
<tr>
|
195 |
+
<th colspan="4">
|
196 |
+
<i style="font-size:12px; cursor: pointer"
|
197 |
+
data-tooltip-title="<?php _e("Host Recommendation:", 'duplicator'); ?>"
|
198 |
+
data-tooltip="<?php _e('Duplicator recommends going with the high performance pro plan or better from Bluehost.com', 'duplicator'); ?>">
|
199 |
+
<i class="fa fa-lightbulb-o"></i>
|
200 |
+
<?php
|
201 |
+
printf("%s <a target='_blank' href='//www.bluehost.com/track/snapcreek/?page=wordpress'>%s</a>",
|
202 |
+
__("Duplicator Recommends ", 'duplicator'),
|
203 |
+
__("Bluehost", 'duplicator'));
|
204 |
+
?>
|
205 |
+
</i>
|
206 |
+
</th>
|
207 |
+
<th colspan="7" style='text-align:right; font-size:12px'>
|
208 |
+
<?php echo _e("Packages", 'duplicator') . ': ' . $totalElements; ?> |
|
209 |
+
<?php echo _e("Total Size", 'duplicator') . ': ' . DUP_Util::ByteSize($totalSize); ?>
|
210 |
+
</th>
|
211 |
+
</tr>
|
212 |
+
</tfoot>
|
213 |
+
</table>
|
214 |
+
<?php endif; ?>
|
215 |
+
</form>
|
216 |
+
|
217 |
+
<script type="text/javascript">
|
218 |
+
jQuery(document).ready(function($)
|
219 |
+
{
|
220 |
+
/* Removes all selected package sets
|
221 |
+
* @param event To prevent bubbling */
|
222 |
+
Duplicator.Pack.Delete = function (event)
|
223 |
+
{
|
224 |
+
var arr = new Array;
|
225 |
+
var count = 0;
|
226 |
+
|
227 |
+
if ($("#dup-pack-bulk-actions").val() != "delete") {
|
228 |
+
alert("<?php _e('Please select an action from the bulk action drop down menu to perform a specific action.', 'duplicator') ?>");
|
229 |
+
return;
|
230 |
+
}
|
231 |
+
$("input[name=delete_confirm]").each(function() {
|
232 |
+
if (this.checked) { arr[count++] = this.id; }
|
233 |
+
});
|
234 |
+
var list = arr.join(',');
|
235 |
+
if (list.length == 0) {
|
236 |
+
alert("<?php _e('Please select at least one package to delete.', 'duplicator') ?>");
|
237 |
+
return;
|
238 |
+
}
|
239 |
+
|
240 |
+
if (confirm("<?php _e('Are you sure, you want to delete the selected package(s)?', 'duplicator') ?>"))
|
241 |
+
{
|
242 |
+
$.ajax({
|
243 |
+
type: "POST",
|
244 |
+
url: ajaxurl,
|
245 |
+
dataType: "json",
|
246 |
+
data: {action : 'duplicator_package_delete', duplicator_delid : list, nonce: '<?php echo $ajax_nonce; ?>' },
|
247 |
+
success: function(data) {
|
248 |
+
Duplicator.ReloadWindow(data);
|
249 |
+
}
|
250 |
+
});
|
251 |
+
}
|
252 |
+
if (event)
|
253 |
+
event.preventDefault();
|
254 |
+
};
|
255 |
+
|
256 |
+
/* METHOD: Toogles the Bulk Action Check boxes */
|
257 |
+
Duplicator.Pack.SetDeleteAll = function()
|
258 |
+
{
|
259 |
+
var state = $('input#dup-bulk-action-all').is(':checked') ? 1 : 0;
|
260 |
+
$("input[name=delete_confirm]").each(function() {
|
261 |
+
this.checked = (state) ? true : false;
|
262 |
+
});
|
263 |
+
}
|
264 |
+
|
265 |
+
/* METHOD: Opens detail screen */
|
266 |
+
Duplicator.Pack.OpenPackageDetails = function (package_id)
|
267 |
+
{
|
268 |
+
window.location.href = '?page=duplicator&action=detail&tab=detail&id=' + package_id;
|
269 |
+
}
|
270 |
+
});
|
271 |
</script>
|
views/packages/new1.inc.form.php
DELETED
@@ -1,349 +0,0 @@
|
|
1 |
-
|
2 |
-
<form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2" data-validate="parsley">
|
3 |
-
<input type="hidden" id="dup-form-opts-action" name="action" value="">
|
4 |
-
<input type="hidden" id="dup-form-opts-hash" name="package-hash" value="<?php echo $package_hash; ?>">
|
5 |
-
<div>
|
6 |
-
<label for="package-name"><b><?php _e('Name', 'duplicator') ?>:</b> </label>
|
7 |
-
<div class="dup-notes-add">
|
8 |
-
<button class="button button-small" type="button" onclick="jQuery('#dup-notes-area').toggle()"><i class="fa fa-pencil-square-o"></i> <?php _e('Notes', 'duplicator') ?></button>
|
9 |
-
</div>
|
10 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.ResetName()" title="<?php _e('Create a new default name', 'duplicator') ?>"><i class="fa fa-undo"></i></a> <br/>
|
11 |
-
<input id="package-name" name="package-name" type="text" value="<?php echo $Package->Name ?>" maxlength="40" data-required="true" data-regexp="^[0-9A-Za-z|_]+$" /> <br/>
|
12 |
-
<div id="dup-notes-area">
|
13 |
-
<label><b><?php _e('Notes', 'duplicator') ?>:</b></label> <br/>
|
14 |
-
<textarea id="package-notes" name="package-notes" maxlength="300" /><?php echo $Package->Notes ?></textarea>
|
15 |
-
</div>
|
16 |
-
</div>
|
17 |
-
<br/>
|
18 |
-
|
19 |
-
<!-- ===================
|
20 |
-
META-BOX: STORAGE -->
|
21 |
-
<div class="dup-box">
|
22 |
-
<div class="dup-box-title">
|
23 |
-
<i class="fa fa-database"></i> <?php _e("Storage", 'duplicator'); ?>
|
24 |
-
<div class="dup-box-arrow"></div>
|
25 |
-
</div>
|
26 |
-
|
27 |
-
<div class="dup-box-panel" id="dup-pack-storage-panel" style="<?php echo $ui_css_storage ?>">
|
28 |
-
<table class="widefat package-tbl">
|
29 |
-
<thead>
|
30 |
-
<tr>
|
31 |
-
<th style='width:275px'><?php _e("Name", 'duplicator'); ?></th>
|
32 |
-
<th style='width:100px'><?php _e("Type", 'duplicator'); ?></th>
|
33 |
-
<th style="white-space: nowrap"><?php _e("Location", 'duplicator'); ?></th>
|
34 |
-
</tr>
|
35 |
-
</thead>
|
36 |
-
<tbody>
|
37 |
-
<tr class="package-row">
|
38 |
-
<td><i class="fa fa-server"></i> <?php _e('Default', 'duplicator');?></td>
|
39 |
-
<td><?php _e("Local", 'duplicator'); ?></td>
|
40 |
-
<td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
|
41 |
-
</tr>
|
42 |
-
<tr>
|
43 |
-
<td colspan="4">
|
44 |
-
<div style="font-size:12px; font-style:italic;">
|
45 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/dropbox-64.png" style='height:16px; width:16px; vertical-align: text-top' />
|
46 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" style='height:16px; width:16px; vertical-align: text-top' />
|
47 |
-
<img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" style='height:16px; width:16px; vertical-align: text-top' />
|
48 |
-
|
49 |
-
<?php echo sprintf(__('%1$s, %2$s, %3$s and other storage options available in', 'duplicator'), 'Dropbox', 'Google Drive', 'FTP'); ?>
|
50 |
-
<a href="http://snapcreek.com/duplicator/?free-storage" target="_blank">Duplicator Pro</a>
|
51 |
-
</div>
|
52 |
-
</td>
|
53 |
-
</tr>
|
54 |
-
</tbody>
|
55 |
-
</table>
|
56 |
-
</div>
|
57 |
-
</div><br/>
|
58 |
-
<!-- end meta-box storage -->
|
59 |
-
|
60 |
-
<!-- META-BOX: ARCHIVE -->
|
61 |
-
<div class="dup-box">
|
62 |
-
<div class="dup-box-title">
|
63 |
-
<i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator') ?>
|
64 |
-
<span style="font-size:13px">
|
65 |
-
<span id="dup-archive-filter-file" title="<?php _e('File filter enabled', 'duplicator') ?>"><i class="fa fa-files-o"></i> <i class="fa fa-filter"></i> </span>
|
66 |
-
<span id="dup-archive-filter-db" title="<?php _e('Database filter enabled', 'duplicator') ?>"><i class="fa fa-table"></i> <i class="fa fa-filter"></i></span>
|
67 |
-
</span>
|
68 |
-
<div class="dup-box-arrow"></div>
|
69 |
-
</div>
|
70 |
-
<div class="dup-box-panel" id="dup-pack-archive-panel" style="<?php echo $ui_css_archive ?>">
|
71 |
-
<input type="hidden" name="archive-format" value="ZIP" />
|
72 |
-
<!-- NESTED TABS -->
|
73 |
-
<div class="categorydiv" id="dup-pack-opts-tabs">
|
74 |
-
<ul class="category-tabs">
|
75 |
-
<li class="tabs"><a href="javascript:void(0)" onclick="Duplicator.Pack.ToggleOptTabs(1, this)"><?php _e('Files', 'duplicator') ?></a></li>
|
76 |
-
<li><a href="javascript:void(0)"onclick="Duplicator.Pack.ToggleOptTabs(2, this)"><?php _e('Database', 'duplicator') ?></a></li>
|
77 |
-
</ul>
|
78 |
-
|
79 |
-
<!-- TAB1: PACKAGE -->
|
80 |
-
<div class="tabs-panel" id="dup-pack-opts-tabs-panel-1">
|
81 |
-
<!-- FILTERS -->
|
82 |
-
<?php
|
83 |
-
$uploads = wp_upload_dir();
|
84 |
-
$upload_dir = DUP_Util::SafePath($uploads['basedir']);
|
85 |
-
?>
|
86 |
-
<div class="dup-enable-filters">
|
87 |
-
<input type="checkbox" id="filter-on" name="filter-on" onclick="Duplicator.Pack.ToggleFileFilters()" <?php echo ($Package->Archive->FilterOn) ? "checked='checked'" : ""; ?> />
|
88 |
-
<label for="filter-on"><?php _e("Enable File Filters", 'duplicator') ?></label>
|
89 |
-
</div>
|
90 |
-
|
91 |
-
<div id="dup-file-filter-items">
|
92 |
-
<label for="filter-dirs" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>"><?php _e("Directories", 'duplicator') ?>: </label>
|
93 |
-
<div class='dup-quick-links'>
|
94 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')">[<?php _e("root path", 'duplicator') ?>]</a>
|
95 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim($upload_dir, '/'); ?>')">[<?php _e("wp-uploads", 'duplicator') ?>]</a>
|
96 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo DUP_Util::SafePath(WP_CONTENT_DIR); ?>/cache')">[<?php _e("cache", 'duplicator') ?>]</a>
|
97 |
-
<a href="javascript:void(0)" onclick="jQuery('#filter-dirs').val('')"><?php _e("(clear)", 'duplicator') ?></a>
|
98 |
-
</div>
|
99 |
-
<textarea name="filter-dirs" id="filter-dirs" placeholder="/full_path/exclude_path1;/full_path/exclude_path2;"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterDirs)) ?></textarea><br/>
|
100 |
-
<label class="no-select" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>"><?php _e("File extensions", 'duplicator') ?>:</label>
|
101 |
-
<div class='dup-quick-links'>
|
102 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma')">[<?php _e("media", 'duplicator') ?>]</a>
|
103 |
-
<a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('zip;rar;tar;gz;bz2;7z')">[<?php _e("archive", 'duplicator') ?>]</a>
|
104 |
-
<a href="javascript:void(0)" onclick="jQuery('#filter-exts').val('')"><?php _e("(clear)", 'duplicator') ?></a>
|
105 |
-
</div>
|
106 |
-
<textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
|
107 |
-
|
108 |
-
<div class="dup-tabs-opts-help">
|
109 |
-
<?php _e("The directory paths and extensions above will be be excluded from the archive file if enabled is checked.", 'duplicator'); ?> <br/>
|
110 |
-
<?php _e("Use the full path for directories and semicolons to separate all items.", 'duplicator'); ?>
|
111 |
-
</div>
|
112 |
-
<br/>
|
113 |
-
<span style="font-style:italic; font-size:12px ">
|
114 |
-
<?php echo sprintf(DUP_Util::__('%1$s are available in'), 'Individual file filters'); ?>
|
115 |
-
<a href="http://snapcreek.com/duplicator/?free-file-filters" target="_blank">Duplicator Pro</a>
|
116 |
-
</span>
|
117 |
-
</div>
|
118 |
-
</div>
|
119 |
-
|
120 |
-
<!-- TAB2: DATABASE -->
|
121 |
-
<div class="tabs-panel" id="dup-pack-opts-tabs-panel-2" style="display: none;">
|
122 |
-
<div class="dup-enable-filters">
|
123 |
-
<table>
|
124 |
-
<tr>
|
125 |
-
<td colspan="2">
|
126 |
-
<div style="margin:0 0 10px 0">
|
127 |
-
<?php _e("Build Mode", 'duplicator') ?>:
|
128 |
-
<a href="?page=duplicator-settings"><?php echo $dbbuild_mode; ?></a>
|
129 |
-
</div>
|
130 |
-
</td>
|
131 |
-
</tr>
|
132 |
-
<tr>
|
133 |
-
<td><input type="checkbox" id="dbfilter-on" name="dbfilter-on" onclick="Duplicator.Pack.ToggleDBFilters()" <?php echo ($Package->Database->FilterOn) ? "checked='checked'" : ""; ?> /></td>
|
134 |
-
<td >
|
135 |
-
<label for="dbfilter-on"><?php _e("Enable Table Filters", 'duplicator') ?> </label>
|
136 |
-
<i class="fa fa-question-circle"
|
137 |
-
data-tooltip-title="<?php DUP_Util::_e("Enable Table Filters:"); ?>"
|
138 |
-
data-tooltip="<?php DUP_Util::_e('Checked tables will not be added to the database script. Excluding certain tables can possibly cause your site or plugins to not work correctly after install!'); ?>">
|
139 |
-
</i>
|
140 |
-
</td>
|
141 |
-
</tr>
|
142 |
-
</table>
|
143 |
-
</div>
|
144 |
-
<div id="dup-db-filter-items">
|
145 |
-
<a href="javascript:void(0)" id="dball" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', true).trigger('click');">[ <?php _e('Include All', 'duplicator'); ?> ]</a>
|
146 |
-
<a href="javascript:void(0)" id="dbnone" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', false).trigger('click');">[ <?php _e('Exclude All', 'duplicator'); ?> ]</a>
|
147 |
-
<div style="white-space: nowrap">
|
148 |
-
<?php
|
149 |
-
$tables = $wpdb->get_results("SHOW FULL TABLES FROM `" . DB_NAME . "` WHERE Table_Type = 'BASE TABLE' ", ARRAY_N);
|
150 |
-
$num_rows = count($tables);
|
151 |
-
echo '<table id="dup-dbtables"><tr><td valign="top">';
|
152 |
-
$next_row = round($num_rows / 3, 0);
|
153 |
-
$counter = 0;
|
154 |
-
$tableList = explode(',', $Package->Database->FilterTables);
|
155 |
-
foreach ($tables as $table)
|
156 |
-
{
|
157 |
-
if (in_array($table[0], $tableList))
|
158 |
-
{
|
159 |
-
$checked = 'checked="checked"';
|
160 |
-
$css = 'text-decoration:line-through';
|
161 |
-
}
|
162 |
-
else
|
163 |
-
{
|
164 |
-
$checked = '';
|
165 |
-
$css = '';
|
166 |
-
}
|
167 |
-
echo "<label for='dbtables-{$table[0]}' style='{$css}'><input class='checkbox dbtable' $checked type='checkbox' name='dbtables[]' id='dbtables-{$table[0]}' value='{$table[0]}' onclick='Duplicator.Pack.ExcludeTable(this)' /> {$table[0]}</label><br />";
|
168 |
-
$counter++;
|
169 |
-
if ($next_row <= $counter)
|
170 |
-
{
|
171 |
-
echo '</td><td valign="top">';
|
172 |
-
$counter = 0;
|
173 |
-
}
|
174 |
-
}
|
175 |
-
echo '</td></tr></table>';
|
176 |
-
?>
|
177 |
-
</div>
|
178 |
-
</div>
|
179 |
-
<br/>
|
180 |
-
<?php DUP_Util::_e("Compatibility Mode") ?>
|
181 |
-
<i class="fa fa-question-circle"
|
182 |
-
data-tooltip-title="<?php DUP_Util::_e("Compatibility Mode:"); ?>"
|
183 |
-
data-tooltip="<?php DUP_Util::_e('This is an advanced database backwards compatibility feature that should ONLY be used if having problems installing packages.'
|
184 |
-
. ' If the database server version is lower than the version where the package was built then these options may help generate a script that is more compliant'
|
185 |
-
. ' with the older database server. It is recommended to try each option separately starting with mysql40.'); ?>">
|
186 |
-
</i>
|
187 |
-
<small style="font-style:italic">
|
188 |
-
<a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php DUP_Util::_e('details'); ?>]</a>
|
189 |
-
</small>
|
190 |
-
<br/>
|
191 |
-
|
192 |
-
<?php if ($dbbuild_mode == 'mysqldump') :?>
|
193 |
-
<?php
|
194 |
-
$modes = explode(',', $Package->Database->Compatible);
|
195 |
-
$is_mysql40 = in_array('mysql40', $modes);
|
196 |
-
$is_no_table = in_array('no_table_options', $modes);
|
197 |
-
$is_no_key = in_array('no_key_options', $modes);
|
198 |
-
$is_no_field = in_array('no_field_options', $modes);
|
199 |
-
?>
|
200 |
-
<table class="dbmysql-compatibility">
|
201 |
-
<tr>
|
202 |
-
<td>
|
203 |
-
<input type="checkbox" name="dbcompat[]" id="dbcompat-mysql40" value="mysql40" <?php echo $is_mysql40 ? 'checked="true"' : ''; ?> >
|
204 |
-
<label for="dbcompat-mysql40"><?php DUP_Util::_e("mysql40") ?></label>
|
205 |
-
</td>
|
206 |
-
<td>
|
207 |
-
<input type="checkbox" name="dbcompat[]" id="dbcompat-no_table_options" value="no_table_options" <?php echo $is_no_table ? 'checked="true"' : ''; ?>>
|
208 |
-
<label for="dbcompat-no_table_options"><?php DUP_Util::_e("no_table_options") ?></label>
|
209 |
-
</td>
|
210 |
-
<td>
|
211 |
-
<input type="checkbox" name="dbcompat[]" id="dbcompat-no_key_options" value="no_key_options" <?php echo $is_no_key ? 'checked="true"' : ''; ?>>
|
212 |
-
<label for="dbcompat-no_key_options"><?php DUP_Util::_e("no_key_options") ?></label>
|
213 |
-
</td>
|
214 |
-
<td>
|
215 |
-
<input type="checkbox" name="dbcompat[]" id="dbcompat-no_field_options" value="no_field_options" <?php echo $is_no_field ? 'checked="true"' : ''; ?>>
|
216 |
-
<label for="dbcompat-no_field_options"><?php DUP_Util::_e("no_field_options") ?></label>
|
217 |
-
</td>
|
218 |
-
</tr>
|
219 |
-
</table>
|
220 |
-
<?php else : ?>
|
221 |
-
<i><?php DUP_Util::_e("This option is only availbe with mysqldump mode."); ?></i>
|
222 |
-
<?php endif; ?>
|
223 |
-
|
224 |
-
</div>
|
225 |
-
</div>
|
226 |
-
</div>
|
227 |
-
</div><br/>
|
228 |
-
<!-- end meta-box options -->
|
229 |
-
|
230 |
-
|
231 |
-
<!-- META-BOX: INSTALLER -->
|
232 |
-
<div class="dup-box">
|
233 |
-
<div class="dup-box-title">
|
234 |
-
<i class="fa fa-bolt"></i> <?php _e('Installer', 'duplicator') ?>
|
235 |
-
<div class="dup-box-arrow"></div>
|
236 |
-
</div>
|
237 |
-
|
238 |
-
<div class="dup-box-panel" id="dup-pack-installer-panel" style="<?php echo $ui_css_installer ?>">
|
239 |
-
<div class="dup-installer-header-1"><?php echo _e('STEP 1 - INPUTS', 'duplicator'); ?></div><br/>
|
240 |
-
<table class="dup-installer-tbl">
|
241 |
-
<tr>
|
242 |
-
<td colspan="2"><div class="dup-installer-header-2"><?php _e("MySQL Server", 'duplicator') ?></div></td>
|
243 |
-
</tr>
|
244 |
-
<tr>
|
245 |
-
<td style="width:130px"><?php _e("Host", 'duplicator') ?></td>
|
246 |
-
<td><input type="text" name="dbhost" id="dbhost" value="<?php echo $Package->Installer->OptsDBHost ?>" maxlength="200" placeholder="localhost"/></td>
|
247 |
-
</tr>
|
248 |
-
<tr>
|
249 |
-
<td style="width:130px"><?php _e("Host Port", 'duplicator') ?></td>
|
250 |
-
<td><input type="text" name="dbport" id="dbport" value="<?php echo $Package->Installer->OptsDBPort ?>" maxlength="200" placeholder="3306"/></td>
|
251 |
-
</tr>
|
252 |
-
<tr>
|
253 |
-
<td><?php _e("Database", 'duplicator') ?></td>
|
254 |
-
<td><input type="text" name="dbname" id="dbname" value="<?php echo $Package->Installer->OptsDBName ?>" maxlength="100" placeholder="mydatabaseName" /></td>
|
255 |
-
</tr>
|
256 |
-
<tr>
|
257 |
-
<td><?php _e("User", 'duplicator') ?></td>
|
258 |
-
<td><input type="text" name="dbuser" id="dbuser" value="<?php echo $Package->Installer->OptsDBUser ?>" maxlength="100" placeholder="databaseUserName" /></td>
|
259 |
-
</tr>
|
260 |
-
<tr>
|
261 |
-
<td colspan="2"><div class="dup-installer-header-2"><?php _e("Advanced Options", 'duplicator') ?></div></td>
|
262 |
-
</tr>
|
263 |
-
<tr>
|
264 |
-
<td colspan="2">
|
265 |
-
<table>
|
266 |
-
<tr>
|
267 |
-
<td style="width:130px"><?php _e("SSL", 'duplicator') ?></td>
|
268 |
-
<td style="padding-right: 20px; white-space: nowrap">
|
269 |
-
<input type="checkbox" name="ssl-admin" id="ssl-admin" <?php echo ($Package->Installer->OptsSSLAdmin) ? "checked='checked'" : ""; ?> />
|
270 |
-
<label class="chk-labels" for="ssl-admin"><?php _e("Enforce on Admin", 'duplicator') ?></label>
|
271 |
-
</td>
|
272 |
-
<td>
|
273 |
-
<input type="checkbox" name="ssl-login" id="ssl-login" <?php echo ($Package->Installer->OptsSSLLogin) ? "checked='checked'" : ""; ?> />
|
274 |
-
<label class="chk-labels" for="ssl-login"><?php _e("Enforce on Logins", 'duplicator') ?></label>
|
275 |
-
</td>
|
276 |
-
</tr>
|
277 |
-
<tr>
|
278 |
-
<td><?php _e("Cache", 'duplicator') ?></td>
|
279 |
-
<td style="padding-right: 20px; white-space: nowrap">
|
280 |
-
<input type="checkbox" name="cache-wp" id="cache-wp" <?php echo ($Package->Installer->OptsCacheWP) ? "checked='checked'" : ""; ?> />
|
281 |
-
<label class="chk-labels" for="cache-wp"><?php _e("Keep Enabled", 'duplicator') ?></label>
|
282 |
-
</td>
|
283 |
-
<td>
|
284 |
-
<input type="checkbox" name="cache-path" id="cache-path" <?php echo ($Package->Installer->OptsCachePath) ? "checked='checked'" : ""; ?> />
|
285 |
-
<label class="chk-labels" for="cache-path"><?php _e("Keep Home Path", 'duplicator') ?></label>
|
286 |
-
</td>
|
287 |
-
</tr>
|
288 |
-
</table>
|
289 |
-
</td>
|
290 |
-
</tr>
|
291 |
-
</table><br />
|
292 |
-
|
293 |
-
<div class="dup-installer-header-1"><?php echo _e('STEP 2 - INPUTS', 'duplicator'); ?></div>
|
294 |
-
|
295 |
-
<table class="dup-installer-tbl">
|
296 |
-
<tr>
|
297 |
-
<td style="width:130px"><?php _e("New URL", 'duplicator') ?></td>
|
298 |
-
<td><input type="text" name="url-new" id="url-new" value="<?php echo $Package->Installer->OptsURLNew ?>" placeholder="http://mynewsite.com" /></td>
|
299 |
-
</tr>
|
300 |
-
</table>
|
301 |
-
|
302 |
-
<div class="dup-tabs-opts-help">
|
303 |
-
<?php _e("The installer can have these fields pre-filled at install time.", 'duplicator'); ?> <b><?php _e('All values are optional.', 'duplicator'); ?></b>
|
304 |
-
</div>
|
305 |
-
|
306 |
-
</div>
|
307 |
-
</div><br/>
|
308 |
-
<!-- end meta-box: installer -->
|
309 |
-
|
310 |
-
|
311 |
-
<div class="dup-button-footer">
|
312 |
-
<input type="button" value="<?php _e("Reset", 'duplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' : 'disabled="disabled"'; ?> onclick="Duplicator.Pack.ResetSettings()" />
|
313 |
-
<input type="submit" value="<?php _e("Next", 'duplicator') ?> ►" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' : 'disabled="disabled"'; ?> />
|
314 |
-
</div>
|
315 |
-
|
316 |
-
</form>
|
317 |
-
|
318 |
-
<script>
|
319 |
-
jQuery(document).ready(function ($) {
|
320 |
-
var DUP_NAMEDEFAULT = '<?php echo $default_name ?>';
|
321 |
-
var DUP_NAMELAST = $('#package-name').val();
|
322 |
-
|
323 |
-
Duplicator.Pack.ResetSettings = function () {
|
324 |
-
var key = 'duplicator_package_active';
|
325 |
-
var result = confirm('<?php _e("This will reset all of the current package settings. Would you like to continue?", "duplicator"); ?>');
|
326 |
-
if (!result)
|
327 |
-
return;
|
328 |
-
|
329 |
-
jQuery('#dup-form-opts-action').val(key);
|
330 |
-
jQuery('#dup-form-opts').attr('action', '?page=duplicator&tab=new1')
|
331 |
-
jQuery('#dup-form-opts').submit();
|
332 |
-
}
|
333 |
-
|
334 |
-
Duplicator.Pack.ResetName = function () {
|
335 |
-
var current = $('#package-name').val();
|
336 |
-
$('#package-name').val((current == DUP_NAMELAST) ? DUP_NAMEDEFAULT : DUP_NAMELAST)
|
337 |
-
}
|
338 |
-
|
339 |
-
Duplicator.Pack.ExcludeTable = function (check) {
|
340 |
-
var $cb = $(check);
|
341 |
-
if ($cb.is(":checked")) {
|
342 |
-
$cb.closest("label").css('textDecoration', 'line-through');
|
343 |
-
} else {
|
344 |
-
$cb.closest("label").css('textDecoration', 'none');
|
345 |
-
}
|
346 |
-
}
|
347 |
-
|
348 |
-
});
|
349 |
-
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/settings/general.php
CHANGED
@@ -1,237 +1,254 @@
|
|
1 |
-
<?php
|
2 |
-
global $wp_version;
|
3 |
-
global $wpdb;
|
4 |
-
|
5 |
-
$action_updated = null;
|
6 |
-
$action_response = __("Settings Saved", 'duplicator');
|
7 |
-
|
8 |
-
//SAVE RESULTS
|
9 |
-
if (isset($_POST['action']) && $_POST['action'] == 'save') {
|
10 |
-
|
11 |
-
//Nonce Check
|
12 |
-
if (! isset( $_POST['dup_settings_save_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_settings_save_nonce_field'], 'dup_settings_save' ) )
|
13 |
-
{
|
14 |
-
die('Invalid token permissions to perform this request.');
|
15 |
-
}
|
16 |
-
|
17 |
-
//General Tab
|
18 |
-
//Plugin
|
19 |
-
DUP_Settings::Set('uninstall_settings', isset($_POST['uninstall_settings']) ? "1" : "0");
|
20 |
-
DUP_Settings::Set('uninstall_files', isset($_POST['uninstall_files']) ? "1" : "0");
|
21 |
-
DUP_Settings::Set('uninstall_tables', isset($_POST['uninstall_tables']) ? "1" : "0");
|
22 |
-
DUP_Settings::Set('storage_htaccess_off', isset($_POST['storage_htaccess_off']) ? "1" : "0");
|
23 |
-
|
24 |
-
//Package
|
25 |
-
$enable_mysqldump = isset($_POST['package_dbmode']) && $_POST['package_dbmode'] == 'mysql' ? "1" : "0";
|
26 |
-
DUP_Settings::Set('package_debug', isset($_POST['package_debug']) ? "1" : "0");
|
27 |
-
DUP_Settings::Set('package_zip_flush', isset($_POST['package_zip_flush']) ? "1" : "0");
|
28 |
-
DUP_Settings::Set('package_mysqldump', $enable_mysqldump ? "1" : "0");
|
29 |
-
DUP_Settings::Set('package_phpdump_qrylimit', isset($_POST['package_phpdump_qrylimit']) ? $_POST['package_phpdump_qrylimit'] : "100");
|
30 |
-
DUP_Settings::Set('package_mysqldump_path', trim(esc_sql(strip_tags($_POST['package_mysqldump_path']))));
|
31 |
-
|
32 |
-
//WPFront
|
33 |
-
DUP_Settings::Set('wpfront_integrate', isset($_POST['wpfront_integrate']) ? "1" : "0");
|
34 |
-
|
35 |
-
$action_updated = DUP_Settings::Save();
|
36 |
-
DUP_Util::InitSnapshotDirectory();
|
37 |
-
}
|
38 |
-
|
39 |
-
$uninstall_settings = DUP_Settings::Get('uninstall_settings');
|
40 |
-
$uninstall_files = DUP_Settings::Get('uninstall_files');
|
41 |
-
$uninstall_tables = DUP_Settings::Get('uninstall_tables');
|
42 |
-
$storage_htaccess_off = DUP_Settings::Get('storage_htaccess_off');
|
43 |
-
|
44 |
-
$package_debug = DUP_Settings::Get('package_debug');
|
45 |
-
$package_zip_flush = DUP_Settings::Get('package_zip_flush');
|
46 |
-
|
47 |
-
$phpdump_chunkopts = array("20", "100", "500", "1000", "2000");
|
48 |
-
|
49 |
-
$package_phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
|
50 |
-
$package_mysqldump = DUP_Settings::Get('package_mysqldump');
|
51 |
-
$package_mysqldump_path = trim(DUP_Settings::Get('package_mysqldump_path'));
|
52 |
-
|
53 |
-
$wpfront_integrate = DUP_Settings::Get('wpfront_integrate');
|
54 |
-
$wpfront_ready = apply_filters('wpfront_user_role_editor_duplicator_integration_ready', false);
|
55 |
-
|
56 |
-
$mysqlDumpPath = DUP_Database::GetMySqlDumpPath();
|
57 |
-
$mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
58 |
-
|
59 |
-
|
60 |
-
?>
|
61 |
-
|
62 |
-
<style>
|
63 |
-
form#dup-settings-form input[type=text] {width: 400px; }
|
64 |
-
input#package_mysqldump_path_found {margin-top:5px}
|
65 |
-
div.dup-feature-found {padding:3px; border:1px solid silver; background: #f7fcfe; border-radius: 3px; width:400px; font-size: 12px}
|
66 |
-
div.dup-feature-notfound {padding:3px; border:1px solid silver; background: #fcf3ef; border-radius: 3px; width:400px; font-size: 12px}
|
67 |
-
</style>
|
68 |
-
|
69 |
-
<form id="dup-settings-form" action="<?php echo admin_url('admin.php?page=duplicator-settings&tab=general'); ?>" method="post">
|
70 |
-
|
71 |
-
<?php wp_nonce_field('dup_settings_save', 'dup_settings_save_nonce_field'); ?>
|
72 |
-
<input type="hidden" name="action" value="save">
|
73 |
-
<input type="hidden" name="page" value="duplicator-settings">
|
74 |
-
|
75 |
-
<?php if ($action_updated) : ?>
|
76 |
-
<div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
|
77 |
-
<?php endif; ?>
|
78 |
-
|
79 |
-
|
80 |
-
<!-- ===============================
|
81 |
-
PLUG-IN SETTINGS -->
|
82 |
-
<h3 class="title"><?php _e("Plugin", 'duplicator') ?> </h3>
|
83 |
-
<hr size="1" />
|
84 |
-
<table class="form-table">
|
85 |
-
<tr valign="top">
|
86 |
-
<th scope="row"><label><?php _e("Version", 'duplicator'); ?></label></th>
|
87 |
-
<td><?php echo DUPLICATOR_VERSION ?></td>
|
88 |
-
</tr>
|
89 |
-
<tr valign="top">
|
90 |
-
<th scope="row"><label><?php _e("Uninstall", 'duplicator'); ?></label></th>
|
91 |
-
<td>
|
92 |
-
<input type="checkbox" name="uninstall_settings" id="uninstall_settings" <?php echo ($uninstall_settings) ? 'checked="checked"' : ''; ?> />
|
93 |
-
<label for="uninstall_settings"><?php _e("Delete Plugin Settings", 'duplicator') ?> </label><br/>
|
94 |
-
|
95 |
-
<input type="checkbox" name="uninstall_files" id="uninstall_files" <?php echo ($uninstall_files) ? 'checked="checked"' : ''; ?> />
|
96 |
-
<label for="uninstall_files"><?php _e("Delete Entire Storage Directory", 'duplicator') ?></label><br/>
|
97 |
-
|
98 |
-
</td>
|
99 |
-
</tr>
|
100 |
-
<tr valign="top">
|
101 |
-
<th scope="row"><label><?php _e("Storage", 'duplicator'); ?></label></th>
|
102 |
-
<td>
|
103 |
-
<?php _e("Full Path", 'duplicator'); ?>:
|
104 |
-
<?php echo DUP_Util::SafePath(DUPLICATOR_SSDIR_PATH); ?><br/><br/>
|
105 |
-
<input type="checkbox" name="storage_htaccess_off" id="storage_htaccess_off" <?php echo ($storage_htaccess_off) ? 'checked="checked"' : ''; ?> />
|
106 |
-
<label for="storage_htaccess_off"><?php _e("Disable .htaccess File In Storage Directory", 'duplicator') ?> </label>
|
107 |
-
<p class="description">
|
108 |
-
<?php _e("Disable if issues occur when downloading installer/archive files.", 'duplicator'); ?>
|
109 |
-
</p>
|
110 |
-
</td>
|
111 |
-
</tr>
|
112 |
-
</table>
|
113 |
-
|
114 |
-
|
115 |
-
<!-- ===============================
|
116 |
-
PACKAGE SETTINGS -->
|
117 |
-
<h3 class="title"><?php _e("Package", 'duplicator') ?> </h3>
|
118 |
-
<hr size="1" />
|
119 |
-
<table class="form-table">
|
120 |
-
<tr>
|
121 |
-
<th scope="row"><label><?php _e("Archive Flush", 'duplicator'); ?></label></th>
|
122 |
-
<td>
|
123 |
-
<input type="checkbox" name="package_zip_flush" id="package_zip_flush" <?php echo ($package_zip_flush) ? 'checked="checked"' : ''; ?> />
|
124 |
-
<label for="package_zip_flush"><?php _e("Attempt Network Keep Alive", 'duplicator'); ?></label>
|
125 |
-
<i style="font-size:12px">(<?php _e("recommended only for large archives", 'duplicator'); ?>)</i>
|
126 |
-
<p class="description">
|
127 |
-
<?php _e("This will attempt to keep a network connection established for large archives.", 'duplicator'); ?>
|
128 |
-
</p>
|
129 |
-
</td>
|
130 |
-
</tr>
|
131 |
-
<tr>
|
132 |
-
<th scope="row"><label><?php _e("Database Build", 'duplicator'); ?></label></th>
|
133 |
-
<td>
|
134 |
-
<input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (! $package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
135 |
-
<label for="package_phpdump"><?php _e("Use PHP", 'duplicator'); ?></label>
|
136 |
-
|
137 |
-
<div style="margin:5px 0px 0px 25px">
|
138 |
-
<label for="package_phpdump_qrylimit"><?php _e("Query Limit Size", 'duplicator'); ?></label>
|
139 |
-
<select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
|
140 |
-
<?php
|
141 |
-
foreach($phpdump_chunkopts as $value) {
|
142 |
-
$selected = ( $package_phpdump_qrylimit == $value ? "selected='selected'" : '' );
|
143 |
-
echo "<option {$selected} value='{$value}'>" . number_format($value) . '</option>';
|
144 |
-
}
|
145 |
-
?>
|
146 |
-
</select>
|
147 |
-
<i style="font-size:12px">(<?php _e("higher values speed up build times but uses more memory", 'duplicator'); ?>)</i>
|
148 |
-
|
149 |
-
</div><br/>
|
150 |
-
|
151 |
-
<?php if (!DUP_Util::IsShellExecAvailable()) : ?>
|
152 |
-
<p class="description">
|
153 |
-
<?php
|
154 |
-
_e("This server does not have shell_exec configured to run.", 'duplicator');
|
155 |
-
echo '<br/>';
|
156 |
-
_e("Please contact the server administrator to enable this feature.", 'duplicator');
|
157 |
-
?>
|
158 |
-
</p>
|
159 |
-
<?php else : ?>
|
160 |
-
<input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
161 |
-
<label for="package_mysqldump"><?php _e("Use mysqldump", 'duplicator'); ?></label>
|
162 |
-
<i style="font-size:12px">(<?php _e("recommended for large databases", 'duplicator'); ?>)</i> <br
|
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 |
</form>
|
1 |
+
<?php
|
2 |
+
global $wp_version;
|
3 |
+
global $wpdb;
|
4 |
+
|
5 |
+
$action_updated = null;
|
6 |
+
$action_response = __("Settings Saved", 'duplicator');
|
7 |
+
|
8 |
+
//SAVE RESULTS
|
9 |
+
if (isset($_POST['action']) && $_POST['action'] == 'save') {
|
10 |
+
|
11 |
+
//Nonce Check
|
12 |
+
if (! isset( $_POST['dup_settings_save_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_settings_save_nonce_field'], 'dup_settings_save' ) )
|
13 |
+
{
|
14 |
+
die('Invalid token permissions to perform this request.');
|
15 |
+
}
|
16 |
+
|
17 |
+
//General Tab
|
18 |
+
//Plugin
|
19 |
+
DUP_Settings::Set('uninstall_settings', isset($_POST['uninstall_settings']) ? "1" : "0");
|
20 |
+
DUP_Settings::Set('uninstall_files', isset($_POST['uninstall_files']) ? "1" : "0");
|
21 |
+
DUP_Settings::Set('uninstall_tables', isset($_POST['uninstall_tables']) ? "1" : "0");
|
22 |
+
DUP_Settings::Set('storage_htaccess_off', isset($_POST['storage_htaccess_off']) ? "1" : "0");
|
23 |
+
|
24 |
+
//Package
|
25 |
+
$enable_mysqldump = isset($_POST['package_dbmode']) && $_POST['package_dbmode'] == 'mysql' ? "1" : "0";
|
26 |
+
DUP_Settings::Set('package_debug', isset($_POST['package_debug']) ? "1" : "0");
|
27 |
+
DUP_Settings::Set('package_zip_flush', isset($_POST['package_zip_flush']) ? "1" : "0");
|
28 |
+
DUP_Settings::Set('package_mysqldump', $enable_mysqldump ? "1" : "0");
|
29 |
+
DUP_Settings::Set('package_phpdump_qrylimit', isset($_POST['package_phpdump_qrylimit']) ? $_POST['package_phpdump_qrylimit'] : "100");
|
30 |
+
DUP_Settings::Set('package_mysqldump_path', trim(esc_sql(strip_tags($_POST['package_mysqldump_path']))));
|
31 |
+
|
32 |
+
//WPFront
|
33 |
+
DUP_Settings::Set('wpfront_integrate', isset($_POST['wpfront_integrate']) ? "1" : "0");
|
34 |
+
|
35 |
+
$action_updated = DUP_Settings::Save();
|
36 |
+
DUP_Util::InitSnapshotDirectory();
|
37 |
+
}
|
38 |
+
|
39 |
+
$uninstall_settings = DUP_Settings::Get('uninstall_settings');
|
40 |
+
$uninstall_files = DUP_Settings::Get('uninstall_files');
|
41 |
+
$uninstall_tables = DUP_Settings::Get('uninstall_tables');
|
42 |
+
$storage_htaccess_off = DUP_Settings::Get('storage_htaccess_off');
|
43 |
+
|
44 |
+
$package_debug = DUP_Settings::Get('package_debug');
|
45 |
+
$package_zip_flush = DUP_Settings::Get('package_zip_flush');
|
46 |
+
|
47 |
+
$phpdump_chunkopts = array("20", "100", "500", "1000", "2000");
|
48 |
+
|
49 |
+
$package_phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
|
50 |
+
$package_mysqldump = DUP_Settings::Get('package_mysqldump');
|
51 |
+
$package_mysqldump_path = trim(DUP_Settings::Get('package_mysqldump_path'));
|
52 |
+
|
53 |
+
$wpfront_integrate = DUP_Settings::Get('wpfront_integrate');
|
54 |
+
$wpfront_ready = apply_filters('wpfront_user_role_editor_duplicator_integration_ready', false);
|
55 |
+
|
56 |
+
$mysqlDumpPath = DUP_Database::GetMySqlDumpPath();
|
57 |
+
$mysqlDumpFound = ($mysqlDumpPath) ? true : false;
|
58 |
+
|
59 |
+
|
60 |
+
?>
|
61 |
+
|
62 |
+
<style>
|
63 |
+
form#dup-settings-form input[type=text] {width: 400px; }
|
64 |
+
input#package_mysqldump_path_found {margin-top:5px}
|
65 |
+
div.dup-feature-found {padding:3px; border:1px solid silver; background: #f7fcfe; border-radius: 3px; width:400px; font-size: 12px}
|
66 |
+
div.dup-feature-notfound {padding:3px; border:1px solid silver; background: #fcf3ef; border-radius: 3px; width:400px; font-size: 12px}
|
67 |
+
</style>
|
68 |
+
|
69 |
+
<form id="dup-settings-form" action="<?php echo admin_url('admin.php?page=duplicator-settings&tab=general'); ?>" method="post">
|
70 |
+
|
71 |
+
<?php wp_nonce_field('dup_settings_save', 'dup_settings_save_nonce_field'); ?>
|
72 |
+
<input type="hidden" name="action" value="save">
|
73 |
+
<input type="hidden" name="page" value="duplicator-settings">
|
74 |
+
|
75 |
+
<?php if ($action_updated) : ?>
|
76 |
+
<div id="message" class="updated below-h2"><p><?php echo $action_response; ?></p></div>
|
77 |
+
<?php endif; ?>
|
78 |
+
|
79 |
+
|
80 |
+
<!-- ===============================
|
81 |
+
PLUG-IN SETTINGS -->
|
82 |
+
<h3 class="title"><?php _e("Plugin", 'duplicator') ?> </h3>
|
83 |
+
<hr size="1" />
|
84 |
+
<table class="form-table">
|
85 |
+
<tr valign="top">
|
86 |
+
<th scope="row"><label><?php _e("Version", 'duplicator'); ?></label></th>
|
87 |
+
<td><?php echo DUPLICATOR_VERSION ?></td>
|
88 |
+
</tr>
|
89 |
+
<tr valign="top">
|
90 |
+
<th scope="row"><label><?php _e("Uninstall", 'duplicator'); ?></label></th>
|
91 |
+
<td>
|
92 |
+
<input type="checkbox" name="uninstall_settings" id="uninstall_settings" <?php echo ($uninstall_settings) ? 'checked="checked"' : ''; ?> />
|
93 |
+
<label for="uninstall_settings"><?php _e("Delete Plugin Settings", 'duplicator') ?> </label><br/>
|
94 |
+
|
95 |
+
<input type="checkbox" name="uninstall_files" id="uninstall_files" <?php echo ($uninstall_files) ? 'checked="checked"' : ''; ?> />
|
96 |
+
<label for="uninstall_files"><?php _e("Delete Entire Storage Directory", 'duplicator') ?></label><br/>
|
97 |
+
|
98 |
+
</td>
|
99 |
+
</tr>
|
100 |
+
<tr valign="top">
|
101 |
+
<th scope="row"><label><?php _e("Storage", 'duplicator'); ?></label></th>
|
102 |
+
<td>
|
103 |
+
<?php _e("Full Path", 'duplicator'); ?>:
|
104 |
+
<?php echo DUP_Util::SafePath(DUPLICATOR_SSDIR_PATH); ?><br/><br/>
|
105 |
+
<input type="checkbox" name="storage_htaccess_off" id="storage_htaccess_off" <?php echo ($storage_htaccess_off) ? 'checked="checked"' : ''; ?> />
|
106 |
+
<label for="storage_htaccess_off"><?php _e("Disable .htaccess File In Storage Directory", 'duplicator') ?> </label>
|
107 |
+
<p class="description">
|
108 |
+
<?php _e("Disable if issues occur when downloading installer/archive files.", 'duplicator'); ?>
|
109 |
+
</p>
|
110 |
+
</td>
|
111 |
+
</tr>
|
112 |
+
</table>
|
113 |
+
|
114 |
+
|
115 |
+
<!-- ===============================
|
116 |
+
PACKAGE SETTINGS -->
|
117 |
+
<h3 class="title"><?php _e("Package", 'duplicator') ?> </h3>
|
118 |
+
<hr size="1" />
|
119 |
+
<table class="form-table">
|
120 |
+
<tr>
|
121 |
+
<th scope="row"><label><?php _e("Archive Flush", 'duplicator'); ?></label></th>
|
122 |
+
<td>
|
123 |
+
<input type="checkbox" name="package_zip_flush" id="package_zip_flush" <?php echo ($package_zip_flush) ? 'checked="checked"' : ''; ?> />
|
124 |
+
<label for="package_zip_flush"><?php _e("Attempt Network Keep Alive", 'duplicator'); ?></label>
|
125 |
+
<i style="font-size:12px">(<?php _e("recommended only for large archives", 'duplicator'); ?>)</i>
|
126 |
+
<p class="description">
|
127 |
+
<?php _e("This will attempt to keep a network connection established for large archives.", 'duplicator'); ?>
|
128 |
+
</p>
|
129 |
+
</td>
|
130 |
+
</tr>
|
131 |
+
<tr>
|
132 |
+
<th scope="row"><label><?php _e("Database Build", 'duplicator'); ?></label></th>
|
133 |
+
<td>
|
134 |
+
<input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (! $package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
135 |
+
<label for="package_phpdump"><?php _e("Use PHP", 'duplicator'); ?></label>
|
136 |
+
|
137 |
+
<div style="margin:5px 0px 0px 25px">
|
138 |
+
<label for="package_phpdump_qrylimit"><?php _e("Query Limit Size", 'duplicator'); ?></label>
|
139 |
+
<select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
|
140 |
+
<?php
|
141 |
+
foreach($phpdump_chunkopts as $value) {
|
142 |
+
$selected = ( $package_phpdump_qrylimit == $value ? "selected='selected'" : '' );
|
143 |
+
echo "<option {$selected} value='{$value}'>" . number_format($value) . '</option>';
|
144 |
+
}
|
145 |
+
?>
|
146 |
+
</select>
|
147 |
+
<i style="font-size:12px">(<?php _e("higher values speed up build times but uses more memory", 'duplicator'); ?>)</i>
|
148 |
+
|
149 |
+
</div><br/>
|
150 |
+
|
151 |
+
<?php if (!DUP_Util::IsShellExecAvailable()) : ?>
|
152 |
+
<p class="description">
|
153 |
+
<?php
|
154 |
+
_e("This server does not have shell_exec configured to run.", 'duplicator');
|
155 |
+
echo '<br/>';
|
156 |
+
_e("Please contact the server administrator to enable this feature.", 'duplicator');
|
157 |
+
?>
|
158 |
+
</p>
|
159 |
+
<?php else : ?>
|
160 |
+
<input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
|
161 |
+
<label for="package_mysqldump"><?php _e("Use mysqldump", 'duplicator'); ?></label>
|
162 |
+
<i style="font-size:12px">(<?php _e("recommended for large databases", 'duplicator'); ?>)</i> <br/>
|
163 |
+
|
164 |
+
<div style="padding:2px 0 0 40px">
|
165 |
+
<small>
|
166 |
+
<i style="cursor: pointer"
|
167 |
+
data-tooltip-title="<?php _e("Host Recommendation:", 'duplicator'); ?>"
|
168 |
+
data-tooltip="<?php _e('Duplicator recommends going with the high performance pro plan or better from Bluehost.com', 'duplicator'); ?>">
|
169 |
+
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
170 |
+
<?php
|
171 |
+
printf("%s <a target='_blank' href='//www.bluehost.com/track/snapcreek/?page=wordpress'>%s</a> %s",
|
172 |
+
__("Duplicator recommends ", 'duplicator'),
|
173 |
+
__("Bluehost", 'duplicator'),
|
174 |
+
__("for reliable access to mysqldump", 'duplicator'));
|
175 |
+
?>
|
176 |
+
</i>
|
177 |
+
</small>
|
178 |
+
</div>
|
179 |
+
<br/>
|
180 |
+
|
181 |
+
<div style="margin:5px 0px 0px 25px">
|
182 |
+
<?php if ($mysqlDumpFound) : ?>
|
183 |
+
<div class="dup-feature-found">
|
184 |
+
<?php _e("Working Path:", 'duplicator'); ?>
|
185 |
+
<i><?php echo $mysqlDumpPath ?></i>
|
186 |
+
</div><br/>
|
187 |
+
<?php else : ?>
|
188 |
+
<div class="dup-feature-notfound">
|
189 |
+
<?php
|
190 |
+
_e('Mysqldump was not found at its default location or the location provided. Please enter a path to a valid location where mysqldump can run. If the problem persist contact your server administrator.', 'duplicator');
|
191 |
+
?>
|
192 |
+
</div><br/>
|
193 |
+
<?php endif; ?>
|
194 |
+
|
195 |
+
<label><?php _e("Add Custom Path:", 'duplicator'); ?></label><br/>
|
196 |
+
<input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo $package_mysqldump_path; ?> " />
|
197 |
+
<p class="description">
|
198 |
+
<?php
|
199 |
+
_e("This is the path to your mysqldump program.", 'duplicator');
|
200 |
+
?>
|
201 |
+
</p>
|
202 |
+
</div>
|
203 |
+
|
204 |
+
<?php endif; ?>
|
205 |
+
</td>
|
206 |
+
</tr>
|
207 |
+
<tr>
|
208 |
+
<th scope="row"><label><?php _e("Package Debug", 'duplicator'); ?></label></th>
|
209 |
+
<td>
|
210 |
+
<input type="checkbox" name="package_debug" id="package_debug" <?php echo ($package_debug) ? 'checked="checked"' : ''; ?> />
|
211 |
+
<label for="package_debug"><?php _e("Show Package Debug Status in Packages Screen", 'duplicator'); ?></label>
|
212 |
+
</td>
|
213 |
+
</tr>
|
214 |
+
|
215 |
+
</table>
|
216 |
+
|
217 |
+
<!-- ===============================
|
218 |
+
WPFRONT SETTINGS -->
|
219 |
+
<h3 class="title"><?php _e("Roles & Capabilities", 'duplicator') ?> </h3>
|
220 |
+
<hr size="1" />
|
221 |
+
|
222 |
+
<table class="form-table">
|
223 |
+
<tr>
|
224 |
+
<th scope="row"><label><?php _e("Custom Roles", 'duplicator'); ?></label></th>
|
225 |
+
<td>
|
226 |
+
<input type="checkbox" name="wpfront_integrate" id="wpfront_integrate" <?php echo ($wpfront_integrate) ? 'checked="checked"' : ''; ?> <?php echo $wpfront_ready ? '' : 'disabled'; ?> />
|
227 |
+
<label for="wpfront_integrate"><?php _e("Enable User Role Editor Plugin Integration", 'duplicator'); ?></label>
|
228 |
+
|
229 |
+
<div style="margin:15px 0px 0px 25px">
|
230 |
+
<p class="description">
|
231 |
+
<?php printf('%s <a href="https://wordpress.org/plugins/wpfront-user-role-editor/" target="_blank">%s</a> %s'
|
232 |
+
. ' <a href="https://wpfront.com/user-role-editor-pro/?ref=3" target="_blank">%s</a> %s '
|
233 |
+
. ' <a href="https://wpfront.com/integrations/duplicator-integration/" target="_blank">%s</a>',
|
234 |
+
__('The User Role Editor Plugin', 'duplicator'),
|
235 |
+
__('Free', 'duplicator'),
|
236 |
+
__('or', 'duplicator'),
|
237 |
+
__('Professional', 'duplicator'),
|
238 |
+
__('must be installed to use', 'duplicator'),
|
239 |
+
__('this feature.', 'duplicator')
|
240 |
+
);
|
241 |
+
?>
|
242 |
+
</p>
|
243 |
+
</div>
|
244 |
+
</td>
|
245 |
+
</tr>
|
246 |
+
|
247 |
+
</table><br/>
|
248 |
+
|
249 |
+
<p class="submit" style="margin: 20px 0px 0xp 5px;">
|
250 |
+
<br/>
|
251 |
+
<input type="submit" name="submit" id="submit" class="button-primary" value="<?php _e("Save Settings", 'duplicator') ?>" style="display: inline-block;" />
|
252 |
+
</p>
|
253 |
+
|
254 |
</form>
|
views/tools/cleanup.php
CHANGED
@@ -24,16 +24,16 @@
|
|
24 |
|
25 |
switch ($_GET['action']) {
|
26 |
case 'installer' :
|
27 |
-
$action_response = __('Installer file cleanup ran!');
|
28 |
$css_hide_msg = 'div.error {display:none}';
|
29 |
break;
|
30 |
case 'legacy':
|
31 |
DUP_Settings::LegacyClean();
|
32 |
-
$action_response = __('Legacy data removed.');
|
33 |
break;
|
34 |
case 'tmp-cache':
|
35 |
DUP_Package::TmpCleanup(true);
|
36 |
-
$action_response = __('Build cache removed.');
|
37 |
break;
|
38 |
}
|
39 |
|
@@ -71,18 +71,26 @@
|
|
71 |
//No way to know exact name of archive file except from installer.
|
72 |
//The only place where the package can be remove is from installer
|
73 |
//So just show a message if removing from plugin.
|
74 |
-
if (! empty($package_name) )
|
|
|
75 |
$path_parts = pathinfo($package_name);
|
76 |
$path_parts = (isset($path_parts['extension'])) ? $path_parts['extension'] : '';
|
77 |
-
if ($path_parts == "zip" && ! is_dir($package_name))
|
|
|
|
|
|
|
78 |
$html .= (@unlink($package_name))
|
79 |
-
? "<div class='success'>
|
80 |
-
: "<div class='failed'>
|
81 |
-
}
|
82 |
-
|
|
|
|
|
|
|
83 |
}
|
84 |
} else {
|
85 |
-
$
|
|
|
86 |
}
|
87 |
echo $html;
|
88 |
?>
|
@@ -141,11 +149,11 @@
|
|
141 |
jQuery(document).ready(function($) {
|
142 |
Duplicator.Tools.DeleteLegacy = function () {
|
143 |
<?php
|
144 |
-
$msg = __('This action will remove all legacy settings prior to version %1$s. ');
|
145 |
-
$msg .= __('Legacy settings are only needed if you plan to migrate back to an older version of this plugin.');
|
146 |
?>
|
147 |
var result = true;
|
148 |
-
var result = confirm('<?php printf(__($msg), DUPLICATOR_VERSION) ?>');
|
149 |
if (! result)
|
150 |
return;
|
151 |
|
@@ -154,7 +162,7 @@ jQuery(document).ready(function($) {
|
|
154 |
|
155 |
Duplicator.Tools.ClearBuildCache = function () {
|
156 |
<?php
|
157 |
-
$msg = __('This process will remove all build cache files. Be sure no packages are currently building or else they will be cancelled.');
|
158 |
?>
|
159 |
var result = true;
|
160 |
var result = confirm('<?php echo $msg ?>');
|
24 |
|
25 |
switch ($_GET['action']) {
|
26 |
case 'installer' :
|
27 |
+
$action_response = __('Installer file cleanup ran!', 'duplicator');
|
28 |
$css_hide_msg = 'div.error {display:none}';
|
29 |
break;
|
30 |
case 'legacy':
|
31 |
DUP_Settings::LegacyClean();
|
32 |
+
$action_response = __('Legacy data removed.', 'duplicator');
|
33 |
break;
|
34 |
case 'tmp-cache':
|
35 |
DUP_Package::TmpCleanup(true);
|
36 |
+
$action_response = __('Build cache removed.', 'duplicator');
|
37 |
break;
|
38 |
}
|
39 |
|
71 |
//No way to know exact name of archive file except from installer.
|
72 |
//The only place where the package can be remove is from installer
|
73 |
//So just show a message if removing from plugin.
|
74 |
+
if (! empty($package_name) )
|
75 |
+
{
|
76 |
$path_parts = pathinfo($package_name);
|
77 |
$path_parts = (isset($path_parts['extension'])) ? $path_parts['extension'] : '';
|
78 |
+
if ($path_parts == "zip" && ! is_dir($package_name))
|
79 |
+
{
|
80 |
+
$lang1 = __('Successfully removed', 'duplicator');
|
81 |
+
$lang2 = __('Does not exist or unable to remove archive file.', 'duplicator');
|
82 |
$html .= (@unlink($package_name))
|
83 |
+
? "<div class='success'>{$lang1} {$package_name}</div>"
|
84 |
+
: "<div class='failed'>{$lang2}</div>";
|
85 |
+
}
|
86 |
+
else
|
87 |
+
{
|
88 |
+
$lang = __('Does not exist or unable to remove archive file. Please validate that an archive file exists.', 'duplicator');
|
89 |
+
$html .= "<div class='failed'>{$lang}</div>";
|
90 |
}
|
91 |
} else {
|
92 |
+
$lang = __('It is recommended to remove your archive file from the root of your WordPress install. This will need to be done manually', 'duplicator');
|
93 |
+
$html .= "<br/><div>{$lang}</div>";
|
94 |
}
|
95 |
echo $html;
|
96 |
?>
|
149 |
jQuery(document).ready(function($) {
|
150 |
Duplicator.Tools.DeleteLegacy = function () {
|
151 |
<?php
|
152 |
+
$msg = __('This action will remove all legacy settings prior to version %1$s. ', 'duplicator');
|
153 |
+
$msg .= __('Legacy settings are only needed if you plan to migrate back to an older version of this plugin.', 'duplicator');
|
154 |
?>
|
155 |
var result = true;
|
156 |
+
var result = confirm('<?php printf(__($msg, 'duplicator'), DUPLICATOR_VERSION) ?>');
|
157 |
if (! result)
|
158 |
return;
|
159 |
|
162 |
|
163 |
Duplicator.Tools.ClearBuildCache = function () {
|
164 |
<?php
|
165 |
+
$msg = __('This process will remove all build cache files. Be sure no packages are currently building or else they will be cancelled.', 'duplicator');
|
166 |
?>
|
167 |
var result = true;
|
168 |
var result = confirm('<?php echo $msg ?>');
|
views/tools/logging.php
CHANGED
@@ -36,7 +36,7 @@
|
|
36 |
div#dup-refresh-count {display: inline-block}
|
37 |
table#dup-log-panels {width:100%; }
|
38 |
td#dup-log-panel-left {width:75%;}
|
39 |
-
td#dup-log-panel-left div.name {float:left; margin: 0px 0px 5px 5px;
|
40 |
td#dup-log-panel-left div.opts {float:right;}
|
41 |
td#dup-log-panel-right {vertical-align: top; padding-left:15px; max-width: 375px}
|
42 |
div.dup-log-file-list a, span{display: inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 375px; line-height:20px; overflow:hidden}
|
@@ -153,7 +153,20 @@ jQuery(document).ready(function($) {
|
|
153 |
<table id="dup-log-panels">
|
154 |
<tr>
|
155 |
<td id="dup-log-panel-left">
|
156 |
-
<div class="name"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
157 |
<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>
|
158 |
<br style="clear:both" />
|
159 |
<iframe id="dup-log-content" src="<?php echo $logurl ?>" ></iframe>
|
36 |
div#dup-refresh-count {display: inline-block}
|
37 |
table#dup-log-panels {width:100%; }
|
38 |
td#dup-log-panel-left {width:75%;}
|
39 |
+
td#dup-log-panel-left div.name {float:left; margin: 0px 0px 5px 5px;}
|
40 |
td#dup-log-panel-left div.opts {float:right;}
|
41 |
td#dup-log-panel-right {vertical-align: top; padding-left:15px; max-width: 375px}
|
42 |
div.dup-log-file-list a, span{display: inline-block; white-space: nowrap; text-overflow: ellipsis; max-width: 375px; line-height:20px; overflow:hidden}
|
153 |
<table id="dup-log-panels">
|
154 |
<tr>
|
155 |
<td id="dup-log-panel-left">
|
156 |
+
<div class="name">
|
157 |
+
<i class='fa fa-list-alt'></i> <b><?php echo basename($logurl); ?></b> |
|
158 |
+
<i style="cursor: pointer"
|
159 |
+
data-tooltip-title="<?php _e("Host Recommendation:", 'duplicator'); ?>"
|
160 |
+
data-tooltip="<?php _e('Duplicator recommends going with the high performance pro plan or better from Bluehost.com', 'duplicator'); ?>">
|
161 |
+
<i class="fa fa-lightbulb-o" aria-hidden="true"></i>
|
162 |
+
<?php
|
163 |
+
printf("%s <a target='_blank' href='//www.bluehost.com/track/snapcreek/?page=wordpress'>%s</a> %s",
|
164 |
+
__("Duplicator recommends ", 'duplicator'),
|
165 |
+
__("Bluehost", 'duplicator'),
|
166 |
+
__("for more reliable conversions", 'duplicator'));
|
167 |
+
?>
|
168 |
+
</i>
|
169 |
+
</div>
|
170 |
<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>
|
171 |
<br style="clear:both" />
|
172 |
<iframe id="dup-log-content" src="<?php echo $logurl ?>" ></iframe>
|