awake.php
5 years ago
cancelBackup.php
5 years ago
cancelDownload.php
5 years ago
checkBackupCreation.php
5 years ago
checkPHPVersionCompatibility.php
5 years ago
checkRestoreCreation.php
5 years ago
cloudDropbox.php
5 years ago
curlChecker.php
5 years ago
deleteBackup.php
5 years ago
dismissDiscountNotice.php
5 years ago
downloadBackup.php
5 years ago
getAction.php
5 years ago
getBackupContent.php
5 years ago
getRunningActions.php
5 years ago
hideNotice.php
5 years ago
importBackup.php
5 years ago
isFeatureAvailable.php
5 years ago
manualBackup.php
5 years ago
modalImport.php
5 years ago
modalManualBackup.php
5 years ago
modalManualRestore.php
5 years ago
modalPrivacy.php
5 years ago
modalReview.php
5 years ago
modalTerms.php
5 years ago
resetStatus.php
5 years ago
restore.php
5 years ago
reviewBannerActions.php
5 years ago
schedule.php
5 years ago
setReviewPopupState.php
5 years ago
setUserInfoVerificationPopupState.php
5 years ago
settings.php
5 years ago
storeSubscriberInfo.php
5 years ago
storeSurveyResult.php
5 years ago
modalImport.php
99 lines
| 1 | <?php |
| 2 | require_once(dirname(__FILE__).'/../boot.php'); |
| 3 | $backupDirectory = SGConfig::get('SG_BACKUP_DIRECTORY'); |
| 4 | $maxUploadSize = ini_get('upload_max_filesize'); |
| 5 | $dropbox = SGConfig::get('SG_DROPBOX_ACCESS_TOKEN'); |
| 6 | $gdrive = SGConfig::get('SG_GOOGLE_DRIVE_REFRESH_TOKEN'); |
| 7 | $ftp = SGConfig::get('SG_STORAGE_FTP_CONNECTED'); |
| 8 | $amazon = SGConfig::get('SG_AMAZON_KEY'); |
| 9 | $oneDrive = SGConfig::get('SG_ONE_DRIVE_REFRESH_TOKEN'); |
| 10 | ?> |
| 11 | <div class="modal-dialog"> |
| 12 | <div class="modal-content"> |
| 13 | <div class="modal-header"> |
| 14 | <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
| 15 | <h4 class="modal-title"><?php _backupGuardT('Import from')?></h4> |
| 16 | </div> |
| 17 | <div class="modal-body sg-modal-body" id="sg-modal-inport-from"> |
| 18 | <div class="col-md-12" id="modal-import-1"> |
| 19 | <div class="form-group"> |
| 20 | <table class="table table-striped paginated sg-backup-table"> |
| 21 | <tbody> |
| 22 | <tr> |
| 23 | <td class="file-select-radio"><input name="storage-radio" type="radio" value="local-pc"></td> |
| 24 | <td></td> |
| 25 | <td><?php _backupGuardT('Local PC')?></td> |
| 26 | </tr> |
| 27 | <?php if (SGBoot::isFeatureAvailable('DOWNLOAD_FROM_CLOUD')): ?> |
| 28 | <tr> |
| 29 | <td class="file-select-radio"><input name="storage-radio" type="radio" value="<?php echo SG_STORAGE_FTP?>" <?php echo empty($ftp)?'disabled="disabled"':''?>></td> |
| 30 | <td><span class="btn-xs sg-status-icon sg-status-31 active"> </span></td> |
| 31 | <td><?php echo 'FTP' ?></td> |
| 32 | </tr> |
| 33 | |
| 34 | <tr> |
| 35 | <td class="file-select-radio"><input name="storage-radio" type="radio" value="<?php echo SG_STORAGE_DROPBOX?>" <?php echo empty($dropbox)?'disabled="disabled"':''?>></td> |
| 36 | <td><span class="btn-xs sg-status-icon sg-status-32 active"> </span></td> |
| 37 | <td><?php echo 'Dropbox' ?></td> |
| 38 | </tr> |
| 39 | <tr> |
| 40 | <td class="file-select-radio"><input name="storage-radio" type="radio" value="<?php echo SG_STORAGE_GOOGLE_DRIVE?>" <?php echo empty($gdrive)?'disabled="disabled"':''?>></td> |
| 41 | <td><span class="btn-xs sg-status-icon sg-status-33 active"> </span></td> |
| 42 | <td><?php echo 'Google Drive' ?></td> |
| 43 | </tr> |
| 44 | <tr> |
| 45 | <td class="file-select-radio"><input name="storage-radio" type="radio" value="<?php echo SG_STORAGE_AMAZON?>" <?php echo empty($amazon)?'disabled="disabled"':''?>></td> |
| 46 | <td><span class="btn-xs sg-status-icon sg-status-34 active"> </span></td> |
| 47 | <td><?php echo (backupGuardIsAccountGold()? 'Amazon ':'').'S3' ?></td> |
| 48 | </tr> |
| 49 | <tr> |
| 50 | <td class="file-select-radio"><input name="storage-radio" type="radio" value="<?php echo SG_STORAGE_ONE_DRIVE?>" <?php echo empty($oneDrive)?'disabled="disabled"':''?>></td> |
| 51 | <td><span class="btn-xs sg-status-icon sg-status-35 active"> </span></td> |
| 52 | <td><?php echo 'One Drive' ?></td> |
| 53 | </tr> |
| 54 | <?php endif; ?> |
| 55 | </tbody> |
| 56 | </table> |
| 57 | </div> |
| 58 | </div> |
| 59 | <div class="col-md-12" id="modal-import-2"> |
| 60 | <div class="form-group import-modal-popup-content"> |
| 61 | <div class="col-md-9"> |
| 62 | <input type="text" id="sg-import-file-name" class="form-control sg-backup-input" placeholder="<?php _backupGuardT('SGBP file')?>" readonly> |
| 63 | </div> |
| 64 | <div class="col-lg-3"> |
| 65 | <span class="input-group-btn"> |
| 66 | <span class="btn btn-primary btn-file backup-browse-btn"> |
| 67 | <?php _backupGuardT('Browse')?>… <input class="sg-backup-upload-input" type="file" name="files[]" data-url="<?php echo admin_url('admin-ajax.php')."?action=backup_guard_importBackup&token=".wp_create_nonce('backupGuardAjaxNonce') ?>" data-max-file-size="<?php echo backupGuardConvertToBytes($maxUploadSize.'B'); ?>"> |
| 68 | </span> |
| 69 | </span> |
| 70 | </div> |
| 71 | </div> |
| 72 | </div> |
| 73 | <?php if (SGBoot::isFeatureAvailable('DOWNLOAD_FROM_CLOUD')): ?> |
| 74 | <div class="col-md-12" id="modal-import-3"> |
| 75 | <table class="table table-striped paginated sg-backup-table" id="sg-archive-list-table"> |
| 76 | <thead> |
| 77 | <tr> |
| 78 | <th></th> |
| 79 | <th><?php _backupGuardT('Filename')?></th> |
| 80 | <th><?php _backupGuardT('Size')?></th> |
| 81 | <th><?php _backupGuardT('Date')?></th> |
| 82 | </tr> |
| 83 | </thead> |
| 84 | <tbody> |
| 85 | </tbody> |
| 86 | </table> |
| 87 | </div> |
| 88 | <?php endif; ?> |
| 89 | <div class="clearfix"></div> |
| 90 | </div> |
| 91 | <div class="modal-footer"> |
| 92 | <button type="button" class="pull-left btn btn-primary" id="switch-modal-import-pages-back" onclick="sgBackup.previousPage()"><?php _backupGuardT('Back')?></button> |
| 93 | <span class="modal-close-button" id="sg-close-modal-import" data-dismiss="modal"><?php _backupGuardT("Close")?></span> |
| 94 | <button type="button" class="btn btn-success" id="switch-modal-import-pages-next" data-remote="importBackup" onclick="sgBackup.nextPage()"><?php _backupGuardT('Next')?></button> |
| 95 | <button type="button" data-remote="importBackup" id="uploadSgbpFile" class="btn btn-success"><?php _backupGuardT('Import')?></button> |
| 96 | </div> |
| 97 | </div> |
| 98 | </div> |
| 99 |