Duplicator – WordPress Migration Plugin - Version 1.2.0

Version Description

Download this release

Release Info

Developer cory@lamle.org
Plugin Icon 128x128 Duplicator – WordPress Migration Plugin
Version 1.2.0
Comparing to
See all releases

Code changes from version 1.1.34 to 1.2.0

Files changed (45) hide show
  1. assets/js/javascript.php +1 -1
  2. classes/package/class.pack.archive.php +6 -2
  3. classes/package/class.pack.installer.php +20 -17
  4. classes/ui/class.ui.dialog.php +3 -6
  5. classes/ui/class.ui.viewstate.php +2 -0
  6. classes/utilities/class.db.php +6 -2
  7. classes/utilities/class.util.php +0 -1
  8. ctrls/ctrl.ui.php +1 -1
  9. define.php +1 -1
  10. duplicator.php +24 -1
  11. installer/build/assets/inc.css.php +176 -147
  12. installer/build/assets/inc.js.php +53 -41
  13. installer/build/assets/inc.libs.css.php +13 -1
  14. installer/build/assets/inc.libs.js.php +4 -3
  15. installer/build/classes/class.engine.php +4 -12
  16. installer/build/classes/class.logging.php +3 -10
  17. installer/build/classes/config/class.conf.srv.php +45 -52
  18. installer/build/classes/config/class.conf.wp.php +86 -93
  19. installer/build/classes/util/class.db.php +0 -194
  20. installer/build/classes/utilities/class.db.php +190 -0
  21. installer/build/classes/utilities/class.server.php +175 -0
  22. installer/build/classes/{util/class.utils.php → utilities/class.u.php} +36 -83
  23. installer/build/ctrls/ctrl.step1.php +140 -0
  24. installer/build/{ajax.step1.php → ctrls/ctrl.step2.php} +63 -172
  25. installer/build/{ajax.step2.php → ctrls/ctrl.step3.php} +36 -42
  26. installer/build/main.installer.php +124 -145
  27. installer/build/view.help.php +418 -236
  28. installer/build/view.step0.php +0 -13
  29. installer/build/view.step1.php +492 -607
  30. installer/build/view.step2.php +373 -262
  31. installer/build/view.step3.php +321 -244
  32. installer/build/view.step4.php +235 -0
  33. readme.txt +1 -1
  34. views/help/about.php +2 -2
  35. views/help/help.php +1 -1
  36. views/packages/details/controller.php +1 -1
  37. views/packages/details/detail.php +2 -2
  38. views/packages/main/new1.inc.form.php +25 -18
  39. views/packages/main/new1.setup.php +4 -3
  40. views/packages/main/new2.scan.php +5 -3
  41. views/packages/main/new3.build.php +1 -1
  42. views/packages/main/packages.php +1 -1
  43. views/settings/general.php +1 -1
  44. views/tools/diagnostics/inc.settings.php +4 -0
  45. views/tools/logging.php +1 -1
assets/js/javascript.php CHANGED
@@ -1,4 +1,4 @@
1
- <script type="text/javascript">
2
  /* DESCRIPTION: Methods and Objects in this file are global and common in
3
  * nature use this file to place all shared methods and varibles */
4
 
1
+ <script>
2
  /* DESCRIPTION: Methods and Objects in this file are global and common in
3
  * nature use this file to place all shared methods and varibles */
4
 
classes/package/class.pack.archive.php CHANGED
@@ -145,13 +145,17 @@ class DUP_Archive
145
  $rootPath = DUP_Util::safePath(rtrim(DUPLICATOR_WPROOTPATH, '//'));
146
  $this->Dirs = array();
147
 
 
148
  //If the root directory is a filter then we will only need the root files
149
- if (in_array($this->PackDir, $this->FilterDirsAll)) {
150
  $this->Dirs[] = $this->PackDir;
151
  } else {
152
  $this->Dirs = $this->dirsToArray($rootPath, $this->FilterDirsAll);
153
  $this->Dirs[] = $this->PackDir;
154
- }
 
 
 
155
 
156
  //Filter Directories
157
  //Invalid test contains checks for: characters over 250, invlaid characters,
145
  $rootPath = DUP_Util::safePath(rtrim(DUPLICATOR_WPROOTPATH, '//'));
146
  $this->Dirs = array();
147
 
148
+ //@todo remove after 1.2.2 no reason to include files with root filter
149
  //If the root directory is a filter then we will only need the root files
150
+ /*if (in_array($this->PackDir, $this->FilterDirsAll)) {
151
  $this->Dirs[] = $this->PackDir;
152
  } else {
153
  $this->Dirs = $this->dirsToArray($rootPath, $this->FilterDirsAll);
154
  $this->Dirs[] = $this->PackDir;
155
+ }*/
156
+
157
+ $this->Dirs = $this->dirsToArray($rootPath, $this->FilterDirsAll);
158
+ $this->Dirs[] = $this->PackDir;
159
 
160
  //Filter Directories
161
  //Invalid test contains checks for: characters over 250, invlaid characters,
classes/package/class.pack.installer.php CHANGED
@@ -59,22 +59,25 @@ class DUP_Installer
59
  }
60
 
61
  $embeded_files = array(
62
- "assets/inc.libs.css.php" => "@@INC.LIBS.CSS.PHP@@",
63
- "assets/inc.css.php" => "@@INC.CSS.PHP@@",
64
- "assets/inc.libs.js.php" => "@@INC.LIBS.JS.PHP@@",
65
- "assets/inc.js.php" => "@@INC.JS.PHP@@",
66
- "classes/util/class.utils.php" => "@@CLASS.UTILS.PHP@@",
67
- "classes/util/class.db.php" => "@@CLASS.DB.PHP@@",
68
- "classes/class.logging.php" => "@@CLASS.LOGGING.PHP@@",
69
- "classes/class.engine.php" => "@@CLASS.ENGINE.PHP@@",
70
- "classes/config/class.conf.wp.php" => "@@CLASS.CONF.WP.PHP@@",
71
- "classes/config/class.conf.srv.php" => "@@CLASS.CONF.SRV.PHP@@",
72
- "ajax.step1.php" => "@@AJAX.STEP1.PHP@@",
73
- "ajax.step2.php" => "@@AJAX.STEP2.PHP@@",
74
- "view.step1.php" => "@@VIEW.STEP1.PHP@@",
75
- "view.step2.php" => "@@VIEW.STEP2.PHP@@",
76
- "view.step3.php" => "@@VIEW.STEP3.PHP@@",
77
- "view.help.php" => "@@VIEW.HELP.PHP@@",);
 
 
 
78
 
79
  foreach ($embeded_files as $name => $token) {
80
  $file_path = DUPLICATOR_PLUGIN_PATH."installer/build/{$name}";
@@ -149,7 +152,7 @@ class DUP_Installer
149
  "fwrite_version_os" => $this->Package->VersionOS,
150
  //GENERAL
151
  "fwrite_url_old" => get_option('siteurl'),
152
- "fwrite_package_name" => "{$this->Package->NameHash}_archive.zip",
153
  "fwrite_package_notes" => $this->Package->Notes,
154
  "fwrite_secure_name" => $this->Package->NameHash,
155
  "fwrite_url_new" => $this->Package->Installer->OptsURLNew,
59
  }
60
 
61
  $embeded_files = array(
62
+ "assets/inc.libs.css.php" => "@@INC.LIBS.CSS.PHP@@",
63
+ "assets/inc.css.php" => "@@INC.CSS.PHP@@",
64
+ "assets/inc.libs.js.php" => "@@INC.LIBS.JS.PHP@@",
65
+ "assets/inc.js.php" => "@@INC.JS.PHP@@",
66
+ "classes/utilities/class.u.php" => "@@CLASS.U.PHP@@",
67
+ "classes/utilities/class.server.php" => "@@CLASS.SERVER.PHP@@",
68
+ "classes/utilities/class.db.php" => "@@CLASS.DB.PHP@@",
69
+ "classes/class.logging.php" => "@@CLASS.LOGGING.PHP@@",
70
+ "classes/class.engine.php" => "@@CLASS.ENGINE.PHP@@",
71
+ "classes/config/class.conf.wp.php" => "@@CLASS.CONF.WP.PHP@@",
72
+ "classes/config/class.conf.srv.php" => "@@CLASS.CONF.SRV.PHP@@",
73
+ "ctrls/ctrl.step1.php" => "@@CTRL.STEP1.PHP@@",
74
+ "ctrls/ctrl.step2.php" => "@@CTRL.STEP2.PHP@@",
75
+ "ctrls/ctrl.step3.php" => "@@CTRL.STEP3.PHP@@",
76
+ "view.step1.php" => "@@VIEW.STEP1.PHP@@",
77
+ "view.step2.php" => "@@VIEW.STEP2.PHP@@",
78
+ "view.step3.php" => "@@VIEW.STEP3.PHP@@",
79
+ "view.step4.php" => "@@VIEW.STEP4.PHP@@",
80
+ "view.help.php" => "@@VIEW.HELP.PHP@@",);
81
 
82
  foreach ($embeded_files as $name => $token) {
83
  $file_path = DUPLICATOR_PLUGIN_PATH."installer/build/{$name}";
152
  "fwrite_version_os" => $this->Package->VersionOS,
153
  //GENERAL
154
  "fwrite_url_old" => get_option('siteurl'),
155
+ "fwrite_archive_name" => "{$this->Package->NameHash}_archive.zip",
156
  "fwrite_package_notes" => $this->Package->Notes,
157
  "fwrite_secure_name" => $this->Package->NameHash,
158
  "fwrite_url_new" => $this->Package->Installer->OptsURLNew,
classes/ui/class.ui.dialog.php CHANGED
@@ -69,6 +69,9 @@ class DUP_UI_Dialog
69
  */
70
  private $uniqid;
71
 
 
 
 
72
  public function __construct()
73
  {
74
  add_thickbox();
@@ -80,7 +83,6 @@ class DUP_UI_Dialog
80
  /**
81
  * Gets the unique id that is assigned to each instance of a dialog
82
  *
83
- * @access public
84
  * @return int The unique ID of this dialog
85
  */
86
  public function getID()
@@ -91,7 +93,6 @@ class DUP_UI_Dialog
91
  /**
92
  * Gets the unique id that is assigned to each instance of a dialogs message text
93
  *
94
- * @access public
95
  * @return int The unique ID of the message
96
  */
97
  public function getMessageID()
@@ -102,7 +103,6 @@ class DUP_UI_Dialog
102
  /**
103
  * Initilizes the alert base html code used to display when needed
104
  *
105
- * @access public
106
  * @return string The html content used for the alert dialog
107
  */
108
  public function initAlert()
@@ -127,7 +127,6 @@ HTML;
127
  /**
128
  * Shows the alert base js code used to display when needed
129
  *
130
- * @access public
131
  * @return string The javascript content used for the alert dialog
132
  */
133
  public function showAlert()
@@ -141,7 +140,6 @@ HTML;
141
  /**
142
  * Shows the confirm base js code used to display when needed
143
  *
144
- * @access public
145
  * @return string The javascript content used for the confirm dialog
146
  */
147
  public function initConfirm()
@@ -188,7 +186,6 @@ HTML;
188
  /**
189
  * Shows the confirm base js code used to display when needed
190
  *
191
- * @access public
192
  * @return string The javascript content used for the confirm dialog
193
  */
194
  public function showConfirm()
69
  */
70
  private $uniqid;
71
 
72
+ /**
73
+ * Init this object when created
74
+ */
75
  public function __construct()
76
  {
77
  add_thickbox();
83
  /**
84
  * Gets the unique id that is assigned to each instance of a dialog
85
  *
 
86
  * @return int The unique ID of this dialog
87
  */
88
  public function getID()
93
  /**
94
  * Gets the unique id that is assigned to each instance of a dialogs message text
95
  *
 
96
  * @return int The unique ID of the message
97
  */
98
  public function getMessageID()
103
  /**
104
  * Initilizes the alert base html code used to display when needed
105
  *
 
106
  * @return string The html content used for the alert dialog
107
  */
108
  public function initAlert()
127
  /**
128
  * Shows the alert base js code used to display when needed
129
  *
 
130
  * @return string The javascript content used for the alert dialog
131
  */
132
  public function showAlert()
140
  /**
141
  * Shows the confirm base js code used to display when needed
142
  *
 
143
  * @return string The javascript content used for the confirm dialog
144
  */
145
  public function initConfirm()
186
  /**
187
  * Shows the confirm base js code used to display when needed
188
  *
 
189
  * @return string The javascript content used for the confirm dialog
190
  */
191
  public function showConfirm()
classes/ui/class.ui.viewstate.php CHANGED
@@ -31,6 +31,8 @@ class DUP_UI_ViewState
31
  *
32
  * @param string $key A unique key to define the ui element
33
  * @param string $value A generic value to use for the view state
 
 
34
  */
35
  public static function save($key, $value)
36
  {
31
  *
32
  * @param string $key A unique key to define the ui element
33
  * @param string $value A generic value to use for the view state
34
+ *
35
+ * @return bool Returns true if the value was succesfully saved
36
  */
37
  public static function save($key, $value)
38
  {
classes/utilities/class.db.php CHANGED
@@ -30,8 +30,12 @@ class DUP_DB extends wpdb
30
  public static function getVariable($name)
31
  {
32
  global $wpdb;
33
- $row = $wpdb->get_row("SHOW VARIABLES LIKE '{$name}'", ARRAY_N);
34
- return isset($row[1]) ? $row[1] : null;
 
 
 
 
35
  }
36
 
37
  /**
30
  public static function getVariable($name)
31
  {
32
  global $wpdb;
33
+ if (strlen($name)) {
34
+ $row = $wpdb->get_row("SHOW VARIABLES LIKE '{$name}'", ARRAY_N);
35
+ return isset($row[1]) ? $row[1] : null;
36
+ } else {
37
+ return null;
38
+ }
39
  }
40
 
41
  /**
classes/utilities/class.util.php CHANGED
@@ -191,7 +191,6 @@ class DUP_Util
191
  * @return string Returns the string with the $value appended once
192
  */
193
  public static function appendOnce($string, $value)
194
-
195
  {
196
  return $string.(substr($string, -1) == $value ? '' : $value);
197
  }
191
  * @return string Returns the string with the $value appended once
192
  */
193
  public static function appendOnce($string, $value)
 
194
  {
195
  return $string.(substr($string, -1) == $value ? '' : $value);
196
  }
ctrls/ctrl.ui.php CHANGED
@@ -98,4 +98,4 @@ class DUP_CTRL_UI extends DUP_CTRL_Base
98
  }
99
 
100
  }
101
- ?>
98
  }
99
 
100
  }
101
+ ?>
define.php CHANGED
@@ -2,7 +2,7 @@
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
- define('DUPLICATOR_VERSION', '1.1.34');
6
  define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
8
  define('DUPLICATOR_SITE_URL', get_site_url());
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
+ define('DUPLICATOR_VERSION', '1.2.0');
6
  define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
8
  define('DUPLICATOR_SITE_URL', get_site_url());
duplicator.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Create and transfer a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
6
- Version: 1.1.34
7
  Author: Snap Creek
8
  Author URI: http://www.snapcreek.com/duplicator/
9
  Text Domain: duplicator
@@ -23,6 +23,10 @@
23
  You should have received a copy of the GNU General Public License
24
  along with this program; if not, write to the Free Software
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
 
 
 
26
  ================================================================================ */
27
 
28
  require_once("define.php");
@@ -335,5 +339,24 @@ if (is_admin() == true)
335
  return $links;
336
  }
337
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
338
  }
339
  ?>
3
  Plugin Name: Duplicator
4
  Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Create and transfer a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
6
+ Version: 1.2.0
7
  Author: Snap Creek
8
  Author URI: http://www.snapcreek.com/duplicator/
9
  Text Domain: duplicator
23
  You should have received a copy of the GNU General Public License
24
  along with this program; if not, write to the Free Software
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
+
27
+ SOURCE CONTRIBUTORS:
28
+ David Coveney of Interconnect IT Ltd
29
+ https://github.com/interconnectit/Search-Replace-DB/
30
  ================================================================================ */
31
 
32
  require_once("define.php");
339
  return $links;
340
  }
341
 
342
+
343
+ /** ========================================================
344
+ * GENERAL
345
+ * ===================================================== */
346
+
347
+ /**
348
+ * Used for installer files to redirect if accessed directly
349
+ *
350
+ * @access global
351
+ * @return null
352
+ */
353
+ function duplicator_secure_check()
354
+ {
355
+ $baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
356
+ header("HTTP/1.1 301 Moved Permanently");
357
+ header("Location: $baseURL");
358
+ exit;
359
+ }
360
+
361
  }
362
  ?>
installer/build/assets/inc.css.php CHANGED
@@ -1,167 +1,140 @@
1
- <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location:$_baseURL");
7
- exit;
8
- }
9
- ?>
10
  <style>
11
  body {font-family:"Open Sans",sans-serif;}
12
- body,td,th {font-size:13px;color:#000;}
13
  fieldset {border:1px solid silver; border-radius:5px; padding:10px}
14
  h3 {margin:1px; padding:1px; font-size:14px;}
15
  a {color:#222}
16
  a:hover{color:gray}
17
- input[type=text] { width:500px; border-radius:3px; height:17px; font-size:12px; border:1px solid silver;}
 
 
18
  input.readonly {background-color:#efefef;}
19
- i.small {font-size:11px}
20
 
21
- /* ============================
22
  COMMON VIEW ELEMENTS*/
23
- 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;}
24
  div#content-inner {padding:10px 30px; min-height:550px}
25
  form.content-form {min-height:550px; position:relative; line-height:17px}
26
- div.dup-logfile-link {float:right; font-weight:normal; font-size:12px}
 
27
 
28
  /* WIZARD STEPS */
29
- 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}
30
- div#dup-wiz {padding:0px; margin:7px 0 10px 20px; height:20px }
31
- div#dup-wiz-steps {margin:0px 0 0 10px; padding:0px; clear:both; font-weight:bold;font-size:12px; min-width:250px }
32
- #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;}
33
- /* WIZ-DEFAULT*/
34
- #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; }
35
- #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; }
36
- #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; }
37
- /* WIZ-COMPLETED */
38
- #dup-wiz .completed-step a {color:#ccc; background:#999;}
39
- #dup-wiz .completed-step a:before {border-top:12px solid #999; border-bottom:12px solid #999;}
40
- #dup-wiz .completed-step a:after {border-left:12px solid #999;}
41
- #dup-wiz .completed-step span {color:#ccc;}
42
- /* WIZ-ACTIVE */
43
- #dup-wiz .active-step a {color:#fff; background:#999;}
44
- #dup-wiz .active-step a:before {border-top:12px solid #999; border-bottom:12px solid #999;}
45
- #dup-wiz .active-step a:after {border-left:12px solid #999;}
46
- #dup-wiz .active-step span {color:#fff;}
47
-
48
- /*Help */
49
- select#dup-hlp-lnk {border-radius:3px; font-size:11px; margin:3px 5px 0 0px; background-color:#efefef; border:1px solid silver}
50
- div.dup-help-page {padding:5px 0 0 5px}
51
- div.dup-help-page fieldset {margin-bottom:25px}
52
- div#dup-main-help {line-height:18px}
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:14px; overflow-y:scroll}
57
- div.hdr-main {font-size:18px; padding:0 0 5px 0; border-bottom:1px solid #999; font-weight:bold; margin:5px 0 10px 0;}
58
- div.hdr-sub {font-size:15px; padding:2px 2px 2px 0; border-bottom:1px solid #dfdfdf; font-weight:bold; margin-bottom:5px;}
59
-
60
- /*BOXES:Expandable sections */
61
- div.dup-box {padding:0px; display:block; background-color:#fff; border:1px solid #e5e5e5; box-shadow:0 1px 1px rgba(0,0,0,.04);}
62
- div.dup-box-title {font-size:14px; padding:5px 0 0 10px; font-weight:bold; cursor:pointer; height:23px; margin:0px; background-color:#F9F9F9}
63
- div.dup-box-title:hover {background-color:#efefef;}
64
- 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}
65
- 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;}
66
 
67
- /* ============================
68
- STEP 1 VIEW */
69
- div#dup-s1-warning-check label {cursor: pointer}
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#s1-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.s1-modes {padding:0px 15px 0 0px;}
81
- div#s1-dbconn {margin:auto; text-align:center; margin:15px 0 10px 0px}
 
 
 
 
 
 
 
 
 
 
 
 
82
 
83
- input.s1-small-btn {font-size:11px; height:20px; border:1px solid gray; border-radius:3px; cursor:pointer}
84
- input#s1-dbport-btn { width:80px}
85
- div.dup-db-test small{display:block; font-style:italic; color:#333; padding:3px 2px 5px 2px; border-bottom:1px dashed silver; margin-bottom:10px; text-align: center }
86
- table.dup-db-test-dtls {text-align: left; margin: auto}
87
- table.dup-db-test-dtls td:first-child {font-weight: bold}
88
- div#dbconn-test-msg {font-size:12px}
89
- div#s1-dbconn-status {border:1px solid silver; border-radius:3px; background-color:#f9f9f9; padding:2px 5px; margin-top:10px; height:175px; overflow-y: scroll}
90
- div#s1-dbconn-status div.warn-msg {text-align: left; padding:5px; margin:10px 0 10px 0}
91
- div#s1-dbconn-status div.warn-msg b{color:maroon}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
 
93
- /*Advanced Options & Warning Area*/
94
- div.s1-advopts-section {margin:15px 0 25px 0}
95
- div.s1-advopts-section label {cursor: pointer}
96
- div.s1-advopts-help {text-align: center; margin:10px}
97
- div.dup-s1-gopro {color: black;font-style: italic;margin-top: 11px; text-align:center;margin-top:20px; padding:5px}
98
- div#dup-s1-warning {padding:5px;font-size:12px; color:gray; line-height:12px;font-style:italic; overflow-y:scroll; height:150px; border:1px solid #dfdfdf; background-color:#fff; border-radius:3px}
99
- div#dup-s1-warning-check {padding:5px; font-size:12px; font-weight:normal; font-style:italic;}
100
- div#dup-s1-warning-emptydb {display:none; color:#AF2222; margin:0px 0 0 20px}
101
- table.s1-advopts label.radio {width:50px; display:inline-block}
102
-
103
- /*Dialog*/
104
- div#dup-s1-dialog-data {height:90%; font-size:11px; padding:5px; line-height:16px; }
105
- td.dup-s1-dialog-data-details {padding:1px 0 10px 30px; border-radius:4px; line-height:14px; font-size:11px; display:none}
106
- td.dup-s1-dialog-data-details b {width:50px;display:inline-block}
107
- .dup-pass {display:inline-block; color:green;}
108
- .dup-ok {display:inline-block; color:#5860C7;}
109
- .dup-fail {display:inline-block; color:#AF0000;}
110
- .dup-notice {display:inline-block; color:#000;}
111
- hr.dup-dots { border:none; border-top:1px dotted silver; height:1px; width:100%;}
112
- div.dup-ui-error {padding-top:2px; font-size:14px; line-height: 20px}
113
- div.help {color:#555; font-style:italic; font-size:11px}
114
 
115
- /* ============================
116
- STEP 2 VIEW */
117
- table.table-inputs-s2{width:100%; border:0px;}
118
- table.table-inputs-s2 td{white-space:nowrap; padding:2px;}
119
- div#dup-s2-adv-opts {margin-top:5px; }
120
- div.dup-s2-allnonelinks {font-size:11px; float:right;}
 
 
 
 
 
 
121
 
122
- /* ============================
123
- STEP 3 VIEW */
124
- div.s3-final-title {color:#BE2323;}
125
- div.s3-connect {font-size:12px; text-align:center; font-style:italic; position:absolute; bottom:10px; padding:10px; width:100%; margin-top:20px}
126
- table.s3-report-results,
127
- table.s3-report-errs {border-collapse:collapse; border:1px solid #dfdfdf; }
128
- table.s3-report-errs td {text-align:center; width:33%}
129
- table.s3-report-results th, table.s3-report-errs th {background-color:#efefef; padding:0px; font-size:14px; padding:0px}
130
- table.s3-report-results td, table.s3-report-errs td {padding:0px; white-space:nowrap; border:1px solid #dfdfdf; text-align:center; font-size:12px}
131
- table.s3-report-results td:first-child {text-align:left; font-weight:bold; padding-left:3px}
132
- div.dup-step3-err-title {width:100%; background-color: #dfdfdf; font-weight: bold; margin:-5px 0 15px 0; padding:3px 0 1px 3px; border-radius: 4px; font-size:14px}
133
-
134
- div.s3-err-msg {padding:8px; display:none; border:1px dashed #999; margin:10px 0 20px 0px; border-radius:5px;}
135
- 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; }
136
- 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 }
137
- 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;}
138
- table.s3-final-step {width:100%;}
139
- table.s3-final-step td {padding:5px 15px 5px 5px}
140
- table.s3-final-step td:first-child {white-space:nowrap; font-weight:bold}
141
- div.s3-go-back {border-bottom:1px dotted #dfdfdf; border-top:1px dotted #dfdfdf; margin:auto; text-align:center; font-size: 12px}
142
- div.s3-btns-msg {text-align: center; font-size:10px; color:#777; margin:5px 0 15px 0}
143
- a.s3-final-btns {display: block; width:135; padding:5px; line-height: 1.4; background-color:#F1F1F1; border:1px solid silver;
144
- color: #000; box-shadow: 5px 5px 5px -5px #949494; text-decoration: none; text-align: center; border-radius: 4px;
145
- }
146
- a.s3-final-btns:hover {background-color: #dfdfdf;}
147
- div.s3-gopro-btn {text-align:center; font-size:14px; margin:auto; width:200px; font-style: italic}
148
 
149
- /* ============================
150
- BUTTONS */
151
- div.dup-footer-buttons {padding:10px; width:100%; text-align:right;}
152
- div.dup-footer-buttons input, button {
153
- color:#000; font-size:12px; border-radius:5px; padding:6px 8px 4px 8px; border:1px solid #999;
154
- background-color:#F1F1F1;
155
- background-image:-ms-linear-gradient(top, #F9F9F9, #ECECEC);
156
- background-image:-moz-linear-gradient(top, #F9F9F9, #ECECEC);
157
- background-image:linear-gradient(top, #F9F9F9, #ECECEC);
158
- }
159
- div.dup-footer-buttons input[disabled=disabled]{background-color:#F4F4F4; color:silver; border:1px solid silver;}
160
- div.dup-footer-buttons input, button {cursor:pointer; border:1px solid #000; }
161
 
162
- /*!
163
- * password indicator
164
- */
165
  .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}
166
  .top_testresult span{margin:0;}
167
  .top_shortPass{background:#edabab; border:1px solid #bc0000;display:block;}
@@ -169,12 +142,68 @@
169
  .top_goodPass{background:#ffffe0; border:1px solid #e6db55; display:block;}
170
  .top_strongPass{background:#d3edab; border:1px solid #73bc00; display:block;}
171
 
172
- /*================================================
173
- PARSLEY:Overrides*/
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
174
  input.parsley-error, textarea.parsley-error, select.parsley-error {
175
- color:#B94A48 !important;
176
- background-color:#F2DEDE !important;
177
- border:1px solid #EED3D7 !important;
178
  }
179
  ul.parsley-errors-list {margin:1px 0 0 -40px; list-style-type:none; font-size:10px}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
180
  </style>
 
 
 
 
 
 
 
 
 
1
  <style>
2
  body {font-family:"Open Sans",sans-serif;}
 
3
  fieldset {border:1px solid silver; border-radius:5px; padding:10px}
4
  h3 {margin:1px; padding:1px; font-size:14px;}
5
  a {color:#222}
6
  a:hover{color:gray}
7
+ input[type=text], input[type=password], select {width:97%; border-radius:3px; height:17px; font-size:12px !important; border:1px solid silver; padding:2px}
8
+ select {height:22px;padding-left:0; width:100%}
9
+ select:disabled {background:#EBEBE4}
10
  input.readonly {background-color:#efefef;}
 
11
 
12
+ /* ======================================
13
  COMMON VIEW ELEMENTS*/
14
+ 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; font-size:14px; color:#000;}
15
  div#content-inner {padding:10px 30px; min-height:550px}
16
  form.content-form {min-height:550px; position:relative; line-height:17px}
17
+ div.status-badge-pass {border-radius:4px; color:#fff; padding:0 4px 0 4px; font-size:12px; min-width:30px; text-align:center; background-color:#418446;display:inline-block }
18
+ div.status-badge-fail {border-radius:4px; color:#fff; padding:0 4px 0 4px; font-size:12px; min-width:30px; text-align:center; background-color:maroon; display:inline-block}
19
 
20
  /* WIZARD STEPS */
21
+ table.dupx-header {border-top-left-radius:5px; border-top-right-radius:5px; width:100%; box-shadow:0 5px 3px -3px #999; background-color:#F1F1F1}
22
+ .dupx-header-version {white-space:nowrap; color:#555; font-size:11px; font-style:italic; text-align:right; padding:0 15px 5px 0; line-height:14px}
23
+ .dupx-header-version a {color:#555;}
24
+ div.dupx-logfile-link {float:right; font-weight:normal; font-size:12px}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
25
  div#progress-area {padding:5px; margin:150px 0 0 0px; text-align:center;}
26
+ div#ajaxerr-data {padding:5px; height:350px; width:99%; border:1px solid silver; border-radius:5px; background-color:#efefef; font-size:14px; overflow-y:scroll; line-height:24px}
 
 
 
 
 
 
 
 
 
27
 
28
+ /*TITLE HEADERS */
29
+ div.hdr-main {font-size:22px; padding:0 0 5px 0; border-bottom:1px solid #D3D3D3; font-weight:bold; margin:10px 0 20px 0;}
30
+ div.hdr-main span.step {color:#DB4B38}
31
+ div.hdr-sub1 {font-size:18px; margin-bottom:5px; border-bottom:1px solid #D3D3D3;padding:2px 2px 5px 0;font-weight:bold;}
32
+ div.hdr-sub1 a {cursor:pointer; text-decoration: none !important}
33
+ div.hdr-sub2 {font-size:16px; padding:2px 2px 2px 0; border-bottom:1px solid #D3D3D3; font-weight:bold; margin-bottom:5px; border:none}
34
+ div.hdr-sub3 {font-size:16px; padding:2px 2px 2px 0; border-bottom:1px solid #D3D3D3; font-weight:bold; margin-bottom:5px;}
35
+
36
+ /* BUTTONS */
37
+ div.dupx-footer-buttons {position:absolute; bottom:10px; padding:10px; right:0}
38
+ div.dupx-footer-buttons input:hover, button:hover {border:1px solid #000}
39
+ div.dupx-footer-buttons input[disabled=disabled]{background-color:#F4F4F4; color:silver; border:1px solid silver;}
40
+ button.default-btn, input.default-btn {cursor:pointer; color:#fff; font-size:16px; border-radius:5px; padding:6px 20px 4px 20px; height:32px; background-color:#13659C; border:1px solid #000;}
41
 
42
+ table.dupx-opts {width:100%; border:0px;}
43
+ table.dupx-opts td{white-space:nowrap; padding:3px;}
44
+ table.dupx-opts td:first-child{width:125px; font-weight: bold}
45
+ table.dupx-advopts td:first-child{width:125px; font-weight:bold}
46
+ table.dupx-advopts td label{min-width:60px; display:inline-block; cursor:pointer}
47
+
48
+ .dupx-pass {display:inline-block; color:green;}
49
+ .dupx-fail {display:inline-block; color:#AF0000;}
50
+ .dupx-notice {display:inline-block; color:#000;}
51
+ div.dupx-ui-error {padding-top:2px; font-size:14px; line-height: 20px}
52
+
53
+ /*Dialog Info */
54
+ div.dlg-serv-info {line-height:22px; font-size:12px; margin:0}
55
+ div.dlg-serv-info div.info-txt {text-align: center; font-size:11px; font-style:italic}
56
+ div.dlg-serv-info label {display:inline-block; width:175px; font-weight: bold}
57
+ div.dlg-serv-info div.hdr {background-color: #dfdfdf; font-weight: bold; margin-top:5px; border-radius: 4px; padding:2px; border: 1px solid silver; font-size: 16px}
58
+ div#modal-window div.modal-title {background-color:#D0D0D0}
59
+ div#modal-window div.modal-text {padding-top:10px !important}
60
 
61
+ /* ======================================
62
+ STEP 1 VIEW
63
+ ====================================== */
64
+ table.s1-archive-local td {padding:5px}
65
+ table.s1-archive-local td:first-child {font-weight:bold; min-width:50px}
66
+ div#s1-area-sys-setup {padding:15px 0 0 10px}
67
+ table.s1-checks-area {width:100%; margin:0; padding:0}
68
+ table.s1-checks-area td.title {font-size:16px; width:100%}
69
+ table.s1-checks-area td.toggle {font-size:11px; margin-right:7px; font-weight:normal}
70
+
71
+ div.s1-reqs {background-color:#efefef; border:1px solid silver; border-radius:5px; margin-top:-5px}
72
+ div.s1-reqs div.notice {background-color:#E0E0E0; color:#000; text-align:center; font-size:12px; border-bottom: 1px solid silver; padding:2px; font-style:italic}
73
+ div.s1-reqs div.status {float:right; border-radius:4px; color:#fff; padding:0 4px 0 4px; margin:4px 5px 0 0; font-size:12px; min-width:30px; text-align:center}
74
+ div.s1-reqs div.pass {background-color:green;}
75
+ div.s1-reqs div.fail {background-color:maroon;}
76
+ div.s1-reqs div.title {padding:4px; font-size:14px;}
77
+ div.s1-reqs div.title:hover {background-color:#dfdfdf; cursor:pointer}
78
+ div.s1-reqs div.info {padding:8px 8px 20px 8px; background-color:#fff; display:none; line-height:18px; font-size: 12px}
79
+ div.s1-reqs div.info a {color:#485AA3;}
80
+ div.s1-archive-failed-msg {padding:5px 10px 10px 10px; border:1px solid silver; background: #efefef; font-size: 12px}
81
+ div.s1-err-msg {padding:8px; border:1px dashed #999; margin:10px 0 20px 0px; border-radius:5px; color:maroon}
82
+
83
+ /*Terms and Notices*/
84
+ div#s1-warning-check label{cursor:pointer;}
85
+ div#s1-warning-msg {padding:5px;font-size:12px; color:#333; line-height:14px;font-style:italic; overflow-y:scroll; height:150px; border:1px solid #dfdfdf; background:#fff; border-radius:3px}
86
+ div#s1-warning-check {padding:3px; font-size:16px; font-weight:normal;}
87
+ input#accept-warnings {height: 17px; width:17px}
88
 
89
+ /* ======================================
90
+ STEP 2 VIEW
91
+ ====================================== */
92
+ /*Toggle Buttons */
93
+ div.s2-btngrp {text-align:center; margin:10px 0 0 0}
94
+ div.s2-btngrp input[type=button] {font-size:14px; padding:5px; width:120px; border:1px solid silver; cursor:pointer}
95
+ div.s2-btngrp input[type=button]:first-child {border-radius:5px 0 0 5px; margin-right:-2px}
96
+ div.s2-btngrp input[type=button]:last-child {border-radius:0 5px 5px 0; margin-left:-2px}
97
+ div.s2-btngrp input[type=button].active {background:#999999; color:#fff; font-weight:bold; box-shadow:inset 0 0 10px #444;}
98
+ div.s2-btngrp input[type=button].in-active {background:#E4E4E4; }
99
+ div.s2-btngrp input[type=button]:hover {border:1px solid #999}
 
 
 
 
 
 
 
 
 
 
100
 
101
+ div.s2-modes {padding:0px 15px 0 0px;}
102
+ div#s2-dbconn {margin:auto; text-align:center; margin:15px 0 10px 0px}
103
+ input.s2-small-btn {font-size:11px; height:23px; border:1px solid gray; border-radius:3px; cursor:pointer}
104
+ table.s2-opts-dbhost td {padding:0; margin:0}
105
+ input#s2-dbport-btn { width:80px}
106
+ div.s2-db-test small{display:block; font-style:italic; color:#333; padding:3px 2px 5px 2px; border-bottom:1px dashed silver; margin-bottom:10px; text-align: center }
107
+ table.s2-db-test-dtls {text-align: left; margin: auto}
108
+ table.s2-db-test-dtls td:first-child {font-weight: bold}
109
+ div#s2-dbconn-test-msg {font-size:12px}
110
+ div#s2-dbconn-status {border:1px solid silver; border-radius:3px; background-color:#f9f9f9; padding:2px 5px; margin-top:10px; height:175px; overflow-y: scroll}
111
+ div#s2-dbconn-status div.warn-msg {text-align: left; padding:5px; margin:10px 0 10px 0}
112
+ div#s2-dbconn-status div.warn-msg b{color:maroon}
113
 
114
+ /*cPanel Tab */
115
+ div#s2-cpnl-pane {display: none; min-height: 190px;}
116
+ div.s2-gopro {color: black; margin-top:10px; padding:0 20px 10px 20px; border: 1px solid silver; background-color:#F6F6F6; border-radius: 4px}
117
+ div.s2-gopro h2 {text-align: center; margin:10px}
118
+ div.s2-gopro small {font-style: italic}
119
+
120
+ /*Advanced Options & Warning Area*/
121
+ div#s2-area-adv-opts label {cursor: pointer}
122
+ div#s2-warning {padding:5px;font-size:12px; color:gray; line-height:12px;font-style:italic; overflow-y:scroll; height:150px; border:1px solid #dfdfdf; background-color:#fff; border-radius:3px}
123
+ div#s2-warning-check {padding:5px; font-size:12px; font-weight:normal; font-style:italic;}
124
+ div#s2-warning-check label {cursor: pointer; line-height: 16px}
125
+ div#s2-warning-emptydb {display:none; color:#AF2222; margin:2px 0 0 20px; font-size: 12px}
126
+ table.s2-advopts label.radio {width:50px; display:inline-block}
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
+ /* ======================================
129
+ STEP 3 VIEW
130
+ ====================================== */
131
+ table.s3-table-inputs {width:100%; border:0px;}
132
+ table.s3-table-inputs td{white-space:nowrap; padding:2px;}
133
+ table.s3-table-inputs td:first-child{font-weight: bold; width:125px}
134
+ div#s3-adv-opts {margin-top:5px; }
135
+ div.s3-allnonelinks {font-size:11px; float:right;}
 
 
 
 
136
 
137
+ /* password indicator */
 
 
138
  .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}
139
  .top_testresult span{margin:0;}
140
  .top_shortPass{background:#edabab; border:1px solid #bc0000;display:block;}
142
  .top_goodPass{background:#ffffe0; border:1px solid #e6db55; display:block;}
143
  .top_strongPass{background:#d3edab; border:1px solid #73bc00; display:block;}
144
 
145
+ /* ======================================
146
+ STEP 4 VIEW
147
+ ====================================== */
148
+ div.s4-final-title {color:#BE2323;}
149
+ div.s4-connect {font-size:12px; text-align:center; font-style:italic; position:absolute; bottom:10px; padding:10px; width:100%; margin-top:20px}
150
+ table.s4-report-results,
151
+ table.s4-report-errs {border-collapse:collapse; border:1px solid #dfdfdf; }
152
+ table.s4-report-errs td {text-align:center; width:33%}
153
+ table.s4-report-results th, table.s4-report-errs th {background-color:#efefef; padding:0px; font-size:14px; padding:0px}
154
+ table.s4-report-results td, table.s4-report-errs td {padding:0px; white-space:nowrap; border:1px solid #dfdfdf; text-align:center; font-size:12px}
155
+ table.s4-report-results td:first-child {text-align:left; font-weight:bold; padding-left:3px}
156
+ div.s4-err-title {width:100%; background-color: #dfdfdf; font-weight: bold; margin:-5px 0 15px 0; padding:3px 0 1px 3px; border-radius: 4px; font-size:14px}
157
+
158
+ div.s4-err-msg {padding:8px; display:none; border:1px dashed #999; margin:10px 0 20px 0px; border-radius:5px;}
159
+ div.s4-err-msg div.content{padding:5px; font-size:11px; line-height:17px; max-height:125px; overflow-y:scroll; border:1px solid silver; margin:3px; }
160
+ div.s4-err-msg div.info-error{padding:7px; background-color:#EAA9AA; border:1px solid silver; border-radius:5px; font-size:12px; line-height:16px }
161
+ div.s4-err-msg div.info-notice{padding:7px; background-color:#FCFEC5; border:1px solid silver; border-radius:5px; font-size:12px; line-height:16px;}
162
+ table.s4-final-step {width:100%;}
163
+ table.s4-final-step td {padding:5px 15px 5px 5px}
164
+ table.s4-final-step td:first-child {white-space:nowrap;}
165
+ div.s4-go-back {border-bottom:1px dotted #dfdfdf; border-top:1px dotted #dfdfdf; margin:auto; text-align:center; font-size: 12px}
166
+ div.s4-btns-msg {text-align: center; font-size:10px; color:#777; margin:5px 0 15px 0}
167
+ a.s4-final-btns {display: block; width:135; padding:5px; line-height: 1.4; background-color:#F1F1F1; border:1px solid silver;
168
+ color: #000; box-shadow: 5px 5px 5px -5px #949494; text-decoration: none; text-align: center; border-radius: 4px;
169
+ }
170
+ a.s4-final-btns:hover {background-color: #dfdfdf;}
171
+ div.s4-gopro-btn {text-align:center; font-size:14px; margin:auto; width:200px; font-style: italic}
172
+
173
+
174
+ /* PARSLEY:Overrides*/
175
  input.parsley-error, textarea.parsley-error, select.parsley-error {
176
+ color:#B94A48 !important; background-color:#F2DEDE !important; border:1px solid #EED3D7 !important;
 
 
177
  }
178
  ul.parsley-errors-list {margin:1px 0 0 -40px; list-style-type:none; font-size:10px}
179
+
180
+ /* ============================
181
+ STEP 5 HELP
182
+ ============================ */
183
+ div.help-target {float:right; font-size:11px}
184
+ div#main-help a.help-target {display:block; margin:5px}
185
+ div#main-help sup {font-size:11px; font-weight:normal; font-style:italic; color:blue}
186
+ div.help-online {text-align:center; font-size:18px; padding:10px 0 0 0; line-height:24px}
187
+ div.help {color:#555; font-style:italic; font-size:11px; padding:4px; border-top:1px solid #dfdfdf}
188
+ div.help-page {padding:5px 0 0 5px}
189
+ div.help-page fieldset {margin-bottom:25px}
190
+ div#main-help {font-size:14px; line-height:17px}
191
+ div#main-help h2 {background-color:#F1F1F1; border:1px solid silver; border-radius:4px; padding:10px; margin:26px 0 8px 0; font-size:22px; }
192
+ div#main-help h3 {border-bottom:1px solid silver; padding:8px; margin:4px 0 8px 0; font-size:20px}
193
+ div#main-help span.step {color:#DB4B38}
194
+ table.help-opt {width: 100%; border: none; border-collapse: collapse; margin:5px 0 0 0;}
195
+ table.help-opt td.section {background-color:#dfdfdf;}
196
+ table.help-opt td, th {padding:7px; border:1px solid silver;}
197
+ table.help-opt td:first-child {font-weight:bold; padding-right:10px; white-space:nowrap}
198
+ table.help-opt th {background: #333; color: #fff;border:1px solid #333; padding:3px}
199
+
200
+
201
+ <?php if ($GLOBALS['DUPX_DEBUG']) : ?>
202
+ .dupx-debug {display:block; margin:4px 0 30px 0; font-size:11px;}
203
+ .dupx-debug label {font-weight:bold; display:block; margin:6px 0 2px 0}
204
+ .dupx-debug textarea {width:95%; height:100px; font-size:11px}
205
+ <?php else : ?>
206
+ .dupx-debug {display:none}
207
+ <?php endif; ?>
208
+
209
  </style>
installer/build/assets/inc.js.php CHANGED
@@ -1,27 +1,22 @@
1
- <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
- ?>
10
-
11
- <script type="text/javascript">
12
  //Unique namespace
13
- Duplicator = new Object();
14
 
15
- Duplicator.showProgressBar = function () {
16
- Duplicator.animateProgressBar('progress-bar');
 
17
  $('#ajaxerr-area').hide();
18
  $('#progress-area').show();
19
  }
20
- Duplicator.hideProgressBar = function () {
 
 
21
  $('#progress-area').hide(100);
22
  $('#ajaxerr-area').fadeIn(400);
23
  }
24
- Duplicator.animateProgressBar = function(id) {
 
 
25
  //Create Progress Bar
26
  var $mainbar = $("#" + id);
27
  $mainbar.progressbar({ value: 100 });
@@ -35,31 +30,48 @@
35
  }
36
  }
37
 
38
-
39
- Duplicator.toggleMetaBox = function() {
40
- var $title = jQuery(this);
41
- var $panel = $title.parent().find('.dup-box-panel');
42
- var $arrow = $title.parent().find('.dup-box-arrow');
43
- var value = $panel.is(":visible") ? 0 : 1;
44
- $panel.toggle();
45
- (value) ? $arrow.html('-') : $arrow.html('+');
46
- }
47
-
48
- $(document).ready(function() {
49
- //ATTACHED EVENTS
50
- $('#dup-hlp-lnk').change(function() {
51
- if ($(this).val() != "null")
52
- window.open($(this).val())
53
  });
54
-
55
- //Init: Toggle MetaBoxes
56
- $('div.dup-box div.dup-box-title').each(function() {
57
- var $title = $(this);
58
- var $panel = $title.parent().find('.dup-box-panel');
59
- var $arrow = $title.find('.dup-box-arrow');
60
- $title.click(Duplicator.toggleMetaBox);
61
- ($panel.is(":visible")) ? $arrow.html('-') : $arrow.html('+');
62
- });
63
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
64
  });
65
  </script>
1
+ <script>
 
 
 
 
 
 
 
 
 
 
2
  //Unique namespace
3
+ DUPX = new Object();
4
 
5
+ DUPX.showProgressBar = function ()
6
+ {
7
+ DUPX.animateProgressBar('progress-bar');
8
  $('#ajaxerr-area').hide();
9
  $('#progress-area').show();
10
  }
11
+
12
+ DUPX.hideProgressBar = function ()
13
+ {
14
  $('#progress-area').hide(100);
15
  $('#ajaxerr-area').fadeIn(400);
16
  }
17
+
18
+ DUPX.animateProgressBar = function(id)
19
+ {
20
  //Create Progress Bar
21
  var $mainbar = $("#" + id);
22
  $mainbar.progressbar({ value: 100 });
30
  }
31
  }
32
 
33
+ DUPX.toggleAll = function(id)
34
+ {
35
+ $(id + " *[data-type='toggle']").each(function() {
36
+ $(this).trigger('click');
 
 
 
 
 
 
 
 
 
 
 
37
  });
38
+ }
39
+
40
+
41
+ DUPX.toggleClick = function()
42
+ {
43
+ var id = $(this).attr('data-target');
44
+ var text = $(this).text().replace(/\+|\-/, "");
45
+ var icon = $(this).find('i.dupx-plus-square, i.dupx-minus-square');
46
+ var target = $(id);
47
+ $(icon).removeClass('dupx-plus-square dupx-minus-square');
48
+
49
+ if (target.is(':hidden') ) {
50
+ (icon.length)
51
+ ? $(icon).addClass('dupx-minus-square')
52
+ : $(this).html("- " + text );
53
+ target.show();
54
+ } else {
55
+ (icon.length)
56
+ ? $(icon).addClass('dupx-plus-square')
57
+ : $(this).html("+ " + text );
58
+ target.hide();
59
+ }
60
+ }
61
+
62
+ $(document).ready(function()
63
+ {
64
+ <?php if ($GLOBALS['DUPX_DEBUG']) : ?>
65
+ $("div.dupx-debug input[type=hidden], div.dupx-debug textarea").each(function() {
66
+ var label = '<label>' + $(this).attr('name') + ':</label>';
67
+ $(this).before(label);
68
+ $(this).after('<br/>');
69
+ });
70
+ $("div.dupx-debug input[type=hidden]").each(function() {
71
+ $(this).attr('type', 'text');
72
+ });
73
+
74
+ $("div.dupx-debug").prepend('<h2>Debug View</h2>');
75
+ <?php endif; ?>
76
  });
77
  </script>
installer/build/assets/inc.libs.css.php CHANGED
@@ -7,7 +7,7 @@
7
  exit;
8
  }
9
  ?>
10
- <?php if( DUPX_Util::is_url_active("ajax.googleapis.com", 443) ): ?>
11
  <link rel='stylesheet' href='//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css' type='text/css' media='all' />
12
  <?php else: ?>
13
  <style type="text/css">
@@ -30,6 +30,18 @@
30
  */
31
  #modal-window{background-color:rgba(0,0,0,.35)}#modal-window>*{margin:0;padding:0;border:0;font:inherit;line-height:normal;vertical-align:baseline}#modal-window .modal-box{position:absolute;margin-bottom:10px;top:40%!important;background-color:#fff;font-family:sans-serif;color:#444;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;-webkit-box-shadow:0 0 7px rgba(0,0,0,.3);-moz-box-shadow:0 0 7px rgba(0,0,0,.3);box-shadow:0 0 7px rgba(0,0,0,.3);outline:0;overflow:hidden}#modal-window .modal-box.modal-size-normal{width:560px}#modal-window .modal-box.modal-size-small{width:350px}#modal-window .modal-box.modal-size-large{width:1000px}@media only screen and (max-width :580px){#modal-window .modal-box.modal-size-normal{width:96%;left:0!important;margin-left:2%!important;margin-right:2%}}@media only screen and (max-width :1020px){#modal-window .modal-box.modal-size-large{width:96%;left:0!important;margin-left:2%!important;margin-right:2%}}@media only screen and (max-width :370px){#modal-window .modal-box.modal-size-small{width:96%;left:0!important;margin-left:2%!important;margin-right:2%}}#modal-window .modal-box .modal-title{position:relative;padding:12px 15px;border-bottom:1px solid #e5e5e5;font-size:20px;overflow:hidden}#modal-window .modal-box .modal-title h3{font-size:20px;font-weight:400;line-height:normal;display:inline-block;margin:0;padding:0}#modal-window .modal-box .modal-title .modal-close-btn{position:absolute;display:block;width:14px;height:14px;right:20px;top:50%;margin-top:-7px;cursor:pointer;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpGNzdGMTE3NDA3MjA2ODExOEMxNDkyODc0N0NBMUEwNCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3N0ZBOTUxNzNERkIxMUUyQUZGMEFDRjY0RjNFODlDOCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3N0ZBOTUxNjNERkIxMUUyQUZGMEFDRjY0RjNFODlDOCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkY3N0YxMTc0MDcyMDY4MTE4MDgzRkQyMTE2MTM0QUNBIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkY3N0YxMTc0MDcyMDY4MTE4QzE0OTI4NzQ3Q0ExQTA0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+5Ke+4QAAAMlJREFUeNqkk90KwyAMha0dvp/ghfthsFcb67YLYe83EBdZlCxL3KCFU0nM+WqjTqUUs+bZ1Nd2d6jDDDqDHqCk1AeQBx1B+Xa9vAFovmNBwFwSzAvIoWKFWJxciNGxmJtp3FeQMDkziCEfcCTObYUUEPE3JAg3xwawZKJBMsm5kZkDNIhqlgC0+J/cFyAIDTOD3fkABKXbeQSxP8xRaWyHNIAfdFvbHU8BJ9JdqdscktDTD9ITtCcnTLpMDRLwMlWPmdZe55cAAwD+1kOdnSr5eQAAAABJRU5ErkJggg==) center no-repeat;background-size:14px,14px;opacity:.5;filter:alpha(opacity=50)}#modal-window .modal-box .modal-title .modal-close-btn:hover{opacity:1;filter:alpha(opacity=100)}#modal-window .modal-box .modal-text{font-size:14px;padding:18px 15px;overflow-y:auto}#modal-window .modal-box img{height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#modal-window .modal-box .modal-text input.modal-prompt-input{width:97%;width:-webkit-calc(100% - 14px);width:-moz-calc(100% - 14px);width:calc(100% - 14px);display:block;outline:0;border:1px solid #ddd;border-top:1px solid #ccc;margin:10px 0;padding:6px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 0 2px #eee;-moz-box-shadow:inset 0 0 2px #eee;box-shadow:inset 0 0 2px #eee;-webkit-transition:all .1s linear;transition:all .1s linear}#modal-window .modal-box .modal-text input.modal-prompt-input:hover{border:1px solid #bbb;border-top:1px solid #aaa}#modal-window .modal-box .modal-text input.modal-prompt-input:active,#modal-window .modal-box .modal-text input.modal-prompt-input:focus{border-color:rgba(82,168,236,.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.3);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.3);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.3)}#modal-window .modal-box .modal-buttons{padding:10px 15px;text-align:right;background-color:#f9f9f9;border-top:1px solid #ddd}#modal-window .modal-box .modal-buttons a.modal-btn{display:inline-block;padding:8px 12px;outline:0;border:1px solid transparent;cursor:pointer;text-decoration:none;text-align:center;white-space:nowrap;font-size:12px;font-weight:700;line-height:normal;color:#555;vertical-align:middle}#modal-window .modal-box .modal-buttons a.modal-btn:active,a.modal-btn:focus{outline:0!important}#modal-window .modal-box .modal-buttons a.modal-btn:active,a.modal-btn.active{-webkit-box-shadow:inset 0 0 7px rgba(0,0,0,.2);-moz-box-shadow:inset 0 0 7px rgba(0,0,0,.2);box-shadow:inset 0 0 7px rgba(0,0,0,.2)}#modal-window .modal-box .modal-buttons a.modal-btn+a.modal-btn{margin-left:5px}#modal-window .modal-box .modal-buttons a.modal-btn.btn-disabled{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65)}#modal-window .modal-box .modal-buttons a.modal-btn.btn-large{padding:8px 14px;font-size:16px}#modal-window .modal-box .modal-buttons a.modal-btn.btn-small{padding:6px 8px;font-size:10px}#modal-window .modal-box .modal-buttons a.modal-btn.btn-rounded{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#modal-window .modal-box .modal-buttons a.modal-btn.btn-circle{-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}#modal-window .modal-box .modal-buttons a.modal-btn.btn-square{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}#modal-window .modal-box .modal-buttons a.modal-btn i,#modal-window .modal-box .modal-buttons a.modal-btn img{vertical-align:middle;display:inline-block;float:left;max-height:16px;margin-right:5px}#modal-window .modal-box .modal-buttons a.modal-btn{background-color:#fcfcfc;border-color:#c9c9c9;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.08);-moz-box-shadow:0 1px 1px rgba(0,0,0,.08);box-shadow:0 1px 1px rgba(0,0,0,.08)}#modal-window .modal-box .modal-buttons a.modal-btn.btn-green{background-color:#5cb85c;border-color:#4cae4c;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-green:hover{background-color:#449d44;border-color:#398439;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-purple{background-color:#8149B4;border-color:#6922AD;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-purple:hover{background-color:#6f32a8;border-color:#5b149e;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-orange{background-color:#f7aa47;border-color:#eea236;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-orange:hover{background-color:#f69f2f;border-color:#d58512;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-pink{background-color:#ff6264;border-color:#eb5b5c;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-pink:hover{background-color:#ff484b;border-color:#e53a3d;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-turquoise{background-color:#00b19d;border-color:#11a594;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-turquoise:hover{background-color:#009886;border-color:#0b8173;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-green{background-color:#8dc63f;border-color:#7db432;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-green:hover{background-color:#82b838;border-color:#75a336;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-blue{background-color:#428bca;border-color:#357ebd;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-blue:hover{background-color:#3071a9;border-color:#285e8e;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-blue{background-color:#0e62c7;border-color:#0D54AA;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-blue:hover{background-color:#0c56af;border-color:#0B4992;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-red{background-color:#cc3f44;border-color:#bd1b21;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-red:hover{background-color:#ab2d32;border-color:#96050b;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-red{background-color:#d9534f;border-color:#d43f3a;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-red:hover{background-color:#c9302c;border-color:#ac2925;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-yellow{background-color:#ffba00;border-color:#e4a703;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-yellow:hover{background-color:#f0bb2e;border-color:#dba71a;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-black{background-color:#444;border-color:#313131;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-black:hover{background-color:#333;border-color:#222;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-white{background-color:#fff;color:#555;border:1px solid #ddd}#modal-window .modal-box .modal-buttons a.modal-btn.btn-white:hover{background-color:#f7f7f7;border:1px solid #ccc}#modal-window .modal-box .modal-buttons a.modal-btn.btn-white:active,#modal-window .modal-box .modal-buttons a.modal-btn.btn-white:focus{-webkit-box-shadow:inset 0 0 10px rgba(0,0,0,.1);-moz-box-shadow:inset 0 0 10px rgba(0,0,0,.1);box-shadow:inset 0 0 10px rgba(0,0,0,.1)}#modal-window .modal-box.modal-type-success .modal-title{background-color:#61b832}#modal-window .modal-box.modal-type-warning .modal-title{background-color:#f1b40e}#modal-window .modal-box.modal-type-error .modal-title{background-color:#de4343}#modal-window .modal-box.modal-type-info .modal-title{background-color:#4ea5cd}#modal-window .modal-box.modal-type-inverted .modal-title{background-color:#232B31}#modal-window .modal-box.modal-type-primary .modal-title{background-color:#428bca}#modal-window .modal-box.modal-type-error .modal-title,#modal-window .modal-box.modal-type-info .modal-title,#modal-window .modal-box.modal-type-inverted .modal-title,#modal-window .modal-box.modal-type-primary .modal-title,#modal-window .modal-box.modal-type-success .modal-title,#modal-window .modal-box.modal-type-warning .modal-title{color:#FFF;text-shadow:0 1px 3px rgba(0,0,0,.25);border-bottom-color:transparent}#modal-window .modal-box.modal-type-error .modal-title .modal-close-btn,#modal-window .modal-box.modal-type-info .modal-title .modal-close-btn,#modal-window .modal-box.modal-type-inverted .modal-title .modal-close-btn,#modal-window .modal-box.modal-type-primary .modal-title .modal-close-btn,#modal-window .modal-box.modal-type-success .modal-title .modal-close-btn,#modal-window .modal-box.modal-type-warning .modal-title .modal-close-btn{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBoj k8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAKNJREFUeNqkk9EKwyAMRdMKfqG/WBD2hYWMs4epZBLjoBcEibnHNokHIE90mn0SkUtESpBfWk4aEUCABLz46gZKi9tV2hktNwEDUPnVDLHmrmoBBdAFxDNrv2D+RA+yNM+AFWRp9gARRL3inot2vf+MSdQqT3f0C6tqawTZmcumxQNwbQrmQS4LyGaUNRhlNaOc5xrkNp6e2UJqNwNyPH3OnwEACDCs273A8sIAAAAASUVORK5CYII=') center no-repeat}#modal-window .modal-box.modal-theme-reseted{background:0 0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#modal-window .modal-box.modal-theme-reseted .modal-title{border-bottom:0;padding:0}#modal-window .modal-box.modal-theme-reseted .modal-title .modal-close-btn{right:0}#modal-window .modal-box.modal-theme-reseted .modal-text{padding:0}#modal-window .modal-box.modal-theme-reseted .modal-buttons{border-top:0;background:0 0;padding:0}
32
 
 
 
 
 
 
 
 
 
 
 
 
 
33
  </style>
34
 
35
 
7
  exit;
8
  }
9
  ?>
10
+ <?php if( DUPX_U::isURLActive("ajax.googleapis.com", 443) ): ?>
11
  <link rel='stylesheet' href='//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css' type='text/css' media='all' />
12
  <?php else: ?>
13
  <style type="text/css">
30
  */
31
  #modal-window{background-color:rgba(0,0,0,.35)}#modal-window>*{margin:0;padding:0;border:0;font:inherit;line-height:normal;vertical-align:baseline}#modal-window .modal-box{position:absolute;margin-bottom:10px;top:40%!important;background-color:#fff;font-family:sans-serif;color:#444;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box;-webkit-box-shadow:0 0 7px rgba(0,0,0,.3);-moz-box-shadow:0 0 7px rgba(0,0,0,.3);box-shadow:0 0 7px rgba(0,0,0,.3);outline:0;overflow:hidden}#modal-window .modal-box.modal-size-normal{width:560px}#modal-window .modal-box.modal-size-small{width:350px}#modal-window .modal-box.modal-size-large{width:1000px}@media only screen and (max-width :580px){#modal-window .modal-box.modal-size-normal{width:96%;left:0!important;margin-left:2%!important;margin-right:2%}}@media only screen and (max-width :1020px){#modal-window .modal-box.modal-size-large{width:96%;left:0!important;margin-left:2%!important;margin-right:2%}}@media only screen and (max-width :370px){#modal-window .modal-box.modal-size-small{width:96%;left:0!important;margin-left:2%!important;margin-right:2%}}#modal-window .modal-box .modal-title{position:relative;padding:12px 15px;border-bottom:1px solid #e5e5e5;font-size:20px;overflow:hidden}#modal-window .modal-box .modal-title h3{font-size:20px;font-weight:400;line-height:normal;display:inline-block;margin:0;padding:0}#modal-window .modal-box .modal-title .modal-close-btn{position:absolute;display:block;width:14px;height:14px;right:20px;top:50%;margin-top:-7px;cursor:pointer;background:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA2ZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDpGNzdGMTE3NDA3MjA2ODExOEMxNDkyODc0N0NBMUEwNCIgeG1wTU06RG9jdW1lbnRJRD0ieG1wLmRpZDo3N0ZBOTUxNzNERkIxMUUyQUZGMEFDRjY0RjNFODlDOCIgeG1wTU06SW5zdGFuY2VJRD0ieG1wLmlpZDo3N0ZBOTUxNjNERkIxMUUyQUZGMEFDRjY0RjNFODlDOCIgeG1wOkNyZWF0b3JUb29sPSJBZG9iZSBQaG90b3Nob3AgQ1M1IE1hY2ludG9zaCI+IDx4bXBNTTpEZXJpdmVkRnJvbSBzdFJlZjppbnN0YW5jZUlEPSJ4bXAuaWlkOkY3N0YxMTc0MDcyMDY4MTE4MDgzRkQyMTE2MTM0QUNBIiBzdFJlZjpkb2N1bWVudElEPSJ4bXAuZGlkOkY3N0YxMTc0MDcyMDY4MTE4QzE0OTI4NzQ3Q0ExQTA0Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+5Ke+4QAAAMlJREFUeNqkk90KwyAMha0dvp/ghfthsFcb67YLYe83EBdZlCxL3KCFU0nM+WqjTqUUs+bZ1Nd2d6jDDDqDHqCk1AeQBx1B+Xa9vAFovmNBwFwSzAvIoWKFWJxciNGxmJtp3FeQMDkziCEfcCTObYUUEPE3JAg3xwawZKJBMsm5kZkDNIhqlgC0+J/cFyAIDTOD3fkABKXbeQSxP8xRaWyHNIAfdFvbHU8BJ9JdqdscktDTD9ITtCcnTLpMDRLwMlWPmdZe55cAAwD+1kOdnSr5eQAAAABJRU5ErkJggg==) center no-repeat;background-size:14px,14px;opacity:.5;filter:alpha(opacity=50)}#modal-window .modal-box .modal-title .modal-close-btn:hover{opacity:1;filter:alpha(opacity=100)}#modal-window .modal-box .modal-text{font-size:14px;padding:18px 15px;overflow-y:auto}#modal-window .modal-box img{height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#modal-window .modal-box .modal-text input.modal-prompt-input{width:97%;width:-webkit-calc(100% - 14px);width:-moz-calc(100% - 14px);width:calc(100% - 14px);display:block;outline:0;border:1px solid #ddd;border-top:1px solid #ccc;margin:10px 0;padding:6px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:inset 0 0 2px #eee;-moz-box-shadow:inset 0 0 2px #eee;box-shadow:inset 0 0 2px #eee;-webkit-transition:all .1s linear;transition:all .1s linear}#modal-window .modal-box .modal-text input.modal-prompt-input:hover{border:1px solid #bbb;border-top:1px solid #aaa}#modal-window .modal-box .modal-text input.modal-prompt-input:active,#modal-window .modal-box .modal-text input.modal-prompt-input:focus{border-color:rgba(82,168,236,.8);-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.3);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.3);box-shadow:inset 0 1px 1px rgba(0,0,0,.075),0 0 8px rgba(82,168,236,.3)}#modal-window .modal-box .modal-buttons{padding:10px 15px;text-align:right;background-color:#f9f9f9;border-top:1px solid #ddd}#modal-window .modal-box .modal-buttons a.modal-btn{display:inline-block;padding:8px 12px;outline:0;border:1px solid transparent;cursor:pointer;text-decoration:none;text-align:center;white-space:nowrap;font-size:12px;font-weight:700;line-height:normal;color:#555;vertical-align:middle}#modal-window .modal-box .modal-buttons a.modal-btn:active,a.modal-btn:focus{outline:0!important}#modal-window .modal-box .modal-buttons a.modal-btn:active,a.modal-btn.active{-webkit-box-shadow:inset 0 0 7px rgba(0,0,0,.2);-moz-box-shadow:inset 0 0 7px rgba(0,0,0,.2);box-shadow:inset 0 0 7px rgba(0,0,0,.2)}#modal-window .modal-box .modal-buttons a.modal-btn+a.modal-btn{margin-left:5px}#modal-window .modal-box .modal-buttons a.modal-btn.btn-disabled{cursor:not-allowed;pointer-events:none;opacity:.65;filter:alpha(opacity=65)}#modal-window .modal-box .modal-buttons a.modal-btn.btn-large{padding:8px 14px;font-size:16px}#modal-window .modal-box .modal-buttons a.modal-btn.btn-small{padding:6px 8px;font-size:10px}#modal-window .modal-box .modal-buttons a.modal-btn.btn-rounded{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}#modal-window .modal-box .modal-buttons a.modal-btn.btn-circle{-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}#modal-window .modal-box .modal-buttons a.modal-btn.btn-square{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}#modal-window .modal-box .modal-buttons a.modal-btn i,#modal-window .modal-box .modal-buttons a.modal-btn img{vertical-align:middle;display:inline-block;float:left;max-height:16px;margin-right:5px}#modal-window .modal-box .modal-buttons a.modal-btn{background-color:#fcfcfc;border-color:#c9c9c9;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 1px rgba(0,0,0,.08);-moz-box-shadow:0 1px 1px rgba(0,0,0,.08);box-shadow:0 1px 1px rgba(0,0,0,.08)}#modal-window .modal-box .modal-buttons a.modal-btn.btn-green{background-color:#5cb85c;border-color:#4cae4c;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-green:hover{background-color:#449d44;border-color:#398439;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-purple{background-color:#8149B4;border-color:#6922AD;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-purple:hover{background-color:#6f32a8;border-color:#5b149e;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-orange{background-color:#f7aa47;border-color:#eea236;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-orange:hover{background-color:#f69f2f;border-color:#d58512;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-pink{background-color:#ff6264;border-color:#eb5b5c;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-pink:hover{background-color:#ff484b;border-color:#e53a3d;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-turquoise{background-color:#00b19d;border-color:#11a594;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-turquoise:hover{background-color:#009886;border-color:#0b8173;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-green{background-color:#8dc63f;border-color:#7db432;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-green:hover{background-color:#82b838;border-color:#75a336;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-blue{background-color:#428bca;border-color:#357ebd;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-blue:hover{background-color:#3071a9;border-color:#285e8e;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-blue{background-color:#0e62c7;border-color:#0D54AA;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-blue:hover{background-color:#0c56af;border-color:#0B4992;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-red{background-color:#cc3f44;border-color:#bd1b21;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-red:hover{background-color:#ab2d32;border-color:#96050b;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-red{background-color:#d9534f;border-color:#d43f3a;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-light-red:hover{background-color:#c9302c;border-color:#ac2925;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-yellow{background-color:#ffba00;border-color:#e4a703;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-yellow:hover{background-color:#f0bb2e;border-color:#dba71a;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-black{background-color:#444;border-color:#313131;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-black:hover{background-color:#333;border-color:#222;color:#fff}#modal-window .modal-box .modal-buttons a.modal-btn.btn-white{background-color:#fff;color:#555;border:1px solid #ddd}#modal-window .modal-box .modal-buttons a.modal-btn.btn-white:hover{background-color:#f7f7f7;border:1px solid #ccc}#modal-window .modal-box .modal-buttons a.modal-btn.btn-white:active,#modal-window .modal-box .modal-buttons a.modal-btn.btn-white:focus{-webkit-box-shadow:inset 0 0 10px rgba(0,0,0,.1);-moz-box-shadow:inset 0 0 10px rgba(0,0,0,.1);box-shadow:inset 0 0 10px rgba(0,0,0,.1)}#modal-window .modal-box.modal-type-success .modal-title{background-color:#61b832}#modal-window .modal-box.modal-type-warning .modal-title{background-color:#f1b40e}#modal-window .modal-box.modal-type-error .modal-title{background-color:#de4343}#modal-window .modal-box.modal-type-info .modal-title{background-color:#4ea5cd}#modal-window .modal-box.modal-type-inverted .modal-title{background-color:#232B31}#modal-window .modal-box.modal-type-primary .modal-title{background-color:#428bca}#modal-window .modal-box.modal-type-error .modal-title,#modal-window .modal-box.modal-type-info .modal-title,#modal-window .modal-box.modal-type-inverted .modal-title,#modal-window .modal-box.modal-type-primary .modal-title,#modal-window .modal-box.modal-type-success .modal-title,#modal-window .modal-box.modal-type-warning .modal-title{color:#FFF;text-shadow:0 1px 3px rgba(0,0,0,.25);border-bottom-color:transparent}#modal-window .modal-box.modal-type-error .modal-title .modal-close-btn,#modal-window .modal-box.modal-type-info .modal-title .modal-close-btn,#modal-window .modal-box.modal-type-inverted .modal-title .modal-close-btn,#modal-window .modal-box.modal-type-primary .modal-title .modal-close-btn,#modal-window .modal-box.modal-type-success .modal-title .modal-close-btn,#modal-window .modal-box.modal-type-warning .modal-title .modal-close-btn{background:url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9k4t8s+wM+3zUAsGo+AXuRLahdYwP2SycQWHTA4vcAAPK7b8HUKAgDgGiD4c93/+8//UegJQCAZkmScQAAXkQkLlTKsz/HCAAARKCBKrBBG/TBGCzABhzBBdzBC/xgNoRCJMTCQhBCCmSAHHJgKayCQiiGzbAdKmAv1EAdNMBRaIaTcA4uwlW4Dj1wD/phCJ7BKLyBCQRByAgTYSHaiAFiilgjjggXmYX4IcFIBBKLJCDJiBRRIkuRNUgxUopUIFVIHfI9cgI5h1xGupE7yAAygvyGvEcxlIGyUT3UDLVDuag3GoRGogvQZHQxmo8WoJvQcrQaPYw2oefQq2gP2o8+Q8cwwOgYBzPEbDAuxsNCsTgsCZNjy7EirAyrxhqwVqwDu4n1Y8+xdwQSgUXACTYEd0IgYR5BSFhMWE7YSKggHCQ0EdoJNwkDhFHCJyKTqEu0JroR+cQYYjIxh1hILCPWEo8TLxB7iEPENyQSiUMyJ7mQAkmxpFTSEtJG0m5SI+ksqZs0SBoj k8naZGuyBzmULCAryIXkneTD5DPkG+Qh8lsKnWJAcaT4U+IoUspqShnlEOU05QZlmDJBVaOaUt2ooVQRNY9aQq2htlKvUYeoEzR1mjnNgxZJS6WtopXTGmgXaPdpr+h0uhHdlR5Ol9BX0svpR+iX6AP0dwwNhhWDx4hnKBmbGAcYZxl3GK+YTKYZ04sZx1QwNzHrmOeZD5lvVVgqtip8FZHKCpVKlSaVGyovVKmqpqreqgtV81XLVI+pXlN9rkZVM1PjqQnUlqtVqp1Q61MbU2epO6iHqmeob1Q/pH5Z/YkGWcNMw09DpFGgsV/jvMYgC2MZs3gsIWsNq4Z1gTXEJrHN2Xx2KruY/R27iz2qqaE5QzNKM1ezUvOUZj8H45hx+Jx0TgnnKKeX836K3hTvKeIpG6Y0TLkxZVxrqpaXllirSKtRq0frvTau7aedpr1Fu1n7gQ5Bx0onXCdHZ4/OBZ3nU9lT3acKpxZNPTr1ri6qa6UbobtEd79up+6Ynr5egJ5Mb6feeb3n+hx9L/1U/W36p/VHDFgGswwkBtsMzhg8xTVxbzwdL8fb8VFDXcNAQ6VhlWGX4YSRudE8o9VGjUYPjGnGXOMk423GbcajJgYmISZLTepN7ppSTbmmKaY7TDtMx83MzaLN1pk1mz0x1zLnm+eb15vft2BaeFostqi2uGVJsuRaplnutrxuhVo5WaVYVVpds0atna0l1rutu6cRp7lOk06rntZnw7Dxtsm2qbcZsOXYBtuutm22fWFnYhdnt8Wuw+6TvZN9un2N/T0HDYfZDqsdWh1+c7RyFDpWOt6azpzuP33F9JbpL2dYzxDP2DPjthPLKcRpnVOb00dnF2e5c4PziIuJS4LLLpc+Lpsbxt3IveRKdPVxXeF60vWdm7Obwu2o26/uNu5p7ofcn8w0nymeWTNz0MPIQ+BR5dE/C5+VMGvfrH5PQ0+BZ7XnIy9jL5FXrdewt6V3qvdh7xc+9j5yn+M+4zw33jLeWV/MN8C3yLfLT8Nvnl+F30N/I/9k/3r/0QCngCUBZwOJgUGBWwL7+Hp8Ib+OPzrbZfay2e1BjKC5QRVBj4KtguXBrSFoyOyQrSH355jOkc5pDoVQfujW0Adh5mGLw34MJ4WHhVeGP45wiFga0TGXNXfR3ENz30T6RJZE3ptnMU85ry1KNSo+qi5qPNo3ujS6P8YuZlnM1VidWElsSxw5LiquNm5svt/87fOH4p3iC+N7F5gvyF1weaHOwvSFpxapLhIsOpZATIhOOJTwQRAqqBaMJfITdyWOCnnCHcJnIi/RNtGI2ENcKh5O8kgqTXqS7JG8NXkkxTOlLOW5hCepkLxMDUzdmzqeFpp2IG0yPTq9MYOSkZBxQqohTZO2Z+pn5mZ2y6xlhbL+xW6Lty8elQfJa7OQrAVZLQq2QqboVFoo1yoHsmdlV2a/zYnKOZarnivN7cyzytuQN5zvn//tEsIS4ZK2pYZLVy0dWOa9rGo5sjxxedsK4xUFK4ZWBqw8uIq2Km3VT6vtV5eufr0mek1rgV7ByoLBtQFr6wtVCuWFfevc1+1dT1gvWd+1YfqGnRs+FYmKrhTbF5cVf9go3HjlG4dvyr+Z3JS0qavEuWTPZtJm6ebeLZ5bDpaql+aXDm4N2dq0Dd9WtO319kXbL5fNKNu7g7ZDuaO/PLi8ZafJzs07P1SkVPRU+lQ27tLdtWHX+G7R7ht7vPY07NXbW7z3/T7JvttVAVVN1WbVZftJ+7P3P66Jqun4lvttXa1ObXHtxwPSA/0HIw6217nU1R3SPVRSj9Yr60cOxx++/p3vdy0NNg1VjZzG4iNwRHnk6fcJ3/ceDTradox7rOEH0x92HWcdL2pCmvKaRptTmvtbYlu6T8w+0dbq3nr8R9sfD5w0PFl5SvNUyWna6YLTk2fyz4ydlZ19fi753GDborZ752PO32oPb++6EHTh0kX/i+c7vDvOXPK4dPKy2+UTV7hXmq86X23qdOo8/pPTT8e7nLuarrlca7nuer21e2b36RueN87d9L158Rb/1tWeOT3dvfN6b/fF9/XfFt1+cif9zsu72Xcn7q28T7xf9EDtQdlD3YfVP1v+3Njv3H9qwHeg89HcR/cGhYPP/pH1jw9DBY+Zj8uGDYbrnjg+OTniP3L96fynQ89kzyaeF/6i/suuFxYvfvjV69fO0ZjRoZfyl5O/bXyl/erA6xmv28bCxh6+yXgzMV70VvvtwXfcdx3vo98PT+R8IH8o/2j5sfVT0Kf7kxmTk/8EA5jz/GMzLdsAAAAgY0hSTQAAeiUAAICDAAD5/wAAgOkAAHUwAADqYAAAOpgAABdvkl/FRgAAAKNJREFUeNqkk9EKwyAMRdMKfqG/WBD2hYWMs4epZBLjoBcEibnHNokHIE90mn0SkUtESpBfWk4aEUCABLz46gZKi9tV2hktNwEDUPnVDLHmrmoBBdAFxDNrv2D+RA+yNM+AFWRp9gARRL3inot2vf+MSdQqT3f0C6tqawTZmcumxQNwbQrmQS4LyGaUNRhlNaOc5xrkNp6e2UJqNwNyPH3OnwEACDCs273A8sIAAAAASUVORK5CYII=') center no-repeat}#modal-window .modal-box.modal-theme-reseted{background:0 0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}#modal-window .modal-box.modal-theme-reseted .modal-title{border-bottom:0;padding:0}#modal-window .modal-box.modal-theme-reseted .modal-title .modal-close-btn{right:0}#modal-window .modal-box.modal-theme-reseted .modal-text{padding:0}#modal-window .modal-box.modal-theme-reseted .modal-buttons{border-top:0;background:0 0;padding:0}
32
 
33
+ /*CSS ICONS
34
+ http://androidcss.com/css-shape-icon-generator/
35
+ */
36
+
37
+ .dupx-plus-square{display:inline-block!important;position:relative;width:14px;height:14px;border-radius:25%;background-color:#000000;box-sizing:content-box}
38
+ .dupx-plus-square:before{position:absolute;content:'';margin:auto;width:calc(14px/8);height:calc(14px/1.5);background-color:#fff;top:0;bottom:0;left:0;right:0}
39
+ .dupx-plus-square:after{position:absolute;content:'';margin:auto;width:calc(14px/1.5);height:calc(14px/8);background-color:#fff;top:0;bottom:0;left:0;right:0}
40
+
41
+ .dupx-minus-square{display:inline-block!important;position:relative;width:14px;height:14px;border-radius:25%;background-color:#000000;box-sizing:content-box}
42
+ .dupx-minus-square:after{position:absolute;content:'';margin:auto;width:calc(14px/1.5);height:calc(14px/10);background-color:#fff;top:0;bottom:0;left:0;right:0}
43
+
44
+
45
  </style>
46
 
47
 
installer/build/assets/inc.libs.js.php CHANGED
@@ -9,7 +9,7 @@
9
  ?>
10
  <!-- ========================================
11
  JQUERY ASSETS -->
12
- <?php if(DUPX_Util::is_url_active("ajax.googleapis.com", 443) ): ?>
13
  <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
14
  <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
15
  <?php else: ?>
@@ -30,7 +30,7 @@ JQUERY ASSETS -->
30
 
31
  <!-- ========================================
32
  KNOCKOUT ASSETS -->
33
- <?php if( DUPX_Util::is_url_active("ajax.aspnetcdn.com", 443) ): ?>
34
  <script src="//ajax.aspnetcdn.com/ajax/knockout/knockout-2.2.1.js"></script>
35
  <?php else: ?>
36
  <script type="text/javascript">
@@ -181,9 +181,10 @@ function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length
181
  /*!
182
  * jQuery Modal (minified)
183
  * Copyright (c) 2015 CreativeDream
184
- * Website http://creativedream.net/plugins
185
  * Version: 1.2.3 (10-04-2015)
186
  * Requires: jQuery v1.7.1 or later
 
187
  */
188
  function modal(t){return $.cModal(t)}!function(t){t.cModal=function(n){var e,o={type:"default",title:null,text:null,size:"normal",buttons:[{text:"OK",val:!0,onClick:function(){return!0}}],center:!0,autoclose:!1,callback:null,onShow:null,animate:!0,closeClick:!0,closable:!0,theme:"default",background:null,zIndex:1050,buttonText:{ok:"OK",yes:"Yes",cancel:"Cancel"},template:'<div class="modal-box"><div class="modal-inner"><div class="modal-title"><a class="modal-close-btn"></a></div><div class="modal-text"></div><div class="modal-buttons"></div></div></div>',_classes:{box:".modal-box",boxInner:".modal-inner",title:".modal-title",content:".modal-text",buttons:".modal-buttons",closebtn:".modal-close-btn"}},n=t.extend({},o,n),a=t("<div id='modal-window' />").hide(),l=n._classes.box,s=a.append(n.template),i={init:function(){t("#modal-window").remove(),i._setStyle(),i._modalShow(),i._modalConent(),a.on("click","a.modal-btn",function(){i._modalBtn(t(this))}).on("click",n._classes.closebtn,function(){e=!1,i._modalHide()}).click(function(t){n.closeClick&&"modal-window"==t.target.id&&(e=!1,i._modalHide())}),t(window).bind("keyup",i._keyUpF).resize(function(){var t=n.animate;n.animate=!1,i._position(),n.animate=t})},_setStyle:function(){a.css({position:"fixed",width:"100%",height:"100%",top:"0",left:"0","z-index":n.zIndex,overflow:"auto"}),a.find(n._classes.box).css({position:"absolute"})},_keyUpF:function(t){switch(t.keyCode){case 13:if(s.find("input:not(.modal-prompt-input),textarea").is(":focus"))return!1;i._modalBtn(a.find(n._classes.buttons+" a.modal-btn"+("undefined"!=typeof i.btnForEKey&&a.find(n._classes.buttons+" a.modal-btn:eq("+i.btnForEKey+")").size()>0?":eq("+i.btnForEKey+")":":last-child")));break;case 27:i._modalHide()}},_modalShow:function(){t("body").css({overflow:"hidden",width:t("body").innerWidth()}).append(s)},_modalHide:function(o){if(n.closable===!1)return!1;e="undefined"==typeof e?!1:e;var s=function(){if(null!=n.callback&&"function"==typeof n.callback&&0==n.callback(e,a,i.actions)?!1:!0){a.fadeOut(200,function(){t(this).remove(),t("body").css({overflow:"",width:""})});var o=100*parseFloat(t(l).css("top"))/parseFloat(t(l).parent().css("height"));t(l).stop(!0,!0).animate({top:o+(n.animate?3:0)+"%"},"fast")}};o?setTimeout(function(){s()},o):s(),t(window).unbind("keyup",i._keyUpF)},_modalConent:function(){var e=n._classes.title,o=n._classes.content,s=n._classes.buttons,d=n.buttonText,c=["alert","confirm","prompt"],u=["xenon","atlant","reseted"];if(-1==t.inArray(n.type,c)&&"default"!=n.type&&t(l).addClass("modal-type-"+n.type),t(l).addClass(n.size&&null!=n.size?"modal-size-"+n.size:"modal-size-normal"),n.theme&&null!=n.theme&&"default"!=n.theme&&t(l).addClass((-1==t.inArray(n.theme,u)?"":"modal-theme-")+n.theme),n.background&&null!=n.background&&a.css("background-color",n.background),n.title||null!=n.title?t(e).prepend("<h3>"+n.title+"</h3>"):t(e).remove(),"prompt"==n.type?n.text=(null!=n.text?n.text:"")+'<input type="text" name="modal-prompt-input" class="modal-prompt-input" autocomplete="off" autofocus="on" />':"",t(o).html(n.text),n.buttons||null!=n.buttons){var r="";switch(n.type){case"alert":r='<a class="modal-btn'+(n.buttons[0].addClass?" "+n.buttons[0].addClass:"")+'">'+d.ok+"</a>";break;case"confirm":r='<a class="modal-btn'+(n.buttons[0].addClass?" "+n.buttons[0].addClass:"")+'">'+d.cancel+'</a><a class="modal-btn '+(n.buttons[1]&&n.buttons[1].addClass?" "+n.buttons[1].addClass:"btn-light-blue")+'">'+d.yes+"</a>";break;case"prompt":r='<a class="modal-btn'+(n.buttons[0].addClass?" "+n.buttons[0].addClass:"")+'">'+d.cancel+'</a><a class="modal-btn '+(n.buttons[1]&&n.buttons[1].addClass?" "+n.buttons[1].addClass:"btn-light-blue")+'">'+d.ok+"</a>";break;default:n.buttons.length>0&&t.isArray(n.buttons)?t.each(n.buttons,function(t,n){var e=n.addClass&&"undefined"!=typeof n.addClass?" "+n.addClass:"";r+='<a class="modal-btn'+e+'">'+n.text+"</a>",n.eKey&&(i.btnForEKey=t)}):r+='<a class="modal-btn">'+d.ok+"</a>"}t(s).html(r)}else t(s).remove();if("prompt"==n.type&&$(".modal-prompt-input").focus(),n.autoclose){var m=n.buttons||null!=n.buttons?32*t(o).text().length:900;i._modalHide(900>m?900:m)}a.fadeIn(200,function(){null!=n.onShow?n.onShow(i.actions):null}),i._position()},_position:function(){var e,o,a;n.center?(e={top:t(window).height()<t(l).outerHeight()?1:50,left:50,marginTop:t(window).height()<t(l).outerHeight()?0:-t(l).outerHeight()/2,marginLeft:-t(l).outerWidth()/2},o={top:e.top-(n.animate?3:0)+"%",left:e.left+"%","margin-top":e.marginTop,"margin-left":e.marginLeft},a={top:e.top+"%"}):(e={top:t(window).height()<t(l).outerHeight()?1:10,left:50,marginTop:0,marginLeft:-t(l).outerWidth()/2},o={top:e.top-(n.animate?3:0)+"%",left:e.left+"%","margin-top":e.marginTop,"margin-left":e.marginLeft},a={top:e.top+"%"}),t(l).css(o).stop(!0,!0).animate(a,"fast")},_modalBtn:function(o){var l=!1,s=n.type,d=o.index(),c=n.buttons[d];if(t.inArray(s,["alert","confirm","prompt"])>-1)e=l=1==d?!0:!1,"prompt"==s&&(e=l=l&&a.find("input.modal-prompt-input").size()>0!=0?a.find("input.modal-prompt-input").val():!1),i._modalHide();else{if(o.hasClass("btn-disabled"))return!1;e=l=c&&c.val?c.val:!0,(!c.onClick||c.onClick(t.extend({val:l,bObj:o,bOpts:c},i.actions)))&&i._modalHide()}e=l},actions:{html:a,close:function(){i._modalHide()},getModal:function(){return a},getBox:function(){return a.find(n._classes.box)},getInner:function(){return a.find(n._classes.boxInner)},getTitle:function(){return a.find(n._classes.title)},getContet:function(){return a.find(n._classes.content)},getButtons:function(){return a.find(n._classes.buttons).find("a")},setTitle:function(t){return a.find(n._classes.title+" h3").html(t),a.find(n._classes.title+" h3").size()>0},setContent:function(t){return a.find(n._classes.content).html(t),a.find(n._classes.content).size()>0}}};return i.init(),i.actions}}(jQuery);
189
  </script>
9
  ?>
10
  <!-- ========================================
11
  JQUERY ASSETS -->
12
+ <?php if(DUPX_U::isURLActive("ajax.googleapis.com", 443) ): ?>
13
  <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
14
  <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
15
  <?php else: ?>
30
 
31
  <!-- ========================================
32
  KNOCKOUT ASSETS -->
33
+ <?php if( DUPX_U::isURLActive("ajax.aspnetcdn.com", 443) ): ?>
34
  <script src="//ajax.aspnetcdn.com/ajax/knockout/knockout-2.2.1.js"></script>
35
  <?php else: ?>
36
  <script type="text/javascript">
181
  /*!
182
  * jQuery Modal (minified)
183
  * Copyright (c) 2015 CreativeDream
184
+ * https://github.com/CreativeDream/jquery.modal
185
  * Version: 1.2.3 (10-04-2015)
186
  * Requires: jQuery v1.7.1 or later
187
+ * type: 'inverted', //Type of Modal Box (alert | confirm | prompt | success | warning | error | info | inverted | primary)
188
  */
189
  function modal(t){return $.cModal(t)}!function(t){t.cModal=function(n){var e,o={type:"default",title:null,text:null,size:"normal",buttons:[{text:"OK",val:!0,onClick:function(){return!0}}],center:!0,autoclose:!1,callback:null,onShow:null,animate:!0,closeClick:!0,closable:!0,theme:"default",background:null,zIndex:1050,buttonText:{ok:"OK",yes:"Yes",cancel:"Cancel"},template:'<div class="modal-box"><div class="modal-inner"><div class="modal-title"><a class="modal-close-btn"></a></div><div class="modal-text"></div><div class="modal-buttons"></div></div></div>',_classes:{box:".modal-box",boxInner:".modal-inner",title:".modal-title",content:".modal-text",buttons:".modal-buttons",closebtn:".modal-close-btn"}},n=t.extend({},o,n),a=t("<div id='modal-window' />").hide(),l=n._classes.box,s=a.append(n.template),i={init:function(){t("#modal-window").remove(),i._setStyle(),i._modalShow(),i._modalConent(),a.on("click","a.modal-btn",function(){i._modalBtn(t(this))}).on("click",n._classes.closebtn,function(){e=!1,i._modalHide()}).click(function(t){n.closeClick&&"modal-window"==t.target.id&&(e=!1,i._modalHide())}),t(window).bind("keyup",i._keyUpF).resize(function(){var t=n.animate;n.animate=!1,i._position(),n.animate=t})},_setStyle:function(){a.css({position:"fixed",width:"100%",height:"100%",top:"0",left:"0","z-index":n.zIndex,overflow:"auto"}),a.find(n._classes.box).css({position:"absolute"})},_keyUpF:function(t){switch(t.keyCode){case 13:if(s.find("input:not(.modal-prompt-input),textarea").is(":focus"))return!1;i._modalBtn(a.find(n._classes.buttons+" a.modal-btn"+("undefined"!=typeof i.btnForEKey&&a.find(n._classes.buttons+" a.modal-btn:eq("+i.btnForEKey+")").size()>0?":eq("+i.btnForEKey+")":":last-child")));break;case 27:i._modalHide()}},_modalShow:function(){t("body").css({overflow:"hidden",width:t("body").innerWidth()}).append(s)},_modalHide:function(o){if(n.closable===!1)return!1;e="undefined"==typeof e?!1:e;var s=function(){if(null!=n.callback&&"function"==typeof n.callback&&0==n.callback(e,a,i.actions)?!1:!0){a.fadeOut(200,function(){t(this).remove(),t("body").css({overflow:"",width:""})});var o=100*parseFloat(t(l).css("top"))/parseFloat(t(l).parent().css("height"));t(l).stop(!0,!0).animate({top:o+(n.animate?3:0)+"%"},"fast")}};o?setTimeout(function(){s()},o):s(),t(window).unbind("keyup",i._keyUpF)},_modalConent:function(){var e=n._classes.title,o=n._classes.content,s=n._classes.buttons,d=n.buttonText,c=["alert","confirm","prompt"],u=["xenon","atlant","reseted"];if(-1==t.inArray(n.type,c)&&"default"!=n.type&&t(l).addClass("modal-type-"+n.type),t(l).addClass(n.size&&null!=n.size?"modal-size-"+n.size:"modal-size-normal"),n.theme&&null!=n.theme&&"default"!=n.theme&&t(l).addClass((-1==t.inArray(n.theme,u)?"":"modal-theme-")+n.theme),n.background&&null!=n.background&&a.css("background-color",n.background),n.title||null!=n.title?t(e).prepend("<h3>"+n.title+"</h3>"):t(e).remove(),"prompt"==n.type?n.text=(null!=n.text?n.text:"")+'<input type="text" name="modal-prompt-input" class="modal-prompt-input" autocomplete="off" autofocus="on" />':"",t(o).html(n.text),n.buttons||null!=n.buttons){var r="";switch(n.type){case"alert":r='<a class="modal-btn'+(n.buttons[0].addClass?" "+n.buttons[0].addClass:"")+'">'+d.ok+"</a>";break;case"confirm":r='<a class="modal-btn'+(n.buttons[0].addClass?" "+n.buttons[0].addClass:"")+'">'+d.cancel+'</a><a class="modal-btn '+(n.buttons[1]&&n.buttons[1].addClass?" "+n.buttons[1].addClass:"btn-light-blue")+'">'+d.yes+"</a>";break;case"prompt":r='<a class="modal-btn'+(n.buttons[0].addClass?" "+n.buttons[0].addClass:"")+'">'+d.cancel+'</a><a class="modal-btn '+(n.buttons[1]&&n.buttons[1].addClass?" "+n.buttons[1].addClass:"btn-light-blue")+'">'+d.ok+"</a>";break;default:n.buttons.length>0&&t.isArray(n.buttons)?t.each(n.buttons,function(t,n){var e=n.addClass&&"undefined"!=typeof n.addClass?" "+n.addClass:"";r+='<a class="modal-btn'+e+'">'+n.text+"</a>",n.eKey&&(i.btnForEKey=t)}):r+='<a class="modal-btn">'+d.ok+"</a>"}t(s).html(r)}else t(s).remove();if("prompt"==n.type&&$(".modal-prompt-input").focus(),n.autoclose){var m=n.buttons||null!=n.buttons?32*t(o).text().length:900;i._modalHide(900>m?900:m)}a.fadeIn(200,function(){null!=n.onShow?n.onShow(i.actions):null}),i._position()},_position:function(){var e,o,a;n.center?(e={top:t(window).height()<t(l).outerHeight()?1:50,left:50,marginTop:t(window).height()<t(l).outerHeight()?0:-t(l).outerHeight()/2,marginLeft:-t(l).outerWidth()/2},o={top:e.top-(n.animate?3:0)+"%",left:e.left+"%","margin-top":e.marginTop,"margin-left":e.marginLeft},a={top:e.top+"%"}):(e={top:t(window).height()<t(l).outerHeight()?1:10,left:50,marginTop:0,marginLeft:-t(l).outerWidth()/2},o={top:e.top-(n.animate?3:0)+"%",left:e.left+"%","margin-top":e.marginTop,"margin-left":e.marginLeft},a={top:e.top+"%"}),t(l).css(o).stop(!0,!0).animate(a,"fast")},_modalBtn:function(o){var l=!1,s=n.type,d=o.index(),c=n.buttons[d];if(t.inArray(s,["alert","confirm","prompt"])>-1)e=l=1==d?!0:!1,"prompt"==s&&(e=l=l&&a.find("input.modal-prompt-input").size()>0!=0?a.find("input.modal-prompt-input").val():!1),i._modalHide();else{if(o.hasClass("btn-disabled"))return!1;e=l=c&&c.val?c.val:!0,(!c.onClick||c.onClick(t.extend({val:l,bObj:o,bOpts:c},i.actions)))&&i._modalHide()}e=l},actions:{html:a,close:function(){i._modalHide()},getModal:function(){return a},getBox:function(){return a.find(n._classes.box)},getInner:function(){return a.find(n._classes.boxInner)},getTitle:function(){return a.find(n._classes.title)},getContet:function(){return a.find(n._classes.content)},getButtons:function(){return a.find(n._classes.buttons).find("a")},setTitle:function(t){return a.find(n._classes.title+" h3").html(t),a.find(n._classes.title+" h3").size()>0},setContent:function(t){return a.find(n._classes.content).html(t),a.find(n._classes.content).size()>0}}};return i.init(),i.actions}}(jQuery);
190
  </script>
installer/build/classes/class.engine.php CHANGED
@@ -1,12 +1,4 @@
1
  <?php
2
- // Exit if accessed directly
3
- if (!defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://".strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: {$_baseURL}");
7
- exit;
8
- }
9
-
10
  /**
11
  * Walks every table in db that then walks every row and column replacing searches with replaces
12
  * large tables are split into 50k row blocks to save on memory.
@@ -156,7 +148,7 @@ class DUPX_UpdateEngine
156
 
157
  $walk_function = create_function('&$str', '$str = "`$str`";');
158
 
159
- $profile_start = DUPX_Util::get_microtime();
160
  if (is_array($tables) && !empty($tables)) {
161
 
162
  foreach ($tables as $table) {
@@ -302,7 +294,7 @@ class DUPX_UpdateEngine
302
  $report['errkey'][] = sprintf("Row [%s] on Table [%s] requires a manual update.", $current_row, $table);
303
  }
304
  }
305
- DUPX_Util::fcgi_flush();
306
  @mysqli_free_result($data);
307
  }
308
 
@@ -311,8 +303,8 @@ class DUPX_UpdateEngine
311
  }
312
  }
313
  }
314
- $profile_end = DUPX_Util::get_microtime();
315
- $report['time'] = DUPX_Util::elapsed_time($profile_end, $profile_start);
316
  $report['errsql_sum'] = empty($report['errsql']) ? 0 : count($report['errsql']);
317
  $report['errser_sum'] = empty($report['errser']) ? 0 : count($report['errser']);
318
  $report['errkey_sum'] = empty($report['errkey']) ? 0 : count($report['errkey']);
1
  <?php
 
 
 
 
 
 
 
 
2
  /**
3
  * Walks every table in db that then walks every row and column replacing searches with replaces
4
  * large tables are split into 50k row blocks to save on memory.
148
 
149
  $walk_function = create_function('&$str', '$str = "`$str`";');
150
 
151
+ $profile_start = DUPX_U::getMicrotime();
152
  if (is_array($tables) && !empty($tables)) {
153
 
154
  foreach ($tables as $table) {
294
  $report['errkey'][] = sprintf("Row [%s] on Table [%s] requires a manual update.", $current_row, $table);
295
  }
296
  }
297
+ //DUPX_U::fcgiFlush();
298
  @mysqli_free_result($data);
299
  }
300
 
303
  }
304
  }
305
  }
306
+ $profile_end = DUPX_U::getMicrotime();
307
+ $report['time'] = DUPX_U::elapsedTime($profile_end, $profile_start);
308
  $report['errsql_sum'] = empty($report['errsql']) ? 0 : count($report['errsql']);
309
  $report['errser_sum'] = empty($report['errser']) ? 0 : count($report['errser']);
310
  $report['errkey_sum'] = empty($report['errkey']) ? 0 : count($report['errkey']);
installer/build/classes/class.logging.php CHANGED
@@ -1,18 +1,11 @@
1
  <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
 
10
- define('ERR_CONFIG_FOUND', 'A wp-config.php already exists in this location. This error prevents users from accidentally overwriting the wrong directories contents. You have two options: <ul><li>Empty this root directory except for the package and installer and try again.</li><li>Delete just the wp-config.php file and try again. This will over-write all other files in the directory.</li></ul>');
11
  define('ERR_ZIPNOTFOUND', 'The packaged zip file was not found. Be sure the zip package is in the same directory as the installer file and as the correct permissions. If you are trying to reinstall a package you can copy the package from the "' . DUPLICATOR_SSDIR_NAME . '" directory back up to your root which is the same location as your installer.php file.');
12
  define('ERR_ZIPOPEN', 'Failed to open zip archive file. Please be sure the archive is completely downloaded before running the installer. Try to extract the archive manually to make sure the file is not corrupted.');
13
  define('ERR_ZIPEXTRACTION', 'Errors extracting zip file. Portions or part of the zip archive did not extract correctly. Try to extract the archive manually with a client side program like unzip/win-zip/winrar to make sure the file is not corrupted. If the file extracts correctly then there is an invalid file or directory that PHP is unable to extract. This can happen if your moving from one operating system to another where certain naming conventions work on one environment and not another. <br/><br/> Workarounds: <br/> 1. Create a new package and be sure to exclude any directories that have invalid names or files in them. This warning will be displayed on the scan results under "Invalid Names". <br/> 2. Manually extract the zip file with a client side program. Then under advanced options in step 1 of the installer check the "Manual package extraction" option and perform the install.');
14
  define('ERR_ZIPMANUAL', 'When choosing manual package extraction, the contents of the package must already be extracted and the wp-config.php and database.sql files must be present in the same directory as the installer.php for the process to continue. Please manually extract the package into the current directory before continuing in manual extraction mode. Also validate that the wp-config.php and database.sql files are present.');
15
- define('ERR_MAKELOG', 'PHP is having issues writing to the log file <b>' . DUPX_Util::set_safe_path($GLOBALS['CURRENT_ROOT_PATH']) . '\installer-log.txt .</b> In order for the Duplicator to proceed validate your owner/group and permission settings for PHP on this path. Try temporarily setting you permissions to 777 to see if the issue gets resolved. If you are on a shared hosting environment please contact your hosting company and tell them you are getting errors writing files to the path above when using PHP.');
16
  define('ERR_ZIPARCHIVE', 'In order to extract the archive.zip file the PHP ZipArchive module must be installed. Please read the FAQ for more details. You can still install this package but you will need to check the Manual package extraction checkbox found in the Advanced Options. Please read the online user guide for details in performing a manual package extraction.');
17
  define('ERR_MYSQLI_SUPPORT', 'In order to complete an install the mysqli extension for PHP is required. If you are on a hosted server please contact your host and request that mysqli be enabled. For more information visit: http://php.net/manual/en/mysqli.installation.php');
18
  define('ERR_DBCONNECT', 'DATABASE CONNECTION FAILED!<br/>');
@@ -67,7 +60,7 @@ class DUPX_Log
67
  $log_msg = strip_tags($log_msg);
68
  @fwrite($GLOBALS["LOG_FILE_HANDLE"], "\nINSTALLER ERROR:\n{$log_msg}\n");
69
  @fclose($GLOBALS["LOG_FILE_HANDLE"]);
70
- die("<div class='dup-ui-error'><hr size='1' /><b style='color:#B80000;'>INSTALL ERROR!</b><br/>{$msg}</div><br/>");
71
  }
72
  }
73
  ?>
1
  <?php
 
 
 
 
 
 
 
2
 
3
+ define('ERR_CONFIG_FOUND', 'A wp-config.php already exists in this location. This error prevents users from accidentally overwriting the wrong directories contents. You have two options: <ul><li>Empty this root directory except for the package and installer and try again.</li><li>Delete just the wp-config.php file and try again. This will over-write all other files in the directory.</li><li>Check the "Manual package extraction" checkbox under advanced options to skip extraction</li></ul>');
4
  define('ERR_ZIPNOTFOUND', 'The packaged zip file was not found. Be sure the zip package is in the same directory as the installer file and as the correct permissions. If you are trying to reinstall a package you can copy the package from the "' . DUPLICATOR_SSDIR_NAME . '" directory back up to your root which is the same location as your installer.php file.');
5
  define('ERR_ZIPOPEN', 'Failed to open zip archive file. Please be sure the archive is completely downloaded before running the installer. Try to extract the archive manually to make sure the file is not corrupted.');
6
  define('ERR_ZIPEXTRACTION', 'Errors extracting zip file. Portions or part of the zip archive did not extract correctly. Try to extract the archive manually with a client side program like unzip/win-zip/winrar to make sure the file is not corrupted. If the file extracts correctly then there is an invalid file or directory that PHP is unable to extract. This can happen if your moving from one operating system to another where certain naming conventions work on one environment and not another. <br/><br/> Workarounds: <br/> 1. Create a new package and be sure to exclude any directories that have invalid names or files in them. This warning will be displayed on the scan results under "Invalid Names". <br/> 2. Manually extract the zip file with a client side program. Then under advanced options in step 1 of the installer check the "Manual package extraction" option and perform the install.');
7
  define('ERR_ZIPMANUAL', 'When choosing manual package extraction, the contents of the package must already be extracted and the wp-config.php and database.sql files must be present in the same directory as the installer.php for the process to continue. Please manually extract the package into the current directory before continuing in manual extraction mode. Also validate that the wp-config.php and database.sql files are present.');
8
+ define('ERR_MAKELOG', 'PHP is having issues writing to the log file <b>' . DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']) . '\installer-log.txt .</b> In order for the Duplicator to proceed validate your owner/group and permission settings for PHP on this path. Try temporarily setting you permissions to 777 to see if the issue gets resolved. If you are on a shared hosting environment please contact your hosting company and tell them you are getting errors writing files to the path above when using PHP.');
9
  define('ERR_ZIPARCHIVE', 'In order to extract the archive.zip file the PHP ZipArchive module must be installed. Please read the FAQ for more details. You can still install this package but you will need to check the Manual package extraction checkbox found in the Advanced Options. Please read the online user guide for details in performing a manual package extraction.');
10
  define('ERR_MYSQLI_SUPPORT', 'In order to complete an install the mysqli extension for PHP is required. If you are on a hosted server please contact your host and request that mysqli be enabled. For more information visit: http://php.net/manual/en/mysqli.installation.php');
11
  define('ERR_DBCONNECT', 'DATABASE CONNECTION FAILED!<br/>');
60
  $log_msg = strip_tags($log_msg);
61
  @fwrite($GLOBALS["LOG_FILE_HANDLE"], "\nINSTALLER ERROR:\n{$log_msg}\n");
62
  @fclose($GLOBALS["LOG_FILE_HANDLE"]);
63
+ die("<div class='dupx-ui-error'><hr size='1' /><b style='color:#B80000;'>INSTALL ERROR!</b><br/>{$msg}</div>");
64
  }
65
  }
66
  ?>
installer/build/classes/config/class.conf.srv.php CHANGED
@@ -1,11 +1,4 @@
1
  <?php
2
- // Exit if accessed directly
3
- if (!defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://".strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
 
10
  /**
11
  * Class used to update and edit web server configuration files
@@ -19,54 +12,54 @@ if (!defined('DUPLICATOR_INIT')) {
19
  class DUPX_ServerConfig
20
  {
21
 
22
- /**
23
- * Clear .htaccess and web.config files and backup
24
- *
25
- * @return null
26
- */
27
- public static function reset()
28
- {
29
- DUPX_Log::info("\nWEB SERVER CONFIGURATION FILE RESET:");
30
- $timeStamp = date("ymdHis");
31
 
32
- //Apache
33
- @copy('.htaccess', ".htaccess.{$timeStamp}.orig");
34
- @unlink('.htaccess');
35
 
36
- //IIS
37
- @copy('web.config', "web.config.{$timeStamp}.orig");
38
- @unlink('web.config');
39
 
40
- //.user.ini - For WordFence
41
- @copy('.user.ini', ".user.ini.{$timeStamp}.orig");
42
- @unlink('.user.ini');
43
 
44
- DUPX_Log::info("- Backup of .htaccess/web.config made to *.{$timeStamp}.orig");
45
- DUPX_Log::info("- Reset of .htaccess/web.config files");
46
- $tmp_htaccess = '# RESET FOR DUPLICATOR INSTALLER USEAGE';
47
- file_put_contents('.htaccess', $tmp_htaccess);
48
- @chmod('.htaccess', 0644);
49
- }
50
 
51
- /**
52
- * Resets the .htaccess file to a very slimed down version with new paths
53
- *
54
- * @return null
55
- */
56
- public static function setup()
57
- {
58
 
59
- if (!isset($_POST['url_new'])) {
60
- return;
61
- }
62
 
63
- DUPX_Log::info("\nWEB SERVER CONFIGURATION FILE BASIC SETUP:");
64
- $currdata = parse_url($_POST['url_old']);
65
- $newdata = parse_url($_POST['url_new']);
66
- $currpath = DUPX_Util::add_slash(isset($currdata['path']) ? $currdata['path'] : "");
67
- $newpath = DUPX_Util::add_slash(isset($newdata['path']) ? $newdata['path'] : "");
68
 
69
- $tmp_htaccess = <<<HTACCESS
70
  # BEGIN WordPress
71
  <IfModule mod_rewrite.c>
72
  RewriteEngine On
@@ -79,9 +72,9 @@ RewriteRule . {$newpath}index.php [L]
79
  # END WordPress
80
  HTACCESS;
81
 
82
- file_put_contents('.htaccess', $tmp_htaccess);
83
- @chmod('.htaccess', 0644);
84
- DUPX_Log::info("created basic .htaccess file. If using IIS web.config this process will need to be done manually.");
85
- }
86
  }
87
- ?>
1
  <?php
 
 
 
 
 
 
 
2
 
3
  /**
4
  * Class used to update and edit web server configuration files
12
  class DUPX_ServerConfig
13
  {
14
 
15
+ /**
16
+ * Clear .htaccess and web.config files and backup
17
+ *
18
+ * @return null
19
+ */
20
+ public static function reset()
21
+ {
22
+ DUPX_Log::info("\nWEB SERVER CONFIGURATION FILE RESET:");
23
+ $timeStamp = date("ymdHis");
24
 
25
+ //Apache
26
+ @copy('.htaccess', ".htaccess.{$timeStamp}.orig");
27
+ @unlink('.htaccess');
28
 
29
+ //IIS
30
+ @copy('web.config', "web.config.{$timeStamp}.orig");
31
+ @unlink('web.config');
32
 
33
+ //.user.ini - For WordFence
34
+ @copy('.user.ini', ".user.ini.{$timeStamp}.orig");
35
+ @unlink('.user.ini');
36
 
37
+ DUPX_Log::info("- Backup of .htaccess/web.config made to *.{$timeStamp}.orig");
38
+ DUPX_Log::info("- Reset of .htaccess/web.config files");
39
+ $tmp_htaccess = '# RESET FOR DUPLICATOR INSTALLER USEAGE';
40
+ file_put_contents('.htaccess', $tmp_htaccess);
41
+ @chmod('.htaccess', 0644);
42
+ }
43
 
44
+ /**
45
+ * Resets the .htaccess file to a very slimed down version with new paths
46
+ *
47
+ * @return null
48
+ */
49
+ public static function setup()
50
+ {
51
 
52
+ if (!isset($_POST['url_new'])) {
53
+ return;
54
+ }
55
 
56
+ DUPX_Log::info("\nWEB SERVER CONFIGURATION FILE BASIC SETUP:");
57
+ $currdata = parse_url($_POST['url_old']);
58
+ $newdata = parse_url($_POST['url_new']);
59
+ $currpath = DUPX_U::addSlash(isset($currdata['path']) ? $currdata['path'] : "");
60
+ $newpath = DUPX_U::addSlash(isset($newdata['path']) ? $newdata['path'] : "");
61
 
62
+ $tmp_htaccess = <<<HTACCESS
63
  # BEGIN WordPress
64
  <IfModule mod_rewrite.c>
65
  RewriteEngine On
72
  # END WordPress
73
  HTACCESS;
74
 
75
+ file_put_contents('.htaccess', $tmp_htaccess);
76
+ @chmod('.htaccess', 0644);
77
+ DUPX_Log::info("created basic .htaccess file. If using IIS web.config this process will need to be done manually.");
78
+ }
79
  }
80
+ ?>
installer/build/classes/config/class.conf.wp.php CHANGED
@@ -1,11 +1,4 @@
1
  <?php
2
- // Exit if accessed directly
3
- if (!defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://".strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: {$_baseURL}");
7
- exit;
8
- }
9
 
10
  /**
11
  * Class used to update and edit and update the wp-config.php
@@ -19,104 +12,104 @@ if (!defined('DUPLICATOR_INIT')) {
19
  class DUPX_WPConfig
20
  {
21
 
22
- /**
23
- * Updates the web server config files in Step 1
24
- *
25
- * @return null
26
- */
27
- public static function updateStep1()
28
- {
29
- if (!file_exists('wp-config.php')) return;
30
 
31
- $root_path = DUPX_Util::set_safe_path($GLOBALS['CURRENT_ROOT_PATH']);
32
- $wpconfig = @file_get_contents('wp-config.php', true);
33
 
34
- $patterns = array(
35
- "/'DB_NAME',\s*'.*?'/",
36
- "/'DB_USER',\s*'.*?'/",
37
- "/'DB_PASSWORD',\s*'.*?'/",
38
- "/'DB_HOST',\s*'.*?'/");
39
 
40
- $db_host = ($_POST['dbport'] == 3306) ? $_POST['dbhost'] : "{$_POST['dbhost']}:{$_POST['dbport']}";
41
 
42
- $replace = array(
43
- "'DB_NAME', ".'\''.$_POST['dbname'].'\'',
44
- "'DB_USER', ".'\''.$_POST['dbuser'].'\'',
45
- "'DB_PASSWORD', ".'\''.DUPX_Util::preg_replacement_quote($_POST['dbpass']).'\'',
46
- "'DB_HOST', ".'\''.$db_host.'\'');
47
 
48
- //SSL CHECKS
49
- if ($_POST['ssl_admin']) {
50
- if (!strstr($wpconfig, 'FORCE_SSL_ADMIN')) {
51
- $wpconfig = $wpconfig.PHP_EOL."define('FORCE_SSL_ADMIN', true);";
52
- }
53
- } else {
54
- array_push($patterns, "/'FORCE_SSL_ADMIN',\s*true/");
55
- array_push($replace, "'FORCE_SSL_ADMIN', false");
56
- }
57
 
58
- if ($_POST['ssl_login']) {
59
- if (!strstr($wpconfig, 'FORCE_SSL_LOGIN')) {
60
- $wpconfig = $wpconfig.PHP_EOL."define('FORCE_SSL_LOGIN', true);";
61
- }
62
- } else {
63
- array_push($patterns, "/'FORCE_SSL_LOGIN',\s*true/");
64
- array_push($replace, "'FORCE_SSL_LOGIN', false");
65
- }
66
 
67
- //CACHE CHECKS
68
- if ($_POST['cache_wp']) {
69
- if (!strstr($wpconfig, 'WP_CACHE')) {
70
- $wpconfig = $wpconfig.PHP_EOL."define('WP_CACHE', true);";
71
- }
72
- } else {
73
- array_push($patterns, "/'WP_CACHE',\s*true/");
74
- array_push($replace, "'WP_CACHE', false");
75
- }
76
- if (!$_POST['cache_path']) {
77
- array_push($patterns, "/'WPCACHEHOME',\s*'.*?'/");
78
- array_push($replace, "'WPCACHEHOME', ''");
79
- }
80
 
81
- if (!is_writable("{$root_path}/wp-config.php")) {
82
- if (file_exists("{$root_path}/wp-config.php")) {
83
- chmod("{$root_path}/wp-config.php", 0644) ? DUPX_Log::info('File Permission Update: wp-config.php set to 0644') : DUPX_Log::info('WARNING: Unable to update file permissions and write to wp-config.php. Please visit the online FAQ for setting file permissions and work with your hosting provider or server administrator to enable this installer.php script to write to the wp-config.php file.');
84
- } else {
85
- DUPX_Log::info('WARNING: Unable to locate wp-config.php file. Be sure the file is present in your archive.');
86
- }
87
- }
88
 
89
- $wpconfig = preg_replace($patterns, $replace, $wpconfig);
90
- file_put_contents('wp-config.php', $wpconfig);
91
- $wpconfig = null;
92
- }
93
 
94
- /**
95
- * Updates the web server config files in Step 1
96
- *
97
- * @return null
98
- */
99
- public static function updateStep2()
100
- {
101
- $config_file = '';
102
- if (!file_exists('wp-config.php')) {
103
- return $config_file;
104
- }
105
 
106
- $patterns = array("/('|\")WP_HOME.*?\)\s*;/",
107
- "/('|\")WP_SITEURL.*?\)\s*;/",
108
- "/('|\")DOMAIN_CURRENT_SITE.*?\)\s*;/",
109
- "/('|\")PATH_CURRENT_SITE.*?\)\s*;/");
110
- $replace = array("'WP_HOME', '{$_POST['url_new']}');",
111
- "'WP_SITEURL', '{$_POST['url_new']}');",
112
- "'DOMAIN_CURRENT_SITE', '{$mu_newDomainHost}');",
113
- "'PATH_CURRENT_SITE', '{$mu_newUrlPath}');");
114
 
115
- $config_file = file_get_contents('wp-config.php', true);
116
- $config_file = preg_replace($patterns, $replace, $config_file);
117
- file_put_contents('wp-config.php', $config_file);
118
 
119
- return $config_file;
120
- }
121
  }
122
  ?>
1
  <?php
 
 
 
 
 
 
 
2
 
3
  /**
4
  * Class used to update and edit and update the wp-config.php
12
  class DUPX_WPConfig
13
  {
14
 
15
+ /**
16
+ * Updates the web server config files in Step 1
17
+ *
18
+ * @return null
19
+ */
20
+ public static function updateStandard()
21
+ {
22
+ if (!file_exists('wp-config.php')) return;
23
 
24
+ $root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
25
+ $wpconfig = @file_get_contents('wp-config.php', true);
26
 
27
+ $patterns = array(
28
+ "/'DB_NAME',\s*'.*?'/",
29
+ "/'DB_USER',\s*'.*?'/",
30
+ "/'DB_PASSWORD',\s*'.*?'/",
31
+ "/'DB_HOST',\s*'.*?'/");
32
 
33
+ $db_host = ($_POST['dbport'] == 3306) ? $_POST['dbhost'] : "{$_POST['dbhost']}:{$_POST['dbport']}";
34
 
35
+ $replace = array(
36
+ "'DB_NAME', ".'\''.$_POST['dbname'].'\'',
37
+ "'DB_USER', ".'\''.$_POST['dbuser'].'\'',
38
+ "'DB_PASSWORD', ".'\''.DUPX_U::pregReplacementQuote($_POST['dbpass']).'\'',
39
+ "'DB_HOST', ".'\''.$db_host.'\'');
40
 
41
+ //SSL CHECKS
42
+ if ($_POST['ssl_admin']) {
43
+ if (!strstr($wpconfig, 'FORCE_SSL_ADMIN')) {
44
+ $wpconfig = $wpconfig.PHP_EOL."define('FORCE_SSL_ADMIN', true);";
45
+ }
46
+ } else {
47
+ array_push($patterns, "/'FORCE_SSL_ADMIN',\s*true/");
48
+ array_push($replace, "'FORCE_SSL_ADMIN', false");
49
+ }
50
 
51
+ if ($_POST['ssl_login']) {
52
+ if (!strstr($wpconfig, 'FORCE_SSL_LOGIN')) {
53
+ $wpconfig = $wpconfig.PHP_EOL."define('FORCE_SSL_LOGIN', true);";
54
+ }
55
+ } else {
56
+ array_push($patterns, "/'FORCE_SSL_LOGIN',\s*true/");
57
+ array_push($replace, "'FORCE_SSL_LOGIN', false");
58
+ }
59
 
60
+ //CACHE CHECKS
61
+ if ($_POST['cache_wp']) {
62
+ if (!strstr($wpconfig, 'WP_CACHE')) {
63
+ $wpconfig = $wpconfig.PHP_EOL."define('WP_CACHE', true);";
64
+ }
65
+ } else {
66
+ array_push($patterns, "/'WP_CACHE',\s*true/");
67
+ array_push($replace, "'WP_CACHE', false");
68
+ }
69
+ if (!$_POST['cache_path']) {
70
+ array_push($patterns, "/'WPCACHEHOME',\s*'.*?'/");
71
+ array_push($replace, "'WPCACHEHOME', ''");
72
+ }
73
 
74
+ if (!is_writable("{$root_path}/wp-config.php")) {
75
+ if (file_exists("{$root_path}/wp-config.php")) {
76
+ chmod("{$root_path}/wp-config.php", 0644) ? DUPX_Log::info('File Permission Update: wp-config.php set to 0644') : DUPX_Log::info('WARNING: Unable to update file permissions and write to wp-config.php. Please visit the online FAQ for setting file permissions and work with your hosting provider or server administrator to enable this installer.php script to write to the wp-config.php file.');
77
+ } else {
78
+ DUPX_Log::info('WARNING: Unable to locate wp-config.php file. Be sure the file is present in your archive.');
79
+ }
80
+ }
81
 
82
+ $wpconfig = preg_replace($patterns, $replace, $wpconfig);
83
+ file_put_contents('wp-config.php', $wpconfig);
84
+ $wpconfig = null;
85
+ }
86
 
87
+ /**
88
+ * Updates the web server config files in Step 1
89
+ *
90
+ * @return null
91
+ */
92
+ public static function updateExtended()
93
+ {
94
+ $config_file = '';
95
+ if (!file_exists('wp-config.php')) {
96
+ return $config_file;
97
+ }
98
 
99
+ $patterns = array("/('|\")WP_HOME.*?\)\s*;/",
100
+ "/('|\")WP_SITEURL.*?\)\s*;/",
101
+ "/('|\")DOMAIN_CURRENT_SITE.*?\)\s*;/",
102
+ "/('|\")PATH_CURRENT_SITE.*?\)\s*;/");
103
+ $replace = array("'WP_HOME', '{$_POST['url_new']}');",
104
+ "'WP_SITEURL', '{$_POST['url_new']}');",
105
+ "'DOMAIN_CURRENT_SITE', '{$mu_newDomainHost}');",
106
+ "'PATH_CURRENT_SITE', '{$mu_newUrlPath}');");
107
 
108
+ $config_file = file_get_contents('wp-config.php', true);
109
+ $config_file = preg_replace($patterns, $replace, $config_file);
110
+ file_put_contents('wp-config.php', $config_file);
111
 
112
+ return $config_file;
113
+ }
114
  }
115
  ?>
installer/build/classes/util/class.db.php DELETED
@@ -1,194 +0,0 @@
1
- <?php
2
- // Exit if accessed directly
3
- if (!defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://".strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
-
10
- /**
11
- * Lightweight abstraction layer for common simple database routines
12
- *
13
- * Standard: PSR-2
14
- * @link http://www.php-fig.org/psr/psr-2 Full Documentation
15
- *
16
- * @package SC\DUPX\DB
17
- *
18
- */
19
- class DUPX_DB
20
- {
21
-
22
- /**
23
- * MySQL connection wrapper with support for port
24
- *
25
- * @param string $host The server host name
26
- * @param string $username The server DB user name
27
- * @param string $password The server DB password
28
- * @param string $dbname The server DB name
29
- * @param int $port The server DB port
30
- *
31
- * @return database connection handle
32
- */
33
- public static function connect($host, $username, $password, $dbname = '', $port = null)
34
- {
35
- //sock connections
36
- if ('sock' === substr($host, -4)) {
37
- $url_parts = parse_url($host);
38
- $dbh = @mysqli_connect('localhost', $username, $password, $dbname, null, $url_parts['path']);
39
- } else {
40
- $dbh = @mysqli_connect($host, $username, $password, $dbname, $port);
41
- }
42
- return $dbh;
43
- }
44
-
45
- /**
46
- * Count the tables in a given database
47
- *
48
- * @param obj $dbh A valid database link handle
49
- * @param string $dbname Database to count tables in
50
- *
51
- * @return int The number of tables in the database
52
- */
53
- public static function countTables($dbh, $dbname)
54
- {
55
- $res = mysqli_query($dbh, "SELECT COUNT(*) AS count FROM information_schema.tables WHERE table_schema = '{$dbname}' ");
56
- $row = mysqli_fetch_row($res);
57
- return is_null($row) ? 0 : $row[0];
58
- }
59
-
60
- /**
61
- * Returns the number of rows in a table
62
- *
63
- * @param obj $dbh A valid database link handle
64
- * @param string $name A valid table name
65
- */
66
- public static function countTableRows($dbh, $name)
67
- {
68
- $total = mysqli_query($dbh, "SELECT COUNT(*) FROM `$name`");
69
- if ($total) {
70
- $total = @mysqli_fetch_array($total);
71
- return $total[0];
72
- } else {
73
- return 0;
74
- }
75
- }
76
-
77
- /**
78
- * Returns the tables for a database as an array
79
- *
80
- * @param obj $dbh A valid database link handle
81
- *
82
- * @return array A list of all table names
83
- */
84
- public static function getTables($dbh)
85
- {
86
- $query = @mysqli_query($dbh, 'SHOW TABLES');
87
- if ($query) {
88
- while ($table = @mysqli_fetch_array($query)) {
89
- $all_tables[] = $table[0];
90
- }
91
- if (isset($all_tables) && is_array($all_tables)) {
92
- return $all_tables;
93
- }
94
- }
95
- return array();
96
- }
97
-
98
- /**
99
- * Get the requested MySQL system variable
100
- *
101
- * @param obj $dbh A valid database link handle
102
- * @param string $name The database variable name to lookup
103
- *
104
- * @return string the server variable to query for
105
- */
106
- public static function getVariable($dbh, $name)
107
- {
108
- $result = @mysqli_query($dbh, "SHOW VARIABLES LIKE '{$name}'");
109
- $row = @mysqli_fetch_array($result);
110
- @mysqli_free_result($result);
111
- return isset($row[1]) ? $row[1] : null;
112
- }
113
-
114
- /**
115
- * Gets the MySQL database version number
116
- *
117
- * @param obj $dbh A valid database link handle
118
- * @param bool $full True: Gets the full version
119
- * False: Gets only the numeric portion i.e. 5.5.6 or 10.1.2 (for MariaDB)
120
- *
121
- * @return false|string 0 on failure, version number on success
122
- */
123
- public static function getVersion($dbh, $full = false)
124
- {
125
- if ($full) {
126
- $version = self::getVariable($dbh, 'version');
127
- } else {
128
- $version = preg_replace('/[^0-9.].*/', '', self::getVariable($dbh, 'version'));
129
- }
130
-
131
- $version = is_null($version) ? null : $version;
132
- return empty($version) ? 0 : $version;
133
- }
134
-
135
- /**
136
- * Returns a more detailed string about the msyql server version
137
- * For example on some systems the result is 5.5.5-10.1.21-MariaDB
138
- * this format is helpful for providing the user a full overview
139
- *
140
- * @param conn $dbh Database connection handle
141
- *
142
- * @return string The full details of mysql
143
- */
144
- public static function getServerInfo($dbh)
145
- {
146
- return mysqli_get_server_info($dbh);
147
- }
148
-
149
- /**
150
- * Determine if a MySQL database supports a particular feature
151
- *
152
- * @param conn $dbh Database connection handle
153
- * @param string $feature the feature to check for
154
- * @return bool
155
- */
156
- public static function hasAbility($dbh, $feature)
157
- {
158
- $version = self::getVersion($dbh);
159
-
160
- switch (strtolower($feature)) {
161
- case 'collation' :
162
- case 'group_concat' :
163
- case 'subqueries' :
164
- return version_compare($version, '4.1', '>=');
165
- case 'set_charset' :
166
- return version_compare($version, '5.0.7', '>=');
167
- };
168
- return false;
169
- }
170
-
171
- /**
172
- * Sets the MySQL connection's character set.
173
- *
174
- * @param resource $dbh The resource given by mysqli_connect
175
- * @param string $charset The character set (optional)
176
- * @param string $collate The collation (optional)
177
- */
178
- public static function setCharset($dbh, $charset = null, $collate = null)
179
- {
180
- $charset = (!isset($charset) ) ? $GLOBALS['DBCHARSET_DEFAULT'] : $charset;
181
- $collate = (!isset($collate) ) ? $GLOBALS['DBCOLLATE_DEFAULT'] : $collate;
182
-
183
- if (self::hasAbility($dbh, 'collation') && !empty($charset)) {
184
- if (function_exists('mysqli_set_charset') && self::hasAbility($dbh, 'set_charset')) {
185
- return mysqli_set_charset($dbh, $charset);
186
- } else {
187
- $sql = " SET NAMES {$charset}";
188
- if (!empty($collate)) $sql .= " COLLATE {$collate}";
189
- return mysqli_query($dbh, $sql);
190
- }
191
- }
192
- }
193
- }
194
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
installer/build/classes/utilities/class.db.php ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Lightweight abstraction layer for common simple database routines
5
+ *
6
+ * Standard: PSR-2
7
+ * @link http://www.php-fig.org/psr/psr-2 Full Documentation
8
+ *
9
+ * @package SC\DUPX\DB
10
+ *
11
+ */
12
+ class DUPX_DB
13
+ {
14
+
15
+ /**
16
+ * MySQL connection wrapper with support for port
17
+ *
18
+ * @param string $host The server host name
19
+ * @param string $username The server DB user name
20
+ * @param string $password The server DB password
21
+ * @param string $dbname The server DB name
22
+ * @param int $port The server DB port
23
+ *
24
+ * @return database connection handle
25
+ */
26
+ public static function connect($host, $username, $password, $dbname = '', $port = null)
27
+ {
28
+ //sock connections
29
+ if ('sock' === substr($host, -4)) {
30
+ $url_parts = parse_url($host);
31
+ $dbh = @mysqli_connect('localhost', $username, $password, $dbname, null, $url_parts['path']);
32
+ } else {
33
+ $dbh = @mysqli_connect($host, $username, $password, $dbname, $port);
34
+ }
35
+ return $dbh;
36
+ }
37
+
38
+ /**
39
+ * Count the tables in a given database
40
+ *
41
+ * @param obj $dbh A valid database link handle
42
+ * @param string $dbname Database to count tables in
43
+ *
44
+ * @return int The number of tables in the database
45
+ */
46
+ public static function countTables($dbh, $dbname)
47
+ {
48
+ $res = mysqli_query($dbh, "SELECT COUNT(*) AS count FROM information_schema.tables WHERE table_schema = '{$dbname}' ");
49
+ $row = mysqli_fetch_row($res);
50
+ return is_null($row) ? 0 : $row[0];
51
+ }
52
+
53
+ /**
54
+ * Returns the number of rows in a table
55
+ *
56
+ * @param obj $dbh A valid database link handle
57
+ * @param string $name A valid table name
58
+ */
59
+ public static function countTableRows($dbh, $name)
60
+ {
61
+ $total = mysqli_query($dbh, "SELECT COUNT(*) FROM `$name`");
62
+ if ($total) {
63
+ $total = @mysqli_fetch_array($total);
64
+ return $total[0];
65
+ } else {
66
+ return 0;
67
+ }
68
+ }
69
+
70
+ /**
71
+ * Returns the tables for a database as an array
72
+ *
73
+ * @param obj $dbh A valid database link handle
74
+ *
75
+ * @return array A list of all table names
76
+ */
77
+ public static function getTables($dbh)
78
+ {
79
+ $query = @mysqli_query($dbh, 'SHOW TABLES');
80
+ if ($query) {
81
+ while ($table = @mysqli_fetch_array($query)) {
82
+ $all_tables[] = $table[0];
83
+ }
84
+ if (isset($all_tables) && is_array($all_tables)) {
85
+ return $all_tables;
86
+ }
87
+ }
88
+ return array();
89
+ }
90
+
91
+ /**
92
+ * Get the requested MySQL system variable
93
+ *
94
+ * @param obj $dbh A valid database link handle
95
+ * @param string $name The database variable name to lookup
96
+ *
97
+ * @return string the server variable to query for
98
+ */
99
+ public static function getVariable($dbh, $name)
100
+ {
101
+ $result = @mysqli_query($dbh, "SHOW VARIABLES LIKE '{$name}'");
102
+ $row = @mysqli_fetch_array($result);
103
+ @mysqli_free_result($result);
104
+ return isset($row[1]) ? $row[1] : null;
105
+ }
106
+
107
+ /**
108
+ * Gets the MySQL database version number
109
+ *
110
+ * @param obj $dbh A valid database link handle
111
+ * @param bool $full True: Gets the full version
112
+ * False: Gets only the numeric portion i.e. 5.5.6 or 10.1.2 (for MariaDB)
113
+ *
114
+ * @return false|string 0 on failure, version number on success
115
+ */
116
+ public static function getVersion($dbh, $full = false)
117
+ {
118
+ if ($full) {
119
+ $version = self::getVariable($dbh, 'version');
120
+ } else {
121
+ $version = preg_replace('/[^0-9.].*/', '', self::getVariable($dbh, 'version'));
122
+ }
123
+
124
+ $version = is_null($version) ? null : $version;
125
+ return empty($version) ? 0 : $version;
126
+ }
127
+
128
+ /**
129
+ * Returns a more detailed string about the msyql server version
130
+ * For example on some systems the result is 5.5.5-10.1.21-MariaDB
131
+ * this format is helpful for providing the user a full overview
132
+ *
133
+ * @param conn $dbh Database connection handle
134
+ *
135
+ * @return string The full details of mysql
136
+ */
137
+ public static function getServerInfo($dbh)
138
+ {
139
+ return mysqli_get_server_info($dbh);
140
+ }
141
+
142
+ /**
143
+ * Determine if a MySQL database supports a particular feature
144
+ *
145
+ * @param conn $dbh Database connection handle
146
+ * @param string $feature the feature to check for
147
+ *
148
+ * @return bool
149
+ */
150
+ public static function hasAbility($dbh, $feature)
151
+ {
152
+ $version = self::getVersion($dbh);
153
+
154
+ switch (strtolower($feature)) {
155
+ case 'collation' :
156
+ case 'group_concat' :
157
+ case 'subqueries' :
158
+ return version_compare($version, '4.1', '>=');
159
+ case 'set_charset' :
160
+ return version_compare($version, '5.0.7', '>=');
161
+ };
162
+ return false;
163
+ }
164
+
165
+ /**
166
+ * Sets the MySQL connection's character set.
167
+ *
168
+ * @param resource $dbh The resource given by mysqli_connect
169
+ * @param string $charset The character set (optional)
170
+ * @param string $collate The collation (optional)
171
+ *
172
+ * @return bool True on success
173
+ */
174
+ public static function setCharset($dbh, $charset = null, $collate = null)
175
+ {
176
+ $charset = (!isset($charset) ) ? $GLOBALS['DBCHARSET_DEFAULT'] : $charset;
177
+ $collate = (!isset($collate) ) ? $GLOBALS['DBCOLLATE_DEFAULT'] : $collate;
178
+
179
+ if (self::hasAbility($dbh, 'collation') && !empty($charset)) {
180
+ if (function_exists('mysqli_set_charset') && self::hasAbility($dbh, 'set_charset')) {
181
+ return mysqli_set_charset($dbh, $charset);
182
+ } else {
183
+ $sql = " SET NAMES {$charset}";
184
+ if (!empty($collate)) $sql .= " COLLATE {$collate}";
185
+ return mysqli_query($dbh, $sql);
186
+ }
187
+ }
188
+ }
189
+ }
190
+ ?>
installer/build/classes/utilities/class.server.php ADDED
@@ -0,0 +1,175 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Lightweight abstraction layer for common simple server based routines
5
+ *
6
+ * Standard: PSR-2
7
+ * @link http://www.php-fig.org/psr/psr-2 Full Documentation
8
+ *
9
+ * @package SC\DUPX\Server
10
+ *
11
+ */
12
+ class DUPX_Server
13
+ {
14
+ /**
15
+ * Returns true if safe mode is enabled
16
+ */
17
+ public static $php_safe_mode_on = false;
18
+
19
+ /**
20
+ * The servers current PHP version
21
+ */
22
+ public static $php_version = 0;
23
+
24
+ /**
25
+ * The minimum PHP version the installer will support
26
+ */
27
+ public static $php_version_min = "5.2.7";
28
+
29
+ /**
30
+ * Is the current servers version of PHP safe to use with the installer
31
+ */
32
+ public static $php_version_safe = false;
33
+
34
+ /**
35
+ * Used to init the staic properties
36
+ */
37
+ public static function init()
38
+ {
39
+ self::$php_safe_mode_on = in_array(strtolower(@ini_get('safe_mode')), array('on', 'yes', 'true', 1, "1"));
40
+ self::$php_version = phpversion();
41
+ self::$php_version_safe = (version_compare(phpversion(), self::$php_version_min) >= 0);
42
+ }
43
+
44
+ /**
45
+ * Is the directory provided writable by PHP
46
+ *
47
+ * @param string $path A physical directory path
48
+ *
49
+ * @return bool Returns true if PHP can write to the path provided
50
+ */
51
+ public static function isDirWritable($path)
52
+ {
53
+ if (!@is_writeable($path)) return false;
54
+
55
+ if (is_dir($path)) {
56
+ if ($dh = @opendir($path)) {
57
+ closedir($dh);
58
+ } else {
59
+ return false;
60
+ }
61
+ }
62
+ return true;
63
+ }
64
+
65
+ /**
66
+ * Can this server process in shell_exec mode
67
+ *
68
+ * @return bool Returns true is the server can run shell_exec commands
69
+ */
70
+ public static function hasShellExec()
71
+ {
72
+ if (array_intersect(array('shell_exec', 'escapeshellarg', 'escapeshellcmd', 'extension_loaded'), array_map('trim', explode(',', @ini_get('disable_functions'))))) return false;
73
+
74
+ //Suhosin: http://www.hardened-php.net/suhosin/
75
+ //Will cause PHP to silently fail.
76
+ if (extension_loaded('suhosin')) return false;
77
+
78
+ // Can we issue a simple echo command?
79
+ if (!@shell_exec('echo duplicator')) return false;
80
+
81
+ return true;
82
+ }
83
+
84
+ /**
85
+ * Returns the path where the zip command can be called on this server
86
+ *
87
+ * @return string The path to where the zip command can be processed
88
+ */
89
+ public static function getUnzipPath()
90
+ {
91
+ $filepath = null;
92
+ if (self::hasShellExec()) {
93
+ if (shell_exec('hash unzip 2>&1') == NULL) {
94
+ $filepath = 'unzip';
95
+ } else {
96
+ $try_paths = array(
97
+ '/usr/bin/unzip',
98
+ '/opt/local/bin/unzip');
99
+ foreach ($try_paths as $path) {
100
+ if (file_exists($path)) {
101
+ $filepath = $path;
102
+ break;
103
+ }
104
+ }
105
+ }
106
+ }
107
+ return $filepath;
108
+ }
109
+
110
+
111
+ /**
112
+ * A safe method used to copy larger files
113
+ *
114
+ * @param string $source The path to the file being copied
115
+ * @param string $destination The path to the file being made
116
+ *
117
+ * @return bool True if the file was copied
118
+ */
119
+ public static function copyFile($source, $destination)
120
+ {
121
+ try {
122
+ $sp = fopen($source, 'r');
123
+ $op = fopen($destination, 'w');
124
+
125
+ while (!feof($sp)) {
126
+ $buffer = fread($sp, 512); // use a buffer of 512 bytes
127
+ fwrite($op, $buffer);
128
+ }
129
+ // close handles
130
+ fclose($op);
131
+ fclose($sp);
132
+ return true;
133
+
134
+ } catch (Exception $ex) {
135
+ return false;
136
+ }
137
+ }
138
+
139
+
140
+ /**
141
+ * Returns an array of zip files found in the current executing directory
142
+ *
143
+ * @return array of zip files
144
+ */
145
+ public static function getZipFiles()
146
+ {
147
+ $files = array();
148
+ foreach (glob("*.zip") as $name) {
149
+ if (file_exists($name)) {
150
+ $files[] = $name;
151
+ }
152
+ }
153
+
154
+ if (count($files) > 0) {
155
+ return $files;
156
+ }
157
+
158
+ //FALL BACK: Windows XP has bug with glob,
159
+ //add secondary check for PHP lameness
160
+ if ($dh = opendir('.')) {
161
+ while (false !== ($name = readdir($dh))) {
162
+ $ext = substr($name, strrpos($name, '.') + 1);
163
+ if (in_array($ext, array("zip"))) {
164
+ $files[] = $name;
165
+ }
166
+ }
167
+ closedir($dh);
168
+ }
169
+
170
+ return $files;
171
+ }
172
+ }
173
+ //INIT Class Properties
174
+ DUPX_Server::init();
175
+ ?>
installer/build/classes/{util/class.utils.php → utilities/class.u.php} RENAMED
@@ -1,19 +1,14 @@
1
  <?php
2
- // Exit if accessed directly
3
- if (!defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://".strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
-
10
  /**
11
  * Various Static Utility methods for working with the installer
12
  *
13
- * @package SC\DUPX\Util
 
 
 
14
  *
15
  */
16
- class DUPX_Util
17
  {
18
 
19
  /**
@@ -21,9 +16,9 @@ class DUPX_Util
21
  *
22
  * @param string $path A path
23
  *
24
- * @return string The orginal $path with a with '/'.
25
  */
26
- public static function add_slash($path)
27
  {
28
  $last_char = substr($path, strlen($path) - 1, 1);
29
  if ($last_char != '/') {
@@ -32,37 +27,17 @@ class DUPX_Util
32
  return $path;
33
  }
34
 
35
- /**
36
- * A safe method used to copy larger files
37
- *
38
- * @param string $source The path to the file being copied
39
- * @param string $destination The path to the file being made
40
- */
41
- public static function copy_file($source, $destination)
42
- {
43
- $sp = fopen($source, 'r');
44
- $op = fopen($destination, 'w');
45
-
46
- while (!feof($sp)) {
47
- $buffer = fread($sp, 512); // use a buffer of 512 bytes
48
- fwrite($op, $buffer);
49
- }
50
- // close handles
51
- fclose($op);
52
- fclose($sp);
53
- }
54
-
55
  /**
56
  * Return a string with the elapsed time
57
  *
58
- * @see get_microtime()
59
  *
60
  * @param mixed number $end The final time in the sequence to measure
61
  * @param mixed number $start The start time in the sequence to measure
62
  *
63
  * @return string The time elapsed from $start to $end
64
  */
65
- public static function elapsed_time($end, $start)
66
  {
67
  return sprintf("%.4f sec.", abs($end - $start));
68
  }
@@ -75,7 +50,7 @@ class DUPX_Util
75
  *
76
  * @return string Escaped string.
77
  */
78
- public static function esc_html_attr($string = '', $echo = false)
79
  {
80
  $output = htmlentities($string, ENT_QUOTES, 'UTF-8');
81
  if ($echo) {
@@ -93,7 +68,7 @@ class DUPX_Util
93
  *
94
  * @return string A series of 256 spaces ' '
95
  */
96
- public static function fcgi_flush()
97
  {
98
  echo(str_repeat(' ', 256));
99
  @flush();
@@ -102,11 +77,11 @@ class DUPX_Util
102
  /**
103
  * Get current microtime as a float. Method is used for simple profiling
104
  *
105
- * @see elapsed_time
106
  *
107
  * @return string A float in the form "msec sec", where sec is the number of seconds since the Unix epoch
108
  */
109
- public static function get_microtime()
110
  {
111
  return microtime(true);
112
  }
@@ -115,9 +90,10 @@ class DUPX_Util
115
  * Returns the active plugins for the WordPress website in the package
116
  *
117
  * @param obj $dbh A database connection handle
 
118
  * @return array $list A list of active plugins
119
  */
120
- public static function get_active_plugins($dbh)
121
  {
122
  $query = @mysqli_query($dbh, "SELECT option_value FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE option_name = 'active_plugins' ");
123
  if ($query) {
@@ -130,39 +106,6 @@ class DUPX_Util
130
  return array();
131
  }
132
 
133
- /**
134
- * Returns an array of zip files found in the current executing directory
135
- *
136
- * @return array of zip files
137
- */
138
- public static function get_zip_files()
139
- {
140
- $files = array();
141
- foreach (glob("*.zip") as $name) {
142
- if (file_exists($name)) {
143
- $files[] = $name;
144
- }
145
- }
146
-
147
- if (count($files) > 0) {
148
- return $files;
149
- }
150
-
151
- //FALL BACK: Windows XP has bug with glob,
152
- //add secondary check for PHP lameness
153
- if ($dh = opendir('.')) {
154
- while (false !== ($name = readdir($dh))) {
155
- $ext = substr($name, strrpos($name, '.') + 1);
156
- if (in_array($ext, array("zip"))) {
157
- $files[] = $name;
158
- }
159
- }
160
- closedir($dh);
161
- }
162
-
163
- return $files;
164
- }
165
-
166
  /**
167
  * Check to see if the internet is accessable
168
  *
@@ -171,9 +114,9 @@ class DUPX_Util
171
  * @param string $url A url e.g without prefix "ajax.googleapis.com"
172
  * @param string $port A valid port number
173
  *
174
- * @return bool
175
  */
176
- public static function is_url_active($url, $port, $timeout = 5)
177
  {
178
  if (function_exists('fsockopen')) {
179
  @ini_set("default_socket_timeout", 5);
@@ -195,21 +138,32 @@ class DUPX_Util
195
  * @param string $string Any string blob
196
  *
197
  * @return bool Returns true if any non ascii character is found in the blob
198
- *
199
  */
200
- public static function is_non_ascii($string)
201
  {
202
  return preg_match('/[^\x20-\x7f]/', $string);
203
  }
204
 
205
 
 
 
 
 
 
 
 
 
 
 
 
 
206
  /**
207
  * The characters that are special in the replacement value of preg_replace are not the
208
  * same characters that are special in the pattern. Allows for '$' to be safely passed.
209
  *
210
  * @param string $str The string to replace on
211
  */
212
- public static function preg_replacement_quote($str)
213
  {
214
  return preg_replace('/(\$|\\\\)(?=\d)/', '\\\\\1', $str);
215
  }
@@ -221,7 +175,7 @@ class DUPX_Util
221
  *
222
  * @return string Human readable bytes such as 50MB, 1GB
223
  */
224
- public static function readable_bytesize($size)
225
  {
226
  try {
227
  $units = array('B', 'KB', 'MB', 'GB', 'TB');
@@ -240,7 +194,7 @@ class DUPX_Util
240
  *
241
  * @returns int The byte representation of the shortand $val
242
  */
243
- public static function return_bytes($val)
244
  {
245
  $val = trim($val);
246
  $last = strtolower($val[strlen($val) - 1]);
@@ -270,7 +224,7 @@ class DUPX_Util
270
  *
271
  * @return string The orginal $path with a with all slashes facing '/'.
272
  */
273
- public static function set_safe_path($path)
274
  {
275
  return str_replace("\\", "/", $path);
276
  }
@@ -283,7 +237,7 @@ class DUPX_Util
283
  *
284
  * @return array An array of strings from the $list array fround in the $haystack
285
  */
286
- public static function search_list_values($list, $haystack)
287
  {
288
  $found = array();
289
  foreach ($list as $var) {
@@ -302,11 +256,10 @@ class DUPX_Util
302
  *
303
  * @return string The orginal $path with a with all slashes facing '\'.
304
  */
305
- public static function unset_safe_path($path)
306
  {
307
  return str_replace("/", "\\", $path);
308
  }
309
 
310
-
311
  }
312
  ?>
1
  <?php
 
 
 
 
 
 
 
 
2
  /**
3
  * Various Static Utility methods for working with the installer
4
  *
5
+ * Standard: PSR-2
6
+ * @link http://www.php-fig.org/psr/psr-2 Full Documentation
7
+ *
8
+ * @package SC\DUPX\U
9
  *
10
  */
11
+ class DUPX_U
12
  {
13
 
14
  /**
16
  *
17
  * @param string $path A path
18
  *
19
+ * @return string The orginal $path with a with '/' added to the end.
20
  */
21
+ public static function addSlash($path)
22
  {
23
  $last_char = substr($path, strlen($path) - 1, 1);
24
  if ($last_char != '/') {
27
  return $path;
28
  }
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
  /**
31
  * Return a string with the elapsed time
32
  *
33
+ * @see getMicrotime()
34
  *
35
  * @param mixed number $end The final time in the sequence to measure
36
  * @param mixed number $start The start time in the sequence to measure
37
  *
38
  * @return string The time elapsed from $start to $end
39
  */
40
+ public static function elapsedTime($end, $start)
41
  {
42
  return sprintf("%.4f sec.", abs($end - $start));
43
  }
50
  *
51
  * @return string Escaped string.
52
  */
53
+ public static function escapeHTML($string = '', $echo = false)
54
  {
55
  $output = htmlentities($string, ENT_QUOTES, 'UTF-8');
56
  if ($echo) {
68
  *
69
  * @return string A series of 256 spaces ' '
70
  */
71
+ public static function fcgiFlush()
72
  {
73
  echo(str_repeat(' ', 256));
74
  @flush();
77
  /**
78
  * Get current microtime as a float. Method is used for simple profiling
79
  *
80
+ * @see elapsedTime
81
  *
82
  * @return string A float in the form "msec sec", where sec is the number of seconds since the Unix epoch
83
  */
84
+ public static function getMicrotime()
85
  {
86
  return microtime(true);
87
  }
90
  * Returns the active plugins for the WordPress website in the package
91
  *
92
  * @param obj $dbh A database connection handle
93
+ *
94
  * @return array $list A list of active plugins
95
  */
96
+ public static function getActivePlugins($dbh)
97
  {
98
  $query = @mysqli_query($dbh, "SELECT option_value FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE option_name = 'active_plugins' ");
99
  if ($query) {
106
  return array();
107
  }
108
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
109
  /**
110
  * Check to see if the internet is accessable
111
  *
114
  * @param string $url A url e.g without prefix "ajax.googleapis.com"
115
  * @param string $port A valid port number
116
  *
117
+ * @return bool Returns true PHP can request the URL
118
  */
119
+ public static function isURLActive($url, $port, $timeout = 5)
120
  {
121
  if (function_exists('fsockopen')) {
122
  @ini_set("default_socket_timeout", 5);
138
  * @param string $string Any string blob
139
  *
140
  * @return bool Returns true if any non ascii character is found in the blob
 
141
  */
142
+ public static function isNonASCII($string)
143
  {
144
  return preg_match('/[^\x20-\x7f]/', $string);
145
  }
146
 
147
 
148
+ /**
149
+ * Is the string json
150
+ *
151
+ * @param string $string Any string blob
152
+ *
153
+ * @return bool Returns true if the string is json encoded
154
+ */
155
+ public static function isJSON($string)
156
+ {
157
+ return is_string($string) && is_array(json_decode($string, true)) ? true : false;
158
+ }
159
+
160
  /**
161
  * The characters that are special in the replacement value of preg_replace are not the
162
  * same characters that are special in the pattern. Allows for '$' to be safely passed.
163
  *
164
  * @param string $str The string to replace on
165
  */
166
+ public static function pregReplacementQuote($str)
167
  {
168
  return preg_replace('/(\$|\\\\)(?=\d)/', '\\\\\1', $str);
169
  }
175
  *
176
  * @return string Human readable bytes such as 50MB, 1GB
177
  */
178
+ public static function readableByteSize($size)
179
  {
180
  try {
181
  $units = array('B', 'KB', 'MB', 'GB', 'TB');
194
  *
195
  * @returns int The byte representation of the shortand $val
196
  */
197
+ public static function getBytes($val)
198
  {
199
  $val = trim($val);
200
  $last = strtolower($val[strlen($val) - 1]);
224
  *
225
  * @return string The orginal $path with a with all slashes facing '/'.
226
  */
227
+ public static function setSafePath($path)
228
  {
229
  return str_replace("\\", "/", $path);
230
  }
237
  *
238
  * @return array An array of strings from the $list array fround in the $haystack
239
  */
240
+ public static function getListValues($list, $haystack)
241
  {
242
  $found = array();
243
  foreach ($list as $var) {
256
  *
257
  * @return string The orginal $path with a with all slashes facing '\'.
258
  */
259
+ public static function unsetSafePath($path)
260
  {
261
  return str_replace("/", "\\", $path);
262
  }
263
 
 
264
  }
265
  ?>
installer/build/ctrls/ctrl.step1.php ADDED
@@ -0,0 +1,140 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ //POST PARAMS
4
+ $_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
5
+ $_POST['archive_manual'] = (isset($_POST['archive_manual']) && $_POST['archive_manual'] == '1') ? true : false;
6
+ $_POST['archive_filetime'] = (isset($_POST['archive_filetime'])) ? $_POST['archive_filetime'] : 'current';
7
+
8
+ //LOGGING
9
+ $POST_LOG = $_POST;
10
+ unset($POST_LOG['dbpass']);
11
+ ksort($POST_LOG);
12
+
13
+ //PAGE VARS
14
+ $php_max_time = @ini_get("max_execution_time");
15
+ $php_max_time = ($php_max_time == 0) ? "[0] time limit restriction disabled" : "[{$php_max_time}] time limit restriction enabled";
16
+ $root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
17
+ $package_path = "{$root_path}/{$_POST['archive_name']}";
18
+ $package_size = @filesize($package_path);
19
+ $ajax1_start = DUPX_U::getMicrotime();
20
+ $zip_support = class_exists('ZipArchive') ? 'Enabled' : 'Not Enabled';
21
+ $JSON = array();
22
+ $JSON['pass'] = 0;
23
+
24
+ /** JSON RESPONSE: Most sites have warnings turned off by default, but if they're turned on the warnings
25
+ cause errors in the JSON data Here we hide the status so warning level is reset at it at the end */
26
+ if (!headers_sent()) {
27
+ header('Content-Type: application/json');
28
+ }
29
+ $ajax1_error_level = error_reporting();
30
+ error_reporting(E_ERROR);
31
+
32
+ //===============================
33
+ //ERROR MESSAGES
34
+ //===============================
35
+ ($GLOBALS['LOG_FILE_HANDLE'] != false) or DUPX_Log::error(ERR_MAKELOG);
36
+
37
+ //ERR_ZIPMANUAL
38
+ if ($_POST['archive_manual']) {
39
+ if (!file_exists("wp-config.php") && !file_exists("database.sql")) {
40
+ DUPX_Log::error(ERR_ZIPMANUAL);
41
+ }
42
+ } else {
43
+ //ERR_CONFIG_FOUND
44
+ (!file_exists('wp-config.php'))
45
+ or DUPX_Log::error(ERR_CONFIG_FOUND);
46
+ //ERR_ZIPNOTFOUND
47
+ (is_readable("{$package_path}"))
48
+ or DUPX_Log::error(ERR_ZIPNOTFOUND);
49
+ }
50
+
51
+ DUPX_Log::info("********************************************************************************");
52
+ DUPX_Log::info('* DUPLICATOR-LITE: INSTALL-LOG');
53
+ DUPX_Log::info("* VERSION: {$GLOBALS['FW_DUPLICATOR_VERSION']}");
54
+ DUPX_Log::info('* STEP-1 START @ '.@date('h:i:s'));
55
+ DUPX_Log::info('* NOTICE: Do NOT post this data to public sites or forums');
56
+ DUPX_Log::info("********************************************************************************");
57
+ DUPX_Log::info("PHP VERSION:\t".phpversion().' | SAPI: '.php_sapi_name());
58
+ DUPX_Log::info("PHP TIME LIMIT:\t{$php_max_time}");
59
+ DUPX_Log::info("PHP MEMORY:\t".$GLOBALS['PHP_MEMORY_LIMIT'].' | SUHOSIN: '.$GLOBALS['PHP_SUHOSIN_ON']);
60
+ DUPX_Log::info("SERVER:\t\t{$_SERVER['SERVER_SOFTWARE']}");
61
+ DUPX_Log::info("DOC ROOT:\t{$root_path}");
62
+ DUPX_Log::info("DOC ROOT 755:\t".var_export($GLOBALS['CHOWN_ROOT_PATH'], true));
63
+ DUPX_Log::info("LOG FILE 644:\t".var_export($GLOBALS['CHOWN_LOG_PATH'], true));
64
+ DUPX_Log::info("REQUEST URL:\t{$GLOBALS['URL_PATH']}");
65
+
66
+ $log = "--------------------------------------\n";
67
+ $log .= "POST DATA\n";
68
+ $log .= "--------------------------------------\n";
69
+ $log .= print_r($POST_LOG, true);
70
+ DUPX_Log::info($log, 2);
71
+
72
+ $log = "--------------------------------------\n";
73
+ $log .= "ARCHIVE EXTRACTION\n";
74
+ $log .= "--------------------------------------\n";
75
+ $log .= "NAME:\t{$_POST['archive_name']}\n";
76
+ $log .= "SIZE:\t".DUPX_U::readableByteSize(@filesize($_POST['archive_name']))."\n";
77
+ $log .= "ZIP:\t{$zip_support} (ZipArchive Support)";
78
+ DUPX_Log::info($log);
79
+
80
+
81
+ if ($_POST['archive_manual']) {
82
+ DUPX_Log::info("\n** PACKAGE EXTRACTION IS IN MANUAL MODE ** \n");
83
+ } else {
84
+ if ($GLOBALS['FW_PACKAGE_NAME'] != $_POST['archive_name']) {
85
+ $log = "\n--------------------------------------\n";
86
+ $log .= "WARNING: This package set may be incompatible! \nBelow is a summary of the package this installer was built with and the package used. \n";
87
+ $log .= "To guarantee accuracy the installer and archive should match. For details see the online FAQs.";
88
+ $log .= "\nCREATED WITH:\t{$GLOBALS['FW_PACKAGE_NAME']} \nPROCESSED WITH:\t{$_POST['archive_name']} \n";
89
+ $log .= "--------------------------------------\n";
90
+ DUPX_Log::info($log);
91
+ }
92
+
93
+ if (!class_exists('ZipArchive')) {
94
+ DUPX_Log::info("ERROR: Stopping install process. Trying to extract without ZipArchive module installed. Please use the 'Manual Package extraction' mode to extract zip file.");
95
+ DUPX_Log::error(ERR_ZIPARCHIVE);
96
+ }
97
+
98
+ $target = $root_path;
99
+ $zip = new ZipArchive();
100
+ if ($zip->open($_POST['archive_name']) === TRUE) {
101
+
102
+ DUPX_Log::info("\n>>> START EXTRACTION:");
103
+ if (!$zip->extractTo($target)) {
104
+ DUPX_Log::error(ERR_ZIPEXTRACTION);
105
+ }
106
+ $log = print_r($zip, true);
107
+
108
+ //Keep original timestamp on the file
109
+ if ($_POST['archive_filetime'] == 'original') {
110
+ $log .= "File timestamp is 'Original' mode.\n";
111
+ for ($idx = 0; $s = $zip->statIndex($idx); $idx++) {
112
+ touch($target.DIRECTORY_SEPARATOR.$s['name'], $s['mtime']);
113
+ }
114
+ } else {
115
+ $now = date("Y-m-d H:i:s");
116
+ $log .= "File timestamp is 'Current' mode: {$now}\n";
117
+ }
118
+
119
+ $close_response = $zip->close();
120
+ $log .= "<<< EXTRACTION COMPLETE: " . var_export($close_response, true);
121
+ DUPX_Log::info($log);
122
+ } else {
123
+ DUPX_Log::error(ERR_ZIPOPEN);
124
+ }
125
+ }
126
+
127
+ //CONFIG FILE RESETS
128
+ DUPX_ServerConfig::reset();
129
+
130
+ //FINAL RESULTS
131
+ $ajax1_end = DUPX_U::getMicrotime();
132
+ $ajax1_sum = DUPX_U::elapsedTime($ajax1_end, $ajax1_start);
133
+ DUPX_Log::info("\nSTEP-1 COMPLETE @ " . @date('h:i:s') . " - RUNTIME: {$ajax1_sum}");
134
+
135
+
136
+ $JSON['pass'] = 1;
137
+ echo json_encode($JSON);
138
+ error_reporting($ajax1_error_level);
139
+ die('');
140
+ ?>
installer/build/{ajax.step1.php → ctrls/ctrl.step2.php} RENAMED
@@ -1,12 +1,4 @@
1
  <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
-
10
  //POST PARAMS
11
  $_POST['dbaction'] = isset($_POST['dbaction']) ? $_POST['dbaction'] : 'create';
12
  $_POST['dbnbsp'] = (isset($_POST['dbnbsp']) && $_POST['dbnbsp'] == '1') ? true : false;
@@ -14,9 +6,7 @@ $_POST['ssl_admin'] = (isset($_POST['ssl_admin'])) ? true : false;
14
  $_POST['ssl_login'] = (isset($_POST['ssl_login'])) ? true : false;
15
  $_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
16
  $_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
17
- $_POST['package_name'] = isset($_POST['package_name']) ? $_POST['package_name'] : null;
18
- $_POST['zip_manual'] = (isset($_POST['zip_manual']) && $_POST['zip_manual'] == '1') ? true : false;
19
- $_POST['zip_filetime'] = (isset($_POST['zip_filetime'])) ? $_POST['zip_filetime'] : 'current';
20
 
21
  //LOGGING
22
  $POST_LOG = $_POST;
@@ -24,15 +14,13 @@ unset($POST_LOG['dbpass']);
24
  ksort($POST_LOG);
25
 
26
  //PAGE VARS
27
- $root_path = DUPX_Util::set_safe_path($GLOBALS['CURRENT_ROOT_PATH']);
28
- $package_path = "{$root_path}/{$_POST['package_name']}";
29
- $package_size = @filesize($package_path);
30
- $ajax1_start = DUPX_Util::get_microtime();
31
- $zip_support = class_exists('ZipArchive') ? 'Enabled' : 'Not Enabled';
32
  $JSON = array();
33
  $JSON['pass'] = 0;
34
 
35
- /* JSON RESPONSE: Most sites have warnings turned off by default, but if they're turned on the warnings
36
  cause errors in the JSON data Here we hide the status so warning level is reset at it at the end*/
37
  $ajax1_error_level = error_reporting();
38
  error_reporting(E_ERROR);
@@ -40,7 +28,7 @@ error_reporting(E_ERROR);
40
  //====================================================================================================
41
  //DATABASE TEST CONNECTION
42
  //====================================================================================================
43
- if (isset($_GET['dbtest']))
44
  {
45
  $html = "";
46
  $baseport = parse_url($_POST['dbhost'], PHP_URL_PORT);
@@ -50,8 +38,8 @@ if (isset($_GET['dbtest']))
50
  $dbFound = mysqli_select_db($dbConn, $_POST['dbname']);
51
  $port_view = (is_int($baseport) || substr($_POST['dbhost'], -1) == ":") ? "Port=[Set in Host]" : "Port={$_POST['dbport']}";
52
 
53
- $tstSrv = ($dbConn) ? "<div class='dup-pass'>Success</div>" : "<div class='dup-fail'>Fail</div>";
54
- $tstDB = ($dbFound) ? "<div class='dup-pass'>Success</div>" : "<div class='dup-fail'>Fail</div>";
55
 
56
  $dbversion_info = DUPX_DB::getServerInfo($dbConn);
57
  $dbversion_info = empty($dbversion_info) ? 'no connection' : $dbversion_info;
@@ -62,20 +50,20 @@ if (isset($_GET['dbtest']))
62
  $dbversion_compat_fail = version_compare($dbversion_compat, $GLOBALS['FW_VERSION_DB']) < 0;
63
 
64
  $tstInfo = ($dbversion_info_fail)
65
- ? "<div class='dup-notice'>{$dbversion_info}</div>"
66
- : "<div class='dup-pass'>{$dbversion_info}</div>";
67
 
68
  $tstCompat = ($dbversion_compat_fail)
69
- ? "<div class='dup-notice'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>"
70
- : "<div class='dup-pass'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>";
71
 
72
  $html .= <<<DATA
73
- <div class='dup-db-test'>
74
  <small>
75
  Using Connection String:<br/>
76
  Host={$_POST['dbhost']}; Database={$_POST['dbname']}; Uid={$_POST['dbuser']}; Pwd={$_POST['dbpass']}; {$port_view}
77
  </small>
78
- <table class='dup-db-test-dtls'>
79
  <tr>
80
  <td>Host:</td>
81
  <td>{$tstSrv}</td>
@@ -83,7 +71,7 @@ if (isset($_GET['dbtest']))
83
  <tr>
84
  <td>Database:</td>
85
  <td>{$tstDB}</td>
86
- </tr>
87
  <tr>
88
  <td>Version:</td>
89
  <td>{$tstInfo}</td>
@@ -94,33 +82,33 @@ if (isset($_GET['dbtest']))
94
  </tr>
95
  </table>
96
  DATA;
97
-
98
  //--------------------------------
99
  //WARNING: DB has tables with create option
100
  if ($_POST['dbaction'] == 'create')
101
  {
102
  $tblcount = DUPX_DB::countTables($dbConn, $_POST['dbname']);
103
- $html .= ($tblcount > 0)
104
  ? "<div class='warn-msg'><b>WARNING:</b> " . sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount) . "</div>"
105
  : '';
106
- }
107
 
108
  //WARNNG: Input has utf8
109
  $dbConnItems = array($_POST['dbhost'], $_POST['dbuser'], $_POST['dbname'],$_POST['dbpass']);
110
  $dbUTF8_tst = false;
111
  foreach ($dbConnItems as $value)
112
  {
113
- if (DUPX_Util::is_non_ascii($value)) {
114
  $dbUTF8_tst = true;
115
  break;
116
  }
117
  }
118
 
119
  //WARNING: UTF8 Data in Connection String
120
- $html .= (! $dbConn && $dbUTF8_tst)
121
- ? "<div class='warn-msg'><b>WARNING:</b> " . ERR_TESTDB_UTF8 . "</div>"
122
  : '';
123
-
124
  //NOTICE: Version Too Low
125
  $html .= ($dbversion_info_fail)
126
  ? "<div class='warn-msg'><b>NOTICE:</b> " . ERR_TESTDB_VERSION_INFO . "</div>"
@@ -159,34 +147,14 @@ if ($_POST['dbaction'] == 'create' ) {
159
  }
160
  }
161
 
162
- //ERR_ZIPMANUAL
163
- if ($_POST['zip_manual']) {
164
- if (!file_exists("wp-config.php") && !file_exists("database.sql")) {
165
- DUPX_Log::error(ERR_ZIPMANUAL);
166
- }
167
- } else {
168
- //ERR_CONFIG_FOUND
169
- (!file_exists('wp-config.php'))
170
- or DUPX_Log::error(ERR_CONFIG_FOUND);
171
- //ERR_ZIPNOTFOUND
172
- (is_readable("{$package_path}"))
173
- or DUPX_Log::error(ERR_ZIPNOTFOUND);
174
- }
175
-
176
- DUPX_Log::info("********************************************************************************");
177
- DUPX_Log::info('DUPLICATOR-LITE INSTALL-LOG');
178
- DUPX_Log::info('STEP1 START @ ' . @date('h:i:s'));
179
- DUPX_Log::info('NOTICE: Do NOT post to public sites or forums');
180
- DUPX_Log::info("********************************************************************************");
181
- DUPX_Log::info("VERSION:\t{$GLOBALS['FW_DUPLICATOR_VERSION']}");
182
- DUPX_Log::info("PHP:\t\t" . phpversion() . ' | SAPI: ' . php_sapi_name());
183
- DUPX_Log::info("PHP MEMORY:\t" . $GLOBALS['PHP_MEMORY_LIMIT'] . ' | SUHOSIN: ' . $GLOBALS['PHP_SUHOSIN_ON'] );
184
- DUPX_Log::info("SERVER:\t\t{$_SERVER['SERVER_SOFTWARE']}");
185
- DUPX_Log::info("DOC ROOT:\t{$root_path}");
186
- DUPX_Log::info("DOC ROOT 755:\t" . var_export($GLOBALS['CHOWN_ROOT_PATH'], true));
187
- DUPX_Log::info("LOG FILE 644:\t" . var_export($GLOBALS['CHOWN_LOG_PATH'], true));
188
- DUPX_Log::info("BUILD NAME:\t{$GLOBALS['FW_SECURE_NAME']}");
189
- DUPX_Log::info("REQUEST URL:\t{$GLOBALS['URL_PATH']}");
190
 
191
  $log = "--------------------------------------\n";
192
  $log .= "POST DATA\n";
@@ -195,93 +163,21 @@ $log .= print_r($POST_LOG, true);
195
  DUPX_Log::info($log, 2);
196
 
197
 
198
- //====================================================================================================
199
- //UNZIP & FILE SETUP - Extract the zip file and prep files
200
- //====================================================================================================
201
- $log = "\n********************************************************************************\n";
202
- $log .= "ARCHIVE SETUP\n";
203
- $log .= "********************************************************************************\n";
204
- $log .= "NAME:\t{$_POST['package_name']}\n";
205
- $log .= "SIZE:\t" . DUPX_Util::readable_bytesize(@filesize($_POST['package_name'])) . "\n";
206
- $log .= "ZIP:\t{$zip_support} (ZipArchive Support)";
207
- DUPX_Log::info($log);
208
-
209
- $zip_start = DUPX_Util::get_microtime();
210
-
211
- if ($_POST['zip_manual'])
212
- {
213
- DUPX_Log::info("\n** PACKAGE EXTRACTION IS IN MANUAL MODE ** \n");
214
- }
215
- else
216
- {
217
- if ($GLOBALS['FW_PACKAGE_NAME'] != $_POST['package_name']) {
218
- $log = "\n--------------------------------------\n";
219
- $log .= "WARNING: This package set may be incompatible! \nBelow is a summary of the package this installer was built with and the package used. \n";
220
- $log .= "To guarantee accuracy the installer and archive should match. For details see the online FAQs.";
221
- $log .= "\nCREATED WITH:\t{$GLOBALS['FW_PACKAGE_NAME']} \nPROCESSED WITH:\t{$_POST['package_name']} \n";
222
- $log .= "--------------------------------------\n";
223
- DUPX_Log::info($log);
224
- }
225
-
226
- if (! class_exists('ZipArchive')) {
227
- DUPX_Log::info("ERROR: Stopping install process. Trying to extract without ZipArchive module installed. Please use the 'Manual Package extraction' mode to extract zip file.");
228
- DUPX_Log::error(ERR_ZIPARCHIVE);
229
- }
230
-
231
- $target = $root_path;
232
- $zip = new ZipArchive();
233
- if ($zip->open($_POST['package_name']) === TRUE)
234
- {
235
- DUPX_Log::info("\nEXTRACTING");
236
- if (! $zip->extractTo($target)) {
237
- DUPX_Log::error(ERR_ZIPEXTRACTION);
238
- }
239
- $log = print_r($zip, true);
240
-
241
- //Keep original timestamp on the file
242
- if ($_POST['zip_filetime'] == 'original')
243
- {
244
- $log .= "File timestamp set to Original\n";
245
- for ($idx = 0; $s = $zip->statIndex($idx); $idx++) {
246
- touch( $target . DIRECTORY_SEPARATOR . $s['name'], $s['mtime'] );
247
- }
248
- }
249
- else
250
- {
251
- $now = date("Y-m-d H:i:s");
252
- $log .= "File timestamp set to Current: {$now}\n";
253
- }
254
-
255
- $close_response = $zip->close();
256
- $log .= "COMPLETE: " . var_export($close_response, true);
257
- DUPX_Log::info($log);
258
- } else {
259
- DUPX_Log::error(ERR_ZIPOPEN);
260
- }
261
- $zip = null;
262
- }
263
-
264
-
265
- //CONFIG FILE RESETS
266
- $log = '';
267
- DUPX_WPConfig::UpdateStep1();
268
- DUPX_ServerConfig::reset();
269
-
270
-
271
  //====================================================================================================
272
  //DATABASE ROUTINES
273
  //====================================================================================================
 
274
  $faq_url = $GLOBALS['FAQ_URL'];
275
  $db_file_size = filesize('database.sql');
276
  $php_mem = $GLOBALS['PHP_MEMORY_LIMIT'];
277
- $php_mem_range = DUPX_Util::return_bytes($GLOBALS['PHP_MEMORY_LIMIT']);
278
  $php_mem_range = $php_mem_range == null ? 0 : $php_mem_range - 5000000; //5 MB Buffer
279
 
280
- //Fatal Memory errors from file_get_contents is not catchable.
281
  //Try to warn ahead of time with a buffer in memory difference
282
- if ($db_file_size >= $php_mem_range && $php_mem_range != 0)
283
  {
284
- $db_file_size = DUPX_Util::readable_bytesize($db_file_size);
285
  $msg = "\nWARNING: The database script is '{$db_file_size}' in size. The PHP memory allocation is set\n";
286
  $msg .= "at '{$php_mem}'. There is a high possibility that the installer script will fail with\n";
287
  $msg .= "a memory allocation error when trying to load the database.sql file. It is\n";
@@ -294,7 +190,7 @@ if ($db_file_size >= $php_mem_range && $php_mem_range != 0)
294
  $sql_file = file_get_contents('database.sql', true);
295
 
296
  //ERROR: Reading database.sql file
297
- if ($sql_file === FALSE || strlen($sql_file) < 10)
298
  {
299
  $msg = "<b>Unable to read the database.sql file from the archive. Please check these items:</b> <br/>";
300
  $msg .= "1. Validate permissions and/or group-owner rights on these items: <br/>";
@@ -307,7 +203,7 @@ if ($sql_file === FALSE || strlen($sql_file) < 10)
307
 
308
  //Removes invalid space characters
309
  //Complex Subject See: http://webcollab.sourceforge.net/unicode.html
310
- if ($_POST['dbnbsp'])
311
  {
312
  DUPX_Log::info("NOTICE: Ran fix non-breaking space characters\n");
313
  $sql_file = preg_replace('/\xC2\xA0/', ' ', $sql_file);
@@ -321,21 +217,15 @@ $sql_result_file_path = "{$root_path}/{$GLOBALS['SQL_FILE_NAME']}";
321
  $sql_file = null;
322
 
323
  //WARNING: Create installer-data.sql failed
324
- if ($sql_file_copy_status === FALSE || filesize($sql_result_file_path) == 0 || !is_readable($sql_result_file_path))
325
  {
326
- $sql_file_size = DUPX_Util::readable_bytesize(filesize('database.sql'));
327
  $msg = "\nWARNING: Unable to properly copy database.sql ({$sql_file_size}) to {$GLOBALS['SQL_FILE_NAME']}. Please check these items:\n";
328
  $msg .= "- Validate permissions and/or group-owner rights on database.sql and directory [{$root_path}] \n";
329
  $msg .= "- see: {$faq_url}#faq-trouble-055-q \n";
330
  DUPX_Log::info($msg);
331
  }
332
 
333
- DUPX_Log::info("\nUPDATED FILES:");
334
- DUPX_Log::info("- SQL FILE: '{$sql_result_file_path}'");
335
- DUPX_Log::info("- WP-CONFIG: '{$root_path}/wp-config.php' (if present)");
336
- DUPX_Log::info("\nARCHIVE RUNTIME: " . DUPX_Util::elapsed_time(DUPX_Util::get_microtime(), $zip_start) . "\n");
337
- DUPX_Util::fcgi_flush();
338
-
339
  //=================================
340
  //START DB RUN
341
  @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
@@ -352,7 +242,7 @@ switch ($_POST['dbmysqlmode']) {
352
  case 'CUSTOM':
353
  $dbmysqlmode_opts = $_POST['dbmysqlmode_opts'];
354
  $qry_session_custom = @mysqli_query($dbh, "SET SESSION sql_mode = '{$dbmysqlmode_opts}'");
355
- if ($qry_session_custom == false)
356
  {
357
  $sql_error = mysqli_error($dbh);
358
  $log = "WARNING: A custom sql_mode setting issue has been detected:\n{$sql_error}.\n";
@@ -369,23 +259,21 @@ $dbvar_maxtime = is_null($dbvar_maxtime) ? 300 : $dbvar_maxtime;
369
  $dbvar_maxpacks = is_null($dbvar_maxpacks) ? 1048576 : $dbvar_maxpacks;
370
  $dbvar_sqlmode = empty($dbvar_sqlmode) ? 'NOT_SET' : $dbvar_sqlmode;
371
  $dbvar_version = DUPX_DB::getVersion($dbh);
372
- $sql_file_size1 = DUPX_Util::readable_bytesize(@filesize("database.sql"));
373
- $sql_file_size2 = DUPX_Util::readable_bytesize(@filesize("{$GLOBALS['SQL_FILE_NAME']}"));
374
 
375
 
376
- DUPX_Log::info("{$GLOBALS['SEPERATOR1']}");
377
- DUPX_Log::info('DATABASE-ROUTINES');
378
- DUPX_Log::info("{$GLOBALS['SEPERATOR1']}");
379
  DUPX_Log::info("--------------------------------------");
380
- DUPX_Log::info("SERVER ENVIRONMENT");
381
  DUPX_Log::info("--------------------------------------");
382
  DUPX_Log::info("MYSQL VERSION:\tThis Server: {$dbvar_version} -- Build Server: {$GLOBALS['FW_VERSION_DB']}");
383
  DUPX_Log::info("FILE SIZE:\tdatabase.sql ({$sql_file_size1}) - installer-data.sql ({$sql_file_size2})");
384
  DUPX_Log::info("TIMEOUT:\t{$dbvar_maxtime}");
385
  DUPX_Log::info("MAXPACK:\t{$dbvar_maxpacks}");
386
  DUPX_Log::info("SQLMODE:\t{$dbvar_sqlmode}");
 
387
 
388
- if ($qry_session_custom == false)
389
  {
390
  DUPX_Log::info("\n{$log}\n");
391
  }
@@ -414,7 +302,7 @@ switch ($_POST['dbaction']) {
414
  }
415
  }
416
  }
417
- $drop_log = 'removed (' . count($found_tables) . ') tables';
418
  }
419
  break;
420
  }
@@ -424,7 +312,7 @@ switch ($_POST['dbaction']) {
424
  DUPX_Log::info("--------------------------------------");
425
  DUPX_Log::info("DATABASE RESULTS");
426
  DUPX_Log::info("--------------------------------------");
427
- $profile_start = DUPX_Util::get_microtime();
428
  $fcgi_buffer_pool = 5000;
429
  $fcgi_buffer_count = 0;
430
  $dbquery_rows = 0;
@@ -432,15 +320,21 @@ $dbtable_rows = 1;
432
  $dbquery_errs = 0;
433
  $counter = 0;
434
  @mysqli_autocommit($dbh, false);
 
435
  while ($counter < $sql_result_file_length) {
436
 
437
  $query_strlen = strlen(trim($sql_result_file_data[$counter]));
 
438
  if ($dbvar_maxpacks < $query_strlen) {
 
439
  DUPX_Log::info("**ERROR** Query size limit [length={$query_strlen}] [sql=" . substr($sql_result_file_data[$counter], 75) . "...]");
440
  $dbquery_errs++;
 
441
  } elseif ($query_strlen > 0) {
 
442
  @mysqli_free_result(@mysqli_query($dbh, ($sql_result_file_data[$counter])));
443
  $err = mysqli_error($dbh);
 
444
  //Check to make sure the connection is alive
445
  if (!empty($err)) {
446
 
@@ -456,9 +350,9 @@ while ($counter < $sql_result_file_length) {
456
 
457
  //Buffer data to browser to keep connection open
458
  } else {
459
- if ($fcgi_buffer_count++ > $fcgi_buffer_pool) {
460
  $fcgi_buffer_count = 0;
461
- DUPX_Util::fcgi_flush();
462
  }
463
  $dbquery_rows++;
464
  }
@@ -469,7 +363,7 @@ while ($counter < $sql_result_file_length) {
469
  @mysqli_autocommit($dbh, true);
470
 
471
  DUPX_Log::info("ERRORS FOUND:\t{$dbquery_errs}");
472
- DUPX_Log::info("DROP TABLE:\t{$drop_log}");
473
  DUPX_Log::info("QUERIES RAN:\t{$dbquery_rows}\n");
474
 
475
  $dbtable_count = 0;
@@ -484,7 +378,7 @@ if ($result = mysqli_query($dbh, "SHOW TABLES")) {
484
  }
485
 
486
  if ($dbtable_count == 0) {
487
- DUPX_Log::error("No tables where created during step 1 of the install. Please review the <a href='installer-log.txt' target='_blank'>installer-log.txt</a> file for
488
  ERROR messages. You may have to manually run the installer-data.sql with a tool like phpmyadmin to validate the data input. If you have enabled compatibility mode
489
  during the package creation process then the database server version your using may not be compatible with this script.\n");
490
  }
@@ -498,7 +392,7 @@ $dbdelete_count1 = @mysqli_affected_rows($dbh) or 0;
498
  @mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` LIKE ('_transient%') OR `option_name` LIKE ('_site_transient%')");
499
  $dbdelete_count2 = @mysqli_affected_rows($dbh) or 0;
500
  $dbdelete_count = (abs($dbdelete_count1) + abs($dbdelete_count2));
501
- DUPX_Log::info("Removed '{$dbdelete_count}' cache/transient rows");
502
  //Reset Duplicator Options
503
  foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
504
  mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` = '{$value}'");
@@ -506,15 +400,12 @@ foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
506
 
507
  @mysqli_close($dbh);
508
 
509
- $profile_end = DUPX_Util::get_microtime();
510
- DUPX_Log::info("\nSECTION RUNTIME: " . DUPX_Util::elapsed_time($profile_end, $profile_start));
511
-
512
  //FINAL RESULTS
513
- $ajax1_end = DUPX_Util::get_microtime();
514
- $ajax1_sum = DUPX_Util::elapsed_time($ajax1_end, $ajax1_start);
515
- DUPX_Log::info("\n{$GLOBALS['SEPERATOR1']}");
516
- DUPX_Log::info('STEP1 COMPLETE @ ' . @date('h:i:s') . " - TOTAL RUNTIME: {$ajax1_sum}");
517
- DUPX_Log::info("{$GLOBALS['SEPERATOR1']}");
518
 
519
  $JSON['pass'] = 1;
520
  $JSON['table_count'] = $dbtable_count;
1
  <?php
 
 
 
 
 
 
 
 
2
  //POST PARAMS
3
  $_POST['dbaction'] = isset($_POST['dbaction']) ? $_POST['dbaction'] : 'create';
4
  $_POST['dbnbsp'] = (isset($_POST['dbnbsp']) && $_POST['dbnbsp'] == '1') ? true : false;
6
  $_POST['ssl_login'] = (isset($_POST['ssl_login'])) ? true : false;
7
  $_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
8
  $_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
9
+ $_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
 
 
10
 
11
  //LOGGING
12
  $POST_LOG = $_POST;
14
  ksort($POST_LOG);
15
 
16
  //PAGE VARS
17
+ $date_time = @date('h:i:s');
18
+ $root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
19
+ $ajax2_start = DUPX_U::getMicrotime();
 
 
20
  $JSON = array();
21
  $JSON['pass'] = 0;
22
 
23
+ /** JSON RESPONSE: Most sites have warnings turned off by default, but if they're turned on the warnings
24
  cause errors in the JSON data Here we hide the status so warning level is reset at it at the end*/
25
  $ajax1_error_level = error_reporting();
26
  error_reporting(E_ERROR);
28
  //====================================================================================================
29
  //DATABASE TEST CONNECTION
30
  //====================================================================================================
31
+ if (isset($_GET['dbtest']))
32
  {
33
  $html = "";
34
  $baseport = parse_url($_POST['dbhost'], PHP_URL_PORT);
38
  $dbFound = mysqli_select_db($dbConn, $_POST['dbname']);
39
  $port_view = (is_int($baseport) || substr($_POST['dbhost'], -1) == ":") ? "Port=[Set in Host]" : "Port={$_POST['dbport']}";
40
 
41
+ $tstSrv = ($dbConn) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
42
+ $tstDB = ($dbFound) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
43
 
44
  $dbversion_info = DUPX_DB::getServerInfo($dbConn);
45
  $dbversion_info = empty($dbversion_info) ? 'no connection' : $dbversion_info;
50
  $dbversion_compat_fail = version_compare($dbversion_compat, $GLOBALS['FW_VERSION_DB']) < 0;
51
 
52
  $tstInfo = ($dbversion_info_fail)
53
+ ? "<div class='dupx-notice'>{$dbversion_info}</div>"
54
+ : "<div class='dupx-pass'>{$dbversion_info}</div>";
55
 
56
  $tstCompat = ($dbversion_compat_fail)
57
+ ? "<div class='dupx-notice'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>"
58
+ : "<div class='dupx-pass'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>";
59
 
60
  $html .= <<<DATA
61
+ <div class='s2-db-test'>
62
  <small>
63
  Using Connection String:<br/>
64
  Host={$_POST['dbhost']}; Database={$_POST['dbname']}; Uid={$_POST['dbuser']}; Pwd={$_POST['dbpass']}; {$port_view}
65
  </small>
66
+ <table class='s2-db-test-dtls'>
67
  <tr>
68
  <td>Host:</td>
69
  <td>{$tstSrv}</td>
71
  <tr>
72
  <td>Database:</td>
73
  <td>{$tstDB}</td>
74
+ </tr>
75
  <tr>
76
  <td>Version:</td>
77
  <td>{$tstInfo}</td>
82
  </tr>
83
  </table>
84
  DATA;
85
+
86
  //--------------------------------
87
  //WARNING: DB has tables with create option
88
  if ($_POST['dbaction'] == 'create')
89
  {
90
  $tblcount = DUPX_DB::countTables($dbConn, $_POST['dbname']);
91
+ $html .= ($tblcount > 0)
92
  ? "<div class='warn-msg'><b>WARNING:</b> " . sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount) . "</div>"
93
  : '';
94
+ }
95
 
96
  //WARNNG: Input has utf8
97
  $dbConnItems = array($_POST['dbhost'], $_POST['dbuser'], $_POST['dbname'],$_POST['dbpass']);
98
  $dbUTF8_tst = false;
99
  foreach ($dbConnItems as $value)
100
  {
101
+ if (DUPX_U::isNonASCII($value)) {
102
  $dbUTF8_tst = true;
103
  break;
104
  }
105
  }
106
 
107
  //WARNING: UTF8 Data in Connection String
108
+ $html .= (! $dbConn && $dbUTF8_tst)
109
+ ? "<div class='warn-msg'><b>WARNING:</b> " . ERR_TESTDB_UTF8 . "</div>"
110
  : '';
111
+
112
  //NOTICE: Version Too Low
113
  $html .= ($dbversion_info_fail)
114
  ? "<div class='warn-msg'><b>NOTICE:</b> " . ERR_TESTDB_VERSION_INFO . "</div>"
147
  }
148
  }
149
 
150
+ $log = <<<LOG
151
+ \n\n********************************************************************************
152
+ * DUPLICATOR-LITE: INSTALL-LOG
153
+ * STEP-2 START @ {$date_time}
154
+ * NOTICE: Do NOT post to public sites or forums
155
+ ********************************************************************************
156
+ LOG;
157
+ DUPX_Log::info($log);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
 
159
  $log = "--------------------------------------\n";
160
  $log .= "POST DATA\n";
163
  DUPX_Log::info($log, 2);
164
 
165
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
166
  //====================================================================================================
167
  //DATABASE ROUTINES
168
  //====================================================================================================
169
+ $log = '';
170
  $faq_url = $GLOBALS['FAQ_URL'];
171
  $db_file_size = filesize('database.sql');
172
  $php_mem = $GLOBALS['PHP_MEMORY_LIMIT'];
173
+ $php_mem_range = DUPX_U::getBytes($GLOBALS['PHP_MEMORY_LIMIT']);
174
  $php_mem_range = $php_mem_range == null ? 0 : $php_mem_range - 5000000; //5 MB Buffer
175
 
176
+ //Fatal Memory errors from file_get_contents is not catchable.
177
  //Try to warn ahead of time with a buffer in memory difference
178
+ if ($db_file_size >= $php_mem_range && $php_mem_range != 0)
179
  {
180
+ $db_file_size = DUPX_U::readableByteSize($db_file_size);
181
  $msg = "\nWARNING: The database script is '{$db_file_size}' in size. The PHP memory allocation is set\n";
182
  $msg .= "at '{$php_mem}'. There is a high possibility that the installer script will fail with\n";
183
  $msg .= "a memory allocation error when trying to load the database.sql file. It is\n";
190
  $sql_file = file_get_contents('database.sql', true);
191
 
192
  //ERROR: Reading database.sql file
193
+ if ($sql_file === FALSE || strlen($sql_file) < 10)
194
  {
195
  $msg = "<b>Unable to read the database.sql file from the archive. Please check these items:</b> <br/>";
196
  $msg .= "1. Validate permissions and/or group-owner rights on these items: <br/>";
203
 
204
  //Removes invalid space characters
205
  //Complex Subject See: http://webcollab.sourceforge.net/unicode.html
206
+ if ($_POST['dbnbsp'])
207
  {
208
  DUPX_Log::info("NOTICE: Ran fix non-breaking space characters\n");
209
  $sql_file = preg_replace('/\xC2\xA0/', ' ', $sql_file);
217
  $sql_file = null;
218
 
219
  //WARNING: Create installer-data.sql failed
220
+ if ($sql_file_copy_status === FALSE || filesize($sql_result_file_path) == 0 || !is_readable($sql_result_file_path))
221
  {
222
+ $sql_file_size = DUPX_U::readableByteSize(filesize('database.sql'));
223
  $msg = "\nWARNING: Unable to properly copy database.sql ({$sql_file_size}) to {$GLOBALS['SQL_FILE_NAME']}. Please check these items:\n";
224
  $msg .= "- Validate permissions and/or group-owner rights on database.sql and directory [{$root_path}] \n";
225
  $msg .= "- see: {$faq_url}#faq-trouble-055-q \n";
226
  DUPX_Log::info($msg);
227
  }
228
 
 
 
 
 
 
 
229
  //=================================
230
  //START DB RUN
231
  @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
242
  case 'CUSTOM':
243
  $dbmysqlmode_opts = $_POST['dbmysqlmode_opts'];
244
  $qry_session_custom = @mysqli_query($dbh, "SET SESSION sql_mode = '{$dbmysqlmode_opts}'");
245
+ if ($qry_session_custom == false)
246
  {
247
  $sql_error = mysqli_error($dbh);
248
  $log = "WARNING: A custom sql_mode setting issue has been detected:\n{$sql_error}.\n";
259
  $dbvar_maxpacks = is_null($dbvar_maxpacks) ? 1048576 : $dbvar_maxpacks;
260
  $dbvar_sqlmode = empty($dbvar_sqlmode) ? 'NOT_SET' : $dbvar_sqlmode;
261
  $dbvar_version = DUPX_DB::getVersion($dbh);
262
+ $sql_file_size1 = DUPX_U::readableByteSize(@filesize("database.sql"));
263
+ $sql_file_size2 = DUPX_U::readableByteSize(@filesize("{$GLOBALS['SQL_FILE_NAME']}"));
264
 
265
 
 
 
 
266
  DUPX_Log::info("--------------------------------------");
267
+ DUPX_Log::info("DATABASE ENVIRONMENT");
268
  DUPX_Log::info("--------------------------------------");
269
  DUPX_Log::info("MYSQL VERSION:\tThis Server: {$dbvar_version} -- Build Server: {$GLOBALS['FW_VERSION_DB']}");
270
  DUPX_Log::info("FILE SIZE:\tdatabase.sql ({$sql_file_size1}) - installer-data.sql ({$sql_file_size2})");
271
  DUPX_Log::info("TIMEOUT:\t{$dbvar_maxtime}");
272
  DUPX_Log::info("MAXPACK:\t{$dbvar_maxpacks}");
273
  DUPX_Log::info("SQLMODE:\t{$dbvar_sqlmode}");
274
+ DUPX_Log::info("NEW SQL FILE:\t[{$sql_result_file_path}]");
275
 
276
+ if ($qry_session_custom == false)
277
  {
278
  DUPX_Log::info("\n{$log}\n");
279
  }
302
  }
303
  }
304
  }
305
+ $drop_log = count($found_tables);
306
  }
307
  break;
308
  }
312
  DUPX_Log::info("--------------------------------------");
313
  DUPX_Log::info("DATABASE RESULTS");
314
  DUPX_Log::info("--------------------------------------");
315
+ $profile_start = DUPX_U::getMicrotime();
316
  $fcgi_buffer_pool = 5000;
317
  $fcgi_buffer_count = 0;
318
  $dbquery_rows = 0;
320
  $dbquery_errs = 0;
321
  $counter = 0;
322
  @mysqli_autocommit($dbh, false);
323
+
324
  while ($counter < $sql_result_file_length) {
325
 
326
  $query_strlen = strlen(trim($sql_result_file_data[$counter]));
327
+
328
  if ($dbvar_maxpacks < $query_strlen) {
329
+
330
  DUPX_Log::info("**ERROR** Query size limit [length={$query_strlen}] [sql=" . substr($sql_result_file_data[$counter], 75) . "...]");
331
  $dbquery_errs++;
332
+
333
  } elseif ($query_strlen > 0) {
334
+
335
  @mysqli_free_result(@mysqli_query($dbh, ($sql_result_file_data[$counter])));
336
  $err = mysqli_error($dbh);
337
+
338
  //Check to make sure the connection is alive
339
  if (!empty($err)) {
340
 
350
 
351
  //Buffer data to browser to keep connection open
352
  } else {
353
+ if ($GLOBALS['DB_FCGI_FLUSH'] && $fcgi_buffer_count++ > $fcgi_buffer_pool) {
354
  $fcgi_buffer_count = 0;
355
+ DUPX_U::fcgiFlush();
356
  }
357
  $dbquery_rows++;
358
  }
363
  @mysqli_autocommit($dbh, true);
364
 
365
  DUPX_Log::info("ERRORS FOUND:\t{$dbquery_errs}");
366
+ DUPX_Log::info("TABLES DROPPED:\t{$drop_log}");
367
  DUPX_Log::info("QUERIES RAN:\t{$dbquery_rows}\n");
368
 
369
  $dbtable_count = 0;
378
  }
379
 
380
  if ($dbtable_count == 0) {
381
+ DUPX_Log::error("No tables where created during step 1 of the install. Please review the <a href='installer-log.txt' target='_blank'>installer-log.txt</a> file for
382
  ERROR messages. You may have to manually run the installer-data.sql with a tool like phpmyadmin to validate the data input. If you have enabled compatibility mode
383
  during the package creation process then the database server version your using may not be compatible with this script.\n");
384
  }
392
  @mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` LIKE ('_transient%') OR `option_name` LIKE ('_site_transient%')");
393
  $dbdelete_count2 = @mysqli_affected_rows($dbh) or 0;
394
  $dbdelete_count = (abs($dbdelete_count1) + abs($dbdelete_count2));
395
+ DUPX_Log::info("\nRemoved '{$dbdelete_count}' cache/transient rows");
396
  //Reset Duplicator Options
397
  foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
398
  mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` = '{$value}'");
400
 
401
  @mysqli_close($dbh);
402
 
 
 
 
403
  //FINAL RESULTS
404
+ $profile_end = DUPX_U::getMicrotime();
405
+ $ajax2_end = DUPX_U::getMicrotime();
406
+ $ajax1_sum = DUPX_U::elapsedTime($ajax2_end, $ajax2_start);
407
+ DUPX_Log::info("\nCREATE/INSTALL RUNTIME: " . DUPX_U::elapsedTime($profile_end, $profile_start));
408
+ DUPX_Log::info('STEP-2 COMPLETE @ ' . @date('h:i:s') . " - RUNTIME: {$ajax1_sum}");
409
 
410
  $JSON['pass'] = 1;
411
  $JSON['table_count'] = $dbtable_count;
installer/build/{ajax.step2.php → ctrls/ctrl.step3.php} RENAMED
@@ -1,13 +1,10 @@
1
  <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
  }
9
 
10
- /* JSON RESPONSE: Most sites have warnings turned off by default, but if they're turned on the warnings
11
  cause errors in the JSON data Here we hide the status so warning level is reset at it at the end*/
12
  $ajax2_error_level = error_reporting();
13
  error_reporting(E_ERROR);
@@ -16,7 +13,7 @@ error_reporting(E_ERROR);
16
  //DATABASE UPDATES
17
  //====================================================================================================
18
 
19
- $ajax2_start = DUPX_Util::get_microtime();
20
 
21
  //MYSQL CONNECTION
22
  $dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], html_entity_decode($_POST['dbpass']), $_POST['dbname'], $_POST['dbport']);
@@ -25,15 +22,15 @@ $charset_server = @mysqli_character_set_name($dbh);
25
  DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
26
 
27
  //POST PARAMS
28
- $_POST['blogname'] = mysqli_real_escape_string($dbh, $_POST['blogname']);
29
- $_POST['postguid'] = isset($_POST['postguid']) && $_POST['postguid'] == 1 ? 1 : 0;
30
- $_POST['fullsearch'] = isset($_POST['fullsearch']) && $_POST['fullsearch'] == 1 ? 1 : 0;
31
- $_POST['path_old'] = isset($_POST['path_old']) ? trim($_POST['path_old']) : null;
32
- $_POST['path_new'] = isset($_POST['path_new']) ? trim($_POST['path_new']) : null;
33
- $_POST['siteurl'] = isset($_POST['siteurl']) ? rtrim(trim($_POST['siteurl']), '/') : null;
34
- $_POST['tables'] = isset($_POST['tables']) && is_array($_POST['tables']) ? array_map('stripcslashes', $_POST['tables']) : array();
35
- $_POST['url_old'] = isset($_POST['url_old']) ? trim($_POST['url_old']) : null;
36
- $_POST['url_new'] = isset($_POST['url_new']) ? rtrim(trim($_POST['url_new']), '/') : null;
37
 
38
  //LOGGING
39
  $POST_LOG = $_POST;
@@ -46,14 +43,13 @@ $date = @date('h:i:s');
46
  $charset_client = @mysqli_character_set_name($dbh);
47
 
48
  $log = <<<LOG
49
- \n\n
50
- ********************************************************************************
51
- DUPLICATOR-LITE INSTALL-LOG
52
- STEP2 START @ {$date}
53
- NOTICE: Do not post to public sites or forums
54
  ********************************************************************************
55
  CHARSET SERVER:\t{$charset_server}
56
- CHARSET CLIENT:\t {$charset_client} \n
57
  LOG;
58
  DUPX_Log::info($log);
59
 
@@ -101,7 +97,7 @@ array_push($GLOBALS['REPLACE_LIST'],
101
  array('search' => $path_old_json, 'replace' => $path_new_json),
102
  array('search' => urlencode($_POST['path_old']), 'replace' => urlencode($_POST['path_new'])),
103
  array('search' => urlencode($_POST['url_old']), 'replace' => urlencode($_POST['url_new'])),
104
- array('search' => rtrim(DUPX_Util::unset_safe_path($_POST['path_old']), '\\'), 'replace' => rtrim($_POST['path_new'], '/'))
105
  );
106
 
107
  //Remove trailing slashes
@@ -142,11 +138,10 @@ mysqli_query($dbh, "UPDATE `{$GLOBALS['FW_TABLEPREFIX']}options` SET option_valu
142
  //====================================================================================================
143
  //FINAL CLEANUP
144
  //====================================================================================================
145
- DUPX_Log::info("\n********************************************************************************");
146
- DUPX_Log::info('START FINAL CLEANUP: ' . @date('h:i:s'));
147
- DUPX_Log::info("********************************************************************************");
148
 
149
- /*CREATE NEW USER LOGIC */
150
  if (strlen($_POST['wp_username']) >= 4 && strlen($_POST['wp_password']) >= 6) {
151
 
152
  $newuser_check = mysqli_query($dbh, "SELECT COUNT(*) AS count FROM `{$GLOBALS['FW_TABLEPREFIX']}users` WHERE user_login = '{$_POST['wp_username']}' ");
@@ -206,14 +201,15 @@ $mu_oldUrlPath = (empty($mu_oldUrlPath) || ($mu_oldUrlPath == '/')) ? '/' : rtr
206
  $mu_updates = @mysqli_query($dbh, "UPDATE `{$GLOBALS['FW_TABLEPREFIX']}blogs` SET domain = '{$mu_newDomainHost}' WHERE domain = '{$mu_oldDomainHost}'");
207
  if ($mu_updates) {
208
  DUPX_Log::info("Update MU table blogs: domain {$mu_newDomainHost} ");
209
- } else {
210
  DUPX_Log::info("UPDATE `{$GLOBALS['FW_TABLEPREFIX']}blogs` SET domain = '{$mu_newDomainHost}' WHERE domain = '{$mu_oldDomainHost}'");
211
- }
212
 
213
 
214
- /* ==============================
215
  * UPDATE WP-CONFIG FILE */
216
- $config_file = DUPX_WPConfig::updateStep2();
 
 
217
 
218
  //Create snapshots directory in order to
219
  //compensate for permissions on some servers
@@ -230,12 +226,12 @@ DUPX_Log::info("\n--------------------------------------");
230
  DUPX_Log::info("NOTICES");
231
  DUPX_Log::info("--------------------------------------");
232
  $config_vars = array('WP_CONTENT_DIR', 'WP_CONTENT_URL', 'WPCACHEHOME', 'COOKIE_DOMAIN', 'WP_SITEURL', 'WP_HOME', 'WP_TEMP_DIR');
233
- $config_items = DUPX_Util::search_list_values($config_vars, $config_file);
234
 
235
  //Files:
236
  if (! empty($config_items)) {
237
- $msg = 'NOTICE: The wp-config.php has one or more of the following values set [' . implode(", ", $config_items) . ']. ';
238
- $msg .= 'Please validate these values are correct by opening the file and checking the values. To validate the meaning and proper usage of each parameter used the codex link above.';
239
  $JSON['step2']['warnlist'][] = $msg;
240
  DUPX_Log::info($msg);
241
  }
@@ -245,7 +241,7 @@ $result = @mysqli_query($dbh, "SELECT option_value FROM `{$GLOBALS['FW_TABLEPREF
245
  if ($result) {
246
  while ($row = mysqli_fetch_row($result)) {
247
  if (strlen($row[0])) {
248
- $msg = "NOTICE: The media settings values in the table '{$GLOBALS['FW_TABLEPREFIX']}options' has at least one the following values ['upload_url_path','upload_path'] set. ";
249
  $msg .= "Please validate these settings by logging into your wp-admin and going to Settings->Media area and validating the 'Uploading Files' section";
250
  $JSON['step2']['warnlist'][] = $msg;
251
  DUPX_Log::info($msg);
@@ -261,16 +257,14 @@ if (empty($JSON['step2']['warnlist'])) {
261
  $JSON['step2']['warn_all'] = empty($JSON['step2']['warnlist']) ? 0 : count($JSON['step2']['warnlist']);
262
 
263
  mysqli_close($dbh);
264
- @unlink('database.sql');
265
 
266
  //CONFIG Setup
267
  DUPX_ServerConfig::setup();
268
 
269
- $ajax2_end = DUPX_Util::get_microtime();
270
- $ajax2_sum = DUPX_Util::elapsed_time($ajax2_end, $ajax2_start);
271
- DUPX_Log::info("********************************************************************************");
272
- DUPX_Log::info('STEP 2 COMPLETE @ ' . @date('h:i:s') . " - TOTAL RUNTIME: {$ajax2_sum}");
273
- DUPX_Log::info("********************************************************************************");
274
 
275
  $JSON['step2']['pass'] = 1;
276
  error_reporting($ajax2_error_level);
1
  <?php
2
+ // Exit if accessed directly from admin
3
+ if (function_exists('duplicator_secure_check')) {
4
+ duplicator_secure_check();
 
 
 
5
  }
6
 
7
+ /** JSON RESPONSE: Most sites have warnings turned off by default, but if they're turned on the warnings
8
  cause errors in the JSON data Here we hide the status so warning level is reset at it at the end*/
9
  $ajax2_error_level = error_reporting();
10
  error_reporting(E_ERROR);
13
  //DATABASE UPDATES
14
  //====================================================================================================
15
 
16
+ $ajax2_start = DUPX_U::getMicrotime();
17
 
18
  //MYSQL CONNECTION
19
  $dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], html_entity_decode($_POST['dbpass']), $_POST['dbname'], $_POST['dbport']);
22
  DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
23
 
24
  //POST PARAMS
25
+ $_POST['blogname'] = mysqli_real_escape_string($dbh, $_POST['blogname']);
26
+ $_POST['postguid'] = isset($_POST['postguid']) && $_POST['postguid'] == 1 ? 1 : 0;
27
+ $_POST['fullsearch'] = isset($_POST['fullsearch']) && $_POST['fullsearch'] == 1 ? 1 : 0;
28
+ $_POST['path_old'] = isset($_POST['path_old']) ? trim($_POST['path_old']) : null;
29
+ $_POST['path_new'] = isset($_POST['path_new']) ? trim($_POST['path_new']) : null;
30
+ $_POST['siteurl'] = isset($_POST['siteurl']) ? rtrim(trim($_POST['siteurl']), '/') : null;
31
+ $_POST['tables'] = isset($_POST['tables']) && is_array($_POST['tables']) ? array_map('stripcslashes', $_POST['tables']) : array();
32
+ $_POST['url_old'] = isset($_POST['url_old']) ? trim($_POST['url_old']) : null;
33
+ $_POST['url_new'] = isset($_POST['url_new']) ? rtrim(trim($_POST['url_new']), '/') : null;
34
 
35
  //LOGGING
36
  $POST_LOG = $_POST;
43
  $charset_client = @mysqli_character_set_name($dbh);
44
 
45
  $log = <<<LOG
46
+ \n\n********************************************************************************
47
+ * DUPLICATOR-LITE: INSTALL-LOG
48
+ * STEP-3 START @ {$date}
49
+ * NOTICE: Do NOT post to public sites or forums
 
50
  ********************************************************************************
51
  CHARSET SERVER:\t{$charset_server}
52
+ CHARSET CLIENT:\t{$charset_client}
53
  LOG;
54
  DUPX_Log::info($log);
55
 
97
  array('search' => $path_old_json, 'replace' => $path_new_json),
98
  array('search' => urlencode($_POST['path_old']), 'replace' => urlencode($_POST['path_new'])),
99
  array('search' => urlencode($_POST['url_old']), 'replace' => urlencode($_POST['url_new'])),
100
+ array('search' => rtrim(DUPX_U::unsetSafePath($_POST['path_old']), '\\'), 'replace' => rtrim($_POST['path_new'], '/'))
101
  );
102
 
103
  //Remove trailing slashes
138
  //====================================================================================================
139
  //FINAL CLEANUP
140
  //====================================================================================================
141
+ DUPX_Log::info("\n====================================");
142
+ DUPX_Log::info('START FINAL CLEANUP: ');
 
143
 
144
+ /** CREATE NEW USER LOGIC */
145
  if (strlen($_POST['wp_username']) >= 4 && strlen($_POST['wp_password']) >= 6) {
146
 
147
  $newuser_check = mysqli_query($dbh, "SELECT COUNT(*) AS count FROM `{$GLOBALS['FW_TABLEPREFIX']}users` WHERE user_login = '{$_POST['wp_username']}' ");
201
  $mu_updates = @mysqli_query($dbh, "UPDATE `{$GLOBALS['FW_TABLEPREFIX']}blogs` SET domain = '{$mu_newDomainHost}' WHERE domain = '{$mu_oldDomainHost}'");
202
  if ($mu_updates) {
203
  DUPX_Log::info("Update MU table blogs: domain {$mu_newDomainHost} ");
 
204
  DUPX_Log::info("UPDATE `{$GLOBALS['FW_TABLEPREFIX']}blogs` SET domain = '{$mu_newDomainHost}' WHERE domain = '{$mu_oldDomainHost}'");
205
+ }
206
 
207
 
208
+ /** ==============================
209
  * UPDATE WP-CONFIG FILE */
210
+ DUPX_WPConfig::updateStandard();
211
+ $config_file = DUPX_WPConfig::updateExtended();
212
+ DUPX_Log::info("\nUPDATED WP-CONFIG: {$root_path}/wp-config.php' (if present)");
213
 
214
  //Create snapshots directory in order to
215
  //compensate for permissions on some servers
226
  DUPX_Log::info("NOTICES");
227
  DUPX_Log::info("--------------------------------------");
228
  $config_vars = array('WP_CONTENT_DIR', 'WP_CONTENT_URL', 'WPCACHEHOME', 'COOKIE_DOMAIN', 'WP_SITEURL', 'WP_HOME', 'WP_TEMP_DIR');
229
+ $config_items = DUPX_U::getListValues($config_vars, $config_file);
230
 
231
  //Files:
232
  if (! empty($config_items)) {
233
+ $msg = "NOTICE: The wp-config.php has one or more of the following values set [" . implode(", ", $config_items) . "]. \n";
234
+ $msg .= 'Please validate these values are correct in your wp-config.php file. Please see the codex link for more details: https://codex.wordpress.org/Editing_wp-config.php';
235
  $JSON['step2']['warnlist'][] = $msg;
236
  DUPX_Log::info($msg);
237
  }
241
  if ($result) {
242
  while ($row = mysqli_fetch_row($result)) {
243
  if (strlen($row[0])) {
244
+ $msg = "NOTICE: The media settings values in the table '{$GLOBALS['FW_TABLEPREFIX']}options' has at least one the following values ['upload_url_path','upload_path'] set. \n";
245
  $msg .= "Please validate these settings by logging into your wp-admin and going to Settings->Media area and validating the 'Uploading Files' section";
246
  $JSON['step2']['warnlist'][] = $msg;
247
  DUPX_Log::info($msg);
257
  $JSON['step2']['warn_all'] = empty($JSON['step2']['warnlist']) ? 0 : count($JSON['step2']['warnlist']);
258
 
259
  mysqli_close($dbh);
260
+ //@unlink('database.sql');
261
 
262
  //CONFIG Setup
263
  DUPX_ServerConfig::setup();
264
 
265
+ $ajax2_end = DUPX_U::getMicrotime();
266
+ $ajax2_sum = DUPX_U::elapsedTime($ajax2_end, $ajax2_start);
267
+ DUPX_Log::info("\nSTEP 3 COMPLETE @ " . @date('h:i:s') . " - RUNTIME: {$ajax2_sum}\n\n");
 
 
268
 
269
  $JSON['step2']['pass'] = 1;
270
  error_reporting($ajax2_error_level);
installer/build/main.installer.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /*
3
- Copyright 2011-16 snapcreek.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
7
  published by the Free Software Foundation.
8
 
9
  This program is distributed in the hope that it will be useful,
@@ -14,11 +14,7 @@
14
  You should have received a copy of the GNU General Public License
15
  along with this program; if not, write to the Free Software
16
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
-
18
- SOURCE CONTRIBUTORS:
19
- Gaurav Aggarwal
20
- David Coveney of Interconnect IT Ltd
21
- https://github.com/interconnectit/Search-Replace-DB/
22
  */
23
 
24
  if (file_exists('dtoken.php')) {
@@ -57,29 +53,11 @@ if (file_exists('dtoken.php')) {
57
  header("Status: 404 Not Found");
58
  }
59
  }
60
-
61
  //Prevent Access from rovers or direct browsing in snapshop directory, or when
62
  //requesting to download a file, should not go past this point.
63
  exit;
64
  }
65
- ?>
66
-
67
- <?php if (false) : ?>
68
- <!DOCTYPE html>
69
- <html>
70
- <head>
71
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
72
- <title>Error: PHP is not running</title>
73
- </head>
74
- <body>
75
- <h2>Error: PHP is not running</h2>
76
- <p>Duplicator requires that your web server is running PHP. Your server does not have PHP installed, or PHP is turned off.</p>
77
- </body>
78
- </html>
79
- <?php endif; ?>
80
 
81
-
82
- <?php
83
  /* ==============================================================================================
84
  ADVANCED FEATURES - Allows admins to perform aditional logic on the import.
85
 
@@ -92,6 +70,7 @@ $GLOBALS['REPLACE_LIST']
92
  ================================================================================================= */
93
 
94
  //COMPARE VALUES
 
95
  $GLOBALS['FW_CREATED'] = '%fwrite_created%';
96
  $GLOBALS['FW_VERSION_DUP'] = '%fwrite_version_dup%';
97
  $GLOBALS['FW_VERSION_WP'] = '%fwrite_version_wp%';
@@ -99,31 +78,32 @@ $GLOBALS['FW_VERSION_DB'] = '%fwrite_version_db%';
99
  $GLOBALS['FW_VERSION_PHP'] = '%fwrite_version_php%';
100
  $GLOBALS['FW_VERSION_OS'] = '%fwrite_version_os%';
101
  //GENERAL
102
- $GLOBALS['FW_TABLEPREFIX'] = '%fwrite_wp_tableprefix%';
103
- $GLOBALS['FW_URL_OLD'] = '%fwrite_url_old%';
104
- $GLOBALS['FW_URL_NEW'] = '%fwrite_url_new%';
105
- $GLOBALS['FW_PACKAGE_NAME'] = '%fwrite_package_name%';
106
- $GLOBALS['FW_PACKAGE_NOTES'] = '%fwrite_package_notes%';
107
- $GLOBALS['FW_SECURE_NAME'] = '%fwrite_secure_name%';
108
- $GLOBALS['FW_DBHOST'] = '%fwrite_dbhost%';
109
- $GLOBALS['FW_DBHOST'] = empty($GLOBALS['FW_DBHOST']) ? 'localhost' : $GLOBALS['FW_DBHOST'];
110
- $GLOBALS['FW_DBPORT'] = '%fwrite_dbport%';
111
- $GLOBALS['FW_DBPORT'] = empty($GLOBALS['FW_DBPORT']) ? 3306 : $GLOBALS['FW_DBPORT'];
112
- $GLOBALS['FW_DBNAME'] = '%fwrite_dbname%';
113
- $GLOBALS['FW_DBUSER'] = '%fwrite_dbuser%';
114
- $GLOBALS['FW_DBPASS'] = '%fwrite_dbpass%';
115
- $GLOBALS['FW_SSL_ADMIN'] = '%fwrite_ssl_admin%';
116
- $GLOBALS['FW_SSL_LOGIN'] = '%fwrite_ssl_login%';
117
- $GLOBALS['FW_CACHE_WP'] = '%fwrite_cache_wp%';
118
- $GLOBALS['FW_CACHE_PATH'] = '%fwrite_cache_path%';
119
- $GLOBALS['FW_BLOGNAME'] = '%fwrite_blogname%';
120
- $GLOBALS['FW_WPROOT'] = '%fwrite_wproot%';
 
121
  $GLOBALS['FW_DUPLICATOR_VERSION'] = '%fwrite_duplicator_version%';
122
- $GLOBALS['FW_OPTS_DELETE'] = json_decode("%fwrite_opts_delete%", true);
123
 
124
  //DATABASE SETUP: all time in seconds
125
- $GLOBALS['DB_MAX_TIME'] = 5000;
126
- $GLOBALS['DB_MAX_PACKETS'] = 268435456;
 
127
  ini_set('mysql.connect_timeout', '5000');
128
 
129
  //PHP SETUP: all time in seconds
@@ -141,7 +121,7 @@ $GLOBALS['FAQ_URL'] = 'https://snapcreek.com/duplicator/docs/faqs-tech';
141
  $GLOBALS['REPLACE_LIST'] = array();
142
 
143
 
144
- /* ================================================================================================
145
  END ADVANCED FEATURES: Do not edit below here.
146
  =================================================================================================== */
147
 
@@ -152,7 +132,7 @@ define("DUPLICATOR_SSDIR_NAME", 'wp-snapshots'); //This should match DUPLICATOR
152
  //SHARED POST PARMS
153
  $_POST['action_step'] = isset($_POST['action_step']) ? $_POST['action_step'] : "1";
154
 
155
- /* Host has several combinations :
156
  localhost | localhost:55 | localhost: | http://localhost | http://localhost:55 */
157
  $_POST['dbhost'] = isset($_POST['dbhost']) ? trim($_POST['dbhost']) : null;
158
  $_POST['dbport'] = isset($_POST['dbport']) ? trim($_POST['dbport']) : 3306;
@@ -163,59 +143,52 @@ $_POST['dbcharset'] = isset($_POST['dbcharset']) ? trim($_POST['dbcharset']) :
163
  $_POST['dbcollate'] = isset($_POST['dbcollate']) ? trim($_POST['dbcollate']) : $GLOBALS['DBCOLLATE_DEFAULT'];
164
 
165
  //GLOBALS
166
- $GLOBALS['SQL_FILE_NAME'] = "installer-data.sql";
167
- $GLOBALS['LOG_FILE_NAME'] = "installer-log.txt";
168
- $GLOBALS['SEPERATOR1'] = str_repeat("********", 10);
169
- $GLOBALS['LOGGING'] = isset($_POST['logging']) ? $_POST['logging'] : 1;
170
- $GLOBALS['CURRENT_ROOT_PATH'] = dirname(__FILE__);
171
- $GLOBALS['CHOWN_ROOT_PATH'] = @chmod("{$GLOBALS['CURRENT_ROOT_PATH']}", 0755);
172
- $GLOBALS['CHOWN_LOG_PATH'] = @chmod("{$GLOBALS['CURRENT_ROOT_PATH']}/{$GLOBALS['LOG_FILE_NAME']}", 0644);
173
- $GLOBALS['URL_SSL'] = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? true : false;
174
- $GLOBALS['URL_PATH'] = ($GLOBALS['URL_SSL']) ? "https://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}" : "http://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}";
175
- $GLOBALS['PHP_MEMORY_LIMIT'] = ini_get('memory_limit') === false ? 'n/a' : ini_get('memory_limit');
176
- $GLOBALS['PHP_SUHOSIN_ON'] = extension_loaded('suhosin') ? 'enabled' : 'disabled';
 
177
 
178
  //Restart log if user starts from step 1
179
- if ($_POST['action_step'] == 1) {
180
  $GLOBALS['LOG_FILE_HANDLE'] = @fopen($GLOBALS['LOG_FILE_NAME'], "w+");
181
  } else {
182
  $GLOBALS['LOG_FILE_HANDLE'] = @fopen($GLOBALS['LOG_FILE_NAME'], "a+");
183
  }
184
  ?>
185
-
186
- @@CLASS.UTILS.PHP@@
187
-
188
  @@CLASS.DB.PHP@@
189
-
190
  @@CLASS.LOGGING.PHP@@
191
-
192
  @@CLASS.ENGINE.PHP@@
193
-
194
  @@CLASS.CONF.WP.PHP@@
195
-
196
  @@CLASS.CONF.SRV.PHP@@
197
-
198
-
 
 
 
 
199
  <?php
200
- if (isset($_POST['action_ajax'])) {
201
- switch ($_POST['action_ajax']) {
202
- case "1" :
203
- ?> @@AJAX.STEP1.PHP@@ <?php break;
204
- case "2" :
205
- ?> @@AJAX.STEP2.PHP@@ <?php
206
- break;
207
- }
208
  @fclose($GLOBALS["LOG_FILE_HANDLE"]);
209
  die("");
210
- }
211
  ?>
212
-
 
 
213
  <!DOCTYPE html>
214
  <html>
215
  <head>
216
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
217
  <meta name="robots" content="noindex,nofollow">
218
- <title>Wordpress Duplicator</title>
219
  @@INC.LIBS.CSS.PHP@@
220
  @@INC.CSS.PHP@@
221
  @@INC.LIBS.JS.PHP@@
@@ -224,69 +197,29 @@ if (isset($_POST['action_ajax'])) {
224
  <body>
225
 
226
  <div id="content">
227
- <!-- =========================================
228
- HEADER TEMPLATE: Common header on all steps -->
229
- <table cellspacing="0" class="header-wizard">
230
- <tr>
231
- <td style="width:100%;">
232
- <div style="font-size:22px; padding:5px 0px 0px 0px">
233
- <!-- !!DO NOT CHANGE/EDIT OR REMOVE PRODUCT NAME!!
234
- If your interested in Private Label Rights please contact us at the URL below to discuss
235
- customizations to product labeling: http://snapcreek.com -->
236
- &nbsp; Duplicator - Installer
237
- </div>
238
- </td>
239
- <td style="white-space:nowrap; text-align:right">
240
- <select id="dup-hlp-lnk">
241
- <option value="null"> - Resources -</option>
242
- <option value="https://snapcreek.com/duplicator/docs/">&raquo; Knowledge Base</option>
243
- <option value="https://snapcreek.com/duplicator/docs/guide/">&raquo; User Guide</option>
244
- <option value="https://snapcreek.com/duplicator/docs/faqs-tech/">&raquo; Common FAQs</option>
245
- <option value="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-resource-040-q">&raquo; Approved Hosts</option>
246
- </select>
247
- </td>
248
- </tr>
249
- <tr>
250
- <td>
251
-
252
- <?php if (isset($_GET['help'])) :?>
253
- <div style="margin:4px 0px 10px 15px; font-size:18px">
254
- Help Overview
255
- </div>
256
- <?php else : ?>
257
- <?php
258
- $step1CSS = ($_POST['action_step'] <= 1) ? "active-step" : "complete-step";
259
- $step2CSS = ($_POST['action_step'] == 2) ? "active-step" : "";
260
-
261
- $step3CSS = "";
262
- if ($_POST['action_step'] == 3) {
263
- $step2CSS = "complete-step";
264
- $step3CSS = "active-step";
265
- }
266
- ?>
267
- <div id="dup-wiz">
268
- <div id="dup-wiz-steps">
269
- <div class="<?php echo $step1CSS; ?>"><a><span>1</span> Deploy</a></div>
270
- <div class="<?php echo $step2CSS; ?>"><a><span>2</span> Update </a></div>
271
- <div class="<?php echo $step3CSS; ?>"><a><span>3</span> Test </a></div>
272
- </div>
273
- </div>
274
- <?php endif; ?>
275
-
276
- </td>
277
- <td style="white-space:nowrap">
278
-
279
- <i style='font-size:11px; color:#999'>
280
- version: <?php echo $GLOBALS['FW_DUPLICATOR_VERSION'] ?> &raquo; <a href="?help=1" target="_blank">help</a>
281
- </i> &nbsp;
282
-
283
- </td>
284
- </tr>
285
- </table>
286
-
287
- <!-- =========================================
288
- FORM DATA: Data Steps -->
289
- <div id="content-inner">
290
  <?php
291
 
292
  if (! isset($_GET['help'])) {
@@ -300,15 +233,61 @@ switch ($_POST['action_step']) {
300
  case "3" :
301
  ?> @@VIEW.STEP3.PHP@@ <?php
302
  break;
 
 
 
303
  }
304
  } else {
305
  ?> @@VIEW.HELP.PHP@@ <?php
306
  }
307
 
308
  ?>
309
- </div>
310
  </div><br/>
311
 
312
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
  </body>
314
  </html>
1
  <?php
2
  /*
3
+ Copyright 2011-17 snapcreek.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 3, as
7
  published by the Free Software Foundation.
8
 
9
  This program is distributed in the hope that it will be useful,
14
  You should have received a copy of the GNU General Public License
15
  along with this program; if not, write to the Free Software
16
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
17
+ GPL v3 https://www.gnu.org/licenses/gpl-3.0.en.html
 
 
 
 
18
  */
19
 
20
  if (file_exists('dtoken.php')) {
53
  header("Status: 404 Not Found");
54
  }
55
  }
 
56
  //Prevent Access from rovers or direct browsing in snapshop directory, or when
57
  //requesting to download a file, should not go past this point.
58
  exit;
59
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
 
 
61
  /* ==============================================================================================
62
  ADVANCED FEATURES - Allows admins to perform aditional logic on the import.
63
 
70
  ================================================================================================= */
71
 
72
  //COMPARE VALUES
73
+ $GLOBALS['DUPX_DEBUG'] = false;
74
  $GLOBALS['FW_CREATED'] = '%fwrite_created%';
75
  $GLOBALS['FW_VERSION_DUP'] = '%fwrite_version_dup%';
76
  $GLOBALS['FW_VERSION_WP'] = '%fwrite_version_wp%';
78
  $GLOBALS['FW_VERSION_PHP'] = '%fwrite_version_php%';
79
  $GLOBALS['FW_VERSION_OS'] = '%fwrite_version_os%';
80
  //GENERAL
81
+ $GLOBALS['FW_TABLEPREFIX'] = '%fwrite_wp_tableprefix%';
82
+ $GLOBALS['FW_URL_OLD'] = '%fwrite_url_old%';
83
+ $GLOBALS['FW_URL_NEW'] = '%fwrite_url_new%';
84
+ $GLOBALS['FW_PACKAGE_NAME'] = '%fwrite_archive_name%';
85
+ $GLOBALS['FW_PACKAGE_NOTES'] = '%fwrite_package_notes%';
86
+ $GLOBALS['FW_SECURE_NAME'] = '%fwrite_secure_name%';
87
+ $GLOBALS['FW_DBHOST'] = '%fwrite_dbhost%';
88
+ $GLOBALS['FW_DBHOST'] = empty($GLOBALS['FW_DBHOST']) ? 'localhost' : $GLOBALS['FW_DBHOST'];
89
+ $GLOBALS['FW_DBPORT'] = '%fwrite_dbport%';
90
+ $GLOBALS['FW_DBPORT'] = empty($GLOBALS['FW_DBPORT']) ? 3306 : $GLOBALS['FW_DBPORT'];
91
+ $GLOBALS['FW_DBNAME'] = '%fwrite_dbname%';
92
+ $GLOBALS['FW_DBUSER'] = '%fwrite_dbuser%';
93
+ $GLOBALS['FW_DBPASS'] = '%fwrite_dbpass%';
94
+ $GLOBALS['FW_SSL_ADMIN'] = '%fwrite_ssl_admin%';
95
+ $GLOBALS['FW_SSL_LOGIN'] = '%fwrite_ssl_login%';
96
+ $GLOBALS['FW_CACHE_WP'] = '%fwrite_cache_wp%';
97
+ $GLOBALS['FW_CACHE_PATH'] = '%fwrite_cache_path%';
98
+ $GLOBALS['FW_BLOGNAME'] = '%fwrite_blogname%';
99
+ $GLOBALS['FW_WPROOT'] = '%fwrite_wproot%';
100
+ $GLOBALS['FW_OPTS_DELETE'] = json_decode("%fwrite_opts_delete%", true);
101
  $GLOBALS['FW_DUPLICATOR_VERSION'] = '%fwrite_duplicator_version%';
 
102
 
103
  //DATABASE SETUP: all time in seconds
104
+ $GLOBALS['DB_MAX_TIME'] = 5000;
105
+ $GLOBALS['DB_MAX_PACKETS'] = 268435456;
106
+ $GLOBALS['DB_FCGI_FLUSH'] = false;
107
  ini_set('mysql.connect_timeout', '5000');
108
 
109
  //PHP SETUP: all time in seconds
121
  $GLOBALS['REPLACE_LIST'] = array();
122
 
123
 
124
+ /** ================================================================================================
125
  END ADVANCED FEATURES: Do not edit below here.
126
  =================================================================================================== */
127
 
132
  //SHARED POST PARMS
133
  $_POST['action_step'] = isset($_POST['action_step']) ? $_POST['action_step'] : "1";
134
 
135
+ /** Host has several combinations :
136
  localhost | localhost:55 | localhost: | http://localhost | http://localhost:55 */
137
  $_POST['dbhost'] = isset($_POST['dbhost']) ? trim($_POST['dbhost']) : null;
138
  $_POST['dbport'] = isset($_POST['dbport']) ? trim($_POST['dbport']) : 3306;
143
  $_POST['dbcollate'] = isset($_POST['dbcollate']) ? trim($_POST['dbcollate']) : $GLOBALS['DBCOLLATE_DEFAULT'];
144
 
145
  //GLOBALS
146
+ $GLOBALS['SQL_FILE_NAME'] = "installer-data.sql";
147
+ $GLOBALS['LOG_FILE_NAME'] = "installer-log.txt";
148
+ $GLOBALS['LOGGING'] = isset($_POST['logging']) ? $_POST['logging'] : 1;
149
+ $GLOBALS['CURRENT_ROOT_PATH'] = dirname(__FILE__);
150
+ $GLOBALS['CHOWN_ROOT_PATH'] = @chmod("{$GLOBALS['CURRENT_ROOT_PATH']}", 0755);
151
+ $GLOBALS['CHOWN_LOG_PATH'] = @chmod("{$GLOBALS['CURRENT_ROOT_PATH']}/{$GLOBALS['LOG_FILE_NAME']}", 0644);
152
+ $GLOBALS['URL_SSL'] = (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == 'on') ? true : false;
153
+ $GLOBALS['URL_PATH'] = ($GLOBALS['URL_SSL']) ? "https://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}" : "http://{$_SERVER['SERVER_NAME']}{$_SERVER['REQUEST_URI']}";
154
+ $GLOBALS['PHP_MEMORY_LIMIT'] = ini_get('memory_limit') === false ? 'n/a' : ini_get('memory_limit');
155
+ $GLOBALS['PHP_SUHOSIN_ON'] = extension_loaded('suhosin') ? 'enabled' : 'disabled';
156
+ $GLOBALS['ARCHIVE_PATH'] = $GLOBALS['CURRENT_ROOT_PATH'] . '/' . $GLOBALS['FW_PACKAGE_NAME'];
157
+ $GLOBALS['ARCHIVE_PATH'] = str_replace("\\", "/", $GLOBALS['ARCHIVE_PATH']);
158
 
159
  //Restart log if user starts from step 1
160
+ if ($_POST['action_step'] == 1 && ! isset($_GET['help'])) {
161
  $GLOBALS['LOG_FILE_HANDLE'] = @fopen($GLOBALS['LOG_FILE_NAME'], "w+");
162
  } else {
163
  $GLOBALS['LOG_FILE_HANDLE'] = @fopen($GLOBALS['LOG_FILE_NAME'], "a+");
164
  }
165
  ?>
166
+ @@CLASS.U.PHP@@
167
+ @@CLASS.SERVER.PHP@@
 
168
  @@CLASS.DB.PHP@@
 
169
  @@CLASS.LOGGING.PHP@@
 
170
  @@CLASS.ENGINE.PHP@@
 
171
  @@CLASS.CONF.WP.PHP@@
 
172
  @@CLASS.CONF.SRV.PHP@@
173
+ <?php if (isset($_POST['action_ajax'])) :?>
174
+ <?php switch ($_POST['action_ajax']): ?>
175
+ <?php case "1": ?>@@CTRL.STEP1.PHP@@<?php break;?>
176
+ <?php case "2": ?>@@CTRL.STEP2.PHP@@<?php break;?>
177
+ <?php case "3": ?>@@CTRL.STEP3.PHP@@<?php break;?>
178
+ <?php endswitch ?>
179
  <?php
 
 
 
 
 
 
 
 
180
  @fclose($GLOBALS["LOG_FILE_HANDLE"]);
181
  die("");
 
182
  ?>
183
+ <?php endif; ?>
184
+
185
+
186
  <!DOCTYPE html>
187
  <html>
188
  <head>
189
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
190
  <meta name="robots" content="noindex,nofollow">
191
+ <title>Duplicator</title>
192
  @@INC.LIBS.CSS.PHP@@
193
  @@INC.CSS.PHP@@
194
  @@INC.LIBS.JS.PHP@@
197
  <body>
198
 
199
  <div id="content">
200
+ <!-- =========================================
201
+ HEADER TEMPLATE: Common header on all steps -->
202
+ <table cellspacing="0" class="dupx-header">
203
+ <tr>
204
+ <td style="width:100%;">
205
+ <div style="font-size:26px; padding:5px 0 5px 0">
206
+ <!-- !!DO NOT CHANGE/EDIT OR REMOVE PRODUCT NAME!!
207
+ If your interested in Private Label Rights please contact us at the URL below to discuss
208
+ customizations to product labeling: http://snapcreek.com -->
209
+ &nbsp; Duplicator
210
+ </div>
211
+ </td>
212
+ <td class="dupx-header-version">
213
+ version: <?php echo $GLOBALS['FW_DUPLICATOR_VERSION'] ?><br/>
214
+ &raquo; <a href="?help=1" target="_blank">help</a>
215
+ &raquo; <a href="javascript:void(0)" onclick="DUPX.showServerInfo()">info</a>
216
+ </td>
217
+ </tr>
218
+ </table>
219
+
220
+ <!-- =========================================
221
+ FORM DATA: Data Steps -->
222
+ <div id="content-inner">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  <?php
224
 
225
  if (! isset($_GET['help'])) {
233
  case "3" :
234
  ?> @@VIEW.STEP3.PHP@@ <?php
235
  break;
236
+ case "4" :
237
+ ?> @@VIEW.STEP4.PHP@@ <?php
238
+ break;
239
  }
240
  } else {
241
  ?> @@VIEW.HELP.PHP@@ <?php
242
  }
243
 
244
  ?>
245
+ </div>
246
  </div><br/>
247
 
248
 
249
+ <!-- CONFIRM DIALOG -->
250
+ <div id="dialog-server-info" style="display:none">
251
+ <!-- DETAILS -->
252
+ <div class="dlg-serv-info">
253
+ <?php
254
+ $ini_path = php_ini_loaded_file();
255
+ $ini_max_time = ini_get('max_execution_time');
256
+ $ini_memory = ini_get('memory_limit');
257
+ ?>
258
+ <div class="hdr">Current Server</div>
259
+ <label>Web Server:</label> <?php echo $_SERVER['SERVER_SOFTWARE']; ?><br/>
260
+ <label>Operating System:</label> <?php echo PHP_OS ?><br/>
261
+ <label>PHP Version:</label> <?php echo DUPX_Server::$php_version; ?><br/>
262
+ <label>PHP INI Path:</label> <?php echo empty($ini_path ) ? 'Unable to detect loaded php.ini file' : $ini_path; ?> <br/>
263
+ <label>PHP SAPI:</label> <?php echo php_sapi_name(); ?><br/>
264
+ <label>PHP ZIP Archive:</label> <?php echo class_exists('ZipArchive') ? 'Is Installed' : 'Not Installed'; ?> <br/>
265
+ <label>PHP max_execution_time:</label> <?php echo $ini_max_time === false ? 'unable to find' : $ini_max_time; ?><br/>
266
+ <label>PHP memory_limit:</label> <?php echo empty($ini_memory) ? 'unable to find' : $ini_memory; ?><br/>
267
+
268
+ <br/>
269
+ <div class="hdr">Package Server</div>
270
+ <div class="info-txt">The server where the package was created</div>
271
+ <label>Plugin Version:</label> <?php echo $GLOBALS['FW_VERSION_DUP'] ?><br/>
272
+ <label>WordPress Version:</label> <?php echo $GLOBALS['FW_VERSION_WP'] ?><br/>
273
+ <label>PHP Version:</label> <?php echo $GLOBALS['FW_VERSION_PHP'] ?><br/>
274
+ <label>Database Version:</label> <?php echo $GLOBALS['FW_VERSION_DB'] ?><br/>
275
+ <label>Operating System:</label> <?php echo $GLOBALS['FW_VERSION_OS'] ?><br/>
276
+ <br/><br/>
277
+ </div>
278
+ </div>
279
+
280
+ <script>
281
+ /* Server Info Dialog*/
282
+ DUPX.showServerInfo = function()
283
+ {
284
+ modal({
285
+ type: 'alert',
286
+ title: 'Server Information',
287
+ text: $('#dialog-server-info').html()
288
+ });
289
+ }
290
+ </script>
291
+
292
  </body>
293
  </html>
installer/build/view.help.php CHANGED
@@ -1,267 +1,449 @@
1
- <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
- ?>
10
  <!-- =========================================
11
  HELP FORM -->
12
- <div id="dup-main-help">
13
- <div style="text-align:center">For in-depth help please see the <a href="https://snapcreek.com/duplicator/docs/" target="_blank">online resources</a></div>
14
-
15
- <h3>Step 1 - Deploy</h3>
16
- <div id="dup-help-step1" class="dup-help-page">
17
- <!-- MYSQL SERVER -->
18
- <fieldset>
19
- <legend><b>MySQL Server</b></legend>
20
-
21
- <b>Action:</b><br/>
22
- 'Create New' will attempt to create a new database if it does not exist. This option will not work on many hosting providers. If the database does not exist then you will need to login to your control panel and create the database. If 'Connect and Remove All Data' is checked this will DELETE all tables in the database you are connecting to as the Duplicator requires a blank database. Please make sure you have backups of all your data before using an portion of the installer, as this option WILL remove all data. Please contact your server administrator for more details.
23
- <br/><br/>
24
-
25
- <b>Host:</b><br/>
26
- The name of the host server that the database resides on. Many times this will be localhost, however each hosting provider will have it's own naming convention please check with your server administrator. To add a port number just append it to the host i.e. 'localhost:3306'.
27
- <br/><br/>
28
-
29
- <b>User:</b><br/>
30
- The name of a MySQL database server user. This is special account that has privileges to access a database and can read from or write to that database. <i style='font-size:11px'>This is <b>not</b> the same thing as your WordPress administrator account</i>
31
- <br/><br/>
32
-
33
- <b>Password:</b><br/>
34
- The password of the MySQL database server user.
35
- <br/><br/>
36
-
37
- <b>Test Connection:</b><br/>
38
- The test connection button will help validate if the connection parameters are correct for this server. There are three separate validation parameters:
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
39
  <ul>
40
  <li><b>Host:</b> Returns a status to indicate if the server host name is a valid host name <br/><br/></li>
41
  <li><b>Database:</b> Returns a status to indicate if the database name is a valid <br/><br/></li>
42
- <li><b>Version:</b> Shows the difference in database engine version numbers. If the package was created on a newer database version than where its trying to
43
- be installed then you can run into issues. Its best to make sure the server where the installer is running has the same or higher version number than
44
  where it was built.</li>
45
  </ul>
46
- <br/>
47
 
48
- <b>Name:</b><br/>
49
- The name of the database to which this installation will connect and install the new tables onto.
50
- <br/><br/>
51
-
52
- <div class="help" style="border-top:1px solid silver">
53
  <b>Common Database Connection Issues:</b><br/>
54
  - Double check case sensitive values 'User', 'Password' &amp; the 'Database Name' <br/>
55
  - Validate the database and database user exist on this server <br/>
56
  - Check if the database user has the correct permission levels to this database <br/>
57
  - The host 'localhost' may not work on all hosting providers <br/>
58
  - Contact your hosting provider for the exact required parameters <br/>
59
- - See the 'Database Setup Help' section on step 1 for more details<br/>
60
  - Visit the online resources 'Common FAQ page' <br/>
61
- </div>
62
-
63
-
64
- </fieldset>
65
-
66
- <!-- ADVANCED OPTS -->
67
- <fieldset>
68
- <legend><b>Advanced Options</b></legend>
69
- <b>Manual Package Extraction:</b><br/>
70
- This allows you to manually extract the zip archive on your own. This can be useful if your system does not have the ZipArchive support enabled.
71
- <br/><br/>
72
-
73
- <b>File Timestamp:</b><br/>
74
- Choose 'Current' to set each file and directory to the current date-time on the server where it is being extracted. Choose 'Original' to retain the file date-time
75
- in the archive file. This option will not be applied if the 'Manual package extraction' option is checked.
76
- <br/><br/>
77
-
78
- <b>Enforce SSL on Admin:</b><br/>
79
- Turn off SSL support for WordPress. This sets FORCE_SSL_ADMIN in your wp-config file to false if true, otherwise it will create the setting if not set.
80
- <br/><br/>
81
-
82
- <b>Enforce SSL on Login:</b><br/>
83
- Turn off SSL support for WordPress Logins. This sets FORCE_SSL_LOGIN in your wp-config file to false if true, otherwise it will create the setting if not set.
84
- <br/><br/>
85
-
86
- <b>Keep Cache Enabled:</b><br/>
87
- Turn off Cache support for WordPress. This sets WP_CACHE in your wp-config file to false if true, otherwise it will create the setting if not set.
88
- <br/><br/>
89
-
90
- <b>Keep Cache Home Path:</b><br/>
91
- This sets WPCACHEHOME in your wp-config file to nothing if true, otherwise nothing is changed.
92
- <br/><br/>
93
-
94
- <b>Fix non-breaking space characters:</b><br/>
95
- The process will remove utf8 characters represented as 'xC2' 'xA0' and replace with a uniform space. Use this option if you find strange question marks in you posts
96
- <br/><br/>
97
-
98
- <div id="help-mysql-mode">
99
- <b>Mysql Mode:</b><br/>
100
- The sql_mode option controls additional options you can pass to the MySQL server during the database import process. This option is only set <i>per session</i>
101
- (during the Duplicator step 1 install process) and the modes here will return to their original state after step one runs. The sql_mode options will vary
102
- based on each version of mysql. Below is a list list of links to the most recent MySQL versions.<br/>
103
-
104
- <ul>
105
- <li><a href="http://dev.mysql.com/doc/refman/5.5/en/sql-mode.html" target="_blank">MySQL Server 5.5 sql_mode options</a></li>
106
- <li><a href="http://dev.mysql.com/doc/refman/5.6/en/sql-mode.html" target="_blank">MySQL Server 5.6 sql_mode options</a></li>
107
- <li><a href="http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html" target="_blank">MySQL Server 5.7 sql_mode options</a></li>
108
- </ul>
109
-
110
- This option creates a SET SESSION query such as <i>SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE'</i> and passes it to the MySQL server before any tables
111
- or data are created. The following options are available:
112
- <br/>
113
- <ul>
114
- <li>
115
- <b>Default:</b> This option will not do anything and uses the default setting specified by the my.ini sql_mode value or the server's default sql_mode setting.
116
- The installer-log.txt SQL_MODE value will show as NOT_SET if the my.ini sql_mode is not present or is set to empty.
117
- <br/><br/>
118
- </li>
119
- <li>
120
- <b>Disable:</b> This sets the sql_mode to an empty string which results in <i>SET SESSION sql_mode = ''</i>.
121
- The installer-log.txt SQL_MODE value will show as NOT_SET<br/><br/>
122
- </li>
123
- <li>
124
- <b>Custom:</b> This setting allows you to pass in a custom set of sql_mode options such as <i>SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE'</i>.
125
- In the custom field input box enter in the sql_mode optionsthat you need for
126
- your particular server setup.
127
- <br/><br/>
128
- Enter the sql mode as comma-separated values with no spaces, and <i>do not</i> include the 'SET SESSION' instruction. Be sure to pay attention to the MySQL server version and ensure it supports the specified options.
129
- The installer-log.txt file will record any errors that may occur while using this advanced option.
130
- </li>
131
- </ul>
132
-
133
- Please note that if the SQL_MODE in the installer-log.txt is not showing correctly that you may need to check your database users privileges. Also be sure that your MySQL
134
- server version supports all the the sql_mode options you're trying to pass.
135
- </div>
136
- <br/>
137
-
138
- <b>MySQL Charset &amp; MySQL Collation:</b><br/>
139
- When the database is populated from the SQL script it will use this value as part of its connection. Only change this value if you know what your databases character set should be.
140
- <br/>
141
- </fieldset>
142
- </div>
143
 
144
- <h3>Step 2 - Update</h3>
145
- <div id="dup-help-step2" class="dup-help-page">
146
-
147
- <!-- SETTINGS-->
148
- <fieldset>
149
- <legend><b>Settings</b></legend>
150
- <b>Old Settings:</b><br/>
151
- The URL and Path settings are the original values that the package was created with. These values should not be changed.
152
- <br/><br/>
153
-
154
- <b>New Settings:</b><br/>
155
- These are the new values (URL, Path and Title) you can update for the new location at which your site will be installed at.
156
- <br/>
157
- </fieldset>
158
-
159
- <!-- NEW ADMIN ACCOUNT-->
160
- <fieldset>
161
- <legend><b>New Admin Account</b></legend>
162
- <b>Username:</b><br/>
163
- The new username to create. This will create a new WordPress administrator account. Please note that usernames are not changeable from the within the UI.
164
- <br/><br/>
165
-
166
- <b>Password:</b><br/>
167
- The new password for the user.
168
- <br/>
169
- </fieldset>
170
-
171
- <!-- ADVANCED OPTS -->
172
- <fieldset>
173
- <legend><b>Advanced Options</b></legend>
174
- <b>Site URL:</b><br/>
175
- For details see WordPress <a href="http://codex.wordpress.org/Changing_The_Site_URL" target="_blank">Site URL</a> &amp; <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory" target="_blank">Alternate Directory</a>. If you're not sure about this value then leave it the same as the new settings URL.
176
- <br/><br/>
177
-
178
- <b>Scan Tables:</b><br/>
179
- Select the tables to be updated. This process will update all of the 'Old Settings' with the 'New Settings'. Hold down the 'ctrl key' to select/deselect multiple.
180
- <br/><br/>
181
-
182
- <b>Activate Plugins:</b><br/>
183
- These plug-ins are the plug-ins that were activated when the package was created and represent the plug-ins that will be activated after the install.
184
- <br/><br/>
185
-
186
- <b>Post GUID:</b><br/>
187
- If your moving a site keep this value checked. For more details see the <a href="http://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note" target="_blank">notes on GUIDS</a>. Changing values in the posts table GUID column can change RSS readers to evaluate that the posts are new and may show them in feeds again.
188
- <br/><br/>
189
-
190
- <b>Full Search:</b><br/>
191
- Full search forces a scan of every single cell in the database. If it is not checked then only text based columns are searched which makes the update process much faster.
192
- <br/>
193
- </fieldset>
194
 
195
- </div>
196
 
197
- <h3>Step 3 - Test</h3>
198
- <div id="dup-help-step3" class="dup-help-page">
199
- <fieldset>
200
- <legend><b>Final Steps</b></legend>
 
 
201
 
202
- <b>Resave Permalinks</b><br/>
203
- Re-saving your perma-links will reconfigure your .htaccess file to match the correct path on your server. This step requires logging back into the WordPress administrator.
204
- <br/><br/>
 
205
 
206
- <b>Delete Installer Files</b><br/>
207
- When you're completed with the installation please delete all installer files. Leaving these files on your server can impose a security risk!
208
- <br/><br/>
 
 
209
 
210
- <b>Test Entire Site</b><br/>
211
- After the install is complete run through your entire site and test all pages and posts.
212
- <br/><br/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
213
 
214
- <b>View Install Report</b><br/>
215
- The install report is designed to give you a synopsis of the possible errors and warnings that may exist after the installation is completed.
216
- <br/>
217
- </fieldset>
218
- </div>
219
 
220
-
221
- <h3>Troubleshooting Tips</h3>
222
- <div id="troubleshoot" class="dup-help-page">
223
- <fieldset>
224
- <legend><b>Quick Overview</b></legend>
225
-
226
- <div style="padding: 0px 10px 10px 10px;">
227
- <b>Common Quick Fix Issues:</b>
228
- <ul>
229
- <li>Use an <a href='https://snapcreek.com/duplicator/docs/faqs-tech/#faq-resource-040-q' target='_blank'>approved hosting provider</a></li>
230
- <li>Validate directory and file permissions (see below)</li>
231
- <li>Validate web server configuration file (see below)</li>
232
- <li>Clear your browsers cache</li>
233
- <li>Deactivate and reactivate all plugins</li>
234
- <li>Resave a plugins settings if it reports errors</li>
235
- <li>Make sure your root directory is empty</li>
236
- </ul>
237
-
238
- <b>Permissions:</b><br/>
239
- Not all operating systems are alike. Therefore, when you move a package (zip file) from one location to another the file and directory permissions may not always stick. If this is the case then check your WordPress directories and make sure it's permissions are set to 755. For files make sure the permissions are set to 644 (this does not apply to windows servers). Also pay attention to the owner/group attributes. For a full overview of the correct file changes see the <a href='http://codex.wordpress.org/Hardening_WordPress#File_permissions' target='_blank'>WordPress permissions codex</a>
240
- <br/><br/>
241
 
242
- <b>Web server configuration files:</b><br/>
243
- For Apache web server the root .htaccess file was copied to .htaccess.orig. A new stripped down .htaccess file was created to help simplify access issues. For IIS web server the web.config file was copied to web.config.orig, however no new web.config file was created. If you have not altered this file manually then resaving your permalinks and resaving your plugins should resolve most all changes that were made to the root web configuration file. If your still experiencing issues then open the .orig file and do a compare to see what changes need to be made. <br/><br/><b>Plugin Notes:</b><br/> It's impossible to know how all 3rd party plugins function. The Duplicator attempts to fix the new install URL for settings stored in the WordPress options table. Please validate that all plugins retained there settings after installing. If you experience issues try to bulk deactivate all plugins then bulk reactivate them on your new duplicated site. If you run into issues were a plugin does not retain its data then try to resave the plugins settings.
244
- <br/><br/>
245
 
246
- <b>Cache Systems:</b><br/>
247
- Any type of cache system such as Super Cache, W3 Cache, etc. should be emptied before you create a package. Another alternative is to include the cache directory in the directory exclusion path list found in the options dialog. Including a directory such as \pathtowordpress\wp-content\w3tc\ (the w3 Total Cache directory) will exclude this directory from being packaged. In is highly recommended to always perform a cache empty when you first fire up your new site even if you excluded your cache directory.
248
- <br/><br/>
 
 
 
 
 
 
 
 
 
 
 
249
 
250
- <b>Trying Again:</b><br/>
251
- If you need to retry and reinstall this package you can easily run the process again by deleting all files except the installer.php and package file and then browse to the installer.php again.
252
- <br/><br/>
 
 
 
 
 
 
 
 
253
 
254
- <b>Additional Notes:</b><br/>
255
- If you have made changes to your PHP files directly this might have an impact on your duplicated site. Be sure all changes made will correspond to the sites new location.
256
- Only the package (zip file) and the installer.php file should be in the directory where you are installing the site. Please read through our knowledge base before submitting any issues.
257
- If you have a large log file that needs evaluated please email the file, or attach it to a help ticket.
258
- <br/><br/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
259
 
260
- </div>
261
- </fieldset>
262
  </div>
263
 
264
- <div style="text-align:center">For in-depth help please see the <a href="https://snapcreek.com/duplicator/docs/" target="_blank">online resources</a></div>
265
 
266
- <br/><br/>
267
- </div>
 
 
 
 
 
 
 
 
 
 
 
 
1
  <!-- =========================================
2
  HELP FORM -->
3
+ <div id="main-help">
4
+ <div class="help-online">
5
+ <i class="fa fa-file-text-o"></i> For additional help visit the<br/> <a href="https://snapcreek.com/support/docs/" target="_blank">Online Knowledge-Base</a><br/>
6
+ <small>Features available only in Duplicator Pro are flagged with a <sup>pro</sup> tag.</small>
7
+ </div>
8
+
9
+ <h2>Installer Security</h2>
10
+ <a name="help-s1-init"></a>
11
+ <div id="dup-help-installer" class="help-page">
12
+ The installer security screen <sup>pro</sup> will allow for basic password protection on the installer. The password is set at package creation time. The password
13
+ input on this screen must be entered before proceeding with an install. This setting is optional and can be turned on/off via the package creation screens.
14
+ <br/><br/>
15
+
16
+ If you do not recall the password then login to the site where the package was created and click the details of the package to view the original password.
17
+ To validate the password just typed you can toggle the view by clicking on the lock icon.
18
+ <br/><br/>
19
+ </div>
20
+
21
+ <!-- ============================================
22
+ STEP 1
23
+ ============================================== -->
24
+ <a class="help-target" name="help-s1"></a>
25
+ <h2>Step <span class="step">1</span> of 4: Extract Archive</h2>
26
+ <div id="dup-help-scanner" class="help-page">
27
+ The "Extract Archive" screen is separated into four sections:
28
+ <br/><br/>
29
+
30
+ <h3>Archive File</h3>
31
+ This is the archive file the installer must use in order to extract the web site files and database. The 'Name' is a unique key that
32
+ ties both the archive and installer together. The installer needs the archive file name to match the 'Name' value exactly character for character in order
33
+ for this section to get a pass status.
34
+ <br/><br/>
35
+ If the archive name is ever changed then it should be renamed back to the 'Name' value in order for the installer to properly identify it as part of a
36
+ complete package. Additional information such as the archive size and the package notes are mentioned in this section.
37
+ <br/><br/>
38
+
39
+ <h3>System Checks</h3>
40
+ This section shows the installers system requirements and notices. All requirements must pass in order to proceed to Step 2. Each requirement will show
41
+ a Pass/Fail status. Notices on the other hand are <u>not</u> required in order to continue with the install.
42
+ <br/><br/>
43
+
44
+ Notices are simply checks that will help you
45
+ identify any possible issues that might occur. If this section shows a <i style='color:maroon'>'Fail' or 'Warn'</i> status then click on the title link and
46
+ read the overview for how to solve the check.
47
+ <br/><br/>
48
+
49
+ <h3>Advanced Options</h3>
50
+ The advanced options for step 1 can help better prepare your site should your server need additional settings beyond most general configuration.
51
+ <table class="help-opt">
52
+ <tr>
53
+ <th>Option</th>
54
+ <th>Details</th>
55
+ </tr>
56
+ <tr>
57
+ <td>Extraction</td>
58
+ <td>
59
+ Check this box if the archive file has been manually extracted on the server. This setting can be helpful if you have a large
60
+ archive files or are having issues with the installer extracting the file due to timeout or ZipArchive errors.
61
+ </td>
62
+ </tr>
63
+ <tr>
64
+ <td>Config Files <sup>pro</sup></td>
65
+ <td>
66
+ Inside the archive.zip should be a copy of the original .htaccess (Apache) or the web.config (IIS) files that were setup with your packaged site.
67
+ When the installer runs it will backup and then reset all <i>.htaccess, user.ini, and web.config</i> files. It will then create blank copies of
68
+ both files. This is needed because the original files that were archived in most cases will not play well in the new environment.
69
+ <br/><br/>
70
+
71
+ There are cases where users do not want these files over-written after the installer runs. If that is the case then check the checkbox for this setting
72
+ to retain the original web server configuration files you had on the original site that was archived. This is an advanced feature and requires that you
73
+ know how to properly configure either the .htaccess or web.config files on your server.
74
+ </td>
75
+ </tr>
76
+ <tr>
77
+ <td>Logging</td>
78
+ <td>
79
+ The level of detail that will be sent to the log file (installer-log.txt). The recommend setting for most installs should be 'Light'.
80
+ Note if you use Debug the amount of data written can be very large. Debug is only recommended for support.
81
+ </td>
82
+ </tr>
83
+ <tr>
84
+ <td>Archive Engine <sup>pro</sup></td>
85
+ <td>The extraction engine that will be used to extract the archive file.</td>
86
+ </tr>
87
+ <tr>
88
+ <td>File Timestamp</td>
89
+ <td>When the archive is extracted should it show current date-time or keep the original time it had when it was built.</td>
90
+ </tr>
91
+ <tr>
92
+ <td>Permissions <sup>pro</sup></td>
93
+ <td>The installer will attempt to run a <a href="http://php.net/manual/en/function.chmod.php" target="_blank">chmod command</a> on both the files
94
+ and directories. Choose the chmod settings for each all files and all directories.
95
+ </td>
96
+ </tr>
97
+ </table>
98
+ <br/><br/>
99
+
100
+ <h3>Terms &amp; Notices</h3>
101
+ To proceed with the install users must check the checkbox labeled " I have read and accept all terms &amp; notices".
102
+ <br/><br/>
103
+
104
+ </div>
105
+
106
+
107
+ <!-- ============================================
108
+ STEP 2
109
+ ============================================== -->
110
+ <a class="help-target" name="help-s2"></a>
111
+ <h2>Step <span class="step">2</span> of 4: Install Database</h2>
112
+ <div id="dup-help-step1" class="help-page">
113
+
114
+ <h3>Basic/cPanel:</h3>
115
+ There are currently two options you can use to perform the database setup. The "Basic" option requires knowledge about the existing server and on most hosts
116
+ will require that the database be setup ahead of time. The cPanel option is for hosts that support <a href="http://cpanel.com/" target="_blank">cPanel Software</a>.
117
+ This option will automatically show you the existing databases and users on your cPanel server and allow you to create new databases directly
118
+ from the installer.
119
+ <br/><br/>
120
+
121
+ <h3>cPanel Login <sup>pro</sup></h3>
122
+ The cPanel connectivity option is only available for Duplicator Pro.
123
+ <table class="help-opt">
124
+ <tr>
125
+ <th>Option</th>
126
+ <th>Details</th>
127
+ </tr>
128
+ <tr>
129
+ <td>Host</td>
130
+ <td>This should be the primary domain account URL that is associated with your host. Most hosts will require you to register a primary domain name.
131
+ This should be the URL that you place in the host field. For example if your primary domain name is "mysite.com" then you would enter in
132
+ "https://mysite.com:2083". The port 2038 is the common port number that cPanel works on. If you do not know your primary domain name please contact your
133
+ hosting provider or server administrator.</td>
134
+ </tr>
135
+ <tr>
136
+ <td>Username</td>
137
+ <td>The cPanel username used to login to your cPanel account. <i>This is <b>not</b> the same thing as your WordPress administrator account</i>.
138
+ If your unsure of this name please contact your hosting provider or server administrator.</td>
139
+ </tr>
140
+ <tr>
141
+ <td>Password</td>
142
+ <td>The password of the cPanel user</td>
143
+ </tr>
144
+ <tr>
145
+ <td>Troubleshoot</td>
146
+ <td>
147
+ <b>Common cPanel Connection Issues:</b><br/>
148
+ - Your host does not use <a href="http://cpanel.com/" target="_blank">cPanel Software</a> <br/>
149
+ - Your host has disabled cPanel API access <br/>
150
+ - Your host has configured cPanel to work differently (please contact your host) <br/>
151
+ - View a list of valid cPanel <a href='https://snapcreek.com/wordpress-hosting/' target='_blank'>Supported Hosts</a>
152
+ </td>
153
+ </tr>
154
+ </table>
155
+ <br/><br/>
156
+
157
+ <!-- DATABASE SERVER -->
158
+ <h3>Database Setup</h3>
159
+ The database setup options allow you to connect to an existing database or in the case of cPanel connect or create a new database.
160
+ <table class="help-opt">
161
+ <tr>
162
+ <th>Option</th>
163
+ <th>Details</th>
164
+ </tr>
165
+ <tr>
166
+ <td>Action</td>
167
+ <td>
168
+ <b>Create New Database:</b> Will attempt to create a new database if it does not exist. When using the 'Basic' option this option will not work on many
169
+ hosting providers as the ability to create new databases is normally locked down. If the database does not exist then you will need to login to your
170
+ control panel and create the database. If your host supports 'cPanel' then you can use this option to create a new database after logging in via your
171
+ cPanel account.
172
+ <br/><br/>
173
+
174
+ <b>Connect and Delete Any Existing Data:</b> This options will DELETE all tables in the database you are connecting to. Please make sure you have
175
+ backups of all your data before using an portion of the installer, as this option WILL remove all data.
176
+ <br/><br/>
177
+
178
+ <b>Connect and Backup Any Existing Data:</b> This options will RENAME all tables in the database you are connecting to with a prefix of
179
+ "<?php echo $GLOBALS['DB_RENAME_PREFIX'] ?>".
180
+ <br/><br/>
181
+
182
+ <b>Manual SQL Execution:</b> This options requires that you manually run your own SQL import to an existing database before running the installer.
183
+ When this action is selected the database.sql file found inside the archive.zip file will NOT be ran. The database your connecting to should already
184
+ be a valid WordPress installed database. This option is viable when you need to run advanced search and replace options on the database.
185
+ <br/><br/>
186
+
187
+ </td>
188
+ </tr>
189
+ <tr>
190
+ <td>Host</td>
191
+ <td>The name of the host server that the database resides on. Many times this will be 'localhost', however each hosting provider will have it's own naming
192
+ convention please check with your server administrator or host to valid for sure the name needed. To add a port number just append it to the host i.e.
193
+ 'localhost:3306'.</td>
194
+ </tr>
195
+ <tr>
196
+ <td>Database</td>
197
+ <td>The name of the database to which this installation will connect and install the new tables and data into. Some hosts will require a prefix while others
198
+ do not. Be sure to know exactly how your host requires the database name to be entered.</td>
199
+ </tr>
200
+ <tr>
201
+ <td>User</td>
202
+ <td>The name of a MySQL database server user. This is special account that has privileges to access a database and can read from or write to that database.
203
+ <i>This is <b>not</b> the same thing as your WordPress administrator account</i>.</td>
204
+ </tr>
205
+ <tr>
206
+ <td>Password</td>
207
+ <td>The password of the MySQL database server user.</td>
208
+ </tr>
209
+ <tr>
210
+ <td>Prefix:<sup>pro*</sup></td>
211
+ <td>By default, databases are prefixed with the cPanel account's username (for example, myusername_databasename). However you can ignore this option if
212
+ your host does not use the default cPanel username prefix schema. Check the 'Ignore cPanel Prefix' and the username prefixes will be ignored.
213
+ This will still require you to enter in the cPanels required setup prefix if they require one. The checkbox will be set to read-only if your host has
214
+ disabled prefix settings. Please see your host full requirements when using the cPanel options.</td>
215
+ </tr>
216
+ </table>
217
+ <sup>*cPanel Only Option</sup>
218
+ <br/><br/>
219
+
220
+ <h3>Test Database</h3>
221
+ Testing the database connection is important and can help isolate possible issues that may arise with database version and compatibility issues.
222
+
223
+ <table class="help-opt">
224
+ <tr>
225
+ <th>Option</th>
226
+ <th>Details</th>
227
+ </tr>
228
+ <tr>
229
+ <td>Test Connection</td>
230
+ <td>
231
+ The test connection button will help validate if the connection parameters are correct for this server. There are three separate validation parameters:
232
  <ul>
233
  <li><b>Host:</b> Returns a status to indicate if the server host name is a valid host name <br/><br/></li>
234
  <li><b>Database:</b> Returns a status to indicate if the database name is a valid <br/><br/></li>
235
+ <li><b>Version:</b> Shows the difference in database engine version numbers. If the package was created on a newer database version than where its trying
236
+ to be installed then you can run into issues. Its best to make sure the server where the installer is running has the same or higher version number than
237
  where it was built.</li>
238
  </ul>
 
239
 
240
+ </td>
241
+ </tr>
242
+ <tr>
243
+ <td>Troubleshoot</td>
244
+ <td>
245
  <b>Common Database Connection Issues:</b><br/>
246
  - Double check case sensitive values 'User', 'Password' &amp; the 'Database Name' <br/>
247
  - Validate the database and database user exist on this server <br/>
248
  - Check if the database user has the correct permission levels to this database <br/>
249
  - The host 'localhost' may not work on all hosting providers <br/>
250
  - Contact your hosting provider for the exact required parameters <br/>
 
251
  - Visit the online resources 'Common FAQ page' <br/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
 
253
+ </td>
254
+ </tr>
255
+ </table>
256
+ <br/><br/>
257
+
258
+ <!-- ADVANCED OPTS -->
259
+ <h3>Advanced Options</h3>
260
+ <table class="help-opt">
261
+ <tr>
262
+ <th>Option</th>
263
+ <th>Details</th>
264
+ </tr>
265
+ <tr>
266
+ <td>Spacing</td>
267
+ <td>The process will remove utf8 characters represented as 'xC2' 'xA0' and replace with a uniform space. Use this option if you find strange question
268
+ marks in you posts</td>
269
+ </tr>
270
+ <tr>
271
+ <td>Mode</td>
272
+ <td>The MySQL mode option will allow you to set the mode for this session. It is very useful when running into conversion issues. For a full overview please
273
+ see the <a href="https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html" target="_blank">MySQL mode documentation</a> specific to your version.</td>
274
+ </tr>
275
+ <tr>
276
+ <td>Charset</td>
277
+ <td>When the database is populated from the SQL script it will use this value as part of its connection. Only change this value if you know what your
278
+ databases character set should be.</td>
279
+ </tr>
280
+ <tr>
281
+ <td>Collation</td>
282
+ <td>When the database is populated from the SQL script it will use this value as part of its connection. Only change this value if you know what your
283
+ databases character set should be.</td>
284
+ </tr>
285
+ </table>
286
+ <br/><br/>
287
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
288
 
 
289
 
290
+ <!-- ============================================
291
+ STEP 3
292
+ ============================================== -->
293
+ <a class="help-target" name="help-s3"></a>
294
+ <h2>Step <span class="step">3</span> of 4: Data Replacement</h2>
295
+ <div id="dup-help-step2" class="help-page">
296
 
297
+ <!-- SETTINGS-->
298
+ <h3>New Settings</h3>
299
+ These are the new values (URL, Path and Title) you can update for the new location at which your site will be installed at.
300
+ <br/><br/>
301
 
302
+ <h3>Custom Replace <sup>pro</sup></h3>
303
+ This section will allow you to add as many custom search and replace items that you would like. For example you can search for other URLs to replace. Please use high
304
+ caution when using this feature as it can have unintended consequences as it will search the entire database. It is recommended to only use highly unique items such as
305
+ full URL or file paths with this option.
306
+ <br/><br/>
307
 
308
+ <!-- ADVANCED OPTS -->
309
+ <h3>Advanced Options</h3>
310
+ <table class="help-opt">
311
+ <tr>
312
+ <th>Option</th>
313
+ <th>Details</th>
314
+ </tr>
315
+ <tr>
316
+ <td colspan="2" class="section">New Admin Account</td>
317
+ </td>
318
+ <tr>
319
+ <td>Username</td>
320
+ <td>A new WordPress username to create. This will create a new WordPress administrator account. Please note that usernames are not changeable from the within the UI.</td>
321
+ </tr>
322
+ <tr>
323
+ <td>Password</td>
324
+ <td>The new password for the new user. Must be at least 6 characters long.</td>
325
+ </tr>
326
+ <tr>
327
+ <td colspan="2" class="section">WP-Config File</td>
328
+ </td>
329
+ <tr>
330
+ <td>Config SSL</td>
331
+ <td>Turn off SSL support for WordPress. This sets FORCE_SSL_ADMIN in your wp-config file to false if true, otherwise it will create the setting if not set. The "Enforce on Login"
332
+ will turn off SSL support for WordPress Logins. This sets FORCE_SSL_LOGIN in your wp-config file to false if true, otherwise it will create the setting if not set.</td>
333
+ </tr>
334
+ <tr>
335
+ <td>Config Cache</td>
336
+ <td>Turn off Cache support for WordPress. This sets WP_CACHE in your wp-config file to false if true, otherwise it will create the setting if not set. The "Keep Home Path"
337
+ sets WPCACHEHOME in your wp-config file to nothing if true, otherwise nothing is changed.</td>
338
+ </tr>
339
+ <tr>
340
+ <td colspan="2" class="section">Scan Options</td>
341
+ </td>
342
+ <tr>
343
+ <td>Cleanup <sup>pro</sup></td>
344
+ <td>The checkbox labeled Remove schedules &amp; storage endpoints will empty the Duplicator schedule and storage settings. This is recommended to keep enabled so that you do not have unwanted schedules and storage options enabled.</td>
345
+ </tr>
346
+ <tr>
347
+ <td>Old URL</td>
348
+ <td>The old URL of the original values that the package was created with. These values should not be changed, unless you know the underlying reasons</td>
349
+ </tr>
350
+ <tr>
351
+ <td>Old Path</td>
352
+ <td>The old path of the original values that the package was created with. These values should not be changed, unless you know the underlying reasons</td>
353
+ </tr>
354
+ <tr>
355
+ <td>Site URL</td>
356
+ <td> For details see WordPress <a href="http://codex.wordpress.org/Changing_The_Site_URL" target="_blank">Site URL</a> &amp; <a href="http://codex.wordpress.org/Giving_WordPress_Its_Own_Directory" target="_blank">Alternate Directory</a>. If you're not sure about this value then leave it the same as the new settings URL.</td>
357
+ </tr>
358
+ <tr>
359
+ <td>Scan Tables</td>
360
+ <td>Select the tables to be updated. This process will update all of the 'Old Settings' with the 'New Settings'. Hold down the 'ctrl key' to select/deselect multiple.</td>
361
+ </tr>
362
+ <tr>
363
+ <td>Activate Plugins</td>
364
+ <td>These plug-ins are the plug-ins that were activated when the package was created and represent the plug-ins that will be activated after the install.</td>
365
+ </tr>
366
+ <tr>
367
+ <td>Post GUID</td>
368
+ <td>If your moving a site keep this value checked. For more details see the <a href="http://codex.wordpress.org/Changing_The_Site_URL#Important_GUID_Note" target="_blank">notes on GUIDS</a>. Changing values in the posts table GUID column can change RSS readers to evaluate that the posts are new and may show them in feeds again.</td>
369
+ </tr>
370
+ <tr>
371
+ <td>Full Search</td>
372
+ <td>Full search forces a scan of every single cell in the database. If it is not checked then only text based columns are searched which makes the update process much faster.
373
+ Use this option if you have issues with data not updating correctly.</td>
374
+ </tr>
375
+ </table>
376
+ <br/><br/>
377
+ </div>
378
 
 
 
 
 
 
379
 
380
+ <!-- ============================================
381
+ STEP 4
382
+ ============================================== -->
383
+ <a class="help-target" name="help-s4"></a>
384
+ <h2>Step <span class="step">4</span> of 4: Test Site</h2>
385
+ <div id="dup-help-step3" class="help-page">
386
+ <h3>Final Steps</h3>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
387
 
388
+ <b>Review Install Report</b><br/>
389
+ The install report is designed to give you a synopsis of the possible errors and warnings that may exist after the installation is completed.
390
+ <br/><br/>
391
 
392
+ <b>Test Site</b><br/>
393
+ After the install is complete run through your entire site and test all pages and posts.
394
+ <br/><br/>
395
+
396
+ <b>Security Cleanup</b><br/>
397
+ When you're completed with the installation please delete all installation files. Leaving these files on your server can impose a security risk!
398
+ <br/><br/>
399
+
400
+ </div>
401
+
402
+
403
+ <a class="help-target" name="help-s5"></a>
404
+ <h2>Troubleshooting Tips</h2>
405
+ <div id="troubleshoot" class="help-page">
406
 
407
+ <div style="padding: 0px 10px 10px 10px;">
408
+ <b>Common Quick Fix Issues:</b>
409
+ <ul>
410
+ <li>Use an <a href='https://snapcreek.com/wordpress-hosting/' target='_blank'>approved hosting provider</a></li>
411
+ <li>Validate directory and file permissions (see below)</li>
412
+ <li>Validate web server configuration file (see below)</li>
413
+ <li>Clear your browsers cache</li>
414
+ <li>Deactivate and reactivate all plugins</li>
415
+ <li>Resave a plugins settings if it reports errors</li>
416
+ <li>Make sure your root directory is empty</li>
417
+ </ul>
418
 
419
+ <b>Permissions:</b><br/>
420
+ Not all operating systems are alike. Therefore, when you move a package (zip file) from one location to another the file and directory permissions may not always stick. If this is the case then check your WordPress directories and make sure it's permissions are set to 755. For files make sure the permissions are set to 644 (this does not apply to windows servers). Also pay attention to the owner/group attributes. For a full overview of the correct file changes see the <a href='http://codex.wordpress.org/Hardening_WordPress#File_permissions' target='_blank'>WordPress permissions codex</a>
421
+ <br/><br/>
422
+
423
+ <b>Web server configuration files:</b><br/>
424
+ For Apache web server the root .htaccess file was copied to .htaccess.orig. A new stripped down .htaccess file was created to help simplify access issues. For IIS web server the web.config file was copied to web.config.orig, however no new web.config file was created. If you have not altered this file manually then resaving your permalinks and resaving your plugins should resolve most all changes that were made to the root web configuration file. If your still experiencing issues then open the .orig file and do a compare to see what changes need to be made. <br/><br/><b>Plugin Notes:</b><br/> It's impossible to know how all 3rd party plugins function. The Duplicator attempts to fix the new install URL for settings stored in the WordPress options table. Please validate that all plugins retained there settings after installing. If you experience issues try to bulk deactivate all plugins then bulk reactivate them on your new duplicated site. If you run into issues were a plugin does not retain its data then try to resave the plugins settings.
425
+ <br/><br/>
426
+
427
+ <b>Cache Systems:</b><br/>
428
+ Any type of cache system such as Super Cache, W3 Cache, etc. should be emptied before you create a package. Another alternative is to include the cache directory in the directory exclusion path list found in the options dialog. Including a directory such as \pathtowordpress\wp-content\w3tc\ (the w3 Total Cache directory) will exclude this directory from being packaged. In is highly recommended to always perform a cache empty when you first fire up your new site even if you excluded your cache directory.
429
+ <br/><br/>
430
+
431
+ <b>Trying Again:</b><br/>
432
+ If you need to retry and reinstall this package you can easily run the process again by deleting all files except the installer and package file and then browse to the installer again.
433
+ <br/><br/>
434
+
435
+ <b>Additional Notes:</b><br/>
436
+ If you have made changes to your PHP files directly this might have an impact on your duplicated site. Be sure all changes made will correspond to the sites new location.
437
+ Only the package (zip file) and the installer (php file) should be in the directory where you are installing the site. Please read through our knowledge base before submitting any issues.
438
+ If you have a large log file that needs evaluated please email the file, or attach it to a help ticket.
439
+ <br/><br/>
440
 
 
 
441
  </div>
442
 
443
+ </div>
444
 
445
+ <div style="text-align:center">For additional help please visit the <a href="https://snapcreek.com/support/docs/" target="_blank">online resources</a></div>
446
+
447
+ <br/><br/>
448
+ </div>
449
+ <!-- END OF VIEW HELP -->
installer/build/view.step0.php DELETED
@@ -1,13 +0,0 @@
1
- <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
- /*
10
- * To change this template, choose Tools | Templates
11
- * and open the template in the editor.
12
- */
13
- ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
installer/build/view.step1.php CHANGED
@@ -1,689 +1,574 @@
1
  <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
- //DETECT ARCHIVE FILES
10
- $zip_files = DUPX_Util::get_zip_files();
11
- $zip_count = count($zip_files);
12
-
13
- if ($zip_count > 1) {
14
- $zip_name = "Too many zip files in directory";
15
- } else if ($zip_count == 1) {
16
- $zip_name = $zip_files[0];
17
- } else {
18
- $zip_name = "No package file found";
19
- }
20
-
21
- $req01a = @is_writeable($GLOBALS["CURRENT_ROOT_PATH"]) ? 'Pass' : 'Fail';
22
- if (is_dir($GLOBALS["CURRENT_ROOT_PATH"])) {
23
- if ($dh = @opendir($GLOBALS["CURRENT_ROOT_PATH"])) {
24
- closedir($dh);
25
- } else {
26
- $req01a = 'Fail';
27
- }
28
- }
29
- $req01b = ($zip_count == 1) ? 'Pass' : 'Fail';
30
- $req01 = ($req01a == 'Pass' && $req01b == 'Pass') ? 'Pass' : 'Fail';
31
- $safe_ini = strtolower(@ini_get('safe_mode'));
32
- $req02 = $safe_ini != 'on' || $safe_ini != 'yes' || $safe_ini != 'true' || ini_get("safe_mode") != 1 ? 'Pass' : 'Fail';
33
- $req03 = function_exists('mysqli_connect') ? 'Pass' : 'Fail';
34
- $php_compare = version_compare(phpversion(), '5.2.9');
35
- $req04 = $php_compare >= 0 ? 'Pass' : 'Fail';
36
- $total_req = ($req01 == 'Pass' && $req02 == 'Pass' && $req03 == 'Pass' && $req04 == 'Pass') ? 'Pass' : 'Fail';
 
 
 
 
 
 
 
 
 
 
 
37
  ?>
38
 
39
 
40
- <!-- =========================================
41
- VIEW: STEP 1- INPUT -->
42
- <form id='dup-step1-input-form' method="post" class="content-form" data-parsley-validate="true" data-parsley-excluded="input[type=hidden], [disabled], :hidden">
43
- <input type="hidden" name="action_ajax" value="1" />
44
- <input type="hidden" name="action_step" value="1" />
45
- <input type="hidden" name="package_name" value="<?php echo $zip_name ?>" />
46
-
47
- <div class="hdr-main">
48
- Step 1: Deploy Files &amp; Database
49
- </div>
50
-
51
- <!-- CHECKS: FAIL -->
52
- <?php if ( $total_req == 'Fail') : ?>
53
-
54
- <div class="dup-box">
55
- <div class="dup-box-title">
56
- <div id="system-circle" class="circle-fail"></div> &nbsp; Requirements: Fail
57
- <div class="dup-box-arrow"></div>
58
- </div>
59
- <div class="dup-box-panel" style="display:none">
60
- <div id="dup-s1-result-container"></div>
61
- </div>
62
- </div><br/>
63
-
64
- <i id="s1-sys-req-msg">
65
- This installation will not be able to proceed until the system requirements pass. Please validate your system requirements by clicking on the button above.
66
- In order to get these values to pass please contact your server administrator, hosting provider or visit the online FAQ.
67
- </i><br/>
68
-
69
- <div style="line-height:28px; font-size:14px; padding:0px 0px 0px 30px; font-weight:normal">
70
- <b>Helpful Resources:</b><br/>
71
- &raquo; <a href="https://snapcreek.com/duplicator/docs/faqs-tech/" target="_blank">Common FAQs</a> <br/>
72
- &raquo; <a href="https://snapcreek.com/duplicator/docs/guide/" target="_blank">User Guide</a> <br/>
73
- &raquo; <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-resource-040-q" target="_blank">Approved Hosts</a> <br/>
74
- </div><br/>
75
-
76
- <!-- CHECKS: PASS -->
77
- <?php else : ?>
78
-
79
- <div class="dup-box">
80
- <div class="dup-box-title">
81
- <div id="system-circle" class="circle-pass"></div> &nbsp; Requirements: Pass
82
- <div class="dup-box-arrow"></div>
83
- </div>
84
- <div class="dup-box-panel" style="display:none">
85
- <div id="dup-s1-result-container"></div>
86
- </div>
87
- </div><br/>
88
-
89
- <div class="hdr-sub">
90
- MySQL Database
91
- </div>
92
- <table class="s1-opts">
93
- <tr>
94
- <td>Action</td>
95
- <td>
96
- <div class="s1-modes">
97
- <input type="radio" name="dbaction" id="dbaction-create" value="create" checked="checked" />
98
- <label for="dbaction-create">Create New Database</label>
99
- </div>
100
- <div class="s1-modes">
101
- <input type="radio" name="dbaction" id="dbaction-empty" value="empty" />
102
- <label for="dbaction-empty">Connect and Remove All Data</label>
103
- </div>
104
- </td>
105
- </tr>
106
- <tr>
107
- <td>Host</td>
108
- <td>
109
- <table class="s1-opts-dbhost">
110
- <tr>
111
- <td><input type="text" name="dbhost" id="dbhost" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBHOST']); ?>" placeholder="localhost" style="width:410px" /></td>
112
- <td style="vertical-align:top">
113
- <input id="s1-dbport-btn" type="button" onclick="Duplicator.togglePort()" class="s1-small-btn" value="Port: <?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
114
- <input name="dbport" id="dbport" type="text" style="width:80px; display:none" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
115
- </td>
116
- </tr>
117
- </table>
118
- </td>
119
- </tr>
120
- <tr>
121
- <td>Database</td>
122
- <td><input type="text" name="dbname" id="dbname" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBNAME']); ?>" placeholder="new or existing database name" /></td>
123
- </tr>
124
- <tr>
125
- <td>User</td>
126
- <td><input type="text" name="dbuser" id="dbuser" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBUSER']); ?>" placeholder="valid database username" /></td>
127
- </tr>
128
- <tr>
129
- <td>Password</td>
130
- <td><input type="text" name="dbpass" id="dbpass" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPASS']); ?>" placeholder="valid database user password" /></td>
131
- </tr>
132
- </table>
133
-
134
-
135
- <!-- =========================================
136
- DIALOG: DB CONNECTION CHECK -->
137
- <div id="s1-dbconn">
138
- <input type="button" onclick="Duplicator.dlgTestDB()" class="s1-small-btn" value="Test Connection" />
139
- <div id="s1-dbconn-status" style="display:none">
140
- <div style="padding: 0px 10px 10px 10px;">
141
- <div id="dbconn-test-msg" style="min-height:80px"></div>
142
- </div>
143
- <small><input type="button" onclick="$('#s1-dbconn-status').hide(500)" class="s1-small-btn" value="Hide Message" /></small>
144
- </div>
145
- </div>
146
-
147
- <div class="dup-s1-gopro">
148
- Create the database and users <b>from the installer</b> <br/> with <a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_step1&utm_campaign=duplicator_pro">Duplicator Pro!</a> - Requires cPanel.
149
- </div>
150
- <br/>
151
-
152
- <!-- ADVANCED OPTIONS -->
153
- <a href="javascript:void(0)" onclick="$('#dup-step1-adv-opts').toggle(250)"><b style="font-size:14px">Advanced Options...</b></a>
154
- <div id='dup-step1-adv-opts' style="display:none">
155
-
156
- <!-- GENERAL -->
157
- <div class="s1-advopts-section">
158
- <div class="hdr-sub">General</div>
159
- <table class="s1-opts s1-advopts">
160
- <tr>
161
- <td>Extraction</td>
162
- <td colspan="2">
163
- <input type="checkbox" name="zip_manual" id="zip_manual" value="1" /> <label for="zip_manual">Manual package extraction</label><br/>
164
- </td>
165
- </tr>
166
- <tr>
167
- <td>File Timestamp</td>
168
- <td colspan="2">
169
- <input type="radio" name="zip_filetime" id="zip_filetime_now" value="current" checked="checked" /> <label class="radio" for="zip_filetime_now" title='Set the files current date time to now'>Current</label>
170
- <input type="radio" name="zip_filetime" id="zip_filetime_orginal" value="original" /> <label class="radio" for="zip_filetime_orginal" title="Keep the files date time the same">Original</label>
171
- </td>
172
- </tr>
173
- <tr>
174
- <td>Logging</td>
175
- <td colspan="2">
176
- <input type="radio" name="logging" id="logging-light" value="1" checked="true"> <label class="radio" for="logging-light">Light</label>
177
- <input type="radio" name="logging" id="logging-detailed" value="2"> <label class="radio" for="logging-detailed">Detailed</label>
178
- <input type="radio" name="logging" id="logging-debug" value="3"> <label class="radio" for="logging-debug">Debug</label>
179
- </td>
180
- </tr>
181
- <tr>
182
- <td>WP-Config Cache</td>
183
- <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>
184
- <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>
185
- </tr>
186
- <tr>
187
- <td>WP-Config SSL</td>
188
- <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>
189
- <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>
190
- </tr>
191
- </table>
192
- </div>
193
-
194
- <!-- MYSQL -->
195
- <div class="s1-advopts-section">
196
- <div class="hdr-sub">MySQL</div>
197
- <table class="s1-opts s1-advopts">
198
- <tr>
199
- <td>Spacing</td>
200
- <td colspan="2">
201
- <input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label>
202
- </td>
203
- </tr>
204
- <tr>
205
- <td style="vertical-align:top">Mode</td>
206
- <td colspan="2">
207
- <input type="radio" name="dbmysqlmode" id="dbmysqlmode_1" checked="true" value="DEFAULT"/> <label for="dbmysqlmode_1">Default</label> &nbsp;
208
- <input type="radio" name="dbmysqlmode" id="dbmysqlmode_2" value="DISABLE"/> <label for="dbmysqlmode_2">Disable</label> &nbsp;
209
- <input type="radio" name="dbmysqlmode" id="dbmysqlmode_3" value="CUSTOM"/> <label for="dbmysqlmode_3">Custom</label> &nbsp;
210
- <div id="dbmysqlmode_3_view" style="display:none; padding:5px">
211
- <input type="text" name="dbmysqlmode_opts" value="" /><br/>
212
- <small>Separate additional <a href="?help#help-mysql-mode" target="_blank">sql modes</a> with commas &amp; no spaces.<br/>
213
- Example: <i>NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE,...</i>.</small>
214
- </div>
215
- </td>
216
- </tr>
217
- <tr><td style="width:130px">Charset</td><td><input type="text" name="dbcharset" id="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" /> </td></tr>
218
- <tr><td>Collation </td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
219
- </table>
220
- </div>
221
-
222
- <div class="s1-advopts-help">
223
- <small><i>For an overview of these settings see the <a href="?help=1" target="_blank">help page</a></i></small>
224
- </div>
225
- </div>
226
- <br/><br/>
227
-
228
- <!-- SETUP HELP -->
229
- <a href="javascript:void(0)" onclick="$('#dup-step1-cpanel').toggle(250)"><b style="font-size: 14px">Need Setup Help...</b></a>
230
- <div id='dup-step1-cpanel' style="display:none">
231
- <div style="padding:10px 0px 0px 10px;line-height:22px">
232
- &raquo; View the <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-resource-070-q" target="_blank">video tutorials</a> <br/>
233
- &raquo; Read helpful <a href="https://snapcreek.com/duplicator/docs/faqs-tech/" target="_blank">articles</a> <br/>
234
- &raquo; Visit the <a href="https://snapcreek.com/duplicator/docs/quick-start/" target="_blank">quick start guides</a>
235
- </div>
236
- </div>
237
- <br/><br/>
238
-
239
- <!-- NOTICES -->
240
- <a href="javascript:void(0)" onclick="$('#dup-s1-warning').toggle(250)"><b style="font-size:14px">Warnings &amp; Notices...</b></a>
241
- <div id="dup-s1-warning" style="display: none"><pre>Duplicator
242
- Copyright (c) 2017 Snapcreek LLC
243
-
244
- *** WARNINGS &amp; NOTICES ***
245
-
246
- DISCLAIMER:
247
- 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
248
- system besides the Duplicator. If you're not sure about how to use this tool then please enlist the guidance of a technical professional. Always test this installer
249
- in a sandbox environment before trying to deploy into a production setting.
250
-
251
- DATABASE:
252
- 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 that already exists will permanently
253
- DELETE all data in that database. This tool is designed to populate and fill a database with NEW data from a duplicated database using the SQL script in the package name above.
254
 
255
- SETUP:
256
- Only the archive and installer.php file should be in the install directory, unless you have manually extracted the package and checked the 'Manual Package Extraction' checkbox.
257
- All other files will be OVERWRITTEN during install. Make sure you have full backups of all your databases and files before continuing with an installation.
258
-
259
- MANUAL EXTRACTION:
260
- Manual extraction requires that all contents in the package are extracted to the same directory as the installer.php file. Manual extraction is only needed when your server
261
- does not support the ZipArchive extension. Please see the online help for more details.
262
-
263
- AFTER INSTALL:
264
- When you are done with the installation remove the installer.php, installer-data.sql and the installer-log.txt files from your directory. These files contain sensitive information
265
- and should not remain on a production system.
266
-
267
-
268
- *** END USER LICENSE AGREEMENT ***
269
-
270
- IMPORTANT: PLEASE READ THIS LICENSE CAREFULLY BEFORE USING THIS SOFTWARE.
271
-
272
- 1. LICENSE
273
-
274
- By receiving, opening the file package, and/or using Duplicator("Software") containing this software, you agree that this End User User License Agreement(EULA) is
275
- a legally binding and valid contract and agree to be bound by it. You agree to abide by the intellectual property laws and all of the terms and conditions of this Agreement.
276
-
277
- Unless you have a different license agreement signed by Snapcreek LLC your use of Duplicator indicates your acceptance of this license agreement and warranty.
278
 
279
- Subject to the terms of this Agreement, Snapcreek LLC grants to you a limited, non-exclusive, non-transferable free license, without right to sub-license, to use Duplicator
280
- in accordance with this Agreement and any other written agreement with Snapcreek LLC. Snapcreek LLC does not transfer the title of Duplicator to you; the license granted
281
- to you is not a sale the plugin is given free and as is. This agreement is a binding legal agreement between Snapcreek LLC and the purchasers or users of Duplicator.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
 
283
- If you do not agree to be bound by this agreement, remove Duplicator from your computer now and, if applicable, promptly all related documentation and files relating to
284
- Duplicator in your possession.
285
 
286
 
287
- 2. DISTRIBUTION
 
 
 
 
 
 
 
 
 
288
 
289
- Duplicator and the license herein granted shall not be sold, offered for re-sale, transferred or sub-licensed in whole. For information about redistribution of Duplicator
290
- contact Snapcreek LLC.
 
 
 
 
 
 
 
291
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
292
 
293
- 3. USER AGREEMENT
 
 
 
 
 
 
 
 
 
 
 
294
 
295
- 3.1 Use
 
 
 
 
 
 
 
296
 
297
- Duplicator is a free plugin offered for download at https://wordpress.org/plugins/duplicator and https://github.com/lifeinthegrid/duplicator
 
 
 
 
 
 
 
298
 
299
- 3.2 USE RESTRICTIONS
300
 
301
- You shall use Duplicator in compliance with all applicable laws and not for any unlawful purpose.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
302
 
 
 
 
 
 
 
 
 
 
 
303
 
304
- 3.3 LIMITATION OF RESPONSIBILITY
 
 
 
 
 
305
 
306
- You will indemnify, hold harmless, and defend Snapcreek LLC , its employees, agents and distributors against any and all claims, proceedings, demand and costs resulting from or in
307
- any way connected with your use of Snapcreek LLC's Software.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
308
 
309
- In no event (including, without limitation, in the event of negligence) will Snapcreek LLC , its employees, agents or distributors be liable for any consequential, incidental,
310
- indirect, special or punitive damages whatsoever (including, without limitation, damages for loss of profits, loss of use, business interruption, loss of information or data,
311
- or pecuniary loss), in connection with or arising out of or related to this Agreement, Duplicator or the use or inability to use Duplicator or the furnishing, performance or use
312
- of any other matters hereunder whether based upon contract, tort or any other theory including negligence.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
313
 
314
- Snapcreek LLC's entire liability, without exception, is limited to no monetary or financial costs
 
 
 
 
315
 
316
- 3.4 WARRANTIES
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
317
 
318
- Except as expressly stated in writing, Snapcreek LLC makes no representation or warranties in respect of this Software and expressly excludes all other warranties, expressed or implied,
319
- oral or written, including, without limitation, any implied warranties of merchantable quality or fitness for a particular purpose.
320
 
321
- 3.5 GOVERNING LAW
 
 
 
 
 
322
 
323
- This Agreement shall be governed by the law of the United States applicable therein. You hereby irrevocably attorn and submit to the non-exclusive jurisdiction of the courts of
324
- United States therefrom. If any provision shall be considered unlawful, void or otherwise unenforceable, then that provision shall be deemed severable from this License and not
325
- affect the validity and enforceability of any other provisions.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
326
 
327
- 3.6 TERMINATION
 
 
328
 
329
- Any failure to comply with the terms and conditions of this Agreement will result in automatic and immediate termination of this license. Upon termination of this license granted
330
- herein for any reason, you agree to immediately cease use of Duplicator and destroy all copies of Duplicator supplied under this Agreement. The financial obligations incurred by you
331
- shall survive the expiration or termination of this license.
 
332
 
333
- 4. DISCLAIMER OF WARRANTY
334
 
335
- THIS SOFTWARE AND THE ACCOMPANYING FILES ARE FREE AND OFFERED "AS IS" AND WITHOUT WARRANTIES AS TO PERFORMANCE OR MERCHANTABILITY OR ANY OTHER WARRANTIES WHETHER EXPRESSED OR IMPLIED.
336
- THIS DISCLAIMER CONCERNS ALL FILES GENERATED AND EDITED BY Duplicator AS WELL.
337
- </pre>
338
- </div>
339
-
340
- <div id="dup-s1-warning-check">
341
- <input id="accept-warnings" name="accpet-warnings" type="checkbox" onclick="Duplicator.acceptWarning()" style='vertical-align: bottom' />
342
- <label for="accept-warnings">I have read and accept all warnings &amp; notices <small>(required to run deployment)</small></label><br/>
343
- <div id="dup-s1-warning-emptydb">
344
- <label for="accept-warnings">The 'Connect and Remove All Data' action will delete <u>all</u> tables and data from the database!</label>
345
- </div>
346
- </div><br/><br/>
347
-
348
- <div class="dup-footer-buttons">
349
- <input id="dup-step1-deploy-btn" type="button" value=" Run Deployment " onclick="Duplicator.confirmDeployment()" />
350
- </div>
 
 
351
 
352
- <?php endif; ?>
353
  </form>
354
 
355
 
 
356
  <!-- =========================================
357
  VIEW: STEP 1 - AJAX RESULT
358
- Auto Posts to view.step2.php -->
359
- <form id='dup-step1-result-form' method="post" class="content-form" style="display:none">
360
- <input type="hidden" name="action_step" value="2" />
361
- <input type="hidden" name="package_name" value="<?php echo $zip_name ?>" />
362
- <input type="hidden" name="logging" id="ajax-logging" />
363
- <input type="hidden" name="dbhost" id="ajax-dbhost" />
364
- <input type="hidden" name="dbport" id="ajax-dbport" />
365
- <input type="hidden" name="dbuser" id="ajax-dbuser" />
366
- <input type="hidden" name="dbpass" id="ajax-dbpass" />
367
- <input type="hidden" name="dbname" id="ajax-dbname" />
368
- <input type="hidden" name="json" id="ajax-json" />
369
- <input type="hidden" name="dbcharset" id="ajax-dbcharset" />
370
- <input type="hidden" name="dbcollate" id="ajax-dbcollate" />
371
-
372
- <div class="dup-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
373
  <div class="hdr-main">
374
- Step 1: Deploy Files &amp; Database
375
  </div>
376
-
 
 
 
 
 
 
 
 
 
 
377
  <!-- PROGRESS BAR -->
378
  <div id="progress-area">
379
  <div style="width:500px; margin:auto">
380
- <h3>Processing Files &amp; Database Please Wait...</h3>
381
  <div id="progress-bar"></div>
382
  <i>This may take several minutes</i>
383
  </div>
384
  </div>
385
-
386
  <!-- AJAX SYSTEM ERROR -->
387
  <div id="ajaxerr-area" style="display:none">
388
  <p>Please try again an issue has occurred.</p>
389
  <div style="padding: 0px 10px 10px 0px;">
390
  <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>
391
  <div style="text-align:center; margin:10px auto 0px auto">
392
- <input type="button" onclick='Duplicator.hideErrorResult()' value="&laquo; Try Again" /><br/><br/>
393
  <i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket' target='_blank'>snapcreek.com</a></i>
394
  </div>
395
  </div>
396
  </div>
397
  </form>
398
 
399
-
400
- <!-- =========================================
401
- PANEL: SERVER CHECKS -->
402
- <div id="dup-s1-dialog" title="System Status" style="display:none">
403
- <div id="dup-s1-dialog-data" style="padding: 0px 10px 10px 10px;">
404
-
405
- <div style="font-size:12px">
406
- <b>Archive Name:</b> <?php echo $zip_name; ?> <br/>
407
- <b>Package Notes:</b> <?php echo empty($GLOBALS['FW_PACKAGE_NOTES']) ? 'No notes provided for this pakcage.' : $GLOBALS['FW_PACKAGE_NOTES']; ?>
408
- </div>
409
- <br/>
410
-
411
- <!-- SYSTEM REQUIREMENTS -->
412
- <b>REQUIREMENTS</b> &nbsp; <i style='font-size:11px'>click links for details</i>
413
- <hr size="1"/>
414
-
415
- <table style="width:100%">
416
- <tr>
417
- <td style="width:300px"><a href="javascript:void(0)" onclick="$('#dup-req-rootdir').toggle(200)">Root Directory</a></td>
418
- <td class="<?php echo ($req01 == 'Pass') ? 'dup-pass' : 'dup-fail' ?>"><?php echo $req01; ?></td>
419
- </tr>
420
- <tr>
421
- <td colspan="2" id="dup-req-rootdir" class='dup-s1-dialog-data-details'>
422
- <?php
423
- echo "<i>Path: {$GLOBALS['CURRENT_ROOT_PATH']} </i><br/>";
424
- printf("<b>[%s]</b> %s <br/>", $req01a, "Is Writable by PHP");
425
- printf("<b>[%s]</b> %s ", $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> ");
426
- ?>
427
- </td>
428
- </tr>
429
- <tr>
430
- <td><a href="javascript:void(0)" onclick="$('#dup-req-mysqli').toggle(200)">MySQLi Support</a></td>
431
- <td class="<?php echo ($req03 == 'Pass') ? 'dup-pass' : 'dup-fail' ?>"><?php echo $req03; ?></td>
432
- </tr>
433
- <tr>
434
- <td colspan="2" id="dup-req-mysqli" class='dup-s1-dialog-data-details'>
435
- The Duplicator needs the PHP mysqli extension installed to run properly. This is a very common extension and can be easily installed by your
436
- host or server administrator. For more details see the <a href="http://us2.php.net/manual/en/mysqli.installation.php" target="_blank" >online overview</a>.
437
- </td>
438
- </tr>
439
- <tr>
440
- <td><a href="javascript:void(0)" onclick="$('#dup-req-safemode').toggle(200)">Safe Mode Off</a></td>
441
- <td class="<?php echo ($req02 == 'Pass') ? 'dup-pass' : 'dup-fail' ?>"><?php echo $req02; ?></td>
442
- </tr>
443
- <tr>
444
- <td colspan="2" id="dup-req-safemode" class='dup-s1-dialog-data-details'>
445
- The Duplicator requires that PHP safe mode be turned off. Safe mode is a very uncommon setting and can be easily turned off by your
446
- host or server administrator. For more details see the <a href="http://php.net/manual/en/features.safe-mode.php" target="_blank" >online overview</a>.
447
- </td>
448
- </tr>
449
- <tr>
450
- <td valign="top"><a href="javascript:void(0)" onclick="$('#dup-req-phpver').toggle(200)">PHP Version</a> </td>
451
- <td class="<?php echo ($req04 == 'Pass') ? 'dup-pass' : 'dup-fail' ?>"><?php echo $req04; ?> </td>
452
- </tr>
453
- <tr>
454
- <td colspan="2" id="dup-req-phpver" class='dup-s1-dialog-data-details'>
455
- This server is currently running PHP version: <b><?php echo phpversion(); ?></b>. The Duplicator requires a version of 5.2.9+ or better.
456
- To upgrade your PHP version contact your host or server administrator.
457
- </td>
458
- </tr>
459
- </table>
460
- <br/>
461
-
462
- <!-- SYSTEM CHECKS -->
463
- <b>CHECKS</b><hr size="1"/>
464
- <table style="width:100%">
465
- <tr>
466
- <td style="width:300px"></td>
467
- <td></td>
468
- </tr>
469
- <tr>
470
- <?php if (stristr($_SERVER['SERVER_SOFTWARE'], 'apache') !== false): ?>
471
- <td><b>Web Server:</b> Apache</td>
472
- <td><div class='dup-pass'>Good</div></td>
473
- <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false): ?>
474
- <td><b>Web Server:</b> LiteSpeed</td>
475
- <td><div class='dup-ok'>OK</div></td>
476
- <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false): ?>
477
- <td><b>Web Server:</b> Nginx</td>
478
- <td><div class='dup-ok'>OK</div></td>
479
- <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'lighttpd') !== false): ?>
480
- <td><b>Web Server:</b> Lighthttpd</td>
481
- <td><div class='dup-ok'>OK</div></td>
482
- <?php elseif (stristr($_SERVER['SERVER_SOFTWARE'], 'iis') !== false): ?>
483
- <td><b>Web Server:</b> Microsoft IIS</td>
484
- <td><div class='dup-ok'>OK</div></td>
485
- <?php else: ?>
486
- <td><b>Web Server:</b> Not detected</td>
487
- <td><div class='dup-fail'>Caution</div></td>
488
- <?php endif; ?>
489
- </tr>
490
- <tr>
491
- <?php
492
- $open_basedir_set = ini_get("open_basedir");
493
- if (empty($open_basedir_set)):
494
- ?>
495
- <td><b>Open Base Dir:</b> Off
496
- <td><div class='dup-pass'>Good</div>
497
- <?php else: ?>
498
- <td><b>Open Base Dir:</b> On</td>
499
- <td><div class='dup-fail'>Caution</div></td>
500
- <?php endif; ?>
501
- </tr>
502
- </table>
503
-
504
- <hr class='dup-dots' />
505
- <!-- SAPI -->
506
- <b>PHP MAX MEMORY:</b> <?php echo $GLOBALS['PHP_MEMORY_LIMIT'] ?><br/>
507
- <b>PHP SAPI:</b> <?php echo php_sapi_name(); ?><br/>
508
- <b>PHP ZIP Archive:</b> <?php echo class_exists('ZipArchive') ? 'Is Installed' : 'Not Installed'; ?> <br/>
509
- <b>CDN Accessible:</b> <?php echo ( DUPX_Util::is_url_active("ajax.aspnetcdn.com", 443) && DUPX_Util::is_url_active("ajax.googleapis.com", 443)) ? 'Yes' : 'No'; ?>
510
- <br/><br/>
511
- Need an <a href='https://snapcreek.com/duplicator/docs/faqs-tech/#faq-resource-040-q' target='_blank'>approved</a> Duplicator hosting provider?
512
-
513
- </div>
514
- </div>
515
-
516
-
517
- <!-- CONFIRM DIALOG -->
518
- <div id="dialog-confirm-content" style="display:none">
519
- <div style="padding:0 0 25px 0">
520
- <b>Run installer with these settings?</b>
521
- </div>
522
-
523
- <b>Database Settings:</b><br/>
524
- <table style="margin-left:20px">
525
- <tr>
526
- <td><b>Server:</b></td>
527
- <td><i id="dlg-dbhost"></i></td>
528
- </tr>
529
- <tr>
530
- <td><b>Name:</b></td>
531
- <td><i id="dlg-dbname"></i></td>
532
- </tr>
533
- <tr>
534
- <td><b>User:</b></td>
535
- <td><i id="dlg-dbuser"></i></td>
536
- </tr>
537
- </table>
538
- <br/><br/>
539
-
540
- <small> WARNING: Be sure these database parameters are correct! Entering the wrong information WILL overwrite an existing database.
541
- Make sure to have backups of all your data before proceeding.</small><br/>
542
- </div>
543
-
544
-
545
- <script type="text/javascript">
546
-
547
- /* Confirm Dialog to validate run */
548
- Duplicator.confirmDeployment = function()
549
- {
550
- var $form = $('#dup-step1-input-form');
551
- $form.parsley().validate();
552
- if (!$form.parsley().isValid()) {
553
- return;
554
- }
555
-
556
- $('#dlg-dbhost').html($("#dbhost").val());
557
- $('#dlg-dbname').html($("#dbname").val());
558
- $('#dlg-dbuser').html($("#dbuser").val());
559
-
560
- modal({
561
- type: 'confirm',
562
- title: 'Install Confirmation',
563
- text: $('#dialog-confirm-content').html(),
564
- callback: function(result)
565
- {
566
- if (result == true) {
567
- Duplicator.runDeployment();
568
- }
569
- }
570
- });
571
- }
572
-
573
- /* Performs Ajax post to extract files and create db
574
  * Timeout (10000000 = 166 minutes) */
575
- Duplicator.runDeployment = function()
576
  {
577
- var $form = $('#dup-step1-input-form');
578
- var dbhost = $("#dbhost").val();
579
- var dbname = $("#dbname").val();
580
- var dbuser = $("#dbuser").val();
581
-
582
  $.ajax({
583
  type: "POST",
584
- timeout: 10000000,
585
  dataType: "json",
586
  url: window.location.href,
587
  data: $form.serialize(),
588
  beforeSend: function() {
589
- Duplicator.showProgressBar();
590
  $form.hide();
591
- $('#dup-step1-result-form').show();
592
  },
593
- success: function(data, textStatus, xhr){
594
- if (typeof(data) != 'undefined' && data.pass == 1) {
595
- $("#ajax-dbhost").val($("#dbhost").val());
596
- $("#ajax-dbport").val($("#dbport").val());
597
- $("#ajax-dbuser").val($("#dbuser").val());
598
- $("#ajax-dbpass").val($("#dbpass").val());
599
- $("#ajax-dbname").val($("#dbname").val());
600
- $("#ajax-dbcharset").val($("#dbcharset").val());
601
- $("#ajax-dbcollate").val($("#dbcollate").val());
602
  $("#ajax-logging").val($("input:radio[name=logging]:checked").val());
603
- $("#ajax-json").val(escape(JSON.stringify(data)));
604
- setTimeout(function() {$('#dup-step1-result-form').submit();}, 1000);
605
- $('#progress-area').fadeOut(700);
 
 
606
  } else {
607
- Duplicator.hideProgressBar();
 
608
  }
609
  },
610
- error: function(xhr) {
611
- var status = "<b>server code:</b> " + xhr.status + "<br/><b>status:</b> " + xhr.statusText + "<br/><b>response:</b> " + xhr.responseText;
 
 
 
 
 
 
612
  $('#ajaxerr-data').html(status);
613
- Duplicator.hideProgressBar();
614
  }
615
  });
616
 
617
  };
618
 
619
- /** **********************************************
620
- * METHOD: Accetps Useage Warning */
621
- Duplicator.acceptWarning = function() {
622
  if ($("#accept-warnings").is(':checked')) {
623
- $("#dup-step1-deploy-btn").removeAttr("disabled");
624
- } else {
625
- $("#dup-step1-deploy-btn").attr("disabled", "true");
626
- }
627
- };
 
 
628
 
629
- /** **********************************************
630
- * METHOD: Go back on AJAX result view */
631
- Duplicator.hideErrorResult = function() {
632
- $('#dup-step1-result-form').hide();
633
- $('#dup-step1-input-form').show(200);
634
- };
635
-
636
- /** **********************************************
637
- * METHOD: Shows results of database connection
638
- * Timeout (45000 = 45 secs) */
639
- Duplicator.dlgTestDB = function () {
640
- $.ajax({
641
- type: "POST",
642
- timeout: 45000,
643
- url: window.location.href + '?' + 'dbtest=1',
644
- data: $('#dup-step1-input-form').serialize(),
645
- success: function(data){ $('#dbconn-test-msg').html(data); },
646
- error: function(data){ alert('An error occurred while testing the database connection! Contact your server admin to make sure the connection inputs are correct!'); }
647
- });
648
-
649
- $('#dbconn-test-msg').html("Attempting Connection. Please wait...");
650
- $("#s1-dbconn-status").show(500);
651
-
652
- };
653
-
654
- Duplicator.showDeleteWarning = function () {
655
- ($('#dbaction-empty').prop('checked'))
656
- ? $('#dup-s1-warning-emptydb').show(300)
657
- : $('#dup-s1-warning-emptydb').hide(300);
658
- };
659
-
660
- Duplicator.togglePort = function () {
661
-
662
- $('#s1-dbport-btn').hide();
663
- $('#dbport').show();
664
  }
665
 
666
-
667
  //DOCUMENT LOAD
668
- $(document).ready(function() {
669
- $('#dup-s1-dialog-data').appendTo('#dup-s1-result-container');
670
- $( "input[name='dbaction']").click(Duplicator.showDeleteWarning);
671
- Duplicator.acceptWarning();
672
- Duplicator.showDeleteWarning();
673
-
674
- //MySQL Mode
675
- $("input[name=dbmysqlmode]").click(function() {
676
- if ($(this).val() == 'CUSTOM') {
677
- $('#dbmysqlmode_3_view').show();
678
- } else {
679
- $('#dbmysqlmode_3_view').hide();
680
- }
681
- });
682
-
683
- if ($("input[name=dbmysqlmode]:checked").val() == 'CUSTOM') {
684
- $('#dbmysqlmode_3_view').show();
685
- }
686
-
687
-
688
- });
689
  </script>
1
  <?php
2
+ //VIEW: STEP 1- INPUT
3
+
4
+ //ARCHIVE FILE
5
+ $arcCheck = (file_exists($GLOBALS['ARCHIVE_PATH'])) ? 'Pass' : 'Fail';
6
+ $arcSize = @filesize($GLOBALS['ARCHIVE_PATH']);
7
+ $arcSize = is_numeric($arcSize) ? $arcSize : 0;
8
+
9
+ //REQUIRMENTS
10
+ $req = array();
11
+ $req['01'] = DUPX_Server::isDirWritable($GLOBALS["CURRENT_ROOT_PATH"]) ? 'Pass' : 'Fail';
12
+ $req['02'] = 'Pass'; //Place-holder for future check
13
+ $req['03'] = (! DUPX_Server::$php_safe_mode_on) ? 'Pass' : 'Fail';
14
+ $req['04'] = function_exists('mysqli_connect') ? 'Pass' : 'Fail';
15
+ $req['05'] = DUPX_Server::$php_version_safe ? 'Pass' : 'Fail';
16
+ $all_req = in_array('Fail', $req) ? 'Fail' : 'Pass';
17
+
18
+ //NOTICES
19
+ $openbase = ini_get("open_basedir");
20
+ $scanfiles = @scandir($GLOBALS["CURRENT_ROOT_PATH"]);
21
+ $scancount = is_array($scanfiles) ? (count($scanfiles)) : -1;
22
+ $datetime1 = $GLOBALS['FW_CREATED'];
23
+ $datetime2 = date("Y-m-d H:i:s");
24
+ $fulldays = round(abs(strtotime($datetime1) - strtotime($datetime2))/86400);
25
+ $root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
26
+ $wpconf_path = "{$root_path}/wp-config.php";
27
+ $max_time_zero = set_time_limit(0);
28
+ $max_time_size = 314572800; //300MB
29
+ $max_time_ini = ini_get('max_execution_time');
30
+ $max_time_warn = (is_numeric($max_time_ini) && $max_time_ini < 31 && $max_time_ini > 0) && $arcSize > $max_time_size;
31
+
32
+
33
+ $notice = array();
34
+ $notice['01'] = ! file_exists($wpconf_path) ? 'Good' : 'Warn';
35
+ $notice['02'] = $scancount <= 40 ? 'Good' : 'Warn';
36
+ $notice['03'] = $fulldays <= 180 ? 'Good' : 'Warn';
37
+ $notice['04'] = 'Good'; //Place-holder for future check
38
+ $notice['05'] = 'Good'; //Place-holder for future check $GLOBALS['FW_VERSION_OS'] == PHP_OS ? 'Good' : 'Warn';
39
+ $notice['06'] = empty($openbase) ? 'Good' : 'Warn';
40
+ $notice['07'] = ! $max_time_warn ? 'Good' : 'Warn';
41
+ $all_notice = in_array('Warn', $notice) ? 'Warn' : 'Good';
42
+
43
+ //SUMMATION
44
+ $req_success = ($all_req == 'Pass');
45
+ $req_notice = ($all_notice == 'Good');
46
+ $all_success = ($req_success && $req_notice);
47
+ $agree_msg = "To enable this button the checkbox above under the 'Terms & Notices' must be checked.";
48
  ?>
49
 
50
 
51
+ <form id='s1-input-form' method="post" class="content-form" >
52
+ <input type="hidden" name="action_ajax" value="1" />
53
+ <input type="hidden" name="action_step" value="1" />
54
+ <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
55
 
56
+ <div class="hdr-main">
57
+ Step <span class="step">1</span> of 4: Extract Archive
58
+ </div><br/>
59
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
60
 
61
+ <!-- ====================================
62
+ ARCHIVE FILE
63
+ ==================================== -->
64
+ <div class="hdr-sub1">
65
+ <a id="s1-area-archive-file-link" data-type="toggle" data-target="#s1-area-archive-file"><i class="dupx-plus-square"></i> Archive File</a>
66
+ <div class="<?php echo ($arcCheck == 'Pass') ? 'status-badge-pass' : 'status-badge-fail'; ?>" style="float:right">
67
+ <?php echo ($arcCheck == 'Pass') ? 'Pass' : 'Fail'; ?>
68
+ </div>
69
+ </div>
70
+ <div id="s1-area-archive-file" style="display:none">
71
+
72
+ <table class="s1-archive-local">
73
+ <tr>
74
+ <td>Size:</td>
75
+ <td><?php echo DUPX_U::readableByteSize($arcSize); ;?> </td>
76
+ </tr>
77
+ <tr>
78
+ <td>Name:</td>
79
+ <td><?php echo "{$GLOBALS['FW_PACKAGE_NAME']}";?> </td>
80
+ </tr>
81
+ <tr>
82
+ <td>Path:</td>
83
+ <td><?php echo "{$GLOBALS['CURRENT_ROOT_PATH']}";?> </td>
84
+ </tr>
85
+ <tr>
86
+ <td>Notes:</td>
87
+ <td><?php echo strlen($GLOBALS['FW_PACKAGE_NOTES']) ? "{$GLOBALS['FW_PACKAGE_NOTES']}" : " - no notes - ";?></td>
88
+ </tr>
89
+ </table>
90
+
91
+ <?php if ($arcCheck == 'Fail') : ?>
92
+ <div class="s1-archive-failed-msg">
93
+ <b class="dupx-fail">Archive File Not Found!</b><br/>
94
+ The archive file name above must be the <u>exact</u> name of the archive file placed in the deployment path (character for character).
95
+ If the file does not have the same name then rename it to the name above.
96
+ <br/><br/>
97
+
98
+ When downloading the package files make sure both files are from the same package line in the packages view. The archive file also
99
+ must be completely downloaded to the server before trying to run step 1. The following zip files where found at the deployment path:<br/>
100
+ <?php
101
+ //DETECT ARCHIVE FILES
102
+ $zip_files = DUPX_Server::getZipFiles();
103
+ $zip_count = count($zip_files);
104
+
105
+ if ($zip_count >= 1) {
106
+ echo "<ol>";
107
+ foreach($zip_files as $file) {
108
+ echo "<li> {$file}</li>";
109
+ }
110
+ echo "</ol>";
111
+ } else {
112
+ echo " - No zip files found -";
113
+ }
114
+ ?>
115
+ </div>
116
+ <?php endif; ?>
117
 
118
+ </div>
119
+ <br/><br/>
120
 
121
 
122
+ <!-- ====================================
123
+ SYSTEM CHECKS
124
+ ==================================== -->
125
+ <div class="hdr-sub1">
126
+ <a id="s1-area-sys-setup-link" data-type="toggle" data-target="#s1-area-sys-setup"><i class="dupx-plus-square"></i> System Checks</a>
127
+ <div class="<?php echo ($req_success) ? 'status-badge-pass' : 'status-badge-fail'; ?>" style="float:right">
128
+ <?php echo ($req_success) ? 'Pass' : 'Fail'; ?>
129
+ </div>
130
+ </div>
131
+ <div id="s1-area-sys-setup" style="display:none">
132
 
133
+ <!-- *** REQUIREMENTS *** -->
134
+ <div class="hdr-sub2">
135
+ <table class="s1-checks-area">
136
+ <tr>
137
+ <td class="title">Requirements</td>
138
+ <td class="toggle"><a href="javascript:void(0)" onclick="DUPX.toggleAll('#s1-reqs-all')">[toggle]</a></td>
139
+ </tr>
140
+ </table>
141
+ </div>
142
 
143
+ <div class="s1-reqs" id="s1-reqs-all">
144
+ <div class="notice">All requirements must pass to start deployment</div>
145
+
146
+ <!-- REQ 1 -->
147
+ <div class="status <?php echo strtolower($req['01']); ?>"><?php echo $req['01']; ?></div>
148
+ <div class="title" data-type="toggle" data-target="#s1-reqs01">+ Directory Writable</div>
149
+ <div class="info" id="s1-reqs01">
150
+ <table>
151
+ <tr>
152
+ <td><b>Deployment Path:</b> </td>
153
+ <td><i><?php echo "{$GLOBALS['CURRENT_ROOT_PATH']}"; ?></i> </td>
154
+ </tr>
155
+ <tr>
156
+ <td><b>Suhosin Extension:</b> </td>
157
+ <td><?php echo extension_loaded('suhosin') ? "<i class='dupx-fail'>Enabled</i>'" : "<i class='dupx-pass'>Disabled</i>"; ?> </td>
158
+ </tr>
159
+ </table><br/>
160
+
161
+ The deployment path must be writable by PHP in order to extract the archive file. Incorrect permissions and extension such as
162
+ <a href="https://suhosin.org/stories/index.html" target="_blank">suhosin</a> can sometimes inter-fear with PHP being able to write/extract files.
163
+ Please see the <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-055-q" target="_blank">FAQ permission</a> help link for complete details.
164
+ </div>
165
 
166
+ <!-- REQ 2
167
+ <div class="status <?php echo strtolower($req['02']); ?>"><?php echo $req['02']; ?></div>
168
+ <div class="title" data-type="toggle" data-target="#s1-reqs02">+ Place Holder</div>
169
+ <div class="info" id="s1-reqs02"></div>-->
170
+
171
+ <!-- REQ 3 -->
172
+ <div class="status <?php echo strtolower($req['03']); ?>"><?php echo $req['03']; ?></div>
173
+ <div class="title" data-type="toggle" data-target="#s1-reqs03">+ PHP SafeMode</div>
174
+ <div class="info" id="s1-reqs03">
175
+ PHP with <a href='http://php.net/manual/en/features.safe-mode.php' target='_blank'>safe mode</a> must be disabled. If this test fails
176
+ please contact your hosting provider or server administrator to disable PHP safe mode.
177
+ </div>
178
 
179
+ <!-- REQ 4 -->
180
+ <div class="status <?php echo strtolower($req['04']); ?>"><?php echo $req['04']; ?></div>
181
+ <div class="title" data-type="toggle" data-target="#s1-reqs04">+ PHP mysqli</div>
182
+ <div class="info" id="s1-reqs04">
183
+ Support for the PHP <a href='http://us2.php.net/manual/en/mysqli.installation.php' target='_blank'>mysqli extension</a> is required.
184
+ Please contact your hosting provider or server administrator to enable the mysqli extension. <i>The detection for this call uses
185
+ the function_exists('mysqli_connect') call.</i>
186
+ </div>
187
 
188
+ <!-- REQ 5 -->
189
+ <div class="status <?php echo strtolower($req['05']); ?>"><?php echo $req['05']; ?></div>
190
+ <div class="title" data-type="toggle" data-target="#s1-reqs05">+ PHP Version</div>
191
+ <div class="info" id="s1-reqs05">
192
+ This server is running PHP: <b><?php echo DUPX_Server::$php_version ?></b>. <i>A minimum of PHP 5.2.17 is required</i>.
193
+ Contact your hosting provider or server administrator and let them know you would like to upgrade your PHP version.
194
+ </div>
195
+ </div><br/>
196
 
 
197
 
198
+ <!-- *** NOTICES *** -->
199
+ <div class="hdr-sub2">
200
+ <table class="s1-checks-area">
201
+ <tr>
202
+ <td class="title">Notices</td>
203
+ <td class="toggle"><a href="javascript:void(0)" onclick="DUPX.toggleAll('#s1-notice-all')">[toggle]</a></td>
204
+ </tr>
205
+ </table>
206
+ </div>
207
+ <div class="s1-reqs" id="s1-notice-all">
208
+ <div class="notice">Notices are not required to start deployment</div>
209
+
210
+ <!-- NOTICE 1 -->
211
+ <div class="status <?php echo ($notice['01'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['01']; ?></div>
212
+ <div class="title" data-type="toggle" data-target="#s1-notice01">+ Configuration File</div>
213
+ <div class="info" id="s1-notice01">
214
+ Duplicator works best by placing the installer and archive files into an empty directory. Typically, if a wp-config.php file is found in the extraction
215
+ directory it may indicate that your trying to install over an existing WordPress site which can lead to un-intended results. If this is not the case, then
216
+ just ignore this notice, but be aware that you will have to remove the wp-config.php file later on in the deployment process.
217
+ </div>
218
 
219
+ <!-- NOTICE 2 -->
220
+ <div class="status <?php echo ($notice['02'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['02']; ?></div>
221
+ <div class="title" data-type="toggle" data-target="#s1-notice02">+ Directory Setup</div>
222
+ <div class="info" id="s1-notice02">
223
+ <b>Deployment Path:</b> <i><?php echo "{$GLOBALS['CURRENT_ROOT_PATH']}"; ?></i>
224
+ <br/><br/>
225
+ There are currently <?php echo "<b>[{$scancount}]</b>";?> items in the deployment path. These items will be overwritten if they also exist
226
+ inside the archive file. The notice is to prevent overwriting an existing site or trying to install on-top of one which
227
+ can have un-intended results. <i>This notice shows if it detects more than 40 items.</i>
228
+ </div>
229
 
230
+ <!-- NOTICE 3 -->
231
+ <div class="status <?php echo ($notice['03'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['03']; ?></div>
232
+ <div class="title" data-type="toggle" data-target="#s1-notice03">+ Package Age</div>
233
+ <div class="info" id="s1-notice03">
234
+ <?php echo "The package is {$fulldays} day(s) old. Packages older than 180 days might be considered stale"; ?>
235
+ </div>
236
 
237
+ <!-- NOTICE 4
238
+ <div class="status <?php echo ($notice['04'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['04']; ?></div>
239
+ <div class="title" data-type="toggle" data-target="#s1-notice04">+ Placeholder</div>
240
+ <div class="info" id="s1-notice04">
241
+ </div>-->
242
+
243
+
244
+ <!-- NOTICE 5
245
+ <div class="status <?php echo ($notice['05'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['05']; ?></div>
246
+ <div class="title" data-type="toggle" data-target="#s1-notice05">+ OS Compatibility</div>
247
+ <div class="info" id="s1-notice05">
248
+ <?php
249
+ $currentOS = PHP_OS;
250
+ echo "The current OS (operating system) is '{$currentOS}'. The package was built on '{$GLOBALS['FW_VERSION_OS']}'. Moving from one OS to another
251
+ is typically very safe and normal, however if any issues do arise be sure that you don't have any items on your site that were OS specific";
252
+ ?>
253
+ </div>-->
254
+
255
+ <!-- NOTICE 6 -->
256
+ <div class="status <?php echo ($notice['06'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['06']; ?></div>
257
+ <div class="title" data-type="toggle" data-target="#s1-notice06">+ PHP Open Base</div>
258
+ <div class="info" id="s1-notice06">
259
+ <b>Open BaseDir:</b> <i><?php echo $notice['06'] == 'Good' ? "<i class='dupx-pass'>Disabled</i>" : "<i class='dupx-fail'>Enabled</i>"; ?></i>
260
+ <br/><br/>
261
+
262
+ If <a href="http://www.php.net/manual/en/ini.core.php#ini.open-basedir" target="_blank">open_basedir</a> is enabled and your
263
+ having issues getting your site to install properly; please work with your host and follow these steps to prevent issues:
264
+ <ol style="margin:7px; line-height:19px">
265
+ <li>Disable the open_basedir setting in the php.ini file</li>
266
+ <li>If the host will not disable, then add the path below to the open_basedir setting in the php.ini<br/>
267
+ <i style="color:maroon">"<?php echo str_replace('\\', '/', dirname( __FILE__ )); ?>"</i>
268
+ </li>
269
+ <li>Save the settings and restart the web server</li>
270
+ </ol>
271
+ Note: This warning will still show if you choose option #2 and open_basedir is enabled, but should allow the installer to run properly. Please work with your
272
+ hosting provider or server administrator to set this up correctly.
273
+ </div>
274
 
275
+ <!-- NOTICE 7 -->
276
+ <div class="status <?php echo ($notice['07'] == 'Good') ? 'pass' : 'fail' ?>"><?php echo $notice['07']; ?></div>
277
+ <div class="title" data-type="toggle" data-target="#s1-notice07">+ PHP Timeout</div>
278
+ <div class="info" id="s1-notice07">
279
+ <b>Archive Size:</b> <?php echo DUPX_U::readableByteSize($arcSize) ?> <small>(detection limit is set at <?php echo DUPX_U::readableByteSize($max_time_size) ?>) </small><br/>
280
+ <b>PHP max_execution_time:</b> <?php echo "{$max_time_ini}"; ?> <small>(zero means not limit)</small> <br/>
281
+ <b>PHP set_time_limit:</b> <?php echo ($max_time_zero) ? '<i style="color:green">Success</i>' : '<i style="color:maroon">Failed</i>' ?>
282
+ <br/><br/>
283
+
284
+ The PHP <a href="http://php.net/manual/en/info.configuration.php#ini.max-execution-time" target="_blank">max_execution_time</a> setting is used to
285
+ determine how long a PHP process is allowed to run. If the setting is too small and the archive file size is too large then PHP may not have enough
286
+ time to finish running before the process is killed causing a timeout.
287
+ <br/><br/>
288
+
289
+ Duplicator attempts to turn off the timeout by using the
290
+ <a href="http://php.net/manual/en/function.set-time-limit.php" target="_blank">set_time_limit</a> setting. If this notice shows as a warning then it is
291
+ still safe to continue with the install. However, if a timeout occurs then you will need to consider working with the max_execution_time setting or extracting the
292
+ archive file using the 'Manual package extraction' method.
293
+ Please see the <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-100-q" target="_blank">FAQ timeout</a> help link for more details.
294
 
295
+ </div>
296
+ </div>
297
+ </div>
298
+ <br/><br/>
299
+
300
 
301
+ <!-- ====================================
302
+ ADVANCED OPTIONS
303
+ ==================================== -->
304
+ <div class="hdr-sub1">
305
+ <a data-type="toggle" data-target="#s1-area-adv-opts"><i class="dupx-plus-square"></i> Advanced Options</a>
306
+ </div>
307
+ <div id="s1-area-adv-opts" style="display:none">
308
+ <div class="help-target"><a href="?help#help-s1" target="_blank">[help]</a></div>
309
+
310
+ <table class="dupx-opts dupx-advopts">
311
+ <tr>
312
+ <td>Extraction:</td>
313
+ <td>
314
+ <input type="checkbox" name="archive_manual" id="archive_manual" value="1" /> <label for="archive_manual">Manual package extraction</label><br/>
315
+ </td>
316
+ </tr>
317
+ <tr>
318
+ <td>Logging:</td>
319
+ <td>
320
+ <input type="radio" name="logging" id="logging-light" value="1" checked="true"> <label for="logging-light">Light</label>
321
+ <input type="radio" name="logging" id="logging-detailed" value="2"> <label for="logging-detailed">Detailed</label>
322
+ <input type="radio" name="logging" id="logging-debug" value="3"> <label for="logging-debug">Debug</label>
323
+ </td>
324
+ </tr>
325
+ <tr>
326
+ <td>File Timestamp</td>
327
+ <td>
328
+ <input type="radio" name="archive_filetime" id="archive_filetime_now" value="current" checked="checked" /> <label class="radio" for="archive_filetime_now" title='Set the files current date time to now'>Current</label>
329
+ <input type="radio" name="archive_filetime" id="archive_filetime_orginal" value="original" /> <label class="radio" for="archive_filetime_orginal" title="Keep the files date time the same">Original</label>
330
+ </td>
331
+ </tr>
332
+ </table>
333
+ <br/><br/>
334
+
335
+ <!-- *** SETUP HELP *** -->
336
+ <div class="hdr-sub3">Setup Help</div>
337
+ <div id='s1-area-setup-help'>
338
+ <div style="padding:10px 0px 0px 10px;line-height:22px">
339
+ <table style='width:100%'>
340
+ <tr>
341
+ <td style="width:200px">
342
+ &raquo; Watch the <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-resource-070-q" target="_blank">video tutorials</a> <br/>
343
+ &raquo; Read helpful <a href="https://snapcreek.com/duplicator/docs/faqs-tech/" target="_blank">articles</a> <br/>
344
+ </td>
345
+ <td>
346
+ &raquo; Visit the <a href="https://snapcreek.com/duplicator/docs/quick-start/" target="_blank">quick start guides</a> <br/>
347
+ &raquo; Browse the <a href="https://snapcreek.com/duplicator/docs/" target="_blank">online docs</a> <br/>
348
+ </td>
349
+ </tr>
350
+ </table>
351
+
352
+
353
+ </div>
354
+ </div><br/>
355
 
356
+ </div>
357
+ <br/><br/>
358
 
359
+ <!-- ====================================
360
+ TERMS & NOTICES
361
+ ==================================== -->
362
+ <div class="hdr-sub1">
363
+ <a data-type="toggle" data-target="#s1-area-warnings"><i class="dupx-plus-square"></i> Terms &amp; Notices</a>
364
+ </div>
365
 
366
+ <div id="s1-area-warnings" style="display:none">
367
+ <div id='s1-warning-area'>
368
+ <div id="s1-warning-msg">
369
+ <b>TERMS &amp; NOTICES</b> <br/><br/>
370
+
371
+ <b>Disclaimer:</b>
372
+ This plugin require above average technical knowledge. Please use it at your own risk and always back up your database and files beforehand Duplicator.
373
+ If you're not sure about how to use this tool then please enlist the guidance of a technical professional. <u>Always</u> test
374
+ this installer in a sandbox environment before trying to deploy into a production setting.
375
+ <br/><br/>
376
+
377
+ <b>Database:</b>
378
+ 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 that already exists will permanently
379
+ DELETE all data in that database. This tool is designed to populate and fill a database with NEW data from a duplicated database using the SQL script in the
380
+ package name above.
381
+ <br/><br/>
382
+
383
+ <b>Setup:</b>
384
+ Only the archive and installer file should be in the install directory, unless you have manually extracted the package and checked the
385
+ 'Manual Package Extraction' checkbox. All other files will be OVERWRITTEN during install. Make sure you have full backups of all your databases and files
386
+ before continuing with an installation. Manual extraction requires that all contents in the package are extracted to the same directory as the installer file.
387
+ Manual extraction is only needed when your server does not support the ZipArchive extension. Please see the online help for more details.
388
+ <br/><br/>
389
+
390
+ <b>After Install:</b> When you are done with the installation you must remove remove the these files/directories:
391
+ <ul>
392
+ <li>installer.php</li>
393
+ <li>installer-data.sql</li>
394
+ <li>installer-backup.php</li>
395
+ <li>installer-log.txt</li>
396
+ <li>database.sql</li>
397
+ </ul>
398
+
399
+ These files contain sensitive information and should not remain on a production system for system integrity and security protection.
400
+ <br/><br/>
401
+
402
+ <b>License Overview</b><br/>
403
+ Duplicator is licensed under the GPL v3 https://www.gnu.org/licenses/gpl-3.0.en.html including the following disclaimers and limitation of liability.
404
+ <br/><br/>
405
+
406
+ <b>Disclaimer of Warranty</b><br/>
407
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
408
+ PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
409
+ FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
410
+ THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
411
+ <br/><br/>
412
+
413
+ <b>Limitation of Liability</b><br/>
414
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS
415
+ PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
416
+ PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO
417
+ OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
418
+ <br/><br/>
419
 
420
+ </div>
421
+ </div>
422
+ </div>
423
 
424
+ <div id="s1-warning-check">
425
+ <input id="accept-warnings" name="accpet-warnings" type="checkbox" onclick="DUPX.acceptWarning()" />
426
+ <label for="accept-warnings">I have read and accept all terms &amp; notices <small style="font-style:italic">(required for install)</small></label><br/>
427
+ </div>
428
 
 
429
 
430
+ <?php if (! $req_success || $arcCheck == 'Fail') :?>
431
+ <div class="s1-err-msg">
432
+ <i>
433
+ This installation will not be able to proceed until the archive file and system requirements pass. Please adjust your servers settings or contact your
434
+ server administrator, hosting provider or visit the resources below for additional help.
435
+ </i>
436
+ <div style="padding:10px">
437
+ &raquo; <a href="https://snapcreek.com/duplicator/docs/faqs-tech/" target="_blank">Technical FAQs</a> <br/>
438
+ &raquo; <a href="https://snapcreek.com/support/docs/" target="_blank">Online Documentation</a> <br/>
439
+ </div>
440
+ </div> <br/><br/>
441
+ <?php else : ?>
442
+ <br/><br/><br/>
443
+ <br/><br/><br/>
444
+ <div class="dupx-footer-buttons">
445
+ <input id="s1-deploy-btn" type="button" class="default-btn" value=" Next " onclick="DUPX.runExtraction()" title="<?php echo $agree_msg; ?>" />
446
+ </div>
447
+ <?php endif; ?>
448
 
 
449
  </form>
450
 
451
 
452
+
453
  <!-- =========================================
454
  VIEW: STEP 1 - AJAX RESULT
455
+ Auto Posts to view.step2.php
456
+ ========================================= -->
457
+ <form id='s1-result-form' method="post" class="content-form" style="display:none">
458
+
459
+ <div class="dupx-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
 
 
 
 
 
 
 
 
 
 
460
  <div class="hdr-main">
461
+ Step <span class="step">1</span> of 4: Extract Archive
462
  </div>
463
+
464
+ <!-- POST PARAMS -->
465
+ <div class="dupx-debug">
466
+ <input type="hidden" name="action_step" value="2" />
467
+ <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
468
+ <input type="hidden" name="logging" id="ajax-logging" />
469
+ <input type="hidden" name="json" id="ajax-json" />
470
+ <textarea id='ajax-json-debug' name='json_debug_view'></textarea>
471
+ <input type='submit' value='manual submit'>
472
+ </div>
473
+
474
  <!-- PROGRESS BAR -->
475
  <div id="progress-area">
476
  <div style="width:500px; margin:auto">
477
+ <h3>Extracting Archive Files Please Wait...</h3>
478
  <div id="progress-bar"></div>
479
  <i>This may take several minutes</i>
480
  </div>
481
  </div>
482
+
483
  <!-- AJAX SYSTEM ERROR -->
484
  <div id="ajaxerr-area" style="display:none">
485
  <p>Please try again an issue has occurred.</p>
486
  <div style="padding: 0px 10px 10px 0px;">
487
  <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>
488
  <div style="text-align:center; margin:10px auto 0px auto">
489
+ <input type="button" class="default-btn" onclick="DUPX.hideErrorResult()" value="&laquo; Try Again" /><br/><br/>
490
  <i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket' target='_blank'>snapcreek.com</a></i>
491
  </div>
492
  </div>
493
  </div>
494
  </form>
495
 
496
+ <script>
497
+ /** Performs Ajax post to extract files and create db
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
498
  * Timeout (10000000 = 166 minutes) */
499
+ DUPX.runExtraction = function()
500
  {
501
+ var $form = $('#s1-input-form');
502
+
503
+ //1800000 = 30 minutes
504
+ //If the extraction takes longer than 30 minutes then user
505
+ //will probably want to do a manual extraction or even FTP
506
  $.ajax({
507
  type: "POST",
508
+ timeout:1800000,
509
  dataType: "json",
510
  url: window.location.href,
511
  data: $form.serialize(),
512
  beforeSend: function() {
513
+ DUPX.showProgressBar();
514
  $form.hide();
515
+ $('#s1-result-form').show();
516
  },
517
+ success: function(data) {
518
+ var dataJSON = JSON.stringify(data);
519
+ $("#ajax-json-debug").val(dataJSON);
520
+ if (typeof(data) != 'undefined' && data.pass == 1) {
 
 
 
 
 
521
  $("#ajax-logging").val($("input:radio[name=logging]:checked").val());
522
+ $("#ajax-json").val(escape(dataJSON));
523
+ <?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
524
+ setTimeout(function() {$('#s1-result-form').submit();}, 500);
525
+ <?php endif; ?>
526
+ $('#progress-area').fadeOut(1000);
527
  } else {
528
+ $('#ajaxerr-data').html('Error Processing Step 1');
529
+ DUPX.hideProgressBar();
530
  }
531
  },
532
+ error: function(xhr) {
533
+ var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
534
+ status += "<b>Status:</b> " + xhr.statusText + "<br/>";
535
+ status += "<b>Response:</b> " + xhr.responseText + "";
536
+ status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
537
+ status += "- Check the <a href='installer-log.txt' target='_blank'>installer-log.txt</a> file for warnings or errors.<br/>";
538
+ status += "- Check the web server and PHP error logs. <br/>";
539
+ status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
540
  $('#ajaxerr-data').html(status);
541
+ DUPX.hideProgressBar();
542
  }
543
  });
544
 
545
  };
546
 
547
+ /** Accetps Useage Warning */
548
+ DUPX.acceptWarning = function()
549
+ {
550
  if ($("#accept-warnings").is(':checked')) {
551
+ $("#s1-deploy-btn").removeAttr("disabled");
552
+ $("#s1-deploy-btn").removeAttr("title");
553
+ } else {
554
+ $("#s1-deploy-btn").attr("disabled", "true");
555
+ $("#s1-deploy-btn").attr("title", "<?php echo $agree_msg; ?>");
556
+ }
557
+ }
558
 
559
+ /** Go back on AJAX result view */
560
+ DUPX.hideErrorResult = function()
561
+ {
562
+ $('#s1-result-form').hide();
563
+ $('#s1-input-form').show(200);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
564
  }
565
 
 
566
  //DOCUMENT LOAD
567
+ $(document).ready(function()
568
+ {
569
+ DUPX.acceptWarning();
570
+ $("*[data-type='toggle']").click(DUPX.toggleClick);
571
+ <?php echo ($arcCheck == 'Fail') ? "$('#s1-area-archive-file-link').trigger('click');" : ""; ?>
572
+ <?php echo (! $all_success) ? "$('#s1-area-sys-setup-link').trigger('click');" : ""; ?>
573
+ })
 
 
 
 
 
 
 
 
 
 
 
 
 
 
574
  </script>
installer/build/view.step2.php CHANGED
@@ -1,298 +1,409 @@
1
  <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];;
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
- $dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport']);
10
-
11
- $all_tables = DUPX_DB::getTables($dbh);
12
- $active_plugins = DUPX_Util::get_active_plugins($dbh);
13
-
14
-
15
- $old_path = $GLOBALS['FW_WPROOT'];
16
- $new_path = DUPX_Util::set_safe_path($GLOBALS['CURRENT_ROOT_PATH']);
17
- $new_path = ((strrpos($old_path, '/') + 1) == strlen($old_path)) ? DUPX_Util::add_slash($new_path) : $new_path;
18
  ?>
19
 
20
- <script type="text/javascript">
21
- /** **********************************************
22
- * METHOD:
23
- * Timeout (10000000 = 166 minutes) */
24
- Duplicator.runUpdate = function() {
25
-
26
- //Validation
27
- var wp_username = $.trim($("#wp_username").val()).length || 0;
28
- var wp_password = $.trim($("#wp_password").val()).length || 0;
29
-
30
- if ( $.trim($("#url_new").val()) == "" ) {alert("The 'New URL' field is required!"); return false;}
31
- if ( $.trim($("#siteurl").val()) == "" ) {alert("The 'Site URL' field is required!"); return false;}
32
- if (wp_username >= 1 && wp_username < 4) {alert("The New Admin Account 'Username' must be four or more characters"); return false;}
33
- if (wp_username >= 4 && wp_password < 6) {alert("The New Admin Account 'Password' must be six or more characters"); return false;}
34
-
35
- $.ajax({
36
- type: "POST",
37
- timeout: 10000000,
38
- dataType: "json",
39
- url: window.location.href,
40
- data: $('#dup-step2-input-form').serialize(),
41
- beforeSend: function() {
42
- Duplicator.showProgressBar();
43
- $('#dup-step2-input-form').hide();
44
- $('#dup-step2-result-form').show();
45
- },
46
- success: function(data){
47
- if (typeof(data) != 'undefined' && data.step2.pass == 1) {
48
- $("#ajax-url_new").val($("#url_new").val());
49
- $("#ajax-json").val(escape(JSON.stringify(data)));
50
- setTimeout(function(){$('#dup-step2-result-form').submit();}, 1000);
51
- $('#progress-area').fadeOut(1800);
52
- } else {
53
- Duplicator.hideProgressBar();
54
- }
55
- },
56
- error: function(xhr) {
57
- var status = "<b>server code:</b> " + xhr.status + "<br/><b>status:</b> " + xhr.statusText + "<br/><b>response:</b> " + xhr.responseText;
58
- $('#ajaxerr-data').html(status);
59
- Duplicator.hideProgressBar();
60
- }
61
- });
62
- };
63
-
64
- /** **********************************************
65
- * METHOD: Returns the windows active url */
66
- Duplicator.getNewURL = function(id) {
67
- var filename= window.location.pathname.split('/').pop() || 'installer.php' ;
68
- $("#" + id).val(window.location.href.replace(filename, ''));
69
- };
70
-
71
- /** **********************************************
72
- * METHOD: Allows user to edit the package url */
73
- Duplicator.editOldURL = function() {
74
- var msg = 'This is the URL that was generated when the package was created.\n';
75
- msg += 'Changing this value may cause issues with the install process.\n\n';
76
- msg += 'Only modify this value if you know exactly what the value should be.\n';
77
- msg += 'See "General Settings" in the WordPress Administrator for more details.\n\n';
78
- msg += 'Are you sure you want to continue?';
79
-
80
- if (confirm(msg)) {
81
- $("#url_old").removeAttr('readonly');
82
- $("#url_old").removeClass('readonly');
83
- $('#edit_url_old').hide('slow');
84
- }
85
- };
86
-
87
- /** **********************************************
88
- * METHOD: Allows user to edit the package path */
89
- Duplicator.editOldPath = function() {
90
- var msg = 'This is the SERVER URL that was generated when the package was created.\n';
91
- msg += 'Changing this value may cause issues with the install process.\n\n';
92
- msg += 'Only modify this value if you know exactly what the value should be.\n';
93
- msg += 'Are you sure you want to continue?';
94
-
95
- if (confirm(msg)) {
96
- $("#path_old").removeAttr('readonly');
97
- $("#path_old").removeClass('readonly');
98
- $('#edit_path_old').hide('slow');
99
- }
100
- };
101
-
102
- /** **********************************************
103
- * METHOD: Go back on AJAX result view */
104
- Duplicator.hideErrorResult2 = function() {
105
- $('#dup-step2-result-form').hide();
106
- $('#dup-step2-input-form').show(200);
107
- };
108
-
109
- //DOCUMENT LOAD
110
- $(document).ready(function() {
111
- Duplicator.getNewURL('url_new');
112
- Duplicator.getNewURL('siteurl');
113
-
114
- $("#wp_password").passStrength({
115
- shortPass: "top_shortPass",
116
- badPass: "top_badPass",
117
- goodPass: "top_goodPass",
118
- strongPass: "top_strongPass",
119
- baseStyle: "top_testresult",
120
- userid: "#wp_username",
121
- messageloc: 1 });
122
- });
123
- </script>
124
-
125
 
126
  <!-- =========================================
127
  VIEW: STEP 2- INPUT -->
128
- <form id='dup-step2-input-form' method="post" class="content-form">
129
- <input type="hidden" name="action_ajax" value="2" />
130
- <input type="hidden" name="action_step" value="2" />
131
- <input type="hidden" name="logging" value="<?php echo $_POST['logging'] ?>" />
132
- <input type="hidden" name="package_name" value="<?php echo $_POST['package_name'] ?>" />
133
- <input type="hidden" name="json" value="<?php echo $_POST['json']; ?>" />
134
- <input type="hidden" name="dbhost" value="<?php echo $_POST['dbhost'] ?>" />
135
- <input type="hidden" name="dbport" value="<?php echo $_POST['dbport'] ?>" />
136
- <input type="hidden" name="dbuser" value="<?php echo $_POST['dbuser'] ?>" />
137
- <input type="hidden" name="dbpass" value="<?php echo htmlentities($_POST['dbpass']) ?>" />
138
- <input type="hidden" name="dbname" value="<?php echo $_POST['dbname'] ?>" />
139
- <input type="hidden" name="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" />
140
- <input type="hidden" name="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" />
141
-
142
- <div class="dup-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
143
  <div class="hdr-main">
144
- Step 2: Update Files &amp; Database
145
- </div><br />
146
-
147
- <div class="hdr-sub">Old Settings</div>
148
- <table class="table-inputs-s2">
149
- <tr valign="top">
150
- <td style="width:80px">URL</td>
151
- <td>
152
- <input type="text" name="url_old" id="url_old" value="<?php echo $GLOBALS['FW_URL_OLD'] ?>" readonly="readonly" class="readonly" />
153
- <a href="javascript:Duplicator.editOldURL()" id="edit_url_old" style="font-size:12px">edit</a>
154
- </td>
155
- </tr>
156
- <tr valign="top">
157
- <td>Path</td>
158
- <td>
159
- <input type="text" name="path_old" id="path_old" value="<?php echo $old_path ?>" readonly="readonly" class="readonly" />
160
- <a href="javascript:Duplicator.editOldPath()" id="edit_path_old" style="font-size:12px">edit</a>
161
- </td>
162
- </tr>
163
- </table>
164
 
165
- <div class="hdr-sub" style="margin-top:8px">New Settings</div>
166
- <table class="table-inputs-s2">
167
- <tr>
168
- <td style="width:80px">URL</td>
169
- <td>
170
- <input type="text" name="url_new" id="url_new" value="<?php echo $GLOBALS['FW_URL_NEW'] ?>" />
171
- <a href="javascript:Duplicator.getNewURL('url_new')" style="font-size:12px">get</a>
172
- </td>
173
- </tr>
174
- <tr>
175
- <td>Path</td>
176
- <td><input type="text" name="path_new" id="path_new" value="<?php echo $new_path ?>" /></td>
177
- </tr>
178
- <tr>
179
- <td>Title</td>
180
- <td><input type="text" name="blogname" id="blogname" value="<?php echo $GLOBALS['FW_BLOGNAME'] ?>" /></td>
181
- </tr>
182
- </table>
183
- <br/><br/>
184
-
185
- <!-- ==========================
186
- ADVANCED OPTIONS -->
187
- <a href="javascript:void(0)" onclick="$('#dup-s2-adv-opts').toggle(0)"><b style="font-size:14px">Advanced Options...</b></a>
188
- <div id='dup-s2-adv-opts' style="display:none;">
189
-
190
- <br/>
191
- <div class="hdr-sub">Add New Admin Account</div>
192
- <table class="table-inputs-s2" style="margin-top:7px">
193
- <tr><td colspan="2"><i style="color:gray;font-size: 11px">This feature is optional. If the username already exists the account will NOT be created or updated.</i></td></tr>
194
  <tr>
195
- <td>Username </td>
196
- <td><input type="text" name="wp_username" id="wp_username" value="" title="4 characters minimum" placeholder="(4 or more characters)" /></td>
197
- </tr>
 
 
 
 
 
198
  <tr>
199
- <td valign="top">Password</td>
200
- <td><input type="text" name="wp_password" id="wp_password" value="" title="6 characters minimum" placeholder="(6 or more characters)" /></td>
 
 
 
 
 
 
 
 
 
 
201
  </tr>
202
- </table>
203
- <br/><br/>
204
-
205
-
206
- <div class="hdr-sub">Scan Options</div>
207
- <table style="width: 100%;">
208
  <tr>
209
- <td valign="top" style="width:80px">Site URL</td>
210
  <td>
211
- <input type="text" name="siteurl" id="siteurl" value="" />
212
- <a href="javascript:Duplicator.getNewURL('siteurl')" style="font-size:12px">get</a><br/>
 
 
213
  </td>
214
  </tr>
215
- </table><br/>
216
- <table>
217
  <tr>
218
- <td style="padding-right:10px">
219
- Scan Tables
220
- <div class="dup-s2-allnonelinks">
221
- <a href="javascript:void(0)" onclick="$('#tables option').prop('selected',true);">[All]</a>
222
- <a href="javascript:void(0)" onclick="$('#tables option').prop('selected',false);">[None]</a>
223
- </div><br style="clear:both" />
224
- <select id="tables" name="tables[]" multiple="multiple" style="width:315px; height:100px">
225
- <?php
226
- foreach( $all_tables as $table ) {
227
- echo '<option selected="selected" value="' . DUPX_Util::esc_html_attr( $table ) . '">' . $table . '</option>';
228
- }
229
- ?>
230
- </select>
231
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
232
  </td>
233
- <td valign="top">
234
- Activate Plugins
235
- <div class="dup-s2-allnonelinks">
236
- <a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',true);">[All]</a>
237
- <a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',false);">[None]</a>
238
- </div><br style="clear:both" />
239
- <select id="plugins" name="plugins[]" multiple="multiple" style="width:315px; height:100px">
240
- <?php
241
- foreach ($active_plugins as $plugin) {
242
- echo '<option selected="selected" value="' . DUPX_Util::esc_html_attr( $plugin ) . '">' . dirname($plugin) . '</option>';
243
- }
244
- ?>
245
- </select>
246
  </td>
247
- </tr>
248
- </table><br/>
249
-
250
- <input type="checkbox" name="postguid" id="postguid" value="1" /> <label for="postguid">Keep Post GUID unchanged</label><br/>
251
-
252
- <input type="checkbox" name="fullsearch" id="fullsearch" value="1" /> <label for="fullsearch">Enable Full Search <small>(very slow)</small> </label><br/>
253
- <br/><br/><br/><br/>
254
-
255
- </div>
 
 
 
 
256
 
257
- <div class="dup-footer-buttons" style='position: absolute; bottom:20px'>
258
- <input id="dup-step2-next" type="button" value=" Run Update " onclick="Duplicator.runUpdate()" />
259
- </div>
260
  </form>
261
 
262
 
263
  <!-- =========================================
264
- VIEW: STEP 2 - AJAX RESULT -->
265
- <form id='dup-step2-result-form' method="post" class="content-form" style="display:none">
266
- <input type="hidden" name="action_step" value="3" />
267
- <input type="hidden" name="package_name" value="<?php echo $_POST['package_name'] ?>" />
268
- <!-- Set via jQuery -->
269
- <input type="hidden" name="url_new" id="ajax-url_new" />
270
- <input type="hidden" name="json" id="ajax-json" />
271
-
272
- <div class="dup-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
273
  <div class="hdr-main">
274
- Step 2: Update Files &amp; Database
275
- </div><br />
276
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
  <!-- PROGRESS BAR -->
278
  <div id="progress-area">
279
- <div style="width:500px; margin:auto">
280
- <h3>Processing Data Replacement Please Wait...</h3>
281
- <div id="progress-bar"></div>
282
- <i>This may take several minutes</i>
283
- </div>
284
  </div>
285
-
286
  <!-- AJAX SYSTEM ERROR -->
287
  <div id="ajaxerr-area" style="display:none">
288
- <p>Please try again an issue has occurred.</p>
289
- <div style="padding: 0px 10px 10px 10px;">
290
- <div id="ajaxerr-data">An unknown issue has occurred with the data replacement setup process. Please see the installer-log.txt file for more details.</div>
291
  <div style="text-align:center; margin:10px auto 0px auto">
292
- <input type="button" onclick='Duplicator.hideErrorResult2()' value="&laquo; Try Again" /><br/><br/>
293
  <i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket' target='_blank'>snapcreek.com</a></i>
294
  </div>
295
- </div>
296
  </div>
297
  </form>
298
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  <?php
2
+ $_POST['logging'] = isset($_POST['logging']) ? trim($_POST['logging']) : 1;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ?>
4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
5
 
6
  <!-- =========================================
7
  VIEW: STEP 2- INPUT -->
8
+ <form id='s2-input-form' method="post" class="content-form" data-parsley-validate="true" data-parsley-excluded="input[type=hidden], [disabled], :hidden">
9
+ <input type="hidden" name="action_ajax" value="2" />
10
+ <input type="hidden" name="action_step" value="2" />
11
+ <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
12
+ <input type="hidden" name="logging" id="logging" value="<?php echo $_POST['logging'] ?>" />
13
+
14
+ <div class="dupx-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
 
 
 
 
 
 
 
 
15
  <div class="hdr-main">
16
+ Step <span class="step">2</span> of 4: Install Database
17
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
+ <div class="s2-btngrp">
20
+ <input id="s2-basic-btn" type="button" value="Basic" class="active" onclick="DUPX.togglePanels('basic')" />
21
+ <input id="s2-cpnl-btn" type="button" value="cPanel" class="in-active" onclick="DUPX.togglePanels('cpanel')" />
22
+ </div>
23
+
24
+
25
+ <!-- =========================================
26
+ BASIC PANEL -->
27
+ <div id="s2-basic-pane">
28
+ <div class="hdr-sub1">
29
+ Database Setup
30
+ </div>
31
+ <table class="dupx-opts">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  <tr>
33
+ <td>Action</td>
34
+ <td>
35
+ <select name="dbaction" id="dbaction">
36
+ <option value="create" selected="true">Create New Database</option>
37
+ <option value="empty">Connect and Remove All Data</option>
38
+ </select>
39
+ </td>
40
+ </tr>
41
  <tr>
42
+ <td>Host</td>
43
+ <td>
44
+ <table class="s2-opts-dbhost">
45
+ <tr>
46
+ <td><input type="text" name="dbhost" id="dbhost" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBHOST']); ?>" placeholder="localhost" style="width:450px" /></td>
47
+ <td style="vertical-align:top">
48
+ <input id="s2-dbport-btn" type="button" onclick="DUPX.togglePort()" class="s2-small-btn" value="Port: <?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
49
+ <input name="dbport" id="dbport" type="text" style="width:80px; display:none" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
50
+ </td>
51
+ </tr>
52
+ </table>
53
+ </td>
54
  </tr>
 
 
 
 
 
 
55
  <tr>
56
+ <td>Database</td>
57
  <td>
58
+ <input type="text" name="dbname" id="dbname" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBNAME']); ?>" placeholder="new or existing database name" />
59
+ <div id="s2-warning-emptydb">
60
+ <label for="accept-warnings">Warning: This action will remove any and all data from the database name above!</label>
61
+ </div>
62
  </td>
63
  </tr>
 
 
64
  <tr>
65
+ <td>User</td>
66
+ <td><input type="text" name="dbuser" id="dbuser" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBUSER']); ?>" placeholder="valid database username" /></td>
67
+ </tr>
68
+ <tr>
69
+ <td>Password</td>
70
+ <td><input type="text" name="dbpass" id="dbpass" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPASS']); ?>" placeholder="valid database user password" /></td>
71
+ </tr>
72
+ </table>
73
+ </div>
74
+
75
+
 
 
76
 
77
+ <!-- =========================================
78
+ C-PANEL PANEL -->
79
+ <div id="s2-cpnl-pane">
80
+
81
+ <div class="s2-gopro">
82
+
83
+ <h2>cPanel Connectivity</h2>
84
+
85
+ <div style="text-align: center">
86
+ <a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_step1&utm_campaign=duplicator_pro">Duplicator Pro</a>
87
+ takes advantage of your hosts <br/>
88
+ cPanel interface directly <b>from this installer!</b>
89
+ </div>
90
+
91
+ <b>Features Include:</b>
92
+ <ul>
93
+ <li>Fast cPanel Login</li>
94
+ <li>Create New Databases</li>
95
+ <li>Create New Database Users</li>
96
+ <li>Preview and Select Existing Databases and Users</li>
97
+ </ul>
98
+
99
+ <small>
100
+ Note: Most hosting providers do not allow applications to create new databases or database users directly from PHP. However with the cPanel API these restrictions
101
+ are removed opening up a robust interface for direct access to existing database resources. You can take advantage of these great features and improve your work-flow with
102
+ <a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_step1&utm_campaign=duplicator_pro">Duplicator Pro!</a>
103
+ </small>
104
+ </div>
105
+
106
+ </div>
107
+
108
+ <!-- =========================================
109
+ DIALOG: DB CONNECTION CHECK -->
110
+ <div id="s2-dbconn">
111
+ <div id="s2-dbconn-status" style="display:none">
112
+ <div style="padding: 0px 10px 10px 10px;">
113
+ <div id="s2-dbconn-test-msg" style="min-height:80px"></div>
114
+ </div>
115
+ <small><input type="button" onclick="$('#s2-dbconn-status').hide(500)" class="s2-small-btn" value="Hide Message" /></small>
116
+ </div>
117
+ </div>
118
+
119
+
120
+ <br/>
121
+
122
+ <!-- ====================================
123
+ ADVANCED OPTIONS
124
+ ==================================== -->
125
+ <div class="hdr-sub1">
126
+ <a data-type="toggle" data-target="#s2-area-adv-opts"><i class="dupx-plus-square"></i> Advanced Options</a>
127
+ </div>
128
+ <div id='s2-area-adv-opts' style="display:none">
129
+ <div class="help-target"><a href="?help#help-s2" target="_blank">[help]</a></div>
130
+
131
+ <table class="dupx-opts dupx-advopts">
132
+ <tr>
133
+ <td>Spacing</td>
134
+ <td colspan="2">
135
+ <input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label>
136
  </td>
137
+ </tr>
138
+ <tr>
139
+ <td style="vertical-align:top">Mode</td>
140
+ <td colspan="2">
141
+ <input type="radio" name="dbmysqlmode" id="dbmysqlmode_1" checked="true" value="DEFAULT"/> <label for="dbmysqlmode_1">Default</label> &nbsp;
142
+ <input type="radio" name="dbmysqlmode" id="dbmysqlmode_2" value="DISABLE"/> <label for="dbmysqlmode_2">Disable</label> &nbsp;
143
+ <input type="radio" name="dbmysqlmode" id="dbmysqlmode_3" value="CUSTOM"/> <label for="dbmysqlmode_3">Custom</label> &nbsp;
144
+ <div id="dbmysqlmode_3_view" style="display:none; padding:5px">
145
+ <input type="text" name="dbmysqlmode_opts" value="" /><br/>
146
+ <small>Separate additional <a href="?help#help-mysql-mode" target="_blank">sql modes</a> with commas &amp; no spaces.<br/>
147
+ Example: <i>NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE,...</i>.</small>
148
+ </div>
 
149
  </td>
150
+ </tr>
151
+ <tr><td style="width:130px">Charset</td><td><input type="text" name="dbcharset" id="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" /> </td></tr>
152
+ <tr><td>Collation </td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
153
+ </table>
154
+
155
+ </div>
156
+ <br/><br/><br/>
157
+ <br/><br/><br/>
158
+
159
+ <div class="dupx-footer-buttons">
160
+ <input type="button" onclick="DUPX.testDatabase()" class="default-btn" value="Test Database" />
161
+ <input id="dup-step1-deploy-btn" type="button" class="default-btn" value=" Next " onclick="DUPX.confirmDeployment()" />
162
+ </div>
163
 
 
 
 
164
  </form>
165
 
166
 
167
  <!-- =========================================
168
+ VIEW: STEP 2 - AJAX RESULT
169
+ Auto Posts to view.step2.php
170
+ ========================================= -->
171
+ <form id='s2-result-form' method="post" class="content-form" style="display:none">
172
+
173
+ <div class="dupx-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
 
 
 
174
  <div class="hdr-main">
175
+ Step <span class="step">2</span> of 4: Install Database
176
+ </div>
177
+
178
+ <!-- POST PARAMS -->
179
+ <div class="dupx-debug">
180
+ <input type="hidden" name="action_step" value="3" />
181
+ <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
182
+ <input type="hidden" name="logging" id="ajax-logging" />
183
+ <input type="hidden" name="dbhost" id="ajax-dbhost" />
184
+ <input type="hidden" name="dbport" id="ajax-dbport" />
185
+ <input type="hidden" name="dbuser" id="ajax-dbuser" />
186
+ <input type="hidden" name="dbpass" id="ajax-dbpass" />
187
+ <input type="hidden" name="dbname" id="ajax-dbname" />
188
+ <input type="hidden" name="json" id="ajax-json" />
189
+ <input type="hidden" name="dbcharset" id="ajax-dbcharset" />
190
+ <input type="hidden" name="dbcollate" id="ajax-dbcollate" />
191
+ <br/>
192
+ <input type='submit' value='manual submit'>
193
+ </div>
194
+
195
  <!-- PROGRESS BAR -->
196
  <div id="progress-area">
197
+ <div style="width:500px; margin:auto">
198
+ <h3>Installing Database Please Wait...</h3>
199
+ <div id="progress-bar"></div>
200
+ <i>This may take several minutes</i>
201
+ </div>
202
  </div>
203
+
204
  <!-- AJAX SYSTEM ERROR -->
205
  <div id="ajaxerr-area" style="display:none">
206
+ <p>Please try again an issue has occurred.</p>
207
+ <div style="padding: 0px 10px 10px 0px;">
208
+ <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>
209
  <div style="text-align:center; margin:10px auto 0px auto">
210
+ <input type="button" class="default-btn" onclick='DUPX.hideErrorResult()' value="&laquo; Try Again" /><br/><br/>
211
  <i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket' target='_blank'>snapcreek.com</a></i>
212
  </div>
213
+ </div>
214
  </div>
215
  </form>
216
 
217
+
218
+
219
+ <!-- CONFIRM DIALOG -->
220
+ <div id="dialog-confirm-content" style="display:none">
221
+ <div style="padding:0 0 25px 0">
222
+ <b>Run installer with these settings?</b>
223
+ </div>
224
+
225
+ <b>Database Settings:</b><br/>
226
+ <table style="margin-left:20px">
227
+ <tr>
228
+ <td><b>Server:</b></td>
229
+ <td><i id="dlg-dbhost"></i></td>
230
+ </tr>
231
+ <tr>
232
+ <td><b>Name:</b></td>
233
+ <td><i id="dlg-dbname"></i></td>
234
+ </tr>
235
+ <tr>
236
+ <td><b>User:</b></td>
237
+ <td><i id="dlg-dbuser"></i></td>
238
+ </tr>
239
+ </table>
240
+ <br/><br/>
241
+
242
+ <small> WARNING: Be sure these database parameters are correct! Entering the wrong information WILL overwrite an existing database.
243
+ Make sure to have backups of all your data before proceeding.</small><br/>
244
+ </div>
245
+
246
+
247
+ <script>
248
+ /* Confirm Dialog to validate run */
249
+ DUPX.confirmDeployment = function()
250
+ {
251
+ var $form = $('#s2-input-form');
252
+ $form.parsley().validate();
253
+ if (!$form.parsley().isValid()) {
254
+ return;
255
+ }
256
+
257
+ $('#dlg-dbhost').html($("#dbhost").val());
258
+ $('#dlg-dbname').html($("#dbname").val());
259
+ $('#dlg-dbuser').html($("#dbuser").val());
260
+
261
+ modal({
262
+ type: 'confirm',
263
+ title: 'Install Confirmation',
264
+ text: $('#dialog-confirm-content').html(),
265
+ callback: function(result)
266
+ {
267
+ if (result == true) {
268
+ DUPX.runDeployment();
269
+ }
270
+ }
271
+ });
272
+ }
273
+
274
+
275
+ /* Performs Ajax post to extract files and create db
276
+ * Timeout (10000000 = 166 minutes) */
277
+ DUPX.runDeployment = function()
278
+ {
279
+ var $form = $('#s2-input-form');
280
+ var dbhost = $("#dbhost").val();
281
+ var dbname = $("#dbname").val();
282
+ var dbuser = $("#dbuser").val();
283
+
284
+ $.ajax({
285
+ type: "POST",
286
+ timeout: 1800000,
287
+ dataType: "json",
288
+ url: window.location.href,
289
+ data: $form.serialize(),
290
+ beforeSend: function() {
291
+ DUPX.showProgressBar();
292
+ $form.hide();
293
+ $('#s2-result-form').show();
294
+ },
295
+ success: function(data, textStatus, xhr){
296
+ if (typeof(data) != 'undefined' && data.pass == 1) {
297
+ $("#ajax-dbhost").val($("#dbhost").val());
298
+ $("#ajax-dbport").val($("#dbport").val());
299
+ $("#ajax-dbuser").val($("#dbuser").val());
300
+ $("#ajax-dbpass").val($("#dbpass").val());
301
+ $("#ajax-dbname").val($("#dbname").val());
302
+ $("#ajax-dbcharset").val($("#dbcharset").val());
303
+ $("#ajax-dbcollate").val($("#dbcollate").val());
304
+ $("#ajax-logging").val($("#logging").val());
305
+ $("#ajax-json").val(escape(JSON.stringify(data)));
306
+ <?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
307
+ setTimeout(function() {$('#s2-result-form').submit();}, 500);
308
+ <?php endif; ?>
309
+ $('#progress-area').fadeOut(1000);
310
+ } else {
311
+ DUPX.hideProgressBar();
312
+ }
313
+ },
314
+ error: function(xhr) {
315
+ var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
316
+ status += "<b>Status:</b> " + xhr.statusText + "<br/>";
317
+ status += "<b>Response:</b> " + xhr.responseText + "";
318
+ status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
319
+ status += "- Check the <a href='installer-log.txt' target='_blank'>installer-log.txt</a> file for warnings or errors.<br/>";
320
+ status += "- Check the web server and PHP error logs. <br/>";
321
+ status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
322
+ $('#ajaxerr-data').html(status);
323
+ DUPX.hideProgressBar();
324
+ }
325
+ });
326
+
327
+ }
328
+
329
+ /**
330
+ * Toggles the cpanel Login area */
331
+ DUPX.togglePanels = function (pane)
332
+ {
333
+ $('#s2-basic-pane, #s2-cpnl-pane').hide();
334
+ $('#s2-basic-btn, #s2-cpnl-btn').removeClass('active in-active');
335
+ if (pane == 'basic') {
336
+ $('#s2-basic-pane').show();
337
+ $('#s2-basic-btn').addClass('active');
338
+ $('#s2-cpnl-btn').addClass('in-active');
339
+ } else {
340
+ $('#s2-cpnl-pane').show(200);
341
+ $('#s2-cpnl-btn').addClass('active');
342
+ $('#s2-basic-btn').addClass('in-active');
343
+ }
344
+ }
345
+
346
+
347
+ /** Go back on AJAX result view */
348
+ DUPX.hideErrorResult = function()
349
+ {
350
+ $('#s2-result-form').hide();
351
+ $('#s2-input-form').show(200);
352
+ }
353
+
354
+
355
+ /** Shows results of database connection
356
+ * Timeout (45000 = 45 secs) */
357
+ DUPX.testDatabase = function ()
358
+ {
359
+ $.ajax({
360
+ type: "POST",
361
+ timeout: 45000,
362
+ url: window.location.href + '?' + 'dbtest=1',
363
+ data: $('#s2-input-form').serialize(),
364
+ success: function(data){ $('#s2-dbconn-test-msg').html(data); },
365
+ error: function(data){ alert('An error occurred while testing the database connection! Contact your server admin to make sure the connection inputs are correct!'); }
366
+ });
367
+
368
+ $('#s2-dbconn-test-msg').html("Attempting Connection. Please wait...");
369
+ $("#s2-dbconn-status").show(100);
370
+
371
+ }
372
+
373
+
374
+ DUPX.showDeleteWarning = function ()
375
+ {
376
+ ($('#dbaction').val() == 'empty')
377
+ ? $('#s2-warning-emptydb').show(200)
378
+ : $('#s2-warning-emptydb').hide(200);
379
+ }
380
+
381
+
382
+ DUPX.togglePort = function ()
383
+ {
384
+ $('#s2-dbport-btn').hide();
385
+ $('#dbport').show();
386
+ }
387
+
388
+
389
+ //DOCUMENT LOAD
390
+ $(document).ready(function()
391
+ {
392
+ $('#dup-s2-dialog-data').appendTo('#dup-s2-result-container');
393
+ $("select#dbaction").click(DUPX.showDeleteWarning);
394
+
395
+ //MySQL Mode
396
+ $("input[name=dbmysqlmode]").click(function() {
397
+ if ($(this).val() == 'CUSTOM') {
398
+ $('#dbmysqlmode_3_view').show();
399
+ } else {
400
+ $('#dbmysqlmode_3_view').hide();
401
+ }
402
+ });
403
+
404
+ if ($("input[name=dbmysqlmode]:checked").val() == 'CUSTOM') {
405
+ $('#dbmysqlmode_3_view').show();
406
+ }
407
+ $("*[data-type='toggle']").click(DUPX.toggleClick);
408
+ });
409
+ </script>
installer/build/view.step3.php CHANGED
@@ -1,244 +1,321 @@
1
- <?php
2
- // Exit if accessed directly
3
- if (! defined('DUPLICATOR_INIT')) {
4
- $_baseURL = "http://" . strlen($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['HTTP_HOST'];
5
- header("HTTP/1.1 301 Moved Permanently");
6
- header("Location: $_baseURL");
7
- exit;
8
- }
9
- ?>
10
- <link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
11
- <script type="text/javascript">
12
- /** **********************************************
13
- * METHOD: Posts to page to remove install files */
14
- Duplicator.removeInstallerFiles = function(package_name) {
15
- var msg = "You will now be redirected to the cleanup page.\nSelect 'Delete Reserved Files' to remove installer files.";
16
- alert(msg);
17
-
18
- var nurl = '<?php echo rtrim($_POST['url_new'], "/"); ?>/wp-admin/admin.php?page=duplicator-tools&tab=cleanup';
19
- window.open(nurl, "_blank");
20
- };
21
- </script>
22
-
23
-
24
- <!-- =========================================
25
- VIEW: STEP 3- INPUT -->
26
- <form id='dup-step3-input-form' method="post" class="content-form" style="line-height:20px">
27
- <input type="hidden" name="url_new" id="url_new" value="<?php echo rtrim($_POST['url_new'], "/"); ?>" />
28
- <div class="dup-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
29
-
30
- <div class="hdr-main">
31
- Step 3: Test Site
32
- </div><br />
33
-
34
- <div class="hdr-sub">
35
- <div class="s3-final-title">FINAL STEPS!</div>
36
- </div>
37
-
38
- <table class="s3-final-step">
39
- <tr>
40
- <td style="width:170px"><a class="s3-final-btns" href='<?php echo rtrim($_POST['url_new'], "/"); ?>/wp-admin/options-permalink.php' target='_blank'> Save Permalinks</a></td>
41
- <td><i>Updates URL rewrite rules in .htaccess (requires login)</i></td>
42
- </tr>
43
- <tr>
44
- <td><a class="s3-final-btns" href='<?php echo $_POST['url_new']; ?>' target='_blank'>Test Site</a></td>
45
- <td><i>Validate all pages, links images and plugins</i></td>
46
- </tr>
47
- <tr>
48
- <td><a class="s3-final-btns" href="javascript:void(0)" onclick="Duplicator.removeInstallerFiles('<?php echo $_POST['package_name'] ?>')">Security Cleanup</a></td>
49
- <td><i>Validate installer files are removed (requires login)</i></td>
50
- </tr>
51
- <tr>
52
- <td><a class="s3-final-btns" href="javascript:void(0)" onclick="$('#dup-step3-install-report').toggle(400)">Show Report</a></td>
53
- <td>
54
- <i id="dup-step3-install-report-count">
55
- <span data-bind="with: status.step1">Deploy Results: (<span data-bind="text: query_errs"></span>)</span> &nbsp;
56
- <span data-bind="with: status.step2">Update Results: (<span data-bind="text: err_all"></span>)</span> &nbsp; &nbsp;
57
- <span data-bind="with: status.step2" style="color:#888"><b>General Notices:</b> (<span data-bind="text: warn_all"></span>)</span>
58
- </i>
59
- </td>
60
- </tr>
61
- </table><br/>
62
-
63
- <div class="s3-btns-msg">Click buttons above to complete process</div>
64
-
65
- <div class="s3-go-back">
66
- <i>To re-install <a href="javascript:history.go(-2)">start over at step 1</a>.</i><br/>
67
- <i>The .htaccess file was reset. Resave plugins that write to this file.</i>
68
- </div>
69
-
70
-
71
- <!-- ========================
72
- INSTALL REPORT -->
73
- <div id="dup-step3-install-report" style='display:none'>
74
- <table class='s3-report-results' style="width:100%">
75
- <tr><th colspan="4">Database Results</th></tr>
76
- <tr style="font-weight:bold">
77
- <td style="width:150px"></td>
78
- <td>Tables</td>
79
- <td>Rows</td>
80
- <td>Cells</td>
81
- </tr>
82
- <tr data-bind="with: status.step1">
83
- <td>Created</td>
84
- <td><span data-bind="text: table_count"></span></td>
85
- <td><span data-bind="text: table_rows"></span></td>
86
- <td>n/a</td>
87
- </tr>
88
- <tr data-bind="with: status.step2">
89
- <td>Scanned</td>
90
- <td><span data-bind="text: scan_tables"></span></td>
91
- <td><span data-bind="text: scan_rows"></span></td>
92
- <td><span data-bind="text: scan_cells"></span></td>
93
- </tr>
94
- <tr data-bind="with: status.step2">
95
- <td>Updated</td>
96
- <td><span data-bind="text: updt_tables"></span></td>
97
- <td><span data-bind="text: updt_rows"></span></td>
98
- <td><span data-bind="text: updt_cells"></span></td>
99
- </tr>
100
- </table>
101
-
102
- <table class='s3-report-errs' style="width:100%; border-top:none">
103
- <tr><th colspan="4">Report Details <br/> <i style="font-size:10px; font-weight:normal">(click links below to view details)</i></th></tr>
104
- <tr>
105
- <td data-bind="with: status.step1">
106
- <a href="javascript:void(0);" onclick="$('#dup-step3-errs-create').toggle(400)">Step1: Deploy Results (<span data-bind="text: query_errs"></span>)</a><br/>
107
- </td>
108
- <td data-bind="with: status.step2">
109
- <a href="javascript:void(0);" onclick="$('#dup-step3-errs-upd').toggle(400)">Step2: Update Results (<span data-bind="text: err_all"></span>)</a>
110
- </td>
111
- <td data-bind="with: status.step2">
112
- <a href="#dup-step2-errs-warn-anchor" onclick="$('#dup-step3-warnlist').toggle(400)">General Notices (<span data-bind="text: warn_all"></span>)</a>
113
- </td>
114
- </tr>
115
- <tr><td colspan="4"></td></tr>
116
- </table>
117
-
118
-
119
- <div id="dup-step3-errs-create" class="s3-err-msg">
120
- <div class="dup-step3-err-title">STEP 1 DEPLOY RESULTS</div>
121
- <b data-bind="with: status.step1">DEPLOY ERRORS (<span data-bind="text: query_errs"></span>)</b><br/>
122
- <div class="info-error">
123
- Queries that error during the deploy step are logged to the <a href="installer-log.txt" target="_blank">install-log.txt</a> file and marked '**ERROR**'.
124
- <br/><br/>
125
-
126
- <b><u>Common Fixes:</u></b>
127
- <br/>
128
-
129
- <b>Query size limits:</b> Update your MySQL server with the <a href="https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html" target="_blank">max_allowed_packet</a>
130
- setting to handle larger payloads. <br/>
131
-
132
- <b>Unknown collation:</b> The MySQL Version is too old see:
133
- <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-110-q" target="_blank">What is Compatibility mode & 'Unknown collation' errors?</a>
134
- <br/>
135
- </div>
136
- </div>
137
-
138
-
139
- <div id="dup-step3-errs-upd" class="s3-err-msg">
140
- <div class="dup-step3-err-title">STEP 2 UPDATE RESULTS</div>
141
- <!-- MYSQL QUERY ERRORS -->
142
- <b data-bind="with: status.step2">UPDATE ERRORS (<span data-bind="text: errsql_sum"></span>) </b><br/>
143
- <div class="info-error">
144
- Update errors that show here are queries that could not be performed because the database server being used has issues running it. Please validate the query, if
145
- it looks to be of concern please try to run the query manually. In many cases if your site performs well without any issues you can ignore the error.
146
- </div>
147
- <div class="content">
148
- <div data-bind="foreach: status.step2.errsql"><div data-bind="text: $data"></div></div>
149
- <div data-bind="visible: status.step2.errsql.length == 0">No MySQL query errors found</div>
150
- </div>
151
-
152
- <!-- TABLE KEY ERRORS -->
153
- <b data-bind="with: status.step2">TABLE KEY NOTICES (<span data-bind="text: errkey_sum"></span>)</b><br/>
154
- <div class="info-notice">
155
- Notices should be ignored unless issues are found after you have tested an installed site. This notice indicates that a primary key is required to run the
156
- update engine. Below is a list of tables and the rows that were not updated. On some databases you can remove these notices by checking the box 'Enable Full Search'
157
- under advanced options in step2 of the installer.
158
- <br/><br/>
159
- <small>
160
- <b>Advanced Searching:</b><br/>
161
- Use the following query to locate the table that was not updated: <br/>
162
- <i>SELECT @row := @row + 1 as row, t.* FROM some_table t, (SELECT @row := 0) r</i>
163
- </small>
164
- </div>
165
- <div class="content">
166
- <div data-bind="foreach: status.step2.errkey"><div data-bind="text: $data"></div></div>
167
- <div data-bind="visible: status.step2.errkey.length == 0">No missing primary key errors</div>
168
- </div>
169
-
170
- <!-- SERIALIZE ERRORS -->
171
- <b data-bind="with: status.step2">SERIALIZATION NOTICES (<span data-bind="text: errser_sum"></span>)</b><br/>
172
- <div class="info-notice">
173
- Notices should be ignored unless issues are found after you have tested an installed site. The SQL below will show data that may have not been
174
- updated during the serialization process. Best practices for serialization notices is to just re-save the plugin/post/page in question.
175
- </div>
176
- <div class="content">
177
- <div data-bind="foreach: status.step2.errser"><div data-bind="text: $data"></div></div>
178
- <div data-bind="visible: status.step2.errser.length == 0">No serialization errors found</div>
179
- </div>
180
-
181
- </div>
182
-
183
-
184
- <!-- WARNINGS-->
185
- <div id="dup-step3-warnlist" class="s3-err-msg">
186
- <a href="#" id="dup-step2-errs-warn-anchor"></a>
187
- <b>GENERAL NOTICES</b><br/>
188
- <div class="info">
189
- The following is a list of notices that may need to be fixed in order to finalize your setup. These values should only be investigated if your running into
190
- issues with your site. For more details see the <a href="https://codex.wordpress.org/Editing_wp-config.php" target="_blank">WordPress Codex</a>.
191
- </div>
192
- <div class="content">
193
- <div data-bind="foreach: status.step2.warnlist">
194
- <div data-bind="text: $data"></div>
195
- </div>
196
- <div data-bind="visible: status.step2.warnlist.length == 0">
197
- No notices found
198
- </div>
199
- </div>
200
- </div><br/>
201
-
202
- </div><br/>
203
-
204
- <?php
205
- $num = rand(1,2);
206
- switch ($num) {
207
- case 1:
208
- $key = 'free_inst_s3btn1';
209
- $txt = 'Want More Power?';
210
- break;
211
- case 2:
212
- $key = 'free_inst_s3btn2';
213
- $txt = 'Go Pro Today!';
214
- break;
215
- default :
216
- $key = 'free_inst_s3btn2';
217
- $txt = 'Go Pro Today!';
218
- }
219
- ?>
220
-
221
- <div class="s3-gopro-btn">
222
- <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content=<?php echo $key;?>" target="_blank"> <?php echo $txt;?></a>
223
- </div>
224
- <br/><br/>
225
-
226
- <div class='s3-connect'>
227
- <a href="installer.php?help=1#troubleshoot" target="_blank">Troubleshoot</a> |
228
- <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_blank'>FAQs</a> |
229
- <a href='https://snapcreek.com/ticket' target='_blank'>Support</a>
230
- </div><br/>
231
- </form>
232
-
233
- <script type="text/javascript">
234
- MyViewModel = function() {
235
- this.status = <?php echo urldecode($_POST['json']); ?>;
236
- var errorCount = this.status.step1.query_errs || 0;
237
- (errorCount >= 1 )
238
- ? $('#dup-step3-install-report-count').css('color', '#BE2323')
239
- : $('#dup-step3-install-report-count').css('color', '#197713')
240
- };
241
- ko.applyBindings(new MyViewModel());
242
- </script>
243
-
244
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ $dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport']);
3
+
4
+ $all_tables = DUPX_DB::getTables($dbh);
5
+ $active_plugins = DUPX_U::getActivePlugins($dbh);
6
+
7
+ $old_path = $GLOBALS['FW_WPROOT'];
8
+ $new_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
9
+ $new_path = ((strrpos($old_path, '/') + 1) == strlen($old_path)) ? DUPX_U::addSlash($new_path) : $new_path;
10
+ ?>
11
+
12
+
13
+ <!-- =========================================
14
+ VIEW: STEP 3- INPUT -->
15
+ <form id='s3-input-form' method="post" class="content-form">
16
+
17
+ <!-- POST PARAMS -->
18
+ <input type="hidden" name="action_ajax" value="3" />
19
+ <input type="hidden" name="action_step" value="3" />
20
+ <input type="hidden" name="logging" value="<?php echo $_POST['logging'] ?>" />
21
+ <input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
22
+ <input type="hidden" name="json" value="<?php echo $_POST['json']; ?>" />
23
+ <input type="hidden" name="dbhost" value="<?php echo $_POST['dbhost'] ?>" />
24
+ <input type="hidden" name="dbport" value="<?php echo $_POST['dbport'] ?>" />
25
+ <input type="hidden" name="dbuser" value="<?php echo $_POST['dbuser'] ?>" />
26
+ <input type="hidden" name="dbpass" value="<?php echo htmlentities($_POST['dbpass']) ?>" />
27
+ <input type="hidden" name="dbname" value="<?php echo $_POST['dbname'] ?>" />
28
+ <input type="hidden" name="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" />
29
+ <input type="hidden" name="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" />
30
+
31
+ <div class="dupx-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
32
+ <div class="hdr-main">
33
+ Step <span class="step">3</span> of 4: Data Replacement
34
+ </div>
35
+
36
+ <div class="hdr-sub1" style="margin-top:8px">New Settings</div>
37
+ <table class="s3-table-inputs">
38
+ <tr>
39
+ <td style="width:80px">URL</td>
40
+ <td>
41
+ <input type="text" name="url_new" id="url_new" value="<?php echo $GLOBALS['FW_URL_NEW'] ?>" />
42
+ <a href="javascript:DUPX.getNewURL('url_new')" style="font-size:12px">get</a>
43
+ </td>
44
+ </tr>
45
+ <tr>
46
+ <td>Path</td>
47
+ <td><input type="text" name="path_new" id="path_new" value="<?php echo $new_path ?>" /></td>
48
+ </tr>
49
+ <tr>
50
+ <td>Title</td>
51
+ <td><input type="text" name="blogname" id="blogname" value="<?php echo $GLOBALS['FW_BLOGNAME'] ?>" /></td>
52
+ </tr>
53
+ </table>
54
+ <br/><br/>
55
+
56
+ <!-- ====================================
57
+ ADVANCED OPTIONS
58
+ ==================================== -->
59
+ <div class="hdr-sub1">
60
+ <a data-type="toggle" data-target="#s3-adv-opts"><i class="dupx-plus-square"></i> Advanced Options</a>
61
+ </div>
62
+ <div id='s3-adv-opts' style="display:none;">
63
+ <div class="help-target"><a href="?help#help-s3" target="_blank">[help]</a></div>
64
+ <br/><br/>
65
+ <div class="hdr-sub3">New Admin Account</div>
66
+ <div style="text-align: center; margin-top:7px">
67
+ <i style="color:gray;font-size: 11px">This feature is optional. If the username already exists the account will NOT be created or updated.</i>
68
+ </div>
69
+ <table class="s3-table-inputs">
70
+ <tr>
71
+ <td>Username </td>
72
+ <td><input type="text" name="wp_username" id="wp_username" value="" title="4 characters minimum" placeholder="(4 or more characters)" /></td>
73
+ </tr>
74
+ <tr>
75
+ <td valign="top">Password</td>
76
+ <td><input type="text" name="wp_password" id="wp_password" value="" title="6 characters minimum" placeholder="(6 or more characters)" /></td>
77
+ </tr>
78
+ </table>
79
+ <br/><br/>
80
+
81
+ <!-- GENERAL -->
82
+ <div class="hdr-sub3">WP-Config File</div>
83
+ <table class="dupx-opts dupx-advopts">
84
+ <tr>
85
+ <td>Cache</td>
86
+ <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>
87
+ <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>
88
+ </tr>
89
+ <tr>
90
+ <td>SSL</td>
91
+ <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>
92
+ <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>
93
+ </tr>
94
+ </table>
95
+ <br/><br/>
96
+
97
+ <div class="hdr-sub3">Scan Options</div>
98
+ <table class="s3-table-inputs">
99
+ <tr>
100
+ <td>Old URL</td>
101
+ <td>
102
+ <input type="text" name="url_old" id="url_old" value="<?php echo $GLOBALS['FW_URL_OLD'] ?>" readonly="readonly" class="readonly" />
103
+ <a href="javascript:DUPX.editOldURL()" id="edit_url_old" style="font-size:12px">edit</a>
104
+ </td>
105
+ </tr>
106
+ <tr>
107
+ <td>Old Path</td>
108
+ <td>
109
+ <input type="text" name="path_old" id="path_old" value="<?php echo $old_path ?>" readonly="readonly" class="readonly" />
110
+ <a href="javascript:DUPX.editOldPath()" id="edit_path_old" style="font-size:12px">edit</a>
111
+ </td>
112
+ </tr>
113
+ <tr>
114
+ <td>Site URL</td>
115
+ <td>
116
+ <input type="text" name="siteurl" id="siteurl" value="" />
117
+ <a href="javascript:DUPX.getNewURL('siteurl')" style="font-size:12px">get</a><br/>
118
+ </td>
119
+ </tr>
120
+ </table><br/>
121
+
122
+ <table>
123
+ <tr>
124
+ <td style="padding-right:10px">
125
+ <b>Scan Tables</b>
126
+ <div class="s3-allnonelinks">
127
+ <a href="javascript:void(0)" onclick="$('#tables option').prop('selected',true);">[All]</a>
128
+ <a href="javascript:void(0)" onclick="$('#tables option').prop('selected',false);">[None]</a>
129
+ </div><br style="clear:both" />
130
+ <select id="tables" name="tables[]" multiple="multiple" style="width:315px; height:100px">
131
+ <?php
132
+ foreach( $all_tables as $table ) {
133
+ echo '<option selected="selected" value="' . DUPX_U::escapeHTML( $table ) . '">' . $table . '</option>';
134
+ }
135
+ ?>
136
+ </select>
137
+
138
+ </td>
139
+ <td valign="top">
140
+ <b>Activate Plugins</b>
141
+ <div class="s3-allnonelinks">
142
+ <a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',true);">[All]</a>
143
+ <a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',false);">[None]</a>
144
+ </div><br style="clear:both" />
145
+ <select id="plugins" name="plugins[]" multiple="multiple" style="width:315px; height:100px">
146
+ <?php
147
+ foreach ($active_plugins as $plugin) {
148
+ echo '<option selected="selected" value="' . DUPX_U::escapeHTML( $plugin ) . '">' . dirname($plugin) . '</option>';
149
+ }
150
+ ?>
151
+ </select>
152
+ </td>
153
+ </tr>
154
+ </table><br/>
155
+
156
+ <input type="checkbox" name="postguid" id="postguid" value="1" /> <label for="postguid">Keep Post GUID unchanged</label><br/>
157
+ <input type="checkbox" name="fullsearch" id="fullsearch" value="1" /> <label for="fullsearch">Enable Full Search <small>(very slow)</small> </label><br/>
158
+ <br/><br/><br/><br/>
159
+
160
+ </div>
161
+
162
+ <div class="dupx-footer-buttons">
163
+ <input id="dup-step2-next" class="default-btn" type="button" value=" Next " onclick="DUPX.runUpdate()" />
164
+ </div>
165
+ </form>
166
+
167
+
168
+ <!-- =========================================
169
+ VIEW: STEP 3 - AJAX RESULT
170
+ ========================================= -->
171
+ <form id='s3-result-form' method="post" class="content-form" style="display:none">
172
+
173
+ <div class="dupx-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
174
+ <div class="hdr-main">
175
+ Step <span class="step">3</span> of 4: Data Replacement
176
+ </div>
177
+
178
+ <!-- POST PARAMS -->
179
+ <div class="dupx-debug">
180
+ <input type="hidden" name="action_step" value="4" />
181
+ <input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
182
+ <input type="hidden" name="url_new" id="ajax-url_new" />
183
+ <input type="hidden" name="json" id="ajax-json" />
184
+ <br/>
185
+ <input type='submit' value='manual submit'>
186
+ </div>
187
+
188
+ <!-- PROGRESS BAR -->
189
+ <div id="progress-area">
190
+ <div style="width:500px; margin:auto">
191
+ <h3>Processing Data Replacement Please Wait...</h3>
192
+ <div id="progress-bar"></div>
193
+ <i>This may take several minutes</i>
194
+ </div>
195
+ </div>
196
+
197
+ <!-- AJAX SYSTEM ERROR -->
198
+ <div id="ajaxerr-area" style="display:none">
199
+ <p>Please try again an issue has occurred.</p>
200
+ <div style="padding: 0px 10px 10px 10px;">
201
+ <div id="ajaxerr-data">An unknown issue has occurred with the data replacement setup process. Please see the installer-log.txt file for more details.</div>
202
+ <div style="text-align:center; margin:10px auto 0px auto">
203
+ <input type="button" class="default-btn" onclick='DUPX.hideErrorResult2()' value="&laquo; Try Again" /><br/><br/>
204
+ <i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket' target='_blank'>snapcreek.com</a></i>
205
+ </div>
206
+ </div>
207
+ </div>
208
+ </form>
209
+
210
+ <script>
211
+ /**
212
+ * Timeout (10000000 = 166 minutes) */
213
+ DUPX.runUpdate = function()
214
+ {
215
+ //Validation
216
+ var wp_username = $.trim($("#wp_username").val()).length || 0;
217
+ var wp_password = $.trim($("#wp_password").val()).length || 0;
218
+
219
+ if ( $.trim($("#url_new").val()) == "" ) {alert("The 'New URL' field is required!"); return false;}
220
+ if ( $.trim($("#siteurl").val()) == "" ) {alert("The 'Site URL' field is required!"); return false;}
221
+ if (wp_username >= 1 && wp_username < 4) {alert("The New Admin Account 'Username' must be four or more characters"); return false;}
222
+ if (wp_username >= 4 && wp_password < 6) {alert("The New Admin Account 'Password' must be six or more characters"); return false;}
223
+
224
+ $.ajax({
225
+ type: "POST",
226
+ timeout: 1800000,
227
+ dataType: "json",
228
+ url: window.location.href,
229
+ data: $('#s3-input-form').serialize(),
230
+ beforeSend: function() {
231
+ DUPX.showProgressBar();
232
+ $('#s3-input-form').hide();
233
+ $('#s3-result-form').show();
234
+ },
235
+ success: function(data){
236
+ if (typeof(data) != 'undefined' && data.step2.pass == 1) {
237
+ $("#ajax-url_new").val($("#url_new").val());
238
+ $("#ajax-json").val(escape(JSON.stringify(data)));
239
+ <?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
240
+ setTimeout(function(){$('#s3-result-form').submit();}, 500);
241
+ <?php endif; ?>
242
+ $('#progress-area').fadeOut(1000);
243
+ } else {
244
+ DUPX.hideProgressBar();
245
+ }
246
+ },
247
+ error: function(xhr) {
248
+ var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
249
+ status += "<b>Status:</b> " + xhr.statusText + "<br/>";
250
+ status += "<b>Response:</b> " + xhr.responseText + "";
251
+ status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
252
+ status += "- Check the <a href='installer-log.txt' target='_blank'>installer-log.txt</a> file for warnings or errors.<br/>";
253
+ status += "- Check the web server and PHP error logs. <br/>";
254
+ status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
255
+ $('#ajaxerr-data').html(status);
256
+ DUPX.hideProgressBar();
257
+ }
258
+ });
259
+ }
260
+
261
+ /** Returns the windows active url */
262
+ DUPX.getNewURL = function(id)
263
+ {
264
+ var filename= window.location.pathname.split('/').pop() || 'installer.php' ;
265
+ $("#" + id).val(window.location.href.replace(filename, ''));
266
+ }
267
+
268
+ /** Allows user to edit the package url */
269
+ DUPX.editOldURL = function()
270
+ {
271
+ var msg = 'This is the URL that was generated when the package was created.\n';
272
+ msg += 'Changing this value may cause issues with the install process.\n\n';
273
+ msg += 'Only modify this value if you know exactly what the value should be.\n';
274
+ msg += 'See "General Settings" in the WordPress Administrator for more details.\n\n';
275
+ msg += 'Are you sure you want to continue?';
276
+
277
+ if (confirm(msg)) {
278
+ $("#url_old").removeAttr('readonly');
279
+ $("#url_old").removeClass('readonly');
280
+ $('#edit_url_old').hide('slow');
281
+ }
282
+ }
283
+
284
+ /** Allows user to edit the package path */
285
+ DUPX.editOldPath = function()
286
+ {
287
+ var msg = 'This is the SERVER URL that was generated when the package was created.\n';
288
+ msg += 'Changing this value may cause issues with the install process.\n\n';
289
+ msg += 'Only modify this value if you know exactly what the value should be.\n';
290
+ msg += 'Are you sure you want to continue?';
291
+
292
+ if (confirm(msg)) {
293
+ $("#path_old").removeAttr('readonly');
294
+ $("#path_old").removeClass('readonly');
295
+ $('#edit_path_old').hide('slow');
296
+ }
297
+ }
298
+
299
+ /** Go back on AJAX result view */
300
+ DUPX.hideErrorResult2 = function()
301
+ {
302
+ $('#s3-result-form').hide();
303
+ $('#s3-input-form').show(200);
304
+ }
305
+
306
+ //DOCUMENT LOAD
307
+ $(document).ready(function()
308
+ {
309
+ DUPX.getNewURL('url_new');
310
+ DUPX.getNewURL('siteurl');
311
+ $("*[data-type='toggle']").click(DUPX.toggleClick);
312
+ $("#wp_password").passStrength({
313
+ shortPass: "top_shortPass",
314
+ badPass: "top_badPass",
315
+ goodPass: "top_goodPass",
316
+ strongPass: "top_strongPass",
317
+ baseStyle: "top_testresult",
318
+ userid: "#wp_username",
319
+ messageloc: 1 });
320
+ });
321
+ </script>
installer/build/view.step4.php ADDED
@@ -0,0 +1,235 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ <link href='https://fonts.googleapis.com/css?family=Oswald' rel='stylesheet' type='text/css'>
3
+ <script>
4
+ /** Posts to page to remove install files */
5
+ DUPX.removeInstallerFiles = function()
6
+ {
7
+ var msg = "You will now be redirected to the cleanup page.\nSelect 'Delete Reserved Files' to remove installer files.";
8
+ if (confirm(msg)) {
9
+ var nurl = '<?php echo rtrim($_POST['url_new'], "/"); ?>/wp-admin/admin.php?page=duplicator-tools&tab=cleanup';
10
+ window.open(nurl, "_blank");
11
+ }
12
+ };
13
+ </script>
14
+
15
+
16
+ <!-- =========================================
17
+ VIEW: STEP 4 - INPUT -->
18
+ <form id='s4-input-form' method="post" class="content-form" style="line-height:20px">
19
+ <input type="hidden" name="url_new" id="url_new" value="<?php echo rtrim($_POST['url_new'], "/"); ?>" />
20
+ <div class="dupx-logfile-link"><a href="installer-log.txt" target="_blank">installer-log.txt</a></div>
21
+
22
+ <div class="hdr-main">
23
+ Step <span class="step">4</span> of 4: Test Site
24
+ </div><br />
25
+
26
+ <div class="hdr-sub1">
27
+ <div class="s4-final-title">FINAL STEPS</div>
28
+ </div>
29
+
30
+ <table class="s4-final-step">
31
+ <tr>
32
+ <td style="width:170px"><a class="s4-final-btns" href='<?php echo rtrim($_POST['url_new'], "/"); ?>/wp-admin/options-permalink.php' target='_blank'> Save Permalinks</a></td>
33
+ <td><i>Updates URL rewrite rules in .htaccess (requires login)</i></td>
34
+ </tr>
35
+ <tr>
36
+ <td><a class="s4-final-btns" href='<?php echo $_POST['url_new']; ?>' target='_blank'>Test Site</a></td>
37
+ <td><i>Validate all pages, links images and plugins</i></td>
38
+ </tr>
39
+ <tr>
40
+ <td><a class="s4-final-btns" href="javascript:void(0)" onclick="DUPX.removeInstallerFiles('<?php echo $_POST['archive_name'] ?>')">Security Cleanup</a></td>
41
+ <td><i>Validate installer files are removed (requires login)</i></td>
42
+ </tr>
43
+ <tr>
44
+ <td><a class="s4-final-btns" href="javascript:void(0)" onclick="$('#dup-step3-install-report').toggle(400)">Show Report</a></td>
45
+ <td>
46
+ <i id="dup-step3-install-report-count">
47
+ <span data-bind="with: status.step1">Deploy Results: (<span data-bind="text: query_errs"></span>)</span> &nbsp;
48
+ <span data-bind="with: status.step2">Update Results: (<span data-bind="text: err_all"></span>)</span> &nbsp; &nbsp;
49
+ <span data-bind="with: status.step2" style="color:#888"><b>General Notices:</b> (<span data-bind="text: warn_all"></span>)</span>
50
+ </i>
51
+ </td>
52
+ </tr>
53
+ </table><br/>
54
+
55
+ <div class="s4-btns-msg">Click buttons above to complete process</div>
56
+
57
+ <div class="s4-go-back">
58
+ <i>To re-install <a href="javascript:history.go(-3)">start over at step 1</a>.</i><br/>
59
+ <i>The .htaccess file was reset. Resave plugins that write to this file.</i>
60
+ </div>
61
+
62
+
63
+ <!-- ========================
64
+ INSTALL REPORT -->
65
+ <div id="dup-step3-install-report" style='display:none'>
66
+ <table class='s4-report-results' style="width:100%">
67
+ <tr><th colspan="4">Database Results</th></tr>
68
+ <tr style="font-weight:bold">
69
+ <td style="width:150px"></td>
70
+ <td>Tables</td>
71
+ <td>Rows</td>
72
+ <td>Cells</td>
73
+ </tr>
74
+ <tr data-bind="with: status.step1">
75
+ <td>Created</td>
76
+ <td><span data-bind="text: table_count"></span></td>
77
+ <td><span data-bind="text: table_rows"></span></td>
78
+ <td>n/a</td>
79
+ </tr>
80
+ <tr data-bind="with: status.step2">
81
+ <td>Scanned</td>
82
+ <td><span data-bind="text: scan_tables"></span></td>
83
+ <td><span data-bind="text: scan_rows"></span></td>
84
+ <td><span data-bind="text: scan_cells"></span></td>
85
+ </tr>
86
+ <tr data-bind="with: status.step2">
87
+ <td>Updated</td>
88
+ <td><span data-bind="text: updt_tables"></span></td>
89
+ <td><span data-bind="text: updt_rows"></span></td>
90
+ <td><span data-bind="text: updt_cells"></span></td>
91
+ </tr>
92
+ </table>
93
+
94
+ <table class='s4-report-errs' style="width:100%; border-top:none">
95
+ <tr><th colspan="4">Report Details <br/> <i style="font-size:10px; font-weight:normal">(click links below to view details)</i></th></tr>
96
+ <tr>
97
+ <td data-bind="with: status.step1">
98
+ <a href="javascript:void(0);" onclick="$('#dup-step3-errs-create').toggle(400)">Step1: Deploy Results (<span data-bind="text: query_errs"></span>)</a><br/>
99
+ </td>
100
+ <td data-bind="with: status.step2">
101
+ <a href="javascript:void(0);" onclick="$('#dup-step3-errs-upd').toggle(400)">Step2: Update Results (<span data-bind="text: err_all"></span>)</a>
102
+ </td>
103
+ <td data-bind="with: status.step2">
104
+ <a href="#dup-step2-errs-warn-anchor" onclick="$('#dup-step3-warnlist').toggle(400)">General Notices (<span data-bind="text: warn_all"></span>)</a>
105
+ </td>
106
+ </tr>
107
+ <tr><td colspan="4"></td></tr>
108
+ </table>
109
+
110
+
111
+ <div id="dup-step3-errs-create" class="s4-err-msg">
112
+ <div class="s4-err-title">STEP 1 DEPLOY RESULTS</div>
113
+ <b data-bind="with: status.step1">DEPLOY ERRORS (<span data-bind="text: query_errs"></span>)</b><br/>
114
+ <div class="info-error">
115
+ Queries that error during the deploy step are logged to the <a href="installer-log.txt" target="_blank">install-log.txt</a> file and marked '**ERROR**'.
116
+ <br/><br/>
117
+
118
+ <b><u>Common Fixes:</u></b>
119
+ <br/>
120
+
121
+ <b>Query size limits:</b> Update your MySQL server with the <a href="https://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html" target="_blank">max_allowed_packet</a>
122
+ setting to handle larger payloads. <br/>
123
+
124
+ <b>Unknown collation:</b> The MySQL Version is too old see:
125
+ <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-110-q" target="_blank">What is Compatibility mode & 'Unknown collation' errors?</a>
126
+ <br/>
127
+ </div>
128
+ </div>
129
+
130
+
131
+ <div id="dup-step3-errs-upd" class="s4-err-msg">
132
+ <div class="s4-err-title">STEP 2 UPDATE RESULTS</div>
133
+ <!-- MYSQL QUERY ERRORS -->
134
+ <b data-bind="with: status.step2">UPDATE ERRORS (<span data-bind="text: errsql_sum"></span>) </b><br/>
135
+ <div class="info-error">
136
+ Update errors that show here are queries that could not be performed because the database server being used has issues running it. Please validate the query, if
137
+ it looks to be of concern please try to run the query manually. In many cases if your site performs well without any issues you can ignore the error.
138
+ </div>
139
+ <div class="content">
140
+ <div data-bind="foreach: status.step2.errsql"><div data-bind="text: $data"></div></div>
141
+ <div data-bind="visible: status.step2.errsql.length == 0">No MySQL query errors found</div>
142
+ </div>
143
+
144
+ <!-- TABLE KEY ERRORS -->
145
+ <b data-bind="with: status.step2">TABLE KEY NOTICES (<span data-bind="text: errkey_sum"></span>)</b><br/>
146
+ <div class="info-notice">
147
+ Notices should be ignored unless issues are found after you have tested an installed site. This notice indicates that a primary key is required to run the
148
+ update engine. Below is a list of tables and the rows that were not updated. On some databases you can remove these notices by checking the box 'Enable Full Search'
149
+ under advanced options in step2 of the installer.
150
+ <br/><br/>
151
+ <small>
152
+ <b>Advanced Searching:</b><br/>
153
+ Use the following query to locate the table that was not updated: <br/>
154
+ <i>SELECT @row := @row + 1 as row, t.* FROM some_table t, (SELECT @row := 0) r</i>
155
+ </small>
156
+ </div>
157
+ <div class="content">
158
+ <div data-bind="foreach: status.step2.errkey"><div data-bind="text: $data"></div></div>
159
+ <div data-bind="visible: status.step2.errkey.length == 0">No missing primary key errors</div>
160
+ </div>
161
+
162
+ <!-- SERIALIZE ERRORS -->
163
+ <b data-bind="with: status.step2">SERIALIZATION NOTICES (<span data-bind="text: errser_sum"></span>)</b><br/>
164
+ <div class="info-notice">
165
+ Notices should be ignored unless issues are found after you have tested an installed site. The SQL below will show data that may have not been
166
+ updated during the serialization process. Best practices for serialization notices is to just re-save the plugin/post/page in question.
167
+ </div>
168
+ <div class="content">
169
+ <div data-bind="foreach: status.step2.errser"><div data-bind="text: $data"></div></div>
170
+ <div data-bind="visible: status.step2.errser.length == 0">No serialization errors found</div>
171
+ </div>
172
+
173
+ </div>
174
+
175
+
176
+ <!-- WARNINGS-->
177
+ <div id="dup-step3-warnlist" class="s4-err-msg">
178
+ <a href="#" id="dup-step2-errs-warn-anchor"></a>
179
+ <b>GENERAL NOTICES</b><br/>
180
+ <div class="info">
181
+ The following is a list of notices that may need to be fixed in order to finalize your setup. These values should only be investigated if your running into
182
+ issues with your site. For more details see the <a href="https://codex.wordpress.org/Editing_wp-config.php" target="_blank">WordPress Codex</a>.
183
+ </div>
184
+ <div class="content">
185
+ <div data-bind="foreach: status.step2.warnlist">
186
+ <div data-bind="text: $data"></div>
187
+ </div>
188
+ <div data-bind="visible: status.step2.warnlist.length == 0">
189
+ No notices found
190
+ </div>
191
+ </div>
192
+ </div><br/>
193
+
194
+ </div><br/>
195
+
196
+ <?php
197
+ $num = rand(1,2);
198
+ switch ($num) {
199
+ case 1:
200
+ $key = 'free_inst_s3btn1';
201
+ $txt = 'Want More Power?';
202
+ break;
203
+ case 2:
204
+ $key = 'free_inst_s3btn2';
205
+ $txt = 'Go Pro Today!';
206
+ break;
207
+ default :
208
+ $key = 'free_inst_s3btn2';
209
+ $txt = 'Go Pro Today!';
210
+ }
211
+ ?>
212
+
213
+ <div class="s4-gopro-btn">
214
+ <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=duplicator_pro&utm_content=<?php echo $key;?>" target="_blank"> <?php echo $txt;?></a>
215
+ </div>
216
+ <br/><br/>
217
+
218
+ <div class='s4-connect'>
219
+ <a href="installer.php?help=1#troubleshoot" target="_blank">Troubleshoot</a> |
220
+ <a href='https://snapcreek.com/duplicator/docs/faqs-tech/' target='_blank'>FAQs</a> |
221
+ <a href='https://snapcreek.com/ticket' target='_blank'>Support</a>
222
+ </div><br/>
223
+ </form>
224
+
225
+ <script>
226
+ MyViewModel = function() {
227
+ this.status = <?php echo urldecode($_POST['json']); ?>;
228
+ var errorCount = this.status.step1.query_errs || 0;
229
+ (errorCount >= 1 )
230
+ ? $('#dup-step3-install-report-count').css('color', '#BE2323')
231
+ : $('#dup-step3-install-report-count').css('color', '#197713')
232
+ };
233
+ ko.applyBindings(new MyViewModel());
234
+ </script>
235
+
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 site
5
  Requires at least: 4.0
6
  Tested up to: 4.7
7
- Stable tag: 1.1.34
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 site
5
  Requires at least: 4.0
6
  Tested up to: 4.7
7
+ Stable tag: 1.2.0
8
  License: GPLv2
9
 
10
  Duplicate, clone, backup, move and transfer an entire site from one location to another.
views/help/about.php CHANGED
@@ -40,9 +40,9 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
40
  div#mce-responses {margin: auto; padding: 10px; width:500px}
41
  </style>
42
 
43
- <script type="text/javascript">var switchTo5x = true;</script>
44
  <script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
45
- <script type="text/javascript">stLight.options({publisher: "1a44d92e-2a78-42c3-a32e-414f78f9f484"});</script>
46
 
47
  <div class="wrap dup-wrap dup-support-all">
48
 
40
  div#mce-responses {margin: auto; padding: 10px; width:500px}
41
  </style>
42
 
43
+ <script>var switchTo5x = true;</script>
44
  <script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
45
+ <script>stLight.options({publisher: "1a44d92e-2a78-42c3-a32e-414f78f9f484"});</script>
46
 
47
  <div class="wrap dup-wrap dup-support-all">
48
 
views/help/help.php CHANGED
@@ -114,7 +114,7 @@ require_once(DUPLICATOR_PLUGIN_PATH . '/views/inc.header.php');
114
  </div>
115
  </div><br/><br/><br/><br/>
116
 
117
- <script type="text/javascript">
118
  jQuery(document).ready(function($) {
119
 
120
  Duplicator.OpenSupportWindow = function() {
114
  </div>
115
  </div><br/><br/><br/><br/>
116
 
117
+ <script>
118
  jQuery(document).ready(function($) {
119
 
120
  Duplicator.OpenSupportWindow = function() {
views/packages/details/controller.php CHANGED
@@ -4,7 +4,7 @@ global $wpdb;
4
 
5
  //COMMON HEADER DISPLAY
6
  $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'detail';
7
- $package_id = isset($_REQUEST["id"]) ? $_REQUEST["id"] : 0;
8
 
9
  $package = DUP_Package::getByID($package_id);
10
  $err_found = ($package == null || $package->Status < 100);
4
 
5
  //COMMON HEADER DISPLAY
6
  $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'detail';
7
+ $package_id = isset($_REQUEST["id"]) ? esc_html($_REQUEST["id"]) : 0;
8
 
9
  $package = DUP_Package::getByID($package_id);
10
  $err_found = ($package == null || $package->Status < 100);
views/packages/details/detail.php CHANGED
@@ -15,7 +15,7 @@ $debug_on = DUP_Settings::Get('package_debug');
15
  $mysqldump_on = DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath();
16
  $mysqlcompat_on = isset($Package->Database->Compatible) && strlen($Package->Database->Compatible);
17
  $mysqlcompat_on = ($mysqldump_on && $mysqlcompat_on) ? true : false;
18
- $dbbuild_mode = ($mysqldump_on) ? 'mysqldump (fast)' : 'PHP (slow)';
19
  ?>
20
 
21
  <style>
@@ -340,7 +340,7 @@ INSTALLER -->
340
  <?php endif; ?>
341
 
342
 
343
- <script type="text/javascript">
344
  jQuery(document).ready(function ($)
345
  {
346
 
15
  $mysqldump_on = DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpPath();
16
  $mysqlcompat_on = isset($Package->Database->Compatible) && strlen($Package->Database->Compatible);
17
  $mysqlcompat_on = ($mysqldump_on && $mysqlcompat_on) ? true : false;
18
+ $dbbuild_mode = ($mysqldump_on) ? 'mysqldump' : 'PHP';
19
  ?>
20
 
21
  <style>
340
  <?php endif; ?>
341
 
342
 
343
+ <script>
344
  jQuery(document).ready(function ($)
345
  {
346
 
views/packages/main/new1.inc.form.php CHANGED
@@ -35,8 +35,8 @@
35
  div.dup-installer-header-1 {font-weight:bold; padding-bottom:2px; width:100%}
36
  div.dup-installer-header-2 {font-weight:bold; border-bottom:1px solid #dfdfdf; padding-bottom:2px; width:100%}
37
  label.chk-labels {display:inline-block; margin-top:1px}
38
- table.dup-installer-tbl {width:95%; margin-left:20px}
39
- div.dup-installer-panel-optional {text-align: center; font-style: italic; font-size: 12px; color:#777}
40
 
41
  /*TABS*/
42
  ul.add-menu-item-tabs li, ul.category-tabs li {padding:3px 30px 5px}
@@ -293,32 +293,35 @@ INSTALLER -->
293
  <div class="dup-box-panel" id="dup-pack-installer-panel" style="<?php echo $ui_css_installer ?>">
294
 
295
  <div class="dup-installer-panel-optional">
296
- <b><?php _e('All values in this section are', 'duplicator'); ?> <u><?php _e('optional', 'duplicator'); ?></u>.</b>
297
- <?php _e("The installer can have these fields pre-filled at install time.", 'duplicator'); ?>
 
 
 
 
298
  </div>
299
-
300
- <div class="dup-installer-header-1"><i class="fa fa-caret-square-o-right"></i> <?php echo _e('STEP 1 - INPUTS', 'duplicator'); ?></div><br/>
301
  <table class="dup-installer-tbl">
302
  <tr>
303
- <td colspan="2"><div class="dup-installer-header-2"><?php _e("MySQL Server", 'duplicator') ?></div></td>
304
  </tr>
305
  <tr>
306
  <td style="width:130px"><?php _e("Host", 'duplicator') ?></td>
307
- <td><input type="text" name="dbhost" id="dbhost" value="<?php echo $Package->Installer->OptsDBHost ?>" maxlength="200" placeholder="localhost"/></td>
308
  </tr>
309
  <tr>
310
  <td><?php _e("Host Port", 'duplicator') ?></td>
311
- <td><input type="text" name="dbport" id="dbport" value="<?php echo $Package->Installer->OptsDBPort ?>" maxlength="200" placeholder="3306"/></td>
312
  </tr>
313
  <tr>
314
  <td><?php _e("Database", 'duplicator') ?></td>
315
- <td><input type="text" name="dbname" id="dbname" value="<?php echo $Package->Installer->OptsDBName ?>" maxlength="100" placeholder="mydatabaseName" /></td>
316
  </tr>
317
  <tr>
318
  <td><?php _e("User", 'duplicator') ?></td>
319
- <td><input type="text" name="dbuser" id="dbuser" value="<?php echo $Package->Installer->OptsDBUser ?>" maxlength="100" placeholder="databaseUserName" /></td>
320
  </tr>
321
- <tr>
322
  <td colspan="2"><div class="dup-installer-header-2"><?php _e("Advanced Options", 'duplicator') ?></div></td>
323
  </tr>
324
  <tr>
@@ -348,23 +351,27 @@ INSTALLER -->
348
  </tr>
349
  </table>
350
  </td>
351
- </tr>
352
  </table><br />
353
 
354
- <div class="dup-installer-header-1"><i class="fa fa-caret-square-o-right"></i> <?php echo _e('STEP 2 - INPUTS', 'duplicator'); ?></div>
355
- <table class="dup-installer-tbl">
 
 
 
 
356
  <tr>
357
  <td style="width:130px"><?php _e("New URL", 'duplicator') ?></td>
358
  <td><input type="text" name="url-new" id="url-new" value="<?php echo $Package->Installer->OptsURLNew ?>" placeholder="http://mynewsite.com" /></td>
359
  </tr>
360
- </table>
361
 
362
  <div style="padding:10px 0 0 12px;">
363
  <span class="dup-pro-text">
364
  <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/cpanel-48.png" style="width:16px; height:12px" />
365
- <?php _e("Create the database and user directly from the installer with ", 'duplicator'); ?>
366
  <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_cpanel&utm_campaign=duplicator_pro" target="_blank"><?php _e('Professional', 'duplicator');?></a>
367
- <i class="fa fa-lightbulb-o"
368
  data-tooltip-title="<?php _e("cPanel Access:", 'duplicator'); ?>"
369
  data-tooltip="<?php _e('If your server supports cPanel API access then you can create new databases and select existing ones with Duplicator Professional at install time.', 'duplicator'); ?>">
370
  </i>
35
  div.dup-installer-header-1 {font-weight:bold; padding-bottom:2px; width:100%}
36
  div.dup-installer-header-2 {font-weight:bold; border-bottom:1px solid #dfdfdf; padding-bottom:2px; width:100%}
37
  label.chk-labels {display:inline-block; margin-top:1px}
38
+ table.dup-installer-tbl {width:97%; margin-left:20px}
39
+ div.dup-installer-panel-optional {text-align: center; font-style: italic; font-size: 12px; color:maroon}
40
 
41
  /*TABS*/
42
  ul.add-menu-item-tabs li, ul.category-tabs li {padding:3px 30px 5px}
293
  <div class="dup-box-panel" id="dup-pack-installer-panel" style="<?php echo $ui_css_installer ?>">
294
 
295
  <div class="dup-installer-panel-optional">
296
+ <b><?php _e('All values in this section are', 'duplicator'); ?> <u><?php _e('optional', 'duplicator'); ?></u>.</b> <br/>
297
+ <?php _e("The installer can have these fields pre-filled at install time.", 'duplicator'); ?>
298
+ <i class="fa fa-question-circle"
299
+ data-tooltip-title="<?php _e("MySQL Server Prefills", 'duplicator'); ?>"
300
+ data-tooltip="<?php _e('The values in this section are NOT required! If you know ahead of time the database input fields the installer will use, then you can optionally enter them here. Otherwise you can just enter them in at install time.', 'duplicator'); ?>">
301
+ </i>
302
  </div>
303
+
 
304
  <table class="dup-installer-tbl">
305
  <tr>
306
+ <td colspan="2"><div class="dup-installer-header-2"><?php _e(" MySQL Server", 'duplicator') ?></div></td>
307
  </tr>
308
  <tr>
309
  <td style="width:130px"><?php _e("Host", 'duplicator') ?></td>
310
+ <td><input type="text" name="dbhost" id="dbhost" value="<?php echo $Package->Installer->OptsDBHost ?>" maxlength="200" placeholder="<?php _e('example: localhost (value is optional)', 'duplicator'); ?>"/></td>
311
  </tr>
312
  <tr>
313
  <td><?php _e("Host Port", 'duplicator') ?></td>
314
+ <td><input type="text" name="dbport" id="dbport" value="<?php echo $Package->Installer->OptsDBPort ?>" maxlength="200" placeholder="<?php _e('example: 3306 (value is optional)', 'duplicator'); ?>"/></td>
315
  </tr>
316
  <tr>
317
  <td><?php _e("Database", 'duplicator') ?></td>
318
+ <td><input type="text" name="dbname" id="dbname" value="<?php echo $Package->Installer->OptsDBName ?>" maxlength="100" placeholder="<?php _e('example: DatabaseName (value is optional)', 'duplicator'); ?>" /></td>
319
  </tr>
320
  <tr>
321
  <td><?php _e("User", 'duplicator') ?></td>
322
+ <td><input type="text" name="dbuser" id="dbuser" value="<?php echo $Package->Installer->OptsDBUser ?>" maxlength="100" placeholder="<?php _e('example: DatabaseUserName (value is optional)', 'duplicator'); ?>" /></td>
323
  </tr>
324
+ <!--tr>
325
  <td colspan="2"><div class="dup-installer-header-2"><?php _e("Advanced Options", 'duplicator') ?></div></td>
326
  </tr>
327
  <tr>
351
  </tr>
352
  </table>
353
  </td>
354
+ </tr-->
355
  </table><br />
356
 
357
+
358
+
359
+ <input type="hidden" name="url-new" id="url-new" value=""/>
360
+
361
+
362
+ <!--table class="dup-installer-tbl">
363
  <tr>
364
  <td style="width:130px"><?php _e("New URL", 'duplicator') ?></td>
365
  <td><input type="text" name="url-new" id="url-new" value="<?php echo $Package->Installer->OptsURLNew ?>" placeholder="http://mynewsite.com" /></td>
366
  </tr>
367
+ </table-->
368
 
369
  <div style="padding:10px 0 0 12px;">
370
  <span class="dup-pro-text">
371
  <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/cpanel-48.png" style="width:16px; height:12px" />
372
+ <?php _e("Create the database and users directly at install time with ", 'duplicator'); ?>
373
  <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_cpanel&utm_campaign=duplicator_pro" target="_blank"><?php _e('Professional', 'duplicator');?></a>
374
+ <i class="fa fa-lightbulb-o"
375
  data-tooltip-title="<?php _e("cPanel Access:", 'duplicator'); ?>"
376
  data-tooltip="<?php _e('If your server supports cPanel API access then you can create new databases and select existing ones with Duplicator Professional at install time.', 'duplicator'); ?>">
377
  </i>
views/packages/main/new1.setup.php CHANGED
@@ -196,8 +196,9 @@ SYSTEM REQUIREMENTS -->
196
  $duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
197
  ?>
198
  <form method="post" action="admin.php?page=duplicator-tools&tab=cleanup&action=installer&_wpnonce=<?php echo $duplicator_nonce; ?>">
199
- <?php _e("A reserved file(s) was found in the WordPress root directory. Reserved file names are [{$dup_intaller_files}]. To archive your data correctly please remove any of these files from your WordPress root directory. Then try creating your package again.", 'duplicator'); ?>
200
- <br/><input type='submit' class='button action' value='<?php _e('Remove Files Now', 'duplicator') ?>' style='font-size:10px; margin-top:5px;' />
 
201
  </form>
202
  <?php endif; ?>
203
  </div>
@@ -220,7 +221,7 @@ FORM PACKAGE OPTIONS -->
220
  <?php include('new1.inc.form.php'); ?>
221
  </div>
222
 
223
- <script type="text/javascript">
224
  jQuery(document).ready(function ($)
225
  {
226
  //Init: Toogle for system requirment detial links
196
  $duplicator_nonce = wp_create_nonce('duplicator_cleanup_page');
197
  ?>
198
  <form method="post" action="admin.php?page=duplicator-tools&tab=cleanup&action=installer&_wpnonce=<?php echo $duplicator_nonce; ?>">
199
+ <b><?php _e('WordPress Root Path:', 'duplicator'); ?></b> <?php echo DUPLICATOR_WPROOTPATH; ?><br/>
200
+ <?php _e("A reserved file(s) was found in the WordPress root directory. Reserved file names include [{$dup_intaller_files}]. To archive your data correctly please remove any of these files from your WordPress root directory. Then try creating your package again.", 'duplicator'); ?>
201
+ <br/><input type='submit' class='button button-small' value='<?php _e('Remove Files Now', 'duplicator') ?>' style='font-size:10px; margin-top:5px;' />
202
  </form>
203
  <?php endif; ?>
204
  </div>
221
  <?php include('new1.inc.form.php'); ?>
222
  </div>
223
 
224
+ <script>
225
  jQuery(document).ready(function ($)
226
  {
227
  //Init: Toogle for system requirment detial links
views/packages/main/new2.scan.php CHANGED
@@ -103,9 +103,11 @@ TOOL BAR: STEPS -->
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 -->
@@ -543,7 +545,7 @@ TOOL BAR: STEPS -->
543
  </div>
544
  </form>
545
 
546
- <script type="text/javascript">
547
  jQuery(document).ready(function($) {
548
 
549
  /* Performs Ajax post to create check system */
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-circle-o-notch fa-spin"></i> <?php _e('Scanning Site', 'duplicator'); ?></div>
107
  <div id="dup-progress-bar"></div>
108
+ <b><?php _e('Please Wait...', 'duplicator'); ?></b><br/><br/>
109
+ <i><?php _e('Keep this window open during the scan process.', 'duplicator'); ?></i><br/>
110
+ <i><?php _e('This can take several minutes.', 'duplicator'); ?></i><br/>
111
  </div>
112
 
113
  <!-- SUCCESS MESSAGE -->
545
  </div>
546
  </form>
547
 
548
+ <script>
549
  jQuery(document).ready(function($) {
550
 
551
  /* Performs Ajax post to create check system */
views/packages/main/new3.build.php CHANGED
@@ -147,7 +147,7 @@ TOOL BAR: STEPS -->
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
147
  </div>
148
  </form>
149
 
150
+ <script>
151
  jQuery(document).ready(function($) {
152
  /* ----------------------------------------
153
  * METHOD: Performs Ajax post to create a new package
views/packages/main/packages.php CHANGED
@@ -214,7 +214,7 @@ THICK-BOX DIALOGS: -->
214
  $confirm1->initConfirm();
215
  ?>
216
 
217
- <script type="text/javascript">
218
  jQuery(document).ready(function($)
219
  {
220
 
214
  $confirm1->initConfirm();
215
  ?>
216
 
217
+ <script>
218
  jQuery(document).ready(function($)
219
  {
220
 
views/settings/general.php CHANGED
@@ -294,7 +294,7 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
294
 
295
  </form>
296
 
297
- <script type="text/javascript">
298
  jQuery(document).ready(function($)
299
  {
300
  $('#package_ui_created').val(<?php echo $package_ui_created ?> );
294
 
295
  </form>
296
 
297
+ <script>
298
  jQuery(document).ready(function($)
299
  {
300
  $('#package_ui_created').val(<?php echo $package_ui_created ?> );
views/tools/diagnostics/inc.settings.php CHANGED
@@ -141,6 +141,10 @@ SERVER SETTINGS -->
141
  <td><?php _e("Shell Exec Zip", 'duplicator'); ?></td>
142
  <td><?php echo (DUP_Util::getZipPath() != null) ? _e("Is Supported", 'duplicator') : _e("Not Supported", 'duplicator'); ?></td>
143
  </tr>
 
 
 
 
144
  <tr>
145
  <td class='dup-settings-diag-header' colspan="2">MySQL</td>
146
  </tr>
141
  <td><?php _e("Shell Exec Zip", 'duplicator'); ?></td>
142
  <td><?php echo (DUP_Util::getZipPath() != null) ? _e("Is Supported", 'duplicator') : _e("Not Supported", 'duplicator'); ?></td>
143
  </tr>
144
+ <tr>
145
+ <td><a href="https://suhosin.org/stories/index.html" target="_blank"><?php _e("Suhosin Extension", 'duplicator'); ?></a></td>
146
+ <td><?php echo extension_loaded('suhosin') ? _e("Enabled", 'duplicator') : _e("Disabled", 'duplicator'); ?></td>
147
+ </tr>
148
  <tr>
149
  <td class='dup-settings-diag-header' colspan="2">MySQL</td>
150
  </tr>
views/tools/logging.php CHANGED
@@ -50,7 +50,7 @@ $logfound = (strlen($logname) > 0) ? true :false;
50
  label#dup-auto-refresh-lbl {display: inline-block;}
51
  </style>
52
 
53
- <script type="text/javascript">
54
  jQuery(document).ready(function($)
55
  {
56
  Duplicator.Tools.FullLog = function() {
50
  label#dup-auto-refresh-lbl {display: inline-block;}
51
  </style>
52
 
53
+ <script>
54
  jQuery(document).ready(function($)
55
  {
56
  Duplicator.Tools.FullLog = function() {