Duplicator – WordPress Migration Plugin - Version 1.2.42

Version Description

Download this release

Release Info

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

Code changes from version 1.2.40 to 1.2.42

assets/css/parsley.css ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ div.parsley-success,
2
+ input.parsley-success,
3
+ select.parsley-success,
4
+ textarea.parsley-success {
5
+ color: #468847;
6
+ background-color: #DFF0D8;
7
+ border: 1px solid #D6E9C6;
8
+ }
9
+
10
+ div.parsley-error,
11
+ input.parsley-error,
12
+ select.parsley-error,
13
+ textarea.parsley-error {
14
+ color: #B94A48;
15
+ background-color: #F2DEDE;
16
+ border: 1px solid #EED3D7;
17
+ }
18
+
19
+ .parsley-errors-list {
20
+ margin: 2px 0 3px;
21
+ padding: 0;
22
+ list-style-type: none;
23
+ font-size: 0.9em;
24
+ line-height: 0.9em;
25
+ opacity: 0;
26
+ -moz-opacity: 0;
27
+ -webkit-opacity: 0;
28
+
29
+ transition: all .3s ease-in;
30
+ -o-transition: all .3s ease-in;
31
+ -moz-transition: all .3s ease-in;
32
+ -webkit-transition: all .3s ease-in;
33
+ }
34
+
35
+ .parsley-errors-list.filled {
36
+ opacity: 1;
37
+ }
assets/css/style.css CHANGED
@@ -1,78 +1,79 @@
1
- /* ================================================
2
- * DUPLICATOR STYLE
3
- * Common elements shared across the duplicator plugin
4
- * ================================================ */
5
-
6
- /*Global Elements*/
7
- input[type=button]{cursor:pointer;padding:5px;cursor:pointer;}
8
- input[type=submit]{cursor:pointer;padding:5px;cursor:pointer;}
9
- fieldset {border:1px solid gray; padding:0px 5px 5px 5px; }
10
- label {font-size:13px}
11
- .no-select {user-select:none; -o-user-select:none; -moz-user-select:none; -khtml-user-select:none; -webkit-user-select:none;}
12
- hr {border:0; border-top:1px solid #ddd; border-bottom:1px solid #fafafa; margin:10px 0px 2px 0px;}
13
- i[data-tooltip].fa-question-circle {cursor:pointer; color:#C3C3C3}
14
- i[data-tooltip].fa-lightbulb-o {cursor:pointer; color:gray}
15
- span.btn-separator {content: ''; display: inline-block; background: silver; margin: 2px 3px; height: 25px; width: 1px; vertical-align: top;}
16
- a.grey-icon i.fa {color:#777}
17
- i.grey-icon {color:#777}
18
-
19
-
20
- /*TABS*/
21
- ul.category-tabs li {cursor: pointer}
22
-
23
- /*BOXES: Expandable sections */
24
- div.dup-box {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
25
- div.dup-box-title {font-size: 16px; padding: 10px 0 0 10px; font-weight: bold; cursor: pointer; height:27px; margin:0px; color:#000 }
26
- div.dup-box-title:hover {background-color: #FCFCFC;}
27
- div.dup-box-arrow {text-decoration:none!important; float:right; width:27px; height:30px; font-size:16px; cursor:pointer; padding:1px 0 0 0; white-space: nowrap}
28
- div.dup-box-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
29
- div.dup-redirect {font-size:16px; font-weight: bold; padding: 10px}
30
-
31
- /*PANELS: Boxes that do not exapand */
32
- div.dup-panel {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
33
- div.dup-panel-title {font-size: 14px; padding: 10px 0 0 15px; font-weight: 600; height:28px; margin:0px; color:#000; }
34
- div.dup-panel-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
35
-
36
- /*INFO-BOX:Simple box with no title */
37
- div.dup-info-box {padding:8px; border:1px solid #ccc; border-radius:4px; background-color:#F7FCFE; margin:0px 0px 5px 20px; line-height:16px}
38
- div.dup-info-box small {margin-top:10px; display:block}
39
-
40
- /*PACKAGE:Progress Boxes */
41
- div#dup-progress-bar-area {width:500px; margin:40px auto 0px auto; padding:25px 50px 35px 50px; border:1px solid #ccc; box-shadow:0 8px 6px -6px #999; text-align:center; border-radius:4px; color:#000;}
42
- div#dup-progress-bar-area h2 {margin-bottom:15px}
43
-
44
- /*HEADER MESSAGES*/
45
- div.dup-hdr-success {color:green; font-size:22px; font-weight:bold}
46
- div.dup-hdr-error {color:#A62426; font-size:22px; font-weight:bold}
47
-
48
- /*DIALOGS: THICKBOX */
49
- #TB_title { padding-bottom: 3px!important; margin-bottom:5px!important; font-size:16px!important;}
50
- div.dup-dlg-alert-txt {padding:10px 0; font-size:16px}
51
- div.dup-dlg-alert-btns {position:absolute; bottom:20px; right:20px;}
52
- div.dup-dlg-confirm-txt {padding:10px 0; font-size:16px}
53
- div.dup-dlg-confirm-btns {position:absolute; bottom:20px; right:20px;}
54
- div.dup-dlg-confirm-progress {display:none}
55
-
56
- /*ADMIN: NOTICES */
57
- div#dup-global-error-reserved-files p {font-size:14px}
58
- div#dup-global-error-reserved-files b.pass-msg {color:green; font-size:20px}
59
- div#dup-global-error-reserved-files p.pass-lnks {line-height:24px; margin:-7px 0 0 5px}
60
- div#dup-global-error-reserved-files div.pass-msg {padding:5px 0 0 10px; font-size:11px; color:#999; font-style: italic}
61
- div.dup-wpnotice-box {display:none;}
62
-
63
- /*================================================
64
- PARSLEY:Overrides*/
65
- input.parsley-error, textarea.parsley-error {
66
- color:#B94A48 !important;
67
- background-color:#F2DEDE !important;
68
- border:1px solid #EED3D7 !important;
69
- }
70
- div.qtip-content {line-height:16px}
71
- ul.parsley-error-list {margin:1px 0px -7px 0px}
72
- div.notice-safemode {color: maroon;}
73
- div.cleanup-notice b.title {color: green;font-size: 20px;}
74
-
75
- /*SCREEN TABS*/
76
- div.dup-screen-hlp-info {line-height:26px; padding:10px 0 10px 0}
77
- #screen-meta-links .button { font-size:13px !important; height:auto !important;font-weight: normal; padding: 3px 6px 3px 16px !important;min-width:72px !important}
78
-
 
1
+ /* ================================================
2
+ * DUPLICATOR STYLE
3
+ * Common elements shared across the duplicator plugin
4
+ * ================================================ */
5
+
6
+ /*Global Elements*/
7
+ input[type=button]{cursor:pointer;padding:5px;cursor:pointer;}
8
+ input[type=submit]{cursor:pointer;padding:5px;cursor:pointer;}
9
+ fieldset {border:1px solid gray; padding:0px 5px 5px 5px; }
10
+ label {font-size:13px}
11
+ .no-select {user-select:none; -o-user-select:none; -moz-user-select:none; -khtml-user-select:none; -webkit-user-select:none;}
12
+ hr {border:0; border-top:1px solid #ddd; border-bottom:1px solid #fafafa; margin:10px 0px 2px 0px;}
13
+ i[data-tooltip].fa-question-circle {cursor:pointer; color:#C3C3C3}
14
+ i[data-tooltip].fa-lightbulb-o {cursor:pointer; color:gray}
15
+ span.btn-separator {content: ''; display: inline-block; background: silver; margin: 2px 3px; height: 25px; width: 1px; vertical-align: top;}
16
+ a.grey-icon i.fa {color:#777}
17
+ i.grey-icon {color:#777}
18
+
19
+
20
+ /*TABS*/
21
+ ul.category-tabs li {cursor: pointer}
22
+
23
+ /*BOXES: Expandable sections */
24
+ div.dup-box {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
25
+ div.dup-box-title {font-size: 16px; padding: 10px 0 0 10px; font-weight: bold; cursor: pointer; height:27px; margin:0px; color:#000 }
26
+ div.dup-box-title:hover {background-color: #FCFCFC;}
27
+ div.dup-box-arrow {text-decoration:none!important; float:right; width:27px; height:30px; font-size:16px; cursor:pointer; padding:1px 0 0 0; white-space: nowrap}
28
+ div.dup-box-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
29
+ div.dup-redirect {font-size:16px; font-weight: bold; padding: 10px}
30
+
31
+ /*PANELS: Boxes that do not exapand */
32
+ div.dup-panel {padding:0px; display: block; background-color: #fff; border: 1px solid #e5e5e5; box-shadow: 0 1px 1px rgba(0,0,0,.04);}
33
+ div.dup-panel-title {font-size: 14px; padding: 10px 0 0 15px; font-weight: 600; height:28px; margin:0px; color:#000; }
34
+ div.dup-panel-panel {padding:10px 15px 10px 15px; border-top:1px solid #EEEEEE; margin:-1px 0 0 0;}
35
+
36
+ /*INFO-BOX:Simple box with no title */
37
+ div.dup-info-box {padding:8px; border:1px solid #ccc; border-radius:4px; background-color:#F7FCFE; margin:0px 0px 5px 20px; line-height:16px}
38
+ div.dup-info-box small {margin-top:10px; display:block}
39
+
40
+ /*PACKAGE:Progress Boxes */
41
+ div#dup-progress-bar-area {width:500px; margin:40px auto 0px auto; padding:25px 50px 35px 50px; border:1px solid #ccc; box-shadow:0 8px 6px -6px #999; text-align:center; border-radius:4px; color:#000;}
42
+ div#dup-progress-bar-area h2 {margin-bottom:15px}
43
+
44
+ /*HEADER MESSAGES*/
45
+ div.dup-hdr-success {color:green; font-size:22px; font-weight:bold}
46
+ div.dup-hdr-error {color:#A62426; font-size:22px; font-weight:bold}
47
+
48
+ /*DIALOGS: THICKBOX */
49
+ #TB_title { padding-bottom: 3px!important; margin-bottom:5px!important; font-size:16px!important;}
50
+ div.dup-dlg-alert-txt {padding:10px 0; font-size:16px}
51
+ div.dup-dlg-alert-btns {position:absolute; bottom:20px; right:20px;}
52
+ div.dup-dlg-confirm-txt {padding:10px 0; font-size:16px}
53
+ div.dup-dlg-confirm-btns {position:absolute; bottom:20px; right:20px;}
54
+ div.dup-dlg-confirm-progress {display:none}
55
+
56
+ /*ADMIN: NOTICES */
57
+ div#dup-global-error-reserved-files p {font-size:14px}
58
+ div#dup-global-error-reserved-files b.pass-msg {color:green; font-size:20px}
59
+ div#dup-global-error-reserved-files p.pass-lnks {line-height:24px; margin:-7px 0 0 5px}
60
+ div#dup-global-error-reserved-files div.pass-msg {padding:5px 0 0 10px; font-size:11px; color:#999; font-style: italic}
61
+ div.dup-wpnotice-box {display:none;}
62
+
63
+ /*================================================
64
+ PARSLEY:Overrides*/
65
+ input.parsley-error, textarea.parsley-error {
66
+ color:#B94A48 !important;
67
+ background-color:#F2DEDE !important;
68
+ border:1px solid #EED3D7 !important;
69
+ }
70
+ div.qtip-content {line-height:16px}
71
+ ul.parsley-errors-list {margin:0 0 -7px 0; font-style: italic}
72
+
73
+ div.notice-safemode {color: maroon;}
74
+ div.cleanup-notice b.title {color: green;font-size: 20px;}
75
+
76
+ /*SCREEN TABS*/
77
+ div.dup-screen-hlp-info {line-height:26px; padding:10px 0 10px 0}
78
+ #screen-meta-links .button { font-size:13px !important; height:auto !important;font-weight: normal; padding: 3px 6px 3px 16px !important;min-width:72px !important}
79
+
assets/js/parsley.min.js ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ /*!
2
+ * Parsley.js
3
+ * Version 2.3.5 - built Sun, Feb 28th 2016, 6:25 am
4
+ * http://parsleyjs.org
5
+ * Guillaume Potier - <guillaume@wisembly.com>
6
+ * Marc-Andre Lafortune - <petroselinum@marc-andre.ca>
7
+ * MIT Licensed
8
+ */
9
+ function _toConsumableArray(e){if(Array.isArray(e)){for(var t=0,i=Array(e.length);t<e.length;t++)i[t]=e[t];return i}return Array.from(e)}var _slice=Array.prototype.slice;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],t):e.parsley=t(e.jQuery)}(this,function(e){"use strict";function t(e,t){return e.parsleyAdaptedCallback||(e.parsleyAdaptedCallback=function(){var i=Array.prototype.slice.call(arguments,0);i.unshift(this),e.apply(t||A,i)}),e.parsleyAdaptedCallback}function i(e){return 0===e.lastIndexOf(D,0)?e.substr(D.length):e}var n=1,r={},s={attr:function(e,t,i){var n,r,s,a=new RegExp("^"+t,"i");if("undefined"==typeof i)i={};else for(n in i)i.hasOwnProperty(n)&&delete i[n];if("undefined"==typeof e||"undefined"==typeof e[0])return i;for(s=e[0].attributes,n=s.length;n--;)r=s[n],r&&r.specified&&a.test(r.name)&&(i[this.camelize(r.name.slice(t.length))]=this.deserializeValue(r.value));return i},checkAttr:function(e,t,i){return e.is("["+t+i+"]")},setAttr:function(e,t,i,n){e[0].setAttribute(this.dasherize(t+i),String(n))},generateID:function(){return""+n++},deserializeValue:function(t){var i;try{return t?"true"==t||("false"==t?!1:"null"==t?null:isNaN(i=Number(t))?/^[\[\{]/.test(t)?e.parseJSON(t):t:i):t}catch(n){return t}},camelize:function(e){return e.replace(/-+(.)?/g,function(e,t){return t?t.toUpperCase():""})},dasherize:function(e){return e.replace(/::/g,"/").replace(/([A-Z]+)([A-Z][a-z])/g,"$1_$2").replace(/([a-z\d])([A-Z])/g,"$1_$2").replace(/_/g,"-").toLowerCase()},warn:function(){var e;window.console&&"function"==typeof window.console.warn&&(e=window.console).warn.apply(e,arguments)},warnOnce:function(e){r[e]||(r[e]=!0,this.warn.apply(this,arguments))},_resetWarnings:function(){r={}},trimString:function(e){return e.replace(/^\s+|\s+$/g,"")},namespaceEvents:function(t,i){return t=this.trimString(t||"").split(/\s+/),t[0]?e.map(t,function(e){return e+"."+i}).join(" "):""},objectCreate:Object.create||function(){var e=function(){};return function(t){if(arguments.length>1)throw Error("Second argument not supported");if("object"!=typeof t)throw TypeError("Argument must be an object");e.prototype=t;var i=new e;return e.prototype=null,i}}()},a=s,o={namespace:"data-parsley-",inputs:"input, textarea, select",excluded:"input[type=button], input[type=submit], input[type=reset], input[type=hidden]",priorityEnabled:!0,multiple:null,group:null,uiEnabled:!0,validationThreshold:3,focus:"first",trigger:!1,triggerAfterFailure:"input",errorClass:"parsley-error",successClass:"parsley-success",classHandler:function(e){},errorsContainer:function(e){},errorsWrapper:'<ul class="parsley-errors-list"></ul>',errorTemplate:"<li></li>"},l=function(){};l.prototype={asyncSupport:!0,actualizeOptions:function(){return a.attr(this.$element,this.options.namespace,this.domOptions),this.parent&&this.parent.actualizeOptions&&this.parent.actualizeOptions(),this},_resetOptions:function(e){this.domOptions=a.objectCreate(this.parent.options),this.options=a.objectCreate(this.domOptions);for(var t in e)e.hasOwnProperty(t)&&(this.options[t]=e[t]);this.actualizeOptions()},_listeners:null,on:function(e,t){this._listeners=this._listeners||{};var i=this._listeners[e]=this._listeners[e]||[];return i.push(t),this},subscribe:function(t,i){e.listenTo(this,t.toLowerCase(),i)},off:function(e,t){var i=this._listeners&&this._listeners[e];if(i)if(t)for(var n=i.length;n--;)i[n]===t&&i.splice(n,1);else delete this._listeners[e];return this},unsubscribe:function(t,i){e.unsubscribeTo(this,t.toLowerCase())},trigger:function(e,t,i){t=t||this;var n,r=this._listeners&&this._listeners[e];if(r)for(var s=r.length;s--;)if(n=r[s].call(t,t,i),n===!1)return n;return this.parent?this.parent.trigger(e,t,i):!0},reset:function(){if("ParsleyForm"!==this.__class__)return this._resetUI(),this._trigger("reset");for(var e=0;e<this.fields.length;e++)this.fields[e].reset();this._trigger("reset")},destroy:function(){if(this._destroyUI(),"ParsleyForm"!==this.__class__)return this.$element.removeData("Parsley"),this.$element.removeData("ParsleyFieldMultiple"),void this._trigger("destroy");for(var e=0;e<this.fields.length;e++)this.fields[e].destroy();this.$element.removeData("Parsley"),this._trigger("destroy")},asyncIsValid:function(e,t){return a.warnOnce("asyncIsValid is deprecated; please use whenValid instead"),this.whenValid({group:e,force:t})},_findRelated:function(){return this.options.multiple?this.parent.$element.find("["+this.options.namespace+'multiple="'+this.options.multiple+'"]'):this.$element}};var u={string:function(e){return e},integer:function(e){if(isNaN(e))throw'Requirement is not an integer: "'+e+'"';return parseInt(e,10)},number:function(e){if(isNaN(e))throw'Requirement is not a number: "'+e+'"';return parseFloat(e)},reference:function(t){var i=e(t);if(0===i.length)throw'No such reference: "'+t+'"';return i},"boolean":function(e){return"false"!==e},object:function(e){return a.deserializeValue(e)},regexp:function(e){var t="";return/^\/.*\/(?:[gimy]*)$/.test(e)?(t=e.replace(/.*\/([gimy]*)$/,"$1"),e=e.replace(new RegExp("^/(.*?)/"+t+"$"),"$1")):e="^"+e+"$",new RegExp(e,t)}},d=function(e,t){var i=e.match(/^\s*\[(.*)\]\s*$/);if(!i)throw'Requirement is not an array: "'+e+'"';var n=i[1].split(",").map(a.trimString);if(n.length!==t)throw"Requirement has "+n.length+" values when "+t+" are needed";return n},h=function(e,t){var i=u[e||"string"];if(!i)throw'Unknown requirement specification: "'+e+'"';return i(t)},p=function(e,t,i){var n=null,r={};for(var s in e)if(s){var a=i(s);"string"==typeof a&&(a=h(e[s],a)),r[s]=a}else n=h(e[s],t);return[n,r]},f=function(t){e.extend(!0,this,t)};f.prototype={validate:function(t,i){if(this.fn)return arguments.length>3&&(i=[].slice.call(arguments,1,-1)),this.fn.call(this,t,i);if(e.isArray(t)){if(!this.validateMultiple)throw"Validator `"+this.name+"` does not handle multiple values";return this.validateMultiple.apply(this,arguments)}if(this.validateNumber)return isNaN(t)?!1:(arguments[0]=parseFloat(arguments[0]),this.validateNumber.apply(this,arguments));if(this.validateString)return this.validateString.apply(this,arguments);throw"Validator `"+this.name+"` only handles multiple values"},parseRequirements:function(t,i){if("string"!=typeof t)return e.isArray(t)?t:[t];var n=this.requirementType;if(e.isArray(n)){for(var r=d(t,n.length),s=0;s<r.length;s++)r[s]=h(n[s],r[s]);return r}return e.isPlainObject(n)?p(n,t,i):[h(n,t)]},requirementType:"string",priority:2};var c=function(e,t){this.__class__="ParsleyValidatorRegistry",this.locale="en",this.init(e||{},t||{})},m={email:/^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))$/i,number:/^-?(\d*\.)?\d+(e[-+]?\d+)?$/i,integer:/^-?\d+$/,digits:/^\d+$/,alphanum:/^\w+$/i,url:new RegExp("^(?:(?:https?|ftp)://)?(?:\\S+(?::\\S*)?@)?(?:(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*(?:\\.(?:[a-z\\u00a1-\\uffff]{2,})))(?::\\d{2,5})?(?:/\\S*)?$","i")};m.range=m.number;var g=function(e){var t=(""+e).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);return t?Math.max(0,(t[1]?t[1].length:0)-(t[2]?+t[2]:0)):0};c.prototype={init:function(t,i){this.catalog=i,this.validators=e.extend({},this.validators);for(var n in t)this.addValidator(n,t[n].fn,t[n].priority);window.Parsley.trigger("parsley:validator:init")},setLocale:function(e){if("undefined"==typeof this.catalog[e])throw new Error(e+" is not available in the catalog");return this.locale=e,this},addCatalog:function(e,t,i){return"object"==typeof t&&(this.catalog[e]=t),!0===i?this.setLocale(e):this},addMessage:function(e,t,i){return"undefined"==typeof this.catalog[e]&&(this.catalog[e]={}),this.catalog[e][t]=i,this},addMessages:function(e,t){for(var i in t)this.addMessage(e,i,t[i]);return this},addValidator:function(e,t,i){if(this.validators[e])a.warn('Validator "'+e+'" is already defined.');else if(o.hasOwnProperty(e))return void a.warn('"'+e+'" is a restricted keyword and is not a valid validator name.');return this._setValidator.apply(this,arguments)},updateValidator:function(e,t,i){return this.validators[e]?this._setValidator(this,arguments):(a.warn('Validator "'+e+'" is not already defined.'),this.addValidator.apply(this,arguments))},removeValidator:function(e){return this.validators[e]||a.warn('Validator "'+e+'" is not defined.'),delete this.validators[e],this},_setValidator:function(e,t,i){"object"!=typeof t&&(t={fn:t,priority:i}),t.validate||(t=new f(t)),this.validators[e]=t;for(var n in t.messages||{})this.addMessage(n,e,t.messages[n]);return this},getErrorMessage:function(e){var t;if("type"===e.name){var i=this.catalog[this.locale][e.name]||{};t=i[e.requirements]}else t=this.formatMessage(this.catalog[this.locale][e.name],e.requirements);return t||this.catalog[this.locale].defaultMessage||this.catalog.en.defaultMessage},formatMessage:function(e,t){if("object"==typeof t){for(var i in t)e=this.formatMessage(e,t[i]);return e}return"string"==typeof e?e.replace(/%s/i,t):""},validators:{notblank:{validateString:function(e){return/\S/.test(e)},priority:2},required:{validateMultiple:function(e){return e.length>0},validateString:function(e){return/\S/.test(e)},priority:512},type:{validateString:function(e,t){var i=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],n=i.step,r=void 0===n?"1":n,s=i.base,a=void 0===s?0:s,o=m[t];if(!o)throw new Error("validator type `"+t+"` is not supported");if(!o.test(e))return!1;if("number"===t&&!/^any$/i.test(r||"")){var l=Number(e),u=Math.max(g(r),g(a));if(g(l)>u)return!1;var d=function(e){return Math.round(e*Math.pow(10,u))};if((d(l)-d(a))%d(r)!=0)return!1}return!0},requirementType:{"":"string",step:"string",base:"number"},priority:256},pattern:{validateString:function(e,t){return t.test(e)},requirementType:"regexp",priority:64},minlength:{validateString:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxlength:{validateString:function(e,t){return e.length<=t},requirementType:"integer",priority:30},length:{validateString:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},mincheck:{validateMultiple:function(e,t){return e.length>=t},requirementType:"integer",priority:30},maxcheck:{validateMultiple:function(e,t){return e.length<=t},requirementType:"integer",priority:30},check:{validateMultiple:function(e,t,i){return e.length>=t&&e.length<=i},requirementType:["integer","integer"],priority:30},min:{validateNumber:function(e,t){return e>=t},requirementType:"number",priority:30},max:{validateNumber:function(e,t){return t>=e},requirementType:"number",priority:30},range:{validateNumber:function(e,t,i){return e>=t&&i>=e},requirementType:["number","number"],priority:30},equalto:{validateString:function(t,i){var n=e(i);return n.length?t===n.val():t===i},priority:256}}};var y={},v=function T(e,t,i){for(var n=[],r=[],s=0;s<e.length;s++){for(var a=!1,o=0;o<t.length;o++)if(e[s].assert.name===t[o].assert.name){a=!0;break}a?r.push(e[s]):n.push(e[s])}return{kept:r,added:n,removed:i?[]:T(t,e,!0).added}};y.Form={_actualizeTriggers:function(){var e=this;this.$element.on("submit.Parsley",function(t){e.onSubmitValidate(t)}),this.$element.on("click.Parsley",'input[type="submit"], button[type="submit"]',function(t){e.onSubmitButton(t)}),!1!==this.options.uiEnabled&&this.$element.attr("novalidate","")},focus:function(){if(this._focusedField=null,!0===this.validationResult||"none"===this.options.focus)return null;for(var e=0;e<this.fields.length;e++){var t=this.fields[e];if(!0!==t.validationResult&&t.validationResult.length>0&&"undefined"==typeof t.options.noFocus&&(this._focusedField=t.$element,"first"===this.options.focus))break}return null===this._focusedField?null:this._focusedField.focus()},_destroyUI:function(){this.$element.off(".Parsley")}},y.Field={_reflowUI:function(){if(this._buildUI(),this._ui){var e=v(this.validationResult,this._ui.lastValidationResult);this._ui.lastValidationResult=this.validationResult,this._manageStatusClass(),this._manageErrorsMessages(e),this._actualizeTriggers(),!e.kept.length&&!e.added.length||this._failedOnce||(this._failedOnce=!0,this._actualizeTriggers())}},getErrorsMessages:function(){if(!0===this.validationResult)return[];for(var e=[],t=0;t<this.validationResult.length;t++)e.push(this.validationResult[t].errorMessage||this._getErrorMessage(this.validationResult[t].assert));return e},addError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r?!0:r;this._buildUI(),this._addError(e,{message:i,assert:n}),s&&this._errorClass()},updateError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.message,n=t.assert,r=t.updateClass,s=void 0===r?!0:r;this._buildUI(),this._updateError(e,{message:i,assert:n}),s&&this._errorClass()},removeError:function(e){var t=arguments.length<=1||void 0===arguments[1]?{}:arguments[1],i=t.updateClass,n=void 0===i?!0:i;this._buildUI(),this._removeError(e),n&&this._manageStatusClass()},_manageStatusClass:function(){this.hasConstraints()&&this.needsValidation()&&!0===this.validationResult?this._successClass():this.validationResult.length>0?this._errorClass():this._resetClass()},_manageErrorsMessages:function(t){if("undefined"==typeof this.options.errorsMessagesDisabled){if("undefined"!=typeof this.options.errorMessage)return t.added.length||t.kept.length?(this._insertErrorWrapper(),0===this._ui.$errorsWrapper.find(".parsley-custom-error-message").length&&this._ui.$errorsWrapper.append(e(this.options.errorTemplate).addClass("parsley-custom-error-message")),this._ui.$errorsWrapper.addClass("filled").find(".parsley-custom-error-message").html(this.options.errorMessage)):this._ui.$errorsWrapper.removeClass("filled").find(".parsley-custom-error-message").remove();for(var i=0;i<t.removed.length;i++)this._removeError(t.removed[i].assert.name);for(i=0;i<t.added.length;i++)this._addError(t.added[i].assert.name,{message:t.added[i].errorMessage,assert:t.added[i].assert});for(i=0;i<t.kept.length;i++)this._updateError(t.kept[i].assert.name,{message:t.kept[i].errorMessage,assert:t.kept[i].assert})}},_addError:function(t,i){var n=i.message,r=i.assert;this._insertErrorWrapper(),this._ui.$errorsWrapper.addClass("filled").append(e(this.options.errorTemplate).addClass("parsley-"+t).html(n||this._getErrorMessage(r)))},_updateError:function(e,t){var i=t.message,n=t.assert;this._ui.$errorsWrapper.addClass("filled").find(".parsley-"+e).html(i||this._getErrorMessage(n))},_removeError:function(e){this._ui.$errorsWrapper.removeClass("filled").find(".parsley-"+e).remove()},_getErrorMessage:function(e){var t=e.name+"Message";return"undefined"!=typeof this.options[t]?window.Parsley.formatMessage(this.options[t],e.requirements):window.Parsley.getErrorMessage(e)},_buildUI:function(){if(!this._ui&&!1!==this.options.uiEnabled){var t={};this.$element.attr(this.options.namespace+"id",this.__id__),t.$errorClassHandler=this._manageClassHandler(),t.errorsWrapperId="parsley-id-"+(this.options.multiple?"multiple-"+this.options.multiple:this.__id__),t.$errorsWrapper=e(this.options.errorsWrapper).attr("id",t.errorsWrapperId),t.lastValidationResult=[],t.validationInformationVisible=!1,this._ui=t}},_manageClassHandler:function(){if("string"==typeof this.options.classHandler&&e(this.options.classHandler).length)return e(this.options.classHandler);var t=this.options.classHandler.call(this,this);return"undefined"!=typeof t&&t.length?t:!this.options.multiple||this.$element.is("select")?this.$element:this.$element.parent()},_insertErrorWrapper:function(){var t;if(0!==this._ui.$errorsWrapper.parent().length)return this._ui.$errorsWrapper.parent();if("string"==typeof this.options.errorsContainer){if(e(this.options.errorsContainer).length)return e(this.options.errorsContainer).append(this._ui.$errorsWrapper);a.warn("The errors container `"+this.options.errorsContainer+"` does not exist in DOM")}else"function"==typeof this.options.errorsContainer&&(t=this.options.errorsContainer.call(this,this));if("undefined"!=typeof t&&t.length)return t.append(this._ui.$errorsWrapper);var i=this.$element;return this.options.multiple&&(i=i.parent()),i.after(this._ui.$errorsWrapper)},_actualizeTriggers:function(){var e=this,t=this._findRelated();t.off(".Parsley"),this._failedOnce?t.on(a.namespaceEvents(this.options.triggerAfterFailure,"Parsley"),function(){e.validate()}):t.on(a.namespaceEvents(this.options.trigger,"Parsley"),function(t){e._eventValidate(t)})},_eventValidate:function(e){(!/key|input/.test(e.type)||this._ui&&this._ui.validationInformationVisible||!(this.getValue().length<=this.options.validationThreshold))&&this.validate()},_resetUI:function(){this._failedOnce=!1,this._actualizeTriggers(),"undefined"!=typeof this._ui&&(this._ui.$errorsWrapper.removeClass("filled").children().remove(),this._resetClass(),this._ui.lastValidationResult=[],this._ui.validationInformationVisible=!1)},_destroyUI:function(){this._resetUI(),"undefined"!=typeof this._ui&&this._ui.$errorsWrapper.remove(),delete this._ui},_successClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.errorClass).addClass(this.options.successClass)},_errorClass:function(){this._ui.validationInformationVisible=!0,this._ui.$errorClassHandler.removeClass(this.options.successClass).addClass(this.options.errorClass)},_resetClass:function(){this._ui.$errorClassHandler.removeClass(this.options.successClass).removeClass(this.options.errorClass)}};var _=function(t,i,n){this.__class__="ParsleyForm",this.__id__=a.generateID(),this.$element=e(t),this.domOptions=i,this.options=n,this.parent=window.Parsley,this.fields=[],this.validationResult=null},w={pending:null,resolved:!0,rejected:!1};_.prototype={onSubmitValidate:function(e){var t=this;if(!0!==e.parsley){var i=this._$submitSource||this.$element.find('input[type="submit"], button[type="submit"]').first();if(this._$submitSource=null,this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!0),!i.is("[formnovalidate]")){var n=this.whenValidate({event:e});"resolved"===n.state()&&!1!==this._trigger("submit")||(e.stopImmediatePropagation(),e.preventDefault(),"pending"===n.state()&&n.done(function(){t._submit(i)}))}}},onSubmitButton:function(t){this._$submitSource=e(t.target)},_submit:function(t){if(!1!==this._trigger("submit")){if(t){var i=this.$element.find(".parsley-synthetic-submit-button").prop("disabled",!1);0===i.length&&(i=e('<input class="parsley-synthetic-submit-button" type="hidden">').appendTo(this.$element)),i.attr({name:t.attr("name"),value:t.attr("value")})}this.$element.trigger(e.extend(e.Event("submit"),{parsley:!0}))}},validate:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling validate on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1],s=i[2];t={group:n,force:r,event:s}}return w[this.whenValidate(t).state()]},whenValidate:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force,s=i.event;this.submitEvent=s,s&&(this.submitEvent=e.extend({},s,{preventDefault:function(){a.warnOnce("Using `this.submitEvent.preventDefault()` is deprecated; instead, call `this.validationResult = false`"),t.validationResult=!1}})),this.validationResult=!0,this._trigger("validate"),this._refreshFields();var o=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValidate({force:r,group:n})})}),l=function(){var i=e.Deferred();return!1===t.validationResult&&i.reject(),i.resolve().promise()};return e.when.apply(e,_toConsumableArray(o)).done(function(){t._trigger("success")}).fail(function(){t.validationResult=!1,t.focus(),t._trigger("error")}).always(function(){t._trigger("validated")}).pipe(l,l)},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley form without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={group:n,force:r}}return w[this.whenValid(t).state()]},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.group,r=i.force;this._refreshFields();var s=this._withoutReactualizingFormOptions(function(){return e.map(t.fields,function(e){return e.whenValid({group:n,force:r})})});return e.when.apply(e,_toConsumableArray(s))},_refreshFields:function(){return this.actualizeOptions()._bindFields()},_bindFields:function(){var t=this,i=this.fields;return this.fields=[],this.fieldsMappedById={},this._withoutReactualizingFormOptions(function(){t.$element.find(t.options.inputs).not(t.options.excluded).each(function(e,i){var n=new window.Parsley.Factory(i,{},t);"ParsleyField"!==n.__class__&&"ParsleyFieldMultiple"!==n.__class__||!0===n.options.excluded||"undefined"==typeof t.fieldsMappedById[n.__class__+"-"+n.__id__]&&(t.fieldsMappedById[n.__class__+"-"+n.__id__]=n,t.fields.push(n))}),e(i).not(t.fields).each(function(e,t){t._trigger("reset")})}),this},_withoutReactualizingFormOptions:function(e){var t=this.actualizeOptions;this.actualizeOptions=function(){return this};var i=e();return this.actualizeOptions=t,i},_trigger:function(e){return this.trigger("form:"+e)}};var b=function(t,i,n,r,s){if(!/ParsleyField/.test(t.__class__))throw new Error("ParsleyField or ParsleyFieldMultiple instance expected");var a=window.Parsley._validatorRegistry.validators[i],o=new f(a);e.extend(this,{validator:o,name:i,requirements:n,priority:r||t.options[i+"Priority"]||o.priority,isDomConstraint:!0===s}),this._parseRequirements(t.options)},F=function(e){var t=e[0].toUpperCase();return t+e.slice(1)};b.prototype={validate:function(e,t){var i=this.requirementList.slice(0);return i.unshift(e),i.push(t),this.validator.validate.apply(this.validator,i)},_parseRequirements:function(e){var t=this;this.requirementList=this.validator.parseRequirements(this.requirements,function(i){return e[t.name+F(i)]})}};var C=function(t,i,n,r){this.__class__="ParsleyField",this.__id__=a.generateID(),this.$element=e(t),"undefined"!=typeof r&&(this.parent=r),this.options=n,this.domOptions=i,this.constraints=[],this.constraintsByName={},this.validationResult=[],this._bindConstraints()},$={pending:null,resolved:!0,rejected:!1};C.prototype={validate:function(t){arguments.length>=1&&!e.isPlainObject(t)&&(a.warnOnce("Calling validate on a parsley field without passing arguments as an object is deprecated."),t={options:t});var i=this.whenValidate(t);if(!i)return!0;switch(i.state()){case"pending":return null;case"resolved":return!0;case"rejected":return this.validationResult}},whenValidate:function(){var e=this,t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],i=t.force,n=t.group;return this.refreshConstraints(),!n||this._isInGroup(n)?(this.value=this.getValue(),this._trigger("validate"),this.whenValid({force:i,value:this.value,_refreshed:!0}).always(function(){e._reflowUI()}).done(function(){e._trigger("success")}).fail(function(){e._trigger("error")}).always(function(){e._trigger("validated")})):void 0},hasConstraints:function(){return 0!==this.constraints.length},needsValidation:function(e){return"undefined"==typeof e&&(e=this.getValue()),e.length||this._isRequired()||"undefined"!=typeof this.options.validateIfEmpty?!0:!1},_isInGroup:function(t){return e.isArray(this.options.group)?-1!==e.inArray(t,this.options.group):this.options.group===t},isValid:function(t){if(arguments.length>=1&&!e.isPlainObject(t)){a.warnOnce("Calling isValid on a parsley field without passing arguments as an object is deprecated.");var i=_slice.call(arguments),n=i[0],r=i[1];t={force:n,value:r}}var s=this.whenValid(t);return s?$[s.state()]:!0},whenValid:function(){var t=this,i=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],n=i.force,r=void 0===n?!1:n,s=i.value,a=i.group,o=i._refreshed;if(o||this.refreshConstraints(),!a||this._isInGroup(a)){if(this.validationResult=!0,!this.hasConstraints())return e.when();if(("undefined"==typeof s||null===s)&&(s=this.getValue()),!this.needsValidation(s)&&!0!==r)return e.when();var l=this._getGroupedConstraints(),u=[];return e.each(l,function(i,n){var r=e.when.apply(e,_toConsumableArray(e.map(n,function(e){return t._validateConstraint(s,e)})));return u.push(r),"rejected"===r.state()?!1:void 0}),e.when.apply(e,u)}},_validateConstraint:function(t,i){var n=this,r=i.validate(t,this);return!1===r&&(r=e.Deferred().reject()),e.when(r).fail(function(e){!0===n.validationResult&&(n.validationResult=[]),n.validationResult.push({assert:i,errorMessage:"string"==typeof e&&e})})},getValue:function(){var e;return e="function"==typeof this.options.value?this.options.value(this):"undefined"!=typeof this.options.value?this.options.value:this.$element.val(),"undefined"==typeof e||null===e?"":this._handleWhitespace(e)},refreshConstraints:function(){return this.actualizeOptions()._bindConstraints()},addConstraint:function(e,t,i,n){if(window.Parsley._validatorRegistry.validators[e]){var r=new b(this,e,t,i,n);"undefined"!==this.constraintsByName[r.name]&&this.removeConstraint(r.name),this.constraints.push(r),this.constraintsByName[r.name]=r}return this},removeConstraint:function(e){for(var t=0;t<this.constraints.length;t++)if(e===this.constraints[t].name){this.constraints.splice(t,1);break}return delete this.constraintsByName[e],this},updateConstraint:function(e,t,i){return this.removeConstraint(e).addConstraint(e,t,i)},_bindConstraints:function(){for(var e=[],t={},i=0;i<this.constraints.length;i++)!1===this.constraints[i].isDomConstraint&&(e.push(this.constraints[i]),t[this.constraints[i].name]=this.constraints[i]);this.constraints=e,this.constraintsByName=t;for(var n in this.options)this.addConstraint(n,this.options[n],void 0,!0);return this._bindHtml5Constraints()},_bindHtml5Constraints:function(){(this.$element.hasClass("required")||this.$element.attr("required"))&&this.addConstraint("required",!0,void 0,!0),"string"==typeof this.$element.attr("pattern")&&this.addConstraint("pattern",this.$element.attr("pattern"),void 0,!0),"undefined"!=typeof this.$element.attr("min")&&"undefined"!=typeof this.$element.attr("max")?this.addConstraint("range",[this.$element.attr("min"),this.$element.attr("max")],void 0,!0):"undefined"!=typeof this.$element.attr("min")?this.addConstraint("min",this.$element.attr("min"),void 0,!0):"undefined"!=typeof this.$element.attr("max")&&this.addConstraint("max",this.$element.attr("max"),void 0,!0),"undefined"!=typeof this.$element.attr("minlength")&&"undefined"!=typeof this.$element.attr("maxlength")?this.addConstraint("length",[this.$element.attr("minlength"),this.$element.attr("maxlength")],void 0,!0):"undefined"!=typeof this.$element.attr("minlength")?this.addConstraint("minlength",this.$element.attr("minlength"),void 0,!0):"undefined"!=typeof this.$element.attr("maxlength")&&this.addConstraint("maxlength",this.$element.attr("maxlength"),void 0,!0);var e=this.$element.attr("type");return"undefined"==typeof e?this:"number"===e?this.addConstraint("type",["number",{step:this.$element.attr("step"),base:this.$element.attr("min")||this.$element.attr("value")}],void 0,!0):/^(email|url|range)$/i.test(e)?this.addConstraint("type",e,void 0,!0):this},_isRequired:function(){return"undefined"==typeof this.constraintsByName.required?!1:!1!==this.constraintsByName.required.requirements},_trigger:function(e){return this.trigger("field:"+e)},_handleWhitespace:function(e){return!0===this.options.trimValue&&a.warnOnce('data-parsley-trim-value="true" is deprecated, please use data-parsley-whitespace="trim"'),"squish"===this.options.whitespace&&(e=e.replace(/\s{2,}/g," ")),("trim"===this.options.whitespace||"squish"===this.options.whitespace||!0===this.options.trimValue)&&(e=a.trimString(e)),e},_getGroupedConstraints:function(){if(!1===this.options.priorityEnabled)return[this.constraints];for(var e=[],t={},i=0;i<this.constraints.length;i++){var n=this.constraints[i].priority;t[n]||e.push(t[n]=[]),t[n].push(this.constraints[i])}return e.sort(function(e,t){return t[0].priority-e[0].priority}),e}};var x=C,P=function(){this.__class__="ParsleyFieldMultiple"};P.prototype={addElement:function(e){return this.$elements.push(e),this},refreshConstraints:function(){var t;if(this.constraints=[],this.$element.is("select"))return this.actualizeOptions()._bindConstraints(),this;for(var i=0;i<this.$elements.length;i++)if(e("html").has(this.$elements[i]).length){t=this.$elements[i].data("ParsleyFieldMultiple").refreshConstraints().constraints;for(var n=0;n<t.length;n++)this.addConstraint(t[n].name,t[n].requirements,t[n].priority,t[n].isDomConstraint)}else this.$elements.splice(i,1);return this},getValue:function(){if("function"==typeof this.options.value)value=this.options.value(this);else if("undefined"!=typeof this.options.value)return this.options.value;if(this.$element.is("input[type=radio]"))return this._findRelated().filter(":checked").val()||"";if(this.$element.is("input[type=checkbox]")){var t=[];return this._findRelated().filter(":checked").each(function(){t.push(e(this).val())}),t}return this.$element.is("select")&&null===this.$element.val()?[]:this.$element.val()},_init:function(){return this.$elements=[this.$element],this}};var E=function(t,i,n){this.$element=e(t);var r=this.$element.data("Parsley");if(r)return"undefined"!=typeof n&&r.parent===window.Parsley&&(r.parent=n,r._resetOptions(r.options)),r;if(!this.$element.length)throw new Error("You must bind Parsley on an existing element.");if("undefined"!=typeof n&&"ParsleyForm"!==n.__class__)throw new Error("Parent instance must be a ParsleyForm instance");return this.parent=n||window.Parsley,this.init(i)};E.prototype={init:function(e){return this.__class__="Parsley",this.__version__="2.3.5",this.__id__=a.generateID(),this._resetOptions(e),this.$element.is("form")||a.checkAttr(this.$element,this.options.namespace,"validate")&&!this.$element.is(this.options.inputs)?this.bind("parsleyForm"):this.isMultiple()?this.handleMultiple():this.bind("parsleyField")},isMultiple:function(){return this.$element.is("input[type=radio], input[type=checkbox]")||this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple")},handleMultiple:function(){var t,i,n=this;if(this.options.multiple||("undefined"!=typeof this.$element.attr("name")&&this.$element.attr("name").length?this.options.multiple=t=this.$element.attr("name"):"undefined"!=typeof this.$element.attr("id")&&this.$element.attr("id").length&&(this.options.multiple=this.$element.attr("id"))),this.$element.is("select")&&"undefined"!=typeof this.$element.attr("multiple"))return this.options.multiple=this.options.multiple||this.__id__,this.bind("parsleyFieldMultiple");if(!this.options.multiple)return a.warn("To be bound by Parsley, a radio, a checkbox and a multiple select input must have either a name or a multiple option.",this.$element),this;this.options.multiple=this.options.multiple.replace(/(:|\.|\[|\]|\{|\}|\$)/g,""),
10
+ "undefined"!=typeof t&&e('input[name="'+t+'"]').each(function(t,i){e(i).is("input[type=radio], input[type=checkbox]")&&e(i).attr(n.options.namespace+"multiple",n.options.multiple)});for(var r=this._findRelated(),s=0;s<r.length;s++)if(i=e(r.get(s)).data("Parsley"),"undefined"!=typeof i){this.$element.data("ParsleyFieldMultiple")||i.addElement(this.$element);break}return this.bind("parsleyField",!0),i||this.bind("parsleyFieldMultiple")},bind:function(t,i){var n;switch(t){case"parsleyForm":n=e.extend(new _(this.$element,this.domOptions,this.options),window.ParsleyExtend)._bindFields();break;case"parsleyField":n=e.extend(new x(this.$element,this.domOptions,this.options,this.parent),window.ParsleyExtend);break;case"parsleyFieldMultiple":n=e.extend(new x(this.$element,this.domOptions,this.options,this.parent),new P,window.ParsleyExtend)._init();break;default:throw new Error(t+"is not a supported Parsley type")}return this.options.multiple&&a.setAttr(this.$element,this.options.namespace,"multiple",this.options.multiple),"undefined"!=typeof i?(this.$element.data("ParsleyFieldMultiple",n),n):(this.$element.data("Parsley",n),n._actualizeTriggers(),n._trigger("init"),n)}};var V=e.fn.jquery.split(".");if(parseInt(V[0])<=1&&parseInt(V[1])<8)throw"The loaded version of jQuery is too old. Please upgrade to 1.8.x or better.";V.forEach||a.warn("Parsley requires ES5 to run properly. Please include https://github.com/es-shims/es5-shim");var M=e.extend(new l,{$element:e(document),actualizeOptions:null,_resetOptions:null,Factory:E,version:"2.3.5"});e.extend(x.prototype,y.Field,l.prototype),e.extend(_.prototype,y.Form,l.prototype),e.extend(E.prototype,l.prototype),e.fn.parsley=e.fn.psly=function(t){if(this.length>1){var i=[];return this.each(function(){i.push(e(this).parsley(t))}),i}return e(this).length?new E(this,t):void a.warn("You must bind Parsley on an existing element.")},"undefined"==typeof window.ParsleyExtend&&(window.ParsleyExtend={}),M.options=e.extend(a.objectCreate(o),window.ParsleyConfig),window.ParsleyConfig=M.options,window.Parsley=window.psly=M,window.ParsleyUtils=a;var O=window.Parsley._validatorRegistry=new c(window.ParsleyConfig.validators,window.ParsleyConfig.i18n);window.ParsleyValidator={},e.each("setLocale addCatalog addMessage addMessages getErrorMessage formatMessage addValidator updateValidator removeValidator".split(" "),function(t,i){window.Parsley[i]=e.proxy(O,i),window.ParsleyValidator[i]=function(){var e;return a.warnOnce("Accessing the method '"+i+"' through ParsleyValidator is deprecated. Simply call 'window.Parsley."+i+"(...)'"),(e=window.Parsley)[i].apply(e,arguments)}}),window.Parsley.UI=y,window.ParsleyUI={removeError:function(e,t,i){var n=!0!==i;return a.warnOnce("Accessing ParsleyUI is deprecated. Call 'removeError' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e.removeError(t,{updateClass:n})},getErrorsMessages:function(e){return a.warnOnce("Accessing ParsleyUI is deprecated. Call 'getErrorsMessages' on the instance directly."),e.getErrorsMessages()}},e.each("addError updateError".split(" "),function(e,t){window.ParsleyUI[t]=function(e,i,n,r,s){var o=!0!==s;return a.warnOnce("Accessing ParsleyUI is deprecated. Call '"+t+"' on the instance directly. Please comment in issue 1073 as to your need to call this method."),e[t](i,{message:n,assert:r,updateClass:o})}}),/firefox/i.test(navigator.userAgent)&&e(document).on("change","select",function(t){e(t.target).trigger("input")}),!1!==window.ParsleyConfig.autoBind&&e(function(){e("[data-parsley-validate]").length&&e("[data-parsley-validate]").parsley()});var A=e({}),R=function(){a.warnOnce("Parsley's pubsub module is deprecated; use the 'on' and 'off' methods on parsley instances or window.Parsley")},D="parsley:";e.listen=function(e,n){var r;if(R(),"object"==typeof arguments[1]&&"function"==typeof arguments[2]&&(r=arguments[1],n=arguments[2]),"function"!=typeof n)throw new Error("Wrong parameters");window.Parsley.on(i(e),t(n,r))},e.listenTo=function(e,n,r){if(R(),!(e instanceof x||e instanceof _))throw new Error("Must give Parsley instance");if("string"!=typeof n||"function"!=typeof r)throw new Error("Wrong parameters");e.on(i(n),t(r))},e.unsubscribe=function(e,t){if(R(),"string"!=typeof e||"function"!=typeof t)throw new Error("Wrong arguments");window.Parsley.off(i(e),t.parsleyAdaptedCallback)},e.unsubscribeTo=function(e,t){if(R(),!(e instanceof x||e instanceof _))throw new Error("Must give Parsley instance");e.off(i(t))},e.unsubscribeAll=function(t){R(),window.Parsley.off(i(t)),e("form,input,textarea,select").each(function(){var n=e(this).data("Parsley");n&&n.off(i(t))})},e.emit=function(e,t){var n;R();var r=t instanceof x||t instanceof _,s=Array.prototype.slice.call(arguments,r?2:1);s.unshift(i(e)),r||(t=window.Parsley),(n=t).trigger.apply(n,_toConsumableArray(s))};e.extend(!0,M,{asyncValidators:{"default":{fn:function(e){return e.status>=200&&e.status<300},url:!1},reverse:{fn:function(e){return e.status<200||e.status>=300},url:!1}},addAsyncValidator:function(e,t,i,n){return M.asyncValidators[e]={fn:t,url:i||!1,options:n||{}},this}}),M.addValidator("remote",{requirementType:{"":"string",validator:"string",reverse:"boolean",options:"object"},validateString:function(t,i,n,r){var s,a,o={},l=n.validator||(!0===n.reverse?"reverse":"default");if("undefined"==typeof M.asyncValidators[l])throw new Error("Calling an undefined async validator: `"+l+"`");i=M.asyncValidators[l].url||i,i.indexOf("{value}")>-1?i=i.replace("{value}",encodeURIComponent(t)):o[r.$element.attr("name")||r.$element.attr("id")]=t;var u=e.extend(!0,n.options||{},M.asyncValidators[l].options);s=e.extend(!0,{},{url:i,data:o,type:"GET"},u),r.trigger("field:ajaxoptions",r,s),a=e.param(s),"undefined"==typeof M._remoteCache&&(M._remoteCache={});var d=M._remoteCache[a]=M._remoteCache[a]||e.ajax(s),h=function(){var t=M.asyncValidators[l].fn.call(r,d,i,n);return t||(t=e.Deferred().reject()),e.when(t)};return d.then(h,h)},priority:-1}),M.on("form:submit",function(){M._remoteCache={}}),window.ParsleyExtend.addAsyncValidator=function(){return ParsleyUtils.warnOnce("Accessing the method `addAsyncValidator` through an instance is deprecated. Simply call `Parsley.addAsyncValidator(...)`"),M.addAsyncValidator.apply(M,arguments)},M.addMessages("en",{defaultMessage:"This value seems to be invalid.",type:{email:"This value should be a valid email.",url:"This value should be a valid url.",number:"This value should be a valid number.",integer:"This value should be a valid integer.",digits:"This value should be digits.",alphanum:"This value should be alphanumeric."},notblank:"This value should not be blank.",required:"This value is required.",pattern:"This value seems to be invalid.",min:"This value should be greater than or equal to %s.",max:"This value should be lower than or equal to %s.",range:"This value should be between %s and %s.",minlength:"This value is too short. It should have %s characters or more.",maxlength:"This value is too long. It should have %s characters or fewer.",length:"This value length is invalid. It should be between %s and %s characters long.",mincheck:"You must select at least %s choices.",maxcheck:"You must select %s choices or fewer.",check:"You must select between %s and %s choices.",equalto:"This value should be the same."}),M.setLocale("en");var q=M;return q});
11
+ //# sourceMappingURL=parsley.min.js.map
classes/class.crypt.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ defined("ABSPATH") or die("");
3
+ // New encryption class
4
+
5
+ class DUP_Crypt
6
+ {
7
+ public static function encrypt($key, $string)
8
+ {
9
+ $result = '';
10
+ for ($i = 0; $i < strlen($string); $i++)
11
+ {
12
+ $char = substr($string, $i, 1);
13
+ $keychar = substr($key, ($i % strlen($key)) - 1, 1);
14
+ $char = chr(ord($char) + ord($keychar));
15
+ $result .= $char;
16
+ }
17
+
18
+ return urlencode(base64_encode($result));
19
+ }
20
+
21
+ public static function decrypt($key, $string)
22
+ {
23
+ $result = '';
24
+ $string = urldecode($string);
25
+ $string = base64_decode($string);
26
+
27
+ for ($i = 0; $i < strlen($string); $i++)
28
+ {
29
+ $char = substr($string, $i, 1);
30
+ $keychar = substr($key, ($i % strlen($key)) - 1, 1);
31
+ $char = chr(ord($char) - ord($keychar));
32
+ $result .= $char;
33
+ }
34
+
35
+ return $result;
36
+ }
37
+
38
+ public static function scramble($string)
39
+ {
40
+ return self::encrypt(self::sk1() . self::sk2(), $string);
41
+ }
42
+
43
+ public static function unscramble($string)
44
+ {
45
+ return self::decrypt(self::sk1() . self::sk2(), $string);
46
+ }
47
+
48
+ public static function sk1()
49
+ {
50
+ return 'fdas' . self::encrypt('abx', 'v1');
51
+ }
52
+
53
+ public static function sk2()
54
+ {
55
+ return 'fres' . self::encrypt('ad3x', 'v2');
56
+ }
57
+ }
classes/class.db.php CHANGED
@@ -78,43 +78,44 @@ class DUP_DB extends wpdb
78
  *
79
  * @return boolean|string
80
  */
81
- public static function getWindowsMySqlDumpRealPath() {
82
- if(function_exists('php_ini_loaded_file'))
83
- {
84
- $get_php_ini_path = php_ini_loaded_file();
85
- if(file_exists($get_php_ini_path))
86
- {
87
- $search = array(
88
- dirname(dirname($get_php_ini_path)).'/mysql/bin/mysqldump.exe',
89
- dirname(dirname(dirname($get_php_ini_path))).'/mysql/bin/mysqldump.exe',
90
- dirname(dirname($get_php_ini_path)).'/mysql/bin/mysqldump',
91
- dirname(dirname(dirname($get_php_ini_path))).'/mysql/bin/mysqldump',
92
- );
93
-
94
- foreach($search as $mysqldump)
95
- {
96
- if(file_exists($mysqldump))
97
- {
98
- return str_replace("\\","/",$mysqldump);
99
  }
100
  }
101
  }
102
- }
103
 
104
- unset($search);
105
- unset($get_php_ini_path);
106
 
107
- return false;
 
 
 
 
108
  }
109
 
110
- /**
111
  * Returns the mysqldump path if the server is enabled to execute it otherwise false
112
  *
113
  * @return boolean|string
114
  */
115
  public static function getMySqlDumpPath()
116
  {
117
-
118
  //Is shell_exec possible
119
  if (!DUP_Util::hasShellExec()) {
120
  return false;
@@ -123,21 +124,20 @@ class DUP_DB extends wpdb
123
  $custom_mysqldump_path = DUP_Settings::Get('package_mysqldump_path');
124
  $custom_mysqldump_path = (strlen($custom_mysqldump_path)) ? $custom_mysqldump_path : '';
125
 
126
- //Common Windows Paths
127
  if (DUP_Util::isWindows()) {
128
  $paths = array(
129
  $custom_mysqldump_path,
130
- self::getWindowsMySqlDumpRealPath(),
131
  'C:/xampp/mysql/bin/mysqldump.exe',
132
  'C:/Program Files/xampp/mysql/bin/mysqldump',
133
  'C:/Program Files/MySQL/MySQL Server 6.0/bin/mysqldump',
134
  'C:/Program Files/MySQL/MySQL Server 5.5/bin/mysqldump',
135
  'C:/Program Files/MySQL/MySQL Server 5.4/bin/mysqldump',
136
- 'C:/Program Files/MySQL/MySQL Server 5.1/bin/mysqldump',
137
- 'C:/Program Files/MySQL/MySQL Server 5.0/bin/mysqldump',
138
  );
139
 
140
- //Common Linux Paths
141
  } else {
142
  $path1 = '';
143
  $path2 = '';
@@ -161,15 +161,25 @@ class DUP_DB extends wpdb
161
  '/usr/bin/mysqldump',
162
  '/opt/local/lib/mysql6/bin/mysqldump',
163
  '/opt/local/lib/mysql5/bin/mysqldump',
164
- '/opt/local/lib/mysql4/bin/mysqldump',
165
  );
166
  }
167
 
168
- // Find the one which works
 
 
169
  foreach ($paths as $path) {
170
- if(file_exists($path)) {
171
- if (DUP_Util::isExecutable($path))
 
 
 
 
 
 
 
 
172
  return $path;
 
173
  }
174
  }
175
 
78
  *
79
  * @return boolean|string
80
  */
81
+ public static function getWindowsMySqlDumpRealPath()
82
+ {
83
+ try {
84
+ if (function_exists('php_ini_loaded_file')) {
85
+ $get_php_ini_path = php_ini_loaded_file();
86
+ if (@file_exists($get_php_ini_path)) {
87
+ $search = array(
88
+ dirname(dirname($get_php_ini_path)).'/mysql/bin/mysqldump.exe',
89
+ dirname(dirname(dirname($get_php_ini_path))).'/mysql/bin/mysqldump.exe',
90
+ dirname(dirname($get_php_ini_path)).'/mysql/bin/mysqldump',
91
+ dirname(dirname(dirname($get_php_ini_path))).'/mysql/bin/mysqldump',
92
+ );
93
+
94
+ foreach ($search as $mysqldump) {
95
+ if (@file_exists($mysqldump)) {
96
+ return str_replace("\\", "/", $mysqldump);
97
+ }
 
98
  }
99
  }
100
  }
 
101
 
102
+ unset($search);
103
+ unset($get_php_ini_path);
104
 
105
+ return false;
106
+
107
+ } catch(Exception $ex) {
108
+ return false;
109
+ }
110
  }
111
 
112
+ /**
113
  * Returns the mysqldump path if the server is enabled to execute it otherwise false
114
  *
115
  * @return boolean|string
116
  */
117
  public static function getMySqlDumpPath()
118
  {
 
119
  //Is shell_exec possible
120
  if (!DUP_Util::hasShellExec()) {
121
  return false;
124
  $custom_mysqldump_path = DUP_Settings::Get('package_mysqldump_path');
125
  $custom_mysqldump_path = (strlen($custom_mysqldump_path)) ? $custom_mysqldump_path : '';
126
 
127
+ //COMMON WINDOWS PATHS
128
  if (DUP_Util::isWindows()) {
129
  $paths = array(
130
  $custom_mysqldump_path,
131
+ self::getWindowsMySqlDumpRealPath(),
132
  'C:/xampp/mysql/bin/mysqldump.exe',
133
  'C:/Program Files/xampp/mysql/bin/mysqldump',
134
  'C:/Program Files/MySQL/MySQL Server 6.0/bin/mysqldump',
135
  'C:/Program Files/MySQL/MySQL Server 5.5/bin/mysqldump',
136
  'C:/Program Files/MySQL/MySQL Server 5.4/bin/mysqldump',
137
+ 'C:/wamp64/bin/mysql/mysql5.7.21/bin',
 
138
  );
139
 
140
+ //COMMON LINUX PATHS
141
  } else {
142
  $path1 = '';
143
  $path2 = '';
161
  '/usr/bin/mysqldump',
162
  '/opt/local/lib/mysql6/bin/mysqldump',
163
  '/opt/local/lib/mysql5/bin/mysqldump',
 
164
  );
165
  }
166
 
167
+ //Try to find a path that works. With open_basedir enabled, the file_exists may not work on some systems
168
+ //So we fallback and try to use exec as a last resort
169
+ $exec_available = function_exists('exec');
170
  foreach ($paths as $path) {
171
+ if(@file_exists($path)) {
172
+ if (DUP_Util::isExecutable($path)) {
173
+ return $path;
174
+ }
175
+ } elseif ($exec_available) {
176
+ $out = array();
177
+ $rc = -1;
178
+ $cmd = $path . ' --help';
179
+ @exec($cmd, $out, $rc);
180
+ if ($rc === 0) {
181
  return $path;
182
+ }
183
  }
184
  }
185
 
classes/class.password.php ADDED
@@ -0,0 +1,228 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ #
3
+ # Portable PHP password hashing framework.
4
+ #
5
+ # Version 0.5 / genuine.
6
+ #
7
+ # Written by Solar Designer <solar at openwall.com> in 2004-2006 and placed in
8
+ # the public domain. Revised in subsequent years, still public domain.
9
+ #
10
+ # There's absolutely no warranty.
11
+ #
12
+ # The homepage URL for this framework is:
13
+ #
14
+ # http://www.openwall.com/phpass/
15
+ #
16
+ # Please be sure to update the Version line if you edit this file in any way.
17
+ # It is suggested that you leave the main version number intact, but indicate
18
+ # your project name (after the slash) and add your own revision information.
19
+ #
20
+ # Please do not change the "private" password hashing method implemented in
21
+ # here, thereby making your hashes incompatible. However, if you must, please
22
+ # change the hash type identifier (the "$P$") to something different.
23
+ #
24
+ # Obviously, since this code is in the public domain, the above are not
25
+ # requirements (there can be none), but merely suggestions.
26
+ #
27
+ class DUP_PasswordHash
28
+ {
29
+
30
+ var $itoa64;
31
+ var $iteration_count_log2;
32
+ var $portable_hashes;
33
+ var $random_state;
34
+
35
+ function __construct($iteration_count_log2, $portable_hashes)
36
+ {
37
+ $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
38
+
39
+ if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31)
40
+ $iteration_count_log2 = 8;
41
+ $this->iteration_count_log2 = $iteration_count_log2;
42
+
43
+ $this->portable_hashes = $portable_hashes;
44
+
45
+ $this->random_state = microtime();
46
+ if (function_exists('getmypid'))
47
+ $this->random_state .= getmypid();
48
+ }
49
+
50
+ function PasswordHash($iteration_count_log2, $portable_hashes)
51
+ {
52
+ self::__construct($iteration_count_log2, $portable_hashes);
53
+ }
54
+
55
+ function get_random_bytes($count)
56
+ {
57
+ $output = '';
58
+ if (@is_readable('/dev/urandom') &&
59
+ ($fh = @fopen('/dev/urandom', 'rb'))) {
60
+ $output = fread($fh, $count);
61
+ fclose($fh);
62
+ }
63
+
64
+ if (strlen($output) < $count) {
65
+ $output = '';
66
+ for ($i = 0; $i < $count; $i += 16) {
67
+ $this->random_state =
68
+ md5(microtime() . $this->random_state);
69
+ $output .= md5($this->random_state, TRUE);
70
+ }
71
+ $output = substr($output, 0, $count);
72
+ }
73
+
74
+ return $output;
75
+ }
76
+
77
+ function encode64($input, $count)
78
+ {
79
+ $output = '';
80
+ $i = 0;
81
+ do {
82
+ $value = ord($input[$i++]);
83
+ $output .= $this->itoa64[$value & 0x3f];
84
+ if ($i < $count)
85
+ $value |= ord($input[$i]) << 8;
86
+ $output .= $this->itoa64[($value >> 6) & 0x3f];
87
+ if ($i++ >= $count)
88
+ break;
89
+ if ($i < $count)
90
+ $value |= ord($input[$i]) << 16;
91
+ $output .= $this->itoa64[($value >> 12) & 0x3f];
92
+ if ($i++ >= $count)
93
+ break;
94
+ $output .= $this->itoa64[($value >> 18) & 0x3f];
95
+ } while ($i < $count);
96
+
97
+ return $output;
98
+ }
99
+
100
+ function gensalt_private($input)
101
+ {
102
+ $output = '$P$';
103
+ $output .= $this->itoa64[min($this->iteration_count_log2 +
104
+ ((PHP_VERSION >= '5') ? 5 : 3), 30)];
105
+ $output .= $this->encode64($input, 6);
106
+
107
+ return $output;
108
+ }
109
+
110
+ function crypt_private($password, $setting)
111
+ {
112
+ $output = '*0';
113
+ if (substr($setting, 0, 2) === $output)
114
+ $output = '*1';
115
+
116
+ $id = substr($setting, 0, 3);
117
+ # We use "$P$", phpBB3 uses "$H$" for the same thing
118
+ if ($id !== '$P$' && $id !== '$H$')
119
+ return $output;
120
+
121
+ $count_log2 = strpos($this->itoa64, $setting[3]);
122
+ if ($count_log2 < 7 || $count_log2 > 30)
123
+ return $output;
124
+
125
+ $count = 1 << $count_log2;
126
+
127
+ $salt = substr($setting, 4, 8);
128
+ if (strlen($salt) !== 8)
129
+ return $output;
130
+
131
+ # We were kind of forced to use MD5 here since it's the only
132
+ # cryptographic primitive that was available in all versions
133
+ # of PHP in use. To implement our own low-level crypto in PHP
134
+ # would have resulted in much worse performance and
135
+ # consequently in lower iteration counts and hashes that are
136
+ # quicker to crack (by non-PHP code).
137
+ $hash = md5($salt . $password, TRUE);
138
+ do {
139
+ $hash = md5($hash . $password, TRUE);
140
+ } while (--$count);
141
+
142
+ $output = substr($setting, 0, 12);
143
+ $output .= $this->encode64($hash, 16);
144
+
145
+ return $output;
146
+ }
147
+
148
+ function gensalt_blowfish($input)
149
+ {
150
+ # This one needs to use a different order of characters and a
151
+ # different encoding scheme from the one in encode64() above.
152
+ # We care because the last character in our encoded string will
153
+ # only represent 2 bits. While two known implementations of
154
+ # bcrypt will happily accept and correct a salt string which
155
+ # has the 4 unused bits set to non-zero, we do not want to take
156
+ # chances and we also do not want to waste an additional byte
157
+ # of entropy.
158
+ $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
159
+
160
+ $output = '$2a$';
161
+ $output .= chr(ord('0') + $this->iteration_count_log2 / 10);
162
+ $output .= chr(ord('0') + $this->iteration_count_log2 % 10);
163
+ $output .= '$';
164
+
165
+ $i = 0;
166
+ do {
167
+ $c1 = ord($input[$i++]);
168
+ $output .= $itoa64[$c1 >> 2];
169
+ $c1 = ($c1 & 0x03) << 4;
170
+ if ($i >= 16) {
171
+ $output .= $itoa64[$c1];
172
+ break;
173
+ }
174
+
175
+ $c2 = ord($input[$i++]);
176
+ $c1 |= $c2 >> 4;
177
+ $output .= $itoa64[$c1];
178
+ $c1 = ($c2 & 0x0f) << 2;
179
+
180
+ $c2 = ord($input[$i++]);
181
+ $c1 |= $c2 >> 6;
182
+ $output .= $itoa64[$c1];
183
+ $output .= $itoa64[$c2 & 0x3f];
184
+ } while (1);
185
+
186
+ return $output;
187
+ }
188
+
189
+ function HashPassword($password)
190
+ {
191
+ $random = '';
192
+
193
+ if (CRYPT_BLOWFISH === 1 && !$this->portable_hashes) {
194
+ $random = $this->get_random_bytes(16);
195
+ $hash =
196
+ crypt($password, $this->gensalt_blowfish($random));
197
+ if (strlen($hash) === 60)
198
+ return $hash;
199
+ }
200
+
201
+ if (strlen($random) < 6)
202
+ $random = $this->get_random_bytes(6);
203
+ $hash =
204
+ $this->crypt_private($password,
205
+ $this->gensalt_private($random));
206
+ if (strlen($hash) === 34)
207
+ return $hash;
208
+
209
+ # Returning '*' on error is safe here, but would _not_ be safe
210
+ # in a crypt(3)-like function used _both_ for generating new
211
+ # hashes and for validating passwords against existing hashes.
212
+ return '*';
213
+ }
214
+
215
+ function CheckPassword($password, $stored_hash)
216
+ {
217
+ $hash = $this->crypt_private($password, $stored_hash);
218
+ if ($hash[0] === '*')
219
+ $hash = crypt($password, $stored_hash);
220
+
221
+ # This is not constant-time. In order to keep the code simple,
222
+ # for timing safety we currently rely on the salts being
223
+ # unpredictable, which they are at least in the non-fallback
224
+ # cases (that is, when we use /dev/urandom and bcrypt).
225
+ return $hash === $stored_hash;
226
+ }
227
+ }
228
+
classes/package/class.pack.database.php CHANGED
@@ -227,7 +227,6 @@ class DUP_Database
227
  $tables = $wpdb->get_col('SHOW TABLES');
228
  $filterTables = isset($this->FilterTables) ? explode(',', $this->FilterTables) : null;
229
  $tblAllCount = count($tables);
230
- $tblFilterOn = ($this->FilterOn) ? 'ON' : 'OFF';
231
 
232
  if (is_array($filterTables) && $this->FilterOn) {
233
  foreach ($tables as $key => $val) {
@@ -290,7 +289,6 @@ class DUP_Database
290
 
291
  $filterTables = isset($this->FilterTables) ? explode(',', $this->FilterTables) : null;
292
  $tblAllCount = count($tables);
293
- $tblFilterOn = ($this->FilterOn) ? 'ON' : 'OFF';
294
  $qryLimit = DUP_Settings::Get('package_phpdump_qrylimit');
295
 
296
  if (is_array($filterTables) && $this->FilterOn) {
227
  $tables = $wpdb->get_col('SHOW TABLES');
228
  $filterTables = isset($this->FilterTables) ? explode(',', $this->FilterTables) : null;
229
  $tblAllCount = count($tables);
 
230
 
231
  if (is_array($filterTables) && $this->FilterOn) {
232
  foreach ($tables as $key => $val) {
289
 
290
  $filterTables = isset($this->FilterTables) ? explode(',', $this->FilterTables) : null;
291
  $tblAllCount = count($tables);
 
292
  $qryLimit = DUP_Settings::Get('package_phpdump_qrylimit');
293
 
294
  if (is_array($filterTables) && $this->FilterOn) {
classes/package/class.pack.installer.php CHANGED
@@ -1,5 +1,6 @@
1
  <?php
2
  if (!defined('DUPLICATOR_VERSION')) exit; // Exit if accessed directly
 
3
 
4
  class DUP_Installer
5
  {
@@ -10,6 +11,8 @@ class DUP_Installer
10
  public $OptsDBPort;
11
  public $OptsDBName;
12
  public $OptsDBUser;
 
 
13
  //PROTECTED
14
  protected $Package;
15
 
@@ -63,11 +66,14 @@ class DUP_Installer
63
  "classes/class.db.php" => "@@CLASS.DB.PHP@@",
64
  "classes/class.logging.php" => "@@CLASS.LOGGING.PHP@@",
65
  "classes/class.engine.php" => "@@CLASS.ENGINE.PHP@@",
 
66
  "classes/config/class.conf.wp.php" => "@@CLASS.CONF.WP.PHP@@",
67
  "classes/config/class.conf.srv.php" => "@@CLASS.CONF.SRV.PHP@@",
 
68
  "ctrls/ctrl.step1.php" => "@@CTRL.STEP1.PHP@@",
69
  "ctrls/ctrl.step2.php" => "@@CTRL.STEP2.PHP@@",
70
  "ctrls/ctrl.step3.php" => "@@CTRL.STEP3.PHP@@",
 
71
  "view.step1.php" => "@@VIEW.STEP1.PHP@@",
72
  "view.step2.php" => "@@VIEW.STEP2.PHP@@",
73
  "view.step3.php" => "@@VIEW.STEP3.PHP@@",
@@ -139,6 +145,9 @@ class DUP_Installer
139
 
140
  DUP_Log::Info("PACK SIZE: {$this->Package->Size}");
141
 
 
 
 
142
  $replace_items = Array(
143
  //COMPARE VALUES
144
  "fwrite_created" => $this->Package->Created,
@@ -151,13 +160,15 @@ class DUP_Installer
151
  "fwrite_url_old" => get_option('siteurl'),
152
  "fwrite_archive_name" => "{$this->Package->NameHash}_archive.zip",
153
  "fwrite_archive_onlydb" => $this->Package->Archive->ExportOnlyDB,
154
- "fwrite_package_notes" => $this->Package->Notes,
155
- "fwrite_package_size" => $this->Package->Archive->Size,
156
- "fwrite_secure_name" => $this->Package->NameHash,
157
- "fwrite_dbhost" => $this->Package->Installer->OptsDBHost,
158
- "fwrite_dbport" => $this->Package->Installer->OptsDBPort,
159
- "fwrite_dbname" => $this->Package->Installer->OptsDBName,
160
- "fwrite_dbuser" => $this->Package->Installer->OptsDBUser,
 
 
161
  "fwrite_dbpass" => '',
162
  "fwrite_wp_tableprefix" => $wpdb->prefix,
163
  "fwrite_opts_delete" => json_encode($deleteOpts),
1
  <?php
2
  if (!defined('DUPLICATOR_VERSION')) exit; // Exit if accessed directly
3
+ require_once(DUPLICATOR_PLUGIN_PATH . '/classes/class.password.php');
4
 
5
  class DUP_Installer
6
  {
11
  public $OptsDBPort;
12
  public $OptsDBName;
13
  public $OptsDBUser;
14
+ public $OptsSecureOn = 0;
15
+ public $OptsSecurePass;
16
  //PROTECTED
17
  protected $Package;
18
 
66
  "classes/class.db.php" => "@@CLASS.DB.PHP@@",
67
  "classes/class.logging.php" => "@@CLASS.LOGGING.PHP@@",
68
  "classes/class.engine.php" => "@@CLASS.ENGINE.PHP@@",
69
+ "classes/class.http.php" => "@@CLASS.HTTP.PHP@@",
70
  "classes/config/class.conf.wp.php" => "@@CLASS.CONF.WP.PHP@@",
71
  "classes/config/class.conf.srv.php" => "@@CLASS.CONF.SRV.PHP@@",
72
+ "classes/class.password.php" => "@@CLASS.PASSWORD.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.init1.php" => "@@VIEW.INIT1.PHP@@",
77
  "view.step1.php" => "@@VIEW.STEP1.PHP@@",
78
  "view.step2.php" => "@@VIEW.STEP2.PHP@@",
79
  "view.step3.php" => "@@VIEW.STEP3.PHP@@",
145
 
146
  DUP_Log::Info("PACK SIZE: {$this->Package->Size}");
147
 
148
+ $hasher = new DUP_PasswordHash(8, FALSE);
149
+ $pass_hash = $hasher->HashPassword($this->Package->Installer->OptsSecurePass);
150
+
151
  $replace_items = Array(
152
  //COMPARE VALUES
153
  "fwrite_created" => $this->Package->Created,
160
  "fwrite_url_old" => get_option('siteurl'),
161
  "fwrite_archive_name" => "{$this->Package->NameHash}_archive.zip",
162
  "fwrite_archive_onlydb" => $this->Package->Archive->ExportOnlyDB,
163
+ "fwrite_package_notes" => $this->Package->Notes,
164
+ "fwrite_package_size" => $this->Package->Archive->Size,
165
+ "fwrite_secure_name" => $this->Package->NameHash,
166
+ "fwrite_dbhost" => $this->Package->Installer->OptsDBHost,
167
+ "fwrite_dbport" => $this->Package->Installer->OptsDBPort,
168
+ "fwrite_dbname" => $this->Package->Installer->OptsDBName,
169
+ "fwrite_dbuser" => $this->Package->Installer->OptsDBUser,
170
+ "fwrite_secureon" => $this->Package->Installer->OptsSecureOn,
171
+ "fwrite_securepass" => $pass_hash,
172
  "fwrite_dbpass" => '',
173
  "fwrite_wp_tableprefix" => $wpdb->prefix,
174
  "fwrite_opts_delete" => json_encode($deleteOpts),
classes/package/class.pack.php CHANGED
@@ -335,10 +335,12 @@ class DUP_Package
335
  $this->Archive->FilterFiles = DUP_Util::escSanitizeTextAreaField($filter_files);
336
  $this->Archive->FilterExts = str_replace(array('.', ' '), '', DUP_Util::escSanitizeTextAreaField($filter_exts));
337
  //INSTALLER
338
- $this->Installer->OptsDBHost = DUP_Util::escSanitizeTextField($post['dbhost']);
339
- $this->Installer->OptsDBPort = DUP_Util::escSanitizeTextField($post['dbport']);
340
- $this->Installer->OptsDBName = DUP_Util::escSanitizeTextField($post['dbname']);
341
- $this->Installer->OptsDBUser = DUP_Util::escSanitizeTextField($post['dbuser']);
 
 
342
  //DATABASE
343
  $this->Database->FilterOn = isset($post['dbfilter-on']) ? 1 : 0;
344
  $this->Database->FilterTables = esc_html($tablelist);
335
  $this->Archive->FilterFiles = DUP_Util::escSanitizeTextAreaField($filter_files);
336
  $this->Archive->FilterExts = str_replace(array('.', ' '), '', DUP_Util::escSanitizeTextAreaField($filter_exts));
337
  //INSTALLER
338
+ $this->Installer->OptsDBHost = DUP_Util::escSanitizeTextField($post['dbhost']);
339
+ $this->Installer->OptsDBPort = DUP_Util::escSanitizeTextField($post['dbport']);
340
+ $this->Installer->OptsDBName = DUP_Util::escSanitizeTextField($post['dbname']);
341
+ $this->Installer->OptsDBUser = DUP_Util::escSanitizeTextField($post['dbuser']);
342
+ $this->Installer->OptsSecureOn = isset($post['secure-on']) ? 1 : 0;
343
+ $this->Installer->OptsSecurePass = DUP_Util::installerScramble($post['secure-pass']);
344
  //DATABASE
345
  $this->Database->FilterOn = isset($post['dbfilter-on']) ? 1 : 0;
346
  $this->Database->FilterTables = esc_html($tablelist);
classes/ui/class.ui.notice.php CHANGED
@@ -47,7 +47,7 @@ class DUP_UI_Notice
47
  if(get_option("duplicator_exe_safe_mode", 0) > 0 ){
48
  $safe_msg1 = __('Safe Mode:', 'duplicator');
49
  $safe_msg2 = __('During the install safe mode was enabled deactivating all plugins.<br/> Please be sure to ', 'duplicator');
50
- $safe_msg3 = __('re-activate the plugins', 'duplicator');
51
  $safe_html = "<div class='notice-safemode'><b>{$safe_msg1}</b><br/>{$safe_msg2} <a href='plugins.php'>{$safe_msg3}</a>!</div><br/>";
52
  }
53
 
@@ -94,4 +94,4 @@ class DUP_UI_Notice
94
  echo "<script>window.location = '{$location}';</script>";
95
  die(__('Invalid token permissions to perform this request.', 'duplicator'));
96
  }
97
- }
47
  if(get_option("duplicator_exe_safe_mode", 0) > 0 ){
48
  $safe_msg1 = __('Safe Mode:', 'duplicator');
49
  $safe_msg2 = __('During the install safe mode was enabled deactivating all plugins.<br/> Please be sure to ', 'duplicator');
50
+ $safe_msg3 = __('reactivate the plugins', 'duplicator');
51
  $safe_html = "<div class='notice-safemode'><b>{$safe_msg1}</b><br/>{$safe_msg2} <a href='plugins.php'>{$safe_msg3}</a>!</div><br/>";
52
  }
53
 
94
  echo "<script>window.location = '{$location}';</script>";
95
  die(__('Invalid token permissions to perform this request.', 'duplicator'));
96
  }
97
+ }
classes/utilities/class.u.php CHANGED
@@ -6,7 +6,7 @@
6
  * @link http://www.php-fig.org/psr/psr-2
7
  *
8
  * @package Duplicator
9
- * @subpackage classes/utilites
10
  * @copyright (c) 2017, Snapcreek LLC
11
  * @since 1.1.0
12
  *
@@ -18,6 +18,8 @@ if (!defined('DUPLICATOR_VERSION')) {
18
  exit;
19
  }
20
 
 
 
21
  class DUP_Util
22
  {
23
  /**
@@ -132,7 +134,7 @@ class DUP_Util
132
 
133
  /**
134
  * PHP_SAPI for fcgi requires a data flush of at least 256
135
- * bytes every 40 seconds or else it forces a script hault
136
  *
137
  * @return string A series of 256 space characters
138
  */
@@ -154,7 +156,7 @@ class DUP_Util
154
  }
155
 
156
  /**
157
- * Returns the last N lines of a file. Equivelent to tail command
158
  *
159
  * @param string $filepath The full path to the file to be tailed
160
  * @param int $lines The number of lines to return with each tail call
@@ -480,8 +482,34 @@ class DUP_Util
480
  }
481
  }
482
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
483
  /**
484
- * Creates the snapshot directory if it doesn't already exisit
485
  *
486
  * @return null
487
  */
6
  * @link http://www.php-fig.org/psr/psr-2
7
  *
8
  * @package Duplicator
9
+ * @subpackage classes/utilities
10
  * @copyright (c) 2017, Snapcreek LLC
11
  * @since 1.1.0
12
  *
18
  exit;
19
  }
20
 
21
+ //require_once (DUPLICATOR_PLUGIN_PATH.'classes/class.crypt.php');
22
+
23
  class DUP_Util
24
  {
25
  /**
134
 
135
  /**
136
  * PHP_SAPI for fcgi requires a data flush of at least 256
137
+ * bytes every 40 seconds or else it forces a script halt
138
  *
139
  * @return string A series of 256 space characters
140
  */
156
  }
157
 
158
  /**
159
+ * Returns the last N lines of a file. equivalent to tail command
160
  *
161
  * @param string $filepath The full path to the file to be tailed
162
  * @param int $lines The number of lines to return with each tail call
482
  }
483
  }
484
 
485
+ /**
486
+ * Wrap to prevent malware scanners from reporting false/positive
487
+ * Switched from our old method to avoid WordFence reporting a false positive
488
+ *
489
+ * @param string $string The string to decrypt i.e. base64_decode
490
+ *
491
+ * @return string Returns the string base64 decoded
492
+ */
493
+ public static function installerUnscramble($string)
494
+ {
495
+ return base64_decode($string);
496
+ }
497
+
498
+ /**
499
+ * Wrap to prevent malware scanners from reporting false/positive
500
+ * Switched from our old method to avoid WordFence reporting a false positive
501
+ *
502
+ * @param string $string The string to decrypt i.e. base64_encode
503
+ *
504
+ * @return string Returns the string base64 encode
505
+ */
506
+ public static function installerScramble($string)
507
+ {
508
+ return base64_encode($string);
509
+ }
510
+
511
  /**
512
+ * Creates the snapshot directory if it doesn't already exist
513
  *
514
  * @return null
515
  */
define.php CHANGED
@@ -2,8 +2,8 @@
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
- define('DUPLICATOR_VERSION', '1.2.40');
6
- define('DUPLICATOR_HOMEPAGE', 'http://lifeinthegrid.com/labs/duplicator');
7
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
8
  define('DUPLICATOR_SITE_URL', get_site_url());
9
 
2
  //Prevent directly browsing to the file
3
  if (function_exists('plugin_dir_url'))
4
  {
5
+ define('DUPLICATOR_VERSION', '1.2.42');
6
+ define('DUPLICATOR_HOMEPAGE', 'https://snapcreek.com/duplicator/duplicator-free/');
7
  define('DUPLICATOR_PLUGIN_URL', plugin_dir_url(__FILE__));
8
  define('DUPLICATOR_SITE_URL', get_site_url());
9
 
duplicator.php CHANGED
@@ -1,9 +1,9 @@
1
  <?php
2
  /** ===============================================================================
3
  Plugin Name: Duplicator
4
- Plugin URI: http://www.lifeinthegrid.com/duplicator/
5
  Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
6
- Version: 1.2.40
7
  Author: Snap Creek
8
  Author URI: http://www.snapcreek.com/duplicator/
9
  Text Domain: duplicator
@@ -25,7 +25,6 @@
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
 
@@ -109,8 +108,8 @@ if (is_admin() == true)
109
  }
110
 
111
  /**
112
- * Hooked into `register_deactivation_hook`. Routines used to deactivae the plugin
113
- * For uninstall see uninstall.php Wordpress by default will call the uninstall.php file
114
  *
115
  * @access global
116
  * @return null
@@ -163,9 +162,10 @@ if (is_admin() == true)
163
  wp_register_style('dup-font-awesome', DUPLICATOR_PLUGIN_URL . 'assets/css/font-awesome.min.css', null, '4.7.0');
164
  wp_register_style('dup-plugin-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, DUPLICATOR_VERSION);
165
  wp_register_style('dup-jquery-qtip',DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.css', null, '2.2.1');
 
166
  /* JS */
167
  wp_register_script('dup-handlebars', DUPLICATOR_PLUGIN_URL . 'assets/js/handlebars.min.js', array('jquery'), '4.0.10');
168
- wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley-standalone.min.js', array('jquery'), '1.1.18');
169
  wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
170
  }
171
 
@@ -265,7 +265,6 @@ if (is_admin() == true)
265
  wp_enqueue_script('jquery-ui-progressbar');
266
  wp_enqueue_script('dup-parsley');
267
  wp_enqueue_script('dup-jquery-qtip');
268
-
269
  }
270
 
271
  /**
@@ -280,6 +279,7 @@ if (is_admin() == true)
280
  wp_enqueue_style('dup-font-awesome');
281
  wp_enqueue_style('dup-plugin-style');
282
  wp_enqueue_style('dup-jquery-qtip');
 
283
  }
284
 
285
 
1
  <?php
2
  /** ===============================================================================
3
  Plugin Name: Duplicator
4
+ Plugin URI: https://snapcreek.com/duplicator/duplicator-free/
5
  Description: Migrate and backup a copy of your WordPress files and database. Duplicate and move a site from one location to another quickly.
6
+ Version: 1.2.42
7
  Author: Snap Creek
8
  Author URI: http://www.snapcreek.com/duplicator/
9
  Text Domain: duplicator
25
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
26
 
27
  SOURCE CONTRIBUTORS:
 
28
  https://github.com/interconnectit/Search-Replace-DB/
29
  ================================================================================ */
30
 
108
  }
109
 
110
  /**
111
+ * Hooked into `register_deactivation_hook`. Routines used to deactivate the plugin
112
+ * For uninstall see uninstall.php WordPress by default will call the uninstall.php file
113
  *
114
  * @access global
115
  * @return null
162
  wp_register_style('dup-font-awesome', DUPLICATOR_PLUGIN_URL . 'assets/css/font-awesome.min.css', null, '4.7.0');
163
  wp_register_style('dup-plugin-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, DUPLICATOR_VERSION);
164
  wp_register_style('dup-jquery-qtip',DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.css', null, '2.2.1');
165
+ wp_register_style('dup-parsley-style', DUPLICATOR_PLUGIN_URL . 'assets/css/style.css', null, '2.3.5');
166
  /* JS */
167
  wp_register_script('dup-handlebars', DUPLICATOR_PLUGIN_URL . 'assets/js/handlebars.min.js', array('jquery'), '4.0.10');
168
+ wp_register_script('dup-parsley', DUPLICATOR_PLUGIN_URL . 'assets/js/parsley.min.js', array('jquery'), '2.3.5');
169
  wp_register_script('dup-jquery-qtip', DUPLICATOR_PLUGIN_URL . 'assets/js/jquery.qtip/jquery.qtip.min.js', array('jquery'), '2.2.1');
170
  }
171
 
265
  wp_enqueue_script('jquery-ui-progressbar');
266
  wp_enqueue_script('dup-parsley');
267
  wp_enqueue_script('dup-jquery-qtip');
 
268
  }
269
 
270
  /**
279
  wp_enqueue_style('dup-font-awesome');
280
  wp_enqueue_style('dup-plugin-style');
281
  wp_enqueue_style('dup-jquery-qtip');
282
+ wp_enqueue_style('dup-parsley-style');
283
  }
284
 
285
 
installer/build/assets/inc.css.php CHANGED
@@ -1,228 +1,246 @@
1
- <style>
2
- body {font-family:Verdana,Arial,sans-serif; font-size:13px;}
3
- fieldset {border:1px solid silver; border-radius:5px; padding:10px}
4
- h3 {margin:1px; padding:1px; font-size:13px;}
5
- a {color:#222}
6
- a:hover{color:gray}
7
- input[type=text], input[type=password], select {width:97%; border-radius:2px; border:1px solid silver; padding:4px; font-family:Verdana,Arial,sans-serif;}
8
- select {padding-left:0; width:99%}
9
- select:disabled {background:#EBEBE4}
10
- input.readonly {background-color:#efefef;}
11
-
12
- /* ============================
13
- COMMON VIEWS
14
- ============================ */
15
- 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:13px}
16
- div#content-inner {padding:10px 25px; min-height:550px}
17
- form.content-form {min-height:550px; position:relative; line-height:17px}
18
- 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 }
19
- 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}
20
-
21
- /* WIZARD STEPS */
22
- 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; font-weight:bold;}
23
- .dupx-header-version {white-space:nowrap; color:#777; font-size:11px; font-style:italic; text-align:right; padding:0 15px 5px 0; line-height:14px; font-weight:normal;}
24
- .dupx-header-version a {color:#555;}
25
- div.dupx-logfile-link {float:right; font-weight:normal; font-size:11px; font-style:italic}
26
- div#progress-area {padding:5px; margin:150px 0 0 0px; text-align:center;}
27
- div#ajaxerr-data {padding:5px; height:350px; width:99%; border:1px solid silver; border-radius:5px; background-color:#efefef; font-size:13px; overflow-y:scroll; line-height:24px}
28
-
29
- /*TITLE HEADERS */
30
- div.hdr-main {font-size:22px; padding:0 0 5px 0; border-bottom:1px solid #D3D3D3; font-weight:bold; margin:15px 0 20px 0;}
31
- div.hdr-main span.step {color:#DB4B38}
32
- div.hdr-sub1 {font-size:18px; margin-bottom:5px;border:1px solid #D3D3D3;padding:7px; background-color:#f9f9f9; font-weight:bold; border-radius:4px}
33
- div.hdr-sub1 a {cursor:pointer; text-decoration: none !important}
34
- div.hdr-sub1:hover {cursor:pointer; background-color:#f1f1f1; border:1px solid #dcdcdc; }
35
- div.hdr-sub1:hover a{color:#000}
36
- div.hdr-sub2 {font-size:15px; padding:2px 2px 2px 0; border-bottom:1px solid #D3D3D3; font-weight:bold; margin-bottom:5px; border:none}
37
- div.hdr-sub3 {font-size:15px; padding:2px 2px 2px 0; border-bottom:1px solid #D3D3D3; font-weight:bold; margin-bottom:5px;}
38
- div.hdr-sub4 {font-size:15px; padding:7px; border:1px solid #D3D3D3;; font-weight:bold; background-color:#e9e9e9;}
39
- div.hdr-sub4:hover {background-color:#dfdfdf; cursor:pointer}
40
-
41
- /* BUTTONS */
42
- div.dupx-footer-buttons {position:absolute; bottom:10px; padding:10px; right:0}
43
- div.dupx-footer-buttons input:hover, button:hover {border:1px solid #000}
44
- div.dupx-footer-buttons input[disabled=disabled]{background-color:#F4F4F4; color:silver; border:1px solid silver;}
45
- div.dupx-footer-buttons button[disabled]{background-color:#F4F4F4; color:silver; border:1px solid silver;}
46
- button.default-btn, input.default-btn {
47
- cursor:pointer; color:#fff; font-size:16px; border-radius:5px; padding:8px 25px 6px 25px;
48
- background-color:#13659C; border:1px solid gray;
49
- }
50
- table.dupx-opts {width:100%; border:0px;}
51
- table.dupx-opts td{white-space:nowrap; padding:3px;}
52
- table.dupx-opts td:first-child{width:125px; font-weight: bold}
53
- table.dupx-advopts td:first-child{width:125px; font-weight:bold}
54
- table.dupx-advopts td label{min-width:60px; display:inline-block; cursor:pointer}
55
-
56
- .dupx-pass {display:inline-block; color:green;}
57
- .dupx-fail {display:inline-block; color:#AF0000;}
58
- .dupx-notice {display:inline-block; color:#000;}
59
- div.dupx-ui-error {padding-top:2px; font-size:13px; line-height: 20px}
60
-
61
- /*Dialog Info */
62
- div.dlg-serv-info {line-height:22px; font-size:12px; margin:0}
63
- div.dlg-serv-info div.info-txt {text-align: center; font-size:11px; font-style:italic}
64
- div.dlg-serv-info label {display:inline-block; width:175px; font-weight: bold}
65
- div.dlg-serv-info div.hdr {background-color: #dfdfdf; font-weight: bold; margin-top:5px; border-radius: 4px; padding:2px 5px 2px 5px; border: 1px solid silver; font-size: 16px}
66
- div#modal-window div.modal-title {background-color:#D0D0D0}
67
- div#modal-window div.modal-text {padding-top:10px !important}
68
- div.archive-onlydb {color:#DB4B38; font-weight:normal; position:absolute; top:5px; right:20px; font-style:italic; font-size:11px}
69
-
70
- /* ======================================
71
- STEP 1 VIEW
72
- ====================================== */
73
- table.s1-archive-local {width:100%}
74
- table.s1-archive-local td {padding:4px 4px 4px 4px}
75
- table.s1-archive-local td:first-child {font-weight:bold; width:55px}
76
- div#s1-area-sys-setup {padding:5px 0 0 10px}
77
- div#s1-area-sys-setup div.info-top {text-align:center; font-style:italic; font-size:11px; padding:0 5px 5px 5px}
78
- table.s1-checks-area {width:100%; margin:0; padding:0}
79
- table.s1-checks-area td.title {font-size:16px; width:100%}
80
- table.s1-checks-area td.title small {font-size:11px; font-weight:normal}
81
- table.s1-checks-area td.toggle {font-size:11px; margin-right:7px; font-weight:normal}
82
-
83
- div.s1-reqs {background-color:#efefef; border:1px solid silver; border-radius:5px; margin-top:-5px}
84
- div.s1-reqs div.header {background-color:#E0E0E0; color:#000; border-bottom: 1px solid silver; padding:2px; font-weight:bold }
85
- 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}
86
- 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; font-weight:bold}
87
- div.s1-reqs div.pass {background-color:green;}
88
- div.s1-reqs div.fail {background-color:maroon;}
89
- div.s1-reqs div.title {padding:4px; font-size:13px;}
90
- div.s1-reqs div.title:hover {background-color:#dfdfdf; cursor:pointer}
91
- div.s1-reqs div.info {padding:8px 8px 20px 8px; background-color:#fff; display:none; line-height:18px; font-size: 12px}
92
- div.s1-reqs div.info a {color:#485AA3;}
93
- div.s1-archive-failed-msg {padding:15px; border:1px dashed silver; font-size: 12px; border-radius:5px}
94
- div.s1-err-msg {padding:8px; border:1px dashed #999; margin:20px 0 20px 0px; border-radius:5px; color:maroon}
95
-
96
- /*Terms and Notices*/
97
- div#s1-warning-check label{cursor:pointer;}
98
- div#s1-warning-msg {padding:5px;font-size:12px; color:#333; line-height:14px;font-style:italic; overflow-y:scroll; height:250px; border:1px solid #dfdfdf; background:#fff; border-radius:3px}
99
- div#s1-warning-check {padding:3px; font-size:14px; font-weight:normal;}
100
- input#accept-warnings {height: 17px; width:17px}
101
-
102
- /* ======================================
103
- STEP 2 VIEW
104
- ====================================== */
105
- /*Toggle Buttons */
106
- div.s2-btngrp {text-align:center; margin:0 auto 10px auto}
107
- div.s2-btngrp input[type=button] {font-size:14px; padding:6px; width:120px; border:1px solid silver; cursor:pointer}
108
- div.s2-btngrp input[type=button]:first-child {border-radius:5px 0 0 5px; margin-right:-2px}
109
- div.s2-btngrp input[type=button]:last-child {border-radius:0 5px 5px 0; margin-left:-4px}
110
- div.s2-btngrp input[type=button].active {background-color:#13659C; color:#fff;}
111
- div.s2-btngrp input[type=button].in-active {background-color:#E4E4E4; }
112
- div.s2-btngrp input[type=button]:hover {border:1px solid #999}
113
-
114
- div.s2-modes {padding:0px 15px 0 0px;}
115
- div#s2-dbconn {margin:auto; text-align:center; margin:15px 0 10px 0px}
116
- input.s2-small-btn {height:25px; border:1px solid gray; border-radius:3px; cursor:pointer}
117
- table.s2-opts-dbhost td {padding:0; margin:0}
118
- input#s2-dbport-btn { width:80px}
119
- 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 }
120
- table.s2-db-test-dtls {text-align: left; margin: auto}
121
- table.s2-db-test-dtls td:first-child {font-weight: bold}
122
- div#s2-dbconn-test-msg {font-size:12px}
123
- 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}
124
- div#s2-dbconn-status div.warn-msg {text-align: left; padding:5px; margin:10px 0 10px 0}
125
- div#s2-dbconn-status div.warn-msg b{color:maroon}
126
-
127
- /*cPanel Tab */
128
- div#s2-cpnl-pane {display: none; min-height: 190px;}
129
- div.s2-gopro {color: black; margin-top:10px; padding:0 20px 10px 20px; border: 1px solid silver; background-color:#F6F6F6; border-radius: 4px}
130
- div.s2-gopro h2 {text-align: center; margin:10px}
131
- div.s2-gopro small {font-style: italic}
132
- div.s2-cpanel-login {padding:15px; color:#fff; text-align:center; margin:15px 5px 15px 5px; border:1px solid silver; border-radius:5px; background-color:#13659C; font-size:14px; line-height:22px}
133
- div.s2-cpanel-off {padding:15px; color:#fff; text-align:center; margin:15px 5px 15px 5px; border:1px solid silver; border-radius:5px; background-color:#b54949; font-size:14px; line-height:22px}
134
-
135
- /*Advanced Options & Warning Area*/
136
- div#s2-area-adv-opts label {cursor: pointer}
137
- 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}
138
- div#s2-warning-check {padding:5px; font-size:12px; font-weight:normal; font-style:italic;}
139
- div#s2-warning-check label {cursor: pointer; line-height: 14px}
140
- div#s2-warning-emptydb {display:none; color:#AF2222; margin:2px 0 0 0; font-size: 11px}
141
- table.s2-advopts label.radio {width:50px; display:inline-block}
142
-
143
- /* ======================================
144
- STEP 3 VIEW
145
- ====================================== */
146
- table.s3-table-inputs {width:100%; border:0px;}
147
- table.s3-table-inputs td{white-space:nowrap; padding:2px;}
148
- table.s3-table-inputs td:first-child{font-weight: bold; width:125px}
149
- div#s3-adv-opts {margin-top:5px; }
150
- div.s3-allnonelinks {font-size:11px; float:right;}
151
- select#plugins {width:330px; height:100px}
152
- select#tables {width:330px; height:100px}
153
-
154
- /* password indicator */
155
- .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}
156
- .top_testresult span{margin:0;}
157
- .top_shortPass{background:#edabab; border:1px solid #bc0000;display:block;}
158
- .top_badPass{background:#edabab;border:1px solid #bc0000;display:block;}
159
- .top_goodPass{background:#ffffe0; border:1px solid #e6db55; display:block;}
160
- .top_strongPass{background:#d3edab; border:1px solid #73bc00; display:block;}
161
-
162
- /* ======================================
163
- STEP 4 VIEW
164
- ====================================== */
165
- div.s4-final-title {color:#BE2323;font-size:18px}
166
- div.s4-connect {font-size:12px; text-align:center; font-style:italic; position:absolute; bottom:10px; padding:10px; width:100%; margin-top:20px}
167
- table.s4-report-results,
168
- table.s4-report-errs {border-collapse:collapse; border:1px solid #dfdfdf; }
169
- table.s4-report-errs td {text-align:center; width:33%}
170
- table.s4-report-results th, table.s4-report-errs th {background-color:#efefef; padding:0px; font-size:13px; padding:0px}
171
- 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}
172
- table.s4-report-results td:first-child {text-align:left; font-weight:bold; padding-left:3px}
173
- div.s4-err-title {background-color:#dfdfdf; font-weight: bold; margin:-3px 0 15px 0; padding:5px; border-radius:3px; font-size:13px}
174
-
175
- div.s4-err-msg {padding:8px; display:none; border:1px dashed #999; margin:10px 0 20px 0px; border-radius:5px;}
176
- 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; }
177
- div.s4-err-msg div.info-error{padding:7px; background-color:#f9c9c9; border:1px solid silver; border-radius:2px; font-size:12px; line-height:16px }
178
- div.s4-err-msg div.info-notice{padding:7px; background-color:#FCFEC5; border:1px solid silver; border-radius:2px; font-size:12px; line-height:16px;}
179
- table.s4-final-step {width:100%;}
180
- table.s4-final-step td {padding:5px 15px 5px 5px}
181
- table.s4-final-step td:first-child {white-space:nowrap;}
182
- div.s4-go-back {border-top:1px dotted #dfdfdf; margin:auto; font-style:italic; font-size:10px; color:#333}
183
- a.s4-final-btns {display: block; width:145px; padding:5px; line-height: 1.4; background-color:#F1F1F1; border:1px solid silver;
184
- color: #000; box-shadow: 5px 5px 5px -5px #949494; text-decoration: none; text-align: center; border-radius: 4px;
185
- }
186
- a.s4-final-btns:hover {background-color: #dfdfdf;}
187
- div.s4-gopro-btn {text-align:center; font-size:14px; margin:auto; width:200px; font-style: italic; font-weight:bold}
188
- div.s4-gopro-btn a{color:green}
189
-
190
-
191
- /* PARSLEY:Overrides*/
192
- input.parsley-error, textarea.parsley-error, select.parsley-error {
193
- color:#B94A48 !important; background-color:#F2DEDE !important; border:1px solid #EED3D7 !important;
194
- }
195
- ul.parsley-errors-list {margin:1px 0 0 -40px; list-style-type:none; font-size:10px}
196
-
197
- /* ============================
198
- STEP 5 HELP
199
- ============================ */
200
- div.help-target {float:right; font-size:11px}
201
- div#main-help a.help-target {display:block; margin:5px}
202
- div#main-help sup {font-size:11px; font-weight:normal; font-style:italic; color:blue}
203
- div.help-online {text-align:center; font-size:18px; padding:10px 0 0 0; line-height:24px}
204
- div.help {color:#555; font-style:italic; font-size:11px; padding:4px; border-top:1px solid #dfdfdf}
205
- div.help-page {padding:5px 0 0 5px}
206
- div.help-page fieldset {margin-bottom:25px}
207
- div#main-help {font-size:13px; line-height:17px}
208
- div#main-help h2 {background-color:#F1F1F1; border:1px solid silver; border-radius:4px; padding:10px; margin:26px 0 8px 0; font-size:22px; }
209
- div#main-help h3 {border-bottom:1px solid silver; padding:8px; margin:4px 0 8px 0; font-size:20px}
210
- div#main-help span.step {color:#DB4B38}
211
- table.help-opt {width: 100%; border: none; border-collapse: collapse; margin:5px 0 0 0;}
212
- table.help-opt td.section {background-color:#dfdfdf;}
213
- table.help-opt td, th {padding:7px; border:1px solid silver;}
214
- table.help-opt td:first-child {font-weight:bold; padding-right:10px; white-space:nowrap}
215
- table.help-opt th {background: #333; color: #fff;border:1px solid #333; padding:3px}
216
-
217
-
218
- <?php if ($GLOBALS['DUPX_DEBUG']) : ?>
219
- .dupx-debug {display:block; margin:4px 0 30px 0; font-size:11px;}
220
- .dupx-debug label {font-weight:bold; display:block; margin:6px 0 2px 0}
221
- .dupx-debug textarea {width:95%; height:100px; font-size:11px}
222
- <?php else : ?>
223
- .dupx-debug {display:none}
224
- <?php endif; ?>
225
- small.s3-warn {color: maroon;font-style: italic;}
226
- div.s4-warn {color: maroon;}
227
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  </style>
1
+ <style>
2
+ body {font-family:Verdana,Arial,sans-serif; font-size:13px;}
3
+ fieldset {border:1px solid silver; border-radius:5px; padding:10px}
4
+ h3 {margin:1px; padding:1px; font-size:13px;}
5
+ a {color:#222}
6
+ a:hover{color:gray}
7
+ input[type=text], input[type=password], select {width:97%; border-radius:2px; border:1px solid silver; padding:4px; font-family:Verdana,Arial,sans-serif;}
8
+ select {padding-left:0; width:99%}
9
+ select:disabled {background:#EBEBE4}
10
+ input.readonly {background-color:#efefef;}
11
+
12
+ /* ============================
13
+ COMMON VIEWS
14
+ ============================ */
15
+ 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:13px}
16
+ div#content-inner {padding:10px 25px; min-height:550px}
17
+ form.content-form {min-height:550px; position:relative; line-height:17px}
18
+ 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 }
19
+ 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}
20
+
21
+ /* WIZARD STEPS */
22
+ 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; font-weight:bold;}
23
+ .dupx-header-version {white-space:nowrap; color:#777; font-size:11px; font-style:italic; text-align:right; padding:0 15px 5px 0; line-height:14px; font-weight:normal;}
24
+ .dupx-header-version a {color:#555;}
25
+ div.dupx-logfile-link {float:right; font-weight:normal; font-size:11px; font-style:italic}
26
+ div#progress-area {padding:5px; margin:150px 0 0 0px; text-align:center;}
27
+ div#ajaxerr-data {padding:5px; height:350px; width:99%; border:1px solid silver; border-radius:5px; background-color:#efefef; font-size:13px; overflow-y:scroll; line-height:24px}
28
+
29
+ /*TITLE HEADERS */
30
+ div.hdr-main {font-size:22px; padding:0 0 5px 0; border-bottom:1px solid #D3D3D3; font-weight:bold; margin:15px 0 20px 0;}
31
+ div.hdr-main span.step {color:#DB4B38}
32
+ div.hdr-sub1 {font-size:18px; margin-bottom:5px;border:1px solid #D3D3D3;padding:7px; background-color:#f9f9f9; font-weight:bold; border-radius:4px}
33
+ div.hdr-sub1 a {cursor:pointer; text-decoration: none !important}
34
+ div.hdr-sub1:hover {cursor:pointer; background-color:#f1f1f1; border:1px solid #dcdcdc; }
35
+ div.hdr-sub1:hover a{color:#000}
36
+ div.hdr-sub2 {font-size:15px; padding:2px 2px 2px 0; border-bottom:1px solid #D3D3D3; font-weight:bold; margin-bottom:5px; border:none}
37
+ div.hdr-sub3 {font-size:15px; padding:2px 2px 2px 0; border-bottom:1px solid #D3D3D3; font-weight:bold; margin-bottom:5px;}
38
+ div.hdr-sub4 {font-size:15px; padding:7px; border:1px solid #D3D3D3;; font-weight:bold; background-color:#e9e9e9;}
39
+ div.hdr-sub4:hover {background-color:#dfdfdf; cursor:pointer}
40
+
41
+ /* BUTTONS */
42
+ div.dupx-footer-buttons {position:absolute; bottom:10px; padding:10px; right:0}
43
+ div.dupx-footer-buttons input:hover, button:hover {border:1px solid #000}
44
+ div.dupx-footer-buttons input[disabled=disabled]{background-color:#F4F4F4; color:silver; border:1px solid silver;}
45
+ div.dupx-footer-buttons button[disabled]{background-color:#F4F4F4; color:silver; border:1px solid silver;}
46
+ button.default-btn, input.default-btn {
47
+ cursor:pointer; color:#fff; font-size:16px; border-radius:5px; padding:8px 25px 6px 25px;
48
+ background-color:#13659C; border:1px solid gray;
49
+ }
50
+ table.dupx-opts {width:100%; border:0px;}
51
+ table.dupx-opts td{white-space:nowrap; padding:3px;}
52
+ table.dupx-opts td:first-child{width:125px; font-weight: bold}
53
+ table.dupx-advopts td:first-child{width:125px; font-weight:bold}
54
+ table.dupx-advopts td label{min-width:60px; display:inline-block; cursor:pointer}
55
+
56
+ .dupx-pass {display:inline-block; color:green;}
57
+ .dupx-fail {display:inline-block; color:#AF0000;}
58
+ .dupx-notice {display:inline-block; color:#000;}
59
+ div.dupx-ui-error {padding-top:2px; font-size:13px; line-height: 20px}
60
+
61
+ /*Dialog Info */
62
+ div.dlg-serv-info {line-height:22px; font-size:12px; margin:0}
63
+ div.dlg-serv-info div.info-txt {text-align: center; font-size:11px; font-style:italic}
64
+ div.dlg-serv-info label {display:inline-block; width:175px; font-weight: bold}
65
+ div.dlg-serv-info div.hdr {background-color: #dfdfdf; font-weight: bold; margin-top:5px; border-radius: 4px; padding:2px 5px 2px 5px; border: 1px solid silver; font-size: 16px}
66
+ div#modal-window div.modal-title {background-color:#D0D0D0}
67
+ div#modal-window div.modal-text {padding-top:10px !important}
68
+ div.installer-mode {font-weight:normal; position:absolute; top:5px; right:20px; font-style:italic; font-size:11px}
69
+ i.secure-unlocked {color:maroon;}
70
+
71
+
72
+ /* ============================
73
+ INIT 1:SECURE PASSWORD
74
+ ============================ */
75
+ button.pass-toggle {height:26px; width:26px; position:absolute; top:0px; right:0px; border:1px solid silver; border-radius:0 4px 4px 0;}
76
+ button.pass-toggle i { padding:0; display:block; margin:-4px 0 0 -5px}
77
+ div.i1-pass-area {width:100%; text-align:center}
78
+ div.i1-pass-data {padding:30px; margin:auto; text-align:center; width:300px}
79
+ div.i1-pass-data table {width:100%; border-collapse:collapse; padding:0}
80
+ div.i1-pass-data label {font-weight:bold}
81
+ div.i1-pass-errmsg {color:maroon; font-weight:bold}
82
+ div#i1-pass-input {position:relative; margin:2px 0 15px 0}
83
+ input#secure-pass {border-radius:4px 0 0 4px; width:250px}
84
+ div.error-pane {border:1px solid #efefef; border-left:4px solid #D54E21; padding:0 0 0 10px; margin:2px 0 10px 0}
85
+ div.dupx-ui-error {padding-top:2px; font-size:13px; line-height: 20px}
86
+ label.secure-lock {cursor:pointer}
87
+
88
+ /* ======================================
89
+ STEP 1 VIEW
90
+ ====================================== */
91
+ table.s1-archive-local {width:100%}
92
+ table.s1-archive-local td {padding:4px 4px 4px 4px}
93
+ table.s1-archive-local td:first-child {font-weight:bold; width:55px}
94
+ div#s1-area-sys-setup {padding:5px 0 0 10px}
95
+ div#s1-area-sys-setup div.info-top {text-align:center; font-style:italic; font-size:11px; padding:0 5px 5px 5px}
96
+ table.s1-checks-area {width:100%; margin:0; padding:0}
97
+ table.s1-checks-area td.title {font-size:16px; width:100%}
98
+ table.s1-checks-area td.title small {font-size:11px; font-weight:normal}
99
+ table.s1-checks-area td.toggle {font-size:11px; margin-right:7px; font-weight:normal}
100
+
101
+ div.s1-reqs {background-color:#efefef; border:1px solid silver; border-radius:5px; margin-top:-5px}
102
+ div.s1-reqs div.header {background-color:#E0E0E0; color:#000; border-bottom: 1px solid silver; padding:2px; font-weight:bold }
103
+ 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}
104
+ 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; font-weight:bold}
105
+ div.s1-reqs div.pass {background-color:green;}
106
+ div.s1-reqs div.fail {background-color:maroon;}
107
+ div.s1-reqs div.title {padding:4px; font-size:13px;}
108
+ div.s1-reqs div.title:hover {background-color:#dfdfdf; cursor:pointer}
109
+ div.s1-reqs div.info {padding:8px 8px 20px 8px; background-color:#fff; display:none; line-height:18px; font-size: 12px}
110
+ div.s1-reqs div.info a {color:#485AA3;}
111
+ div.s1-archive-failed-msg {padding:15px; border:1px dashed silver; font-size: 12px; border-radius:5px}
112
+ div.s1-err-msg {padding:8px; border:1px dashed #999; margin:20px 0 20px 0px; border-radius:5px; color:maroon}
113
+
114
+ /*Terms and Notices*/
115
+ div#s1-warning-check label{cursor:pointer;}
116
+ div#s1-warning-msg {padding:5px;font-size:12px; color:#333; line-height:14px;font-style:italic; overflow-y:scroll; height:250px; border:1px solid #dfdfdf; background:#fff; border-radius:3px}
117
+ div#s1-warning-check {padding:3px; font-size:14px; font-weight:normal;}
118
+ input#accept-warnings {height: 17px; width:17px}
119
+
120
+ /* ======================================
121
+ STEP 2 VIEW
122
+ ====================================== */
123
+ /*Toggle Buttons */
124
+ div.s2-btngrp {text-align:center; margin:0 auto 10px auto}
125
+ div.s2-btngrp input[type=button] {font-size:14px; padding:6px; width:120px; border:1px solid silver; cursor:pointer}
126
+ div.s2-btngrp input[type=button]:first-child {border-radius:5px 0 0 5px; margin-right:-2px}
127
+ div.s2-btngrp input[type=button]:last-child {border-radius:0 5px 5px 0; margin-left:-4px}
128
+ div.s2-btngrp input[type=button].active {background-color:#13659C; color:#fff;}
129
+ div.s2-btngrp input[type=button].in-active {background-color:#E4E4E4; }
130
+ div.s2-btngrp input[type=button]:hover {border:1px solid #999}
131
+
132
+ div.s2-modes {padding:0px 15px 0 0px;}
133
+ div#s2-dbconn {margin:auto; text-align:center; margin:15px 0 10px 0px}
134
+ input.s2-small-btn {height:25px; border:1px solid gray; border-radius:3px; cursor:pointer}
135
+ table.s2-opts-dbhost td {padding:0; margin:0}
136
+ input#s2-dbport-btn { width:80px}
137
+ 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 }
138
+ table.s2-db-test-dtls {text-align: left; margin: auto}
139
+ table.s2-db-test-dtls td:first-child {font-weight: bold}
140
+ div#s2-dbconn-test-msg {font-size:12px}
141
+ div#s2-dbconn-status {border:1px solid silver; border-radius:3px; background-color:#f9f9f9; padding:2px 5px; margin-top:10px; height:200px; overflow-y: scroll}
142
+ div#s2-dbconn-status div.warn-msg {text-align: left; padding:5px; margin:10px 0 10px 0}
143
+ div#s2-dbconn-status div.warn-msg b{color:maroon}
144
+
145
+ /*cPanel Tab */
146
+ div#s2-cpnl-pane {display: none; min-height: 190px;}
147
+ div.s2-gopro {color: black; margin-top:10px; padding:0 20px 10px 20px; border: 1px solid silver; background-color:#F6F6F6; border-radius: 4px}
148
+ div.s2-gopro h2 {text-align: center; margin:10px}
149
+ div.s2-gopro small {font-style: italic}
150
+ div.s2-cpanel-login {padding:15px; color:#fff; text-align:center; margin:15px 5px 15px 5px; border:1px solid silver; border-radius:5px; background-color:#13659C; font-size:14px; line-height:22px}
151
+ div.s2-cpanel-off {padding:15px; color:#fff; text-align:center; margin:15px 5px 15px 5px; border:1px solid silver; border-radius:5px; background-color:#b54949; font-size:14px; line-height:22px}
152
+
153
+ /*Advanced Options & Warning Area*/
154
+ div#s2-area-adv-opts label {cursor: pointer}
155
+ 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}
156
+ div#s2-warning-check {padding:5px; font-size:12px; font-weight:normal; font-style:italic;}
157
+ div#s2-warning-check label {cursor: pointer; line-height: 14px}
158
+ div#s2-warning-emptydb {display:none; color:#AF2222; margin:2px 0 0 0; font-size: 11px}
159
+ table.s2-advopts label.radio {width:50px; display:inline-block}
160
+
161
+ /* ======================================
162
+ STEP 3 VIEW
163
+ ====================================== */
164
+ table.s3-table-inputs {width:100%; border:0px;}
165
+ table.s3-table-inputs td{white-space:nowrap; padding:2px;}
166
+ table.s3-table-inputs td:first-child{font-weight: bold; width:125px}
167
+ div#s3-adv-opts {margin-top:5px; }
168
+ div.s3-allnonelinks {font-size:11px; float:right;}
169
+ select#plugins {width:330px; height:100px}
170
+ select#tables {width:330px; height:100px}
171
+
172
+ /* password indicator */
173
+ .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}
174
+ .top_testresult span{margin:0;}
175
+ .top_shortPass{background:#edabab; border:1px solid #bc0000;display:block;}
176
+ .top_badPass{background:#edabab;border:1px solid #bc0000;display:block;}
177
+ .top_goodPass{background:#ffffe0; border:1px solid #e6db55; display:block;}
178
+ .top_strongPass{background:#d3edab; border:1px solid #73bc00; display:block;}
179
+
180
+ /* ======================================
181
+ STEP 4 VIEW
182
+ ====================================== */
183
+ div.s4-final-title {color:#BE2323;font-size:18px}
184
+ div.s4-connect {font-size:12px; text-align:center; font-style:italic; position:absolute; bottom:10px; padding:10px; width:100%; margin-top:20px}
185
+ table.s4-report-results,
186
+ table.s4-report-errs {border-collapse:collapse; border:1px solid #dfdfdf; }
187
+ table.s4-report-errs td {text-align:center; width:33%}
188
+ table.s4-report-results th, table.s4-report-errs th {background-color:#efefef; padding:0px; font-size:13px; padding:0px}
189
+ 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}
190
+ table.s4-report-results td:first-child {text-align:left; font-weight:bold; padding-left:3px}
191
+ div.s4-err-title {background-color:#dfdfdf; font-weight: bold; margin:-3px 0 15px 0; padding:5px; border-radius:3px; font-size:13px}
192
+
193
+ div.s4-err-msg {padding:8px; display:none; border:1px dashed #999; margin:10px 0 20px 0px; border-radius:5px;}
194
+ 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; }
195
+ div.s4-err-msg div.info-error{padding:7px; background-color:#f9c9c9; border:1px solid silver; border-radius:2px; font-size:12px; line-height:16px }
196
+ div.s4-err-msg div.info-notice{padding:7px; background-color:#FCFEC5; border:1px solid silver; border-radius:2px; font-size:12px; line-height:16px;}
197
+ table.s4-final-step {width:100%;}
198
+ table.s4-final-step td {padding:5px 15px 5px 5px}
199
+ table.s4-final-step td:first-child {white-space:nowrap;}
200
+ div.s4-go-back {border-top:1px dotted #dfdfdf; margin:auto; font-style:italic; font-size:10px; color:#333}
201
+ a.s4-final-btns {display: block; width:145px; padding:5px; line-height: 1.4; background-color:#F1F1F1; border:1px solid silver;
202
+ color: #000; box-shadow: 5px 5px 5px -5px #949494; text-decoration: none; text-align: center; border-radius: 4px;
203
+ }
204
+ a.s4-final-btns:hover {background-color: #dfdfdf;}
205
+ div.s4-gopro-btn {text-align:center; font-size:14px; margin:auto; width:200px; font-style: italic; font-weight:bold}
206
+ div.s4-gopro-btn a{color:green}
207
+
208
+
209
+ /* PARSLEY:Overrides*/
210
+ input.parsley-error, textarea.parsley-error, select.parsley-error {
211
+ color:#B94A48 !important; background-color:#F2DEDE !important; border:1px solid #EED3D7 !important;
212
+ }
213
+ ul.parsley-errors-list {margin:1px 0 0 -40px; list-style-type:none; font-size:10px}
214
+
215
+ /* ============================
216
+ STEP 5 HELP
217
+ ============================ */
218
+ div.help-target {float:right; font-size:11px}
219
+ div#main-help a.help-target {display:block; margin:5px}
220
+ div#main-help sup {font-size:11px; font-weight:normal; font-style:italic; color:blue}
221
+ div.help-online {text-align:center; font-size:18px; padding:10px 0 0 0; line-height:24px}
222
+ div.help {color:#555; font-style:italic; font-size:11px; padding:4px; border-top:1px solid #dfdfdf}
223
+ div.help-page {padding:5px 0 0 5px}
224
+ div.help-page fieldset {margin-bottom:25px}
225
+ div#main-help {font-size:13px; line-height:17px}
226
+ div#main-help h2 {background-color:#F1F1F1; border:1px solid silver; border-radius:4px; padding:10px; margin:26px 0 8px 0; font-size:22px; }
227
+ div#main-help h3 {border-bottom:1px solid silver; padding:8px; margin:4px 0 8px 0; font-size:20px}
228
+ div#main-help span.step {color:#DB4B38}
229
+ table.help-opt {width: 100%; border: none; border-collapse: collapse; margin:5px 0 0 0;}
230
+ table.help-opt td.section {background-color:#dfdfdf;}
231
+ table.help-opt td, th {padding:7px; border:1px solid silver;}
232
+ table.help-opt td:first-child {font-weight:bold; padding-right:10px; white-space:nowrap}
233
+ table.help-opt th {background: #333; color: #fff;border:1px solid #333; padding:3px}
234
+
235
+
236
+ <?php if ($GLOBALS['DUPX_DEBUG']) : ?>
237
+ .dupx-debug {display:block; margin:4px 0 30px 0; font-size:11px;}
238
+ .dupx-debug label {font-weight:bold; display:block; margin:6px 0 2px 0}
239
+ .dupx-debug textarea {width:95%; height:100px; font-size:11px}
240
+ <?php else : ?>
241
+ .dupx-debug {display:none}
242
+ <?php endif; ?>
243
+ small.s3-warn {color: maroon;font-style: italic;}
244
+ div.s4-warn {color: maroon;}
245
+
246
  </style>
installer/build/classes/class.http.php ADDED
@@ -0,0 +1,205 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /** * *****************************************************
4
+ * CLASS::DUPX_Http
5
+ * Http Class Utility */
6
+ class DUPX_HTTP
7
+ {
8
+ /**
9
+ * Do an http post request with html form elements
10
+ * @param string $url A URL to post to
11
+ * @param string $data A valid key/pair combo $data = array('key1' => 'value1', 'key2' => 'value2')
12
+ * generated hidden form elements
13
+ * @return string An html form that will automatically post itself
14
+ */
15
+ public static function post_with_html($url, $data)
16
+ {
17
+ $id = uniqid();
18
+ $html = "<form id='{$id}' method='post' action='{$url}' />\n";
19
+ foreach ($data as $name => $value)
20
+ {
21
+ $html .= "<input type='hidden' name='{$name}' value='{$value}' />\n";
22
+ }
23
+ $html .= "</form>\n";
24
+ $html .= "<script>$(document).ready(function() { $('#{$id}').submit(); });</script>";
25
+ echo $html;
26
+ }
27
+
28
+ /**
29
+ * Do an http post request with curl or php code
30
+ * @param string $url A URL to post to
31
+ * @param string $params A valid key/pair combo $data = array('key1' => 'value1', 'key2' => 'value2');
32
+ * @param string $headers Optional header elements
33
+ * @return a string or FALSE on failure.
34
+ */
35
+ public static function post($url, $params = array(), $headers = null)
36
+ {
37
+ //PHP POST
38
+ if (!function_exists('curl_init'))
39
+ {
40
+ return self::php_get_post($url, $params, $headers = null, 'POST');
41
+ }
42
+
43
+ //CURL POST
44
+ $headers_on = isset($headers) && array_count_values($headers);
45
+ $params = http_build_query($params);
46
+ $ch = curl_init();
47
+
48
+ // Return contents of transfer on curl_exec
49
+ // Allow self-signed certs
50
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
51
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
52
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
53
+ curl_setopt($ch, CURLOPT_URL, $url);
54
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
55
+ curl_setopt($ch, CURLOPT_HEADER, $headers_on);
56
+
57
+ if ($headers_on)
58
+ {
59
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
60
+ }
61
+ curl_setopt($ch, CURLOPT_POST, count($params));
62
+ curl_setopt($ch, CURLOPT_POSTFIELDS, $params);
63
+ $response = curl_exec($ch);
64
+ curl_close($ch);
65
+ return $response;
66
+ }
67
+
68
+ /**
69
+ * Do an http post request with curl or php code
70
+ * @param string $url A URL to get. If $params is not null then all query strings will be removed.
71
+ * @param string $params A valid key/pair combo $data = array('key1' => 'value1', 'key2' => 'value2');
72
+ * @param string $headers Optional header elements
73
+ * @return a string or FALSE on failure.
74
+ */
75
+ public static function get($url, $params = array(), $headers = null)
76
+ {
77
+ //PHP GET
78
+ if (!function_exists('curl_init'))
79
+ {
80
+ return self::php_get_post($url, $params, $headers = null, 'GET');
81
+ }
82
+
83
+ //Remove query string if $params are passed
84
+ $full_url = $url;
85
+ if (count($params))
86
+ {
87
+ $url = preg_replace('/\?.*/', '', $url);
88
+ $full_url = $url . '?' . http_build_query($params);
89
+ }
90
+ $headers_on = isset($headers) && array_count_values($headers);
91
+ $ch = curl_init();
92
+
93
+ // Return contents of transfer on curl_exec
94
+ // Allow self-signed certs
95
+ curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
96
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
97
+ curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
98
+ curl_setopt($ch, CURLOPT_URL, $full_url);
99
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
100
+ curl_setopt($ch, CURLOPT_HEADER, $headers_on);
101
+ if ($headers_on)
102
+ {
103
+ curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
104
+ }
105
+ $response = curl_exec($ch);
106
+ curl_close($ch);
107
+ return $response;
108
+ }
109
+
110
+ /**
111
+ * Gets the URL of the current request
112
+ * @param bool $show_query Include the query string in the URL
113
+ * @return string A URL
114
+ */
115
+ public static function get_request_uri($show_query = true)
116
+ {
117
+ $isSecure = false;
118
+
119
+ if((!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off') || ($_SERVER['SERVER_PORT'] == 443))
120
+ {
121
+ $isSecure = true;
122
+ }
123
+ elseif (!empty($_SERVER['HTTP_X_FORWARDED_PROTO']) && $_SERVER['HTTP_X_FORWARDED_PROTO'] == 'https' || !empty($_SERVER['HTTP_X_FORWARDED_SSL']) && $_SERVER['HTTP_X_FORWARDED_SSL'] == 'on')
124
+ {
125
+ $isSecure = true;
126
+ }
127
+ $protocol = $isSecure ? 'https' : 'http';
128
+ $url = "{$protocol}://{$_SERVER['HTTP_HOST']}{$_SERVER['REQUEST_URI']}";
129
+ $url = ($show_query) ? $url : preg_replace('/\?.*/', '', $url);
130
+ return $url;
131
+ }
132
+
133
+ /**
134
+ * Check to see if the internet is accessible
135
+ * @param string $url A URL e.g without prefix "ajax.googleapis.com"
136
+ * @param string $port A valid port number
137
+ * @return bool
138
+ */
139
+ public static function is_url_active($url, $port, $timeout = 5)
140
+ {
141
+ if (function_exists('fsockopen'))
142
+ {
143
+ $port = isset($port) && is_integer($port) ? $port : 80;
144
+ $connected = @fsockopen($url, $port, $errno, $errstr, $timeout); //website and port
145
+ if ($connected)
146
+ {
147
+ $is_conn = true;
148
+ @fclose($connected);
149
+ }
150
+ else
151
+ {
152
+ $is_conn = false;
153
+ }
154
+ return $is_conn;
155
+ }
156
+ else
157
+ {
158
+ return false;
159
+ }
160
+ }
161
+
162
+ public static function parse_host($url)
163
+ {
164
+ $url = parse_url(trim($url));
165
+ if ($url == false)
166
+ {
167
+ return null;
168
+ }
169
+ return trim($url['host'] ? $url['host'] : array_shift(explode('/', $url['path'], 2)));
170
+ }
171
+
172
+ //PHP POST or GET requets
173
+ private static function php_get_post($url, $params, $headers = null, $method)
174
+ {
175
+ $full_url = $url;
176
+ if ($method == 'GET' && count($params))
177
+ {
178
+ $url = preg_replace('/\?.*/', '', $url);
179
+ $full_url = $url . '?' . http_build_query($params);
180
+ }
181
+
182
+ $data = array('http' => array(
183
+ 'method' => $method,
184
+ 'content' => http_build_query($params)));
185
+
186
+ if ($headers !== null)
187
+ {
188
+ $data['http']['header'] = $headers;
189
+ }
190
+ $ctx = stream_context_create($data);
191
+ $fp = @fopen($full_url, 'rb', false, $ctx);
192
+ if (!$fp)
193
+ {
194
+ throw new Exception("Problem with $full_url, $php_errormsg");
195
+ }
196
+ $response = @stream_get_contents($fp);
197
+ if ($response === false)
198
+ {
199
+ throw new Exception("Problem reading data from $full_url, $php_errormsg");
200
+ }
201
+ return $response;
202
+ }
203
+
204
+ }
205
+ ?>
installer/build/classes/class.logging.php CHANGED
@@ -1,66 +1,66 @@
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 three 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 or your hosts cPanel 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/> <b>Workarounds:</b> <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 "Name Checks". <br/> 2. Manually extract the zip file with a client side program or your hosts cPanel. Then under options in step 1 of this installer check the "Manual Archive 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/>');
12
- define('ERR_DBCONNECT_CREATE', 'DATABASE CREATION FAILURE!<br/> Unable to create database "%s". Check to make sure the user has "Create" privileges. Some hosts will restrict creation of a database only through the cpanel. Try creating the database manually to proceed with installation. If the database already exists then check the radio button labeled "Connect and Remove All Data" which will remove all existing tables.');
13
- define('ERR_DBTRYCLEAN', 'DATABASE CREATION FAILURE!<br/> Unable to remove all tables from database "%s".<br/> Please remove all tables from this database and try the installation again.');
14
- define('ERR_DBCREATE', 'The database "%s" does not exists.<br/> Change mode to create in order to create a new database.');
15
- define('ERR_DBEMPTY', 'The database "%s" has "%s" tables. The Duplicator only works with an EMPTY database. Enable the action "Connect and Remove All Data" radio button to remove all tables and or create a new database. Some hosting providers do not allow table removal from scripts. In this case you will need to login to your hosting providers control panel and remove the tables manually. Please contact your hosting provider for further details. Always backup all your data before proceeding!');
16
- define('ERR_TESTDB_UTF8', 'UTF8 Characters were detected as part of the database connection string. If your connection fails be sure to update the MySQL my.ini configuration file setting to support UTF8 characters by enabling this option [character_set_server=utf8] and restarting the database server.');
17
- define('ERR_TESTDB_VERSION_INFO', 'The current version detected was released prior to MySQL 5.5.3 which had a release date of April 8th 2010. WordPress 4.2 included support for utf8mb4 which is only supported in MySQL server 5.5.3+. It is highly recommended to upgrade your version of MySQL server on this server to be more compatible with recent releases of WordPress and avoid issues with install errors.');
18
- define('ERR_TESTDB_VERSION_COMPAT', 'In order to avoid database incompatibility issues make sure the database versions between the build and installer servers are as close as possible. If the package was created on a newer database version than where it is being installed then you might run into issues.<br/><br/> It is best to make sure the server where the installer is running has the same or higher version number than where it was built. If the major and minor version are the same or close for example [5.7 to 5.6], then the migration should work without issues. A version pair of [5.7 to 5.1] is more likely to cause issues unless you have a very simple setup. If the versions are too far apart work with your hosting provider to upgrade the MySQL engine on this server.<br/><br/> <b>MariaDB:</b> If see a version of 10.N.N then the database distribution is a MariaDB flavor of MySQL. While the distributions are very close there are some subtle differences. Some operating systems will report the version such as "5.5.5-10.1.21-MariaDB" showing the correlation of both. Please visit the online <a href="https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/" target="_blank">MariaDB versus MySQL - Compatibility</a> page for more details.<br/><br/> Please note these messages are simply notices. It is highly recommended that you continue with the install process and closely monitor the installer-log.txt file along with the install report found on step 3 of the installer. Be sure to look for any notices/warnings/errors in these locations to validate the install process did not detect any errors. If any issues are found please visit the FAQ pages and see the question <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=database_incompatibility#faq-installer-260-q" target="_blank">What if I get database errors or general warnings on the install report?</a>.');
19
-
20
-
21
- /**
22
- * Class used to log information to the installer-log.txt file
23
- *
24
- * Standard: PSR-2
25
- * @link http://www.php-fig.org/psr/psr-2 Full Documentation
26
- *
27
- * @package SC\DUPX\Log
28
- *
29
- */
30
- class DUPX_Log
31
- {
32
-
33
- /**
34
- * Used to write debug info to the text log file
35
- *
36
- * @param string $msg Any text data
37
- * @param int $loglevel Log level
38
- *
39
- * @return string Write info to both the log and browser
40
- */
41
- public static function info($msg, $logging = 1)
42
- {
43
- if ($logging <= $GLOBALS["LOGGING"]) {
44
- @fwrite($GLOBALS["LOG_FILE_HANDLE"], "{$msg}\n");
45
- }
46
- }
47
-
48
- /**
49
- * Used to write errors to the text log file
50
- *
51
- * @param string $msg Any text data
52
- * @param int $loglevel Log level
53
- *
54
- * @return string Write errors to both the log and browser
55
- */
56
- public static function error($msg)
57
- {
58
- $breaks = array("<br />","<br>","<br/>");
59
- $log_msg = str_ireplace($breaks, "\r\n", $msg);
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
  ?>
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 three 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 or your hosts cPanel 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/> <b>Workarounds:</b> <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 "Name Checks". <br/> 2. Manually extract the zip file with a client side program or your hosts cPanel. Then under options in step 1 of this installer check the "Manual Archive 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/>');
12
+ define('ERR_DBCONNECT_INFO', '<b>DATABASE CONNECTION FAILED!</b><br/>If the problem persists see the online FAQ for <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-100-q" target="_blank">recommended fixes</a>.');
13
+ define('ERR_DBCONNECT_CREATE', 'DATABASE CREATION FAILURE!<br/> Unable to create database "%s". Check to make sure the user has "Create" privileges. Some hosts will restrict creation of a database only through the cpanel. Try creating the database manually to proceed with installation. If the database already exists then check the radio button labeled "Connect and Remove All Data" which will remove all existing tables.');
14
+ define('ERR_DBTRYCLEAN', 'DATABASE CREATION FAILURE!<br/> Unable to remove all tables from database "%s".<br/> Please remove all tables from this database and try the installation again.');
15
+ define('ERR_DBCREATE', 'The database "%s" does not exists.<br/> Change mode to create in order to create a new database.');
16
+ define('ERR_DBEMPTY', 'The database "%s" has "%s" tables. The Duplicator only works with an EMPTY database. Enable the action "Connect and Remove All Data" radio button to remove all tables and or create a new database. Some hosting providers do not allow table removal from scripts. In this case you will need to login to your hosting providers control panel and remove the tables manually. Please contact your hosting provider for further details. Always backup all your data before proceeding!');
17
+ define('ERR_TESTDB_UTF8', 'UTF8 Characters were detected as part of the database connection string. If your connection fails be sure to update the MySQL my.ini configuration file setting to support UTF8 characters by enabling this option [character_set_server=utf8] and restarting the database server.');
18
+ define('ERR_TESTDB_VERSION_INFO', 'If the current version detected is below 5.5.3 (release on April 8th 2010) then support for utf8mb4 tables will not work. The utf8mb4 format is only supported in MySQL server 5.5.3+. It is highly recommended to upgrade your version of MySQL server on this server to be more compatible with recent releases of WordPress and avoid issues with install errors.');
19
+ define('ERR_TESTDB_VERSION_COMPAT', 'In order to avoid database incompatibility issues make sure the database versions between the build and installer servers are as close as possible. If the package was created on a newer database version than where it is being installed then you might run into issues.<br/><br/> It is best to make sure the server where the installer is running has the same or higher version number than where it was built. If the major and minor version are the same or close for example [5.7 to 5.6], then the migration should work without issues. A version pair of [5.7 to 5.1] is more likely to cause issues unless you have a very simple setup. If the versions are too far apart work with your hosting provider to upgrade the MySQL engine on this server.<br/><br/> <b>MariaDB:</b> If a version of 10.N.N shows then the database distribution is a MariaDB flavor of MySQL. While the distributions are very close there are some subtle differences. Some operating systems will report the version such as "5.5.5-10.1.21-MariaDB" showing the correlation of both. Please visit the online <a href="https://mariadb.com/kb/en/mariadb/mariadb-vs-mysql-compatibility/" target="_blank">MariaDB versus MySQL - Compatibility</a> page for more details.<br/><br/> Please note these messages are simply notices. It is highly recommended that you continue with the install process and closely monitor the installer-log.txt file along with the install report found on step 3 of the installer. Be sure to look for any notices/warnings/errors in these locations to validate the install process did not detect any errors. If any issues are found please visit the FAQ pages and see the question <a href="https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=database_incompatibility#faq-installer-260-q" target="_blank">What if I get database errors or general warnings on the install report?</a>.');
20
+
21
+ /**
22
+ * Class used to log information to the installer-log.txt file
23
+ *
24
+ * Standard: PSR-2
25
+ * @link http://www.php-fig.org/psr/psr-2 Full Documentation
26
+ *
27
+ * @package SC\DUPX\Log
28
+ *
29
+ */
30
+ class DUPX_Log
31
+ {
32
+
33
+ /**
34
+ * Used to write debug info to the text log file
35
+ *
36
+ * @param string $msg Any text data
37
+ * @param int $loglevel Log level
38
+ *
39
+ * @return string Write info to both the log and browser
40
+ */
41
+ public static function info($msg, $logging = 1)
42
+ {
43
+ if ($logging <= $GLOBALS["LOGGING"]) {
44
+ @fwrite($GLOBALS["LOG_FILE_HANDLE"], "{$msg}\n");
45
+ }
46
+ }
47
+
48
+ /**
49
+ * Used to write errors to the text log file
50
+ *
51
+ * @param string $msg Any text data
52
+ * @param int $loglevel Log level
53
+ *
54
+ * @return string Write errors to both the log and browser
55
+ */
56
+ public static function error($msg)
57
+ {
58
+ $breaks = array("<br />","<br>","<br/>");
59
+ $log_msg = str_ireplace($breaks, "\r\n", $msg);
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/class.password.php ADDED
@@ -0,0 +1,229 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ #
3
+ # Portable PHP password hashing framework.
4
+ #
5
+ # Version 0.5 / genuine.
6
+ #
7
+ # Written by Solar Designer <solar at openwall.com> in 2004-2006 and placed in
8
+ # the public domain. Revised in subsequent years, still public domain.
9
+ #
10
+ # There's absolutely no warranty.
11
+ #
12
+ # The homepage URL for this framework is:
13
+ #
14
+ # http://www.openwall.com/phpass/
15
+ #
16
+ # Please be sure to update the Version line if you edit this file in any way.
17
+ # It is suggested that you leave the main version number intact, but indicate
18
+ # your project name (after the slash) and add your own revision information.
19
+ #
20
+ # Please do not change the "private" password hashing method implemented in
21
+ # here, thereby making your hashes incompatible. However, if you must, please
22
+ # change the hash type identifier (the "$P$") to something different.
23
+ #
24
+ # Obviously, since this code is in the public domain, the above are not
25
+ # requirements (there can be none), but merely suggestions.
26
+ #
27
+ class DUPX_PasswordHash
28
+ {
29
+
30
+ var $itoa64;
31
+ var $iteration_count_log2;
32
+ var $portable_hashes;
33
+ var $random_state;
34
+
35
+ function __construct($iteration_count_log2, $portable_hashes)
36
+ {
37
+ $this->itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';
38
+
39
+ if ($iteration_count_log2 < 4 || $iteration_count_log2 > 31)
40
+ $iteration_count_log2 = 8;
41
+ $this->iteration_count_log2 = $iteration_count_log2;
42
+
43
+ $this->portable_hashes = $portable_hashes;
44
+
45
+ $this->random_state = microtime();
46
+ if (function_exists('getmypid'))
47
+ $this->random_state .= getmypid();
48
+ }
49
+
50
+ function PasswordHash($iteration_count_log2, $portable_hashes)
51
+ {
52
+ self::__construct($iteration_count_log2, $portable_hashes);
53
+ }
54
+
55
+ function get_random_bytes($count)
56
+ {
57
+ $output = '';
58
+ if (@is_readable('/dev/urandom') &&
59
+ ($fh = @fopen('/dev/urandom', 'rb'))) {
60
+ $output = fread($fh, $count);
61
+ fclose($fh);
62
+ }
63
+
64
+ if (strlen($output) < $count) {
65
+ $output = '';
66
+ for ($i = 0; $i < $count; $i += 16) {
67
+ $this->random_state =
68
+ md5(microtime() . $this->random_state);
69
+ $output .= md5($this->random_state, TRUE);
70
+ }
71
+ $output = substr($output, 0, $count);
72
+ }
73
+
74
+ return $output;
75
+ }
76
+
77
+ function encode64($input, $count)
78
+ {
79
+ $output = '';
80
+ $i = 0;
81
+ do {
82
+ $value = ord($input[$i++]);
83
+ $output .= $this->itoa64[$value & 0x3f];
84
+ if ($i < $count)
85
+ $value |= ord($input[$i]) << 8;
86
+ $output .= $this->itoa64[($value >> 6) & 0x3f];
87
+ if ($i++ >= $count)
88
+ break;
89
+ if ($i < $count)
90
+ $value |= ord($input[$i]) << 16;
91
+ $output .= $this->itoa64[($value >> 12) & 0x3f];
92
+ if ($i++ >= $count)
93
+ break;
94
+ $output .= $this->itoa64[($value >> 18) & 0x3f];
95
+ } while ($i < $count);
96
+
97
+ return $output;
98
+ }
99
+
100
+ function gensalt_private($input)
101
+ {
102
+ $output = '$P$';
103
+ $output .= $this->itoa64[min($this->iteration_count_log2 +
104
+ ((PHP_VERSION >= '5') ? 5 : 3), 30)];
105
+ $output .= $this->encode64($input, 6);
106
+
107
+ return $output;
108
+ }
109
+
110
+ function crypt_private($password, $setting)
111
+ {
112
+ $output = '*0';
113
+ if (substr($setting, 0, 2) === $output)
114
+ $output = '*1';
115
+
116
+ $id = substr($setting, 0, 3);
117
+ # We use "$P$", phpBB3 uses "$H$" for the same thing
118
+ if ($id !== '$P$' && $id !== '$H$')
119
+ return $output;
120
+
121
+ $count_log2 = strpos($this->itoa64, $setting[3]);
122
+ if ($count_log2 < 7 || $count_log2 > 30)
123
+ return $output;
124
+
125
+ $count = 1 << $count_log2;
126
+
127
+ $salt = substr($setting, 4, 8);
128
+ if (strlen($salt) !== 8)
129
+ return $output;
130
+
131
+ # We were kind of forced to use MD5 here since it's the only
132
+ # cryptographic primitive that was available in all versions
133
+ # of PHP in use. To implement our own low-level crypto in PHP
134
+ # would have resulted in much worse performance and
135
+ # consequently in lower iteration counts and hashes that are
136
+ # quicker to crack (by non-PHP code).
137
+ $hash = md5($salt . $password, TRUE);
138
+ do {
139
+ $hash = md5($hash . $password, TRUE);
140
+ } while (--$count);
141
+
142
+ $output = substr($setting, 0, 12);
143
+ $output .= $this->encode64($hash, 16);
144
+
145
+ return $output;
146
+ }
147
+
148
+ function gensalt_blowfish($input)
149
+ {
150
+ # This one needs to use a different order of characters and a
151
+ # different encoding scheme from the one in encode64() above.
152
+ # We care because the last character in our encoded string will
153
+ # only represent 2 bits. While two known implementations of
154
+ # bcrypt will happily accept and correct a salt string which
155
+ # has the 4 unused bits set to non-zero, we do not want to take
156
+ # chances and we also do not want to waste an additional byte
157
+ # of entropy.
158
+ $itoa64 = './ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789';
159
+
160
+ $output = '$2a$';
161
+ $output .= chr(ord('0') + $this->iteration_count_log2 / 10);
162
+ $output .= chr(ord('0') + $this->iteration_count_log2 % 10);
163
+ $output .= '$';
164
+
165
+ $i = 0;
166
+ do {
167
+ $c1 = ord($input[$i++]);
168
+ $output .= $itoa64[$c1 >> 2];
169
+ $c1 = ($c1 & 0x03) << 4;
170
+ if ($i >= 16) {
171
+ $output .= $itoa64[$c1];
172
+ break;
173
+ }
174
+
175
+ $c2 = ord($input[$i++]);
176
+ $c1 |= $c2 >> 4;
177
+ $output .= $itoa64[$c1];
178
+ $c1 = ($c2 & 0x0f) << 2;
179
+
180
+ $c2 = ord($input[$i++]);
181
+ $c1 |= $c2 >> 6;
182
+ $output .= $itoa64[$c1];
183
+ $output .= $itoa64[$c2 & 0x3f];
184
+ } while (1);
185
+
186
+ return $output;
187
+ }
188
+
189
+ function HashPassword($password)
190
+ {
191
+ $random = '';
192
+
193
+ if (CRYPT_BLOWFISH === 1 && !$this->portable_hashes) {
194
+ $random = $this->get_random_bytes(16);
195
+ $hash =
196
+ crypt($password, $this->gensalt_blowfish($random));
197
+ if (strlen($hash) === 60)
198
+ return $hash;
199
+ }
200
+
201
+ if (strlen($random) < 6)
202
+ $random = $this->get_random_bytes(6);
203
+ $hash =
204
+ $this->crypt_private($password,
205
+ $this->gensalt_private($random));
206
+ if (strlen($hash) === 34)
207
+ return $hash;
208
+
209
+ # Returning '*' on error is safe here, but would _not_ be safe
210
+ # in a crypt(3)-like function used _both_ for generating new
211
+ # hashes and for validating passwords against existing hashes.
212
+ return '*';
213
+ }
214
+
215
+ function CheckPassword($password, $stored_hash)
216
+ {
217
+ $hash = $this->crypt_private($password, $stored_hash);
218
+ if ($hash[0] === '*')
219
+ $hash = crypt($password, $stored_hash);
220
+
221
+ # This is not constant-time. In order to keep the code simple,
222
+ # for timing safety we currently rely on the salts being
223
+ # unpredictable, which they are at least in the non-fallback
224
+ # cases (that is, when we use /dev/urandom and bcrypt).
225
+ return $hash === $stored_hash;
226
+ }
227
+ }
228
+
229
+ ?>
installer/build/classes/config/class.conf.wp.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * Class used to update and edit and update the wp-config.php
5
  *
@@ -11,32 +10,38 @@
11
  */
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']) {
@@ -70,13 +75,15 @@ class DUPX_WPConfig
70
  }
71
  }
72
 
73
- $wpconfig = preg_replace($patterns, $replace, $wpconfig);
 
 
74
  file_put_contents('wp-config.php', $wpconfig);
75
- $wpconfig = null;
76
  }
77
 
78
  /**
79
- * Updates the web server config files in Step 1
80
  *
81
  * @return null
82
  */
@@ -151,9 +158,13 @@ class DUPX_WPConfig
151
  return $config_file;
152
  }
153
 
154
-
155
- public static function tokenParser($wpconfig_path) {
156
-
 
 
 
 
157
  $defines = array();
158
  $wpconfig_file = @file_get_contents($wpconfig_path);
159
 
@@ -197,7 +208,6 @@ class DUPX_WPConfig
197
  }
198
 
199
  return $defines;
200
-
201
  }
202
 
203
  private static function tokenStrip($value)
@@ -205,11 +215,14 @@ class DUPX_WPConfig
205
  return preg_replace('!^([\'"])(.*)\1$!', '$2', $value);
206
  }
207
 
 
 
 
 
 
208
  private static function isConstant($token)
209
  {
210
  return $token == T_CONSTANT_ENCAPSED_STRING || $token == T_STRING || $token == T_LNUMBER || $token == T_DNUMBER;
211
  }
212
-
213
-
214
  }
215
  ?>
1
  <?php
 
2
  /**
3
  * Class used to update and edit and update the wp-config.php
4
  *
10
  */
11
  class DUPX_WPConfig
12
  {
 
13
  /**
14
+ * Updates the web server config files in Step 3
15
  *
16
  * @return null
17
  */
18
  public static function updateStandard()
19
  {
20
+ if (!file_exists('wp-config.php'))
21
+ return;
22
+
23
+ $root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
24
+ $wpconfig = @file_get_contents('wp-config.php', true);
25
 
26
+ $db_port = is_int($_POST['dbport']) ? $_POST['dbport'] : 3306;
27
+ $db_host = ($db_port == 3306) ? $_POST['dbhost'] : "{$_POST['dbhost']}:{$db_port}";
28
+ $db_name = isset($_POST['dbname']) ? DUPX_U::safeQuote($_POST['dbname']) : null;
29
+ $db_user = isset($_POST['dbuser']) ? DUPX_U::safeQuote($_POST['dbuser']) : null;
30
+ $db_pass = isset($_POST['dbpass']) ? DUPX_U::safeQuote($_POST['dbpass']) : null;
31
 
32
  $patterns = array(
33
  "/'DB_NAME',\s*'.*?'/",
34
  "/'DB_USER',\s*'.*?'/",
35
  "/'DB_PASSWORD',\s*'.*?'/",
36
+ "/'DB_HOST',\s*'.*?'/"
37
+ );
 
38
 
39
  $replace = array(
40
+ "'DB_NAME', " . "'{$db_name}'",
41
+ "'DB_USER', " . "'{$db_user}'",
42
+ "'DB_PASSWORD', " . "'{$db_pass}'",
43
+ "'DB_HOST', " . "'{$db_host}'"
44
+ );
45
 
46
  //SSL CHECKS
47
  if ($_POST['ssl_admin']) {
75
  }
76
  }
77
 
78
+ $replace = array_map('self::customEscape', $replace);
79
+ $wpconfig = preg_replace($patterns, $replace, $wpconfig);
80
+
81
  file_put_contents('wp-config.php', $wpconfig);
82
+ $wpconfig = null;
83
  }
84
 
85
  /**
86
+ * Updates the web server config files in Step 3
87
  *
88
  * @return null
89
  */
158
  return $config_file;
159
  }
160
 
161
+ /**
162
+ * Used to parse the wp-config.php file
163
+ *
164
+ * @return null
165
+ */
166
+ public static function tokenParser($wpconfig_path)
167
+ {
168
  $defines = array();
169
  $wpconfig_file = @file_get_contents($wpconfig_path);
170
 
208
  }
209
 
210
  return $defines;
 
211
  }
212
 
213
  private static function tokenStrip($value)
215
  return preg_replace('!^([\'"])(.*)\1$!', '$2', $value);
216
  }
217
 
218
+ private static function customEscape($str)
219
+ {
220
+ return str_replace('\\', '\\\\', $str);
221
+ }
222
+
223
  private static function isConstant($token)
224
  {
225
  return $token == T_CONSTANT_ENCAPSED_STRING || $token == T_STRING || $token == T_LNUMBER || $token == T_DNUMBER;
226
  }
 
 
227
  }
228
  ?>
installer/build/classes/utilities/class.u.php CHANGED
@@ -10,7 +10,6 @@
10
  */
11
  class DUPX_U
12
  {
13
-
14
  /**
15
  * Adds a slash to the end of a file or directory path
16
  *
@@ -162,11 +161,11 @@ class DUPX_U
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
  }
 
170
 
171
  /**
172
  * Display human readable byte sizes
@@ -273,6 +272,19 @@ class DUPX_U
273
  return filter_var($input, FILTER_SANITIZE_STRING);
274
  }
275
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  /**
277
  * Check PHP version
278
  *
10
  */
11
  class DUPX_U
12
  {
 
13
  /**
14
  * Adds a slash to the end of a file or directory path
15
  *
161
  * same characters that are special in the pattern. Allows for '$' to be safely passed.
162
  *
163
  * @param string $str The string to replace on
164
+ public static function pregSpecialChars($str)
 
165
  {
166
  return preg_replace('/(\$|\\\\)(?=\d)/', '\\\\\1', $str);
167
  }
168
+ * */
169
 
170
  /**
171
  * Display human readable byte sizes
272
  return filter_var($input, FILTER_SANITIZE_STRING);
273
  }
274
 
275
+ /**
276
+ * Filter the string to escape the quote
277
+ *
278
+ * @param string $val The value to escape quote
279
+ *
280
+ * @return string Returns the input value escaped
281
+ */
282
+ public static function safeQuote($val)
283
+ {
284
+ $val = addslashes($val);
285
+ return $val;
286
+ }
287
+
288
  /**
289
  * Check PHP version
290
  *
installer/build/ctrls/ctrl.step2.php CHANGED
@@ -1,460 +1,473 @@
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;
5
- $_POST['ssl_admin'] = (isset($_POST['ssl_admin'])) ? true : false;
6
- $_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
7
- $_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
8
- $_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
9
- $_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
10
- $_POST['dbcollatefb'] = isset($_POST['dbcollatefb']) ? $_POST['dbcollatefb'] : false;
11
-
12
- //LOGGING
13
- $POST_LOG = $_POST;
14
- unset($POST_LOG['dbpass']);
15
- ksort($POST_LOG);
16
-
17
- //PAGE VARS
18
- $date_time = @date('h:i:s');
19
- $root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
20
- $ajax2_start = DUPX_U::getMicrotime();
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
- $ajax1_error_level = error_reporting();
27
- error_reporting(E_ERROR);
28
-
29
- //====================================================================================================
30
- //DATABASE TEST CONNECTION
31
- //====================================================================================================
32
- if (isset($_GET['dbtest']))
33
- {
34
- $html = "";
35
- $baseport = parse_url($_POST['dbhost'], PHP_URL_PORT);
36
- $dbConn = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
37
- $dbErr = mysqli_connect_error();
38
-
39
- $dbFound = mysqli_select_db($dbConn, $_POST['dbname']);
40
- $port_view = (is_int($baseport) || substr($_POST['dbhost'], -1) == ":") ? "Port=[Set in Host]" : "Port={$_POST['dbport']}";
41
-
42
- $tstSrv = ($dbConn) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
43
- $tstDB = ($dbFound) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
44
-
45
- $dbversion_info = DUPX_DB::getServerInfo($dbConn);
46
- $dbversion_info = empty($dbversion_info) ? 'no connection' : $dbversion_info;
47
- $dbversion_info_fail = version_compare(DUPX_DB::getVersion($dbConn), '5.5.3') < 0;
48
-
49
- $dbversion_compat = DUPX_DB::getVersion($dbConn);
50
- $dbversion_compat = empty($dbversion_compat) ? 'no connection' : $dbversion_compat;
51
- $dbversion_compat_fail = version_compare($dbversion_compat, $GLOBALS['FW_VERSION_DB']) < 0;
52
-
53
- $tstInfo = ($dbversion_info_fail)
54
- ? "<div class='dupx-notice'>{$dbversion_info}</div>"
55
- : "<div class='dupx-pass'>{$dbversion_info}</div>";
56
-
57
- $tstCompat = ($dbversion_compat_fail)
58
- ? "<div class='dupx-notice'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>"
59
- : "<div class='dupx-pass'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>";
60
-
61
- $html .= <<<DATA
62
- <div class='s2-db-test'>
63
- <small>
64
- Using Connection String:<br/>
65
- Host={$_POST['dbhost']}; Database={$_POST['dbname']}; Uid={$_POST['dbuser']}; Pwd={$_POST['dbpass']}; {$port_view}
66
- </small>
67
- <table class='s2-db-test-dtls'>
68
- <tr>
69
- <td>Host:</td>
70
- <td>{$tstSrv}</td>
71
- </tr>
72
- <tr>
73
- <td>Database:</td>
74
- <td>{$tstDB}</td>
75
- </tr>
76
- <tr>
77
- <td>Version:</td>
78
- <td>{$tstInfo}</td>
79
- </tr>
80
- <tr>
81
- <td>Compatibility:</td>
82
- <td>{$tstCompat}</td>
83
- </tr>
84
- </table>
85
- DATA;
86
-
87
- //--------------------------------
88
- //WARNING: DB has tables with create option
89
- if ($_POST['dbaction'] == 'create')
90
- {
91
- $tblcount = DUPX_DB::countTables($dbConn, $_POST['dbname']);
92
- $html .= ($tblcount > 0)
93
- ? "<div class='warn-msg'><b>WARNING:</b> " . sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount) . "</div>"
94
- : '';
95
- }
96
-
97
- //WARNNG: Input has utf8
98
- $dbConnItems = array($_POST['dbhost'], $_POST['dbuser'], $_POST['dbname'],$_POST['dbpass']);
99
- $dbUTF8_tst = false;
100
- foreach ($dbConnItems as $value)
101
- {
102
- if (DUPX_U::isNonASCII($value)) {
103
- $dbUTF8_tst = true;
104
- break;
105
- }
106
- }
107
-
108
- //WARNING: UTF8 Data in Connection String
109
- $html .= (! $dbConn && $dbUTF8_tst)
110
- ? "<div class='warn-msg'><b>WARNING:</b> " . ERR_TESTDB_UTF8 . "</div>"
111
- : '';
112
-
113
- //NOTICE: Version Too Low
114
- $html .= ($dbversion_info_fail)
115
- ? "<div class='warn-msg'><b>NOTICE:</b> " . ERR_TESTDB_VERSION_INFO . "</div>"
116
- : '';
117
-
118
- //NOTICE: Version Incompatibility
119
- $html .= ($dbversion_compat_fail)
120
- ? "<div class='warn-msg'><b>NOTICE:</b> " . ERR_TESTDB_VERSION_COMPAT . "</div>"
121
- : '';
122
-
123
- $html .= "</div>";
124
- die($html);
125
- }
126
-
127
- //===============================
128
- //ERROR MESSAGES
129
- //===============================
130
- //ERR_MAKELOG
131
- ($GLOBALS['LOG_FILE_HANDLE'] != false) or DUPX_Log::error(ERR_MAKELOG);
132
-
133
- //ERR_MYSQLI_SUPPORT
134
- function_exists('mysqli_connect') or DUPX_Log::error(ERR_MYSQLI_SUPPORT);
135
-
136
- //ERR_DBCONNECT
137
- $dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
138
- @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
139
- ($dbh) or DUPX_Log::error(ERR_DBCONNECT . mysqli_connect_error());
140
- if ($_POST['dbaction'] == 'empty') {
141
- mysqli_select_db($dbh, $_POST['dbname']) or DUPX_Log::error(sprintf(ERR_DBCREATE, $_POST['dbname']));
142
- }
143
- //ERR_DBEMPTY
144
- if ($_POST['dbaction'] == 'create' ) {
145
- $tblcount = DUPX_DB::countTables($dbh, $_POST['dbname']);
146
- if ($tblcount > 0) {
147
- DUPX_Log::error(sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount));
148
- }
149
- }
150
-
151
- $log = <<<LOG
152
- \n\n********************************************************************************
153
- * DUPLICATOR-LITE: INSTALL-LOG
154
- * STEP-2 START @ {$date_time}
155
- * NOTICE: Do NOT post to public sites or forums
156
- ********************************************************************************
157
- LOG;
158
- DUPX_Log::info($log);
159
-
160
- $log = "--------------------------------------\n";
161
- $log .= "POST DATA\n";
162
- $log .= "--------------------------------------\n";
163
- $log .= print_r($POST_LOG, true);
164
- DUPX_Log::info($log, 2);
165
-
166
-
167
- //====================================================================================================
168
- //DATABASE ROUTINES
169
- //====================================================================================================
170
- $log = '';
171
- $faq_url = $GLOBALS['FAQ_URL'];
172
- $utm_prefix = '?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=';
173
- $db_file_size = filesize('database.sql');
174
- $php_mem = $GLOBALS['PHP_MEMORY_LIMIT'];
175
- $php_mem_range = DUPX_U::getBytes($GLOBALS['PHP_MEMORY_LIMIT']);
176
- $php_mem_range = $php_mem_range == null ? 0 : $php_mem_range - 5000000; //5 MB Buffer
177
-
178
- //Fatal Memory errors from file_get_contents is not catchable.
179
- //Try to warn ahead of time with a buffer in memory difference
180
- if ($db_file_size >= $php_mem_range && $php_mem_range != 0)
181
- {
182
- $db_file_size = DUPX_U::readableByteSize($db_file_size);
183
- $msg = "\nWARNING: The database script is '{$db_file_size}' in size. The PHP memory allocation is set\n";
184
- $msg .= "at '{$php_mem}'. There is a high possibility that the installer script will fail with\n";
185
- $msg .= "a memory allocation error when trying to load the database.sql file. It is\n";
186
- $msg .= "recommended to increase the 'memory_limit' setting in the php.ini config file.\n";
187
- $msg .= "see: {$faq_url}{$utm_prefix}inst_step2_lgdbscript#faq-trouble-056-q \n";
188
- DUPX_Log::info($msg);
189
- }
190
-
191
- @chmod("{$root_path}/database.sql", 0777);
192
- $sql_file = file_get_contents('database.sql', true);
193
-
194
- //ERROR: Reading database.sql file
195
- if ($sql_file === FALSE || strlen($sql_file) < 10)
196
- {
197
- $msg = "<b>Unable to read the database.sql file from the archive. Please check these items:</b> <br/>";
198
- $msg .= "1. Validate permissions and/or group-owner rights on these items: <br/>";
199
- $msg .= " - File: database.sql <br/> - Directory: [{$root_path}] <br/>";
200
- $msg .= "<i>see: <a href='{$faq_url}{$utm_prefix}inst_step2_dbperms#faq-trouble-055-q' target='_blank'>{$faq_url}#faq-trouble-055-q</a></i> <br/>";
201
- $msg .= "2. Validate the database.sql file exists and is in the root of the archive.zip file <br/>";
202
- $msg .= "<i>see: <a href='{$faq_url}{$utm_prefix}inst_step2_sqlroot#faq-installer-020-q' target='_blank'>{$faq_url}#faq-installer-020-q</a></i> <br/>";
203
- DUPX_Log::error($msg);
204
- }
205
-
206
- //Removes invalid space characters
207
- //Complex Subject See: http://webcollab.sourceforge.net/unicode.html
208
- if ($_POST['dbnbsp'])
209
- {
210
- DUPX_Log::info("NOTICE: Ran fix non-breaking space characters\n");
211
- $sql_file = preg_replace('/\xC2\xA0/', ' ', $sql_file);
212
- }
213
-
214
- //Write new contents to install-data.sql
215
- $sql_file_copy_status = file_put_contents($GLOBALS['SQL_FILE_NAME'], $sql_file);
216
- $sql_result_file_data = explode(";\n", $sql_file);
217
- $sql_result_file_length = count($sql_result_file_data);
218
- $sql_result_file_path = "{$root_path}/{$GLOBALS['SQL_FILE_NAME']}";
219
- $sql_file = null;
220
- $db_collatefb_log = '';
221
-
222
- if($_POST['dbcollatefb']){
223
- $supportedCollations = DUPX_DB::getSupportedCollationsList($dbh);
224
- $collation_arr = array(
225
- 'utf8mb4_unicode_520_ci',
226
- 'utf8mb4_unicode_520',
227
- 'utf8mb4_unicode_ci',
228
- 'utf8mb4',
229
- 'utf8_unicode_520_ci',
230
- 'utf8_unicode_520',
231
- 'utf8_unicode_ci',
232
- 'utf8'
233
- );
234
- $latest_supported_collation = '';
235
- $latest_supported_index = -1;
236
-
237
- foreach ($collation_arr as $key => $val){
238
- if(in_array($val,$supportedCollations)){
239
- $latest_supported_collation = $val;
240
- $latest_supported_index = $key;
241
- break;
242
- }
243
- }
244
-
245
- //No need to replace if current DB is up to date
246
- if($latest_supported_index != 0){
247
- for($i=0; $i < $latest_supported_index; $i++){
248
- foreach ($sql_result_file_data as $index => $col_sql_query){
249
- if(strpos($col_sql_query,$collation_arr[$i]) !== false){
250
- $sql_result_file_data[$index] = str_replace($collation_arr[$i], $latest_supported_collation, $col_sql_query);
251
- if(strpos($collation_arr[$i],'utf8mb4') !== false && strpos($latest_supported_collation,'utf8mb4') === false){
252
- $sql_result_file_data[$index] = str_replace('utf8mb4','utf8',$sql_result_file_data[$index]);
253
- }
254
- $sub_query = str_replace("\n", '', substr($col_sql_query, 0, 75));
255
- $db_collatefb_log .= " - Collation '{$collation_arr[$i]}' set to '{$latest_supported_collation}' on query [{$sub_query}...]\n";
256
- }
257
- }
258
- }
259
- }
260
- }
261
-
262
- //WARNING: Create installer-data.sql failed
263
- if ($sql_file_copy_status === FALSE || filesize($sql_result_file_path) == 0 || !is_readable($sql_result_file_path))
264
- {
265
- $sql_file_size = DUPX_U::readableByteSize(filesize('database.sql'));
266
- $msg = "\nWARNING: Unable to properly copy database.sql ({$sql_file_size}) to {$GLOBALS['SQL_FILE_NAME']}. Please check these items:\n";
267
- $msg .= "- Validate permissions and/or group-owner rights on database.sql and directory [{$root_path}] \n";
268
- $msg .= "- see: {$faq_url}{$utm_prefix}inst_step2_copydbsql#faq-trouble-055-q \n";
269
- DUPX_Log::info($msg);
270
- }
271
-
272
- //=================================
273
- //START DB RUN
274
- @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
275
- @mysqli_query($dbh, "SET max_allowed_packet = {$GLOBALS['DB_MAX_PACKETS']}");
276
- DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
277
-
278
- //Will set mode to null only for this db handle session
279
- //sql_mode can cause db create issues on some systems
280
- $qry_session_custom = true;
281
- switch ($_POST['dbmysqlmode']) {
282
- case 'DISABLE':
283
- @mysqli_query($dbh, "SET SESSION sql_mode = ''");
284
- break;
285
- case 'CUSTOM':
286
- $dbmysqlmode_opts = $_POST['dbmysqlmode_opts'];
287
- $qry_session_custom = @mysqli_query($dbh, "SET SESSION sql_mode = '{$dbmysqlmode_opts}'");
288
- if ($qry_session_custom == false) {
289
- $sql_error = mysqli_error($dbh);
290
- $log = "WARNING: Trying to set a custom sql_mode setting issue has been detected:\n{$sql_error}.\n";
291
- $log .= "For more details visit: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html\n";
292
- }
293
- break;
294
- }
295
-
296
- //Set defaults in-case the variable could not be read
297
- $dbvar_maxtime = DUPX_DB::getVariable($dbh, 'wait_timeout');
298
- $dbvar_maxpacks = DUPX_DB::getVariable($dbh, 'max_allowed_packet');
299
- $dbvar_sqlmode = DUPX_DB::getVariable($dbh, 'sql_mode');
300
- $dbvar_maxtime = is_null($dbvar_maxtime) ? 300 : $dbvar_maxtime;
301
- $dbvar_maxpacks = is_null($dbvar_maxpacks) ? 1048576 : $dbvar_maxpacks;
302
- $dbvar_sqlmode = empty($dbvar_sqlmode) ? 'NOT_SET' : $dbvar_sqlmode;
303
- $dbvar_version = DUPX_DB::getVersion($dbh);
304
- $sql_file_size1 = DUPX_U::readableByteSize(@filesize("database.sql"));
305
- $sql_file_size2 = DUPX_U::readableByteSize(@filesize("{$GLOBALS['SQL_FILE_NAME']}"));
306
- $db_collatefb = isset($_POST['dbcollatefb']) ? 'On' : 'Off';
307
-
308
-
309
- DUPX_Log::info("--------------------------------------");
310
- DUPX_Log::info("DATABASE ENVIRONMENT");
311
- DUPX_Log::info("--------------------------------------");
312
- DUPX_Log::info("MYSQL VERSION:\tThis Server: {$dbvar_version} -- Build Server: {$GLOBALS['FW_VERSION_DB']}");
313
- DUPX_Log::info("FILE SIZE:\tdatabase.sql ({$sql_file_size1}) - installer-data.sql ({$sql_file_size2})");
314
- DUPX_Log::info("TIMEOUT:\t{$dbvar_maxtime}");
315
- DUPX_Log::info("MAXPACK:\t{$dbvar_maxpacks}");
316
- DUPX_Log::info("SQLMODE:\t{$dbvar_sqlmode}");
317
- DUPX_Log::info("NEW SQL FILE:\t[{$sql_result_file_path}]");
318
- DUPX_Log::info("COLLATE RESET:\t{$db_collatefb}\n{$db_collatefb_log}");
319
-
320
- if ($qry_session_custom == false) {
321
- DUPX_Log::info("\n{$log}\n");
322
- }
323
-
324
- //CREATE DB
325
- switch ($_POST['dbaction']) {
326
- case "create":
327
- mysqli_query($dbh, "CREATE DATABASE IF NOT EXISTS `{$_POST['dbname']}`");
328
- mysqli_select_db($dbh, $_POST['dbname'])
329
- or DUPX_Log::error(sprintf(ERR_DBCONNECT_CREATE, $_POST['dbname']));
330
- break;
331
- case "empty":
332
- //DROP DB TABLES
333
- $drop_log = "Database already empty. Ready for install.";
334
- $sql = "SHOW FULL TABLES WHERE Table_Type != 'VIEW'";
335
- $found_tables = null;
336
- if ($result = mysqli_query($dbh, $sql)) {
337
- while ($row = mysqli_fetch_row($result)) {
338
- $found_tables[] = $row[0];
339
- }
340
- if (count($found_tables) > 0) {
341
- foreach ($found_tables as $table_name) {
342
- $sql = "DROP TABLE `{$_POST['dbname']}`.`{$table_name}`";
343
- if (!$result = mysqli_query($dbh, $sql)) {
344
- DUPX_Log::error(sprintf(ERR_DBTRYCLEAN, $_POST['dbname']));
345
- }
346
- }
347
- }
348
- $drop_log = count($found_tables);
349
- }
350
- break;
351
- }
352
-
353
-
354
- //WRITE DATA
355
- DUPX_Log::info("--------------------------------------");
356
- DUPX_Log::info("DATABASE RESULTS");
357
- DUPX_Log::info("--------------------------------------");
358
- $profile_start = DUPX_U::getMicrotime();
359
- $fcgi_buffer_pool = 5000;
360
- $fcgi_buffer_count = 0;
361
- $dbquery_rows = 0;
362
- $dbtable_rows = 1;
363
- $dbquery_errs = 0;
364
- $counter = 0;
365
- @mysqli_autocommit($dbh, false);
366
-
367
- while ($counter < $sql_result_file_length) {
368
-
369
- $query_strlen = strlen(trim($sql_result_file_data[$counter]));
370
-
371
- if ($dbvar_maxpacks < $query_strlen) {
372
-
373
- DUPX_Log::info("**ERROR** Query size limit [length={$query_strlen}] [sql=" . substr($sql_result_file_data[$counter], 0, 75) . "...]");
374
- $dbquery_errs++;
375
-
376
- } elseif ($query_strlen > 0) {
377
-
378
- @mysqli_free_result(@mysqli_query($dbh, ($sql_result_file_data[$counter])));
379
- $err = mysqli_error($dbh);
380
-
381
- //Check to make sure the connection is alive
382
- if (!empty($err)) {
383
-
384
- if (!mysqli_ping($dbh)) {
385
- mysqli_close($dbh);
386
- $dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport'] );
387
- // Reset session setup
388
- @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
389
- DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
390
- }
391
- DUPX_Log::info("**ERROR** database error write '{$err}' - [sql=" . substr($sql_result_file_data[$counter], 0, 75) . "...]");
392
- $dbquery_errs++;
393
-
394
- //Buffer data to browser to keep connection open
395
- } else {
396
- if ($GLOBALS['DB_FCGI_FLUSH'] && $fcgi_buffer_count++ > $fcgi_buffer_pool) {
397
- $fcgi_buffer_count = 0;
398
- DUPX_U::fcgiFlush();
399
- }
400
- $dbquery_rows++;
401
- }
402
- }
403
- $counter++;
404
- }
405
- @mysqli_commit($dbh);
406
- @mysqli_autocommit($dbh, true);
407
-
408
- DUPX_Log::info("ERRORS FOUND:\t{$dbquery_errs}");
409
- DUPX_Log::info("TABLES DROPPED:\t{$drop_log}");
410
- DUPX_Log::info("QUERIES RAN:\t{$dbquery_rows}\n");
411
-
412
- $dbtable_count = 0;
413
- if ($result = mysqli_query($dbh, "SHOW TABLES")) {
414
- while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) {
415
- $table_rows = DUPX_DB::countTableRows($dbh, $row[0]);
416
- $dbtable_rows += $table_rows;
417
- DUPX_Log::info("{$row[0]}: ({$table_rows})");
418
- $dbtable_count++;
419
- }
420
- @mysqli_free_result($result);
421
- }
422
-
423
- if ($dbtable_count == 0) {
424
- DUPX_Log::error("No tables where created during step 2 of the install. Please review the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for
425
- 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
426
- during the package creation process then the database server version your using may not be compatible with this script.\n");
427
- }
428
-
429
-
430
- //DATA CLEANUP: Perform Transient Cache Cleanup
431
- //Remove all duplicator entries and record this one since this is a new install.
432
- $dbdelete_count = 0;
433
- @mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}duplicator_packages`");
434
- $dbdelete_count1 = @mysqli_affected_rows($dbh) or 0;
435
- @mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` LIKE ('_transient%') OR `option_name` LIKE ('_site_transient%')");
436
- $dbdelete_count2 = @mysqli_affected_rows($dbh) or 0;
437
- $dbdelete_count = (abs($dbdelete_count1) + abs($dbdelete_count2));
438
- DUPX_Log::info("\nRemoved '{$dbdelete_count}' cache/transient rows");
439
- //Reset Duplicator Options
440
- foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
441
- mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` = '{$value}'");
442
- }
443
-
444
- @mysqli_close($dbh);
445
-
446
- //FINAL RESULTS
447
- $profile_end = DUPX_U::getMicrotime();
448
- $ajax2_end = DUPX_U::getMicrotime();
449
- $ajax1_sum = DUPX_U::elapsedTime($ajax2_end, $ajax2_start);
450
- DUPX_Log::info("\nCREATE/INSTALL RUNTIME: " . DUPX_U::elapsedTime($profile_end, $profile_start));
451
- DUPX_Log::info('STEP-2 COMPLETE @ ' . @date('h:i:s') . " - RUNTIME: {$ajax1_sum}");
452
-
453
- $JSON['pass'] = 1;
454
- $JSON['table_count'] = $dbtable_count;
455
- $JSON['table_rows'] = $dbtable_rows;
456
- $JSON['query_errs'] = $dbquery_errs;
457
- echo json_encode($JSON);
458
- error_reporting($ajax1_error_level);
459
- die('');
 
 
 
 
 
 
 
 
 
 
 
 
 
460
  ?>
1
+ <?php
2
+ //POST PARAMS
3
+ $_POST['dbaction'] = isset($_POST['dbaction']) ? $_POST['dbaction'] : 'create';
4
+ $_POST['dbhost'] = isset($_POST['dbhost']) ? DUPX_U::sanitize(trim($_POST['dbhost'])) : null;
5
+ $_POST['dbname'] = isset($_POST['dbname']) ? trim($_POST['dbname']) : null;
6
+ $_POST['dbuser'] = isset($_POST['dbuser']) ? $_POST['dbuser'] : null;
7
+ $_POST['dbpass'] = isset($_POST['dbpass']) ? $_POST['dbpass'] : null;
8
+ $_POST['dbcharset'] = isset($_POST['dbcharset']) ? DUPX_U::sanitize(trim($_POST['dbcharset'])) : $GLOBALS['DBCHARSET_DEFAULT'];
9
+ $_POST['dbcollate'] = isset($_POST['dbcollate']) ? DUPX_U::sanitize(trim($_POST['dbcollate'])) : $GLOBALS['DBCOLLATE_DEFAULT'];
10
+ $_POST['dbnbsp'] = (isset($_POST['dbnbsp']) && $_POST['dbnbsp'] == '1') ? true : false;
11
+ $_POST['ssl_admin'] = (isset($_POST['ssl_admin'])) ? true : false;
12
+ $_POST['cache_wp'] = (isset($_POST['cache_wp'])) ? true : false;
13
+ $_POST['cache_path'] = (isset($_POST['cache_path'])) ? true : false;
14
+ $_POST['archive_name'] = isset($_POST['archive_name']) ? $_POST['archive_name'] : null;
15
+ $_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
16
+ $_POST['dbcollatefb'] = isset($_POST['dbcollatefb']) ? $_POST['dbcollatefb'] : false;
17
+
18
+ //LOGGING
19
+ $POST_LOG = $_POST;
20
+ unset($POST_LOG['dbpass']);
21
+ ksort($POST_LOG);
22
+
23
+ //PAGE VARS
24
+ $date_time = @date('h:i:s');
25
+ $root_path = DUPX_U::setSafePath($GLOBALS['CURRENT_ROOT_PATH']);
26
+ $ajax2_start = DUPX_U::getMicrotime();
27
+ $JSON = array();
28
+ $JSON['pass'] = 0;
29
+
30
+ /** JSON RESPONSE: Most sites have warnings turned off by default, but if they're turned on the warnings
31
+ cause errors in the JSON data Here we hide the status so warning level is reset at it at the end*/
32
+ $ajax1_error_level = error_reporting();
33
+ error_reporting(E_ERROR);
34
+
35
+ //====================================================================================================
36
+ //DATABASE TEST CONNECTION
37
+ //====================================================================================================
38
+ if (isset($_GET['dbtest']))
39
+ {
40
+ $html = "";
41
+ $baseport = parse_url($_POST['dbhost'], PHP_URL_PORT);
42
+ $dbConn = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
43
+ $dbErr = mysqli_connect_error();
44
+
45
+ $dbFound = mysqli_select_db($dbConn, $_POST['dbname']);
46
+ $port_view = (is_int($baseport) || substr($_POST['dbhost'], -1) == ":") ? "Port=[Set in Host]" : "Port={$_POST['dbport']}";
47
+
48
+ $tstSrv = ($dbConn) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
49
+ $tstDB = ($dbFound) ? "<div class='dupx-pass'>Success</div>" : "<div class='dupx-fail'>Fail</div>";
50
+
51
+ $dbversion_info = DUPX_DB::getServerInfo($dbConn);
52
+ $dbversion_info = empty($dbversion_info) ? 'no connection' : $dbversion_info;
53
+ $dbversion_info_fail = $dbConn && version_compare(DUPX_DB::getVersion($dbConn), '5.5.3') < 0;
54
+
55
+ $dbversion_compat = DUPX_DB::getVersion($dbConn);
56
+ $dbversion_compat = empty($dbversion_compat) ? 'no connection' : $dbversion_compat;
57
+ $dbversion_compat_fail = $dbConn && version_compare($dbversion_compat, $GLOBALS['FW_VERSION_DB']) < 0;
58
+
59
+ $tstInfo = ($dbversion_info_fail)
60
+ ? "<div class='dupx-notice'>{$dbversion_info}</div>"
61
+ : "<div class='dupx-pass'>{$dbversion_info}</div>";
62
+
63
+ $tstCompat = ($dbversion_compat_fail)
64
+ ? "<div class='dupx-notice'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>"
65
+ : "<div class='dupx-pass'>This Server: [{$dbversion_compat}] -- Package Server: [{$GLOBALS['FW_VERSION_DB']}]</div>";
66
+
67
+ $html .= <<<DATA
68
+ <div class='s2-db-test'>
69
+ <small>
70
+ Using Connection String:<br/>
71
+ Host={$_POST['dbhost']}; Database={$_POST['dbname']}; Uid={$_POST['dbuser']}; Pwd={$_POST['dbpass']}; {$port_view}
72
+ </small>
73
+ <table class='s2-db-test-dtls'>
74
+ <tr>
75
+ <td>Host:</td>
76
+ <td>{$tstSrv}</td>
77
+ </tr>
78
+ <tr>
79
+ <td>Database:</td>
80
+ <td>{$tstDB}</td>
81
+ </tr>
82
+ <tr>
83
+ <td>Version:</td>
84
+ <td>{$tstInfo}</td>
85
+ </tr>
86
+ <tr>
87
+ <td>Compatibility:</td>
88
+ <td>{$tstCompat}</td>
89
+ </tr>
90
+ </table>
91
+ DATA;
92
+
93
+ //--------------------------------
94
+ //WARNING: Unable to connect
95
+ $html .= (!$dbConn || !$dbFound)
96
+ ? "<div class='warn-msg'>" . ERR_DBCONNECT_INFO . "</div>"
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
+ if (DUPX_U::isNonASCII($value)) {
113
+ $dbUTF8_tst = true;
114
+ break;
115
+ }
116
+ }
117
+
118
+ //WARNING: UTF8 Data in Connection String
119
+ $html .= (!$dbConn && $dbUTF8_tst)
120
+ ? "<div class='warn-msg'><b>WARNING:</b> " . ERR_TESTDB_UTF8 . "</div>"
121
+ : '';
122
+
123
+ //NOTICE: Version Too Low
124
+ $html .= ($dbversion_info_fail)
125
+ ? "<div class='warn-msg'><b>NOTICE:</b> " . ERR_TESTDB_VERSION_INFO . "</div>"
126
+ : '';
127
+
128
+ //NOTICE: Version Incompatibility
129
+ $html .= ($dbversion_compat_fail)
130
+ ? "<div class='warn-msg'><b>NOTICE:</b> " . ERR_TESTDB_VERSION_COMPAT . "</div>"
131
+ : '';
132
+
133
+ $html .= "</div>";
134
+ die($html);
135
+ }
136
+
137
+ //===============================
138
+ //ERROR MESSAGES
139
+ //===============================
140
+
141
+ //ERR_MAKELOG
142
+ ($GLOBALS['LOG_FILE_HANDLE'] != false) or DUPX_Log::error(ERR_MAKELOG);
143
+
144
+ //ERR_MYSQLI_SUPPORT
145
+ function_exists('mysqli_connect') or DUPX_Log::error(ERR_MYSQLI_SUPPORT);
146
+
147
+ //ERR_DBCONNECT
148
+ $dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], null, $_POST['dbport']);
149
+ @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
150
+ ($dbh) or DUPX_Log::error(ERR_DBCONNECT . mysqli_connect_error());
151
+ if ($_POST['dbaction'] == 'empty') {
152
+ mysqli_select_db($dbh, $_POST['dbname']) or DUPX_Log::error(sprintf(ERR_DBCREATE, $_POST['dbname']));
153
+ }
154
+ //ERR_DBEMPTY
155
+ if ($_POST['dbaction'] == 'create' ) {
156
+ $tblcount = DUPX_DB::countTables($dbh, $_POST['dbname']);
157
+ if ($tblcount > 0) {
158
+ DUPX_Log::error(sprintf(ERR_DBEMPTY, $_POST['dbname'], $tblcount));
159
+ }
160
+ }
161
+
162
+
163
+
164
+ $log = <<<LOG
165
+ \n\n********************************************************************************
166
+ * DUPLICATOR-LITE: INSTALL-LOG
167
+ * STEP-2 START @ {$date_time}
168
+ * NOTICE: Do NOT post to public sites or forums
169
+ ********************************************************************************
170
+ LOG;
171
+ DUPX_Log::info($log);
172
+
173
+ $log = "--------------------------------------\n";
174
+ $log .= "POST DATA\n";
175
+ $log .= "--------------------------------------\n";
176
+ $log .= print_r($POST_LOG, true);
177
+ DUPX_Log::info($log, 2);
178
+
179
+
180
+ //====================================================================================================
181
+ //DATABASE ROUTINES
182
+ //====================================================================================================
183
+ $log = '';
184
+ $faq_url = $GLOBALS['FAQ_URL'];
185
+ $utm_prefix = '?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=';
186
+ $db_file_size = filesize('database.sql');
187
+ $php_mem = $GLOBALS['PHP_MEMORY_LIMIT'];
188
+ $php_mem_range = DUPX_U::getBytes($GLOBALS['PHP_MEMORY_LIMIT']);
189
+ $php_mem_range = $php_mem_range == null ? 0 : $php_mem_range - 5000000; //5 MB Buffer
190
+
191
+ //Fatal Memory errors from file_get_contents is not catchable.
192
+ //Try to warn ahead of time with a buffer in memory difference
193
+ if ($db_file_size >= $php_mem_range && $php_mem_range != 0)
194
+ {
195
+ $db_file_size = DUPX_U::readableByteSize($db_file_size);
196
+ $msg = "\nWARNING: The database script is '{$db_file_size}' in size. The PHP memory allocation is set\n";
197
+ $msg .= "at '{$php_mem}'. There is a high possibility that the installer script will fail with\n";
198
+ $msg .= "a memory allocation error when trying to load the database.sql file. It is\n";
199
+ $msg .= "recommended to increase the 'memory_limit' setting in the php.ini config file.\n";
200
+ $msg .= "see: {$faq_url}{$utm_prefix}inst_step2_lgdbscript#faq-trouble-056-q \n";
201
+ DUPX_Log::info($msg);
202
+ }
203
+
204
+ @chmod("{$root_path}/database.sql", 0777);
205
+ $sql_file = file_get_contents('database.sql', true);
206
+
207
+ //ERROR: Reading database.sql file
208
+ if ($sql_file === FALSE || strlen($sql_file) < 10)
209
+ {
210
+ $msg = "<b>Unable to read the database.sql file from the archive. Please check these items:</b> <br/>";
211
+ $msg .= "1. Validate permissions and/or group-owner rights on these items: <br/>";
212
+ $msg .= " - File: database.sql <br/> - Directory: [{$root_path}] <br/>";
213
+ $msg .= "<i>see: <a href='{$faq_url}{$utm_prefix}inst_step2_dbperms#faq-trouble-055-q' target='_blank'>{$faq_url}#faq-trouble-055-q</a></i> <br/>";
214
+ $msg .= "2. Validate the database.sql file exists and is in the root of the archive.zip file <br/>";
215
+ $msg .= "<i>see: <a href='{$faq_url}{$utm_prefix}inst_step2_sqlroot#faq-installer-020-q' target='_blank'>{$faq_url}#faq-installer-020-q</a></i> <br/>";
216
+ DUPX_Log::error($msg);
217
+ }
218
+
219
+ //Removes invalid space characters
220
+ //Complex Subject See: http://webcollab.sourceforge.net/unicode.html
221
+ if ($_POST['dbnbsp'])
222
+ {
223
+ DUPX_Log::info("NOTICE: Ran fix non-breaking space characters\n");
224
+ $sql_file = preg_replace('/\xC2\xA0/', ' ', $sql_file);
225
+ }
226
+
227
+ //Write new contents to install-data.sql
228
+ $sql_file_copy_status = file_put_contents($GLOBALS['SQL_FILE_NAME'], $sql_file);
229
+ $sql_result_file_data = explode(";\n", $sql_file);
230
+ $sql_result_file_length = count($sql_result_file_data);
231
+ $sql_result_file_path = "{$root_path}/{$GLOBALS['SQL_FILE_NAME']}";
232
+ $sql_file = null;
233
+ $db_collatefb_log = '';
234
+
235
+ if($_POST['dbcollatefb']){
236
+ $supportedCollations = DUPX_DB::getSupportedCollationsList($dbh);
237
+ $collation_arr = array(
238
+ 'utf8mb4_unicode_520_ci',
239
+ 'utf8mb4_unicode_520',
240
+ 'utf8mb4_unicode_ci',
241
+ 'utf8mb4',
242
+ 'utf8_unicode_520_ci',
243
+ 'utf8_unicode_520',
244
+ 'utf8_unicode_ci',
245
+ 'utf8'
246
+ );
247
+ $latest_supported_collation = '';
248
+ $latest_supported_index = -1;
249
+
250
+ foreach ($collation_arr as $key => $val){
251
+ if(in_array($val,$supportedCollations)){
252
+ $latest_supported_collation = $val;
253
+ $latest_supported_index = $key;
254
+ break;
255
+ }
256
+ }
257
+
258
+ //No need to replace if current DB is up to date
259
+ if($latest_supported_index != 0){
260
+ for($i=0; $i < $latest_supported_index; $i++){
261
+ foreach ($sql_result_file_data as $index => $col_sql_query){
262
+ if(strpos($col_sql_query,$collation_arr[$i]) !== false){
263
+ $sql_result_file_data[$index] = str_replace($collation_arr[$i], $latest_supported_collation, $col_sql_query);
264
+ if(strpos($collation_arr[$i],'utf8mb4') !== false && strpos($latest_supported_collation,'utf8mb4') === false){
265
+ $sql_result_file_data[$index] = str_replace('utf8mb4','utf8',$sql_result_file_data[$index]);
266
+ }
267
+ $sub_query = str_replace("\n", '', substr($col_sql_query, 0, 75));
268
+ $db_collatefb_log .= " - Collation '{$collation_arr[$i]}' set to '{$latest_supported_collation}' on query [{$sub_query}...]\n";
269
+ }
270
+ }
271
+ }
272
+ }
273
+ }
274
+
275
+ //WARNING: Create installer-data.sql failed
276
+ if ($sql_file_copy_status === FALSE || filesize($sql_result_file_path) == 0 || !is_readable($sql_result_file_path))
277
+ {
278
+ $sql_file_size = DUPX_U::readableByteSize(filesize('database.sql'));
279
+ $msg = "\nWARNING: Unable to properly copy database.sql ({$sql_file_size}) to {$GLOBALS['SQL_FILE_NAME']}. Please check these items:\n";
280
+ $msg .= "- Validate permissions and/or group-owner rights on database.sql and directory [{$root_path}] \n";
281
+ $msg .= "- see: {$faq_url}{$utm_prefix}inst_step2_copydbsql#faq-trouble-055-q \n";
282
+ DUPX_Log::info($msg);
283
+ }
284
+
285
+ //=================================
286
+ //START DB RUN
287
+ @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
288
+ @mysqli_query($dbh, "SET max_allowed_packet = {$GLOBALS['DB_MAX_PACKETS']}");
289
+ DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
290
+
291
+ //Will set mode to null only for this db handle session
292
+ //sql_mode can cause db create issues on some systems
293
+ $qry_session_custom = true;
294
+ switch ($_POST['dbmysqlmode']) {
295
+ case 'DISABLE':
296
+ @mysqli_query($dbh, "SET SESSION sql_mode = ''");
297
+ break;
298
+ case 'CUSTOM':
299
+ $dbmysqlmode_opts = $_POST['dbmysqlmode_opts'];
300
+ $qry_session_custom = @mysqli_query($dbh, "SET SESSION sql_mode = '{$dbmysqlmode_opts}'");
301
+ if ($qry_session_custom == false) {
302
+ $sql_error = mysqli_error($dbh);
303
+ $log = "WARNING: Trying to set a custom sql_mode setting issue has been detected:\n{$sql_error}.\n";
304
+ $log .= "For more details visit: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html\n";
305
+ }
306
+ break;
307
+ }
308
+
309
+ //Set defaults in-case the variable could not be read
310
+ $dbvar_maxtime = DUPX_DB::getVariable($dbh, 'wait_timeout');
311
+ $dbvar_maxpacks = DUPX_DB::getVariable($dbh, 'max_allowed_packet');
312
+ $dbvar_sqlmode = DUPX_DB::getVariable($dbh, 'sql_mode');
313
+ $dbvar_maxtime = is_null($dbvar_maxtime) ? 300 : $dbvar_maxtime;
314
+ $dbvar_maxpacks = is_null($dbvar_maxpacks) ? 1048576 : $dbvar_maxpacks;
315
+ $dbvar_sqlmode = empty($dbvar_sqlmode) ? 'NOT_SET' : $dbvar_sqlmode;
316
+ $dbvar_version = DUPX_DB::getVersion($dbh);
317
+ $sql_file_size1 = DUPX_U::readableByteSize(@filesize("database.sql"));
318
+ $sql_file_size2 = DUPX_U::readableByteSize(@filesize("{$GLOBALS['SQL_FILE_NAME']}"));
319
+ $db_collatefb = isset($_POST['dbcollatefb']) ? 'On' : 'Off';
320
+
321
+
322
+ DUPX_Log::info("--------------------------------------");
323
+ DUPX_Log::info("DATABASE ENVIRONMENT");
324
+ DUPX_Log::info("--------------------------------------");
325
+ DUPX_Log::info("MYSQL VERSION:\tThis Server: {$dbvar_version} -- Build Server: {$GLOBALS['FW_VERSION_DB']}");
326
+ DUPX_Log::info("FILE SIZE:\tdatabase.sql ({$sql_file_size1}) - installer-data.sql ({$sql_file_size2})");
327
+ DUPX_Log::info("TIMEOUT:\t{$dbvar_maxtime}");
328
+ DUPX_Log::info("MAXPACK:\t{$dbvar_maxpacks}");
329
+ DUPX_Log::info("SQLMODE:\t{$dbvar_sqlmode}");
330
+ DUPX_Log::info("NEW SQL FILE:\t[{$sql_result_file_path}]");
331
+ DUPX_Log::info("COLLATE RESET:\t{$db_collatefb}\n{$db_collatefb_log}");
332
+
333
+ if ($qry_session_custom == false) {
334
+ DUPX_Log::info("\n{$log}\n");
335
+ }
336
+
337
+ //CREATE DB
338
+ switch ($_POST['dbaction']) {
339
+ case "create":
340
+ mysqli_query($dbh, "CREATE DATABASE IF NOT EXISTS `{$_POST['dbname']}`");
341
+ mysqli_select_db($dbh, $_POST['dbname'])
342
+ or DUPX_Log::error(sprintf(ERR_DBCONNECT_CREATE, $_POST['dbname']));
343
+ break;
344
+ case "empty":
345
+ //DROP DB TABLES
346
+ $drop_log = "Database already empty. Ready for install.";
347
+ $sql = "SHOW FULL TABLES WHERE Table_Type != 'VIEW'";
348
+ $found_tables = null;
349
+ if ($result = mysqli_query($dbh, $sql)) {
350
+ while ($row = mysqli_fetch_row($result)) {
351
+ $found_tables[] = $row[0];
352
+ }
353
+ if (count($found_tables) > 0) {
354
+ foreach ($found_tables as $table_name) {
355
+ $sql = "DROP TABLE `{$_POST['dbname']}`.`{$table_name}`";
356
+ if (!$result = mysqli_query($dbh, $sql)) {
357
+ DUPX_Log::error(sprintf(ERR_DBTRYCLEAN, $_POST['dbname']));
358
+ }
359
+ }
360
+ }
361
+ $drop_log = count($found_tables);
362
+ }
363
+ break;
364
+ }
365
+
366
+
367
+ //WRITE DATA
368
+ DUPX_Log::info("--------------------------------------");
369
+ DUPX_Log::info("DATABASE RESULTS");
370
+ DUPX_Log::info("--------------------------------------");
371
+ $profile_start = DUPX_U::getMicrotime();
372
+ $fcgi_buffer_pool = 5000;
373
+ $fcgi_buffer_count = 0;
374
+ $dbquery_rows = 0;
375
+ $dbtable_rows = 1;
376
+ $dbquery_errs = 0;
377
+ $counter = 0;
378
+ @mysqli_autocommit($dbh, false);
379
+
380
+ while ($counter < $sql_result_file_length) {
381
+
382
+ $query_strlen = strlen(trim($sql_result_file_data[$counter]));
383
+
384
+ if ($dbvar_maxpacks < $query_strlen) {
385
+
386
+ DUPX_Log::info("**ERROR** Query size limit [length={$query_strlen}] [sql=" . substr($sql_result_file_data[$counter], 0, 75) . "...]");
387
+ $dbquery_errs++;
388
+
389
+ } elseif ($query_strlen > 0) {
390
+
391
+ @mysqli_free_result(@mysqli_query($dbh, ($sql_result_file_data[$counter])));
392
+ $err = mysqli_error($dbh);
393
+
394
+ //Check to make sure the connection is alive
395
+ if (!empty($err)) {
396
+
397
+ if (!mysqli_ping($dbh)) {
398
+ mysqli_close($dbh);
399
+ $dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], $_POST['dbpass'], $_POST['dbname'], $_POST['dbport'] );
400
+ // Reset session setup
401
+ @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
402
+ DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
403
+ }
404
+ DUPX_Log::info("**ERROR** database error write '{$err}' - [sql=" . substr($sql_result_file_data[$counter], 0, 75) . "...]");
405
+ $dbquery_errs++;
406
+
407
+ //Buffer data to browser to keep connection open
408
+ } else {
409
+ if ($GLOBALS['DB_FCGI_FLUSH'] && $fcgi_buffer_count++ > $fcgi_buffer_pool) {
410
+ $fcgi_buffer_count = 0;
411
+ DUPX_U::fcgiFlush();
412
+ }
413
+ $dbquery_rows++;
414
+ }
415
+ }
416
+ $counter++;
417
+ }
418
+ @mysqli_commit($dbh);
419
+ @mysqli_autocommit($dbh, true);
420
+
421
+ DUPX_Log::info("ERRORS FOUND:\t{$dbquery_errs}");
422
+ DUPX_Log::info("TABLES DROPPED:\t{$drop_log}");
423
+ DUPX_Log::info("QUERIES RAN:\t{$dbquery_rows}\n");
424
+
425
+ $dbtable_count = 0;
426
+ if ($result = mysqli_query($dbh, "SHOW TABLES")) {
427
+ while ($row = mysqli_fetch_array($result, MYSQLI_NUM)) {
428
+ $table_rows = DUPX_DB::countTableRows($dbh, $row[0]);
429
+ $dbtable_rows += $table_rows;
430
+ DUPX_Log::info("{$row[0]}: ({$table_rows})");
431
+ $dbtable_count++;
432
+ }
433
+ @mysqli_free_result($result);
434
+ }
435
+
436
+ if ($dbtable_count == 0) {
437
+ DUPX_Log::error("No tables where created during step 2 of the install. Please review the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for
438
+ 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
439
+ during the package creation process then the database server version your using may not be compatible with this script.\n");
440
+ }
441
+
442
+
443
+ //DATA CLEANUP: Perform Transient Cache Cleanup
444
+ //Remove all duplicator entries and record this one since this is a new install.
445
+ $dbdelete_count = 0;
446
+ @mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}duplicator_packages`");
447
+ $dbdelete_count1 = @mysqli_affected_rows($dbh) or 0;
448
+ @mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` LIKE ('_transient%') OR `option_name` LIKE ('_site_transient%')");
449
+ $dbdelete_count2 = @mysqli_affected_rows($dbh) or 0;
450
+ $dbdelete_count = (abs($dbdelete_count1) + abs($dbdelete_count2));
451
+ DUPX_Log::info("\nRemoved '{$dbdelete_count}' cache/transient rows");
452
+ //Reset Duplicator Options
453
+ foreach ($GLOBALS['FW_OPTS_DELETE'] as $value) {
454
+ mysqli_query($dbh, "DELETE FROM `{$GLOBALS['FW_TABLEPREFIX']}options` WHERE `option_name` = '{$value}'");
455
+ }
456
+
457
+ @mysqli_close($dbh);
458
+
459
+ //FINAL RESULTS
460
+ $profile_end = DUPX_U::getMicrotime();
461
+ $ajax2_end = DUPX_U::getMicrotime();
462
+ $ajax1_sum = DUPX_U::elapsedTime($ajax2_end, $ajax2_start);
463
+ DUPX_Log::info("\nCREATE/INSTALL RUNTIME: " . DUPX_U::elapsedTime($profile_end, $profile_start));
464
+ DUPX_Log::info('STEP-2 COMPLETE @ ' . @date('h:i:s') . " - RUNTIME: {$ajax1_sum}");
465
+
466
+ $JSON['pass'] = 1;
467
+ $JSON['table_count'] = $dbtable_count;
468
+ $JSON['table_rows'] = $dbtable_rows;
469
+ $JSON['query_errs'] = $dbquery_errs;
470
+ echo json_encode($JSON);
471
+ error_reporting($ajax1_error_level);
472
+ die('');
473
  ?>
installer/build/ctrls/ctrl.step3.php CHANGED
@@ -15,14 +15,12 @@ error_reporting(E_ERROR);
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']);
20
- $charset_server = @mysqli_character_set_name($dbh);
21
- @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
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;
@@ -33,6 +31,16 @@ $_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
  $_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
35
  $_POST['exe_safe_mode'] = isset($_POST['exe_safe_mode']) ? $_POST['exe_safe_mode'] : 0;
 
 
 
 
 
 
 
 
 
 
36
  //LOGGING
37
  $POST_LOG = $_POST;
38
  unset($POST_LOG['tables']);
@@ -324,8 +332,6 @@ $JSON['step3']['warn_all'] = empty($JSON['step3']['warnlist']) ? 0 : count($JSON
324
 
325
  mysqli_close($dbh);
326
 
327
-
328
-
329
  $ajax2_end = DUPX_U::getMicrotime();
330
  $ajax2_sum = DUPX_U::elapsedTime($ajax2_end, $ajax2_start);
331
  DUPX_Log::info("\nSTEP 3 COMPLETE @ " . @date('h:i:s') . " - RUNTIME: {$ajax2_sum}\n\n");
15
 
16
  $ajax2_start = DUPX_U::getMicrotime();
17
 
 
 
 
 
 
 
18
  //POST PARAMS
19
+ $_POST['dbhost'] = isset($_POST['dbhost']) ? DUPX_U::sanitize(trim($_POST['dbhost'])) : null;
20
+ $_POST['dbname'] = isset($_POST['dbname']) ? trim($_POST['dbname']) : null;
21
+ $_POST['dbuser'] = isset($_POST['dbuser']) ? $_POST['dbuser'] : null;
22
+ $_POST['dbpass'] = isset($_POST['dbpass']) ? $_POST['dbpass'] : null;
23
+ $_POST['blogname'] = isset($_POST['blogname']) ? DUPX_U::sanitize(trim($_POST['blogname'])): '';
24
  $_POST['postguid'] = isset($_POST['postguid']) && $_POST['postguid'] == 1 ? 1 : 0;
25
  $_POST['fullsearch'] = isset($_POST['fullsearch']) && $_POST['fullsearch'] == 1 ? 1 : 0;
26
  $_POST['path_old'] = isset($_POST['path_old']) ? trim($_POST['path_old']) : null;
31
  $_POST['url_new'] = isset($_POST['url_new']) ? rtrim(trim($_POST['url_new']), '/') : null;
32
  $_POST['retain_config'] = (isset($_POST['retain_config']) && $_POST['retain_config'] == '1') ? true : false;
33
  $_POST['exe_safe_mode'] = isset($_POST['exe_safe_mode']) ? $_POST['exe_safe_mode'] : 0;
34
+
35
+
36
+
37
+ //MYSQL CONNECTION
38
+ $dbh = DUPX_DB::connect($_POST['dbhost'], $_POST['dbuser'], html_entity_decode($_POST['dbpass']), $_POST['dbname'], $_POST['dbport']);
39
+ $charset_server = @mysqli_character_set_name($dbh);
40
+ @mysqli_query($dbh, "SET wait_timeout = {$GLOBALS['DB_MAX_TIME']}");
41
+ DUPX_DB::setCharset($dbh, $_POST['dbcharset'], $_POST['dbcollate']);
42
+
43
+
44
  //LOGGING
45
  $POST_LOG = $_POST;
46
  unset($POST_LOG['tables']);
332
 
333
  mysqli_close($dbh);
334
 
 
 
335
  $ajax2_end = DUPX_U::getMicrotime();
336
  $ajax2_sum = DUPX_U::elapsedTime($ajax2_end, $ajax2_start);
337
  DUPX_Log::info("\nSTEP 3 COMPLETE @ " . @date('h:i:s') . " - RUNTIME: {$ajax2_sum}\n\n");
installer/build/main.installer.php CHANGED
@@ -81,13 +81,14 @@ if (!isset($_SERVER['REQUEST_URI'])) {
81
  }
82
 
83
  //COMPARE VALUES
84
- $GLOBALS['DUPX_DEBUG'] = false;
85
- $GLOBALS['FW_CREATED'] = '%fwrite_created%';
86
- $GLOBALS['FW_VERSION_DUP'] = '%fwrite_version_dup%';
87
- $GLOBALS['FW_VERSION_WP'] = '%fwrite_version_wp%';
88
- $GLOBALS['FW_VERSION_DB'] = '%fwrite_version_db%';
89
- $GLOBALS['FW_VERSION_PHP'] = '%fwrite_version_php%';
90
- $GLOBALS['FW_VERSION_OS'] = '%fwrite_version_os%';
 
91
  //GENERAL
92
  $GLOBALS['FW_TABLEPREFIX'] = '%fwrite_wp_tableprefix%';
93
  $GLOBALS['FW_URL_OLD'] = '%fwrite_url_old%';
@@ -102,6 +103,8 @@ $GLOBALS['FW_DBPORT'] = empty($GLOBALS['FW_DBPORT']) ? 3306 : $GLOBALS['FW_DBP
102
  $GLOBALS['FW_DBNAME'] = '%fwrite_dbname%';
103
  $GLOBALS['FW_DBUSER'] = '%fwrite_dbuser%';
104
  $GLOBALS['FW_DBPASS'] = '%fwrite_dbpass%';
 
 
105
  $GLOBALS['FW_BLOGNAME'] = '%fwrite_blogname%';
106
  $GLOBALS['FW_WPROOT'] = '%fwrite_wproot%';
107
  $GLOBALS['FW_WPLOGIN_URL'] = '%fwrite_wplogin_url%';
@@ -141,7 +144,16 @@ define("DUPLICATOR_INIT", 1);
141
  define("DUPLICATOR_SSDIR_NAME", 'wp-snapshots'); //This should match DUPLICATOR_SSDIR_NAME in duplicator.php
142
 
143
  //SHARED POST PARMS
144
- $_POST['action_step'] = isset($_POST['action_step']) ? $_POST['action_step'] : "1";
 
 
 
 
 
 
 
 
 
145
 
146
  /** Host has several combinations :
147
  localhost | localhost:55 | localhost: | http://localhost | http://localhost:55 */
@@ -181,9 +193,19 @@ if ($_POST['action_step'] == 1 && ! isset($_GET['help'])) {
181
  @@CLASS.ENGINE.PHP@@
182
  @@CLASS.CONF.WP.PHP@@
183
  @@CLASS.CONF.SRV.PHP@@
 
 
184
  <?php
185
  if (isset($_POST['action_ajax'])) :
186
 
 
 
 
 
 
 
 
 
187
  //Alternative control switch structer will not work in this case
188
  //see: http://php.net/manual/en/control-structures.alternative-syntax.php
189
  //Some clients will create double spaces such as the FTP client which
@@ -204,7 +226,6 @@ if (isset($_POST['action_ajax'])) :
204
  endif;
205
  ?>
206
 
207
-
208
  <!DOCTYPE html>
209
  <html>
210
  <head>
@@ -235,15 +256,24 @@ HEADER TEMPLATE: Common header on all steps -->
235
  version: <?php echo $GLOBALS['FW_DUPLICATOR_VERSION'] ?><br/>
236
  &raquo; <a href="javascript:void(0)" onclick="DUPX.showServerInfo()">info</a>
237
  &raquo; <a href="?help=1" target="_blank">help</a>
 
 
 
 
 
 
238
  </td>
239
  </tr>
240
  </table>
241
 
242
- <?php if ($GLOBALS['FW_ARCHIVE_ONLYDB']) :?>
243
- <div style="position: relative">
244
- <div class="archive-onlydb">Database Only Mode</div>
 
 
 
245
  </div>
246
- <?php endif; ?>
247
 
248
  <!-- =========================================
249
  FORM DATA: Data Steps -->
@@ -252,6 +282,9 @@ FORM DATA: Data Steps -->
252
 
253
  if (! isset($_GET['help'])) {
254
  switch ($_POST['action_step']) {
 
 
 
255
  case "1" :
256
  ?> @@VIEW.STEP1.PHP@@ <?php
257
  break;
81
  }
82
 
83
  //COMPARE VALUES
84
+ $GLOBALS['DUPX_DEBUG'] = false;
85
+ $GLOBALS['DUPX_DBPASS_CHECK'] = true;
86
+ $GLOBALS['FW_CREATED'] = '%fwrite_created%';
87
+ $GLOBALS['FW_VERSION_DUP'] = '%fwrite_version_dup%';
88
+ $GLOBALS['FW_VERSION_WP'] = '%fwrite_version_wp%';
89
+ $GLOBALS['FW_VERSION_DB'] = '%fwrite_version_db%';
90
+ $GLOBALS['FW_VERSION_PHP'] = '%fwrite_version_php%';
91
+ $GLOBALS['FW_VERSION_OS'] = '%fwrite_version_os%';
92
  //GENERAL
93
  $GLOBALS['FW_TABLEPREFIX'] = '%fwrite_wp_tableprefix%';
94
  $GLOBALS['FW_URL_OLD'] = '%fwrite_url_old%';
103
  $GLOBALS['FW_DBNAME'] = '%fwrite_dbname%';
104
  $GLOBALS['FW_DBUSER'] = '%fwrite_dbuser%';
105
  $GLOBALS['FW_DBPASS'] = '%fwrite_dbpass%';
106
+ $GLOBALS['FW_SECUREON'] = '%fwrite_secureon%';
107
+ $GLOBALS['FW_SECUREPASS'] = '%fwrite_securepass%';
108
  $GLOBALS['FW_BLOGNAME'] = '%fwrite_blogname%';
109
  $GLOBALS['FW_WPROOT'] = '%fwrite_wproot%';
110
  $GLOBALS['FW_WPLOGIN_URL'] = '%fwrite_wplogin_url%';
144
  define("DUPLICATOR_SSDIR_NAME", 'wp-snapshots'); //This should match DUPLICATOR_SSDIR_NAME in duplicator.php
145
 
146
  //SHARED POST PARMS
147
+ $_POST['action_step'] = isset($_POST['action_step']) ? $_POST['action_step'] : "0";
148
+ $_POST['secure-pass'] = isset($_POST['secure-pass']) ? $_POST['secure-pass'] : '';
149
+
150
+ if ($GLOBALS['FW_SECUREON']) {
151
+ $pass_hasher = new DUPX_PasswordHash(8, FALSE);
152
+ $pass_check = $pass_hasher->CheckPassword(base64_encode($_POST['secure-pass']), $GLOBALS['FW_SECUREPASS']);
153
+ if (! $pass_check) {
154
+ $_POST['action_step'] = 0;
155
+ }
156
+ }
157
 
158
  /** Host has several combinations :
159
  localhost | localhost:55 | localhost: | http://localhost | http://localhost:55 */
193
  @@CLASS.ENGINE.PHP@@
194
  @@CLASS.CONF.WP.PHP@@
195
  @@CLASS.CONF.SRV.PHP@@
196
+ @@CLASS.HTTP.PHP@@
197
+ @@CLASS.PASSWORD.PHP@@
198
  <?php
199
  if (isset($_POST['action_ajax'])) :
200
 
201
+ if ($GLOBALS['FW_SECUREON']) {
202
+ $pass_hasher = new DUPX_PasswordHash(8, FALSE);
203
+ $pass_check = $pass_hasher->CheckPassword(base64_encode($_POST['secure-pass']), $GLOBALS['FW_SECUREPASS']);
204
+ if (! $pass_check) {
205
+ die("Unauthorized Access: Please provide a password!");
206
+ }
207
+ }
208
+
209
  //Alternative control switch structer will not work in this case
210
  //see: http://php.net/manual/en/control-structures.alternative-syntax.php
211
  //Some clients will create double spaces such as the FTP client which
226
  endif;
227
  ?>
228
 
 
229
  <!DOCTYPE html>
230
  <html>
231
  <head>
256
  version: <?php echo $GLOBALS['FW_DUPLICATOR_VERSION'] ?><br/>
257
  &raquo; <a href="javascript:void(0)" onclick="DUPX.showServerInfo()">info</a>
258
  &raquo; <a href="?help=1" target="_blank">help</a>
259
+ <?php
260
+ echo ' &raquo; <a href="?help=1#secure" target="_blank">';
261
+ echo ($GLOBALS['FW_SECUREON']) ? 'locked</a>' : '<i class="secure-unlocked">unlocked</i></a>';
262
+
263
+ ?>
264
+
265
  </td>
266
  </tr>
267
  </table>
268
 
269
+ <div style="position: relative">
270
+ <div class="installer-mode">
271
+ <?php
272
+ echo 'Mode: ';
273
+ echo ($GLOBALS['FW_ARCHIVE_ONLYDB']) ? 'Database Only' : 'Standard';
274
+ ?>
275
  </div>
276
+ </div>
277
 
278
  <!-- =========================================
279
  FORM DATA: Data Steps -->
282
 
283
  if (! isset($_GET['help'])) {
284
  switch ($_POST['action_step']) {
285
+ case "0" :
286
+ ?> @@VIEW.INIT1.PHP@@ <?php
287
+ break;
288
  case "1" :
289
  ?> @@VIEW.STEP1.PHP@@ <?php
290
  break;
installer/build/view.help.php CHANGED
@@ -1,500 +1,598 @@
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: Deployment</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</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>Validation</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 <b class="dupx-pass">Pass</b>/<b class="dupx-fail">Fail</b> 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 identify any possible issues that might occur. If this section shows a
45
- <b class="dupx-pass">Good</b>/<b class="dupx-fail">Warn</b> for various checks. Click on the title link and read the overview for how to solve the test.
46
- <br/><br/>
47
-
48
- <h3>MultiSite <sup>pro</sup></h3>
49
- The multisite option allows users with a pro Business or Gold license to perform additional multi-site tasks. All licenses can backup & migrate standalone sites
50
- and full multisite networks. Multisite Plus+ (business and above) adds the ability to install a subsite as a standalone site.
51
- <br/><br/>
52
-
53
- <h3>Options</h3>
54
- The options for step 1 can help better prepare your site should your server need additional settings beyond most general configuration.
55
- <table class="help-opt">
56
- <tr>
57
- <th>Option</th>
58
- <th>Details</th>
59
- </tr>
60
- <tr>
61
- <td colspan="2" class="section">General Options</td>
62
- </tr>
63
- <tr>
64
- <td>Extraction</td>
65
- <td>
66
- <b>Manual Archive Extraction</b><br/>
67
- Set the Extraction value to "Manual Archive Extraction" when the archive file has already been manually extracted on the server. This can be done through your hosts
68
- control panel such as cPanel or by your host directly. This setting can be helpful if you have a large archive files or are having issues with the installer extracting
69
- the file due to timeout issues.
70
- <br/><br/>
71
-
72
- <b>PHP ZipArchive</b><br/>
73
- This extraction method will use the PHP <a href="http://php.net/manual/en/book.zip.php" target="_blank">ZipArchive</a> code to extract the archive zip file.
74
- <br/><br/>
75
-
76
- <b>Shell-Exec Unzip</b> <sup>pro</sup><br/>
77
- This extraction method will use the PHP <a href="http://php.net/manual/en/function.shell-exec.php" target="_blank">shell_exec</a> to call the system unzip
78
- command on the server. This is the default mode that is used if its avail on the server.
79
- <br/><br/>
80
-
81
- </td>
82
- </tr>
83
- <tr>
84
- <td>Permissions <sup>pro</sup></td>
85
- <td>
86
- <b>All Files:</b> Check the 'All Files' check-box and enter in the desired <a href="http://php.net/manual/en/function.chmod.php" target="_blank">chmod command</a>
87
- to recursively set the octal value on all the files being extracted. Typically this value is 644 on most servers and hosts.
88
- <br/><br/>
89
-
90
- <b>All Directories:</b> Check the 'All Directories' check-box and enter in the desired <a href="http://php.net/manual/en/function.chmod.php" target="_blank">chmod command</a>
91
- to recursively set octal value on all the directories being extracted. Typically this value is 755 on most servers and hosts.
92
- </td>
93
- </tr>
94
- <tr>
95
- <td colspan="2" class="section">Advanced Options</td>
96
- </tr>
97
- <tr>
98
- <td>Safe Mode</td>
99
- <td>
100
- Safe mode is designed to configure the site with specific options at install time to help over come issues that may happen during the install were the site
101
- is having issues. These options should only be used if you run into issues after you have tried to run an install.
102
- <br/><br/>
103
- <b>Basic:</b> This safe mode option will disable all the plugins at install time. When this option is set you will need to re-enable all plugins after the
104
- install has full ran.
105
- <br/><br/>
106
-
107
- <b>Advanced:</b> This option applies all settings used in basic and will also de-activate and reactivate your theme when logging in for the first time. This
108
- options should be used only if the Basic option did not work.
109
- </td>
110
- </tr>
111
- <tr>
112
- <td>Config Files <sup>pro</sup></td>
113
- <td>
114
- 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.
115
- 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
116
- both files. This is needed because the original files that were archived in most cases will not play well in the new environment.
117
- <br/><br/>
118
-
119
- 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
120
- 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
121
- know how to properly configure either the .htaccess or web.config files on your server.
122
- </td>
123
- </tr>
124
-
125
- <tr>
126
- <td>File Times</td>
127
- <td>When the archive is extracted should it show the current date-time or keep the original time it had when it was built. This setting will be applied to
128
- all files and directories.</td>
129
- </tr>
130
- <tr>
131
- <td>Logging</td>
132
- <td>
133
- The level of detail that will be sent to the log file (installer-log.txt). The recommend setting for most installs should be 'Light'.
134
- Note if you use Debug the amount of data written can be very large. Debug is only recommended for support.
135
- </td>
136
- </tr>
137
-
138
- </table>
139
- <br/><br/>
140
-
141
- <h3>Notices</h3>
142
- To proceed with the install users must check the checkbox labeled " I have read and accept all terms &amp; notices". This means you accept the term of using the software
143
- and are aware of any notices.
144
- <br/><br/>
145
-
146
- </div>
147
- <br/>
148
-
149
-
150
- <!-- ============================================
151
- STEP 2
152
- ============================================== -->
153
- <a class="help-target" name="help-s2"></a>
154
- <h2>Step <span class="step">2</span> of 4: Install Database</h2>
155
- <div id="dup-help-step1" class="help-page">
156
-
157
- <h3>Basic/cPanel:</h3>
158
- 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
159
- 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>.
160
- This option will automatically show you the existing databases and users on your cPanel server and allow you to create new databases directly
161
- from the installer.
162
- <br/><br/>
163
-
164
- <h3>cPanel Login <sup>pro</sup></h3>
165
- <i>The cPanel connectivity option is only available for Duplicator Pro.</i>
166
- <table class="help-opt">
167
- <tr>
168
- <th>Option</th>
169
- <th>Details</th>
170
- </tr>
171
- <tr>
172
- <td>Host</td>
173
- <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.
174
- 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
175
- "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
176
- hosting provider or server administrator.</td>
177
- </tr>
178
- <tr>
179
- <td>Username</td>
180
- <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>.
181
- If your unsure of this name please contact your hosting provider or server administrator.</td>
182
- </tr>
183
- <tr>
184
- <td>Password</td>
185
- <td>The password of the cPanel user</td>
186
- </tr>
187
- <tr>
188
- <td>Troubleshoot</td>
189
- <td>
190
- <b>Common cPanel Connection Issues:</b><br/>
191
- - Your host does not use <a href="http://cpanel.com/" target="_blank">cPanel Software</a> <br/>
192
- - Your host has disabled cPanel API access <br/>
193
- - Your host has configured cPanel to work differently (please contact your host) <br/>
194
- - View a list of valid cPanel <a href='https://snapcreek.com/wordpress-hosting/' target='_blank'>Supported Hosts</a>
195
- </td>
196
- </tr>
197
- </table>
198
- <br/><br/>
199
-
200
- <!-- DATABASE SETUP-->
201
- <h3>Setup</h3>
202
- The database setup options allow you to connect to an existing database or in the case of cPanel connect or create a new database.
203
- <table class="help-opt">
204
- <tr>
205
- <th>Option</th>
206
- <th>Details</th>
207
- </tr>
208
- <tr>
209
- <td>Action</td>
210
- <td>
211
- <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
212
- 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
213
- 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
214
- cPanel account.
215
- <br/><br/>
216
-
217
- <b>Connect and Remove All Data:</b> This options will DELETE all tables in the database you are connecting to. Please make sure you have
218
- backups of all your data before using an portion of the installer, as this option WILL remove all data.
219
- <br/><br/>
220
-
221
- <b>Connect and Backup Any Existing Data:</b><sup>pro</sup> This options will RENAME all tables in the database you are connecting to with a prefix of
222
- "<?php echo $GLOBALS['DB_RENAME_PREFIX'] ?>".
223
- <br/><br/>
224
-
225
- <b>Manual SQL Execution:</b><sup>pro</sup> This options requires that you manually run your own SQL import to an existing database before running the installer.
226
- 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
227
- be a valid WordPress installed database. This option is viable when you need to run advanced search and replace options on the database.
228
- <br/><br/>
229
-
230
- </td>
231
- </tr>
232
- <tr>
233
- <td>Host</td>
234
- <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
235
- 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.
236
- 'localhost:3306'.</td>
237
- </tr>
238
- <tr>
239
- <td>Database</td>
240
- <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
241
- do not. Be sure to know exactly how your host requires the database name to be entered.</td>
242
- </tr>
243
- <tr>
244
- <td>User</td>
245
- <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.
246
- <i>This is <b>not</b> the same thing as your WordPress administrator account</i>.</td>
247
- </tr>
248
- <tr>
249
- <td>Password</td>
250
- <td>The password of the MySQL database server user.</td>
251
- </tr>
252
-
253
- </table>
254
- <br/><br/>
255
-
256
- <!-- OPTIONS-->
257
- <h3>Options</h3>
258
- <table class="help-opt">
259
- <tr>
260
- <th>Option</th>
261
- <th>Details</th>
262
- </tr>
263
- <tr>
264
- <td>Prefix<sup>pro*</sup></td>
265
- <td>By default, databases are prefixed with the cPanel account's username (for example, myusername_databasename). However you can ignore this option if
266
- your host does not use the default cPanel username prefix schema. Check the 'Ignore cPanel Prefix' and the username prefixes will be ignored.
267
- 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
268
- disabled prefix settings. Please see your host full requirements when using the cPanel options.</td>
269
- </tr>
270
- <tr>
271
- <td>Legacy</td>
272
- <td>When creating a database table, the Mysql version being used may not support the collation type of the Mysql version where the table was created.
273
- In this scenario, the installer will fallback to a legacy collation type to try and create the table. This value should only be checked if you receive an error when
274
- testing the database.
275
- <br/><br/>
276
- For example, if the database was created on MySQL 5.7 and the tables collation type was 'utf8mb4_unicode_520_ci', however your trying to run the installer
277
- on an older MySQL 5.5 engine that does not support that type then an error will be thrown. If this option is checked then the legacy setting will try to
278
- use 'utf8mb4_unicode_520', then 'utf8mb4', then 'utf8' and so on until it runs out of options.
279
- <br/><br/>
280
- For more information about this feature see the online FAQ question titled
281
- <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-110-q" target="_blank">"What is compatibility mode & 'unknown collation' errors"</a>
282
- </td>
283
- </tr>
284
- <tr>
285
- <td>Spacing</td>
286
- <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
287
- marks in you posts</td>
288
- </tr>
289
- <tr>
290
- <td>Mode</td>
291
- <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
292
- 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>
293
- </tr>
294
- <tr>
295
- <td>Charset</td>
296
- <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
297
- databases character set should be.</td>
298
- </tr>
299
- <tr>
300
- <td>Collation</td>
301
- <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
302
- databases collation set should be.</td>
303
- </tr>
304
- </table>
305
- <sup>*cPanel Only Option</sup>
306
- <br/><br/>
307
-
308
- <h3>Validation</h3>
309
- Testing the database connection is important and can help isolate possible issues that may arise with database version and compatibility issues.
310
-
311
- <table class="help-opt">
312
- <tr>
313
- <th>Option</th>
314
- <th>Details</th>
315
- </tr>
316
- <tr>
317
- <td>Test<br/>Database</td>
318
- <td>
319
- The 'Test Database' button will help validate if the connection parameters are correct for this server and help with details about any issues
320
- that may arise.
321
- </td>
322
- </tr>
323
- <tr>
324
- <td>Troubleshoot</td>
325
- <td>
326
- <b>Common Database Connection Issues:</b><br/>
327
- - Double check case sensitive values 'User', 'Password' &amp; the 'Database Name' <br/>
328
- - Validate the database and database user exist on this server <br/>
329
- - Check if the database user has the correct permission levels to this database <br/>
330
- - The host 'localhost' may not work on all hosting providers <br/>
331
- - Contact your hosting provider for the exact required parameters <br/>
332
- - Visit the online resources 'Common FAQ page' <br/>
333
-
334
- </td>
335
- </tr>
336
- </table>
337
- <br/><br/>
338
- </div><br/>
339
-
340
-
341
- <!-- ============================================
342
- STEP 3
343
- ============================================== -->
344
- <a class="help-target" name="help-s3"></a>
345
- <h2>Step <span class="step">3</span> of 4: Update Data</h2>
346
- <div id="dup-help-step2" class="help-page">
347
-
348
- <!-- SETTINGS-->
349
- <h3>New Settings</h3>
350
- These are the new values (URL, Path and Title) you can update for the new location at which your site will be installed at.
351
- <br/><br/>
352
-
353
- <h3>Replace <sup>pro</sup></h3>
354
- 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
355
- 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
356
- full URL or file paths with this option.
357
- <br/><br/>
358
-
359
- <!-- ADVANCED OPTS -->
360
- <h3>Options</h3>
361
- <table class="help-opt">
362
- <tr>
363
- <th>Option</th>
364
- <th>Details</th>
365
- </tr>
366
- <tr>
367
- <td colspan="2" class="section">New Admin Account</td>
368
- </tr>
369
- <tr>
370
- <td>Username</td>
371
- <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>
372
- </tr>
373
- <tr>
374
- <td>Password</td>
375
- <td>The new password for the new user. Must be at least 6 characters long.</td>
376
- </tr>
377
- <tr>
378
- <td colspan="2" class="section">Scan Options</td>
379
- </tr>
380
- <tr>
381
- <td>Cleanup <sup>pro</sup></td>
382
- <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>
383
- </tr>
384
- <tr>
385
- <td>Old URL</td>
386
- <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>
387
- </tr>
388
- <tr>
389
- <td>Old Path</td>
390
- <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>
391
- </tr>
392
- <tr>
393
- <td>Site URL</td>
394
- <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>
395
- </tr>
396
- <tr>
397
- <td>Scan Tables</td>
398
- <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>
399
- </tr>
400
- <tr>
401
- <td>Activate Plugins</td>
402
- <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>
403
- </tr>
404
- <tr>
405
- <td>Full Search</td>
406
- <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.
407
- Use this option if you have issues with data not updating correctly.</td>
408
- </tr>
409
- <tr>
410
- <td>Post GUID</td>
411
- <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>
412
- </tr>
413
- <tr>
414
- <td colspan="2" class="section">WP-Config File</td>
415
- </tr>
416
- <tr>
417
- <td>Config SSL</td>
418
- <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"
419
- will turn off SSL support for WordPress Logins.</td>
420
- </tr>
421
- <tr>
422
- <td>Config Cache</td>
423
- <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"
424
- sets WPCACHEHOME in your wp-config file to nothing if true, otherwise nothing is changed.</td>
425
- </tr>
426
- </table>
427
- <br/><br/>
428
- </div><br/>
429
-
430
-
431
- <!-- ============================================
432
- STEP 4
433
- ============================================== -->
434
- <a class="help-target" name="help-s4"></a>
435
- <h2>Step <span class="step">4</span> of 4: Test Site</h2>
436
- <div id="dup-help-step3" class="help-page">
437
- <h3>Final Steps</h3>
438
-
439
- <b>Review Install Report</b><br/>
440
- The install report is designed to give you a synopsis of the possible errors and warnings that may exist after the installation is completed.
441
- <br/><br/>
442
-
443
- <b>Test Site</b><br/>
444
- After the install is complete run through your entire site and test all pages and posts.
445
- <br/><br/>
446
-
447
- <b>Security Cleanup</b><br/>
448
- When you're completed with the installation please delete all installation files. Leaving these files on your server can impose a security risk!
449
- <br/><br/>
450
-
451
- </div>
452
-
453
-
454
- <a class="help-target" name="help-s5"></a>
455
- <h2>Troubleshooting Tips</h2>
456
- <div id="troubleshoot" class="help-page">
457
-
458
- <div style="padding: 0px 10px 10px 10px;">
459
- <b>Common Quick Fix Issues:</b>
460
- <ul>
461
- <li>Use an <a href='https://snapcreek.com/wordpress-hosting/' target='_blank'>approved hosting provider</a></li>
462
- <li>Validate directory and file permissions (see below)</li>
463
- <li>Validate web server configuration file (see below)</li>
464
- <li>Clear your browsers cache</li>
465
- <li>Deactivate and reactivate all plugins</li>
466
- <li>Resave a plugins settings if it reports errors</li>
467
- <li>Make sure your root directory is empty</li>
468
- </ul>
469
-
470
- <b>Permissions:</b><br/>
471
- 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>
472
- <br/><br/>
473
-
474
- <b>Web server configuration files:</b><br/>
475
- 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.
476
- <br/><br/>
477
-
478
- <b>Cache Systems:</b><br/>
479
- 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.
480
- <br/><br/>
481
-
482
- <b>Trying Again:</b><br/>
483
- 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.
484
- <br/><br/>
485
-
486
- <b>Additional Notes:</b><br/>
487
- 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.
488
- 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.
489
- If you have a large log file that needs evaluated please email the file, or attach it to a help ticket.
490
- <br/><br/>
491
-
492
- </div>
493
-
494
- </div>
495
-
496
- <div style="text-align:center">For additional help please visit the <a href="https://snapcreek.com/support/docs/" target="_blank">online resources</a></div>
497
-
498
- <br/><br/>
499
- </div>
500
- <!-- END OF VIEW HELP -->
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ //The help for both pro and lite are shared. Pro is where the master lives. Use the flag below to
3
+ //indicate if this help lives in lite or pro
4
+ $pro_version = false;
5
+ ?>
6
+ <!-- =========================================
7
+ HELP FORM -->
8
+ <div id="main-help">
9
+ <div class="help-online"><br/>
10
+ <i class="fa fa-file-text-o"></i> For complete help visit the
11
+ <a href="https://snapcreek.com/support/docs/" target="_blank">Online Knowledge-Base</a> <br/>
12
+ <small>Features available only in Duplicator Pro are flagged with a <sup>pro</sup> tag.</small>
13
+ </div>
14
+
15
+ <h2>Installer Security</h2>
16
+ <a name="help-s1-init"></a>
17
+ <div id="dup-help-installer" class="help-page">
18
+ The installer security screen will allow for basic password protection on the installer. The password is set at package creation time. The password
19
+ 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.
20
+ <br/><br/>
21
+
22
+ 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.
23
+ To validate the password just typed you can toggle the view by clicking on the lock icon. For detail on how to override this setting visit the online FAQ for
24
+ <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-030-q" target="_blank">more details</a>.
25
+
26
+ <table class="help-opt">
27
+ <tr>
28
+ <th>Option</th>
29
+ <th>Details</th>
30
+ </tr>
31
+ <tr>
32
+ <td>Locked</td>
33
+ <td>
34
+ "Locked" means a password is protecting each step of the installer. This option is recommended on all installers
35
+ that are accessible via a public URL but not required.
36
+ </td>
37
+ </tr>
38
+ <tr>
39
+ <td>Unlocked</td>
40
+ <td>
41
+ "Unlocked" means that if your installer is on a public server that anyone can access it. This is a less secure way to run your installer. If you are running the
42
+ installer very quickly then removing all the installer files, then the chances of exposing it is going to be low depending on your sites access history.
43
+ <br/><br/>
44
+
45
+ While it is not required to have a password set it is recommended. If your URL has little to no traffic or has never been the target of an attack
46
+ then running the installer without a password is going to be relatively safe if ran quickly. However, a password is always a good idea. Also, it is
47
+ absolutely required and recommended to remove <u>all</u> installer files after installation is completed by logging into the WordPress admin and
48
+ following the Duplicator prompts.
49
+ </td>
50
+ </tr>
51
+ </table>
52
+ </div>
53
+
54
+ <!-- ============================================
55
+ STEP 1
56
+ ============================================== -->
57
+ <a class="help-target" name="help-s1"></a>
58
+ <h2>Step <span class="step">1</span> of 4: Deployment</h2>
59
+ <div id="dup-help-scanner" class="help-page">
60
+ There are currently several modes that the installer can be in. The mode will be shown at the top of each screen. Below is an overview of the various modes.
61
+
62
+ <table class="help-opt">
63
+ <tr>
64
+ <th>Option</th>
65
+ <th>Details</th>
66
+ </tr>
67
+ <tr>
68
+ <td>Standard Install</td>
69
+ <td>
70
+ This mode indicates that the installer and archive have been placed into an empty directory and the site is ready for a fresh/new redeployment.
71
+ This is the most common mode and the mode that has been around the longest.
72
+ </td>
73
+ </tr>
74
+ <tr>
75
+ <td>Standard Install <br/> Database Only</td>
76
+ <td>
77
+ This mode indicates that the installer and archive were manually moved or transferred to a location and that only the Database will be installed
78
+ at this location.
79
+ </td>
80
+ </tr>
81
+ <?php if ($pro_version) : ?>
82
+ <tr>
83
+ <td>Overwrite Install</td>
84
+ <td>
85
+ This mode indicates that the installer was started in a location that contains an existing site -or- the archive file was imported into an existing site using
86
+ Duplicator Pro on the destination site (see Duplicator Pro &gt; Tools &gt; Import). In both cases <b>the existing site will be overwritten.</b>
87
+ </td>
88
+ </tr>
89
+ <tr>
90
+ <td>Overwrite Install <br/> Database Only</td>
91
+ <td>
92
+ This mode indicates that the installer was started in a location that contains an existing site -or- the archive file was imported into an existing site using
93
+ Duplicator Pro on the destination site (see Duplicator Pro &gt; Tools &gt; Import). In both cases <b>the existing site's database will be overwritten.</b>
94
+ </td>
95
+ </tr>
96
+ <?php endif; ?>
97
+ </table>
98
+ <br/><br/>
99
+
100
+
101
+ The "Extract Archive" screen is separated into four sections:
102
+ <br/><br/>
103
+
104
+ <h3>Archive</h3>
105
+ 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
106
+ 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
107
+ for this section to get a pass status.
108
+ <br/><br/>
109
+ 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
110
+ complete package. Additional information such as the archive size and the package notes are mentioned in this section.
111
+ <br/><br/>
112
+
113
+ <h3>Validation</h3>
114
+ This section shows the installers system requirements and notices. All requirements must pass in order to proceed to Step 2. Each requirement will show
115
+ a <b class="dupx-pass">Pass</b>/<b class="dupx-fail">Fail</b> status. Notices on the other hand are <u>not</u> required in order to continue with the install.
116
+ <br/><br/>
117
+
118
+ Notices are simply checks that will help you identify any possible issues that might occur. If this section shows a
119
+ <b class="dupx-pass">Good</b>/<b class="dupx-fail">Warn</b> for various checks. Click on the title link and read the overview for how to solve the test.
120
+ <br/><br/>
121
+
122
+ <h3>Multisite <sup>pro</sup></h3>
123
+ The multisite option allows users with a Pro Business or Gold license to perform additional multi-site tasks. All licenses can backup & migrate standalone sites
124
+ and full multisite networks. Multisite Plus+ (business and above) adds the ability to install a subsite as a standalone site.
125
+ <br/><br/>
126
+
127
+ <h3>Options</h3>
128
+ The options for step 1 can help better prepare your site should your server need additional settings beyond most general configuration.
129
+ <table class="help-opt">
130
+ <tr>
131
+ <th>Option</th>
132
+ <th>Details</th>
133
+ </tr>
134
+ <tr>
135
+ <td colspan="2" class="section">General Options</td>
136
+ </tr>
137
+ <tr>
138
+ <td>Extraction</td>
139
+ <td>
140
+ <b>Manual Archive Extraction</b><br/>
141
+ Set the Extraction value to "Manual Archive Extraction" when the archive file has already been manually extracted on the server. This can be done through your hosts
142
+ control panel such as cPanel or by your host directly. This setting can be helpful if you have a large archive files or are having issues with the installer extracting
143
+ the file due to timeout issues.
144
+ <br/><br/>
145
+
146
+ <b>PHP ZipArchive</b><br/>
147
+ This extraction method will use the PHP <a href="http://php.net/manual/en/book.zip.php" target="_blank">ZipArchive</a> code to extract the archive zip file.
148
+ <br/><br/>
149
+
150
+ <b>Shell-Exec Unzip</b><br/>
151
+ This extraction method will use the PHP <a href="http://php.net/manual/en/function.shell-exec.php" target="_blank">shell_exec</a> to call the system unzip
152
+ command on the server. This is the default mode that is used if its avail on the server.
153
+ <br/><br/>
154
+
155
+ </td>
156
+ </tr>
157
+ <tr>
158
+ <td>Permissions</td>
159
+ <td>
160
+ <b>All Files:</b> Check the 'All Files' check-box and enter in the desired <a href="http://php.net/manual/en/function.chmod.php" target="_blank">chmod command</a>
161
+ to recursively set the octal value on all the files being extracted. Typically this value is 644 on most servers and hosts.
162
+ <br/><br/>
163
+
164
+ <b>All Directories:</b> Check the 'All Directories' check-box and enter in the desired <a href="http://php.net/manual/en/function.chmod.php" target="_blank">chmod command</a>
165
+ to recursively set octal value on all the directories being extracted. Typically this value is 755 on most servers and hosts.
166
+ </td>
167
+ </tr>
168
+ <tr>
169
+ <td colspan="2" class="section">Advanced Options</td>
170
+ </tr>
171
+ <tr>
172
+ <td>Safe Mode</td>
173
+ <td>
174
+ Safe mode is designed to configure the site with specific options at install time to help over come issues that may happen during the install were the site
175
+ is having issues. These options should only be used if you run into issues after you have tried to run an install.
176
+ <br/><br/>
177
+ <b>Basic:</b> This safe mode option will disable all the plugins at install time. When this option is set you will need to re-enable all plugins after the
178
+ install has full ran.
179
+ <br/><br/>
180
+
181
+ <b>Advanced:</b> This option applies all settings used in basic and will also de-activate and reactivate your theme when logging in for the first time. This
182
+ options should be used only if the Basic option did not work.
183
+ </td>
184
+ </tr>
185
+ <tr>
186
+ <td>Config Files </td>
187
+ <td>
188
+ When dealing with configuration files (.htaccess, web.config and .user.ini) the installer can apply different modes:
189
+ <br/><br/>
190
+
191
+ <b>Create New:</b> This is the default recommended option which will create either a new .htaccess or web.config file. The new file is streamlined to help
192
+ guarantee no conflicts are created during install. The config files generated with this mode will be simple and basic. The WordFence .user.ini file if
193
+ present will be removed.
194
+ <br/><br/>
195
+
196
+ <b>Restore Original:</b> This option simply renames the htaccess.orig or web.config.orig files to .htaccess or web.config. The *.orig files come from the original
197
+ web server where the package was built. Please note this option will cause issues with the install process if the configuration files are not properly setup to
198
+ handle the new server environment. This is an advanced option and should only be used if you know how to properly configure your web servers configuration.
199
+ <br/><br/>
200
+
201
+ <!-- <b>Ignore All:</b> This option simply does nothing. No files are backed up, nothing is renamed or created. This advanced option assumes you already have your
202
+ config files setup and know how they should behave in the new environment.
203
+ <br/><br/>-->
204
+
205
+ <small>
206
+ <b>Additional Notes:</b>
207
+ Inside the archive.zip will be a copy of the original .htaccess (Apache) or the web.config (IIS) files that were setup with your packaged site. They are both
208
+ renamed to htaccess.orig and web.config.orig. Using either Create New or Restore Original if any existing config files exist for the extraction process they will
209
+ be backed up with a .bak extension.</small>
210
+ <br/><br/>
211
+ </td>
212
+ </tr>
213
+
214
+ <tr>
215
+ <td>File Times</td>
216
+ <td>When the archive is extracted should it show the current date-time or keep the original time it had when it was built. This setting will be applied to
217
+ all files and directories.</td>
218
+ </tr>
219
+ <tr>
220
+ <td>Logging</td>
221
+ <td>
222
+ The level of detail that will be sent to the log file (installer-log.txt). The recommend setting for most installs should be 'Light'.
223
+ Note if you use Debug the amount of data written can be very large. Debug is only recommended for support.
224
+ </td>
225
+ </tr>
226
+
227
+ </table>
228
+ <br/><br/>
229
+
230
+ <h3>Notices</h3>
231
+ To proceed with the install users must check the checkbox labeled " I have read and accept all terms &amp; notices". This means you accept the term of using the software
232
+ and are aware of any notices.
233
+ <br/><br/>
234
+
235
+ </div>
236
+ <br/>
237
+
238
+
239
+ <!-- ============================================
240
+ STEP 2
241
+ ============================================== -->
242
+ <a class="help-target" name="help-s2"></a>
243
+ <h2>Step <span class="step">2</span> of 4: Install Database</h2>
244
+ <div id="dup-help-step1" class="help-page">
245
+
246
+ <h3>Basic/cPanel:</h3>
247
+ 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
248
+ 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>.
249
+ This option will automatically show you the existing databases and users on your cPanel server and allow you to create new databases directly
250
+ from the installer.
251
+ <br/><br/>
252
+
253
+ <h3>cPanel Login <sup>pro</sup></h3>
254
+ <i>The cPanel connectivity option is only available for Duplicator Pro.</i>
255
+ <table class="help-opt">
256
+ <tr>
257
+ <th>Option</th>
258
+ <th>Details</th>
259
+ </tr>
260
+ <tr>
261
+ <td>Host</td>
262
+ <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.
263
+ 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
264
+ "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
265
+ hosting provider or server administrator.</td>
266
+ </tr>
267
+ <tr>
268
+ <td>Username</td>
269
+ <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>.
270
+ If your unsure of this name please contact your hosting provider or server administrator.</td>
271
+ </tr>
272
+ <tr>
273
+ <td>Password</td>
274
+ <td>The password of the cPanel user</td>
275
+ </tr>
276
+ <tr>
277
+ <td>Troubleshoot</td>
278
+ <td>
279
+ <b>Common cPanel Connection Issues:</b><br/>
280
+ - Your host does not use <a href="http://cpanel.com/" target="_blank">cPanel Software</a> <br/>
281
+ - Your host has disabled cPanel API access <br/>
282
+ - Your host has configured cPanel to work differently (please contact your host) <br/>
283
+ - View a list of valid cPanel <a href='https://snapcreek.com/wordpress-hosting/' target='_blank'>Supported Hosts</a>
284
+ </td>
285
+ </tr>
286
+ </table>
287
+ <br/><br/>
288
+
289
+ <!-- DATABASE SETUP-->
290
+ <h3>Setup</h3>
291
+ The database setup options allow you to connect to an existing database or in the case of cPanel connect or create a new database.
292
+ <table class="help-opt">
293
+ <tr>
294
+ <th>Option</th>
295
+ <th>Details</th>
296
+ </tr>
297
+ <tr>
298
+ <td>Action</td>
299
+ <td>
300
+ <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
301
+ 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
302
+ 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
303
+ cPanel account.
304
+ <br/><br/>
305
+
306
+ <b>Connect and Remove All Data:</b> This options will DELETE all tables in the database you are connecting to. Please make sure you have
307
+ backups of all your data before using an portion of the installer, as this option WILL remove all data.
308
+ <br/><br/>
309
+
310
+ <b>Connect and Backup Any Existing Data:</b><sup>pro</sup> This options will RENAME all tables in the database you are connecting to with a prefix of
311
+ "<?php echo $GLOBALS['DB_RENAME_PREFIX'] ?>".
312
+ <br/><br/>
313
+
314
+ <b>Manual SQL Execution:</b><sup>pro</sup> This options requires that you manually run your own SQL import to an existing database before running the installer.
315
+ When this action is selected the dup-database__[hash].sql file found inside the dup-installer folder of the archive.zip file will NOT be ran. The database your connecting to should already
316
+ be a valid WordPress installed database. This option is viable when you need to run advanced search and replace options on the database.
317
+ <br/><br/>
318
+
319
+ </td>
320
+ </tr>
321
+ <tr>
322
+ <td>Host</td>
323
+ <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
324
+ 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.
325
+ 'localhost:3306'.</td>
326
+ </tr>
327
+ <tr>
328
+ <td>Database</td>
329
+ <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
330
+ do not. Be sure to know exactly how your host requires the database name to be entered.</td>
331
+ </tr>
332
+ <tr>
333
+ <td>User</td>
334
+ <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.
335
+ <i>This is <b>not</b> the same thing as your WordPress administrator account</i>.</td>
336
+ </tr>
337
+ <tr>
338
+ <td>Password</td>
339
+ <td>The password of the MySQL database server user.</td>
340
+ </tr>
341
+
342
+ </table>
343
+ <br/><br/>
344
+
345
+ <!-- OPTIONS-->
346
+ <h3>Options</h3>
347
+ <table class="help-opt">
348
+ <tr>
349
+ <th>Option</th>
350
+ <th>Details</th>
351
+ </tr>
352
+ <tr>
353
+ <td>Prefix<sup>pro*</sup></td>
354
+ <td>By default, databases are prefixed with the cPanel account's username (for example, myusername_databasename). However you can ignore this option if
355
+ your host does not use the default cPanel username prefix schema. Check the 'Ignore cPanel Prefix' and the username prefixes will be ignored.
356
+ 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
357
+ disabled prefix settings. Please see your host full requirements when using the cPanel options.</td>
358
+ </tr>
359
+ <tr>
360
+ <td>Legacy</td>
361
+ <td>When creating a database table, the Mysql version being used may not support the collation type of the Mysql version where the table was created.
362
+ In this scenario, the installer will fallback to a legacy collation type to try and create the table. This value should only be checked if you receive an error when
363
+ testing the database.
364
+ <br/><br/>
365
+ For example, if the database was created on MySQL 5.7 and the tables collation type was 'utf8mb4_unicode_520_ci', however your trying to run the installer
366
+ on an older MySQL 5.5 engine that does not support that type then an error will be thrown. If this option is checked then the legacy setting will try to
367
+ use 'utf8mb4_unicode_520', then 'utf8mb4', then 'utf8' and so on until it runs out of options.
368
+ <br/><br/>
369
+ For more information about this feature see the online FAQ question titled
370
+ <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-110-q" target="_blank">"What is compatibility mode & 'unknown collation' errors"</a>
371
+ </td>
372
+ </tr>
373
+ <tr>
374
+ <td>Spacing</td>
375
+ <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
376
+ marks in you posts</td>
377
+ </tr>
378
+ <tr>
379
+ <td>Mode</td>
380
+ <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
381
+ 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>
382
+ </tr>
383
+ <tr>
384
+ <td>Charset</td>
385
+ <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
386
+ databases character set should be.</td>
387
+ </tr>
388
+ <tr>
389
+ <td>Collation</td>
390
+ <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
391
+ databases collation set should be.</td>
392
+ </tr>
393
+ </table>
394
+ <sup>*cPanel Only Option</sup>
395
+ <br/><br/>
396
+
397
+ <h3>Validation</h3>
398
+ Testing the database connection is important and can help isolate possible issues that may arise with database version and compatibility issues.
399
+
400
+ <table class="help-opt">
401
+ <tr>
402
+ <th>Option</th>
403
+ <th>Details</th>
404
+ </tr>
405
+ <tr>
406
+ <td>Test<br/>Database</td>
407
+ <td>
408
+ The 'Test Database' button will help validate if the connection parameters are correct for this server and help with details about any issues
409
+ that may arise.
410
+ </td>
411
+ </tr>
412
+ <tr>
413
+ <td>Troubleshoot</td>
414
+ <td>
415
+ <b>Common Database Connection Issues:</b><br/>
416
+ - Double check case sensitive values 'User', 'Password' &amp; the 'Database Name' <br/>
417
+ - Validate the database and database user exist on this server <br/>
418
+ - Check if the database user has the correct permission levels to this database <br/>
419
+ - The host 'localhost' may not work on all hosting providers <br/>
420
+ - Contact your hosting provider for the exact required parameters <br/>
421
+ - Visit the online resources 'Common FAQ page' <br/>
422
+
423
+ </td>
424
+ </tr>
425
+ </table>
426
+ <br/><br/>
427
+ </div><br/>
428
+
429
+
430
+ <!-- ============================================
431
+ STEP 3
432
+ ============================================== -->
433
+ <a class="help-target" name="help-s3"></a>
434
+ <h2>Step <span class="step">3</span> of 4: Update Data</h2>
435
+ <div id="dup-help-step2" class="help-page">
436
+
437
+ <!-- SETTINGS-->
438
+ <h3>New Settings</h3>
439
+ These are the new values (URL, Path and Title) you can update for the new location at which your site will be installed at.
440
+ <br/><br/>
441
+
442
+ <h3>Replace <sup>pro</sup></h3>
443
+ 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
444
+ 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
445
+ full URL or file paths with this option.
446
+ <br/><br/>
447
+
448
+ <!-- ADVANCED OPTS -->
449
+ <h3>Options</h3>
450
+ <table class="help-opt">
451
+ <tr>
452
+ <th>Option</th>
453
+ <th>Details</th>
454
+ </tr>
455
+ <tr>
456
+ <td colspan="2" class="section">New Admin Account</td>
457
+ </tr>
458
+ <tr>
459
+ <td>Username</td>
460
+ <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>
461
+ </tr>
462
+ <tr>
463
+ <td>Password</td>
464
+ <td>The new password for the new user. Must be at least 6 characters long.</td>
465
+ </tr>
466
+ <tr>
467
+ <td colspan="2" class="section">Scan Options</td>
468
+ </tr>
469
+ <tr>
470
+ <td>Cleanup <sup>pro</sup></td>
471
+ <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>
472
+ </tr>
473
+ <tr>
474
+ <td>Old URL</td>
475
+ <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>
476
+ </tr>
477
+ <tr>
478
+ <td>Old Path</td>
479
+ <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>
480
+ </tr>
481
+ <tr>
482
+ <td>Site URL</td>
483
+ <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>
484
+ </tr>
485
+ <tr>
486
+ <td>Scan Tables</td>
487
+ <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>
488
+ </tr>
489
+ <tr>
490
+ <td>Activate Plugins</td>
491
+ <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>
492
+ </tr>
493
+ <tr>
494
+ <td>Full Search</td>
495
+ <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.
496
+ Use this option if you have issues with data not updating correctly.</td>
497
+ </tr>
498
+ <tr>
499
+ <td>Post GUID</td>
500
+ <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>
501
+ </tr>
502
+ <tr>
503
+ <td colspan="2" class="section">WP-Config File</td>
504
+ </tr>
505
+ <tr>
506
+ <td>Config SSL</td>
507
+ <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"
508
+ will turn off SSL support for WordPress Logins.</td>
509
+ </tr>
510
+ <tr>
511
+ <td>Config Cache</td>
512
+ <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"
513
+ sets WPCACHEHOME in your wp-config file to nothing if true, otherwise nothing is changed.</td>
514
+ </tr>
515
+ </table>
516
+ <br/><br/>
517
+ </div><br/>
518
+
519
+
520
+ <!-- ============================================
521
+ STEP 4
522
+ ============================================== -->
523
+ <a class="help-target" name="help-s4"></a>
524
+ <h2>Step <span class="step">4</span> of 4: Test Site</h2>
525
+ <div id="dup-help-step3" class="help-page">
526
+ <h3>Final Steps</h3>
527
+
528
+ <b>Review Install Report</b><br/>
529
+ The install report is designed to give you a synopsis of the possible errors and warnings that may exist after the installation is completed.
530
+ <br/><br/>
531
+
532
+ <b>Test Site</b><br/>
533
+ After the install is complete run through your entire site and test all pages and posts.
534
+ <br/><br/>
535
+
536
+ <b>Final Security Cleanup</b><br/>
537
+ When completed with the installation please delete all installation files. Leaving these files on your server can impose a security risk! You can remove
538
+ all the security files by logging into your WordPress admin and following the remove notification links. Be sure these files/directories are removed. Optionally
539
+ it is also recommended to remove the archive.zip/daf file.
540
+ <ul>
541
+ <li>dup-installer</li>
542
+ <li>installer.php</li>
543
+ <li>installer-backup.php</li>
544
+ <li>installer-bootlog.txt</li>
545
+ <li>archive.zip/daf</li>
546
+ </ul>
547
+ <br/><br/>
548
+
549
+ </div>
550
+
551
+
552
+ <a class="help-target" name="help-s5"></a>
553
+ <h2>Troubleshooting Tips</h2>
554
+ <div id="troubleshoot" class="help-page">
555
+
556
+ <div style="padding: 0px 10px 10px 10px;">
557
+ <b>Common Quick Fix Issues:</b>
558
+ <ul>
559
+ <li>Use an <a href='https://snapcreek.com/wordpress-hosting/' target='_blank'>approved hosting provider</a></li>
560
+ <li>Validate directory and file permissions (see below)</li>
561
+ <li>Validate web server configuration file (see below)</li>
562
+ <li>Clear your browsers cache</li>
563
+ <li>Deactivate and reactivate all plugins</li>
564
+ <li>Resave a plugins settings if it reports errors</li>
565
+ <li>Make sure your root directory is empty</li>
566
+ </ul>
567
+
568
+ <b>Permissions:</b><br/>
569
+ 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>
570
+ <br/><br/>
571
+
572
+ <b>Web server configuration files:</b><br/>
573
+ 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.
574
+ <br/><br/>
575
+
576
+ <b>Cache Systems:</b><br/>
577
+ 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.
578
+ <br/><br/>
579
+
580
+ <b>Trying Again:</b><br/>
581
+ 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.
582
+ <br/><br/>
583
+
584
+ <b>Additional Notes:</b><br/>
585
+ 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.
586
+ 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.
587
+ If you have a large log file that needs evaluated please email the file, or attach it to a help ticket.
588
+ <br/><br/>
589
+
590
+ </div>
591
+
592
+ </div>
593
+
594
+ <div style="text-align:center">For additional help please visit the <a href="https://snapcreek.com/support/docs/" target="_blank">online resources</a></div>
595
+
596
+ <br/><br/>
597
+ </div>
598
+ <!-- END OF VIEW HELP -->
installer/build/view.init1.php ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /** IDE HELPERS */
3
+ /* @var $GLOBALS['DUPX_AC'] DUPX_ArchiveConfig */
4
+
5
+ $_POST['secure-pass'] = isset($_POST['secure-pass']) ? $_POST['secure-pass'] : '' ;
6
+ $_POST['secure-try'] = isset($_POST['secure-try']) ? 1 : 0 ;
7
+ $_GET['debug'] = isset($_GET['debug']) ? $_GET['debug'] : 0;
8
+ $page_url = DUPX_HTTP::get_request_uri();
9
+ $page_err = 0;
10
+ $pass_hasher = new DUPX_PasswordHash(8, FALSE);
11
+ $pass_check = $pass_hasher->CheckPassword(base64_encode($_POST['secure-pass']), $GLOBALS['FW_SECUREPASS']);
12
+
13
+ //FORWARD: password not enabled
14
+ if (! $GLOBALS['FW_SECUREON'] && ! $_GET['debug']) {
15
+ DUPX_HTTP::post_with_html($page_url, array('action_step' => '1'));
16
+ exit;
17
+ }
18
+
19
+ //POSTBACK: valid password
20
+ if ($pass_check) {
21
+ DUPX_HTTP::post_with_html($page_url,
22
+ array(
23
+ 'action_step' => '1',
24
+ 'secure-pass' => $_POST['secure-pass']));
25
+ exit;
26
+ }
27
+
28
+ //ERROR: invalid password
29
+ if ($_POST['secure-try'] && ! $pass_check) {
30
+ $page_err = 1;
31
+ }
32
+ ?>
33
+
34
+ <!-- =========================================
35
+ VIEW: STEP 0 - PASSWORD -->
36
+ <form method="post" id="i1-pass-form" class="content-form" data-parsley-validate="" autocomplete="oldpassword">
37
+ <input type="hidden" name="view" value="secure" />
38
+ <input type="hidden" name="secure-try" value="1" />
39
+
40
+ <div class="hdr-main">
41
+ Installer Password
42
+ </div>
43
+
44
+ <?php if ($page_err) : ?>
45
+ <div class="error-pane">
46
+ <p>Invalid Password! Please try again. If the problem persists see the more details link below.</p>
47
+ </div>
48
+ <?php endif; ?>
49
+
50
+ <div style="text-align: center">
51
+ This file was password protected when it was created. If you do not remember the password check the details of the package on the site where it was created or visit
52
+ the online FAQ for <a href="https://snapcreek.com/duplicator/docs/faqs-tech/#faq-installer-030-q" target="_blank">more details</a>.
53
+ <br/><br/><br/>
54
+
55
+ <div class="i1-pass-area">
56
+ <label for="secure-pass">Enter Password</label>
57
+ <div id="i1-pass-input">
58
+ <input type="password" name="secure-pass" id="secure-pass" required="required" autocomplete="oldpassword" /><br/>
59
+ <div style="margin-top:7px">
60
+ <input type="checkbox" class="pass-toggle" id="secure-lock" onclick="DUPX.togglePassword()" title="Show/Hide the password">
61
+ <label class="secure-lock" for="secure-lock">Show Password</label>
62
+ </div>
63
+ </div>
64
+ <div style="margin-top: 15px">
65
+ <button type="button" class="default-btn" name="secure-btn" id="secure-btn" onclick="DUPX.checkPassword()">Submit</button>
66
+ </div>
67
+ </div>
68
+ </div>
69
+ </form>
70
+
71
+ <script>
72
+ /**
73
+ * Submits the password for validation
74
+ */
75
+ DUPX.checkPassword = function()
76
+ {
77
+ var $form = $('#i1-pass-form');
78
+ $form.parsley().validate();
79
+ if (! $form.parsley().isValid()) {
80
+ return;
81
+ }
82
+ $form.submit();
83
+ }
84
+
85
+ /**
86
+ * Submits the password for validation
87
+ */
88
+ DUPX.togglePassword = function()
89
+ {
90
+ var $input = $('#secure-pass');
91
+ var $lock = $('#secure-lock');
92
+ if (($input).attr('type') == 'text') {
93
+ //$lock.html('<i class="fa fa-lock"></i>');
94
+ $input.attr('type', 'password');
95
+ } else {
96
+ //$lock.html('<i class="fa fa-unlock"></i>');
97
+ $input.attr('type', 'text');
98
+ }
99
+ }
100
+ </script>
101
+ <!-- END OF VIEW INIT 1 -->
installer/build/view.step1.php CHANGED
@@ -97,6 +97,7 @@ $agree_msg = "To enable this button the checkbox above under the 'Terms & Not
97
  <input type="hidden" name="action_ajax" value="1" />
98
  <input type="hidden" name="action_step" value="1" />
99
  <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
 
100
 
101
  <div class="hdr-main">
102
  Step <span class="step">1</span> of 4: Deployment
@@ -629,6 +630,7 @@ Auto Posts to view.step2.php
629
  <!-- POST PARAMS -->
630
  <div class="dupx-debug">
631
  <input type="hidden" name="action_step" value="2" />
 
632
  <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
633
  <input type="hidden" name="logging" id="ajax-logging" />
634
  <input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="0" />
97
  <input type="hidden" name="action_ajax" value="1" />
98
  <input type="hidden" name="action_step" value="1" />
99
  <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
100
+ <input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
101
 
102
  <div class="hdr-main">
103
  Step <span class="step">1</span> of 4: Deployment
630
  <!-- POST PARAMS -->
631
  <div class="dupx-debug">
632
  <input type="hidden" name="action_step" value="2" />
633
+ <input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
634
  <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
635
  <input type="hidden" name="logging" id="ajax-logging" />
636
  <input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="0" />
installer/build/view.step2.php CHANGED
@@ -1,424 +1,426 @@
1
- <?php
2
- $_POST['logging'] = isset($_POST['logging']) ? trim(DUPX_U::sanitize($_POST['logging'])) : 1;
3
- $_POST['exe_safe_mode'] = (isset($_POST['exe_safe_mode'])) ? DUPX_U::sanitize($_POST['exe_safe_mode']) : 0;
4
- ?>
5
-
6
-
7
- <!-- =========================================
8
- VIEW: STEP 2- INPUT -->
9
- <form id='s2-input-form' method="post" class="content-form" data-parsley-validate="true" data-parsley-excluded="input[type=hidden], [disabled], :hidden">
10
- <input type="hidden" name="action_ajax" value="2" />
11
- <input type="hidden" name="action_step" value="2" />
12
- <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
13
- <input type="hidden" name="logging" id="logging" value="<?php echo $_POST['logging'] ?>" />
14
-
15
- <div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
16
- <div class="hdr-main">
17
- Step <span class="step">2</span> of 4: Install Database
18
- </div>
19
-
20
- <div class="s2-btngrp">
21
- <input id="s2-basic-btn" type="button" value="Basic" class="active" onclick="DUPX.togglePanels('basic')" />
22
- <input id="s2-cpnl-btn" type="button" value="cPanel" class="in-active" onclick="DUPX.togglePanels('cpanel')" />
23
- </div>
24
-
25
-
26
- <!-- =========================================
27
- BASIC PANEL -->
28
- <div id="s2-basic-pane">
29
- <div class="hdr-sub1" data-type="toggle" data-target="#s2-area-setup">
30
- <a href="javascript:void(0)"><i class="dupx-minus-square"></i> Setup</a>
31
- </div>
32
- <div id="s2-area-setup">
33
- <table class="dupx-opts">
34
- <tr>
35
- <td>Action:</td>
36
- <td>
37
- <select name="dbaction" id="dbaction">
38
- <option value="create">Create New Database</option>
39
- <option value="empty" selected="true">Connect and Remove All Data</option>
40
- </select>
41
- </td>
42
- </tr>
43
- <tr>
44
- <td>Host:</td>
45
- <td>
46
- <table class="s2-opts-dbhost">
47
- <tr>
48
- <td><input type="text" name="dbhost" id="dbhost" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBHOST']); ?>" placeholder="localhost" style="width:450px" /></td>
49
- <td style="vertical-align:top">
50
- <input id="s2-dbport-btn" type="button" onclick="DUPX.togglePort()" class="s2-small-btn" value="Port: <?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
51
- <input name="dbport" id="dbport" type="text" style="width:80px; display:none" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
52
- </td>
53
- </tr>
54
- </table>
55
- </td>
56
- </tr>
57
- <tr>
58
- <td>Database:</td>
59
- <td>
60
- <input type="text" name="dbname" id="dbname" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBNAME']); ?>" placeholder="new or existing database name" />
61
- <div id="s2-warning-emptydb">
62
- <label for="accept-warnings">Warning: The selected 'Action' above will remove <u>all data</u> from this database!</label>
63
- </div>
64
- </td>
65
- </tr>
66
- <tr>
67
- <td>User:</td>
68
- <td><input type="text" name="dbuser" id="dbuser" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBUSER']); ?>" placeholder="valid database username" /></td>
69
- </tr>
70
- <tr>
71
- <td>Password:</td>
72
- <td><input type="text" name="dbpass" id="dbpass" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPASS']); ?>" placeholder="valid database user password" /></td>
73
- </tr>
74
- </table>
75
- </div>
76
- </div>
77
-
78
-
79
- <!-- =========================================
80
- C-PANEL PANEL -->
81
- <div id="s2-cpnl-pane">
82
- <div class="s2-gopro">
83
- <h2>cPanel Connectivity</h2>
84
-
85
- <?php if( DUPX_U::isURLActive($_SERVER['SERVER_NAME'], 2083) ): ?>
86
- <div class='s2-cpanel-login'>
87
- <b>Login to this server's cPanel</b><br/>
88
- <a href="https://<?php echo $_SERVER['SERVER_NAME'] ?>:2083" target="cpanel" style="color:#fff">[<?php echo $_SERVER['SERVER_NAME'] ?>:2083]</a>
89
- </div>
90
- <?php else : ?>
91
- <div class='s2-cpanel-off'>
92
- <b>This server does not appear to support cPanel!</b><br/>
93
- Consider <a href="https://snapcreek.com/wordpress-hosting/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_no_cpanel&utm_campaign=duplicator_pro" target="cpanel" style="color:#fff;font-weight:bold">upgrading</a> to a host that does.<br/>
94
- </div>
95
- <?php endif; ?>
96
-
97
-
98
- <div style="text-align: center; font-size: 14px">
99
- Want <span style="font-style: italic;">even easier</span> installs?
100
- <a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&amp;utm_medium=wordpress_plugin&amp;utm_content=free_install_step2&amp;utm_campaign=duplicator_pro"><b>Duplicator Pro</b></a>
101
- allows the following <b>right from the installer:</b>
102
- </div>
103
- <ul>
104
- <li>Directly login to cPanel</li>
105
- <li>Instantly create new databases &amp; users</li>
106
- <li>Preview and select existing databases &amp; users</li>
107
- </ul>
108
- <small>
109
- Note: Hosts that support cPanel provide remote access to server resources, allowing operations such as direct database and user creation.
110
- Since the <a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_cpanel_note&utm_campaign=duplicator_pro">Duplicator Pro</a>
111
- installer can directly access cPanel, it dramatically speeds up your workflow.
112
- </small>
113
- </div>
114
- </div>
115
-
116
- <!-- =========================================
117
- DIALOG: DB CONNECTION CHECK -->
118
- <div id="s2-dbconn">
119
- <div id="s2-dbconn-status" style="display:none">
120
- <div style="padding: 0px 10px 10px 10px;">
121
- <div id="s2-dbconn-test-msg" style="min-height:80px"></div>
122
- </div>
123
- <small><input type="button" onclick="$('#s2-dbconn-status').hide(500)" class="s2-small-btn" value="Hide Message" /></small>
124
- </div>
125
- </div>
126
-
127
-
128
- <br/>
129
-
130
- <!-- ====================================
131
- OPTIONS
132
- ==================================== -->
133
- <div class="hdr-sub1" data-type="toggle" data-target="#s2-area-adv-opts">
134
- <a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
135
- </div>
136
- <div id='s2-area-adv-opts' style="display:none">
137
- <div class="help-target"><a href="?help#help-s2" target="_blank">[help]</a></div>
138
-
139
- <table class="dupx-opts dupx-advopts">
140
- <tr>
141
- <td>Legacy:</td>
142
- <td><input type="checkbox" name="dbcollatefb" id="dbcollatefb" value="1" /> <label for="dbcollatefb">Apply legacy collation fallback support for unknown collations types</label></td>
143
- </tr>
144
- <tr>
145
- <td>Spacing:</td>
146
- <td colspan="2">
147
- <input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label>
148
- </td>
149
- </tr>
150
- <tr>
151
- <td style="vertical-align:top">Mode:</td>
152
- <td colspan="2">
153
- <input type="radio" name="dbmysqlmode" id="dbmysqlmode_1" checked="true" value="DEFAULT"/> <label for="dbmysqlmode_1">Default</label> &nbsp;
154
- <input type="radio" name="dbmysqlmode" id="dbmysqlmode_2" value="DISABLE"/> <label for="dbmysqlmode_2">Disable</label> &nbsp;
155
- <input type="radio" name="dbmysqlmode" id="dbmysqlmode_3" value="CUSTOM"/> <label for="dbmysqlmode_3">Custom</label> &nbsp;
156
- <div id="dbmysqlmode_3_view" style="display:none; padding:5px">
157
- <input type="text" name="dbmysqlmode_opts" value="" /><br/>
158
- <small>Separate additional <a href="?help#help-mysql-mode" target="_blank">sql modes</a> with commas &amp; no spaces.<br/>
159
- Example: <i>NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE,...</i>.</small>
160
- </div>
161
- </td>
162
- </tr>
163
- <tr><td style="width:130px">Charset:</td><td><input type="text" name="dbcharset" id="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" /> </td></tr>
164
- <tr><td>Collation:</td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
165
- </table>
166
-
167
- </div>
168
- <br/><br/><br/>
169
- <br/><br/><br/>
170
-
171
- <div class="dupx-footer-buttons">
172
- <input type="button" onclick="DUPX.testDatabase()" class="default-btn" value="Test Database" />
173
- <input id="dup-step2-deploy-btn" type="button" class="default-btn" value=" Next " onclick="DUPX.confirmDeployment()" />
174
- </div>
175
-
176
- </form>
177
-
178
-
179
- <!-- =========================================
180
- VIEW: STEP 2 - AJAX RESULT
181
- Auto Posts to view.step3.php
182
- ========================================= -->
183
- <form id='s2-result-form' method="post" class="content-form" style="display:none">
184
-
185
- <div class="dupx-logfile-link"><a href="installer-log.txt" target="install_log">installer-log.txt</a></div>
186
- <div class="hdr-main">
187
- Step <span class="step">2</span> of 4: Install Database
188
- </div>
189
-
190
- <!-- POST PARAMS -->
191
- <div class="dupx-debug">
192
- <input type="hidden" name="action_step" value="3" />
193
- <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
194
- <input type="hidden" name="logging" id="ajax-logging" />
195
- <input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
196
- <input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo $_POST['exe_safe_mode']; ?>"/>
197
- <input type="hidden" name="dbhost" id="ajax-dbhost" />
198
- <input type="hidden" name="dbport" id="ajax-dbport" />
199
- <input type="hidden" name="dbuser" id="ajax-dbuser" />
200
- <input type="hidden" name="dbpass" id="ajax-dbpass" />
201
- <input type="hidden" name="dbname" id="ajax-dbname" />
202
- <input type="hidden" name="json" id="ajax-json" />
203
- <input type="hidden" name="dbcharset" id="ajax-dbcharset" />
204
- <input type="hidden" name="dbcollate" id="ajax-dbcollate" />
205
- <br/>
206
- <input type='submit' value='manual submit'>
207
- </div>
208
-
209
- <!-- PROGRESS BAR -->
210
- <div id="progress-area">
211
- <div style="width:500px; margin:auto">
212
- <h3>Installing Database Please Wait...</h3>
213
- <div id="progress-bar"></div>
214
- <i>This may take several minutes</i>
215
- </div>
216
- </div>
217
-
218
- <!-- AJAX SYSTEM ERROR -->
219
- <div id="ajaxerr-area" style="display:none">
220
- <p>Please try again an issue has occurred.</p>
221
- <div style="padding: 0px 10px 10px 0px;">
222
- <div id="ajaxerr-data">An unknown issue has occurred with the file and database set up process. Please see the installer-log.txt file for more details.</div>
223
- <div style="text-align:center; margin:10px auto 0px auto">
224
- <input type="button" class="default-btn" onclick='DUPX.hideErrorResult()' value="&laquo; Try Again" /><br/><br/>
225
- <i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxstep2_ticket' target='_blank'>snapcreek.com</a></i>
226
- </div>
227
- </div>
228
- </div>
229
- </form>
230
-
231
-
232
-
233
- <!-- CONFIRM DIALOG -->
234
- <div id="dialog-confirm-content" style="display:none">
235
- <div style="padding:0 0 25px 0">
236
- <b>Run installer with these settings?</b>
237
- </div>
238
-
239
- <b>Database Settings:</b><br/>
240
- <table style="margin-left:20px">
241
- <tr>
242
- <td><b>Server:</b></td>
243
- <td><i id="dlg-dbhost"></i></td>
244
- </tr>
245
- <tr>
246
- <td><b>Name:</b></td>
247
- <td><i id="dlg-dbname"></i></td>
248
- </tr>
249
- <tr>
250
- <td><b>User:</b></td>
251
- <td><i id="dlg-dbuser"></i></td>
252
- </tr>
253
- </table>
254
- <br/><br/>
255
-
256
- <small> WARNING: Be sure these database parameters are correct! Entering the wrong information WILL overwrite an existing database.
257
- Make sure to have backups of all your data before proceeding.</small><br/>
258
- </div>
259
-
260
-
261
- <script>
262
- /* Confirm Dialog to validate run */
263
- DUPX.confirmDeployment = function()
264
- {
265
- var $form = $('#s2-input-form');
266
- $form.parsley().validate();
267
- if (!$form.parsley().isValid()) {
268
- return;
269
- }
270
-
271
- $('#dlg-dbhost').html($("#dbhost").val());
272
- $('#dlg-dbname').html($("#dbname").val());
273
- $('#dlg-dbuser').html($("#dbuser").val());
274
-
275
- modal({
276
- type: 'confirm',
277
- title: 'Install Confirmation',
278
- text: $('#dialog-confirm-content').html(),
279
- callback: function(result)
280
- {
281
- if (result == true) {
282
- DUPX.runDeployment();
283
- }
284
- }
285
- });
286
- }
287
-
288
-
289
- /* Performs Ajax post to extract files and create db
290
- * Timeout (10000000 = 166 minutes) */
291
- DUPX.runDeployment = function()
292
- {
293
- var $form = $('#s2-input-form');
294
- var dbhost = $("#dbhost").val();
295
- var dbname = $("#dbname").val();
296
- var dbuser = $("#dbuser").val();
297
-
298
- $.ajax({
299
- type: "POST",
300
- timeout: 1800000,
301
- dataType: "json",
302
- url: window.location.href,
303
- data: $form.serialize(),
304
- beforeSend: function() {
305
- DUPX.showProgressBar();
306
- $form.hide();
307
- $('#s2-result-form').show();
308
- },
309
- success: function(data, textStatus, xhr){
310
- if (typeof(data) != 'undefined' && data.pass == 1) {
311
- $("#ajax-dbhost").val($("#dbhost").val());
312
- $("#ajax-dbport").val($("#dbport").val());
313
- $("#ajax-dbuser").val($("#dbuser").val());
314
- $("#ajax-dbpass").val($("#dbpass").val());
315
- $("#ajax-dbname").val($("#dbname").val());
316
- $("#ajax-dbcharset").val($("#dbcharset").val());
317
- $("#ajax-dbcollate").val($("#dbcollate").val());
318
- $("#ajax-logging").val($("#logging").val());
319
- $("#ajax-json").val(escape(JSON.stringify(data)));
320
- <?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
321
- setTimeout(function() {$('#s2-result-form').submit();}, 500);
322
- <?php endif; ?>
323
- $('#progress-area').fadeOut(1000);
324
- } else {
325
- DUPX.hideProgressBar();
326
- }
327
- },
328
- error: function(xhr) {
329
- var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
330
- status += "<b>Status:</b> " + xhr.statusText + "<br/>";
331
- status += "<b>Response:</b> " + xhr.responseText + "";
332
- status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
333
- status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
334
- status += "- Check the web server and PHP error logs. <br/>";
335
- status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step2deploy_timout#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
336
- $('#ajaxerr-data').html(status);
337
- DUPX.hideProgressBar();
338
- }
339
- });
340
-
341
- }
342
-
343
- /**
344
- * Toggles the cpanel Login area */
345
- DUPX.togglePanels = function (pane)
346
- {
347
- $('#s2-basic-pane, #s2-cpnl-pane').hide();
348
- $('#s2-basic-btn, #s2-cpnl-btn').removeClass('active in-active');
349
- if (pane == 'basic') {
350
- $('#s2-basic-pane').show();
351
- $('#s2-basic-btn').addClass('active');
352
- $('#s2-cpnl-btn').addClass('in-active');
353
- } else {
354
- $('#s2-cpnl-pane').show(200);
355
- $('#s2-cpnl-btn').addClass('active');
356
- $('#s2-basic-btn').addClass('in-active');
357
- }
358
- }
359
-
360
-
361
- /** Go back on AJAX result view */
362
- DUPX.hideErrorResult = function()
363
- {
364
- $('#s2-result-form').hide();
365
- $('#s2-input-form').show(200);
366
- }
367
-
368
-
369
- /** Shows results of database connection
370
- * Timeout (45000 = 45 secs) */
371
- DUPX.testDatabase = function ()
372
- {
373
- $.ajax({
374
- type: "POST",
375
- timeout: 45000,
376
- url: window.location.href + '?' + 'dbtest=1',
377
- data: $('#s2-input-form').serialize(),
378
- success: function(data){ $('#s2-dbconn-test-msg').html(data); },
379
- error: function(data){ alert('An error occurred while testing the database connection! Contact your server admin to make sure the connection inputs are correct!'); }
380
- });
381
-
382
- $('#s2-dbconn-test-msg').html("Attempting Connection. Please wait...");
383
- $("#s2-dbconn-status").show(100);
384
-
385
- }
386
-
387
-
388
- DUPX.showDeleteWarning = function ()
389
- {
390
- ($('#dbaction').val() == 'empty')
391
- ? $('#s2-warning-emptydb').show(200)
392
- : $('#s2-warning-emptydb').hide(200);
393
- }
394
-
395
-
396
- DUPX.togglePort = function ()
397
- {
398
- $('#s2-dbport-btn').hide();
399
- $('#dbport').show();
400
- }
401
-
402
-
403
- //DOCUMENT LOAD
404
- $(document).ready(function()
405
- {
406
- $('#dup-s2-dialog-data').appendTo('#dup-s2-result-container');
407
- $("select#dbaction").click(DUPX.showDeleteWarning);
408
- DUPX.showDeleteWarning();
409
-
410
- //MySQL Mode
411
- $("input[name=dbmysqlmode]").click(function() {
412
- if ($(this).val() == 'CUSTOM') {
413
- $('#dbmysqlmode_3_view').show();
414
- } else {
415
- $('#dbmysqlmode_3_view').hide();
416
- }
417
- });
418
-
419
- if ($("input[name=dbmysqlmode]:checked").val() == 'CUSTOM') {
420
- $('#dbmysqlmode_3_view').show();
421
- }
422
- $("*[data-type='toggle']").click(DUPX.toggleClick);
423
- });
424
- </script>
 
 
1
+ <?php
2
+ $_POST['logging'] = isset($_POST['logging']) ? trim(DUPX_U::sanitize($_POST['logging'])) : 1;
3
+ $_POST['exe_safe_mode'] = (isset($_POST['exe_safe_mode'])) ? DUPX_U::sanitize($_POST['exe_safe_mode']) : 0;
4
+ ?>
5
+
6
+
7
+ <!-- =========================================
8
+ VIEW: STEP 2- INPUT -->
9
+ <form id='s2-input-form' method="post" class="content-form" data-parsley-validate="true" data-parsley-excluded="input[type=hidden], [disabled], :hidden">
10
+ <input type="hidden" name="action_ajax" value="2" />
11
+ <input type="hidden" name="action_step" value="2" />
12
+ <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
13
+ <input type="hidden" name="logging" id="logging" value="<?php echo $_POST['logging'] ?>" />
14
+ <input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
15
+
16
+ <div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
17
+ <div class="hdr-main">
18
+ Step <span class="step">2</span> of 4: Install Database
19
+ </div>
20
+
21
+ <div class="s2-btngrp">
22
+ <input id="s2-basic-btn" type="button" value="Basic" class="active" onclick="DUPX.togglePanels('basic')" />
23
+ <input id="s2-cpnl-btn" type="button" value="cPanel" class="in-active" onclick="DUPX.togglePanels('cpanel')" />
24
+ </div>
25
+
26
+
27
+ <!-- =========================================
28
+ BASIC PANEL -->
29
+ <div id="s2-basic-pane">
30
+ <div class="hdr-sub1" data-type="toggle" data-target="#s2-area-setup">
31
+ <a href="javascript:void(0)"><i class="dupx-minus-square"></i> Setup</a>
32
+ </div>
33
+ <div id="s2-area-setup">
34
+ <table class="dupx-opts">
35
+ <tr>
36
+ <td>Action:</td>
37
+ <td>
38
+ <select name="dbaction" id="dbaction">
39
+ <option value="create">Create New Database</option>
40
+ <option value="empty" selected="true">Connect and Remove All Data</option>
41
+ </select>
42
+ </td>
43
+ </tr>
44
+ <tr>
45
+ <td>Host:</td>
46
+ <td>
47
+ <table class="s2-opts-dbhost">
48
+ <tr>
49
+ <td><input type="text" name="dbhost" id="dbhost" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBHOST']); ?>" placeholder="localhost" style="width:450px" /></td>
50
+ <td style="vertical-align:top">
51
+ <input id="s2-dbport-btn" type="button" onclick="DUPX.togglePort()" class="s2-small-btn" value="Port: <?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
52
+ <input name="dbport" id="dbport" type="text" style="width:80px; display:none" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPORT']); ?>" />
53
+ </td>
54
+ </tr>
55
+ </table>
56
+ </td>
57
+ </tr>
58
+ <tr>
59
+ <td>Database:</td>
60
+ <td>
61
+ <input type="text" name="dbname" id="dbname" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBNAME']); ?>" placeholder="new or existing database name" />
62
+ <div id="s2-warning-emptydb">
63
+ <label for="accept-warnings">Warning: The selected 'Action' above will remove <u>all data</u> from this database!</label>
64
+ </div>
65
+ </td>
66
+ </tr>
67
+ <tr>
68
+ <td>User:</td>
69
+ <td><input type="text" name="dbuser" id="dbuser" required="true" value="<?php echo htmlspecialchars($GLOBALS['FW_DBUSER']); ?>" placeholder="valid database username" /></td>
70
+ </tr>
71
+ <tr>
72
+ <td>Password:</td>
73
+ <td><input type="text" name="dbpass" id="dbpass" value="<?php echo htmlspecialchars($GLOBALS['FW_DBPASS']); ?>" placeholder="valid database user password" /></td>
74
+ </tr>
75
+ </table>
76
+ </div>
77
+ </div>
78
+
79
+
80
+ <!-- =========================================
81
+ C-PANEL PANEL -->
82
+ <div id="s2-cpnl-pane">
83
+ <div class="s2-gopro">
84
+ <h2>cPanel Connectivity</h2>
85
+
86
+ <?php if( DUPX_U::isURLActive($_SERVER['SERVER_NAME'], 2083) ): ?>
87
+ <div class='s2-cpanel-login'>
88
+ <b>Login to this server's cPanel</b><br/>
89
+ <a href="https://<?php echo $_SERVER['SERVER_NAME'] ?>:2083" target="cpanel" style="color:#fff">[<?php echo $_SERVER['SERVER_NAME'] ?>:2083]</a>
90
+ </div>
91
+ <?php else : ?>
92
+ <div class='s2-cpanel-off'>
93
+ <b>This server does not appear to support cPanel!</b><br/>
94
+ Consider <a href="https://snapcreek.com/wordpress-hosting/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_no_cpanel&utm_campaign=duplicator_pro" target="cpanel" style="color:#fff;font-weight:bold">upgrading</a> to a host that does.<br/>
95
+ </div>
96
+ <?php endif; ?>
97
+
98
+
99
+ <div style="text-align: center; font-size: 14px">
100
+ Want <span style="font-style: italic;">even easier</span> installs?
101
+ <a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&amp;utm_medium=wordpress_plugin&amp;utm_content=free_install_step2&amp;utm_campaign=duplicator_pro"><b>Duplicator Pro</b></a>
102
+ allows the following <b>right from the installer:</b>
103
+ </div>
104
+ <ul>
105
+ <li>Directly login to cPanel</li>
106
+ <li>Instantly create new databases &amp; users</li>
107
+ <li>Preview and select existing databases &amp; users</li>
108
+ </ul>
109
+ <small>
110
+ Note: Hosts that support cPanel provide remote access to server resources, allowing operations such as direct database and user creation.
111
+ Since the <a target="_blank" href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_install_cpanel_note&utm_campaign=duplicator_pro">Duplicator Pro</a>
112
+ installer can directly access cPanel, it dramatically speeds up your workflow.
113
+ </small>
114
+ </div>
115
+ </div>
116
+
117
+ <!-- =========================================
118
+ DIALOG: DB CONNECTION CHECK -->
119
+ <div id="s2-dbconn">
120
+ <div id="s2-dbconn-status" style="display:none">
121
+ <div style="padding: 0px 10px 10px 10px;">
122
+ <div id="s2-dbconn-test-msg" style="min-height:80px"></div>
123
+ </div>
124
+ <small><input type="button" onclick="$('#s2-dbconn-status').hide(500)" class="s2-small-btn" value="Hide Message" /></small>
125
+ </div>
126
+ </div>
127
+
128
+
129
+ <br/>
130
+
131
+ <!-- ====================================
132
+ OPTIONS
133
+ ==================================== -->
134
+ <div class="hdr-sub1" data-type="toggle" data-target="#s2-area-adv-opts">
135
+ <a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
136
+ </div>
137
+ <div id='s2-area-adv-opts' style="display:none">
138
+ <div class="help-target"><a href="?help#help-s2" target="_blank">[help]</a></div>
139
+
140
+ <table class="dupx-opts dupx-advopts">
141
+ <tr>
142
+ <td>Legacy:</td>
143
+ <td><input type="checkbox" name="dbcollatefb" id="dbcollatefb" value="1" /> <label for="dbcollatefb">Apply legacy collation fallback support for unknown collations types</label></td>
144
+ </tr>
145
+ <tr>
146
+ <td>Spacing:</td>
147
+ <td colspan="2">
148
+ <input type="checkbox" name="dbnbsp" id="dbnbsp" value="1" /> <label for="dbnbsp">Fix non-breaking space characters</label>
149
+ </td>
150
+ </tr>
151
+ <tr>
152
+ <td style="vertical-align:top">Mode:</td>
153
+ <td colspan="2">
154
+ <input type="radio" name="dbmysqlmode" id="dbmysqlmode_1" checked="true" value="DEFAULT"/> <label for="dbmysqlmode_1">Default</label> &nbsp;
155
+ <input type="radio" name="dbmysqlmode" id="dbmysqlmode_2" value="DISABLE"/> <label for="dbmysqlmode_2">Disable</label> &nbsp;
156
+ <input type="radio" name="dbmysqlmode" id="dbmysqlmode_3" value="CUSTOM"/> <label for="dbmysqlmode_3">Custom</label> &nbsp;
157
+ <div id="dbmysqlmode_3_view" style="display:none; padding:5px">
158
+ <input type="text" name="dbmysqlmode_opts" value="" /><br/>
159
+ <small>Separate additional <a href="?help#help-mysql-mode" target="_blank">sql modes</a> with commas &amp; no spaces.<br/>
160
+ Example: <i>NO_ENGINE_SUBSTITUTION,NO_ZERO_IN_DATE,...</i>.</small>
161
+ </div>
162
+ </td>
163
+ </tr>
164
+ <tr><td style="width:130px">Charset:</td><td><input type="text" name="dbcharset" id="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" /> </td></tr>
165
+ <tr><td>Collation:</td><td><input type="text" name="dbcollate" id="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" /> </tr>
166
+ </table>
167
+
168
+ </div>
169
+ <br/><br/><br/>
170
+ <br/><br/><br/>
171
+
172
+ <div class="dupx-footer-buttons">
173
+ <input type="button" onclick="DUPX.testDatabase()" class="default-btn" value="Test Database" />
174
+ <input id="dup-step2-deploy-btn" type="button" class="default-btn" value=" Next " onclick="DUPX.confirmDeployment()" />
175
+ </div>
176
+
177
+ </form>
178
+
179
+
180
+ <!-- =========================================
181
+ VIEW: STEP 2 - AJAX RESULT
182
+ Auto Posts to view.step3.php
183
+ ========================================= -->
184
+ <form id='s2-result-form' method="post" class="content-form" style="display:none">
185
+
186
+ <div class="dupx-logfile-link"><a href="installer-log.txt" target="install_log">installer-log.txt</a></div>
187
+ <div class="hdr-main">
188
+ Step <span class="step">2</span> of 4: Install Database
189
+ </div>
190
+
191
+ <!-- POST PARAMS -->
192
+ <div class="dupx-debug">
193
+ <input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
194
+ <input type="hidden" name="action_step" value="3" />
195
+ <input type="hidden" name="archive_name" value="<?php echo $GLOBALS['FW_PACKAGE_NAME'] ?>" />
196
+ <input type="hidden" name="logging" id="ajax-logging" />
197
+ <input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
198
+ <input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo $_POST['exe_safe_mode']; ?>"/>
199
+ <input type="hidden" name="dbhost" id="ajax-dbhost" />
200
+ <input type="hidden" name="dbport" id="ajax-dbport" />
201
+ <input type="hidden" name="dbuser" id="ajax-dbuser" />
202
+ <input type="hidden" name="dbpass" id="ajax-dbpass" />
203
+ <input type="hidden" name="dbname" id="ajax-dbname" />
204
+ <input type="hidden" name="json" id="ajax-json" />
205
+ <input type="hidden" name="dbcharset" id="ajax-dbcharset" />
206
+ <input type="hidden" name="dbcollate" id="ajax-dbcollate" />
207
+ <br/>
208
+ <input type='submit' value='manual submit'>
209
+ </div>
210
+
211
+ <!-- PROGRESS BAR -->
212
+ <div id="progress-area">
213
+ <div style="width:500px; margin:auto">
214
+ <h3>Installing Database Please Wait...</h3>
215
+ <div id="progress-bar"></div>
216
+ <i>This may take several minutes</i>
217
+ </div>
218
+ </div>
219
+
220
+ <!-- AJAX SYSTEM ERROR -->
221
+ <div id="ajaxerr-area" style="display:none">
222
+ <p>Please try again an issue has occurred.</p>
223
+ <div style="padding: 0px 10px 10px 0px;">
224
+ <div id="ajaxerr-data">An unknown issue has occurred with the file and database set up process. Please see the installer-log.txt file for more details.</div>
225
+ <div style="text-align:center; margin:10px auto 0px auto">
226
+ <input type="button" class="default-btn" onclick='DUPX.hideErrorResult()' value="&laquo; Try Again" /><br/><br/>
227
+ <i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_ajaxstep2_ticket' target='_blank'>snapcreek.com</a></i>
228
+ </div>
229
+ </div>
230
+ </div>
231
+ </form>
232
+
233
+
234
+
235
+ <!-- CONFIRM DIALOG -->
236
+ <div id="dialog-confirm-content" style="display:none">
237
+ <div style="padding:0 0 25px 0">
238
+ <b>Run installer with these settings?</b>
239
+ </div>
240
+
241
+ <b>Database Settings:</b><br/>
242
+ <table style="margin-left:20px">
243
+ <tr>
244
+ <td><b>Server:</b></td>
245
+ <td><i id="dlg-dbhost"></i></td>
246
+ </tr>
247
+ <tr>
248
+ <td><b>Name:</b></td>
249
+ <td><i id="dlg-dbname"></i></td>
250
+ </tr>
251
+ <tr>
252
+ <td><b>User:</b></td>
253
+ <td><i id="dlg-dbuser"></i></td>
254
+ </tr>
255
+ </table>
256
+ <br/><br/>
257
+
258
+ <small> WARNING: Be sure these database parameters are correct! Entering the wrong information WILL overwrite an existing database.
259
+ Make sure to have backups of all your data before proceeding.</small><br/>
260
+ </div>
261
+
262
+
263
+ <script>
264
+ /* Confirm Dialog to validate run */
265
+ DUPX.confirmDeployment = function()
266
+ {
267
+ var $form = $('#s2-input-form');
268
+ $form.parsley().validate();
269
+ if (!$form.parsley().isValid()) {
270
+ return;
271
+ }
272
+
273
+ $('#dlg-dbhost').html($("#dbhost").val());
274
+ $('#dlg-dbname').html($("#dbname").val());
275
+ $('#dlg-dbuser').html($("#dbuser").val());
276
+
277
+ modal({
278
+ type: 'confirm',
279
+ title: 'Install Confirmation',
280
+ text: $('#dialog-confirm-content').html(),
281
+ callback: function(result)
282
+ {
283
+ if (result == true) {
284
+ DUPX.runDeployment();
285
+ }
286
+ }
287
+ });
288
+ }
289
+
290
+
291
+ /* Performs Ajax post to extract files and create db
292
+ * Timeout (10000000 = 166 minutes) */
293
+ DUPX.runDeployment = function()
294
+ {
295
+ var $form = $('#s2-input-form');
296
+ var dbhost = $("#dbhost").val();
297
+ var dbname = $("#dbname").val();
298
+ var dbuser = $("#dbuser").val();
299
+
300
+ $.ajax({
301
+ type: "POST",
302
+ timeout: 1800000,
303
+ dataType: "json",
304
+ url: window.location.href,
305
+ data: $form.serialize(),
306
+ beforeSend: function() {
307
+ DUPX.showProgressBar();
308
+ $form.hide();
309
+ $('#s2-result-form').show();
310
+ },
311
+ success: function(data, textStatus, xhr){
312
+ if (typeof(data) != 'undefined' && data.pass == 1) {
313
+ $("#ajax-dbhost").val($("#dbhost").val());
314
+ $("#ajax-dbport").val($("#dbport").val());
315
+ $("#ajax-dbuser").val($("#dbuser").val());
316
+ $("#ajax-dbpass").val($("#dbpass").val());
317
+ $("#ajax-dbname").val($("#dbname").val());
318
+ $("#ajax-dbcharset").val($("#dbcharset").val());
319
+ $("#ajax-dbcollate").val($("#dbcollate").val());
320
+ $("#ajax-logging").val($("#logging").val());
321
+ $("#ajax-json").val(escape(JSON.stringify(data)));
322
+ <?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
323
+ setTimeout(function() {$('#s2-result-form').submit();}, 500);
324
+ <?php endif; ?>
325
+ $('#progress-area').fadeOut(1000);
326
+ } else {
327
+ DUPX.hideProgressBar();
328
+ }
329
+ },
330
+ error: function(xhr) {
331
+ var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
332
+ status += "<b>Status:</b> " + xhr.statusText + "<br/>";
333
+ status += "<b>Response:</b> " + xhr.responseText + "";
334
+ status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
335
+ status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
336
+ status += "- Check the web server and PHP error logs. <br/>";
337
+ status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step2deploy_timout#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
338
+ $('#ajaxerr-data').html(status);
339
+ DUPX.hideProgressBar();
340
+ }
341
+ });
342
+
343
+ }
344
+
345
+ /**
346
+ * Toggles the cpanel Login area */
347
+ DUPX.togglePanels = function (pane)
348
+ {
349
+ $('#s2-basic-pane, #s2-cpnl-pane').hide();
350
+ $('#s2-basic-btn, #s2-cpnl-btn').removeClass('active in-active');
351
+ if (pane == 'basic') {
352
+ $('#s2-basic-pane').show();
353
+ $('#s2-basic-btn').addClass('active');
354
+ $('#s2-cpnl-btn').addClass('in-active');
355
+ } else {
356
+ $('#s2-cpnl-pane').show(200);
357
+ $('#s2-cpnl-btn').addClass('active');
358
+ $('#s2-basic-btn').addClass('in-active');
359
+ }
360
+ }
361
+
362
+
363
+ /** Go back on AJAX result view */
364
+ DUPX.hideErrorResult = function()
365
+ {
366
+ $('#s2-result-form').hide();
367
+ $('#s2-input-form').show(200);
368
+ }
369
+
370
+
371
+ /** Shows results of database connection
372
+ * Timeout (45000 = 45 secs) */
373
+ DUPX.testDatabase = function ()
374
+ {
375
+ $.ajax({
376
+ type: "POST",
377
+ timeout: 45000,
378
+ url: window.location.href + '?' + 'dbtest=1',
379
+ data: $('#s2-input-form').serialize(),
380
+ success: function(data){ $('#s2-dbconn-test-msg').html(data); },
381
+ error: function(data){ alert('An error occurred while testing the database connection! Contact your server admin to make sure the connection inputs are correct!'); }
382
+ });
383
+
384
+ $('#s2-dbconn-test-msg').html("Attempting Connection. Please wait...");
385
+ $("#s2-dbconn-status").show(100);
386
+
387
+ }
388
+
389
+
390
+ DUPX.showDeleteWarning = function ()
391
+ {
392
+ ($('#dbaction').val() == 'empty')
393
+ ? $('#s2-warning-emptydb').show(200)
394
+ : $('#s2-warning-emptydb').hide(200);
395
+ }
396
+
397
+
398
+ DUPX.togglePort = function ()
399
+ {
400
+ $('#s2-dbport-btn').hide();
401
+ $('#dbport').show();
402
+ }
403
+
404
+
405
+ //DOCUMENT LOAD
406
+ $(document).ready(function()
407
+ {
408
+ $('#dup-s2-dialog-data').appendTo('#dup-s2-result-container');
409
+ $("select#dbaction").click(DUPX.showDeleteWarning);
410
+ DUPX.showDeleteWarning();
411
+
412
+ //MySQL Mode
413
+ $("input[name=dbmysqlmode]").click(function() {
414
+ if ($(this).val() == 'CUSTOM') {
415
+ $('#dbmysqlmode_3_view').show();
416
+ } else {
417
+ $('#dbmysqlmode_3_view').hide();
418
+ }
419
+ });
420
+
421
+ if ($("input[name=dbmysqlmode]:checked").val() == 'CUSTOM') {
422
+ $('#dbmysqlmode_3_view').show();
423
+ }
424
+ $("*[data-type='toggle']").click(DUPX.toggleClick);
425
+ });
426
+ </script>
installer/build/view.step3.php CHANGED
@@ -1,339 +1,341 @@
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
- $_POST['exe_safe_mode'] = isset($_POST['exe_safe_mode']) ? $_POST['exe_safe_mode'] : 0;
11
- ?>
12
-
13
-
14
- <!-- =========================================
15
- VIEW: STEP 3- INPUT -->
16
- <form id='s3-input-form' method="post" class="content-form">
17
-
18
- <!-- POST PARAMS -->
19
- <input type="hidden" name="action_ajax" value="3" />
20
- <input type="hidden" name="action_step" value="3" />
21
- <input type="hidden" name="logging" value="<?php echo $_POST['logging'] ?>" />
22
- <input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
23
- <input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
24
- <input type="hidden" name="json" value="<?php echo $_POST['json']; ?>" />
25
- <input type="hidden" name="dbhost" value="<?php echo $_POST['dbhost'] ?>" />
26
- <input type="hidden" name="dbport" value="<?php echo $_POST['dbport'] ?>" />
27
- <input type="hidden" name="dbuser" value="<?php echo $_POST['dbuser'] ?>" />
28
- <input type="hidden" name="dbpass" value="<?php echo htmlentities($_POST['dbpass']) ?>" />
29
- <input type="hidden" name="dbname" value="<?php echo $_POST['dbname'] ?>" />
30
- <input type="hidden" name="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" />
31
- <input type="hidden" name="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" />
32
- <input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo $_POST['exe_safe_mode'] ?>" />
33
-
34
- <div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
35
- <div class="hdr-main">
36
- Step <span class="step">3</span> of 4: Update Data
37
- </div>
38
-
39
- <!-- ====================================
40
- NEW SETTINGS
41
- ==================================== -->
42
- <div class="hdr-sub1" style="margin-top:8px" data-type="toggle" data-target="#s3-new-settings">
43
- <a href="javascript:void(0)"><i class="dupx-minus-square"></i> New Settings</a>
44
- </div>
45
- <div id='s3-new-settings'>
46
- <table class="s3-table-inputs">
47
- <tr>
48
- <td style="width:80px">URL:</td>
49
- <td>
50
- <input type="text" name="url_new" id="url_new" value="" />
51
- <a href="javascript:DUPX.getNewURL('url_new')" style="font-size:12px">get</a>
52
- </td>
53
- </tr>
54
- <tr>
55
- <td>Path:</td>
56
- <td><input type="text" name="path_new" id="path_new" value="<?php echo $new_path ?>" /></td>
57
- </tr>
58
- <tr>
59
- <td>Title:</td>
60
- <td><input type="text" name="blogname" id="blogname" value="<?php echo $GLOBALS['FW_BLOGNAME'] ?>" /></td>
61
- </tr>
62
- </table>
63
- </div>
64
- <br/><br/>
65
-
66
- <!-- ====================================
67
- OPTIONS
68
- ==================================== -->
69
- <div class="hdr-sub1" data-type="toggle" data-target="#s3-adv-opts">
70
- <a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
71
- </div>
72
- <div id='s3-adv-opts' style="display:none;">
73
- <div class="help-target"><a href="?help#help-s3" target="_blank">[help]</a></div>
74
- <br/>
75
-
76
- <div class="hdr-sub3">New Admin Account</div>
77
- <div style="text-align: center; margin-top:7px">
78
- <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>
79
- </div>
80
- <table class="s3-table-inputs">
81
- <tr>
82
- <td>Username:</td>
83
- <td><input type="text" name="wp_username" id="wp_username" value="" title="4 characters minimum" placeholder="(4 or more characters)" /></td>
84
- </tr>
85
- <tr>
86
- <td valign="top">Password:</td>
87
- <td><input type="text" name="wp_password" id="wp_password" value="" title="6 characters minimum" placeholder="(6 or more characters)" /></td>
88
- </tr>
89
- </table>
90
- <br/><br/>
91
-
92
- <div class="hdr-sub3">Scan Options</div>
93
- <table class="s3-table-inputs">
94
- <tr>
95
- <td>Site URL:</td>
96
- <td>
97
- <input type="text" name="siteurl" id="siteurl" value="" />
98
- <a href="javascript:DUPX.getNewURL('siteurl')" style="font-size:12px">get</a><br/>
99
- </td>
100
- </tr>
101
- <tr>
102
- <td>Old URL:</td>
103
- <td>
104
- <input type="text" name="url_old" id="url_old" value="<?php echo $GLOBALS['FW_URL_OLD'] ?>" readonly="readonly" class="readonly" />
105
- <a href="javascript:DUPX.editOldURL()" id="edit_url_old" style="font-size:12px">edit</a>
106
- </td>
107
- </tr>
108
- <tr>
109
- <td>Old Path:</td>
110
- <td>
111
- <input type="text" name="path_old" id="path_old" value="<?php echo $old_path ?>" readonly="readonly" class="readonly" />
112
- <a href="javascript:DUPX.editOldPath()" id="edit_path_old" style="font-size:12px">edit</a>
113
- </td>
114
- </tr>
115
- </table><br/>
116
-
117
- <table>
118
- <tr>
119
- <td style="padding-right:10px">
120
- <b>Scan Tables:</b>
121
- <div class="s3-allnonelinks">
122
- <a href="javascript:void(0)" onclick="$('#tables option').prop('selected',true);">[All]</a>
123
- <a href="javascript:void(0)" onclick="$('#tables option').prop('selected',false);">[None]</a>
124
- </div><br style="clear:both" />
125
- <select id="tables" name="tables[]" multiple="multiple">
126
- <?php
127
- foreach( $all_tables as $table ) {
128
- echo '<option selected="selected" value="' . DUPX_U::escapeHTML( $table ) . '">' . $table . '</option>';
129
- }
130
- ?>
131
- </select>
132
- </td>
133
- <td valign="top">
134
- <b>Activate Plugins:</b>
135
- <?php echo ($_POST['exe_safe_mode'] > 0) ? '<small class="s3-warn">Safe Mode Enabled</small>' : '' ; ?>
136
- <div class="s3-allnonelinks" style="<?php echo ($_POST['exe_safe_mode']>0)? 'display:none':''; ?>">
137
- <a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',true);">[All]</a>
138
- <a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',false);">[None]</a>
139
- </div><br style="clear:both" />
140
- <select id="plugins" name="plugins[]" multiple="multiple" <?php echo ($_POST['exe_safe_mode'] > 0) ? 'disabled="disabled"' : ''; ?>>
141
- <?php
142
- $selected_string = ($_POST['exe_safe_mode'] > 0) ? '' : 'selected="selected"';
143
- foreach ($active_plugins as $plugin) {
144
- $plug_val = DUPX_U::escapeHTML($plugin);
145
- $plug_name = dirname($plugin);
146
- echo "<option {$selected_string} value='{$plug_val}'>{$plug_name}</option>";
147
- }
148
- ?>
149
- </select>
150
- </td>
151
- </tr>
152
- </table>
153
- <br/>
154
-
155
- <input type="checkbox" name="fullsearch" id="fullsearch" value="1" /> <label for="fullsearch">Use Database Full Search Mode </label><br/>
156
- <input type="checkbox" name="postguid" id="postguid" value="1" /> <label for="postguid">Keep Post GUID Unchanged</label><br/>
157
- <br/><br/>
158
-
159
- <!-- WP-CONFIG -->
160
- <div class="hdr-sub3">WP-Config File</div>
161
- <table class="dupx-opts dupx-advopts">
162
- <tr>
163
- <td>Cache:</td>
164
- <td style="width:125px"><input type="checkbox" name="cache_wp" id="cache_wp" /> <label for="cache_wp">Keep Enabled</label></td>
165
- <td><input type="checkbox" name="cache_path" id="cache_path" /> <label for="cache_path">Keep Home Path</label></td>
166
- </tr>
167
- <tr>
168
- <td>SSL:</td>
169
- <td><input type="checkbox" name="ssl_admin" id="ssl_admin" /> <label for="ssl_admin">Enforce on Admin</label></td>
170
- <td></td>
171
- </tr>
172
- </table>
173
- <br/><br/><br/>
174
- <br/><br/>
175
- </div>
176
-
177
- <div class="dupx-footer-buttons">
178
- <input id="dup-step3-next" class="default-btn" type="button" value=" Next " onclick="DUPX.runUpdate()" />
179
- </div>
180
- </form>
181
-
182
-
183
- <!-- =========================================
184
- VIEW: STEP 3 - AJAX RESULT
185
- ========================================= -->
186
- <form id='s3-result-form' method="post" class="content-form" style="display:none">
187
-
188
- <div class="dupx-logfile-link"><a href="installer-log.txt" target="install_log">installer-log.txt</a></div>
189
- <div class="hdr-main">
190
- Step <span class="step">3</span> of 4: Update Data
191
- </div>
192
-
193
- <!-- POST PARAMS -->
194
- <div class="dupx-debug">
195
- <input type="hidden" name="action_step" value="4" />
196
- <input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
197
- <input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
198
- <input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo $_POST['exe_safe_mode']; ?>"/>
199
- <input type="hidden" name="url_new" id="ajax-url_new" />
200
- <input type="hidden" name="json" id="ajax-json" />
201
- <br/>
202
- <input type='submit' value='manual submit'>
203
- </div>
204
-
205
- <!-- PROGRESS BAR -->
206
- <div id="progress-area">
207
- <div style="width:500px; margin:auto">
208
- <h3>Updating Data Replacements Please Wait...</h3>
209
- <div id="progress-bar"></div>
210
- <i>This may take several minutes</i>
211
- </div>
212
- </div>
213
-
214
- <!-- AJAX SYSTEM ERROR -->
215
- <div id="ajaxerr-area" style="display:none">
216
- <p>Please try again an issue has occurred.</p>
217
- <div style="padding: 0px 10px 10px 10px;">
218
- <div id="ajaxerr-data">An unknown issue has occurred with the update data set up process. Please see the installer-log.txt file for more details.</div>
219
- <div style="text-align:center; margin:10px auto 0px auto">
220
- <input type="button" class="default-btn" onclick='DUPX.hideErrorResult2()' value="&laquo; Try Again" /><br/><br/>
221
- <i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step3_ajax' target='_blank'>snapcreek.com</a></i>
222
- </div>
223
- </div>
224
- </div>
225
- </form>
226
-
227
- <script>
228
- /**
229
- * Timeout (10000000 = 166 minutes) */
230
- DUPX.runUpdate = function()
231
- {
232
- //Validation
233
- var wp_username = $.trim($("#wp_username").val()).length || 0;
234
- var wp_password = $.trim($("#wp_password").val()).length || 0;
235
-
236
- if ( $.trim($("#url_new").val()) == "" ) {alert("The 'New URL' field is required!"); return false;}
237
- if ( $.trim($("#siteurl").val()) == "" ) {alert("The 'Site URL' field is required!"); return false;}
238
- if (wp_username >= 1 && wp_username < 4) {alert("The New Admin Account 'Username' must be four or more characters"); return false;}
239
- if (wp_username >= 4 && wp_password < 6) {alert("The New Admin Account 'Password' must be six or more characters"); return false;}
240
-
241
- $.ajax({
242
- type: "POST",
243
- timeout: 1800000,
244
- dataType: "json",
245
- url: window.location.href,
246
- data: $('#s3-input-form').serialize(),
247
- beforeSend: function() {
248
- DUPX.showProgressBar();
249
- $('#s3-input-form').hide();
250
- $('#s3-result-form').show();
251
- },
252
- success: function(data){
253
- if (typeof(data) != 'undefined' && data.step3.pass == 1) {
254
- $("#ajax-url_new").val($("#url_new").val());
255
- $("#ajax-json").val(escape(JSON.stringify(data)));
256
- <?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
257
- setTimeout(function(){$('#s3-result-form').submit();}, 500);
258
- <?php endif; ?>
259
- $('#progress-area').fadeOut(1000);
260
- } else {
261
- DUPX.hideProgressBar();
262
- }
263
- },
264
- error: function(xhr) {
265
- var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
266
- status += "<b>Status:</b> " + xhr.statusText + "<br/>";
267
- status += "<b>Response:</b> " + xhr.responseText + "";
268
- status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
269
- status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
270
- status += "- Check the web server and PHP error logs. <br/>";
271
- status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step3_ajax_rundepl#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
272
- $('#ajaxerr-data').html(status);
273
- DUPX.hideProgressBar();
274
- }
275
- });
276
- }
277
-
278
- /** Returns the windows active url */
279
- DUPX.getNewURL = function(id)
280
- {
281
- var filename= window.location.pathname.split('/').pop() || 'installer.php' ;
282
- var path = window.location.href.replace(filename, '').replace(/\/$/, '');
283
- $("#" + id).val(path);
284
- }
285
-
286
- /** Allows user to edit the package url */
287
- DUPX.editOldURL = function()
288
- {
289
- var msg = 'This is the URL that was generated when the package was created.\n';
290
- msg += 'Changing this value may cause issues with the install process.\n\n';
291
- msg += 'Only modify this value if you know exactly what the value should be.\n';
292
- msg += 'See "General Settings" in the WordPress Administrator for more details.\n\n';
293
- msg += 'Are you sure you want to continue?';
294
-
295
- if (confirm(msg)) {
296
- $("#url_old").removeAttr('readonly');
297
- $("#url_old").removeClass('readonly');
298
- $('#edit_url_old').hide('slow');
299
- }
300
- }
301
-
302
- /** Allows user to edit the package path */
303
- DUPX.editOldPath = function()
304
- {
305
- var msg = 'This is the SERVER URL that was generated when the package was created.\n';
306
- msg += 'Changing this value may cause issues with the install process.\n\n';
307
- msg += 'Only modify this value if you know exactly what the value should be.\n';
308
- msg += 'Are you sure you want to continue?';
309
-
310
- if (confirm(msg)) {
311
- $("#path_old").removeAttr('readonly');
312
- $("#path_old").removeClass('readonly');
313
- $('#edit_path_old').hide('slow');
314
- }
315
- }
316
-
317
- /** Go back on AJAX result view */
318
- DUPX.hideErrorResult2 = function()
319
- {
320
- $('#s3-result-form').hide();
321
- $('#s3-input-form').show(200);
322
- }
323
-
324
- //DOCUMENT LOAD
325
- $(document).ready(function()
326
- {
327
- DUPX.getNewURL('url_new');
328
- DUPX.getNewURL('siteurl');
329
- $("*[data-type='toggle']").click(DUPX.toggleClick);
330
- $("#wp_password").passStrength({
331
- shortPass: "top_shortPass",
332
- badPass: "top_badPass",
333
- goodPass: "top_goodPass",
334
- strongPass: "top_strongPass",
335
- baseStyle: "top_testresult",
336
- userid: "#wp_username",
337
- messageloc: 1 });
338
- });
 
 
339
  </script>
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
+ $_POST['exe_safe_mode'] = isset($_POST['exe_safe_mode']) ? $_POST['exe_safe_mode'] : 0;
11
+ ?>
12
+
13
+
14
+ <!-- =========================================
15
+ VIEW: STEP 3- INPUT -->
16
+ <form id='s3-input-form' method="post" class="content-form">
17
+
18
+ <!-- POST PARAMS -->
19
+ <input type="hidden" name="action_ajax" value="3" />
20
+ <input type="hidden" name="action_step" value="3" />
21
+ <input type="hidden" name="logging" value="<?php echo $_POST['logging'] ?>" />
22
+ <input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
23
+ <input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
24
+ <input type="hidden" name="json" value="<?php echo $_POST['json']; ?>" />
25
+ <input type="hidden" name="dbhost" value="<?php echo $_POST['dbhost'] ?>" />
26
+ <input type="hidden" name="dbport" value="<?php echo $_POST['dbport'] ?>" />
27
+ <input type="hidden" name="dbuser" value="<?php echo $_POST['dbuser'] ?>" />
28
+ <input type="hidden" name="dbpass" value="<?php echo htmlentities($_POST['dbpass']) ?>" />
29
+ <input type="hidden" name="dbname" value="<?php echo $_POST['dbname'] ?>" />
30
+ <input type="hidden" name="dbcharset" value="<?php echo $_POST['dbcharset'] ?>" />
31
+ <input type="hidden" name="dbcollate" value="<?php echo $_POST['dbcollate'] ?>" />
32
+ <input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo $_POST['exe_safe_mode'] ?>" />
33
+ <input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
34
+
35
+ <div class="dupx-logfile-link"><a href="installer-log.txt?now=<?php echo $GLOBALS['NOW_DATE'] ?>" target="install_log">installer-log.txt</a></div>
36
+ <div class="hdr-main">
37
+ Step <span class="step">3</span> of 4: Update Data
38
+ </div>
39
+
40
+ <!-- ====================================
41
+ NEW SETTINGS
42
+ ==================================== -->
43
+ <div class="hdr-sub1" style="margin-top:8px" data-type="toggle" data-target="#s3-new-settings">
44
+ <a href="javascript:void(0)"><i class="dupx-minus-square"></i> New Settings</a>
45
+ </div>
46
+ <div id='s3-new-settings'>
47
+ <table class="s3-table-inputs">
48
+ <tr>
49
+ <td style="width:80px">URL:</td>
50
+ <td>
51
+ <input type="text" name="url_new" id="url_new" value="" />
52
+ <a href="javascript:DUPX.getNewURL('url_new')" style="font-size:12px">get</a>
53
+ </td>
54
+ </tr>
55
+ <tr>
56
+ <td>Path:</td>
57
+ <td><input type="text" name="path_new" id="path_new" value="<?php echo $new_path ?>" /></td>
58
+ </tr>
59
+ <tr>
60
+ <td>Title:</td>
61
+ <td><input type="text" name="blogname" id="blogname" value="<?php echo $GLOBALS['FW_BLOGNAME'] ?>" /></td>
62
+ </tr>
63
+ </table>
64
+ </div>
65
+ <br/><br/>
66
+
67
+ <!-- ====================================
68
+ OPTIONS
69
+ ==================================== -->
70
+ <div class="hdr-sub1" data-type="toggle" data-target="#s3-adv-opts">
71
+ <a href="javascript:void(0)"><i class="dupx-plus-square"></i> Options</a>
72
+ </div>
73
+ <div id='s3-adv-opts' style="display:none;">
74
+ <div class="help-target"><a href="?help#help-s3" target="_blank">[help]</a></div>
75
+ <br/>
76
+
77
+ <div class="hdr-sub3">New Admin Account</div>
78
+ <div style="text-align: center; margin-top:7px">
79
+ <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>
80
+ </div>
81
+ <table class="s3-table-inputs">
82
+ <tr>
83
+ <td>Username:</td>
84
+ <td><input type="text" name="wp_username" id="wp_username" value="" title="4 characters minimum" placeholder="(4 or more characters)" /></td>
85
+ </tr>
86
+ <tr>
87
+ <td valign="top">Password:</td>
88
+ <td><input type="text" name="wp_password" id="wp_password" value="" title="6 characters minimum" placeholder="(6 or more characters)" /></td>
89
+ </tr>
90
+ </table>
91
+ <br/><br/>
92
+
93
+ <div class="hdr-sub3">Scan Options</div>
94
+ <table class="s3-table-inputs">
95
+ <tr>
96
+ <td>Site URL:</td>
97
+ <td>
98
+ <input type="text" name="siteurl" id="siteurl" value="" />
99
+ <a href="javascript:DUPX.getNewURL('siteurl')" style="font-size:12px">get</a><br/>
100
+ </td>
101
+ </tr>
102
+ <tr>
103
+ <td>Old URL:</td>
104
+ <td>
105
+ <input type="text" name="url_old" id="url_old" value="<?php echo $GLOBALS['FW_URL_OLD'] ?>" readonly="readonly" class="readonly" />
106
+ <a href="javascript:DUPX.editOldURL()" id="edit_url_old" style="font-size:12px">edit</a>
107
+ </td>
108
+ </tr>
109
+ <tr>
110
+ <td>Old Path:</td>
111
+ <td>
112
+ <input type="text" name="path_old" id="path_old" value="<?php echo $old_path ?>" readonly="readonly" class="readonly" />
113
+ <a href="javascript:DUPX.editOldPath()" id="edit_path_old" style="font-size:12px">edit</a>
114
+ </td>
115
+ </tr>
116
+ </table><br/>
117
+
118
+ <table>
119
+ <tr>
120
+ <td style="padding-right:10px">
121
+ <b>Scan Tables:</b>
122
+ <div class="s3-allnonelinks">
123
+ <a href="javascript:void(0)" onclick="$('#tables option').prop('selected',true);">[All]</a>
124
+ <a href="javascript:void(0)" onclick="$('#tables option').prop('selected',false);">[None]</a>
125
+ </div><br style="clear:both" />
126
+ <select id="tables" name="tables[]" multiple="multiple">
127
+ <?php
128
+ foreach( $all_tables as $table ) {
129
+ echo '<option selected="selected" value="' . DUPX_U::escapeHTML( $table ) . '">' . $table . '</option>';
130
+ }
131
+ ?>
132
+ </select>
133
+ </td>
134
+ <td valign="top">
135
+ <b>Activate Plugins:</b>
136
+ <?php echo ($_POST['exe_safe_mode'] > 0) ? '<small class="s3-warn">Safe Mode Enabled</small>' : '' ; ?>
137
+ <div class="s3-allnonelinks" style="<?php echo ($_POST['exe_safe_mode']>0)? 'display:none':''; ?>">
138
+ <a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',true);">[All]</a>
139
+ <a href="javascript:void(0)" onclick="$('#plugins option').prop('selected',false);">[None]</a>
140
+ </div><br style="clear:both" />
141
+ <select id="plugins" name="plugins[]" multiple="multiple" <?php echo ($_POST['exe_safe_mode'] > 0) ? 'disabled="disabled"' : ''; ?>>
142
+ <?php
143
+ $selected_string = ($_POST['exe_safe_mode'] > 0) ? '' : 'selected="selected"';
144
+ foreach ($active_plugins as $plugin) {
145
+ $plug_val = DUPX_U::escapeHTML($plugin);
146
+ $plug_name = dirname($plugin);
147
+ echo "<option {$selected_string} value='{$plug_val}'>{$plug_name}</option>";
148
+ }
149
+ ?>
150
+ </select>
151
+ </td>
152
+ </tr>
153
+ </table>
154
+ <br/>
155
+
156
+ <input type="checkbox" name="fullsearch" id="fullsearch" value="1" /> <label for="fullsearch">Use Database Full Search Mode </label><br/>
157
+ <input type="checkbox" name="postguid" id="postguid" value="1" /> <label for="postguid">Keep Post GUID Unchanged</label><br/>
158
+ <br/><br/>
159
+
160
+ <!-- WP-CONFIG -->
161
+ <div class="hdr-sub3">WP-Config File</div>
162
+ <table class="dupx-opts dupx-advopts">
163
+ <tr>
164
+ <td>Cache:</td>
165
+ <td style="width:125px"><input type="checkbox" name="cache_wp" id="cache_wp" /> <label for="cache_wp">Keep Enabled</label></td>
166
+ <td><input type="checkbox" name="cache_path" id="cache_path" /> <label for="cache_path">Keep Home Path</label></td>
167
+ </tr>
168
+ <tr>
169
+ <td>SSL:</td>
170
+ <td><input type="checkbox" name="ssl_admin" id="ssl_admin" /> <label for="ssl_admin">Enforce on Admin</label></td>
171
+ <td></td>
172
+ </tr>
173
+ </table>
174
+ <br/><br/><br/>
175
+ <br/><br/>
176
+ </div>
177
+
178
+ <div class="dupx-footer-buttons">
179
+ <input id="dup-step3-next" class="default-btn" type="button" value=" Next " onclick="DUPX.runUpdate()" />
180
+ </div>
181
+ </form>
182
+
183
+
184
+ <!-- =========================================
185
+ VIEW: STEP 3 - AJAX RESULT
186
+ ========================================= -->
187
+ <form id='s3-result-form' method="post" class="content-form" style="display:none">
188
+
189
+ <div class="dupx-logfile-link"><a href="installer-log.txt" target="install_log">installer-log.txt</a></div>
190
+ <div class="hdr-main">
191
+ Step <span class="step">3</span> of 4: Update Data
192
+ </div>
193
+
194
+ <!-- POST PARAMS -->
195
+ <div class="dupx-debug">
196
+ <input type="hidden" name="secure-pass" value="<?php echo $_POST['secure-pass']; ?>" />
197
+ <input type="hidden" name="action_step" value="4" />
198
+ <input type="hidden" name="archive_name" value="<?php echo $_POST['archive_name'] ?>" />
199
+ <input type="hidden" name="retain_config" value="<?php echo $_POST['retain_config']; ?>" />
200
+ <input type="hidden" name="exe_safe_mode" id="exe-safe-mode" value="<?php echo $_POST['exe_safe_mode']; ?>"/>
201
+ <input type="hidden" name="url_new" id="ajax-url_new" />
202
+ <input type="hidden" name="json" id="ajax-json" />
203
+ <br/>
204
+ <input type='submit' value='manual submit'>
205
+ </div>
206
+
207
+ <!-- PROGRESS BAR -->
208
+ <div id="progress-area">
209
+ <div style="width:500px; margin:auto">
210
+ <h3>Updating Data Replacements Please Wait...</h3>
211
+ <div id="progress-bar"></div>
212
+ <i>This may take several minutes</i>
213
+ </div>
214
+ </div>
215
+
216
+ <!-- AJAX SYSTEM ERROR -->
217
+ <div id="ajaxerr-area" style="display:none">
218
+ <p>Please try again an issue has occurred.</p>
219
+ <div style="padding: 0px 10px 10px 10px;">
220
+ <div id="ajaxerr-data">An unknown issue has occurred with the update data set up process. Please see the installer-log.txt file for more details.</div>
221
+ <div style="text-align:center; margin:10px auto 0px auto">
222
+ <input type="button" class="default-btn" onclick='DUPX.hideErrorResult2()' value="&laquo; Try Again" /><br/><br/>
223
+ <i style='font-size:11px'>See online help for more details at <a href='https://snapcreek.com/ticket?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step3_ajax' target='_blank'>snapcreek.com</a></i>
224
+ </div>
225
+ </div>
226
+ </div>
227
+ </form>
228
+
229
+ <script>
230
+ /**
231
+ * Timeout (10000000 = 166 minutes) */
232
+ DUPX.runUpdate = function()
233
+ {
234
+ //Validation
235
+ var wp_username = $.trim($("#wp_username").val()).length || 0;
236
+ var wp_password = $.trim($("#wp_password").val()).length || 0;
237
+
238
+ if ( $.trim($("#url_new").val()) == "" ) {alert("The 'New URL' field is required!"); return false;}
239
+ if ( $.trim($("#siteurl").val()) == "" ) {alert("The 'Site URL' field is required!"); return false;}
240
+ if (wp_username >= 1 && wp_username < 4) {alert("The New Admin Account 'Username' must be four or more characters"); return false;}
241
+ if (wp_username >= 4 && wp_password < 6) {alert("The New Admin Account 'Password' must be six or more characters"); return false;}
242
+
243
+ $.ajax({
244
+ type: "POST",
245
+ timeout: 1800000,
246
+ dataType: "json",
247
+ url: window.location.href,
248
+ data: $('#s3-input-form').serialize(),
249
+ beforeSend: function() {
250
+ DUPX.showProgressBar();
251
+ $('#s3-input-form').hide();
252
+ $('#s3-result-form').show();
253
+ },
254
+ success: function(data){
255
+ if (typeof(data) != 'undefined' && data.step3.pass == 1) {
256
+ $("#ajax-url_new").val($("#url_new").val());
257
+ $("#ajax-json").val(escape(JSON.stringify(data)));
258
+ <?php if (! $GLOBALS['DUPX_DEBUG']) : ?>
259
+ setTimeout(function(){$('#s3-result-form').submit();}, 500);
260
+ <?php endif; ?>
261
+ $('#progress-area').fadeOut(1000);
262
+ } else {
263
+ DUPX.hideProgressBar();
264
+ }
265
+ },
266
+ error: function(xhr) {
267
+ var status = "<b>Server Code:</b> " + xhr.status + "<br/>";
268
+ status += "<b>Status:</b> " + xhr.statusText + "<br/>";
269
+ status += "<b>Response:</b> " + xhr.responseText + "";
270
+ status += "<hr/><b>Additional Troubleshooting Tips:</b><br/>";
271
+ status += "- Check the <a href='installer-log.txt' target='install_log'>installer-log.txt</a> file for warnings or errors.<br/>";
272
+ status += "- Check the web server and PHP error logs. <br/>";
273
+ status += "- For timeout issues visit the <a href='https://snapcreek.com/duplicator/docs/faqs-tech/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_campaign=problem_resolution&utm_content=inst_step3_ajax_rundepl#faq-trouble-100-q' target='_blank'>Timeout FAQ Section</a><br/>";
274
+ $('#ajaxerr-data').html(status);
275
+ DUPX.hideProgressBar();
276
+ }
277
+ });
278
+ }
279
+
280
+ /** Returns the windows active url */
281
+ DUPX.getNewURL = function(id)
282
+ {
283
+ var filename= window.location.pathname.split('/').pop() || 'installer.php' ;
284
+ var path = window.location.href.replace(filename, '').replace(/\/$/, '');
285
+ $("#" + id).val(path);
286
+ }
287
+
288
+ /** Allows user to edit the package url */
289
+ DUPX.editOldURL = function()
290
+ {
291
+ var msg = 'This is the URL that was generated when the package was created.\n';
292
+ msg += 'Changing this value may cause issues with the install process.\n\n';
293
+ msg += 'Only modify this value if you know exactly what the value should be.\n';
294
+ msg += 'See "General Settings" in the WordPress Administrator for more details.\n\n';
295
+ msg += 'Are you sure you want to continue?';
296
+
297
+ if (confirm(msg)) {
298
+ $("#url_old").removeAttr('readonly');
299
+ $("#url_old").removeClass('readonly');
300
+ $('#edit_url_old').hide('slow');
301
+ }
302
+ }
303
+
304
+ /** Allows user to edit the package path */
305
+ DUPX.editOldPath = function()
306
+ {
307
+ var msg = 'This is the SERVER URL that was generated when the package was created.\n';
308
+ msg += 'Changing this value may cause issues with the install process.\n\n';
309
+ msg += 'Only modify this value if you know exactly what the value should be.\n';
310
+ msg += 'Are you sure you want to continue?';
311
+
312
+ if (confirm(msg)) {
313
+ $("#path_old").removeAttr('readonly');
314
+ $("#path_old").removeClass('readonly');
315
+ $('#edit_path_old').hide('slow');
316
+ }
317
+ }
318
+
319
+ /** Go back on AJAX result view */
320
+ DUPX.hideErrorResult2 = function()
321
+ {
322
+ $('#s3-result-form').hide();
323
+ $('#s3-input-form').show(200);
324
+ }
325
+
326
+ //DOCUMENT LOAD
327
+ $(document).ready(function()
328
+ {
329
+ DUPX.getNewURL('url_new');
330
+ DUPX.getNewURL('siteurl');
331
+ $("*[data-type='toggle']").click(DUPX.toggleClick);
332
+ $("#wp_password").passStrength({
333
+ shortPass: "top_shortPass",
334
+ badPass: "top_badPass",
335
+ goodPass: "top_goodPass",
336
+ strongPass: "top_strongPass",
337
+ baseStyle: "top_testresult",
338
+ userid: "#wp_username",
339
+ messageloc: 1 });
340
+ });
341
  </script>
installer/build/view.step4.php CHANGED
@@ -67,12 +67,17 @@ VIEW: STEP 4 - INPUT -->
67
  <br/><br/>
68
 
69
  <div class="s4-go-back">
70
- Additional Notes:
71
  <ul style="margin-top: 1px">
72
  <li>
73
  Review the <a href="<?php echo $url_new_rtrim; ?>" target="_blank">front-end</a> or
74
  re-run installer at <a href="<?php echo "{$url_new_rtrim}/installer.php"; ?>">step 1</a>
75
  </li>
 
 
 
 
 
76
  <li>The .htaccess file was reset. Resave plugins that write to this file.</li>
77
  <li>
78
  Visit the <a href="installer.php?help=1#troubleshoot" target="_blank">troubleshoot</a> section or
67
  <br/><br/>
68
 
69
  <div class="s4-go-back">
70
+ Final Steps:
71
  <ul style="margin-top: 1px">
72
  <li>
73
  Review the <a href="<?php echo $url_new_rtrim; ?>" target="_blank">front-end</a> or
74
  re-run installer at <a href="<?php echo "{$url_new_rtrim}/installer.php"; ?>">step 1</a>
75
  </li>
76
+ <li>Finalize installation by logging into the WordPress Admin Login and removing installation files</li>
77
+ </ul>
78
+
79
+ Additional Notes:
80
+ <ul style="margin-top: 1px">
81
  <li>The .htaccess file was reset. Resave plugins that write to this file.</li>
82
  <li>
83
  Visit the <a href="installer.php?help=1#troubleshoot" target="_blank">troubleshoot</a> section or
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: migration, backup, restore, move, migrate, duplicate, transfer, clone, aut
4
  Requires at least: 4.0
5
  Tested up to: 4.9
6
  Requires PHP: 5.2.17
7
- Stable tag: 1.2.40
8
  License: GPLv2
9
 
10
  WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
@@ -33,7 +33,7 @@ Duplicator enables you to:
33
  Duplicator creates a package that bundles all the site's plugins, themes, content, database and WordPress files into a simple zip file called a package. This package can then be used to easily migrate a WordPress site to any location you wish. Move on the same server, across servers and pretty much any location a WordPress site can be hosted. *WordPress is not required for installation* since the package contains all site files.
34
 
35
  = Improve Your Workflow with Pre-Bundled Sites =
36
- Duplicator lets you make your own pre-configured sites to eliminate rework. Instead of manually configuring your favorite theme, set of plugins or content over and over, now just configure a single site and bundle it up into a Duplicator package. Once you have the bundled site, you can migrate the WordPress site over and over to different locations to instantly create many pre-configured sites!
37
 
38
  = Duplicator Pro =
39
  Duplicator Pro takes Duplicator to the next level with features you'll really appreciate, such as:
@@ -103,4 +103,4 @@ Please see the following url:
103
 
104
  == Upgrade Notice ==
105
 
106
- Please use our ticketing system when submitting your logs. Please do not post to the forums.
4
  Requires at least: 4.0
5
  Tested up to: 4.9
6
  Requires PHP: 5.2.17
7
+ Stable tag: 1.2.42
8
  License: GPLv2
9
 
10
  WordPress migration and backups are much easier with Duplicator! Clone, backup, move and transfer an entire site from one location to another.
33
  Duplicator creates a package that bundles all the site's plugins, themes, content, database and WordPress files into a simple zip file called a package. This package can then be used to easily migrate a WordPress site to any location you wish. Move on the same server, across servers and pretty much any location a WordPress site can be hosted. *WordPress is not required for installation* since the package contains all site files.
34
 
35
  = Improve Your Workflow with Pre-Bundled Sites =
36
+ Duplicator lets you make your own preconfigured sites to eliminate rework. Instead of manually configuring your favorite theme, set of plugins or content over and over, now just configure a single site and bundle it up into a Duplicator package. Once you have the bundled site, you can migrate the WordPress site over and over to different locations to instantly create many preconfigured sites!
37
 
38
  = Duplicator Pro =
39
  Duplicator Pro takes Duplicator to the next level with features you'll really appreciate, such as:
103
 
104
  == Upgrade Notice ==
105
 
106
+ Please use our ticketing system when submitting your logs. Please do not post to the forums.
views/packages/details/detail.php CHANGED
@@ -16,6 +16,8 @@ $mysqldump_on = DUP_Settings::Get('package_mysqldump') && DUP_DB::getMySqlDumpP
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>
@@ -45,10 +47,16 @@ $dbbuild_mode = ($mysqldump_on) ? 'mysqldump' : 'PHP';
45
  div#dup-downloads-msg {margin-bottom:-5px; font-style: italic}
46
  div.sub-section {padding:7px 0 0 0}
47
  textarea.file-info {width:100%; height:100px; font-size:12px }
 
 
 
 
 
 
48
  </style>
49
 
50
  <?php if ($package_id == 0) :?>
51
- <div class="notice notice-error is-dismissible"><p><?php _e('Invlaid Package ID request. Please try again!', 'duplicator'); ?></p></div>
52
  <?php endif; ?>
53
 
54
  <div class="toggle-box">
@@ -315,6 +323,32 @@ INSTALLER -->
315
  </div>
316
  <div class="dup-box-panel" id="dup-package-dtl-install-panel" style="<?php echo $ui_css_install ?>">
317
  <table class='dup-dtl-data-tbl'>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
318
  <tr>
319
  <td><?php _e('Host', 'duplicator') ?>:</td>
320
  <td><?php echo strlen($package->Installer->OptsDBHost) ? $package->Installer->OptsDBHost : __('- not set -', 'duplicator') ?></td>
@@ -326,7 +360,7 @@ INSTALLER -->
326
  <tr>
327
  <td><?php _e('User', 'duplicator') ?>:</td>
328
  <td><?php echo strlen($package->Installer->OptsDBUser) ? $package->Installer->OptsDBUser : __('- not set -', 'duplicator') ?></td>
329
- </tr>
330
  </table>
331
  </div>
332
  </div>
@@ -380,5 +414,21 @@ jQuery(document).ready(function($)
380
  $( this ).find('div.dup-box-title').trigger("click");
381
  });
382
  };
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
383
  });
384
- </script>
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
+ $dup_install_secure_on = isset($package->Installer->OptsSecureOn) ? $package->Installer->OptsSecureOn : 0;
20
+ $dup_install_secure_pass = isset($package->Installer->OptsSecurePass) ? DUP_Util::installerUnscramble($package->Installer->OptsSecurePass) : '';
21
  ?>
22
 
23
  <style>
47
  div#dup-downloads-msg {margin-bottom:-5px; font-style: italic}
48
  div.sub-section {padding:7px 0 0 0}
49
  textarea.file-info {width:100%; height:100px; font-size:12px }
50
+
51
+ /*INSTALLER*/
52
+ div#dup-pass-toggle {position: relative; margin:0; width:273px}
53
+ input#secure-pass {border-radius:4px 0 0 4px; width:250px; height: 23px; margin:0}
54
+ button#secure-btn {height:23px; width:27px; position:absolute; top:0px; right:0px;border:1px solid silver; border-radius:0 4px 4px 0; cursor:pointer}
55
+ div.dup-installer-header-2 {font-weight:bold; border-bottom:1px solid #dfdfdf; padding-bottom:2px; width:100%}
56
  </style>
57
 
58
  <?php if ($package_id == 0) :?>
59
+ <div class="notice notice-error is-dismissible"><p><?php _e('Invalid Package ID request. Please try again!', 'duplicator'); ?></p></div>
60
  <?php endif; ?>
61
 
62
  <div class="toggle-box">
323
  </div>
324
  <div class="dup-box-panel" id="dup-package-dtl-install-panel" style="<?php echo $ui_css_install ?>">
325
  <table class='dup-dtl-data-tbl'>
326
+ <tr>
327
+ <td colspan="2"><div class="dup-installer-header-2"><?php _e(" Security", 'duplicator') ?></div></td>
328
+ </tr>
329
+ <tr>
330
+ <td colspan="2">
331
+ <?php _e("Password Protection", 'duplicator');?>:
332
+ <?php echo $dup_install_secure_on ? "&nbsp; On" : "&nbsp; Off" ?>
333
+ </td>
334
+ </tr>
335
+ <?php if ($dup_install_secure_on) :?>
336
+ <tr>
337
+ <td colspan="2">
338
+ <div id="dup-pass-toggle">
339
+ <input type="password" name="secure-pass" id="secure-pass" readonly="true" value="<?php echo $dup_install_secure_pass; ?>" />
340
+ <button type="button" id="secure-btn" onclick="Duplicator.Pack.TogglePassword()" title="<?php _e('Show/Hide Password', 'duplicator'); ?>"><i class="fa fa-eye"></i></button>
341
+ </div>
342
+ </td>
343
+ </tr>
344
+ <?php endif; ?>
345
+ </table>
346
+ <br/><br/>
347
+
348
+ <table class='dup-dtl-data-tbl'>
349
+ <tr>
350
+ <td colspan="2"><div class="dup-installer-header-2"><?php _e(" MySQL Server", 'duplicator') ?></div></td>
351
+ </tr>
352
  <tr>
353
  <td><?php _e('Host', 'duplicator') ?>:</td>
354
  <td><?php echo strlen($package->Installer->OptsDBHost) ? $package->Installer->OptsDBHost : __('- not set -', 'duplicator') ?></td>
360
  <tr>
361
  <td><?php _e('User', 'duplicator') ?>:</td>
362
  <td><?php echo strlen($package->Installer->OptsDBUser) ? $package->Installer->OptsDBUser : __('- not set -', 'duplicator') ?></td>
363
+ </tr>
364
  </table>
365
  </div>
366
  </div>
414
  $( this ).find('div.dup-box-title').trigger("click");
415
  });
416
  };
417
+
418
+ /**
419
+ * Submits the password for validation
420
+ */
421
+ Duplicator.Pack.TogglePassword = function()
422
+ {
423
+ var $input = $('#secure-pass');
424
+ var $button = $('#secure-btn');
425
+ if (($input).attr('type') == 'text') {
426
+ $input.attr('type', 'password');
427
+ $button.html('<i class="fa fa-eye"></i>');
428
+ } else {
429
+ $input.attr('type', 'text');
430
+ $button.html('<i class="fa fa-eye-slash"></i>');
431
+ }
432
+ }
433
  });
434
+ </script>
views/packages/main/controller.php CHANGED
@@ -1,49 +1,49 @@
1
- <?php
2
- require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.dialog.php');
3
- $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'list';
4
- ?>
5
-
6
- <style>
7
- /*TOOLBAR TABLE*/
8
- table#dup-toolbar td {white-space: nowrap !important; padding:10px 0 0 0}
9
- table#dup-toolbar td .button {box-shadow: none !important;}
10
- table#dup-toolbar {width:100%; border:0 solid red; padding: 0; margin:8px 0 4px 0; height: 35px}
11
- table#dup-toolbar td:last-child {font-size:16px; width:100%; text-align: right; vertical-align: bottom;white-space:nowrap;}
12
- table#dup-toolbar td:last-child a {top:0; font-size:16px !important; margin-top:10px }
13
- table#dup-toolbar td:last-child span {display:inline-block; font-weight: bold; padding:0 12px 5px 5px; color:#000}
14
- hr.dup-toolbar-line {margin:2px 0 10px 0}
15
-
16
- /*WIZARD TABS */
17
- div#dup-wiz {padding:0px; margin:0; }
18
- div#dup-wiz-steps {margin:10px 0px 0px 10px; padding:0px; clear:both; font-size:13px; min-width:350px;}
19
- div#dup-wiz-title {padding:2px 0px 0px 0px; font-size:18px;}
20
- #dup-wiz a { position:relative; display:block; width:auto; min-width:55px; height:25px; margin-right:8px; padding:0px 10px 0px 10px; float:left; line-height:24px;
21
- color:#000; background:#E4E4E4; border-radius:5px; letter-spacing:1px; border:1px solid #E4E4E4; text-align: center }
22
- #dup-wiz .active-step a {color:#fff; background:#ACACAC; font-weight: bold; border:1px solid #888}
23
- #dup-wiz .completed-step a {color:#E1E1E1; background:#BBBBBB; }
24
-
25
- /*Footer */
26
- div.dup-button-footer input {min-width: 105px}
27
- div.dup-button-footer {padding: 1px 10px 0px 0px; text-align: right}
28
- </style>
29
-
30
- <?php
31
- switch ($current_tab) {
32
- case 'list':
33
- duplicator_header(__("Packages &raquo; All", 'duplicator'));
34
- include('packages.php');
35
- break;
36
- case 'new1':
37
- duplicator_header(__("Packages &raquo; New", 'duplicator'));
38
- include('s1.setup1.php');
39
- break;
40
- case 'new2':
41
- duplicator_header(__("Packages &raquo; New", 'duplicator'));
42
- include('s2.scan1.php');
43
- break;
44
- case 'new3':
45
- duplicator_header(__("Packages &raquo; New", 'duplicator'));
46
- include('s3.build.php');
47
- break;
48
- }
49
  ?>
1
+ <?php
2
+ require_once(DUPLICATOR_PLUGIN_PATH . '/classes/ui/class.ui.dialog.php');
3
+ $current_tab = isset($_REQUEST['tab']) ? esc_html($_REQUEST['tab']) : 'list';
4
+ ?>
5
+
6
+ <style>
7
+ /*TOOLBAR TABLE*/
8
+ table#dup-toolbar td {white-space: nowrap !important; padding:10px 0 0 0}
9
+ table#dup-toolbar td .button {box-shadow: none !important;}
10
+ table#dup-toolbar {width:100%; border:0 solid red; padding: 0; margin:8px 0 4px 0; height: 35px}
11
+ table#dup-toolbar td:last-child {font-size:16px; width:100%; text-align: right; vertical-align: bottom;white-space:nowrap;}
12
+ table#dup-toolbar td:last-child a {top:0; font-size:16px !important; margin-top:10px }
13
+ table#dup-toolbar td:last-child span {display:inline-block; font-weight: bold; padding:0 12px 5px 5px; color:#000}
14
+ hr.dup-toolbar-line {margin:2px 0 10px 0}
15
+
16
+ /*WIZARD TABS */
17
+ div#dup-wiz {padding:0px; margin:0; }
18
+ div#dup-wiz-steps {margin:10px 0px 0px 10px; padding:0px; clear:both; font-size:13px; min-width:350px;}
19
+ div#dup-wiz-title {padding:2px 0px 0px 0px; font-size:18px;}
20
+ #dup-wiz a { position:relative; display:block; width:auto; min-width:55px; height:25px; margin-right:8px; padding:0px 10px 0px 10px; float:left; line-height:24px;
21
+ color:#000; background:#E4E4E4; border-radius:5px; letter-spacing:1px; border:1px solid #E4E4E4; text-align: center }
22
+ #dup-wiz .active-step a {color:#fff; background:#ACACAC; font-weight: bold; border:1px solid #888}
23
+ #dup-wiz .completed-step a {color:#E1E1E1; background:#BBBBBB; }
24
+
25
+ /*Footer */
26
+ div.dup-button-footer input {min-width: 105px}
27
+ div.dup-button-footer {padding: 1px 10px 0px 0px; text-align: right}
28
+ </style>
29
+
30
+ <?php
31
+ switch ($current_tab) {
32
+ case 'list':
33
+ duplicator_header(__("Packages &raquo; All", 'duplicator'));
34
+ include('packages.php');
35
+ break;
36
+ case 'new1':
37
+ duplicator_header(__("Packages &raquo; New", 'duplicator'));
38
+ include('s1.setup1.php');
39
+ break;
40
+ case 'new2':
41
+ duplicator_header(__("Packages &raquo; New", 'duplicator'));
42
+ include('s2.scan1.php');
43
+ break;
44
+ case 'new3':
45
+ duplicator_header(__("Packages &raquo; New", 'duplicator'));
46
+ include('s3.build.php');
47
+ break;
48
+ }
49
  ?>
views/packages/main/packages.php CHANGED
@@ -25,11 +25,11 @@
25
  table.dup-pack-table {word-break:break-all;}
26
  table.dup-pack-table th {white-space:nowrap !important;}
27
  table.dup-pack-table td.pack-name {text-overflow:ellipsis; white-space:nowrap}
28
- table.dup-pack-table td.pack-name sup {font-style:italic;font-size:10px; cursor: pointer }
29
  table.dup-pack-table input[name="delete_confirm"] {margin-left:15px}
30
  table.dup-pack-table td.fail {border-left: 4px solid #d54e21;}
31
  table.dup-pack-table td.pass {border-left: 4px solid #2ea2cc;}
32
- tr.dup-pack-info td {white-space:nowrap; padding:12px 30px 0px 7px;}
33
  tr.dup-pack-info td.get-btns {text-align:right; padding:3px 5px 6px 0px !important;}
34
  tr.dup-pack-info td.get-btns button {box-shadow:none}
35
  textarea.dup-pack-debug {width:98%; height:300px; font-size:11px; display:none}
25
  table.dup-pack-table {word-break:break-all;}
26
  table.dup-pack-table th {white-space:nowrap !important;}
27
  table.dup-pack-table td.pack-name {text-overflow:ellipsis; white-space:nowrap}
28
+ table.dup-pack-table td.pack-name sup {font-style:italic;font-size:10px; cursor: pointer; display:inline-block; margin-top: -5px }
29
  table.dup-pack-table input[name="delete_confirm"] {margin-left:15px}
30
  table.dup-pack-table td.fail {border-left: 4px solid #d54e21;}
31
  table.dup-pack-table td.pass {border-left: 4px solid #2ea2cc;}
32
+ tr.dup-pack-info td {white-space:nowrap; padding:10px 30px 0px 7px;}
33
  tr.dup-pack-info td.get-btns {text-align:right; padding:3px 5px 6px 0px !important;}
34
  tr.dup-pack-info td.get-btns button {box-shadow:none}
35
  textarea.dup-pack-debug {width:98%; height:300px; font-size:11px; display:none}
views/packages/main/s1.setup2.php CHANGED
@@ -1,555 +1,626 @@
1
- <style>
2
- /* -----------------------------
3
- PACKAGE OPTS*/
4
- form#dup-form-opts label {line-height:22px}
5
- form#dup-form-opts input[type=checkbox] {margin-top:3px}
6
- form#dup-form-opts textarea, input[type="text"] {width:100%}
7
- form#dup-form-opts textarea#filter-dirs {height:95px;}
8
- form#dup-form-opts textarea#filter-exts {height:27px}
9
- textarea#package-notes {height:75px;}
10
- div.dup-notes-add {float:right; margin:-4px 2px 4px 0;}
11
- div#dup-notes-area {display:none}
12
- input#package-name {padding:4px; height: 2em; font-size: 1.2em; line-height: 100%; width: 100%; margin: 0 0 3px;}
13
- label.lbl-larger {font-size:1.2em}
14
- /*ARCHIVE SECTION*/
15
- form#dup-form-opts div.tabs-panel{max-height:800px; padding:10px; min-height:280px}
16
- form#dup-form-opts ul li.tabs{font-weight:bold}
17
- ul.category-tabs li {padding:4px 15px 4px 15px}
18
- select#archive-format {min-width:100px; margin:1px 0 4px 0}
19
- span#dup-archive-filter-file {color:#A62426; display:none}
20
- span#dup-archive-filter-db {color:#A62426; display:none}
21
- span#dup-archive-db-only {color:#A62426; display:none}
22
- div#dup-file-filter-items, div#dup-db-filter-items {padding:5px 0;}
23
- div#dup-db-filter-items {font-stretch:ultra-condensed; font-family:Calibri; }
24
- form#dup-form-opts textarea#filter-files {height:85px}
25
- div.dup-quick-links {font-size:11px; float:right; display:inline-block; margin-top:2px; font-style:italic}
26
- div.dup-tabs-opts-help {font-style:italic; font-size:11px; margin:10px 0 0 10px; color:#777}
27
- /* Tab: Database */
28
- table#dup-dbtables td {padding:1px 7px 1px 4px}
29
- label.core-table {color:#9A1E26;font-style:italic;font-weight:bold}
30
- i.core-table-info {color:#9A1E26;font-style:italic;}
31
- label.non-core-table {color:#000}
32
- label.non-core-table:hover, label.core-table:hover {text-decoration:line-through}
33
- table.dbmysql-compatibility td{padding:2px 20px 2px 2px}
34
- div.dup-store-pro {font-size:12px; font-style:italic;}
35
- div.dup-store-pro img {height:14px; width:14px; vertical-align:text-top}
36
- div.dup-store-pro a {text-decoration:underline}
37
- span.dup-pro-text {font-style:italic; font-size:12px; color:#555; font-style:italic }
38
- div#dup-exportdb-items-checked, div#dup-exportdb-items-off {min-height:275px; display:none}
39
- div#dup-exportdb-items-checked {padding: 5px; max-width:700px}
40
-
41
- /*INSTALLER SECTION*/
42
- div.dup-installer-header-1 {font-weight:bold; padding-bottom:2px; width:100%}
43
- div.dup-installer-header-2 {font-weight:bold; border-bottom:1px solid #dfdfdf; padding-bottom:2px; width:100%}
44
- label.chk-labels {display:inline-block; margin-top:1px}
45
- table.dup-installer-tbl {width:97%; margin-left:20px}
46
- div.dup-installer-panel-optional {text-align: center; font-style: italic; font-size: 12px; color:maroon}
47
-
48
- /*TABS*/
49
- ul.add-menu-item-tabs li, ul.category-tabs li {padding:3px 30px 5px}
50
- </style>
51
-
52
- <form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2<?php echo "&retry={$retry_state}"; ?>" data-validate="parsley">
53
- <input type="hidden" id="dup-form-opts-action" name="action" value="">
54
- <?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field', false); ?>
55
-
56
- <div>
57
- <label for="package-name" class="lbl-larger"><b>&nbsp;<?php _e('Name', 'duplicator') ?>:</b> </label>
58
- <div class="dup-notes-add">
59
- <a href="javascript:void(0)" onclick="jQuery('#dup-notes-area').toggle()">
60
- [<?php _e('Add Notes', 'duplicator') ?>]
61
- </a>
62
- </div>
63
- <a href="javascript:void(0)" onclick="Duplicator.Pack.ResetName()" title="<?php _e('Toggle a default name', 'duplicator') ?>"><i class="fa fa-undo"></i></a> <br/>
64
- <input id="package-name" name="package-name" type="text" value="<?php echo $Package->Name ?>" maxlength="40" data-required="true" data-regexp="^[0-9A-Za-z|_]+$" /> <br/>
65
- <div id="dup-notes-area">
66
- <label class="lbl-larger"><b>&nbsp;<?php _e('Notes', 'duplicator') ?>:</b></label> <br/>
67
- <textarea id="package-notes" name="package-notes" maxlength="300" /><?php echo $Package->Notes ?></textarea>
68
- </div>
69
- </div>
70
- <br/>
71
-
72
- <!-- ===================
73
- STORAGE -->
74
- <div class="dup-box">
75
- <div class="dup-box-title">
76
- <i class="fa fa-database"></i>&nbsp;<?php _e("Storage", 'duplicator'); ?>
77
- <div class="dup-box-arrow"></div>
78
- </div>
79
- <div class="dup-box-panel" id="dup-pack-storage-panel" style="<?php echo $ui_css_storage ?>">
80
- <table class="widefat package-tbl">
81
- <thead>
82
- <tr>
83
- <th style='width:275px'><?php _e("Name", 'duplicator'); ?></th>
84
- <th style='width:100px'><?php _e("Type", 'duplicator'); ?></th>
85
- <th style="white-space:nowrap"><?php _e("Location", 'duplicator'); ?></th>
86
- </tr>
87
- </thead>
88
- <tbody>
89
- <tr class="package-row">
90
- <td><i class="fa fa-server"></i>&nbsp;<?php _e('Default', 'duplicator');?></td>
91
- <td><?php _e("Local", 'duplicator'); ?></td>
92
- <td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
93
- </tr>
94
- <tr>
95
- <td colspan="4" style="padding:0 0 7px 7px">
96
- <div class="dup-store-pro">
97
- <span class="dup-pro-text">
98
- <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/amazon-64.png" />
99
- <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/dropbox-64.png" />
100
- <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" />
101
- <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" />
102
- <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/onedrive-48px.png" />
103
- <?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s, %5$s and other storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP', 'OneDrive'); ?>
104
- <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage&utm_campaign=duplicator_pro" target="_blank"><?php _e('Duplicator Pro', 'duplicator');?></a>
105
- <i class="fa fa-lightbulb-o"
106
- data-tooltip-title="<?php _e("Additional Storage:", 'duplicator'); ?>"
107
- data-tooltip="<?php _e('Duplicator Pro allows you to create a package and then store it at a custom location on this server or to a cloud '
108
- . 'based location such as Google Drive, Amazon, Dropbox, OneDrive or FTP.', 'duplicator'); ?>">
109
- </i>
110
- </span>
111
- </div>
112
- </td>
113
- </tr>
114
- </tbody>
115
- </table>
116
- </div>
117
- </div><br/>
118
-
119
-
120
- <!-- ============================
121
- ARCHIVE -->
122
- <div class="dup-box">
123
- <div class="dup-box-title">
124
- <i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator') ?> &nbsp;
125
- <span style="font-size:13px">
126
- <span id="dup-archive-filter-file" title="<?php _e('File filter enabled', 'duplicator') ?>"><i class="fa fa-files-o"></i> <i class="fa fa-filter"></i> &nbsp;&nbsp;</span>
127
- <span id="dup-archive-filter-db" title="<?php _e('Database filter enabled', 'duplicator') ?>"><i class="fa fa-table"></i> <i class="fa fa-filter"></i></span>
128
- <span id="dup-archive-db-only" title="<?php _e('Archive Only the Database', 'duplicator') ?>"> <?php _e('Database Only', 'duplicator') ?> </span>
129
- </span>
130
- <div class="dup-box-arrow"></div>
131
- </div>
132
- <div class="dup-box-panel" id="dup-pack-archive-panel" style="<?php echo $ui_css_archive ?>">
133
- <input type="hidden" name="archive-format" value="ZIP" />
134
-
135
- <!-- NESTED TABS -->
136
- <div data-dup-tabs='true'>
137
- <ul>
138
- <li><?php _e('Files', 'duplicator') ?></li>
139
- <li><?php _e('Database', 'duplicator') ?></li>
140
- </ul>
141
-
142
- <!-- TAB1:PACKAGE -->
143
- <div>
144
- <!-- FILTERS -->
145
- <?php
146
- $uploads = wp_upload_dir();
147
- $upload_dir = DUP_Util::safePath($uploads['basedir']);
148
- $filter_dir_count = isset($Package->Archive->FilterDirs) ? count(explode(";", $Package->Archive->FilterDirs)) -1 : 0;
149
- $filter_file_count = isset($Package->Archive->FilterFiles) ? count(explode(";", $Package->Archive->FilterFiles)) -1 : 0;
150
- ?>
151
-
152
- <input type="checkbox" id="export-onlydb" name="export-onlydb" onclick="Duplicator.Pack.ExportOnlyDB()" <?php echo ($Package->Archive->ExportOnlyDB) ? "checked='checked'" :""; ?> />
153
- <label for="export-onlydb"><?php _e('Archive Only the Database', 'duplicator') ?></label>
154
-
155
- <div id="dup-exportdb-items-off" style="<?php echo ($Package->Archive->ExportOnlyDB) ? 'none' : 'block'; ?>">
156
- <input type="checkbox" id="filter-on" name="filter-on" onclick="Duplicator.Pack.ToggleFileFilters()" <?php echo ($Package->Archive->FilterOn) ? "checked='checked'" :""; ?> />
157
- <label for="filter-on" id="filter-on-label"><?php _e("Enable File Filters", 'duplicator') ?></label>
158
- <i class="fa fa-question-circle"
159
- data-tooltip-title="<?php _e("File Filters:", 'duplicator'); ?>"
160
- data-tooltip="<?php _e('File filters allow you to ignore directories and file extensions. When creating a package only include the data you '
161
- . 'want and need. This helps to improve the overall archive build time and keep your backups simple and clean.', 'duplicator'); ?>">
162
- </i>
163
-
164
- <div id="dup-file-filter-items">
165
- <label for="filter-dirs" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>">
166
- <?php
167
- _e("Directories:", 'duplicator');
168
- echo sprintf("<sup title='%s'>({$filter_dir_count})</sup>", __("Number of directories filtered", 'duplicator'));
169
- ?>
170
- </label>
171
- <div class='dup-quick-links'>
172
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')">[<?php _e("root path", 'duplicator') ?>]</a>
173
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim($upload_dir, '/'); ?>')">[<?php _e("wp-uploads", 'duplicator') ?>]</a>
174
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo DUP_Util::safePath(WP_CONTENT_DIR); ?>/cache')">[<?php _e("cache", 'duplicator') ?>]</a>
175
- <a href="javascript:void(0)" onclick="jQuery('#filter-dirs').val('')"><?php _e("(clear)", 'duplicator') ?></a>
176
- </div>
177
- <textarea name="filter-dirs" id="filter-dirs" placeholder="/full_path/exclude_path1;/full_path/exclude_path2;"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterDirs)) ?></textarea><br/>
178
-
179
- <label class="no-select" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>"><?php _e("File extensions", 'duplicator') ?>:</label>
180
- <div class='dup-quick-links'>
181
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma')">[<?php _e("media", 'duplicator') ?>]</a>
182
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('zip;rar;tar;gz;bz2;7z')">[<?php _e("archive", 'duplicator') ?>]</a>
183
- <a href="javascript:void(0)" onclick="jQuery('#filter-exts').val('')"><?php _e("(clear)", 'duplicator') ?></a>
184
- </div>
185
- <textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
186
-
187
- <label class="no-select" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>">
188
- <?php
189
- _e("Files:", 'duplicator');
190
- echo sprintf("<sup title='%s'>({$filter_file_count})</sup>", __("Number of files filtered", 'duplicator'));
191
- ?>
192
- </label>
193
- <div class='dup-quick-links'>
194
- <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeFilePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')"><?php _e("(file path)", 'duplicator') ?></a>
195
- <a href="javascript:void(0)" onclick="jQuery('#filter-files').val('')"><?php _e("(clear)", 'duplicator') ?></a>
196
- </div>
197
- <textarea name="filter-files" id="filter-files" placeholder="/full_path/exclude_file_1.ext;/full_path/exclude_file2.ext"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterFiles)) ?></textarea>
198
-
199
- <div class="dup-tabs-opts-help">
200
- <?php _e("The directory, file and extensions paths above will be excluded from the archive file if enabled is checked.", 'duplicator'); ?> <br/>
201
- <?php _e("Use the full path for directories and files with semicolons to separate all paths.", 'duplicator'); ?>
202
- </div>
203
- </div>
204
- </div>
205
-
206
- <div id="dup-exportdb-items-checked" style="<?php echo ($Package->Archive->ExportOnlyDB) ? 'block' : 'none'; ?>">
207
- <?php
208
-
209
- if ($retry_state == '2') {
210
- echo '<i style="color:maroon">';
211
- _e("This option has automatically been checked because you have opted for a <i class='fa fa-random'></i> Two-Part Install Process. Please complete the package build and continue with the ", 'duplicator');
212
- printf('%s <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_2partlink&utm_campaign=build_issues#quick-060-q" target="faq">%s</a>.',
213
- __('', 'duplicator'),
214
- __('Quick Start Two-Part Install Instructions', 'duplicator'));
215
- echo '</i><br/><br/>';
216
- }
217
-
218
- _e("<b>Overview:</b><br/> This advanced option excludes all files from the archive. Only the database and a copy of the installer.php "
219
- . "will be included in the archive.zip file. The option can be used for backing up and moving only the database.", 'duplicator');
220
-
221
- echo '<br/><br/>';
222
-
223
- _e("<b><i class='fa fa-exclamation-circle'></i> Notice:</b><br/>", 'duplicator');
224
-
225
- _e("Please use caution when installing only the database over an existing site and be sure the correct files correspond with the database. For example, "
226
- . "if WordPress 4.6 is on this site and you copy the database to a host that has WordPress 4.8 files then the source code of the files will not be "
227
- . "in sync with the database causing possible errors. If you’re immediately moving the source files with the database then you can ignore this notice. "
228
- . "Please use this advanced feature with caution!", 'duplicator');
229
- ?>
230
- <br/><br/>
231
- </div>
232
-
233
- </div>
234
-
235
- <!-- TAB2: DATABASE -->
236
- <div>
237
- <table>
238
- <tr>
239
- <td colspan="2" style="padding:0 0 10px 0">
240
- <?php _e("Build Mode", 'duplicator') ?>:&nbsp; <a href="?page=duplicator-settings" target="settings"><?php echo $dbbuild_mode; ?></a>
241
- </td>
242
- </tr>
243
- <tr>
244
- <td><input type="checkbox" id="dbfilter-on" name="dbfilter-on" onclick="Duplicator.Pack.ToggleDBFilters()" <?php echo ($Package->Database->FilterOn) ? "checked='checked'" :""; ?> /></td>
245
- <td>
246
- <label for="dbfilter-on"><?php _e("Enable Table Filters", 'duplicator') ?> &nbsp;</label>
247
- <i class="fa fa-question-circle"
248
- data-tooltip-title="<?php _e("Enable Table Filters:", 'duplicator'); ?>"
249
- data-tooltip="<?php _e('Checked tables will not be added to the database script. Excluding certain tables can possibly cause your site or plugins to not work correctly after install!', 'duplicator'); ?>">
250
- </i>
251
- </td>
252
- </tr>
253
- </table>
254
- <div id="dup-db-filter-items">
255
- <a href="javascript:void(0)" id="dball" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', true).trigger('click');">[ <?php _e('Include All', 'duplicator'); ?> ]</a> &nbsp;
256
- <a href="javascript:void(0)" id="dbnone" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', false).trigger('click');">[ <?php _e('Exclude All', 'duplicator'); ?> ]</a>
257
- <div style="white-space:nowrap">
258
- <?php
259
- $coreTables = DUP_Util::getWPCoreTables();
260
- $tables = $wpdb->get_results("SHOW FULL TABLES FROM `" . DB_NAME . "` WHERE Table_Type = 'BASE TABLE' ", ARRAY_N);
261
- $num_rows = count($tables);
262
- $next_row = round($num_rows / 4, 0);
263
- $counter = 0;
264
- $tableList = explode(',', $Package->Database->FilterTables);
265
-
266
- echo '<table id="dup-dbtables"><tr><td valign="top">';
267
- foreach ($tables as $table) {
268
-
269
- if (in_array($table[0], $coreTables)) {
270
- $core_css = 'core-table';
271
- $core_note = '*';
272
- } else {
273
- $core_css = 'non-core-table';
274
- $core_note = '';
275
- }
276
-
277
- if (in_array($table[0], $tableList)) {
278
- $checked = 'checked="checked"';
279
- $css = 'text-decoration:line-through';
280
- } else {
281
- $checked = '';
282
- $css = '';
283
- }
284
- echo "<label for='dbtables-{$table[0]}' style='{$css}' class='{$core_css}'>"
285
- . "<input class='checkbox dbtable' $checked type='checkbox' name='dbtables[]' id='dbtables-{$table[0]}' value='{$table[0]}' onclick='Duplicator.Pack.ExcludeTable(this)' />"
286
- . "&nbsp;{$table[0]}{$core_note}</label><br />";
287
- $counter++;
288
- if ($next_row <= $counter) {
289
- echo '</td><td valign="top">';
290
- $counter = 0;
291
- }
292
- }
293
- echo '</td></tr></table>';
294
- ?>
295
- </div>
296
- </div>
297
-
298
- <div class="dup-tabs-opts-help">
299
- <?php
300
- _e("Checked tables will be <u>excluded</u> from the database script. ", 'duplicator');
301
- _e("Excluding certain tables can cause your site or plugins to not work correctly after install!<br/>", 'duplicator');
302
- _e("<i class='core-table-info'> Use caution when excluding tables! It is highly recommended to not exclude WordPress core tables*, unless you know the impact.</i>", 'duplicator');
303
- ?>
304
- </div>
305
-
306
- <br/>
307
- <?php _e("Compatibility Mode", 'duplicator') ?> &nbsp;
308
- <i class="fa fa-question-circle"
309
- data-tooltip-title="<?php _e("Compatibility Mode:", 'duplicator'); ?>"
310
- data-tooltip="<?php _e('This is an advanced database backwards compatibility feature that should ONLY be used if having problems installing packages.'
311
- . ' If the database server version is lower than the version where the package was built then these options may help generate a script that is more compliant'
312
- . ' with the older database server. It is recommended to try each option separately starting with mysql40.', 'duplicator'); ?>">
313
- </i> &nbsp;
314
- <small style="font-style:italic">
315
- <a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php _e('details', 'duplicator'); ?>]</a>
316
- </small>
317
- <br/>
318
-
319
- <?php if ($dbbuild_mode == 'mysqldump') :?>
320
- <?php
321
- $modes = explode(',', $Package->Database->Compatible);
322
- $is_mysql40 = in_array('mysql40', $modes);
323
- $is_no_table = in_array('no_table_options', $modes);
324
- $is_no_key = in_array('no_key_options', $modes);
325
- $is_no_field = in_array('no_field_options', $modes);
326
- ?>
327
- <table class="dbmysql-compatibility">
328
- <tr>
329
- <td>
330
- <input type="checkbox" name="dbcompat[]" id="dbcompat-mysql40" value="mysql40" <?php echo $is_mysql40 ? 'checked="true"' :''; ?> >
331
- <label for="dbcompat-mysql40"><?php _e("mysql40", 'duplicator') ?></label>
332
- </td>
333
- <td>
334
- <input type="checkbox" name="dbcompat[]" id="dbcompat-no_table_options" value="no_table_options" <?php echo $is_no_table ? 'checked="true"' :''; ?>>
335
- <label for="dbcompat-no_table_options"><?php _e("no_table_options", 'duplicator') ?></label>
336
- </td>
337
- <td>
338
- <input type="checkbox" name="dbcompat[]" id="dbcompat-no_key_options" value="no_key_options" <?php echo $is_no_key ? 'checked="true"' :''; ?>>
339
- <label for="dbcompat-no_key_options"><?php _e("no_key_options", 'duplicator') ?></label>
340
- </td>
341
- <td>
342
- <input type="checkbox" name="dbcompat[]" id="dbcompat-no_field_options" value="no_field_options" <?php echo $is_no_field ? 'checked="true"' :''; ?>>
343
- <label for="dbcompat-no_field_options"><?php _e("no_field_options", 'duplicator') ?></label>
344
- </td>
345
- </tr>
346
- </table>
347
- <?php else :?>
348
- <i><?php _e("This option is only availbe with mysqldump mode.", 'duplicator'); ?></i>
349
- <?php endif; ?>
350
-
351
- </div>
352
- </div>
353
- </div>
354
- </div><br/>
355
-
356
- <!-- ============================
357
- INSTALLER -->
358
- <div class="dup-box">
359
- <div class="dup-box-title">
360
- <i class="fa fa-bolt"></i> <?php _e('Installer', 'duplicator') ?>
361
- <div class="dup-box-arrow"></div>
362
- </div>
363
-
364
- <div class="dup-box-panel" id="dup-pack-installer-panel" style="<?php echo $ui_css_installer ?>">
365
-
366
- <div class="dup-installer-panel-optional">
367
- <b><?php _e('All values in this section are', 'duplicator'); ?> <u><?php _e('optional', 'duplicator'); ?></u>.</b> <br/>
368
- <?php _e("The installer can have these fields pre-filled at install time.", 'duplicator'); ?>
369
- <i class="fa fa-question-circle"
370
- data-tooltip-title="<?php _e("MySQL Server Prefills", 'duplicator'); ?>"
371
- 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'); ?>">
372
- </i>
373
- </div>
374
-
375
- <table class="dup-installer-tbl">
376
- <tr>
377
- <td colspan="2"><div class="dup-installer-header-2"><?php _e(" MySQL Server", 'duplicator') ?></div></td>
378
- </tr>
379
- <tr>
380
- <td style="width:130px"><?php _e("Host", 'duplicator') ?></td>
381
- <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>
382
- </tr>
383
- <tr>
384
- <td><?php _e("Host Port", 'duplicator') ?></td>
385
- <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>
386
- </tr>
387
- <tr>
388
- <td><?php _e("Database", 'duplicator') ?></td>
389
- <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>
390
- </tr>
391
- <tr>
392
- <td><?php _e("User", 'duplicator') ?></td>
393
- <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>
394
- </tr>
395
- </table><br />
396
-
397
- <div style="padding:10px 0 0 12px;">
398
- <span class="dup-pro-text">
399
- <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/cpanel-48.png" style="width:16px; height:12px" />
400
- <?php _e("Create the database and users directly at install time with ", 'duplicator'); ?>
401
- <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('Duplicator Pro', 'duplicator');?></a>
402
- <i class="fa fa-lightbulb-o"
403
- data-tooltip-title="<?php _e("cPanel Access:", 'duplicator'); ?>"
404
- data-tooltip="<?php _e('If your server supports cPanel API access then you can create new databases and select existing ones with Duplicator Pro at install time.', 'duplicator'); ?>">
405
- </i>
406
- </span>
407
- </div>
408
-
409
- </div>
410
- </div><br/>
411
-
412
-
413
- <div class="dup-button-footer">
414
- <input type="button" value="<?php _e("Reset", 'duplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> onclick="Duplicator.Pack.ConfirmReset()" />
415
- <input type="submit" value="<?php _e("Next", 'duplicator') ?> &#9654;" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> />
416
- </div>
417
-
418
- </form>
419
-
420
- <!-- ==========================================
421
- THICK-BOX DIALOGS: -->
422
- <?php
423
-
424
- $confirm1 = new DUP_UI_Dialog();
425
- $confirm1->title = __('Reset Package Settings?', 'duplicator');
426
- $confirm1->message = __('This will clear and reset all of the current package settings. Would you like to continue?', 'duplicator');
427
- $confirm1->jscallback = 'Duplicator.Pack.ResetSettings()';
428
- $confirm1->initConfirm();
429
-
430
- $default_name1 = DUP_Package::getDefaultName();
431
- $default_name2 = DUP_Package::getDefaultName(false);
432
-
433
- ?>
434
- <script>
435
- jQuery(document).ready(function ($)
436
- {
437
- var DUP_NAMEDEFAULT1 = '<?php echo $default_name1 ?>';
438
- var DUP_NAMEDEFAULT2 = '<?php echo $default_name2 ?>';
439
- var DUP_NAMELAST = $('#package-name').val();
440
-
441
- Duplicator.Pack.ExportOnlyDB = function ()
442
- {
443
- $('#dup-exportdb-items-off, #dup-exportdb-items-checked').hide();
444
- if ($("#export-onlydb").is(':checked')) {
445
- $('#dup-exportdb-items-checked').show();
446
- $('#dup-archive-db-only').show(100);
447
- $('#dup-archive-filter-db').hide();
448
- $('#dup-archive-filter-file').hide();
449
- } else {
450
- $('#dup-exportdb-items-off').show();
451
- $('#dup-exportdb-items-checked').hide();
452
- $('#dup-archive-db-only').hide();
453
- Duplicator.Pack.ToggleFileFilters();
454
- }
455
-
456
- Duplicator.Pack.ToggleDBFilters();
457
- };
458
-
459
- /* Enable/Disable the file filter elements */
460
- Duplicator.Pack.ToggleFileFilters = function ()
461
- {
462
- var $filterItems = $('#dup-file-filter-items');
463
- if ($("#filter-on").is(':checked')) {
464
- $filterItems.removeAttr('disabled').css({color:'#000'});
465
- $('#filter-exts,#filter-dirs, #filter-files').removeAttr('readonly').css({color:'#000'});
466
- $('#dup-archive-filter-file').show();
467
- } else {
468
- $filterItems.attr('disabled', 'disabled').css({color:'#999'});
469
- $('#filter-dirs, #filter-exts, #filter-files').attr('readonly', 'readonly').css({color:'#999'});
470
- $('#dup-archive-filter-file').hide();
471
- }
472
- };
473
-
474
- /* Appends a path to the directory filter */
475
- Duplicator.Pack.ToggleDBFilters = function ()
476
- {
477
- var $filterItems = $('#dup-db-filter-items');
478
- if ($("#dbfilter-on").is(':checked')) {
479
- $filterItems.removeAttr('disabled').css({color:'#000'});
480
- $('#dup-dbtables input').removeAttr('readonly').css({color:'#000'});
481
- $('#dup-archive-filter-db').show();
482
- } else {
483
- $filterItems.attr('disabled', 'disabled').css({color:'#999'});
484
- $('#dup-dbtables input').attr('readonly', 'readonly').css({color:'#999'});
485
- $('#dup-archive-filter-db').hide();
486
- }
487
- };
488
-
489
-
490
- /* Appends a path to the directory filter */
491
- Duplicator.Pack.AddExcludePath = function (path)
492
- {
493
- var text = $("#filter-dirs").val() + path + ';\n';
494
- $("#filter-dirs").val(text);
495
- };
496
-
497
- /* Appends a path to the extention filter */
498
- Duplicator.Pack.AddExcludeExts = function (path)
499
- {
500
- var text = $("#filter-exts").val() + path + ';';
501
- $("#filter-exts").val(text);
502
- };
503
-
504
- Duplicator.Pack.AddExcludeFilePath = function (path)
505
- {
506
- var text = $("#filter-files").val() + path + '/file.ext;\n';
507
- $("#filter-files").val(text);
508
- };
509
-
510
- Duplicator.Pack.ConfirmReset = function ()
511
- {
512
- <?php $confirm1->showConfirm(); ?>
513
- }
514
-
515
- Duplicator.Pack.ResetSettings = function ()
516
- {
517
- var key = 'duplicator_package_active';
518
-
519
- jQuery('#dup-form-opts-action').val(key);
520
- jQuery('#dup-form-opts').attr('action', '?page=duplicator&tab=new1')
521
- jQuery('#dup-form-opts').submit();
522
- }
523
-
524
- Duplicator.Pack.ResetName = function ()
525
- {
526
- var current = $('#package-name').val();
527
- switch (current) {
528
- case DUP_NAMEDEFAULT1 : $('#package-name').val(DUP_NAMELAST); break;
529
- case DUP_NAMEDEFAULT2 : $('#package-name').val(DUP_NAMEDEFAULT1); break;
530
- case DUP_NAMELAST : $('#package-name').val(DUP_NAMEDEFAULT2); break;
531
- default: $('#package-name').val(DUP_NAMELAST);
532
- }
533
- }
534
-
535
- Duplicator.Pack.ExcludeTable = function (check)
536
- {
537
- var $cb = $(check);
538
- if ($cb.is(":checked")) {
539
- $cb.closest("label").css('textDecoration', 'line-through');
540
- } else {
541
- $cb.closest("label").css('textDecoration', 'none');
542
- }
543
- }
544
-
545
- <?php if ($retry_state == '2') :?>
546
- $('#dup-pack-archive-panel').show();
547
- $('#export-onlydb').prop( "checked", true );
548
- <?php endif; ?>
549
-
550
- //Init:Toggle OptionTabs
551
- Duplicator.Pack.ToggleFileFilters();
552
- Duplicator.Pack.ToggleDBFilters();
553
- Duplicator.Pack.ExportOnlyDB();
554
- });
555
- </script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <style>
2
+ /* -----------------------------
3
+ PACKAGE OPTS*/
4
+ form#dup-form-opts label {line-height:22px}
5
+ form#dup-form-opts input[type=checkbox] {margin-top:3px}
6
+ form#dup-form-opts textarea, input[type="text"] {width:100%}
7
+ form#dup-form-opts textarea#filter-dirs {height:95px;}
8
+ form#dup-form-opts textarea#filter-exts {height:27px}
9
+ textarea#package-notes {height:75px;}
10
+ div.dup-notes-add {float:right; margin:-4px 2px 4px 0;}
11
+ div#dup-notes-area {display:none}
12
+ input#package-name {padding:4px; height: 2em; font-size: 1.2em; line-height: 100%; width: 100%; margin: 0 0 3px;}
13
+ label.lbl-larger {font-size:1.2em}
14
+ /*ARCHIVE SECTION*/
15
+ form#dup-form-opts div.tabs-panel{max-height:800px; padding:10px; min-height:280px}
16
+ form#dup-form-opts ul li.tabs{font-weight:bold}
17
+ ul.category-tabs li {padding:4px 15px 4px 15px}
18
+ select#archive-format {min-width:100px; margin:1px 0 4px 0}
19
+ span#dup-archive-filter-file {color:#A62426; display:none}
20
+ span#dup-archive-filter-db {color:#A62426; display:none}
21
+ span#dup-installer-secure-lock {color:#A62426; display:none; font-size:14px}
22
+ span#dup-installer-secure-unlock {color:#A62426; display:none; font-size:14px}
23
+ span#dup-archive-db-only {color:#A62426; display:none}
24
+ div#dup-file-filter-items, div#dup-db-filter-items {padding:5px 0;}
25
+ div#dup-db-filter-items {font-stretch:ultra-condensed; font-family:Calibri; }
26
+ form#dup-form-opts textarea#filter-files {height:85px}
27
+ div.dup-quick-links {font-size:11px; float:right; display:inline-block; margin-top:2px; font-style:italic}
28
+ div.dup-tabs-opts-help {font-style:italic; font-size:11px; margin:10px 0 0 10px; color:#777}
29
+ /* Tab: Database */
30
+ table#dup-dbtables td {padding:1px 7px 1px 4px}
31
+ label.core-table {color:#9A1E26;font-style:italic;font-weight:bold}
32
+ i.core-table-info {color:#9A1E26;font-style:italic;}
33
+ label.non-core-table {color:#000}
34
+ label.non-core-table:hover, label.core-table:hover {text-decoration:line-through}
35
+ table.dbmysql-compatibility td{padding:2px 20px 2px 2px}
36
+ div.dup-store-pro {font-size:12px; font-style:italic;}
37
+ div.dup-store-pro img {height:14px; width:14px; vertical-align:text-top}
38
+ div.dup-store-pro a {text-decoration:underline}
39
+ span.dup-pro-text {font-style:italic; font-size:12px; color:#555; font-style:italic }
40
+ div#dup-exportdb-items-checked, div#dup-exportdb-items-off {min-height:275px; display:none}
41
+ div#dup-exportdb-items-checked {padding: 5px; max-width:700px}
42
+
43
+ /*INSTALLER SECTION*/
44
+ div.dup-installer-header-1 {font-weight:bold; padding-bottom:2px; width:100%}
45
+ div.dup-installer-header-2 {font-weight:bold; border-bottom:1px solid #dfdfdf; padding-bottom:2px; width:100%}
46
+ label.chk-labels {display:inline-block; margin-top:1px}
47
+ table.dup-installer-tbl {width:97%; margin-left:20px}
48
+ div.dup-installer-panel-optional {text-align: center; font-style: italic; font-size: 12px; color:maroon}
49
+ div.secure-pass-area {}
50
+ input#secure-pass
51
+ label.secure-pass-lbl {display:inline-block; width:125px}
52
+ div#dup-pass-toggle {position: relative; margin:8px 0 0 0; width:243px}
53
+ input#secure-pass {border-radius:4px 0 0 4px; width:220px; height: 23px; margin:0}
54
+ button.pass-toggle {height: 23px; width: 27px; position:absolute; top:0px; right:0px; border:1px solid silver; border-radius:0 4px 4px 0; cursor:pointer}
55
+
56
+ /*TABS*/
57
+ ul.add-menu-item-tabs li, ul.category-tabs li {padding:3px 30px 5px}
58
+ </style>
59
+
60
+ <form id="dup-form-opts" method="post" action="?page=duplicator&tab=new2<?php echo "&retry={$retry_state}"; ?>" data-parsley-validate data-parsley-ui-enabled="true" >
61
+ <input type="hidden" id="dup-form-opts-action" name="action" value="">
62
+ <?php wp_nonce_field('dup_form_opts', 'dup_form_opts_nonce_field', false); ?>
63
+
64
+ <div>
65
+ <label for="package-name" class="lbl-larger"><b>&nbsp;<?php _e('Name', 'duplicator') ?>:</b> </label>
66
+ <div class="dup-notes-add">
67
+ <a href="javascript:void(0)" onclick="jQuery('#dup-notes-area').toggle()">
68
+ [<?php _e('Add Notes', 'duplicator') ?>]
69
+ </a>
70
+ </div>
71
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.ResetName()" title="<?php _e('Toggle a default name', 'duplicator') ?>"><i class="fa fa-undo"></i></a> <br/>
72
+ <input id="package-name" name="package-name" type="text" value="<?php echo $Package->Name ?>" maxlength="40" required="true" data-regexp="^[0-9A-Za-z|_]+$" /> <br/>
73
+ <div id="dup-notes-area">
74
+ <label class="lbl-larger"><b>&nbsp;<?php _e('Notes', 'duplicator') ?>:</b></label> <br/>
75
+ <textarea id="package-notes" name="package-notes" maxlength="300" /><?php echo $Package->Notes ?></textarea>
76
+ </div>
77
+ </div>
78
+ <br/>
79
+
80
+ <!-- ===================
81
+ STORAGE -->
82
+ <div class="dup-box">
83
+ <div class="dup-box-title">
84
+ <i class="fa fa-database"></i>&nbsp;<?php _e("Storage", 'duplicator'); ?>
85
+ <div class="dup-box-arrow"></div>
86
+ </div>
87
+ <div class="dup-box-panel" id="dup-pack-storage-panel" style="<?php echo $ui_css_storage ?>">
88
+ <table class="widefat package-tbl">
89
+ <thead>
90
+ <tr>
91
+ <th style='width:275px'><?php _e("Name", 'duplicator'); ?></th>
92
+ <th style='width:100px'><?php _e("Type", 'duplicator'); ?></th>
93
+ <th style="white-space:nowrap"><?php _e("Location", 'duplicator'); ?></th>
94
+ </tr>
95
+ </thead>
96
+ <tbody>
97
+ <tr class="package-row">
98
+ <td><i class="fa fa-server"></i>&nbsp;<?php _e('Default', 'duplicator');?></td>
99
+ <td><?php _e("Local", 'duplicator'); ?></td>
100
+ <td><?php echo DUPLICATOR_SSDIR_PATH; ?></td>
101
+ </tr>
102
+ <tr>
103
+ <td colspan="4" style="padding:0 0 7px 7px">
104
+ <div class="dup-store-pro">
105
+ <span class="dup-pro-text">
106
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/amazon-64.png" />
107
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/dropbox-64.png" />
108
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/google_drive_64px.png" />
109
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/ftp-64.png" />
110
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/onedrive-48px.png" />
111
+ <?php echo sprintf(__('%1$s, %2$s, %3$s, %4$s, %5$s and other storage options available in', 'duplicator'), 'Amazon', 'Dropbox', 'Google Drive', 'FTP', 'OneDrive'); ?>
112
+ <a href="https://snapcreek.com/duplicator/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=free_storage&utm_campaign=duplicator_pro" target="_blank"><?php _e('Duplicator Pro', 'duplicator');?></a>
113
+ <i class="fa fa-lightbulb-o"
114
+ data-tooltip-title="<?php _e("Additional Storage:", 'duplicator'); ?>"
115
+ data-tooltip="<?php _e('Duplicator Pro allows you to create a package and then store it at a custom location on this server or to a cloud '
116
+ . 'based location such as Google Drive, Amazon, Dropbox, OneDrive or FTP.', 'duplicator'); ?>">
117
+ </i>
118
+ </span>
119
+ </div>
120
+ </td>
121
+ </tr>
122
+ </tbody>
123
+ </table>
124
+ </div>
125
+ </div><br/>
126
+
127
+
128
+ <!-- ============================
129
+ ARCHIVE -->
130
+ <div class="dup-box">
131
+ <div class="dup-box-title">
132
+ <i class="fa fa-file-archive-o"></i> <?php _e('Archive', 'duplicator') ?> &nbsp;
133
+ <span style="font-size:13px">
134
+ <span id="dup-archive-filter-file" title="<?php _e('File filter enabled', 'duplicator') ?>"><i class="fa fa-files-o"></i> <i class="fa fa-filter"></i> &nbsp;&nbsp;</span>
135
+ <span id="dup-archive-filter-db" title="<?php _e('Database filter enabled', 'duplicator') ?>"><i class="fa fa-table"></i> <i class="fa fa-filter"></i></span>
136
+ <span id="dup-archive-db-only" title="<?php _e('Archive Only the Database', 'duplicator') ?>"> <?php _e('Database Only', 'duplicator') ?> </span>
137
+ </span>
138
+ <div class="dup-box-arrow"></div>
139
+ </div>
140
+ <div class="dup-box-panel" id="dup-pack-archive-panel" style="<?php echo $ui_css_archive ?>">
141
+ <input type="hidden" name="archive-format" value="ZIP" />
142
+
143
+ <!-- NESTED TABS -->
144
+ <div data-dup-tabs='true'>
145
+ <ul>
146
+ <li><?php _e('Files', 'duplicator') ?></li>
147
+ <li><?php _e('Database', 'duplicator') ?></li>
148
+ </ul>
149
+
150
+ <!-- TAB1:PACKAGE -->
151
+ <div>
152
+ <!-- FILTERS -->
153
+ <?php
154
+ $uploads = wp_upload_dir();
155
+ $upload_dir = DUP_Util::safePath($uploads['basedir']);
156
+ $filter_dir_count = isset($Package->Archive->FilterDirs) ? count(explode(";", $Package->Archive->FilterDirs)) -1 : 0;
157
+ $filter_file_count = isset($Package->Archive->FilterFiles) ? count(explode(";", $Package->Archive->FilterFiles)) -1 : 0;
158
+ ?>
159
+
160
+ <input type="checkbox" id="export-onlydb" name="export-onlydb" onclick="Duplicator.Pack.ExportOnlyDB()" <?php echo ($Package->Archive->ExportOnlyDB) ? "checked='checked'" :""; ?> />
161
+ <label for="export-onlydb"><?php _e('Archive Only the Database', 'duplicator') ?></label>
162
+
163
+ <div id="dup-exportdb-items-off" style="<?php echo ($Package->Archive->ExportOnlyDB) ? 'none' : 'block'; ?>">
164
+ <input type="checkbox" id="filter-on" name="filter-on" onclick="Duplicator.Pack.ToggleFileFilters()" <?php echo ($Package->Archive->FilterOn) ? "checked='checked'" :""; ?> />
165
+ <label for="filter-on" id="filter-on-label"><?php _e("Enable File Filters", 'duplicator') ?></label>
166
+ <i class="fa fa-question-circle"
167
+ data-tooltip-title="<?php _e("File Filters:", 'duplicator'); ?>"
168
+ data-tooltip="<?php _e('File filters allow you to ignore directories and file extensions. When creating a package only include the data you '
169
+ . 'want and need. This helps to improve the overall archive build time and keep your backups simple and clean.', 'duplicator'); ?>">
170
+ </i>
171
+
172
+ <div id="dup-file-filter-items">
173
+ <label for="filter-dirs" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>">
174
+ <?php
175
+ _e("Directories:", 'duplicator');
176
+ echo sprintf("<sup title='%s'>({$filter_dir_count})</sup>", __("Number of directories filtered", 'duplicator'));
177
+ ?>
178
+ </label>
179
+ <div class='dup-quick-links'>
180
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')">[<?php _e("root path", 'duplicator') ?>]</a>
181
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo rtrim($upload_dir, '/'); ?>')">[<?php _e("wp-uploads", 'duplicator') ?>]</a>
182
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludePath('<?php echo DUP_Util::safePath(WP_CONTENT_DIR); ?>/cache')">[<?php _e("cache", 'duplicator') ?>]</a>
183
+ <a href="javascript:void(0)" onclick="jQuery('#filter-dirs').val('')"><?php _e("(clear)", 'duplicator') ?></a>
184
+ </div>
185
+ <textarea name="filter-dirs" id="filter-dirs" placeholder="/full_path/exclude_path1;/full_path/exclude_path2;"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterDirs)) ?></textarea><br/>
186
+
187
+ <label class="no-select" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>"><?php _e("File extensions", 'duplicator') ?>:</label>
188
+ <div class='dup-quick-links'>
189
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('avi;mov;mp4;mpeg;mpg;swf;wmv;aac;m3u;mp3;mpa;wav;wma')">[<?php _e("media", 'duplicator') ?>]</a>
190
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeExts('zip;rar;tar;gz;bz2;7z')">[<?php _e("archive", 'duplicator') ?>]</a>
191
+ <a href="javascript:void(0)" onclick="jQuery('#filter-exts').val('')"><?php _e("(clear)", 'duplicator') ?></a>
192
+ </div>
193
+ <textarea name="filter-exts" id="filter-exts" placeholder="ext1;ext2;ext3;"><?php echo esc_textarea($Package->Archive->FilterExts); ?></textarea>
194
+
195
+ <label class="no-select" title="<?php _e("Separate all filters by semicolon", 'duplicator'); ?>">
196
+ <?php
197
+ _e("Files:", 'duplicator');
198
+ echo sprintf("<sup title='%s'>({$filter_file_count})</sup>", __("Number of files filtered", 'duplicator'));
199
+ ?>
200
+ </label>
201
+ <div class='dup-quick-links'>
202
+ <a href="javascript:void(0)" onclick="Duplicator.Pack.AddExcludeFilePath('<?php echo rtrim(DUPLICATOR_WPROOTPATH, '/'); ?>')"><?php _e("(file path)", 'duplicator') ?></a>
203
+ <a href="javascript:void(0)" onclick="jQuery('#filter-files').val('')"><?php _e("(clear)", 'duplicator') ?></a>
204
+ </div>
205
+ <textarea name="filter-files" id="filter-files" placeholder="/full_path/exclude_file_1.ext;/full_path/exclude_file2.ext"><?php echo str_replace(";", ";\n", esc_textarea($Package->Archive->FilterFiles)) ?></textarea>
206
+
207
+ <div class="dup-tabs-opts-help">
208
+ <?php _e("The directory, file and extensions paths above will be excluded from the archive file if enabled is checked.", 'duplicator'); ?> <br/>
209
+ <?php _e("Use the full path for directories and files with semicolons to separate all paths.", 'duplicator'); ?>
210
+ </div>
211
+ </div>
212
+ </div>
213
+
214
+ <div id="dup-exportdb-items-checked" style="<?php echo ($Package->Archive->ExportOnlyDB) ? 'block' : 'none'; ?>">
215
+ <?php
216
+
217
+ if ($retry_state == '2') {
218
+ echo '<i style="color:maroon">';
219
+ _e("This option has automatically been checked because you have opted for a <i class='fa fa-random'></i> Two-Part Install Process. Please complete the package build and continue with the ", 'duplicator');
220
+ printf('%s <a href="https://snapcreek.com/duplicator/docs/quick-start/?utm_source=duplicator_free&utm_medium=wordpress_plugin&utm_content=host_interupt_2partlink&utm_campaign=build_issues#quick-060-q" target="faq">%s</a>.',
221
+ __('', 'duplicator'),
222
+ __('Quick Start Two-Part Install Instructions', 'duplicator'));
223
+ echo '</i><br/><br/>';
224
+ }
225
+
226
+ _e("<b>Overview:</b><br/> This advanced option excludes all files from the archive. Only the database and a copy of the installer.php "
227
+ . "will be included in the archive.zip file. The option can be used for backing up and moving only the database.", 'duplicator');
228
+
229
+ echo '<br/><br/>';
230
+
231
+ _e("<b><i class='fa fa-exclamation-circle'></i> Notice:</b><br/>", 'duplicator');
232
+
233
+ _e("Please use caution when installing only the database over an existing site and be sure the correct files correspond with the database. For example, "
234
+ . "if WordPress 4.6 is on this site and you copy the database to a host that has WordPress 4.8 files then the source code of the files will not be "
235
+ . "in sync with the database causing possible errors. If you’re immediately moving the source files with the database then you can ignore this notice. "
236
+ . "Please use this advanced feature with caution!", 'duplicator');
237
+ ?>
238
+ <br/><br/>
239
+ </div>
240
+
241
+ </div>
242
+
243
+ <!-- TAB2: DATABASE -->
244
+ <div>
245
+ <table>
246
+ <tr>
247
+ <td colspan="2" style="padding:0 0 10px 0">
248
+ <?php _e("Build Mode", 'duplicator') ?>:&nbsp; <a href="?page=duplicator-settings" target="settings"><?php echo $dbbuild_mode; ?></a>
249
+ </td>
250
+ </tr>
251
+ <tr>
252
+ <td><input type="checkbox" id="dbfilter-on" name="dbfilter-on" onclick="Duplicator.Pack.ToggleDBFilters()" <?php echo ($Package->Database->FilterOn) ? "checked='checked'" :""; ?> /></td>
253
+ <td>
254
+ <label for="dbfilter-on"><?php _e("Enable Table Filters", 'duplicator') ?> &nbsp;</label>
255
+ <i class="fa fa-question-circle"
256
+ data-tooltip-title="<?php _e("Enable Table Filters:", 'duplicator'); ?>"
257
+ data-tooltip="<?php _e('Checked tables will not be added to the database script. Excluding certain tables can possibly cause your site or plugins to not work correctly after install!', 'duplicator'); ?>">
258
+ </i>
259
+ </td>
260
+ </tr>
261
+ </table>
262
+ <div id="dup-db-filter-items">
263
+ <a href="javascript:void(0)" id="dball" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', true).trigger('click');">[ <?php _e('Include All', 'duplicator'); ?> ]</a> &nbsp;
264
+ <a href="javascript:void(0)" id="dbnone" onclick="jQuery('#dup-dbtables .checkbox').prop('checked', false).trigger('click');">[ <?php _e('Exclude All', 'duplicator'); ?> ]</a>
265
+ <div style="white-space:nowrap">
266
+ <?php
267
+ $coreTables = DUP_Util::getWPCoreTables();
268
+ $tables = $wpdb->get_results("SHOW FULL TABLES FROM `" . DB_NAME . "` WHERE Table_Type = 'BASE TABLE' ", ARRAY_N);
269
+ $num_rows = count($tables);
270
+ $next_row = round($num_rows / 4, 0);
271
+ $counter = 0;
272
+ $tableList = explode(',', $Package->Database->FilterTables);
273
+
274
+ echo '<table id="dup-dbtables"><tr><td valign="top">';
275
+ foreach ($tables as $table) {
276
+
277
+ if (in_array($table[0], $coreTables)) {
278
+ $core_css = 'core-table';
279
+ $core_note = '*';
280
+ } else {
281
+ $core_css = 'non-core-table';
282
+ $core_note = '';
283
+ }
284
+
285
+ if (in_array($table[0], $tableList)) {
286
+ $checked = 'checked="checked"';
287
+ $css = 'text-decoration:line-through';
288
+ } else {
289
+ $checked = '';
290
+ $css = '';
291
+ }
292
+ echo "<label for='dbtables-{$table[0]}' style='{$css}' class='{$core_css}'>"
293
+ . "<input class='checkbox dbtable' $checked type='checkbox' name='dbtables[]' id='dbtables-{$table[0]}' value='{$table[0]}' onclick='Duplicator.Pack.ExcludeTable(this)' />"
294
+ . "&nbsp;{$table[0]}{$core_note}</label><br />";
295
+ $counter++;
296
+ if ($next_row <= $counter) {
297
+ echo '</td><td valign="top">';
298
+ $counter = 0;
299
+ }
300
+ }
301
+ echo '</td></tr></table>';
302
+ ?>
303
+ </div>
304
+ </div>
305
+
306
+ <div class="dup-tabs-opts-help">
307
+ <?php
308
+ _e("Checked tables will be <u>excluded</u> from the database script. ", 'duplicator');
309
+ _e("Excluding certain tables can cause your site or plugins to not work correctly after install!<br/>", 'duplicator');
310
+ _e("<i class='core-table-info'> Use caution when excluding tables! It is highly recommended to not exclude WordPress core tables*, unless you know the impact.</i>", 'duplicator');
311
+ ?>
312
+ </div>
313
+
314
+ <br/>
315
+ <?php _e("Compatibility Mode", 'duplicator') ?> &nbsp;
316
+ <i class="fa fa-question-circle"
317
+ data-tooltip-title="<?php _e("Compatibility Mode:", 'duplicator'); ?>"
318
+ data-tooltip="<?php _e('This is an advanced database backwards compatibility feature that should ONLY be used if having problems installing packages.'
319
+ . ' If the database server version is lower than the version where the package was built then these options may help generate a script that is more compliant'
320
+ . ' with the older database server. It is recommended to try each option separately starting with mysql40.', 'duplicator'); ?>">
321
+ </i> &nbsp;
322
+ <small style="font-style:italic">
323
+ <a href="https://dev.mysql.com/doc/refman/5.7/en/mysqldump.html#option_mysqldump_compatible" target="_blank">[<?php _e('details', 'duplicator'); ?>]</a>
324
+ </small>
325
+ <br/>
326
+
327
+ <?php if ($dbbuild_mode == 'mysqldump') :?>
328
+ <?php
329
+ $modes = explode(',', $Package->Database->Compatible);
330
+ $is_mysql40 = in_array('mysql40', $modes);
331
+ $is_no_table = in_array('no_table_options', $modes);
332
+ $is_no_key = in_array('no_key_options', $modes);
333
+ $is_no_field = in_array('no_field_options', $modes);
334
+ ?>
335
+ <table class="dbmysql-compatibility">
336
+ <tr>
337
+ <td>
338
+ <input type="checkbox" name="dbcompat[]" id="dbcompat-mysql40" value="mysql40" <?php echo $is_mysql40 ? 'checked="true"' :''; ?> >
339
+ <label for="dbcompat-mysql40"><?php _e("mysql40", 'duplicator') ?></label>
340
+ </td>
341
+ <td>
342
+ <input type="checkbox" name="dbcompat[]" id="dbcompat-no_table_options" value="no_table_options" <?php echo $is_no_table ? 'checked="true"' :''; ?>>
343
+ <label for="dbcompat-no_table_options"><?php _e("no_table_options", 'duplicator') ?></label>
344
+ </td>
345
+ <td>
346
+ <input type="checkbox" name="dbcompat[]" id="dbcompat-no_key_options" value="no_key_options" <?php echo $is_no_key ? 'checked="true"' :''; ?>>
347
+ <label for="dbcompat-no_key_options"><?php _e("no_key_options", 'duplicator') ?></label>
348
+ </td>
349
+ <td>
350
+ <input type="checkbox" name="dbcompat[]" id="dbcompat-no_field_options" value="no_field_options" <?php echo $is_no_field ? 'checked="true"' :''; ?>>
351
+ <label for="dbcompat-no_field_options"><?php _e("no_field_options", 'duplicator') ?></label>
352
+ </td>
353
+ </tr>
354
+ </table>
355
+ <?php else :?>
356
+ <i><?php _e("This option is only available with mysqldump mode.", 'duplicator'); ?></i>
357
+ <?php endif; ?>
358
+
359
+ </div>
360
+ </div>
361
+ </div>
362
+ </div><br/>
363
+
364
+ <!-- ============================
365
+ INSTALLER -->
366
+ <div class="dup-box">
367
+ <div class="dup-box-title">
368
+ <i class="fa fa-bolt"></i> <?php _e('Installer', 'duplicator') ?> &nbsp;
369
+ <span id="dup-installer-secure-lock" title="<?php _e('Installer password protection is on', 'duplicator') ?>"><i class="fa fa-lock"></i> </span>
370
+ <span id="dup-installer-secure-unlock" title="<?php _e('Installer password protection is off', 'duplicator') ?>"><i class="fa fa-unlock-alt"></i> </span>
371
+ <div class="dup-box-arrow"></div>
372
+ </div>
373
+
374
+ <div class="dup-box-panel" id="dup-pack-installer-panel" style="<?php echo $ui_css_installer ?>">
375
+
376
+ <div class="dup-installer-panel-optional">
377
+ <b><?php _e('All values in this section are', 'duplicator'); ?> <u><?php _e('optional', 'duplicator'); ?></u>.</b> <br/>
378
+ <?php _e("The installer can have these fields pre-filled at install time.", 'duplicator'); ?>
379
+ <i class="fa fa-question-circle"
380
+ data-tooltip-title="<?php _e("MySQL Server Prefills", 'duplicator'); ?>"
381
+ 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'); ?>">
382
+ </i>
383
+ </div>
384
+
385
+
386
+ <table class="dup-installer-tbl">
387
+ <tr>
388
+ <td colspan="2"><div class="dup-installer-header-2"><?php _e(" Security", 'duplicator') ?></div></td>
389
+ </tr>
390
+ <tr>
391
+ <td>
392
+ <?php
393
+ $dup_install_secure_on = isset($Package->Installer->OptsSecureOn) ? $Package->Installer->OptsSecureOn : 0;
394
+ $dup_install_secure_pass = isset($Package->Installer->OptsSecurePass) ? DUP_Util::installerUnscramble($Package->Installer->OptsSecurePass) : '';
395
+ ?>
396
+ <input type="checkbox" name="secure-on" id="secure-on" onclick="Duplicator.Pack.EnableInstallerPassword()" <?php echo ($dup_install_secure_on) ? 'checked' : ''; ?> />
397
+ <label for="secure-on"><?php _e("Enable Password Protection", 'duplicator') ?></label>
398
+ <i class="fa fa-question-circle"
399
+ data-tooltip-title="<?php _e("Password Protection:", 'duplicator'); ?>"
400
+ data-tooltip="<?php _e('Enabling this option will allow for basic password protection on the installer. Before running the installer the '
401
+ . 'password below must be entered before proceeding with an install. This password is a general deterrent and should not be substituted for properly '
402
+ . 'keeping your files secure.', 'duplicator'); ?>"></i>
403
+
404
+ <div id="dup-pass-toggle">
405
+ <input type="password" name="secure-pass" id="secure-pass" required="required" value="<?php echo $dup_install_secure_pass; ?>" />
406
+ <button type="button" id="secure-btn" class="pass-toggle" onclick="Duplicator.Pack.ToggleInstallerPassword()" title="<?php _e('Show/Hide Password', 'duplicator'); ?>"><i class="fa fa-eye"></i></button>
407
+ </div>
408
+ <br/>
409
+ </td>
410
+ </tr>
411
+ </table>
412
+
413
+ <table class="dup-installer-tbl">
414
+ <tr>
415
+ <td colspan="2"><div class="dup-installer-header-2"><?php _e(" MySQL Server", 'duplicator') ?></div></td>
416
+ </tr>
417
+ <tr>
418
+ <td style="width:130px"><?php _e("Host", 'duplicator') ?></td>
419
+ <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>
420
+ </tr>
421
+ <tr>
422
+ <td><?php _e("Host Port", 'duplicator') ?></td>
423
+ <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>
424
+ </tr>
425
+ <tr>
426
+ <td><?php _e("Database", 'duplicator') ?></td>
427
+ <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>
428
+ </tr>
429
+ <tr>
430
+ <td><?php _e("User", 'duplicator') ?></td>
431
+ <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>
432
+ </tr>
433
+ </table><br />
434
+
435
+ <div style="padding:10px 0 0 12px;">
436
+ <span class="dup-pro-text">
437
+ <img src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/cpanel-48.png" style="width:16px; height:12px" />
438
+ <?php _e("Create the database and users directly at install time with ", 'duplicator'); ?>
439
+ <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('Duplicator Pro', 'duplicator');?></a>
440
+ <i class="fa fa-lightbulb-o"
441
+ data-tooltip-title="<?php _e("cPanel Access:", 'duplicator'); ?>"
442
+ data-tooltip="<?php _e('If your server supports cPanel API access then you can create new databases and select existing ones with Duplicator Pro at install time.', 'duplicator'); ?>">
443
+ </i>
444
+ </span>
445
+ </div>
446
+
447
+ </div>
448
+ </div><br/>
449
+
450
+
451
+ <div class="dup-button-footer">
452
+ <input type="button" value="<?php _e("Reset", 'duplicator') ?>" class="button button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> onclick="Duplicator.Pack.ConfirmReset()" />
453
+ <input type="submit" value="<?php _e("Next", 'duplicator') ?> &#9654;" class="button button-primary button-large" <?php echo ($dup_tests['Success']) ? '' :'disabled="disabled"'; ?> />
454
+ </div>
455
+
456
+ </form>
457
+
458
+ <!-- ==========================================
459
+ THICK-BOX DIALOGS: -->
460
+ <?php
461
+
462
+ $confirm1 = new DUP_UI_Dialog();
463
+ $confirm1->title = __('Reset Package Settings?', 'duplicator');
464
+ $confirm1->message = __('This will clear and reset all of the current package settings. Would you like to continue?', 'duplicator');
465
+ $confirm1->jscallback = 'Duplicator.Pack.ResetSettings()';
466
+ $confirm1->initConfirm();
467
+
468
+ $default_name1 = DUP_Package::getDefaultName();
469
+ $default_name2 = DUP_Package::getDefaultName(false);
470
+
471
+ ?>
472
+ <script>
473
+ jQuery(document).ready(function ($)
474
+ {
475
+ var DUP_NAMEDEFAULT1 = '<?php echo $default_name1 ?>';
476
+ var DUP_NAMEDEFAULT2 = '<?php echo $default_name2 ?>';
477
+ var DUP_NAMELAST = $('#package-name').val();
478
+
479
+ Duplicator.Pack.ExportOnlyDB = function ()
480
+ {
481
+ $('#dup-exportdb-items-off, #dup-exportdb-items-checked').hide();
482
+ if ($("#export-onlydb").is(':checked')) {
483
+ $('#dup-exportdb-items-checked').show();
484
+ $('#dup-archive-db-only').show(100);
485
+ $('#dup-archive-filter-db').hide();
486
+ $('#dup-archive-filter-file').hide();
487
+ } else {
488
+ $('#dup-exportdb-items-off').show();
489
+ $('#dup-exportdb-items-checked').hide();
490
+ $('#dup-archive-db-only').hide();
491
+ Duplicator.Pack.ToggleFileFilters();
492
+ }
493
+
494
+ Duplicator.Pack.ToggleDBFilters();
495
+ };
496
+
497
+ /* Enable/Disable the file filter elements */
498
+ Duplicator.Pack.ToggleFileFilters = function ()
499
+ {
500
+ var $filterItems = $('#dup-file-filter-items');
501
+ if ($("#filter-on").is(':checked')) {
502
+ $filterItems.removeAttr('disabled').css({color:'#000'});
503
+ $('#filter-exts,#filter-dirs, #filter-files').removeAttr('readonly').css({color:'#000'});
504
+ $('#dup-archive-filter-file').show();
505
+ } else {
506
+ $filterItems.attr('disabled', 'disabled').css({color:'#999'});
507
+ $('#filter-dirs, #filter-exts, #filter-files').attr('readonly', 'readonly').css({color:'#999'});
508
+ $('#dup-archive-filter-file').hide();
509
+ }
510
+ };
511
+
512
+ /* Appends a path to the directory filter */
513
+ Duplicator.Pack.ToggleDBFilters = function ()
514
+ {
515
+ var $filterItems = $('#dup-db-filter-items');
516
+ if ($("#dbfilter-on").is(':checked')) {
517
+ $filterItems.removeAttr('disabled').css({color:'#000'});
518
+ $('#dup-dbtables input').removeAttr('readonly').css({color:'#000'});
519
+ $('#dup-archive-filter-db').show();
520
+ } else {
521
+ $filterItems.attr('disabled', 'disabled').css({color:'#999'});
522
+ $('#dup-dbtables input').attr('readonly', 'readonly').css({color:'#999'});
523
+ $('#dup-archive-filter-db').hide();
524
+ }
525
+ };
526
+
527
+
528
+ /* Appends a path to the directory filter */
529
+ Duplicator.Pack.AddExcludePath = function (path)
530
+ {
531
+ var text = $("#filter-dirs").val() + path + ';\n';
532
+ $("#filter-dirs").val(text);
533
+ };
534
+
535
+ /* Appends a path to the extention filter */
536
+ Duplicator.Pack.AddExcludeExts = function (path)
537
+ {
538
+ var text = $("#filter-exts").val() + path + ';';
539
+ $("#filter-exts").val(text);
540
+ };
541
+
542
+ Duplicator.Pack.AddExcludeFilePath = function (path)
543
+ {
544
+ var text = $("#filter-files").val() + path + '/file.ext;\n';
545
+ $("#filter-files").val(text);
546
+ };
547
+
548
+ Duplicator.Pack.ConfirmReset = function ()
549
+ {
550
+ <?php $confirm1->showConfirm(); ?>
551
+ }
552
+
553
+ Duplicator.Pack.ResetSettings = function ()
554
+ {
555
+ var key = 'duplicator_package_active';
556
+
557
+ jQuery('#dup-form-opts-action').val(key);
558
+ jQuery('#dup-form-opts').attr('action', '?page=duplicator&tab=new1')
559
+ jQuery('#dup-form-opts').submit();
560
+ }
561
+
562
+ Duplicator.Pack.ResetName = function ()
563
+ {
564
+ var current = $('#package-name').val();
565
+ switch (current) {
566
+ case DUP_NAMEDEFAULT1 : $('#package-name').val(DUP_NAMELAST); break;
567
+ case DUP_NAMEDEFAULT2 : $('#package-name').val(DUP_NAMEDEFAULT1); break;
568
+ case DUP_NAMELAST : $('#package-name').val(DUP_NAMEDEFAULT2); break;
569
+ default: $('#package-name').val(DUP_NAMELAST);
570
+ }
571
+ }
572
+
573
+ Duplicator.Pack.ExcludeTable = function (check)
574
+ {
575
+ var $cb = $(check);
576
+ if ($cb.is(":checked")) {
577
+ $cb.closest("label").css('textDecoration', 'line-through');
578
+ } else {
579
+ $cb.closest("label").css('textDecoration', 'none');
580
+ }
581
+ }
582
+
583
+ Duplicator.Pack.EnableInstallerPassword = function ()
584
+ {
585
+ var $button = $('#secure-btn');
586
+ if ($('#secure-on').is(':checked')) {
587
+ $('#secure-pass').attr('readonly', false);
588
+ $('#secure-pass').attr('required', 'true').focus();
589
+ $('#dup-installer-secure-lock').show();
590
+ $('#dup-installer-secure-unlock').hide();
591
+ $button.removeAttr('disabled');
592
+ } else {
593
+ $('#secure-pass').removeAttr('required');
594
+ $('#secure-pass').attr('readonly', true);
595
+ $('#dup-installer-secure-lock').hide();
596
+ $('#dup-installer-secure-unlock').show();
597
+ $button.attr('disabled', 'true');
598
+ }
599
+ };
600
+
601
+ Duplicator.Pack.ToggleInstallerPassword = function()
602
+ {
603
+ var $input = $('#secure-pass');
604
+ var $button = $('#secure-btn');
605
+ if (($input).attr('type') == 'text') {
606
+ $input.attr('type', 'password');
607
+ $button.html('<i class="fa fa-eye"></i>');
608
+ } else {
609
+ $input.attr('type', 'text');
610
+ $button.html('<i class="fa fa-eye-slash"></i>');
611
+ }
612
+ }
613
+
614
+ <?php if ($retry_state == '2') :?>
615
+ $('#dup-pack-archive-panel').show();
616
+ $('#export-onlydb').prop( "checked", true );
617
+ <?php endif; ?>
618
+
619
+ //Init:Toggle OptionTabs
620
+ Duplicator.Pack.ToggleFileFilters();
621
+ Duplicator.Pack.ToggleDBFilters();
622
+ Duplicator.Pack.ExportOnlyDB();
623
+ Duplicator.Pack.EnableInstallerPassword();
624
+
625
+ });
626
+ </script>
views/packages/main/s3.build.php CHANGED
@@ -317,7 +317,7 @@ TOOL BAR: STEPS -->
317
  <ol>
318
  <li><?php _e('Uninstall this version of Duplicator.', 'duplicator'); ?></li>
319
  <li><?php _e('Install Duplicator 1.3 (Beta) via the link below.', 'duplicator'); ?></li>
320
- <li><?php _e('After plugin install goto Duplicator &gt; Settings &gt; Packages Tab &gt; Archive Engine &gt; Enable DupArchive', 'duplicator'); ?></li>
321
  <li><?php _e('Try and build a new package again using the new engine format and let us know how it goes.', 'duplicator'); ?></li>
322
  </ol> <br/>
323
 
@@ -433,4 +433,4 @@ jQuery(document).ready(function($) {
433
  Duplicator.Pack.Create();
434
 
435
  });
436
- </script>
317
  <ol>
318
  <li><?php _e('Uninstall this version of Duplicator.', 'duplicator'); ?></li>
319
  <li><?php _e('Install Duplicator 1.3 (Beta) via the link below.', 'duplicator'); ?></li>
320
+ <li><?php _e('After plugin install go to Duplicator &gt; Settings &gt; Packages Tab &gt; Archive Engine &gt; Enable DupArchive', 'duplicator'); ?></li>
321
  <li><?php _e('Try and build a new package again using the new engine format and let us know how it goes.', 'duplicator'); ?></li>
322
  </ol> <br/>
323
 
433
  Duplicator.Pack.Create();
434
 
435
  });
436
+ </script>
views/settings/about-info.php CHANGED
@@ -16,7 +16,7 @@
16
  }
17
  table.dup-support-hlp-hdrs td img{margin-left:7px}
18
  div.dup-support-hlp-txt{padding:10px 4px 4px 4px; text-align:center}
19
- div.dup-support-give-area {width:400px; height:185px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
20
  div.dup-spread-word {display:inline-block; border:1px solid red; text-align:center}
21
 
22
  img#dup-support-approved { -webkit-animation:approve-keyframe 12s 1s infinite alternate backwards}
@@ -24,7 +24,8 @@
24
  form#dup-donate-form input:hover {opacity:1.0;}
25
  img#dup-img-5stars {opacity:0.7;}
26
  img#dup-img-5stars:hover {opacity:1.0;}
27
-
 
28
  /* EMAIL AREA */
29
  div.dup-support-email-area {width:825px; height:355px; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
30
  #mce-EMAIL {font-size:20px; height:40px; width:500px}
@@ -32,13 +33,8 @@
32
  #mc-embedded-subscribe { height: 35px; font-size: 16px; font-weight: bold}
33
  div.mce_inline_error {width:300px; margin: auto !important}
34
  div#mce-responses {margin: auto; padding: 10px; width:500px; font-weight: bold;}
35
-
36
  </style>
37
 
38
- <script>var switchTo5x = true;</script>
39
- <script type="text/javascript" src="https://ws.sharethis.com/button/buttons.js"></script>
40
- <script>stLight.options({publisher: "1a44d92e-2a78-42c3-a32e-414f78f9f484"});</script>
41
-
42
  <div class="wrap dup-wrap dup-support-all">
43
 
44
  <div style="width:850px; margin:auto; margin-top: 20px">
@@ -56,7 +52,7 @@
56
  </tr>
57
  </table><br/>
58
 
59
- <!-- PARTNER WITH US -->
60
  <div class="dup-support-give-area">
61
  <table class="dup-support-hlp-hdrs">
62
  <tr >
@@ -70,7 +66,7 @@
70
  <td valign="top">
71
  <a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><img id="dup-img-5stars" src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/5star.png" /></a>
72
  <div style=" font-size: 16px; font-weight: bold">
73
- <a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><?php _e('Leave 5 Stars', 'duplicator') ?></a>
74
  </div>
75
  </td>
76
  </tr>
@@ -87,21 +83,24 @@
87
  </tr>
88
  </table>
89
  <div class="dup-support-hlp-txt">
90
- <?php
91
- $title = __("Duplicate Your WordPress", 'duplicator');
92
- $summary = __("Rapid WordPress Duplication by snapcreek.com", 'duplicator');
93
- $share_this_data = "st_url='" . DUPLICATOR_HOMEPAGE . "' st_title='{$title}' st_summary='{$summary}'";
94
- ?>
95
- <div style="width:100%; padding:20px 10px 0px 10px" align="center">
96
- <span class='st_facebook_vcount' displayText='Facebook' <?php echo $share_this_data; ?> ></span>
97
- <span class='st_twitter_vcount' displayText='Tweet' <?php echo $share_this_data; ?> ></span>
98
- <span class='st_googleplus_vcount' displayText='Google +' <?php echo $share_this_data; ?> ></span>
99
- <span class='st_linkedin_vcount' displayText='LinkedIn' <?php echo $share_this_data; ?> ></span>
100
- <span class='st_email_vcount' displayText='Email' <?php echo $share_this_data; ?> ></span>
101
- </div><br/>
 
 
102
  </div>
103
  </div>
104
  <br style="clear:both" /><br/>
 
105
 
106
  <!-- STAY IN THE LOOP -->
107
  <div class="dup-support-email-area">
@@ -141,7 +140,7 @@
141
  </div>
142
  <div style="margin-top:10px; margin-left:100px; width: 650px;text-align:left">
143
  <small>
144
- <input type="checkbox" name="privacy" id="privacy-checkbox"></input>
145
  <label for="privacy-checkbox" style="padding-left:5px; display:block; margin-top:-20px; margin-left:20px;">Check box this box if you would like us to contact you by email with helpful information about Duplicator and other Snap Creek products.<br/></br> We will process your data in accordance with our <a target="_blank" href="//snapcreek.com/privacy-policy">privacy policy</a>. You may withdraw this consent at any time by <a target="_blank" href="mailto:admin@snapcreek.com">emailing us</a> or updating your information by clicking the unsubscribe link in the emails you receive.</span></label>
146
  </small>
147
 
@@ -161,20 +160,17 @@
161
  </div>
162
  </div>
163
  <br style="clear:both" /><br/>
164
-
165
-
166
- <!--div style='margin: auto; text-align: center; margin-top: 20px'>
167
- <a href="http://lifeinthegrid.com/tools" target="_blank" class="button button-large button-primary">
168
- <i class="fa fa-rocket" style="margin-right:8px"></i><?php _e('Get More Great Tools', 'duplicator') ?>...
169
- </a>
170
- </div-->
171
-
172
 
173
  </div>
174
  </div><br/><br/><br/><br/>
175
  <script>
176
  jQuery(document).ready(function($){
177
 
 
 
 
 
 
178
  $('input[type="checkbox"][name="privacy"]').change(function() {
179
  if(this.checked) {
180
  $("#mc-embedded-subscribe").prop("disabled", false);
16
  }
17
  table.dup-support-hlp-hdrs td img{margin-left:7px}
18
  div.dup-support-hlp-txt{padding:10px 4px 4px 4px; text-align:center}
19
+ div.dup-support-give-area {width:400px; height:165px; float:left; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
20
  div.dup-spread-word {display:inline-block; border:1px solid red; text-align:center}
21
 
22
  img#dup-support-approved { -webkit-animation:approve-keyframe 12s 1s infinite alternate backwards}
24
  form#dup-donate-form input:hover {opacity:1.0;}
25
  img#dup-img-5stars {opacity:0.7;}
26
  img#dup-img-5stars:hover {opacity:1.0;}
27
+ div.social-item {float:right; width: 170px; padding:10px 10px 20px 0px; border:0px solid red; text-align: left; font-size:20px}
28
+
29
  /* EMAIL AREA */
30
  div.dup-support-email-area {width:825px; height:355px; border:1px solid #dfdfdf; border-radius:4px; margin:10px; line-height:18px;box-shadow: 0 8px 6px -6px #ccc;}
31
  #mce-EMAIL {font-size:20px; height:40px; width:500px}
33
  #mc-embedded-subscribe { height: 35px; font-size: 16px; font-weight: bold}
34
  div.mce_inline_error {width:300px; margin: auto !important}
35
  div#mce-responses {margin: auto; padding: 10px; width:500px; font-weight: bold;}
 
36
  </style>
37
 
 
 
 
 
38
  <div class="wrap dup-wrap dup-support-all">
39
 
40
  <div style="width:850px; margin:auto; margin-top: 20px">
52
  </tr>
53
  </table><br/>
54
 
55
+ <!-- RATE PLUGIN -->
56
  <div class="dup-support-give-area">
57
  <table class="dup-support-hlp-hdrs">
58
  <tr >
66
  <td valign="top">
67
  <a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><img id="dup-img-5stars" src="<?php echo DUPLICATOR_PLUGIN_URL ?>assets/img/5star.png" /></a>
68
  <div style=" font-size: 16px; font-weight: bold">
69
+ <a href="https://wordpress.org/support/plugin/duplicator/reviews/?filter=5" target="vote-wp"><?php _e('Support us with a 5 star review!', 'duplicator') ?></a>
70
  </div>
71
  </td>
72
  </tr>
83
  </tr>
84
  </table>
85
  <div class="dup-support-hlp-txt">
86
+ <div class="social-images">
87
+ <a href="https://www.facebook.com/sharer/sharer.php?u=https%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
88
+ <div class="social-item"><i class="fa fa-facebook-square fa-lg"></i> <?php _e('Facebook', 'duplicator') ?></div>
89
+ </a>
90
+ <a href="https://twitter.com/home?status=Checkout%20the%20WordPress%20Duplicator%20plugin!%20%0Ahttps%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
91
+ <div class="social-item"><i class="fa fa-twitter-square fa-lg"></i> <?php _e('Twitter', 'duplicator') ?></div>
92
+ </a>
93
+ <a href="https://www.linkedin.com/shareArticle?mini=true&url=https%3A//snapcreek.com/duplicator/duplicator-free/&title=WordPress%20Duplicator%20Plugin&summary=&source=" target="_blank">
94
+ <div class="social-item"><i class="fa fa-linkedin-square fa-lg"></i> <?php _e('LinkedIn', 'duplicator') ?></div>
95
+ </a>
96
+ <a href="https://plus.google.com/share?url=https%3A//snapcreek.com/duplicator/duplicator-free/" target="_blank">
97
+ <div class="social-item"><i class="fa fa-google-plus-square fa-lg"></i> <?php _e('Google+', 'duplicator') ?></div>
98
+ </a>
99
+ </div>
100
  </div>
101
  </div>
102
  <br style="clear:both" /><br/>
103
+
104
 
105
  <!-- STAY IN THE LOOP -->
106
  <div class="dup-support-email-area">
140
  </div>
141
  <div style="margin-top:10px; margin-left:100px; width: 650px;text-align:left">
142
  <small>
143
+ <input type="checkbox" name="privacy" id="privacy-checkbox"/>
144
  <label for="privacy-checkbox" style="padding-left:5px; display:block; margin-top:-20px; margin-left:20px;">Check box this box if you would like us to contact you by email with helpful information about Duplicator and other Snap Creek products.<br/></br> We will process your data in accordance with our <a target="_blank" href="//snapcreek.com/privacy-policy">privacy policy</a>. You may withdraw this consent at any time by <a target="_blank" href="mailto:admin@snapcreek.com">emailing us</a> or updating your information by clicking the unsubscribe link in the emails you receive.</span></label>
145
  </small>
146
 
160
  </div>
161
  </div>
162
  <br style="clear:both" /><br/>
 
 
 
 
 
 
 
 
163
 
164
  </div>
165
  </div><br/><br/><br/><br/>
166
  <script>
167
  jQuery(document).ready(function($){
168
 
169
+ Duplicator.ProvideFeedback = function()
170
+ {
171
+ window.open('https://snapcreek.com/duplicator/survey-features/','_blank');
172
+ }
173
+
174
  $('input[type="checkbox"][name="privacy"]').change(function() {
175
  if(this.checked) {
176
  $("#mc-embedded-subscribe").prop("disabled", false);
views/settings/packages.php CHANGED
@@ -2,8 +2,9 @@
2
  global $wp_version;
3
  global $wpdb;
4
 
5
- $action_updated = null;
6
- $action_response = __("Package Settings Saved", 'duplicator');
 
7
 
8
  //SAVE RESULTS
9
  if (isset($_POST['action']) && $_POST['action'] == 'save') {
@@ -12,37 +13,33 @@ if (isset($_POST['action']) && $_POST['action'] == 'save') {
12
  if (! isset( $_POST['dup_settings_save_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_settings_save_nonce_field'], 'dup_settings_save' )) {
13
  die('Invalid token permissions to perform this request.');
14
  }
15
-
16
  //Package
17
- $mysqldump_enabled = isset($_POST['package_dbmode']) && $_POST['package_dbmode'] == 'mysql' ? "1" : "0";
18
- $mysqldump_exe_file = isset($_POST['package_mysqldump_path'])
19
- ? trim(DUP_DB::escSQL(strip_tags($_POST['package_mysqldump_path']), true))
20
- : null;
21
- $mysqldump_path_valid = is_file($mysqldump_exe_file) ? true : false;
22
-
23
  DUP_Settings::Set('last_updated', date('Y-m-d-H-i-s'));
24
  DUP_Settings::Set('package_zip_flush', isset($_POST['package_zip_flush']) ? "1" : "0");
25
  DUP_Settings::Set('package_mysqldump', $mysqldump_enabled ? "1" : "0");
26
  DUP_Settings::Set('package_phpdump_qrylimit', isset($_POST['package_phpdump_qrylimit']) ? $_POST['package_phpdump_qrylimit'] : "100");
27
- if ($mysqldump_path_valid) {
28
- $mysqldump_exe_file = DUP_Util::isWindows() ? realpath($mysqldump_exe_file) : $mysqldump_exe_file;
29
- DUP_Settings::Set('package_mysqldump_path', $mysqldump_exe_file);
30
- }
31
  DUP_Settings::Set('package_ui_created', $_POST['package_ui_created']);
32
 
33
  $action_updated = DUP_Settings::Save();
34
  DUP_Util::initSnapshotDirectory();
35
  }
36
 
37
- $package_zip_flush = DUP_Settings::Get('package_zip_flush');
38
- $phpdump_chunkopts = array("20", "100", "500", "1000", "2000");
39
- $phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
40
- $package_mysqldump = DUP_Settings::Get('package_mysqldump');
 
41
  $package_mysqldump_path = trim(DUP_Settings::Get('package_mysqldump_path'));
42
- $package_ui_created = is_numeric(DUP_Settings::Get('package_ui_created')) ? DUP_Settings::Get('package_ui_created') : 1;
43
- $mysqlDumpPath = DUP_DB::getMySqlDumpPath();
44
- $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
45
-
46
  ?>
47
 
48
  <style>
@@ -53,175 +50,170 @@ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
53
  </style>
54
 
55
  <form id="dup-settings-form" action="<?php echo admin_url('admin.php?page=duplicator-settings&tab=package'); ?>" method="post">
56
- <?php wp_nonce_field('dup_settings_save', 'dup_settings_save_nonce_field', false); ?>
57
- <input type="hidden" name="action" value="save">
58
- <input type="hidden" name="page" value="duplicator-settings">
59
-
60
- <?php if ($action_updated) : ?>
61
- <div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo $action_response; ?></p></div>
62
- <?php endif; ?>
63
-
64
- <h3 class="title"><?php _e("Visual", 'duplicator') ?> </h3>
65
- <hr size="1" />
66
- <table class="form-table">
67
- <tr>
68
- <th scope="row"><label><?php _e("Created Format", 'duplicator'); ?></label></th>
69
- <td>
70
- <select name="package_ui_created" id="package_ui_created">
71
- <!-- YEAR -->
72
- <optgroup label="<?php _e("By Year", 'duplicator'); ?>">
73
- <option value="1">Y-m-d H:i &nbsp; [2000-01-05 12:00]</option>
74
- <option value="2">Y-m-d H:i:s [2000-01-05 12:00:01]</option>
75
- <option value="3">y-m-d H:i &nbsp; [00-01-05 12:00]</option>
76
- <option value="4">y-m-d H:i:s [00-01-05 12:00:01]</option>
77
- </optgroup>
78
- <!-- MONTH -->
79
- <optgroup label="<?php _e("By Month", 'duplicator'); ?>">
80
- <option value="5">m-d-Y H:i &nbsp; [01-05-2000 12:00]</option>
81
- <option value="6">m-d-Y H:i:s [01-05-2000 12:00:01]</option>
82
- <option value="7">m-d-y H:i &nbsp; [01-05-00 12:00]</option>
83
- <option value="8">m-d-y H:i:s [01-05-00 12:00:01]</option>
84
- </optgroup>
85
- <!-- DAY -->
86
- <optgroup label="<?php _e("By Day", 'duplicator'); ?>">
87
- <option value="9"> d-m-Y H:i &nbsp; [05-01-2000 12:00]</option>
88
- <option value="10">d-m-Y H:i:s [05-01-2000 12:00:01]</option>
89
- <option value="11">d-m-y H:i &nbsp; [05-01-00 12:00]</option>
90
- <option value="12">d-m-y H:i:s [05-01-00 12:00:01]</option>
91
- </optgroup>
92
- </select>
93
- <p class="description">
94
- <?php _e("The UTC date format shown in the 'Created' column on the Packages screen.", 'duplicator'); ?> <br/>
95
- <small><?php _e("To use WordPress timezone formats consider an upgrade to Duplicator Pro.", 'duplicator'); ?></small>
96
- </p>
97
- </td>
98
- </tr>
99
- </table>
100
-
101
- <h3 class="title"><?php _e("Processing", 'duplicator') ?> </h3>
102
- <hr size="1" />
103
- <table class="form-table">
104
- <tr>
105
- <th scope="row"><label><?php _e("SQL Script", 'duplicator'); ?></label></th>
106
- <td>
107
- <?php if (!DUP_Util::hasShellExec()) : ?>
108
- <input type="radio" disabled="true" />
109
- <label><?php _e("Mysqldump", 'duplicator'); ?> <i style="font-size:12px">(<?php _e("recommended", 'duplicator'); ?>)</i></label>
110
- <p class="description" style="width:550px; margin:5px 0 0 20px">
111
- <?php
112
- _e("This server does not support the PHP shell_exec function which is required for mysqldump to run. ", 'duplicator');
113
- _e("Please contact the host or server administrator to enable this feature.", 'duplicator');
114
- ?>
115
- <br/>
116
- <small>
117
- <i style="cursor: pointer"
118
- data-tooltip-title="<?php _e("Host Recommendation:", 'duplicator'); ?>"
119
- data-tooltip="<?php _e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
120
- <i class="fa fa-lightbulb-o" aria-hidden="true"></i>
121
- <?php
122
- printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
123
- __("Please visit our recommended", 'duplicator'),
124
- __("host list", 'duplicator'),
125
- __("for reliable access to mysqldump", 'duplicator'));
126
- ?>
127
- </i>
128
- </small>
129
- <br/><br/>
130
- </p>
131
- <?php else : ?>
132
- <input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
133
- <label for="package_mysqldump"><?php _e("Mysqldump", 'duplicator'); ?></label>
134
- <i style="font-size:12px">(<?php _e("recommended", 'duplicator'); ?>)</i> <br/>
135
-
136
- <div style="margin:5px 0px 0px 25px">
137
- <?php if ($mysqlDumpFound) : ?>
138
- <div class="dup-feature-found">
139
- <i class="fa fa-check-circle"></i>
140
- <?php _e("Successfully Found:", 'duplicator'); ?> &nbsp;
141
- <i><?php echo $mysqlDumpPath ?></i>
142
- </div><br/>
143
- <?php else : ?>
144
- <div class="dup-feature-notfound">
145
- <i class="fa fa-exclamation-triangle"></i>
146
- <?php
147
- _e('Mysqldump was not found at its default location or the location provided. Please enter a custom path to a valid location where mysqldump can run. '
148
- . 'If the problem persist contact your host or server administrator. ', 'duplicator');
149
-
150
- printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
151
- __("See the", 'duplicator'),
152
- __("host list", 'duplicator'),
153
- __("for reliable access to mysqldump.", 'duplicator'));
154
-
155
- ?>
156
- </div><br/>
157
-
158
- <?php endif; ?>
159
-
160
- <i class="fa fa-question-circle"
161
- data-tooltip-title="<?php _e("mysqldump path:", 'duplicator'); ?>"
162
- data-tooltip="<?php _e('An optional path to the mysqldump program. Add a custom path if the path to mysqldump is not properly detected or needs to be changed.', 'duplicator'); ?>"></i>
163
- <label><?php _e("Custom Path:", 'duplicator'); ?></label><br/>
164
- <input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo $package_mysqldump_path; ?>" placeholder="<?php _e("/usr/bin/mypath/mysqldump.exe", 'duplicator'); ?>" />
165
- <div class="dup-feature-notfound">
166
- <?php
167
- if ($action_updated && $mysqldump_path_valid === false) {
168
- $mysqldump_path = DUP_Util::isWindows() ? stripslashes($_POST['package_mysqldump_path']) : $_POST['package_mysqldump_path'];
169
- if (strlen($mysqldump_path)) {
170
- _e('<i class="fa fa-exclamation-triangle"></i> The custom path provided is not recognized as a valid mysqldump file:<br/>', 'duplicator');
171
- $mysqldump_path = esc_html($mysqldump_path);
172
- echo "'{$mysqldump_path}'";
173
- }
174
- }
175
- ?>
176
- </div>
177
- <br/><br/>
178
- </div>
179
-
180
- <?php endif; ?>
181
-
182
- <!-- PHP MODE -->
183
- <?php if (! $mysqlDumpFound) : ?>
184
- <input type="radio" name="package_dbmode" id="package_phpdump" value="php" checked="checked" />
185
- <?php else : ?>
186
- <input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (! $package_mysqldump) ? 'checked="checked"' : ''; ?> />
187
- <?php endif; ?>
188
-
189
- <label for="package_phpdump"><?php _e("PHP Code", 'duplicator'); ?></label> &nbsp;
190
 
191
  <div style="margin:5px 0px 0px 25px">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
192
  <i class="fa fa-question-circle"
193
- data-tooltip-title="<?php _e("PHP Query Limit Size", 'duplicator'); ?>"
194
- data-tooltip="<?php _e('A higher limit size will speed up the database build time, however it will use more memory. If your host has memory caps start off low.', 'duplicator'); ?>"></i>
195
- <label for="package_phpdump_qrylimit"><?php _e("Query Limit Size", 'duplicator'); ?></label> &nbsp;
196
- <select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
197
- <?php
198
- foreach($phpdump_chunkopts as $value) {
199
- $selected = ( $phpdump_qrylimit == $value ? "selected='selected'" : '' );
200
- echo "<option {$selected} value='{$value}'>" . number_format($value) . '</option>';
201
- }
202
- ?>
203
- </select>
204
- </div><br/>
205
- </td>
206
- </tr>
207
- <tr>
208
- <th scope="row"><label><?php _e("Archive Flush", 'duplicator'); ?></label></th>
209
- <td>
210
- <input type="checkbox" name="package_zip_flush" id="package_zip_flush" <?php echo ($package_zip_flush) ? 'checked="checked"' : ''; ?> />
211
- <label for="package_zip_flush"><?php _e("Attempt Network Keep Alive", 'duplicator'); ?></label>
212
- <i style="font-size:12px">(<?php _e("enable only for large archives", 'duplicator'); ?>)</i>
213
- <p class="description">
214
- <?php _e("This will attempt to keep a network connection established for large archives.", 'duplicator'); ?>
215
- </p>
216
- </td>
217
- </tr>
218
- </table>
219
-
220
-
221
- <p class="submit" style="margin: 20px 0px 0xp 5px;">
222
- <br/>
223
- <input type="submit" name="submit" id="submit" class="button-primary" value="<?php _e("Save Package Settings", 'duplicator') ?>" style="display: inline-block;" />
224
- </p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
225
 
226
  </form>
227
 
2
  global $wp_version;
3
  global $wpdb;
4
 
5
+ $action_updated = null;
6
+ $action_response = __("Package Settings Saved", 'duplicator');
7
+ $mysqldump_exe_file = '';
8
 
9
  //SAVE RESULTS
10
  if (isset($_POST['action']) && $_POST['action'] == 'save') {
13
  if (! isset( $_POST['dup_settings_save_nonce_field'] ) || ! wp_verify_nonce( $_POST['dup_settings_save_nonce_field'], 'dup_settings_save' )) {
14
  die('Invalid token permissions to perform this request.');
15
  }
 
16
  //Package
17
+ $mysqldump_enabled = isset($_POST['package_dbmode']) && $_POST['package_dbmode'] == 'mysql' ? "1" : "0";
18
+ if (isset($_POST['package_mysqldump_path'])) {
19
+ $mysqldump_exe_file = DUP_Util::safePath(stripslashes(trim($_POST['package_mysqldump_path'])));
20
+ $mysqldump_exe_file = DUP_DB::escSQL(strip_tags($mysqldump_exe_file), true);
21
+ }
22
+
23
  DUP_Settings::Set('last_updated', date('Y-m-d-H-i-s'));
24
  DUP_Settings::Set('package_zip_flush', isset($_POST['package_zip_flush']) ? "1" : "0");
25
  DUP_Settings::Set('package_mysqldump', $mysqldump_enabled ? "1" : "0");
26
  DUP_Settings::Set('package_phpdump_qrylimit', isset($_POST['package_phpdump_qrylimit']) ? $_POST['package_phpdump_qrylimit'] : "100");
27
+ DUP_Settings::Set('package_mysqldump_path', $mysqldump_exe_file);
 
 
 
28
  DUP_Settings::Set('package_ui_created', $_POST['package_ui_created']);
29
 
30
  $action_updated = DUP_Settings::Save();
31
  DUP_Util::initSnapshotDirectory();
32
  }
33
 
34
+ //GET RESULTS
35
+ $phpdump_chunkopts = array("20", "100", "500", "1000", "2000");
36
+ $package_zip_flush = DUP_Settings::Get('package_zip_flush');
37
+ $phpdump_qrylimit = DUP_Settings::Get('package_phpdump_qrylimit');
38
+ $package_mysqldump = DUP_Settings::Get('package_mysqldump');
39
  $package_mysqldump_path = trim(DUP_Settings::Get('package_mysqldump_path'));
40
+ $package_ui_created = is_numeric(DUP_Settings::Get('package_ui_created')) ? DUP_Settings::Get('package_ui_created') : 1;
41
+ $mysqlDumpPath = DUP_DB::getMySqlDumpPath();
42
+ $mysqlDumpFound = ($mysqlDumpPath) ? true : false;
 
43
  ?>
44
 
45
  <style>
50
  </style>
51
 
52
  <form id="dup-settings-form" action="<?php echo admin_url('admin.php?page=duplicator-settings&tab=package'); ?>" method="post">
53
+ <?php wp_nonce_field('dup_settings_save', 'dup_settings_save_nonce_field', false); ?>
54
+ <input type="hidden" name="action" value="save">
55
+ <input type="hidden" name="page" value="duplicator-settings">
56
+
57
+ <?php if ($action_updated) : ?>
58
+ <div id="message" class="notice notice-success is-dismissible dup-wpnotice-box"><p><?php echo $action_response; ?></p></div>
59
+ <?php endif; ?>
60
+
61
+ <h3 class="title"><?php _e("Visual", 'duplicator') ?> </h3>
62
+ <hr size="1" />
63
+ <table class="form-table">
64
+ <tr>
65
+ <th scope="row"><label><?php _e("Created Format", 'duplicator'); ?></label></th>
66
+ <td>
67
+ <select name="package_ui_created" id="package_ui_created">
68
+ <!-- YEAR -->
69
+ <optgroup label="<?php _e("By Year", 'duplicator'); ?>">
70
+ <option value="1">Y-m-d H:i &nbsp; [2000-01-05 12:00]</option>
71
+ <option value="2">Y-m-d H:i:s [2000-01-05 12:00:01]</option>
72
+ <option value="3">y-m-d H:i &nbsp; [00-01-05 12:00]</option>
73
+ <option value="4">y-m-d H:i:s [00-01-05 12:00:01]</option>
74
+ </optgroup>
75
+ <!-- MONTH -->
76
+ <optgroup label="<?php _e("By Month", 'duplicator'); ?>">
77
+ <option value="5">m-d-Y H:i &nbsp; [01-05-2000 12:00]</option>
78
+ <option value="6">m-d-Y H:i:s [01-05-2000 12:00:01]</option>
79
+ <option value="7">m-d-y H:i &nbsp; [01-05-00 12:00]</option>
80
+ <option value="8">m-d-y H:i:s [01-05-00 12:00:01]</option>
81
+ </optgroup>
82
+ <!-- DAY -->
83
+ <optgroup label="<?php _e("By Day", 'duplicator'); ?>">
84
+ <option value="9"> d-m-Y H:i &nbsp; [05-01-2000 12:00]</option>
85
+ <option value="10">d-m-Y H:i:s [05-01-2000 12:00:01]</option>
86
+ <option value="11">d-m-y H:i &nbsp; [05-01-00 12:00]</option>
87
+ <option value="12">d-m-y H:i:s [05-01-00 12:00:01]</option>
88
+ </optgroup>
89
+ </select>
90
+ <p class="description">
91
+ <?php _e("The UTC date format shown in the 'Created' column on the Packages screen.", 'duplicator'); ?> <br/>
92
+ <small><?php _e("To use WordPress timezone formats consider an upgrade to Duplicator Pro.", 'duplicator'); ?></small>
93
+ </p>
94
+ </td>
95
+ </tr>
96
+ </table>
97
+
98
+ <h3 class="title"><?php _e("Processing", 'duplicator') ?> </h3>
99
+ <hr size="1" />
100
+ <table class="form-table">
101
+ <tr>
102
+ <th scope="row"><label><?php _e("SQL Script", 'duplicator'); ?></label></th>
103
+ <td>
104
+ <?php if (!DUP_Util::hasShellExec()) : ?>
105
+ <input type="radio" disabled="true" />
106
+ <label><?php _e("Mysqldump", 'duplicator'); ?></label>
107
+ <p class="description" style="width:550px; margin:5px 0 0 20px">
108
+ <?php
109
+ _e("This server does not support the PHP shell_exec function which is required for mysqldump to run. ", 'duplicator');
110
+ _e("Please contact the host or server administrator to enable this feature.", 'duplicator');
111
+ ?>
112
+ <br/>
113
+ <small>
114
+ <i style="cursor: pointer"
115
+ data-tooltip-title="<?php _e("Host Recommendation:", 'duplicator'); ?>"
116
+ data-tooltip="<?php _e('Duplicator recommends going with the high performance pro plan or better from our recommended list', 'duplicator'); ?>">
117
+ <i class="fa fa-lightbulb-o" aria-hidden="true"></i>
118
+ <?php
119
+ printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
120
+ __("Please visit our recommended", 'duplicator'),
121
+ __("host list", 'duplicator'),
122
+ __("for reliable access to mysqldump", 'duplicator'));
123
+ ?>
124
+ </i>
125
+ </small>
126
+ <br/><br/>
127
+ </p>
128
+ <?php else : ?>
129
+ <input type="radio" name="package_dbmode" value="mysql" id="package_mysqldump" <?php echo ($package_mysqldump) ? 'checked="checked"' : ''; ?> />
130
+ <label for="package_mysqldump"><?php _e("Mysqldump", 'duplicator'); ?></label><br/>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
131
 
132
  <div style="margin:5px 0px 0px 25px">
133
+ <?php if ($mysqlDumpFound) : ?>
134
+ <div class="dup-feature-found">
135
+ <i class="fa fa-check-circle"></i>
136
+ <?php _e("Successfully Found:", 'duplicator'); ?> &nbsp;
137
+ <i><?php echo $mysqlDumpPath ?></i>
138
+ </div><br/>
139
+ <?php else : ?>
140
+ <div class="dup-feature-notfound">
141
+ <i class="fa fa-exclamation-triangle"></i>
142
+ <?php
143
+ _e('Mysqldump was not found at its default location or the custom path provided below. Please enter a custom path to a valid location where mysqldump can run. '
144
+ . 'If the problem persist contact your host or server administrator. ', 'duplicator');
145
+
146
+ printf("%s <a target='_blank' href='//snapcreek.com/wordpress-hosting/'>%s</a> %s",
147
+ __("See the", 'duplicator'),
148
+ __("host list", 'duplicator'),
149
+ __("for reliable access to mysqldump.", 'duplicator'));
150
+ ?>
151
+ </div><br/>
152
+
153
+ <?php endif; ?>
154
+
155
  <i class="fa fa-question-circle"
156
+ data-tooltip-title="<?php _e("mysqldump path:", 'duplicator'); ?>"
157
+ data-tooltip="<?php _e('An optional path to the mysqldump program. Add a custom path if the path to mysqldump is not properly detected or needs to be changed.', 'duplicator'); ?>"></i>
158
+ <label><?php _e("Custom Path:", 'duplicator'); ?></label><br/>
159
+ <input type="text" name="package_mysqldump_path" id="package_mysqldump_path" value="<?php echo $package_mysqldump_path; ?>" placeholder="<?php _e("/usr/bin/mypath/mysqldump.exe", 'duplicator'); ?>" />
160
+ <div class="dup-feature-notfound">
161
+ <?php
162
+ if (!$mysqlDumpFound && strlen($mysqldump_exe_file)) {
163
+ _e('<i class="fa fa-exclamation-triangle"></i> The custom path provided is not recognized as a valid mysqldump file:<br/>', 'duplicator');
164
+ $mysqldump_path = esc_html($package_mysqldump_path);
165
+ echo "'{$mysqldump_path}'";
166
+ }
167
+ ?>
168
+ </div>
169
+ <br/><br/>
170
+ </div>
171
+
172
+ <?php endif; ?>
173
+
174
+ <!-- PHP MODE -->
175
+ <?php if (! $mysqlDumpFound) : ?>
176
+ <input type="radio" name="package_dbmode" id="package_phpdump" value="php" checked="checked" />
177
+ <?php else : ?>
178
+ <input type="radio" name="package_dbmode" id="package_phpdump" value="php" <?php echo (! $package_mysqldump) ? 'checked="checked"' : ''; ?> />
179
+ <?php endif; ?>
180
+
181
+ <label for="package_phpdump"><?php _e("PHP Code", 'duplicator'); ?></label> &nbsp;
182
+
183
+ <div style="margin:5px 0px 0px 25px">
184
+ <i class="fa fa-question-circle"
185
+ data-tooltip-title="<?php _e("PHP Query Limit Size", 'duplicator'); ?>"
186
+ data-tooltip="<?php _e('A higher limit size will speed up the database build time, however it will use more memory. If your host has memory caps start off low.', 'duplicator'); ?>"></i>
187
+ <label for="package_phpdump_qrylimit"><?php _e("Query Limit Size", 'duplicator'); ?></label> &nbsp;
188
+ <select name="package_phpdump_qrylimit" id="package_phpdump_qrylimit">
189
+ <?php
190
+ foreach($phpdump_chunkopts as $value) {
191
+ $selected = ( $phpdump_qrylimit == $value ? "selected='selected'" : '' );
192
+ echo "<option {$selected} value='{$value}'>" . number_format($value) . '</option>';
193
+ }
194
+ ?>
195
+ </select>
196
+ </div><br/>
197
+ </td>
198
+ </tr>
199
+ <tr>
200
+ <th scope="row"><label><?php _e("Archive Flush", 'duplicator'); ?></label></th>
201
+ <td>
202
+ <input type="checkbox" name="package_zip_flush" id="package_zip_flush" <?php echo ($package_zip_flush) ? 'checked="checked"' : ''; ?> />
203
+ <label for="package_zip_flush"><?php _e("Attempt Network Keep Alive", 'duplicator'); ?></label>
204
+ <i style="font-size:12px">(<?php _e("enable only for large archives", 'duplicator'); ?>)</i>
205
+ <p class="description">
206
+ <?php _e("This will attempt to keep a network connection established for large archives.", 'duplicator'); ?>
207
+ </p>
208
+ </td>
209
+ </tr>
210
+ </table>
211
+
212
+
213
+ <p class="submit" style="margin: 20px 0px 0xp 5px;">
214
+ <br/>
215
+ <input type="submit" name="submit" id="submit" class="button-primary" value="<?php _e("Save Package Settings", 'duplicator') ?>" style="display: inline-block;" />
216
+ </p>
217
 
218
  </form>
219
 
views/tools/diagnostics/support.php CHANGED
@@ -26,7 +26,7 @@
26
  <td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
27
  <td valign="top" style="padding-top:10px; font-size:13px">
28
  <?php
29
- _e("Migrating WordPress is a complex process and the logic to make all the magic happen smoothly may not work quickly with every site. With over 30,000 plugins and a very complex server eco-system some migrations may run into issues. This is why the Duplicator includes a detailed knowledgebase that can help with many common issues. Resources to additional support, approved hosting, and alternatives to fit your needs can be found below.", 'duplicator');
30
  ?>
31
  </td>
32
  </tr>
@@ -120,4 +120,4 @@
120
  });
121
 
122
  });
123
- </script>
26
  <td style="width:70px"><i class="fa fa-question-circle fa-5x"></i></td>
27
  <td valign="top" style="padding-top:10px; font-size:13px">
28
  <?php
29
+ _e("Migrating WordPress is a complex process and the logic to make all the magic happen smoothly may not work quickly with every site. With over 30,000 plugins and a very complex server ecosystem some migrations may run into issues. This is why the Duplicator includes a detailed knowledgebase that can help with many common issues. Resources for additional support, approved hosting, and alternatives to fit your needs can be found below.", 'duplicator');
30
  ?>
31
  </td>
32
  </tr>
120
  });
121
 
122
  });
123
+ </script>