Changeset 2065940
- Timestamp:
- 04/09/2019 04:30:11 PM (7 years ago)
- Location:
- backupsavvy
- Files:
-
- 12 edited
-
tags/1.1/BackUpSavvy.php (modified) (1 diff)
-
tags/1.1/assets/backupsavvy.js (modified) (5 diffs)
-
tags/1.1/assets/backupsavvy_style.css (modified) (1 diff)
-
tags/1.1/inc/BackUpSavvySites.php (modified) (3 diffs)
-
tags/1.1/parts/main_settings.php (modified) (4 diffs)
-
tags/1.1/parts/settings_page.php (modified) (1 diff)
-
trunk/BackUpSavvy.php (modified) (1 diff)
-
trunk/assets/backupsavvy.js (modified) (5 diffs)
-
trunk/assets/backupsavvy_style.css (modified) (1 diff)
-
trunk/inc/BackUpSavvySites.php (modified) (3 diffs)
-
trunk/parts/main_settings.php (modified) (4 diffs)
-
trunk/parts/settings_page.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
backupsavvy/tags/1.1/BackUpSavvy.php
r2001033 r2065940 16 16 // If this file is called directly, abort. 17 17 if ( ! defined( 'WPINC' ) ) die; 18 19 define('BACKUPSAVVY_FILE', __FILE__); 18 20 19 21 if ( ! class_exists( 'BackUpSavvy', false ) ) { -
backupsavvy/tags/1.1/assets/backupsavvy.js
r2001033 r2065940 25 25 $('ul.tabs li.t5').addClass('tab-current'); 26 26 break; 27 case '#update': 28 $('div.t6').show(); 29 $('ul.tabs li.t6').addClass('tab-current'); 30 break; 27 31 default: 28 32 $('div.t1').show(); … … 74 78 total: 0, 75 79 caller: '', 80 api: '', 76 81 save_storage: function () { 77 82 var form = this.form; … … 439 444 $('form#settings').trigger("reset"); 440 445 } 441 442 443 446 }); 444 447 return false; 448 }, 449 premium_update: function () { 450 var spinner = $('.do-update').find('.spinner'); 451 spinner.css({ 452 display: 'inline-block', 453 position: 'relative', 454 top: '-34px'}); 455 456 $.post(ajaxurl, { 457 action: "backupsavvy_premium_update", 458 method: 'POST', 459 data: this.api, 460 nonce: localVars.nonce 461 }, function (response_) { 462 var response = jQuery.parseJSON(response_); 463 if (response.status === 'ok') 464 $.post(ajaxurl, { 465 action: 'backupsavvy_replace_plugin', 466 method: 'POST', 467 nonce: localVars.nonce 468 }, 469 function (response) { 470 console.log(response); 471 console.log($(response).filter('span.code')); 472 spinner.css('display', 'none'); 473 window.location.reload(); 474 }); 475 else { 476 spinner.css('display', 'none'); 477 alert(response.status); 478 } 479 console.log(response); 480 481 }); 445 482 } 446 483 } … … 451 488 var overlay = $('#backupsavvy-settings > .overlay'); 452 489 var caller = WPB_ITUP.caller; 453 console.log(caller);454 console.log(WPB_ITUP.step);455 console.log(WPB_ITUP.status);456 490 457 491 if (param.key === 'start') { … … 520 554 }); 521 555 556 // update to premium 557 $('#backupsavvy-settings .t.premium').on('submit', 'form', function(e) { 558 e.preventDefault(); 559 WPB_ITUP.api = $(this).find('#serial').val(); 560 WPB_ITUP.premium_update(); 561 }) 562 522 563 // click functions 523 564 function click_save_storage(e) { -
backupsavvy/tags/1.1/assets/backupsavvy_style.css
r2001033 r2065940 1 /*add scheduler job*/ 2 /*end add scheduler job*/ 1 3 ul.tabs { 2 height: 36px; 3 line-height: 25px; 4 margin: 0 0 0px; 5 list-style: none; 6 } 7 4 height: 36px; 5 line-height: 25px; 6 margin: 0 0 0px; 7 list-style: none; 8 } 8 9 ul.tabs li { 9 float: left; 10 margin-right: 1px; 11 border-radius: 5px 5px 0 0; 12 -moz-border-radius: 5px 5px 0 0 !important; 13 -webkit-border-radius: 5px 5px 0 0; 14 -khtml-border-radius: 5px 5px 0 0; 15 margin-bottom: 0; 16 } 17 10 float: left; 11 margin-right: 1px; 12 border-radius: 5px 5px 0 0; 13 -moz-border-radius: 5px 5px 0 0 !important; 14 -webkit-border-radius: 5px 5px 0 0; 15 -khtml-border-radius: 5px 5px 0 0; 16 margin-bottom: 0; 17 } 18 18 #backupsavvy-settings > .overlay { 19 position: fixed; /* Sit on top of the page content */ 20 display: none; /* Hidden by default */ 21 width: 100%; /* Full width (cover the whole page) */ 22 height: 100%; /* Full height (cover the whole page) */ 19 position: fixed; 20 display: none; 21 width: 100%; 22 height: 100%; 23 top: 0; 24 left: 0; 25 right: 0; 26 bottom: 0; 27 background-color: rgba(0, 0, 0, 0.5); 28 z-index: 2; 29 } 30 #backupsavvy-settings > .overlay .popup { 31 width: 80%; 32 position: relative; 33 left: 50%; 34 min-height: 100px; 35 background-color: white; 36 top: 20%; 37 margin-left: -35%; 38 padding: 10px; 39 } 40 #backupsavvy-settings > .overlay .popup h3 { 41 margin: 5px 0 15px; 42 } 43 #backupsavvy-settings > .overlay .popup .info { 44 min-height: 10px; 45 max-height: 150px; 46 overflow-y: scroll; 47 } 48 #backupsavvy-settings > .overlay .popup .progressbar { 49 position: relative; 50 top: 5px; 51 margin-top: 10px; 52 } 53 #backupsavvy-settings > .overlay .popup .stop { 54 position: absolute; 55 top: 5px; 56 right: 10px; 57 cursor: pointer; 58 } 59 #backupsavvy-settings > .overlay .popup .stop:hover { 60 text-decoration: underline; 61 } 62 #backupsavvy-settings ul.tabs li.tab-current a { 63 color: #444; 64 background: #f1f1f1; 65 padding: 5px 10px; 66 border-radius: 5px 5px 0 0; 67 -moz-border-radius: 5px 5px 0 0 !important; 68 -webkit-border-radius: 5px 5px 0 0; 69 -khtml-border-radius: 5px 5px 0 0; 70 border: 1px solid #ccc; 71 border-bottom: 1px solid #f1f1f1; 72 margin-bottom: -1px; 73 } 74 #backupsavvy-settings ul.tabs li a { 75 display: block; 76 padding: 5px 10px; 77 margin: 0 4px 0px 0; 78 color: #111; 79 font-size: 12pt; 80 text-transform: uppercase; 81 text-decoration: none; 82 cursor: pointer; 83 background: #afafaf; 84 border: 1px solid #ccc; 85 border-bottom: 0px solid #F9F9F9; 86 position: relative; 87 border-radius: 5px 5px 0 0; 88 -moz-border-radius: 5px 5px 0 0 !important; 89 -webkit-border-radius: 5px 5px 0 0; 90 -khtml-border-radius: 5px 5px 0 0; 91 } 92 #backupsavvy-settings .btn.disable { 93 background-color: #BABABA !important; 94 cursor: default; 95 } 96 #backupsavvy-settings .spinner { 97 visibility: visible; 98 display: none; 99 } 100 #backupsavvy-settings form#settings .spinner { 101 float: none; 102 position: relative; 103 top: 3px; 104 } 105 #backupsavvy-settings .description { 106 font-size: 11px; 107 color: gray; 108 } 109 #backupsavvy-settings .red { 110 color: red; 111 } 112 #backupsavvy-settings .t6.update a { 113 border: 2px solid #ef9a07; 114 border-bottom: none; 115 background-color: #e69200; 116 color: white; 117 } 118 #backupsavvy-settings div.t { 119 display: none; 120 float: left; 121 width: calc(100% - 60px); 122 box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 123 -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 124 -webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 125 -khtml-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 126 padding: 15px 20px; 127 border: 1px solid #ccc; 128 } 129 #backupsavvy-settings .t1 form { 130 max-width: 400px; 131 } 132 #backupsavvy-settings .t1 form .field { 133 float: left; 134 width: 100%; 135 margin-bottom: 5px; 136 } 137 #backupsavvy-settings .t1 form label { 138 float: left; 139 font-weight: bold; 140 } 141 #backupsavvy-settings .t1 form input { 142 float: right; 143 width: 65%; 144 padding: 4px; 145 } 146 #backupsavvy-settings .t1 form input[type="submit"] { 147 float: none; 148 width: auto; 149 padding: 8px 20px; 150 } 151 #backupsavvy-settings .btn { 152 background: #3E61C6; 153 border: 1px solid rgba(0, 0, 0, 0.15); 154 -webkit-border-radius: 2px; 155 -moz-border-radius: 2px; 156 border-radius: 2px; 157 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 158 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 159 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 160 color: #FFF; 161 cursor: pointer; 162 display: inline-block; 163 font-family: inherit; 164 font-size: 20px; 165 font-weight: 500; 166 text-align: center; 167 padding: 8px 20px; 168 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 169 text-decoration: none; 170 } 171 #backupsavvy-settings .btn.little { 172 font-size: 14px; 173 padding: 4px 7px; 174 } 175 #backupsavvy-settings .premium ol { 176 list-style: none; 177 counter-reset: item; 178 margin-left: 1em; 179 margin-right: 1em; 180 } 181 #backupsavvy-settings .premium li { 182 counter-increment: item; 183 margin-bottom: 5px; 184 } 185 #backupsavvy-settings .premium li:before { 186 margin-right: 10px; 187 content: counter(item); 188 background: lightblue; 189 border-radius: 100%; 190 color: white; 191 width: 1.8em; 192 height: 1.5em; 193 text-align: center; 194 display: inline-block; 195 font-weight: bold; 196 padding-top: 3px; 197 } 198 #backupsavvy-settings .premium section { 199 float: left; 200 padding: 10px 0; 201 } 202 #backupsavvy-settings .premium section.info-block { 203 float: right; 204 padding: 5px 5px 5px 0; 205 background-color: white; 206 border: 2px solid #e69200; 207 position: relative; 208 top: -45px; 209 } 210 #backupsavvy-settings .premium section form { 211 max-width: 300px; 212 } 213 #backupsavvy-settings .premium section form label { 214 font-weight: bold; 215 } 216 #backupsavvy-settings .premium section form label input { 217 width: 200px; 218 margin-left: 10px; 219 } 220 #backupsavvy-settings .premium section form label + input.btn { 221 position: relative; 222 left: 27px; 223 margin: 10px auto 0; 224 display: block; 225 width: auto; 226 } 227 #backupsavvy-settings .premium .btn { 228 width: 44px; 229 display: block; 230 margin: 0 auto; 231 } 232 #add-new-job { 233 width: 60%; 234 } 235 #add-new-job .title { 236 width: 100%; 237 background-color: #98989833; 238 padding: 6px; 239 cursor: pointer; 240 margin-bottom: 0; 241 border-radius: 5px 5px 0 0; 242 } 243 #add-new-job form { 244 display: none; 245 } 246 .form-style-1 { 247 margin: 0; 248 max-width: 520px; 249 padding: 20px 12px 10px 20px; 250 font: 13px "Lucida Sans Unicode", "Lucida Grande", sans-serif; 251 } 252 .form-style-1 li { 253 padding: 0; 254 display: block; 255 list-style: none; 256 margin: 10px 0 0 0; 257 } 258 .form-style-1 li > span.task-name { 259 display: inline-block; 260 width: 44%; 261 } 262 .form-style-1 li > span.time { 263 display: inline-block; 264 width: 40%; 265 } 266 .form-style-1 label { 267 margin: 0 0 3px 0; 268 padding: 0px; 269 display: block; 270 font-weight: bold; 271 } 272 .form-style-1 input[type=text] { 273 box-sizing: border-box; 274 -webkit-box-sizing: border-box; 275 -moz-box-sizing: border-box; 276 border: 1px solid #BEBEBE; 277 padding: 7px; 278 margin: 0px; 279 -webkit-transition: all 0.3s ease-in-out; 280 -moz-transition: all 0.3s ease-in-out; 281 -ms-transition: all 0.3s ease-in-out; 282 -o-transition: all 0.3s ease-in-out; 283 outline: none; 284 } 285 .form-style-1 input[type=text]:focus { 286 -moz-box-shadow: 0 0 8px #88D5E9; 287 -webkit-box-shadow: 0 0 8px #88D5E9; 288 box-shadow: 0 0 8px #88D5E9; 289 border: 1px solid #88D5E9; 290 } 291 .form-style-1 input[type=date] { 292 box-sizing: border-box; 293 -webkit-box-sizing: border-box; 294 -moz-box-sizing: border-box; 295 border: 1px solid #BEBEBE; 296 padding: 7px; 297 margin: 0px; 298 -webkit-transition: all 0.3s ease-in-out; 299 -moz-transition: all 0.3s ease-in-out; 300 -ms-transition: all 0.3s ease-in-out; 301 -o-transition: all 0.3s ease-in-out; 302 outline: none; 303 } 304 .form-style-1 input[type=date]:focus { 305 -moz-box-shadow: 0 0 8px #88D5E9; 306 -webkit-box-shadow: 0 0 8px #88D5E9; 307 box-shadow: 0 0 8px #88D5E9; 308 border: 1px solid #88D5E9; 309 } 310 .form-style-1 input[type=datetime] { 311 box-sizing: border-box; 312 -webkit-box-sizing: border-box; 313 -moz-box-sizing: border-box; 314 border: 1px solid #BEBEBE; 315 padding: 7px; 316 margin: 0px; 317 -webkit-transition: all 0.3s ease-in-out; 318 -moz-transition: all 0.3s ease-in-out; 319 -ms-transition: all 0.3s ease-in-out; 320 -o-transition: all 0.3s ease-in-out; 321 outline: none; 322 } 323 .form-style-1 input[type=datetime]:focus { 324 -moz-box-shadow: 0 0 8px #88D5E9; 325 -webkit-box-shadow: 0 0 8px #88D5E9; 326 box-shadow: 0 0 8px #88D5E9; 327 border: 1px solid #88D5E9; 328 } 329 .form-style-1 input[type=number] { 330 box-sizing: border-box; 331 -webkit-box-sizing: border-box; 332 -moz-box-sizing: border-box; 333 border: 1px solid #BEBEBE; 334 padding: 7px; 335 margin: 0px; 336 -webkit-transition: all 0.3s ease-in-out; 337 -moz-transition: all 0.3s ease-in-out; 338 -ms-transition: all 0.3s ease-in-out; 339 -o-transition: all 0.3s ease-in-out; 340 outline: none; 341 } 342 .form-style-1 input[type=number]:focus { 343 -moz-box-shadow: 0 0 8px #88D5E9; 344 -webkit-box-shadow: 0 0 8px #88D5E9; 345 box-shadow: 0 0 8px #88D5E9; 346 border: 1px solid #88D5E9; 347 } 348 .form-style-1 input[type=search] { 349 box-sizing: border-box; 350 -webkit-box-sizing: border-box; 351 -moz-box-sizing: border-box; 352 border: 1px solid #BEBEBE; 353 padding: 7px; 354 margin: 0px; 355 -webkit-transition: all 0.3s ease-in-out; 356 -moz-transition: all 0.3s ease-in-out; 357 -ms-transition: all 0.3s ease-in-out; 358 -o-transition: all 0.3s ease-in-out; 359 outline: none; 360 } 361 .form-style-1 input[type=search]:focus { 362 -moz-box-shadow: 0 0 8px #88D5E9; 363 -webkit-box-shadow: 0 0 8px #88D5E9; 364 box-shadow: 0 0 8px #88D5E9; 365 border: 1px solid #88D5E9; 366 } 367 .form-style-1 input[type=time] { 368 box-sizing: border-box; 369 -webkit-box-sizing: border-box; 370 -moz-box-sizing: border-box; 371 border: 1px solid #BEBEBE; 372 padding: 7px; 373 margin: 0px; 374 -webkit-transition: all 0.3s ease-in-out; 375 -moz-transition: all 0.3s ease-in-out; 376 -ms-transition: all 0.3s ease-in-out; 377 -o-transition: all 0.3s ease-in-out; 378 outline: none; 379 } 380 .form-style-1 input[type=time]:focus { 381 -moz-box-shadow: 0 0 8px #88D5E9; 382 -webkit-box-shadow: 0 0 8px #88D5E9; 383 box-shadow: 0 0 8px #88D5E9; 384 border: 1px solid #88D5E9; 385 } 386 .form-style-1 input[type=url] { 387 box-sizing: border-box; 388 -webkit-box-sizing: border-box; 389 -moz-box-sizing: border-box; 390 border: 1px solid #BEBEBE; 391 padding: 7px; 392 margin: 0px; 393 -webkit-transition: all 0.3s ease-in-out; 394 -moz-transition: all 0.3s ease-in-out; 395 -ms-transition: all 0.3s ease-in-out; 396 -o-transition: all 0.3s ease-in-out; 397 outline: none; 398 } 399 .form-style-1 input[type=url]:focus { 400 -moz-box-shadow: 0 0 8px #88D5E9; 401 -webkit-box-shadow: 0 0 8px #88D5E9; 402 box-shadow: 0 0 8px #88D5E9; 403 border: 1px solid #88D5E9; 404 } 405 .form-style-1 input[type=email] { 406 box-sizing: border-box; 407 -webkit-box-sizing: border-box; 408 -moz-box-sizing: border-box; 409 border: 1px solid #BEBEBE; 410 padding: 7px; 411 margin: 0px; 412 -webkit-transition: all 0.3s ease-in-out; 413 -moz-transition: all 0.3s ease-in-out; 414 -ms-transition: all 0.3s ease-in-out; 415 -o-transition: all 0.3s ease-in-out; 416 outline: none; 417 } 418 .form-style-1 input[type=email]:focus { 419 -moz-box-shadow: 0 0 8px #88D5E9; 420 -webkit-box-shadow: 0 0 8px #88D5E9; 421 box-shadow: 0 0 8px #88D5E9; 422 border: 1px solid #88D5E9; 423 } 424 .form-style-1 textarea:focus { 425 -moz-box-shadow: 0 0 8px #88D5E9; 426 -webkit-box-shadow: 0 0 8px #88D5E9; 427 box-shadow: 0 0 8px #88D5E9; 428 border: 1px solid #88D5E9; 429 } 430 .form-style-1 select:focus { 431 -moz-box-shadow: 0 0 8px #88D5E9; 432 -webkit-box-shadow: 0 0 8px #88D5E9; 433 box-shadow: 0 0 8px #88D5E9; 434 border: 1px solid #88D5E9; 435 } 436 .form-style-1 .field-divided { 437 width: 49%; 438 } 439 .form-style-1 .field-long { 440 width: 100%; 441 } 442 .form-style-1 .field-select { 443 width: 100%; 444 } 445 .form-style-1 .field-textarea { 446 height: 100px; 447 } 448 .form-style-1 input[type=submit] { 449 background: #3E61C6; 450 border: 1px solid rgba(0, 0, 0, 0.15); 451 -webkit-border-radius: 2px; 452 -moz-border-radius: 2px; 453 border-radius: 2px; 454 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 455 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 456 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 457 color: #FFF; 458 cursor: pointer; 459 display: inline-block; 460 font-family: inherit; 461 font-size: 17px; 462 font-weight: 500; 463 text-align: center; 464 padding: 3px 15px; 465 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 466 text-decoration: none; 467 } 468 .form-style-1 input[type=submit]:hover { 469 background: #4691A4; 470 box-shadow: none; 471 -moz-box-shadow: none; 472 -webkit-box-shadow: none; 473 } 474 .form-style-1 input[type=button] { 475 background: #3E61C6; 476 border: 1px solid rgba(0, 0, 0, 0.15); 477 -webkit-border-radius: 2px; 478 -moz-border-radius: 2px; 479 border-radius: 2px; 480 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 481 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 482 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 483 color: #FFF; 484 cursor: pointer; 485 display: inline-block; 486 font-family: inherit; 487 font-size: 17px; 488 font-weight: 500; 489 text-align: center; 490 padding: 3px 15px; 491 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 492 text-decoration: none; 493 } 494 .form-style-1 input[type=button]:hover { 495 background: #4691A4; 496 box-shadow: none; 497 -moz-box-shadow: none; 498 -webkit-box-shadow: none; 499 } 500 .form-style-1 .required { 501 color: red; 502 } 503 textarea { 504 box-sizing: border-box; 505 -webkit-box-sizing: border-box; 506 -moz-box-sizing: border-box; 507 border: 1px solid #BEBEBE; 508 padding: 7px; 509 margin: 0px; 510 -webkit-transition: all 0.3s ease-in-out; 511 -moz-transition: all 0.3s ease-in-out; 512 -ms-transition: all 0.3s ease-in-out; 513 -o-transition: all 0.3s ease-in-out; 514 outline: none; 515 } 516 select { 517 box-sizing: border-box; 518 -webkit-box-sizing: border-box; 519 -moz-box-sizing: border-box; 520 border: 1px solid #BEBEBE; 521 padding: 7px; 522 margin: 0px; 523 -webkit-transition: all 0.3s ease-in-out; 524 -moz-transition: all 0.3s ease-in-out; 525 -ms-transition: all 0.3s ease-in-out; 526 -o-transition: all 0.3s ease-in-out; 527 outline: none; 528 } 529 table#scheduller-jobs { 530 width: 100%; 531 margin-top: 10px; 532 } 533 table#scheduller-jobs thead tr { 534 background-color: #afafaf; 535 } 536 table#scheduller-jobs tbody td { 537 background-color: ghostwhite; 538 padding-left: 15px; 539 width: 23%; 540 } 541 table#sites-list { 542 width: 100%; 543 margin-top: 10px; 544 } 545 table#sites-list thead tr { 546 background-color: #afafaf; 547 } 548 table#sites-list tbody td { 549 background-color: ghostwhite; 550 padding-left: 15px; 551 } 552 table#sites-list tbody td.action { 553 width: 23%; 554 } 555 table#sites-list div.hidden { 556 display: none; 557 } 558 table#backups-settings thead tr { 559 background-color: #afafaf; 560 } 561 table#backups-settings tbody td { 562 background-color: ghostwhite; 563 padding-left: 15px; 564 } 565 .progressbar { 566 margin-top: 20px; 567 margin-bottom: 10px; 568 height: auto; 569 background: #f6f6f6; 570 border: 1px solid #e6e6e6; 571 border-radius: 7px; 572 overflow: hidden; 573 display: none; 574 } 575 .progressbar #progresssteps { 576 background: #7db9e8; 577 background: -moz-linear-gradient(top, #7db9e8 0%, #7db9e8 5%, #207cca 55%, #2989d8 100%); 578 background: -webkit-linear-gradient(top, #7db9e8 0%, #7db9e8 5%, #207cca 55%, #2989d8 100%); 579 background: linear-gradient(to bottom, #7db9e8 0%, #7db9e8 5%, #207cca 55%, #2989d8 100%); 580 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7db9e8', endColorstr='#2989d8', GradientType=0); 581 -webkit-transition: width 0.6s ease; 582 -o-transition: width 0.6s ease; 583 transition: width 0.6s ease; 584 -webkit-animation: progress-bar-stripes 2s linear infinite; 585 -o-animation: progress-bar-stripes 2s linear infinite; 586 animation: progress-bar-stripes 2s linear infinite; 587 } 588 .progressbar .bwpu-progress { 589 background-color: #1d94cf; 590 color: #fff; 591 padding: 5px 0; 592 text-align: center; 593 } 594 #bulk-op a.btn { 595 background: #3E61C6; 596 border: 1px solid rgba(0, 0, 0, 0.15); 597 -webkit-border-radius: 2px; 598 -moz-border-radius: 2px; 599 border-radius: 2px; 600 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 601 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 602 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 603 color: #FFF; 604 cursor: pointer; 605 display: inline-block; 606 font-family: inherit; 607 font-size: 20px; 608 font-weight: 500; 609 text-align: center; 610 padding: 8px 20px; 611 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 612 text-decoration: none; 613 } 614 #sites-list a.btn { 615 background: #3E61C6; 616 border: 1px solid rgba(0, 0, 0, 0.15); 617 -webkit-border-radius: 2px; 618 -moz-border-radius: 2px; 619 border-radius: 2px; 620 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 621 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 622 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 623 color: #FFF; 624 cursor: pointer; 625 display: inline-block; 626 font-family: inherit; 627 font-size: 20px; 628 font-weight: 500; 629 text-align: center; 630 padding: 8px 20px; 631 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 632 text-decoration: none; 633 font-size: 14px; 634 padding: 4px 7px; 635 } 636 .storage-settings form { 637 max-width: 400px; 638 width: 100%; 639 } 640 .storage-settings form .btn { 641 background: #3E61C6; 642 border: 1px solid rgba(0, 0, 0, 0.15); 643 -webkit-border-radius: 2px; 644 -moz-border-radius: 2px; 645 border-radius: 2px; 646 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 647 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 648 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 649 color: #FFF; 650 cursor: pointer; 651 display: inline-block; 652 font-family: inherit; 653 font-size: 20px; 654 font-weight: 500; 655 text-align: center; 656 padding: 8px 20px; 657 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 658 text-decoration: none; 659 font-size: 14px; 660 padding: 4px 7px; 661 } 662 .storage-settings form .field { 663 float: left; 664 width: 100%; 665 margin-bottom: 7px; 666 } 667 .storage-settings form .field label { 668 float: left; 669 } 670 .storage-settings form .field input { 671 float: right; 672 } 673 .storage-settings form .field > span label { 674 float: none !important; 675 } 676 .storage-settings form .field > span input { 677 float: none !important; 678 } 679 .storage-settings form .field input.btn { 680 float: none !important; 681 } 682 .storage-settings form .field fieldset { 683 width: 50%; 684 border: 1px solid #b6b6b6; 685 padding: 10px; 686 } 687 .storage-settings form .field fieldset label { 688 float: none !important; 689 } 690 .storage-settings form .field fieldset input { 691 float: none !important; 692 } 693 .storage-settings form .field.num { 694 width: 50%; 695 } 696 .storage-settings form .field.num label { 697 position: relative; 698 top: 5px; 699 font-weight: bold; 700 } 701 .storage-settings form .field.num input { 702 width: 52px; 703 text-align: center; 704 padding: 2px; 705 } 706 .storage-settings .connected span { 707 font-weight: bold; 708 color: green; 709 } 710 .storage-settings .connected span.no { 711 color: red; 712 } 713 @media all and (max-width: 900px) { 714 #backupsavvy-settings .premium section { 715 float: none; 716 margin-bottom: 10px; 717 } 718 #backupsavvy-settings .premium section.info-block { 23 719 top: 0; 24 left: 0;25 right: 0;26 bottom: 0;27 background-color: rgba(0,0,0,0.5); /* Black background with opacity */28 z-index: 2; /* Specify a stack order in case you're using a different order for other elements */29 }30 31 #backupsavvy-settings > .overlay .popup {32 width: 80%;33 position: relative;34 left: 50%;35 min-height: 100px;36 background-color: white;37 top: 20%;38 margin-left: -35%;39 padding: 10px;40 }41 #backupsavvy-settings > .overlay .popup h3 {42 margin: 5px 0 15px;43 }44 #backupsavvy-settings > .overlay .popup .info {45 min-height: 10px;46 max-height: 150px;47 overflow-y: scroll;48 }49 #backupsavvy-settings > .overlay .popup .progressbar {50 position: relative;51 top:5px;52 margin-top: 10px;53 }54 #backupsavvy-settings > .overlay .popup .stop {55 position: absolute;56 top: 5px;57 right: 10px;58 cursor: pointer;59 }60 #backupsavvy-settings > .overlay .popup .stop:hover {61 text-decoration: underline;62 }63 #backupsavvy-settings ul.tabs li.tab-current a {64 color: #444;65 background: #f1f1f1;66 padding: 5px 10px;67 border-radius: 5px 5px 0 0;68 -moz-border-radius: 5px 5px 0 0 !important;69 -webkit-border-radius: 5px 5px 0 0;70 -khtml-border-radius: 5px 5px 0 0;71 border: 1px solid #ccc;72 border-bottom: 1px solid #f1f1f1;73 margin-bottom: -1px;74 }75 76 #backupsavvy-settings ul.tabs li a {77 display: block;78 padding: 5px 10px;79 margin: 0 4px 0px 0;80 color: #111;81 font-size: 12pt;82 text-transform: uppercase;83 text-decoration: none;84 cursor: pointer;85 background: #afafaf;86 border: 1px solid #ccc;87 border-bottom: 0px solid #F9F9F9;88 position: relative;89 border-radius: 5px 5px 0 0;90 -moz-border-radius: 5px 5px 0 0 !important;91 -webkit-border-radius: 5px 5px 0 0;92 -khtml-border-radius: 5px 5px 0 0;93 }94 95 #backupsavvy-settings .btn.disable {96 background-color: #BABABA !important;97 cursor: default;98 }99 100 #backupsavvy-settings .spinner {101 visibility: visible;102 display: none;103 }104 #backupsavvy-settings form#settings .spinner {105 720 float: none; 106 position: relative; 107 top: 3px; 108 } 109 #backupsavvy-settings .description { 110 font-size: 11px; 111 color: gray; 112 } 113 #backupsavvy-settings .red { 114 color: red; 115 } 116 #backupsavvy-settings div.t2, 117 #backupsavvy-settings div.t3, 118 #backupsavvy-settings div.t4 { 119 display: none; 120 } 121 #backupsavvy-settings div.t1, 122 #backupsavvy-settings div.t2, 123 #backupsavvy-settings div.t3, 124 #backupsavvy-settings div.t4 { 125 float: left; 126 width: calc(100% - 60px); 127 box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 128 -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 129 -webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 130 -khtml-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 131 padding: 15px 20px; 132 border: 1px solid #ccc; 133 } 134 #backupsavvy-settings .t1 form { 135 max-width: 400px; 136 } 137 #backupsavvy-settings .t1 form .field { 138 float: left; 139 width: 100%; 140 margin-bottom: 5px; 141 } 142 #backupsavvy-settings .t1 form label { 143 float: left; 144 font-weight:bold; 145 } 146 #backupsavvy-settings .t1 form input { 147 float: right; 148 width: 65%; 149 padding: 4px; 150 } 151 #backupsavvy-settings .t1 form input[type="submit"] { 152 float: none; 153 width:auto; 154 padding:8px 20px; 155 } 156 /*add scheduler job*/ 157 #add-new-job { 158 width:60%; 159 } 160 #add-new-job .title { 161 width: 100%; 162 background-color: #98989833; 163 padding: 6px; 164 cursor: pointer; 165 margin-bottom:0; 166 border-radius: 5px 5px 0 0; 167 } 168 #add-new-job form { 169 display: none; 170 } 171 172 .form-style-1 { 173 margin:0; 174 max-width: 520px; 175 padding: 20px 12px 10px 20px; 176 font: 13px "Lucida Sans Unicode", "Lucida Grande", sans-serif; 177 } 178 .form-style-1 li { 179 padding: 0; 180 display: block; 181 list-style: none; 182 margin: 10px 0 0 0; 183 } 184 .form-style-1 li > span.task-name { 185 display: inline-block; 186 width: 44%; 187 } 188 .form-style-1 li > span.time { 189 display: inline-block; 190 width:40%; 191 } 192 .form-style-1 label{ 193 margin:0 0 3px 0; 194 padding:0px; 195 display:block; 196 font-weight: bold; 197 } 198 .form-style-1 input[type=text], 199 .form-style-1 input[type=date], 200 .form-style-1 input[type=datetime], 201 .form-style-1 input[type=number], 202 .form-style-1 input[type=search], 203 .form-style-1 input[type=time], 204 .form-style-1 input[type=url], 205 .form-style-1 input[type=email], 206 textarea, 207 select{ 208 box-sizing: border-box; 209 -webkit-box-sizing: border-box; 210 -moz-box-sizing: border-box; 211 border:1px solid #BEBEBE; 212 padding: 7px; 213 margin:0px; 214 -webkit-transition: all 0.30s ease-in-out; 215 -moz-transition: all 0.30s ease-in-out; 216 -ms-transition: all 0.30s ease-in-out; 217 -o-transition: all 0.30s ease-in-out; 218 outline: none; 219 } 220 .form-style-1 input[type=text]:focus, 221 .form-style-1 input[type=date]:focus, 222 .form-style-1 input[type=datetime]:focus, 223 .form-style-1 input[type=number]:focus, 224 .form-style-1 input[type=search]:focus, 225 .form-style-1 input[type=time]:focus, 226 .form-style-1 input[type=url]:focus, 227 .form-style-1 input[type=email]:focus, 228 .form-style-1 textarea:focus, 229 .form-style-1 select:focus{ 230 -moz-box-shadow: 0 0 8px #88D5E9; 231 -webkit-box-shadow: 0 0 8px #88D5E9; 232 box-shadow: 0 0 8px #88D5E9; 233 border: 1px solid #88D5E9; 234 } 235 .form-style-1 .field-divided{ 236 width: 49%; 237 } 238 239 .form-style-1 .field-long{ 240 width: 100%; 241 } 242 .form-style-1 .field-select{ 243 width: 100%; 244 } 245 .form-style-1 .field-textarea{ 246 height: 100px; 247 } 248 .form-style-1 input[type=submit], .form-style-1 input[type=button]{ 249 background: #3E61C6; 250 border: 1px solid rgba(0, 0, 0, 0.15); 251 -webkit-border-radius: 2px; 252 -moz-border-radius: 2px; 253 border-radius: 2px; 254 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15),inset 1px 1px 1px rgba(255, 255, 255, 0.2); 255 -moz-box-shadow: 0 2px 3px rgba(0,0,0,.15),inset 1px 1px 1px rgba(255,255,255,.2); 256 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15),inset 1px 1px 1px rgba(255, 255, 255, 0.2); 257 color: #FFF; 258 cursor: pointer; 259 display: inline-block; 260 font-family: inherit; 261 font-size: 17px; 262 font-weight: 500; 263 text-align: center; 264 padding: 3px 15px; 265 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 266 text-decoration: none; 267 } 268 .form-style-1 input[type=submit]:hover, .form-style-1 input[type=button]:hover{ 269 background: #4691A4; 270 box-shadow:none; 271 -moz-box-shadow:none; 272 -webkit-box-shadow:none; 273 } 274 .form-style-1 .required{ 275 color:red; 276 } 277 /*end add scheduler job*/ 278 279 table#scheduller-jobs, table#sites-list { 280 width: 100%; 281 margin-top:10px; 282 } 283 table#scheduller-jobs thead tr, 284 table#sites-list thead tr, 285 table#backups-settings thead tr{ 286 background-color: #afafaf; 287 } 288 table#scheduller-jobs tbody td, 289 table#sites-list tbody td, 290 table#backups-settings tbody td{ 291 background-color: ghostwhite; 292 padding-left: 15px; 293 } 294 table#scheduller-jobs tbody td, 295 table#sites-list tbody td.action { 296 width: 23%; 297 } 298 table#sites-list div.hidden { 299 display: none; 300 } 301 .progressbar { 302 margin-top: 20px; 303 margin-bottom: 10px; 304 height: auto; 305 background: #f6f6f6; 306 border: 1px solid #e6e6e6; 307 border-radius: 7px; 308 overflow: hidden; 309 display: none; 310 311 /*height: 20px;*/ 312 /*margin-bottom: 20px;*/ 313 /*overflow: hidden;*/ 314 /*background-color: #f5f5f5;*/ 315 /*border-radius: 4px;*/ 316 /*-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);*/ 317 /*box-shadow: inset 0 1px 2px rgba(0,0,0,.1);*/ 318 } 319 320 .progressbar #progresssteps { 321 background: #7db9e8; /* Old browsers */ 322 background: -moz-linear-gradient(top, #7db9e8 0%, #7db9e8 5%, #207cca 55%, #2989d8 100%); /* FF3.6-15 */ 323 background: -webkit-linear-gradient(top, #7db9e8 0%,#7db9e8 5%,#207cca 55%,#2989d8 100%); /* Chrome10-25,Safari5.1-6 */ 324 background: linear-gradient(to bottom, #7db9e8 0%,#7db9e8 5%,#207cca 55%,#2989d8 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ 325 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7db9e8', endColorstr='#2989d8',GradientType=0 ); 326 /*float: left;*/ 327 /*width: 0;*/ 328 /*height: 100%;*/ 329 /*font-size: 12px;*/ 330 /*line-height: 20px;*/ 331 /*color: #fff;*/ 332 /*text-align: center;*/ 333 /*background-color: #337ab7;*/ 334 /*-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);*/ 335 /*box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);*/ 336 -webkit-transition: width .6s ease; 337 -o-transition: width .6s ease; 338 transition: width .6s ease; 339 -webkit-animation: progress-bar-stripes 2s linear infinite; 340 -o-animation: progress-bar-stripes 2s linear infinite; 341 animation: progress-bar-stripes 2s linear infinite; 342 /*background-image: -webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);*/ 343 /*background-image: -o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);*/ 344 /*background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);*/ 345 /*-webkit-background-size: 40px 40px;*/ 346 /*background-size: 40px 40px;*/ 347 } 348 349 .progressbar .bwpu-progress { 350 background-color: #1d94cf; 351 color: #fff; 352 padding: 5px 0; 353 text-align: center 354 } 355 356 #bulk-op a.btn, 357 #sites-list a.btn, 358 .storage-settings form .btn, 359 #backupsavvy-settings .btn { 360 background: #3E61C6; 361 border: 1px solid rgba(0, 0, 0, 0.15); 362 -webkit-border-radius: 2px; 363 -moz-border-radius: 2px; 364 border-radius: 2px; 365 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15),inset 1px 1px 1px rgba(255, 255, 255, 0.2); 366 -moz-box-shadow: 0 2px 3px rgba(0,0,0,.15),inset 1px 1px 1px rgba(255,255,255,.2); 367 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15),inset 1px 1px 1px rgba(255, 255, 255, 0.2); 368 color: #FFF; 369 cursor: pointer; 370 display: inline-block; 371 font-family: inherit; 372 font-size: 20px; 373 font-weight: 500; 374 text-align: center; 375 padding: 8px 20px; 376 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 377 text-decoration: none; 378 } 379 .storage-settings .connected span { 380 font-weight: bold; 381 color:green; 382 } 383 .storage-settings .connected span.no { 384 color:red; 385 } 386 387 #sites-list a.btn, 388 .storage-settings form .btn, 389 #backupsavvy-settings .btn.little{ 390 font-size: 14px; 391 padding:4px 7px; 392 } 393 394 .storage-settings form { 395 max-width: 400px; 396 width:100%; 397 } 398 .storage-settings form .field { 399 float: left; 400 width: 100%; 401 margin-bottom: 7px; 402 } 403 .storage-settings form .field.num { 404 width:50%; 405 } 406 .storage-settings form .field.num label { 407 position: relative; 408 top: 5px; 409 font-weight:bold; 410 } 411 .storage-settings form .field.num input { 412 width: 52px; 413 text-align: center; 414 padding: 2px; 415 } 416 .storage-settings form .field label { 417 float: left; 418 } 419 .storage-settings form .field input { 420 float: right; 421 } 422 423 .storage-settings form .field > span label, 424 .storage-settings form .field > span input, 425 .storage-settings form .field input.btn, 426 .storage-settings form .field fieldset label, 427 .storage-settings form .field fieldset input { 428 float: none !important; 429 } 430 431 .storage-settings form .field fieldset { 432 width: 50%; 433 border: 1px solid #b6b6b6; 434 padding: 10px; 435 } 721 } 722 } 723 /*# sourceMappingURL=backupsavvy_style.css.map */ -
backupsavvy/tags/1.1/inc/BackUpSavvySites.php
r2001033 r2065940 27 27 add_action( 'wp_ajax_backupsavvy_remove_site', array(&$this, 'remove_site') ); 28 28 add_action( 'wp_ajax_backupsavvy_test_con', array(&$this, 'test_ftp_connection') ); 29 add_action( 'wp_ajax_backupsavvy_premium_update', array(&$this, 'premium_update') ); 30 add_action( 'wp_ajax_backupsavvy_replace_plugin', array(&$this, 'replace_plugin') ); 31 // add_action( 'admin_action_replace_plugin', array(&$this, 'replace_plugin') ); 29 32 30 33 $this->apikey = get_option('backupsavvy_apikey', FALSE); … … 32 35 } 33 36 34 // todo: check individual settings when sync progress !!!!!!!!!!!!!!!!! 35 37 public function replace_plugin() { 38 $responseObj = get_option('backupsavvy_premium_object', false); 39 40 if(!$responseObj) { 41 echo 'Wrong key'; 42 exit; 43 } 44 45 require_once 'BackUpSavvyUpdates.php'; 46 new backupSavvyUpdates(BACKUPSAVVY_FILE, $responseObj); 47 } 36 48 37 49 public function set_unique_settings() { … … 315 327 } 316 328 317 329 public function premium_update() { 330 331 check_ajax_referer( 'set-wpbckup_sets', 'nonce' ); 332 if( ! wp_verify_nonce( $_POST['nonce'], 'set-wpbckup_sets' ) ) 333 $this->json_exit(array('status' => 'nonce')); 334 335 $apikey = $_POST['data']; 336 337 if($_SERVER['HTTP_HOST']) 338 $domain = $_SERVER['HTTP_HOST']; 339 else if($_SERVER['SERVER_NAME']) 340 $domain = $_SERVER['HTTP_HOST']; 341 else 342 $domain = ''; 343 344 if(!$apikey) 345 $this->json_exit(array('status' => 'apikey')); 346 347 $postUrl = 'https://backupsavvy.com/wp-json/backupsavvystoreapi/serial'; 348 $args = array( 349 'timeout' => 120, // seconds 350 'redirection' => 5, 351 'httpversion' => '1.0', 352 'blocking' => true, 353 'headers' => array(), 354 'body' => array( 355 'apikey' => $apikey, 356 'plugin_key' => 'cleanD8iunjdASDFlk77465lk', 357 'domain_name' => $domain 358 ), 359 'cookies' => array(), 360 'sslverify' => false 361 ); 362 363 $response = wp_remote_post( $postUrl, $args ); 364 365 if ( is_wp_error( $response ) ) { 366 $error_message = $response->get_error_message(); 367 $this->json_exit(array('status' => $error_message)); 368 exit; 369 } else { 370 $res =(object) json_decode($response['body']); 371 } 372 373 if(isset($res->status) && $res->status != 'ok') 374 $this->json_exit(array('status' => $res->status)); 375 376 // error_log(print_r($res,1)); 377 $responseObj = json_decode(base64_decode($res->response)); 378 379 include_once 'BackUpSavvyUpdates.php'; 380 include_once 'BackupSavvyReadmeParser.php'; 381 382 update_option('backupsavvy_premium_object', $responseObj); 383 384 $this->json_exit(array('status' => 'ok')); 385 386 } 318 387 319 388 -
backupsavvy/tags/1.1/parts/main_settings.php
r2001033 r2065940 12 12 ?> 13 13 14 15 14 <div id="backupsavvy-settings"> 16 15 <div class="overlay"><div class="popup"> … … 21 20 </div> 22 21 <div class="stop"">Stop</div> 23 </div></div> 22 </div> 23 </div> 24 24 <h2>Backupsavvy Dashboard</h2> 25 <?php // var_dump($st); ?>26 25 <ul class="tabs"> 27 26 <li class="t1 tab tab-current add-new"><a href="#add-new">Add new site</a></li> … … 30 29 <li class="t4 tab storage"><a href="#storage">Storage</a></li> 31 30 <li class="t5 tab storage"><a href="#backups">Existing backups</a></li> 31 <li class="t6 tab update"><a href="#update">Update to premium</a></li> 32 32 </ul> 33 33 <div class="t t1"> … … 46 46 <?php include_once 'existing-backups.php'; ?> 47 47 </div> 48 <div class="t6 t premium"> 49 <?php include_once 'premium.php'; ?> 50 </div> 48 51 </div> -
backupsavvy/tags/1.1/parts/settings_page.php
r2001033 r2065940 10 10 $dir_name = $exclude_d = $exclude_f = $site_unique_id = ''; 11 11 12 if ( $st ) {12 if ( $st && isset($st['host']) ) { 13 13 $connected = '<span class="yes">Connetcted</span> to: ' . $st['host']; 14 14 $dir_name = '<b>Remote direcory: ' . $st['dir'] . '</b>'; -
backupsavvy/trunk/BackUpSavvy.php
r2001033 r2065940 16 16 // If this file is called directly, abort. 17 17 if ( ! defined( 'WPINC' ) ) die; 18 19 define('BACKUPSAVVY_FILE', __FILE__); 18 20 19 21 if ( ! class_exists( 'BackUpSavvy', false ) ) { -
backupsavvy/trunk/assets/backupsavvy.js
r1922435 r2065940 25 25 $('ul.tabs li.t5').addClass('tab-current'); 26 26 break; 27 case '#update': 28 $('div.t6').show(); 29 $('ul.tabs li.t6').addClass('tab-current'); 30 break; 27 31 default: 28 32 $('div.t1').show(); … … 74 78 total: 0, 75 79 caller: '', 80 api: '', 76 81 save_storage: function () { 77 82 var form = this.form; … … 439 444 $('form#settings').trigger("reset"); 440 445 } 441 442 443 446 }); 444 447 return false; 448 }, 449 premium_update: function () { 450 var spinner = $('.do-update').find('.spinner'); 451 spinner.css({ 452 display: 'inline-block', 453 position: 'relative', 454 top: '-34px'}); 455 456 $.post(ajaxurl, { 457 action: "backupsavvy_premium_update", 458 method: 'POST', 459 data: this.api, 460 nonce: localVars.nonce 461 }, function (response_) { 462 var response = jQuery.parseJSON(response_); 463 if (response.status === 'ok') 464 $.post(ajaxurl, { 465 action: 'backupsavvy_replace_plugin', 466 method: 'POST', 467 nonce: localVars.nonce 468 }, 469 function (response) { 470 console.log(response); 471 console.log($(response).filter('span.code')); 472 spinner.css('display', 'none'); 473 window.location.reload(); 474 }); 475 else { 476 spinner.css('display', 'none'); 477 alert(response.status); 478 } 479 console.log(response); 480 481 }); 445 482 } 446 483 } … … 451 488 var overlay = $('#backupsavvy-settings > .overlay'); 452 489 var caller = WPB_ITUP.caller; 453 console.log(caller);454 console.log(WPB_ITUP.step);455 console.log(WPB_ITUP.status);456 490 457 491 if (param.key === 'start') { … … 520 554 }); 521 555 556 // update to premium 557 $('#backupsavvy-settings .t.premium').on('submit', 'form', function(e) { 558 e.preventDefault(); 559 WPB_ITUP.api = $(this).find('#serial').val(); 560 WPB_ITUP.premium_update(); 561 }) 562 522 563 // click functions 523 564 function click_save_storage(e) { -
backupsavvy/trunk/assets/backupsavvy_style.css
r1922435 r2065940 1 /*add scheduler job*/ 2 /*end add scheduler job*/ 1 3 ul.tabs { 2 height: 36px; 3 line-height: 25px; 4 margin: 0 0 0px; 5 list-style: none; 6 } 7 4 height: 36px; 5 line-height: 25px; 6 margin: 0 0 0px; 7 list-style: none; 8 } 8 9 ul.tabs li { 9 float: left; 10 margin-right: 1px; 11 border-radius: 5px 5px 0 0; 12 -moz-border-radius: 5px 5px 0 0 !important; 13 -webkit-border-radius: 5px 5px 0 0; 14 -khtml-border-radius: 5px 5px 0 0; 15 margin-bottom: 0; 16 } 17 10 float: left; 11 margin-right: 1px; 12 border-radius: 5px 5px 0 0; 13 -moz-border-radius: 5px 5px 0 0 !important; 14 -webkit-border-radius: 5px 5px 0 0; 15 -khtml-border-radius: 5px 5px 0 0; 16 margin-bottom: 0; 17 } 18 18 #backupsavvy-settings > .overlay { 19 position: fixed; /* Sit on top of the page content */ 20 display: none; /* Hidden by default */ 21 width: 100%; /* Full width (cover the whole page) */ 22 height: 100%; /* Full height (cover the whole page) */ 19 position: fixed; 20 display: none; 21 width: 100%; 22 height: 100%; 23 top: 0; 24 left: 0; 25 right: 0; 26 bottom: 0; 27 background-color: rgba(0, 0, 0, 0.5); 28 z-index: 2; 29 } 30 #backupsavvy-settings > .overlay .popup { 31 width: 80%; 32 position: relative; 33 left: 50%; 34 min-height: 100px; 35 background-color: white; 36 top: 20%; 37 margin-left: -35%; 38 padding: 10px; 39 } 40 #backupsavvy-settings > .overlay .popup h3 { 41 margin: 5px 0 15px; 42 } 43 #backupsavvy-settings > .overlay .popup .info { 44 min-height: 10px; 45 max-height: 150px; 46 overflow-y: scroll; 47 } 48 #backupsavvy-settings > .overlay .popup .progressbar { 49 position: relative; 50 top: 5px; 51 margin-top: 10px; 52 } 53 #backupsavvy-settings > .overlay .popup .stop { 54 position: absolute; 55 top: 5px; 56 right: 10px; 57 cursor: pointer; 58 } 59 #backupsavvy-settings > .overlay .popup .stop:hover { 60 text-decoration: underline; 61 } 62 #backupsavvy-settings ul.tabs li.tab-current a { 63 color: #444; 64 background: #f1f1f1; 65 padding: 5px 10px; 66 border-radius: 5px 5px 0 0; 67 -moz-border-radius: 5px 5px 0 0 !important; 68 -webkit-border-radius: 5px 5px 0 0; 69 -khtml-border-radius: 5px 5px 0 0; 70 border: 1px solid #ccc; 71 border-bottom: 1px solid #f1f1f1; 72 margin-bottom: -1px; 73 } 74 #backupsavvy-settings ul.tabs li a { 75 display: block; 76 padding: 5px 10px; 77 margin: 0 4px 0px 0; 78 color: #111; 79 font-size: 12pt; 80 text-transform: uppercase; 81 text-decoration: none; 82 cursor: pointer; 83 background: #afafaf; 84 border: 1px solid #ccc; 85 border-bottom: 0px solid #F9F9F9; 86 position: relative; 87 border-radius: 5px 5px 0 0; 88 -moz-border-radius: 5px 5px 0 0 !important; 89 -webkit-border-radius: 5px 5px 0 0; 90 -khtml-border-radius: 5px 5px 0 0; 91 } 92 #backupsavvy-settings .btn.disable { 93 background-color: #BABABA !important; 94 cursor: default; 95 } 96 #backupsavvy-settings .spinner { 97 visibility: visible; 98 display: none; 99 } 100 #backupsavvy-settings form#settings .spinner { 101 float: none; 102 position: relative; 103 top: 3px; 104 } 105 #backupsavvy-settings .description { 106 font-size: 11px; 107 color: gray; 108 } 109 #backupsavvy-settings .red { 110 color: red; 111 } 112 #backupsavvy-settings .t6.update a { 113 border: 2px solid #ef9a07; 114 border-bottom: none; 115 background-color: #e69200; 116 color: white; 117 } 118 #backupsavvy-settings div.t { 119 display: none; 120 float: left; 121 width: calc(100% - 60px); 122 box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 123 -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 124 -webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 125 -khtml-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 126 padding: 15px 20px; 127 border: 1px solid #ccc; 128 } 129 #backupsavvy-settings .t1 form { 130 max-width: 400px; 131 } 132 #backupsavvy-settings .t1 form .field { 133 float: left; 134 width: 100%; 135 margin-bottom: 5px; 136 } 137 #backupsavvy-settings .t1 form label { 138 float: left; 139 font-weight: bold; 140 } 141 #backupsavvy-settings .t1 form input { 142 float: right; 143 width: 65%; 144 padding: 4px; 145 } 146 #backupsavvy-settings .t1 form input[type="submit"] { 147 float: none; 148 width: auto; 149 padding: 8px 20px; 150 } 151 #backupsavvy-settings .btn { 152 background: #3E61C6; 153 border: 1px solid rgba(0, 0, 0, 0.15); 154 -webkit-border-radius: 2px; 155 -moz-border-radius: 2px; 156 border-radius: 2px; 157 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 158 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 159 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 160 color: #FFF; 161 cursor: pointer; 162 display: inline-block; 163 font-family: inherit; 164 font-size: 20px; 165 font-weight: 500; 166 text-align: center; 167 padding: 8px 20px; 168 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 169 text-decoration: none; 170 } 171 #backupsavvy-settings .btn.little { 172 font-size: 14px; 173 padding: 4px 7px; 174 } 175 #backupsavvy-settings .premium ol { 176 list-style: none; 177 counter-reset: item; 178 margin-left: 1em; 179 margin-right: 1em; 180 } 181 #backupsavvy-settings .premium li { 182 counter-increment: item; 183 margin-bottom: 5px; 184 } 185 #backupsavvy-settings .premium li:before { 186 margin-right: 10px; 187 content: counter(item); 188 background: lightblue; 189 border-radius: 100%; 190 color: white; 191 width: 1.8em; 192 height: 1.5em; 193 text-align: center; 194 display: inline-block; 195 font-weight: bold; 196 padding-top: 3px; 197 } 198 #backupsavvy-settings .premium section { 199 float: left; 200 padding: 10px 0; 201 } 202 #backupsavvy-settings .premium section.info-block { 203 float: right; 204 padding: 5px 5px 5px 0; 205 background-color: white; 206 border: 2px solid #e69200; 207 position: relative; 208 top: -45px; 209 } 210 #backupsavvy-settings .premium section form { 211 max-width: 300px; 212 } 213 #backupsavvy-settings .premium section form label { 214 font-weight: bold; 215 } 216 #backupsavvy-settings .premium section form label input { 217 width: 200px; 218 margin-left: 10px; 219 } 220 #backupsavvy-settings .premium section form label + input.btn { 221 position: relative; 222 left: 27px; 223 margin: 10px auto 0; 224 display: block; 225 width: auto; 226 } 227 #backupsavvy-settings .premium .btn { 228 width: 44px; 229 display: block; 230 margin: 0 auto; 231 } 232 #add-new-job { 233 width: 60%; 234 } 235 #add-new-job .title { 236 width: 100%; 237 background-color: #98989833; 238 padding: 6px; 239 cursor: pointer; 240 margin-bottom: 0; 241 border-radius: 5px 5px 0 0; 242 } 243 #add-new-job form { 244 display: none; 245 } 246 .form-style-1 { 247 margin: 0; 248 max-width: 520px; 249 padding: 20px 12px 10px 20px; 250 font: 13px "Lucida Sans Unicode", "Lucida Grande", sans-serif; 251 } 252 .form-style-1 li { 253 padding: 0; 254 display: block; 255 list-style: none; 256 margin: 10px 0 0 0; 257 } 258 .form-style-1 li > span.task-name { 259 display: inline-block; 260 width: 44%; 261 } 262 .form-style-1 li > span.time { 263 display: inline-block; 264 width: 40%; 265 } 266 .form-style-1 label { 267 margin: 0 0 3px 0; 268 padding: 0px; 269 display: block; 270 font-weight: bold; 271 } 272 .form-style-1 input[type=text] { 273 box-sizing: border-box; 274 -webkit-box-sizing: border-box; 275 -moz-box-sizing: border-box; 276 border: 1px solid #BEBEBE; 277 padding: 7px; 278 margin: 0px; 279 -webkit-transition: all 0.3s ease-in-out; 280 -moz-transition: all 0.3s ease-in-out; 281 -ms-transition: all 0.3s ease-in-out; 282 -o-transition: all 0.3s ease-in-out; 283 outline: none; 284 } 285 .form-style-1 input[type=text]:focus { 286 -moz-box-shadow: 0 0 8px #88D5E9; 287 -webkit-box-shadow: 0 0 8px #88D5E9; 288 box-shadow: 0 0 8px #88D5E9; 289 border: 1px solid #88D5E9; 290 } 291 .form-style-1 input[type=date] { 292 box-sizing: border-box; 293 -webkit-box-sizing: border-box; 294 -moz-box-sizing: border-box; 295 border: 1px solid #BEBEBE; 296 padding: 7px; 297 margin: 0px; 298 -webkit-transition: all 0.3s ease-in-out; 299 -moz-transition: all 0.3s ease-in-out; 300 -ms-transition: all 0.3s ease-in-out; 301 -o-transition: all 0.3s ease-in-out; 302 outline: none; 303 } 304 .form-style-1 input[type=date]:focus { 305 -moz-box-shadow: 0 0 8px #88D5E9; 306 -webkit-box-shadow: 0 0 8px #88D5E9; 307 box-shadow: 0 0 8px #88D5E9; 308 border: 1px solid #88D5E9; 309 } 310 .form-style-1 input[type=datetime] { 311 box-sizing: border-box; 312 -webkit-box-sizing: border-box; 313 -moz-box-sizing: border-box; 314 border: 1px solid #BEBEBE; 315 padding: 7px; 316 margin: 0px; 317 -webkit-transition: all 0.3s ease-in-out; 318 -moz-transition: all 0.3s ease-in-out; 319 -ms-transition: all 0.3s ease-in-out; 320 -o-transition: all 0.3s ease-in-out; 321 outline: none; 322 } 323 .form-style-1 input[type=datetime]:focus { 324 -moz-box-shadow: 0 0 8px #88D5E9; 325 -webkit-box-shadow: 0 0 8px #88D5E9; 326 box-shadow: 0 0 8px #88D5E9; 327 border: 1px solid #88D5E9; 328 } 329 .form-style-1 input[type=number] { 330 box-sizing: border-box; 331 -webkit-box-sizing: border-box; 332 -moz-box-sizing: border-box; 333 border: 1px solid #BEBEBE; 334 padding: 7px; 335 margin: 0px; 336 -webkit-transition: all 0.3s ease-in-out; 337 -moz-transition: all 0.3s ease-in-out; 338 -ms-transition: all 0.3s ease-in-out; 339 -o-transition: all 0.3s ease-in-out; 340 outline: none; 341 } 342 .form-style-1 input[type=number]:focus { 343 -moz-box-shadow: 0 0 8px #88D5E9; 344 -webkit-box-shadow: 0 0 8px #88D5E9; 345 box-shadow: 0 0 8px #88D5E9; 346 border: 1px solid #88D5E9; 347 } 348 .form-style-1 input[type=search] { 349 box-sizing: border-box; 350 -webkit-box-sizing: border-box; 351 -moz-box-sizing: border-box; 352 border: 1px solid #BEBEBE; 353 padding: 7px; 354 margin: 0px; 355 -webkit-transition: all 0.3s ease-in-out; 356 -moz-transition: all 0.3s ease-in-out; 357 -ms-transition: all 0.3s ease-in-out; 358 -o-transition: all 0.3s ease-in-out; 359 outline: none; 360 } 361 .form-style-1 input[type=search]:focus { 362 -moz-box-shadow: 0 0 8px #88D5E9; 363 -webkit-box-shadow: 0 0 8px #88D5E9; 364 box-shadow: 0 0 8px #88D5E9; 365 border: 1px solid #88D5E9; 366 } 367 .form-style-1 input[type=time] { 368 box-sizing: border-box; 369 -webkit-box-sizing: border-box; 370 -moz-box-sizing: border-box; 371 border: 1px solid #BEBEBE; 372 padding: 7px; 373 margin: 0px; 374 -webkit-transition: all 0.3s ease-in-out; 375 -moz-transition: all 0.3s ease-in-out; 376 -ms-transition: all 0.3s ease-in-out; 377 -o-transition: all 0.3s ease-in-out; 378 outline: none; 379 } 380 .form-style-1 input[type=time]:focus { 381 -moz-box-shadow: 0 0 8px #88D5E9; 382 -webkit-box-shadow: 0 0 8px #88D5E9; 383 box-shadow: 0 0 8px #88D5E9; 384 border: 1px solid #88D5E9; 385 } 386 .form-style-1 input[type=url] { 387 box-sizing: border-box; 388 -webkit-box-sizing: border-box; 389 -moz-box-sizing: border-box; 390 border: 1px solid #BEBEBE; 391 padding: 7px; 392 margin: 0px; 393 -webkit-transition: all 0.3s ease-in-out; 394 -moz-transition: all 0.3s ease-in-out; 395 -ms-transition: all 0.3s ease-in-out; 396 -o-transition: all 0.3s ease-in-out; 397 outline: none; 398 } 399 .form-style-1 input[type=url]:focus { 400 -moz-box-shadow: 0 0 8px #88D5E9; 401 -webkit-box-shadow: 0 0 8px #88D5E9; 402 box-shadow: 0 0 8px #88D5E9; 403 border: 1px solid #88D5E9; 404 } 405 .form-style-1 input[type=email] { 406 box-sizing: border-box; 407 -webkit-box-sizing: border-box; 408 -moz-box-sizing: border-box; 409 border: 1px solid #BEBEBE; 410 padding: 7px; 411 margin: 0px; 412 -webkit-transition: all 0.3s ease-in-out; 413 -moz-transition: all 0.3s ease-in-out; 414 -ms-transition: all 0.3s ease-in-out; 415 -o-transition: all 0.3s ease-in-out; 416 outline: none; 417 } 418 .form-style-1 input[type=email]:focus { 419 -moz-box-shadow: 0 0 8px #88D5E9; 420 -webkit-box-shadow: 0 0 8px #88D5E9; 421 box-shadow: 0 0 8px #88D5E9; 422 border: 1px solid #88D5E9; 423 } 424 .form-style-1 textarea:focus { 425 -moz-box-shadow: 0 0 8px #88D5E9; 426 -webkit-box-shadow: 0 0 8px #88D5E9; 427 box-shadow: 0 0 8px #88D5E9; 428 border: 1px solid #88D5E9; 429 } 430 .form-style-1 select:focus { 431 -moz-box-shadow: 0 0 8px #88D5E9; 432 -webkit-box-shadow: 0 0 8px #88D5E9; 433 box-shadow: 0 0 8px #88D5E9; 434 border: 1px solid #88D5E9; 435 } 436 .form-style-1 .field-divided { 437 width: 49%; 438 } 439 .form-style-1 .field-long { 440 width: 100%; 441 } 442 .form-style-1 .field-select { 443 width: 100%; 444 } 445 .form-style-1 .field-textarea { 446 height: 100px; 447 } 448 .form-style-1 input[type=submit] { 449 background: #3E61C6; 450 border: 1px solid rgba(0, 0, 0, 0.15); 451 -webkit-border-radius: 2px; 452 -moz-border-radius: 2px; 453 border-radius: 2px; 454 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 455 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 456 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 457 color: #FFF; 458 cursor: pointer; 459 display: inline-block; 460 font-family: inherit; 461 font-size: 17px; 462 font-weight: 500; 463 text-align: center; 464 padding: 3px 15px; 465 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 466 text-decoration: none; 467 } 468 .form-style-1 input[type=submit]:hover { 469 background: #4691A4; 470 box-shadow: none; 471 -moz-box-shadow: none; 472 -webkit-box-shadow: none; 473 } 474 .form-style-1 input[type=button] { 475 background: #3E61C6; 476 border: 1px solid rgba(0, 0, 0, 0.15); 477 -webkit-border-radius: 2px; 478 -moz-border-radius: 2px; 479 border-radius: 2px; 480 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 481 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 482 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 483 color: #FFF; 484 cursor: pointer; 485 display: inline-block; 486 font-family: inherit; 487 font-size: 17px; 488 font-weight: 500; 489 text-align: center; 490 padding: 3px 15px; 491 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 492 text-decoration: none; 493 } 494 .form-style-1 input[type=button]:hover { 495 background: #4691A4; 496 box-shadow: none; 497 -moz-box-shadow: none; 498 -webkit-box-shadow: none; 499 } 500 .form-style-1 .required { 501 color: red; 502 } 503 textarea { 504 box-sizing: border-box; 505 -webkit-box-sizing: border-box; 506 -moz-box-sizing: border-box; 507 border: 1px solid #BEBEBE; 508 padding: 7px; 509 margin: 0px; 510 -webkit-transition: all 0.3s ease-in-out; 511 -moz-transition: all 0.3s ease-in-out; 512 -ms-transition: all 0.3s ease-in-out; 513 -o-transition: all 0.3s ease-in-out; 514 outline: none; 515 } 516 select { 517 box-sizing: border-box; 518 -webkit-box-sizing: border-box; 519 -moz-box-sizing: border-box; 520 border: 1px solid #BEBEBE; 521 padding: 7px; 522 margin: 0px; 523 -webkit-transition: all 0.3s ease-in-out; 524 -moz-transition: all 0.3s ease-in-out; 525 -ms-transition: all 0.3s ease-in-out; 526 -o-transition: all 0.3s ease-in-out; 527 outline: none; 528 } 529 table#scheduller-jobs { 530 width: 100%; 531 margin-top: 10px; 532 } 533 table#scheduller-jobs thead tr { 534 background-color: #afafaf; 535 } 536 table#scheduller-jobs tbody td { 537 background-color: ghostwhite; 538 padding-left: 15px; 539 width: 23%; 540 } 541 table#sites-list { 542 width: 100%; 543 margin-top: 10px; 544 } 545 table#sites-list thead tr { 546 background-color: #afafaf; 547 } 548 table#sites-list tbody td { 549 background-color: ghostwhite; 550 padding-left: 15px; 551 } 552 table#sites-list tbody td.action { 553 width: 23%; 554 } 555 table#sites-list div.hidden { 556 display: none; 557 } 558 table#backups-settings thead tr { 559 background-color: #afafaf; 560 } 561 table#backups-settings tbody td { 562 background-color: ghostwhite; 563 padding-left: 15px; 564 } 565 .progressbar { 566 margin-top: 20px; 567 margin-bottom: 10px; 568 height: auto; 569 background: #f6f6f6; 570 border: 1px solid #e6e6e6; 571 border-radius: 7px; 572 overflow: hidden; 573 display: none; 574 } 575 .progressbar #progresssteps { 576 background: #7db9e8; 577 background: -moz-linear-gradient(top, #7db9e8 0%, #7db9e8 5%, #207cca 55%, #2989d8 100%); 578 background: -webkit-linear-gradient(top, #7db9e8 0%, #7db9e8 5%, #207cca 55%, #2989d8 100%); 579 background: linear-gradient(to bottom, #7db9e8 0%, #7db9e8 5%, #207cca 55%, #2989d8 100%); 580 filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#7db9e8', endColorstr='#2989d8', GradientType=0); 581 -webkit-transition: width 0.6s ease; 582 -o-transition: width 0.6s ease; 583 transition: width 0.6s ease; 584 -webkit-animation: progress-bar-stripes 2s linear infinite; 585 -o-animation: progress-bar-stripes 2s linear infinite; 586 animation: progress-bar-stripes 2s linear infinite; 587 } 588 .progressbar .bwpu-progress { 589 background-color: #1d94cf; 590 color: #fff; 591 padding: 5px 0; 592 text-align: center; 593 } 594 #bulk-op a.btn { 595 background: #3E61C6; 596 border: 1px solid rgba(0, 0, 0, 0.15); 597 -webkit-border-radius: 2px; 598 -moz-border-radius: 2px; 599 border-radius: 2px; 600 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 601 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 602 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 603 color: #FFF; 604 cursor: pointer; 605 display: inline-block; 606 font-family: inherit; 607 font-size: 20px; 608 font-weight: 500; 609 text-align: center; 610 padding: 8px 20px; 611 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 612 text-decoration: none; 613 } 614 #sites-list a.btn { 615 background: #3E61C6; 616 border: 1px solid rgba(0, 0, 0, 0.15); 617 -webkit-border-radius: 2px; 618 -moz-border-radius: 2px; 619 border-radius: 2px; 620 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 621 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 622 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 623 color: #FFF; 624 cursor: pointer; 625 display: inline-block; 626 font-family: inherit; 627 font-size: 20px; 628 font-weight: 500; 629 text-align: center; 630 padding: 8px 20px; 631 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 632 text-decoration: none; 633 font-size: 14px; 634 padding: 4px 7px; 635 } 636 .storage-settings form { 637 max-width: 400px; 638 width: 100%; 639 } 640 .storage-settings form .btn { 641 background: #3E61C6; 642 border: 1px solid rgba(0, 0, 0, 0.15); 643 -webkit-border-radius: 2px; 644 -moz-border-radius: 2px; 645 border-radius: 2px; 646 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 647 -moz-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 648 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15), inset 1px 1px 1px rgba(255, 255, 255, 0.2); 649 color: #FFF; 650 cursor: pointer; 651 display: inline-block; 652 font-family: inherit; 653 font-size: 20px; 654 font-weight: 500; 655 text-align: center; 656 padding: 8px 20px; 657 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 658 text-decoration: none; 659 font-size: 14px; 660 padding: 4px 7px; 661 } 662 .storage-settings form .field { 663 float: left; 664 width: 100%; 665 margin-bottom: 7px; 666 } 667 .storage-settings form .field label { 668 float: left; 669 } 670 .storage-settings form .field input { 671 float: right; 672 } 673 .storage-settings form .field > span label { 674 float: none !important; 675 } 676 .storage-settings form .field > span input { 677 float: none !important; 678 } 679 .storage-settings form .field input.btn { 680 float: none !important; 681 } 682 .storage-settings form .field fieldset { 683 width: 50%; 684 border: 1px solid #b6b6b6; 685 padding: 10px; 686 } 687 .storage-settings form .field fieldset label { 688 float: none !important; 689 } 690 .storage-settings form .field fieldset input { 691 float: none !important; 692 } 693 .storage-settings form .field.num { 694 width: 50%; 695 } 696 .storage-settings form .field.num label { 697 position: relative; 698 top: 5px; 699 font-weight: bold; 700 } 701 .storage-settings form .field.num input { 702 width: 52px; 703 text-align: center; 704 padding: 2px; 705 } 706 .storage-settings .connected span { 707 font-weight: bold; 708 color: green; 709 } 710 .storage-settings .connected span.no { 711 color: red; 712 } 713 @media all and (max-width: 900px) { 714 #backupsavvy-settings .premium section { 715 float: none; 716 margin-bottom: 10px; 717 } 718 #backupsavvy-settings .premium section.info-block { 23 719 top: 0; 24 left: 0;25 right: 0;26 bottom: 0;27 background-color: rgba(0,0,0,0.5); /* Black background with opacity */28 z-index: 2; /* Specify a stack order in case you're using a different order for other elements */29 }30 31 #backupsavvy-settings > .overlay .popup {32 width: 80%;33 position: relative;34 left: 50%;35 min-height: 100px;36 background-color: white;37 top: 20%;38 margin-left: -35%;39 padding: 10px;40 }41 #backupsavvy-settings > .overlay .popup h3 {42 margin: 5px 0 15px;43 }44 #backupsavvy-settings > .overlay .popup .info {45 min-height: 10px;46 max-height: 150px;47 overflow-y: scroll;48 }49 #backupsavvy-settings > .overlay .popup .progressbar {50 position: relative;51 top:5px;52 margin-top: 10px;53 }54 #backupsavvy-settings > .overlay .popup .stop {55 position: absolute;56 top: 5px;57 right: 10px;58 cursor: pointer;59 }60 #backupsavvy-settings > .overlay .popup .stop:hover {61 text-decoration: underline;62 }63 #backupsavvy-settings ul.tabs li.tab-current a {64 color: #444;65 background: #f1f1f1;66 padding: 5px 10px;67 border-radius: 5px 5px 0 0;68 -moz-border-radius: 5px 5px 0 0 !important;69 -webkit-border-radius: 5px 5px 0 0;70 -khtml-border-radius: 5px 5px 0 0;71 border: 1px solid #ccc;72 border-bottom: 1px solid #f1f1f1;73 margin-bottom: -1px;74 }75 76 #backupsavvy-settings ul.tabs li a {77 display: block;78 padding: 5px 10px;79 margin: 0 4px 0px 0;80 color: #111;81 font-size: 12pt;82 text-transform: uppercase;83 text-decoration: none;84 cursor: pointer;85 background: #afafaf;86 border: 1px solid #ccc;87 border-bottom: 0px solid #F9F9F9;88 position: relative;89 border-radius: 5px 5px 0 0;90 -moz-border-radius: 5px 5px 0 0 !important;91 -webkit-border-radius: 5px 5px 0 0;92 -khtml-border-radius: 5px 5px 0 0;93 }94 95 #backupsavvy-settings .btn.disable {96 background-color: #BABABA !important;97 cursor: default;98 }99 100 #backupsavvy-settings .spinner {101 visibility: visible;102 display: none;103 }104 #backupsavvy-settings form#settings .spinner {105 720 float: none; 106 position: relative; 107 top: 3px; 108 } 109 #backupsavvy-settings .description { 110 font-size: 11px; 111 color: gray; 112 } 113 #backupsavvy-settings .red { 114 color: red; 115 } 116 #backupsavvy-settings div.t2, 117 #backupsavvy-settings div.t3, 118 #backupsavvy-settings div.t4 { 119 display: none; 120 } 121 #backupsavvy-settings div.t1, 122 #backupsavvy-settings div.t2, 123 #backupsavvy-settings div.t3, 124 #backupsavvy-settings div.t4 { 125 float: left; 126 width: calc(100% - 60px); 127 box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 128 -moz-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 129 -webkit-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 130 -khtml-box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4); 131 padding: 15px 20px; 132 border: 1px solid #ccc; 133 } 134 #backupsavvy-settings .t1 form { 135 max-width: 400px; 136 } 137 #backupsavvy-settings .t1 form .field { 138 float: left; 139 width: 100%; 140 margin-bottom: 5px; 141 } 142 #backupsavvy-settings .t1 form label { 143 float: left; 144 font-weight:bold; 145 } 146 #backupsavvy-settings .t1 form input { 147 float: right; 148 width: 65%; 149 padding: 4px; 150 } 151 #backupsavvy-settings .t1 form input[type="submit"] { 152 float: none; 153 width:auto; 154 padding:8px 20px; 155 } 156 /*add scheduler job*/ 157 #add-new-job { 158 width:60%; 159 } 160 #add-new-job .title { 161 width: 100%; 162 background-color: #98989833; 163 padding: 6px; 164 cursor: pointer; 165 margin-bottom:0; 166 border-radius: 5px 5px 0 0; 167 } 168 #add-new-job form { 169 display: none; 170 } 171 172 .form-style-1 { 173 margin:0; 174 max-width: 520px; 175 padding: 20px 12px 10px 20px; 176 font: 13px "Lucida Sans Unicode", "Lucida Grande", sans-serif; 177 } 178 .form-style-1 li { 179 padding: 0; 180 display: block; 181 list-style: none; 182 margin: 10px 0 0 0; 183 } 184 .form-style-1 li > span.task-name { 185 display: inline-block; 186 width: 44%; 187 } 188 .form-style-1 li > span.time { 189 display: inline-block; 190 width:40%; 191 } 192 .form-style-1 label{ 193 margin:0 0 3px 0; 194 padding:0px; 195 display:block; 196 font-weight: bold; 197 } 198 .form-style-1 input[type=text], 199 .form-style-1 input[type=date], 200 .form-style-1 input[type=datetime], 201 .form-style-1 input[type=number], 202 .form-style-1 input[type=search], 203 .form-style-1 input[type=time], 204 .form-style-1 input[type=url], 205 .form-style-1 input[type=email], 206 textarea, 207 select{ 208 box-sizing: border-box; 209 -webkit-box-sizing: border-box; 210 -moz-box-sizing: border-box; 211 border:1px solid #BEBEBE; 212 padding: 7px; 213 margin:0px; 214 -webkit-transition: all 0.30s ease-in-out; 215 -moz-transition: all 0.30s ease-in-out; 216 -ms-transition: all 0.30s ease-in-out; 217 -o-transition: all 0.30s ease-in-out; 218 outline: none; 219 } 220 .form-style-1 input[type=text]:focus, 221 .form-style-1 input[type=date]:focus, 222 .form-style-1 input[type=datetime]:focus, 223 .form-style-1 input[type=number]:focus, 224 .form-style-1 input[type=search]:focus, 225 .form-style-1 input[type=time]:focus, 226 .form-style-1 input[type=url]:focus, 227 .form-style-1 input[type=email]:focus, 228 .form-style-1 textarea:focus, 229 .form-style-1 select:focus{ 230 -moz-box-shadow: 0 0 8px #88D5E9; 231 -webkit-box-shadow: 0 0 8px #88D5E9; 232 box-shadow: 0 0 8px #88D5E9; 233 border: 1px solid #88D5E9; 234 } 235 .form-style-1 .field-divided{ 236 width: 49%; 237 } 238 239 .form-style-1 .field-long{ 240 width: 100%; 241 } 242 .form-style-1 .field-select{ 243 width: 100%; 244 } 245 .form-style-1 .field-textarea{ 246 height: 100px; 247 } 248 .form-style-1 input[type=submit], .form-style-1 input[type=button]{ 249 background: #3E61C6; 250 border: 1px solid rgba(0, 0, 0, 0.15); 251 -webkit-border-radius: 2px; 252 -moz-border-radius: 2px; 253 border-radius: 2px; 254 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15),inset 1px 1px 1px rgba(255, 255, 255, 0.2); 255 -moz-box-shadow: 0 2px 3px rgba(0,0,0,.15),inset 1px 1px 1px rgba(255,255,255,.2); 256 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15),inset 1px 1px 1px rgba(255, 255, 255, 0.2); 257 color: #FFF; 258 cursor: pointer; 259 display: inline-block; 260 font-family: inherit; 261 font-size: 17px; 262 font-weight: 500; 263 text-align: center; 264 padding: 3px 15px; 265 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 266 text-decoration: none; 267 } 268 .form-style-1 input[type=submit]:hover, .form-style-1 input[type=button]:hover{ 269 background: #4691A4; 270 box-shadow:none; 271 -moz-box-shadow:none; 272 -webkit-box-shadow:none; 273 } 274 .form-style-1 .required{ 275 color:red; 276 } 277 /*end add scheduler job*/ 278 279 table#scheduller-jobs, table#sites-list { 280 width: 100%; 281 margin-top:10px; 282 } 283 table#scheduller-jobs thead tr, 284 table#sites-list thead tr, 285 table#backups-settings thead tr{ 286 background-color: #afafaf; 287 } 288 table#scheduller-jobs tbody td, 289 table#sites-list tbody td, 290 table#backups-settings tbody td{ 291 background-color: ghostwhite; 292 padding-left: 15px; 293 } 294 table#scheduller-jobs tbody td, 295 table#sites-list tbody td.action { 296 width: 23%; 297 } 298 table#sites-list div.hidden { 299 display: none; 300 } 301 .progressbar { 302 margin-top: 20px; 303 margin-bottom: 10px; 304 height: auto; 305 background: #f6f6f6; 306 border: 1px solid #e6e6e6; 307 border-radius: 7px; 308 overflow: hidden; 309 display: none; 310 311 /*height: 20px;*/ 312 /*margin-bottom: 20px;*/ 313 /*overflow: hidden;*/ 314 /*background-color: #f5f5f5;*/ 315 /*border-radius: 4px;*/ 316 /*-webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1);*/ 317 /*box-shadow: inset 0 1px 2px rgba(0,0,0,.1);*/ 318 } 319 320 .progressbar #progresssteps { 321 background: #7db9e8; /* Old browsers */ 322 background: -moz-linear-gradient(top, #7db9e8 0%, #7db9e8 5%, #207cca 55%, #2989d8 100%); /* FF3.6-15 */ 323 background: -webkit-linear-gradient(top, #7db9e8 0%,#7db9e8 5%,#207cca 55%,#2989d8 100%); /* Chrome10-25,Safari5.1-6 */ 324 background: linear-gradient(to bottom, #7db9e8 0%,#7db9e8 5%,#207cca 55%,#2989d8 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */ 325 filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#7db9e8', endColorstr='#2989d8',GradientType=0 ); 326 /*float: left;*/ 327 /*width: 0;*/ 328 /*height: 100%;*/ 329 /*font-size: 12px;*/ 330 /*line-height: 20px;*/ 331 /*color: #fff;*/ 332 /*text-align: center;*/ 333 /*background-color: #337ab7;*/ 334 /*-webkit-box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);*/ 335 /*box-shadow: inset 0 -1px 0 rgba(0,0,0,.15);*/ 336 -webkit-transition: width .6s ease; 337 -o-transition: width .6s ease; 338 transition: width .6s ease; 339 -webkit-animation: progress-bar-stripes 2s linear infinite; 340 -o-animation: progress-bar-stripes 2s linear infinite; 341 animation: progress-bar-stripes 2s linear infinite; 342 /*background-image: -webkit-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);*/ 343 /*background-image: -o-linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);*/ 344 /*background-image: linear-gradient(45deg,rgba(255,255,255,.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,.15) 50%,rgba(255,255,255,.15) 75%,transparent 75%,transparent);*/ 345 /*-webkit-background-size: 40px 40px;*/ 346 /*background-size: 40px 40px;*/ 347 } 348 349 .progressbar .bwpu-progress { 350 background-color: #1d94cf; 351 color: #fff; 352 padding: 5px 0; 353 text-align: center 354 } 355 356 #bulk-op a.btn, 357 #sites-list a.btn, 358 .storage-settings form .btn, 359 #backupsavvy-settings .btn { 360 background: #3E61C6; 361 border: 1px solid rgba(0, 0, 0, 0.15); 362 -webkit-border-radius: 2px; 363 -moz-border-radius: 2px; 364 border-radius: 2px; 365 -webkit-box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15),inset 1px 1px 1px rgba(255, 255, 255, 0.2); 366 -moz-box-shadow: 0 2px 3px rgba(0,0,0,.15),inset 1px 1px 1px rgba(255,255,255,.2); 367 box-shadow: 0 2px 3px rgba(0, 0, 0, 0.15),inset 1px 1px 1px rgba(255, 255, 255, 0.2); 368 color: #FFF; 369 cursor: pointer; 370 display: inline-block; 371 font-family: inherit; 372 font-size: 20px; 373 font-weight: 500; 374 text-align: center; 375 padding: 8px 20px; 376 text-shadow: -1px -1px 1px rgba(0, 0, 0, 0.15); 377 text-decoration: none; 378 } 379 .storage-settings .connected span { 380 font-weight: bold; 381 color:green; 382 } 383 .storage-settings .connected span.no { 384 color:red; 385 } 386 387 #sites-list a.btn, 388 .storage-settings form .btn, 389 #backupsavvy-settings .btn.little{ 390 font-size: 14px; 391 padding:4px 7px; 392 } 393 394 .storage-settings form { 395 max-width: 400px; 396 width:100%; 397 } 398 .storage-settings form .field { 399 float: left; 400 width: 100%; 401 margin-bottom: 7px; 402 } 403 .storage-settings form .field.num { 404 width:50%; 405 } 406 .storage-settings form .field.num label { 407 position: relative; 408 top: 5px; 409 font-weight:bold; 410 } 411 .storage-settings form .field.num input { 412 width: 52px; 413 text-align: center; 414 padding: 2px; 415 } 416 .storage-settings form .field label { 417 float: left; 418 } 419 .storage-settings form .field input { 420 float: right; 421 } 422 423 .storage-settings form .field > span label, 424 .storage-settings form .field > span input, 425 .storage-settings form .field input.btn, 426 .storage-settings form .field fieldset label, 427 .storage-settings form .field fieldset input { 428 float: none !important; 429 } 430 431 .storage-settings form .field fieldset { 432 width: 50%; 433 border: 1px solid #b6b6b6; 434 padding: 10px; 435 } 721 } 722 } 723 /*# sourceMappingURL=backupsavvy_style.css.map */ -
backupsavvy/trunk/inc/BackUpSavvySites.php
r1922435 r2065940 27 27 add_action( 'wp_ajax_backupsavvy_remove_site', array(&$this, 'remove_site') ); 28 28 add_action( 'wp_ajax_backupsavvy_test_con', array(&$this, 'test_ftp_connection') ); 29 add_action( 'wp_ajax_backupsavvy_premium_update', array(&$this, 'premium_update') ); 30 add_action( 'wp_ajax_backupsavvy_replace_plugin', array(&$this, 'replace_plugin') ); 31 // add_action( 'admin_action_replace_plugin', array(&$this, 'replace_plugin') ); 29 32 30 33 $this->apikey = get_option('backupsavvy_apikey', FALSE); … … 32 35 } 33 36 34 // todo: check individual settings when sync progress !!!!!!!!!!!!!!!!! 35 37 public function replace_plugin() { 38 $responseObj = get_option('backupsavvy_premium_object', false); 39 40 if(!$responseObj) { 41 echo 'Wrong key'; 42 exit; 43 } 44 45 require_once 'BackUpSavvyUpdates.php'; 46 new backupSavvyUpdates(BACKUPSAVVY_FILE, $responseObj); 47 } 36 48 37 49 public function set_unique_settings() { … … 315 327 } 316 328 317 329 public function premium_update() { 330 331 check_ajax_referer( 'set-wpbckup_sets', 'nonce' ); 332 if( ! wp_verify_nonce( $_POST['nonce'], 'set-wpbckup_sets' ) ) 333 $this->json_exit(array('status' => 'nonce')); 334 335 $apikey = $_POST['data']; 336 337 if($_SERVER['HTTP_HOST']) 338 $domain = $_SERVER['HTTP_HOST']; 339 else if($_SERVER['SERVER_NAME']) 340 $domain = $_SERVER['HTTP_HOST']; 341 else 342 $domain = ''; 343 344 if(!$apikey) 345 $this->json_exit(array('status' => 'apikey')); 346 347 $postUrl = 'https://backupsavvy.com/wp-json/backupsavvystoreapi/serial'; 348 $args = array( 349 'timeout' => 120, // seconds 350 'redirection' => 5, 351 'httpversion' => '1.0', 352 'blocking' => true, 353 'headers' => array(), 354 'body' => array( 355 'apikey' => $apikey, 356 'plugin_key' => 'cleanD8iunjdASDFlk77465lk', 357 'domain_name' => $domain 358 ), 359 'cookies' => array(), 360 'sslverify' => false 361 ); 362 363 $response = wp_remote_post( $postUrl, $args ); 364 365 if ( is_wp_error( $response ) ) { 366 $error_message = $response->get_error_message(); 367 $this->json_exit(array('status' => $error_message)); 368 exit; 369 } else { 370 $res =(object) json_decode($response['body']); 371 } 372 373 if(isset($res->status) && $res->status != 'ok') 374 $this->json_exit(array('status' => $res->status)); 375 376 // error_log(print_r($res,1)); 377 $responseObj = json_decode(base64_decode($res->response)); 378 379 include_once 'BackUpSavvyUpdates.php'; 380 include_once 'BackupSavvyReadmeParser.php'; 381 382 update_option('backupsavvy_premium_object', $responseObj); 383 384 $this->json_exit(array('status' => 'ok')); 385 386 } 318 387 319 388 -
backupsavvy/trunk/parts/main_settings.php
r1922435 r2065940 12 12 ?> 13 13 14 15 14 <div id="backupsavvy-settings"> 16 15 <div class="overlay"><div class="popup"> … … 21 20 </div> 22 21 <div class="stop"">Stop</div> 23 </div></div> 22 </div> 23 </div> 24 24 <h2>Backupsavvy Dashboard</h2> 25 <?php // var_dump($st); ?>26 25 <ul class="tabs"> 27 26 <li class="t1 tab tab-current add-new"><a href="#add-new">Add new site</a></li> … … 30 29 <li class="t4 tab storage"><a href="#storage">Storage</a></li> 31 30 <li class="t5 tab storage"><a href="#backups">Existing backups</a></li> 31 <li class="t6 tab update"><a href="#update">Update to premium</a></li> 32 32 </ul> 33 33 <div class="t t1"> … … 46 46 <?php include_once 'existing-backups.php'; ?> 47 47 </div> 48 <div class="t6 t premium"> 49 <?php include_once 'premium.php'; ?> 50 </div> 48 51 </div> -
backupsavvy/trunk/parts/settings_page.php
r1922435 r2065940 10 10 $dir_name = $exclude_d = $exclude_f = $site_unique_id = ''; 11 11 12 if ( $st ) {12 if ( $st && isset($st['host']) ) { 13 13 $connected = '<span class="yes">Connetcted</span> to: ' . $st['host']; 14 14 $dir_name = '<b>Remote direcory: ' . $st['dir'] . '</b>';
Note: See TracChangeset
for help on using the changeset viewer.