ajax
5 years ago
config
5 years ago
cron
5 years ago
css
5 years ago
fonts
5 years ago
img
5 years ago
include
5 years ago
js
5 years ago
templates
5 years ago
backups.php
5 years ago
boot.php
5 years ago
cloud.php
5 years ago
dashboardWidget.php
5 years ago
pagesContent.php
5 years ago
proFeatures.php
5 years ago
restore_wordpress.php
5 years ago
schedule.php
5 years ago
security.php
5 years ago
services.php
5 years ago
settings.php
5 years ago
support.php
5 years ago
systemInfo.php
5 years ago
cloud.php
150 lines
| 1 | <?php |
| 2 | $dropbox = SGConfig::get('SG_DROPBOX_ACCESS_TOKEN'); |
| 3 | $gdrive = SGConfig::get('SG_GOOGLE_DRIVE_REFRESH_TOKEN'); |
| 4 | $ftp = SGConfig::get('SG_STORAGE_FTP_CONNECTED'); |
| 5 | $amazon = SGConfig::get('SG_STORAGE_AMAZON_CONNECTED'); |
| 6 | $oneDrive = SGConfig::get('SG_ONE_DRIVE_REFRESH_TOKEN'); |
| 7 | |
| 8 | $ftpUsername = SGConfig::get('SG_FTP_CONNECTION_STRING'); |
| 9 | $gdriveUsername = SGConfig::get('SG_GOOGLE_DRIVE_CONNECTION_STRING'); |
| 10 | $dropboxUsername = SGConfig::get('SG_DROPBOX_CONNECTION_STRING'); |
| 11 | $amazonInfo = SGConfig::get('SG_AMAZON_BUCKET'); |
| 12 | |
| 13 | $oneDriveInfo = SGConfig::get('SG_ONE_DRIVE_CONNECTION_STRING'); |
| 14 | $contentClassName = getBackupPageContentClassName('cloud'); |
| 15 | ?> |
| 16 | <div id="sg-backup-page-content-cloud" class="sg-backup-page-content <?php echo $contentClassName; ?>"> |
| 17 | <div class="row sg-cloud-container"> |
| 18 | <div class="col-md-12"> |
| 19 | <form class="form-horizontal"> |
| 20 | <fieldset> |
| 21 | <div><h1 class="sg-backup-page-title"><?php _backupGuardT('Cloud settings')?></h1></div> |
| 22 | <?php if (SGBoot::isFeatureAvailable('SUBDIRECTORIES')): ?> |
| 23 | <div class="form-group form-inline"> |
| 24 | <label class="col-md-3 sg-control-label"> |
| 25 | <?php _backupGuardT('Destination folder')?> |
| 26 | </label> |
| 27 | <div class="col-md-3"> |
| 28 | <input id="cloudFolder" name="cloudFolder" type="text" class="form-control input-md sg-backup-input" value="<?php echo esc_html(SGConfig::get('SG_STORAGE_BACKUPS_FOLDER_NAME'))?>"> |
| 29 | <button type="button" id="sg-save-cloud-folder" class="btn btn-success pull-right"><?php _backupGuardT('Save');?></button> |
| 30 | </div> |
| 31 | </div> |
| 32 | <?php endif; ?> |
| 33 | <!-- Dropbox --> |
| 34 | <?php if (SGBoot::isFeatureAvailable('DROPBOX')): ?> |
| 35 | <div class="form-group"> |
| 36 | <label class="col-md-3 sg-control-label"> |
| 37 | <div class="sg-cloud-icon-wrapper"> |
| 38 | <span class="sg-cloud-icon sg-cloud-dropbox"></span> |
| 39 | </div> |
| 40 | <div class="sg-cloud-label-wrapper"> |
| 41 | <span><?php echo 'Dropbox' ?></span> |
| 42 | <?php if(!empty($dropboxUsername)): ?> |
| 43 | <br/> |
| 44 | <span class="text-muted sg-dropbox-user sg-helper-block"><?php echo $dropboxUsername;?></span> |
| 45 | <?php endif;?> |
| 46 | </div> |
| 47 | </label> |
| 48 | <div class="col-md-3"> |
| 49 | <label class="sg-switch-container"> |
| 50 | <input data-on-text="<?php _backupGuardT('ON')?>" data-off-text="<?php _backupGuardT('OFF')?>" data-storage="DROPBOX" data-remote="cloudDropbox" type="checkbox" class="sg-switch" <?php echo !empty($dropbox)?'checked="checked"':''?>> |
| 51 | </label> |
| 52 | </div> |
| 53 | </div> |
| 54 | <?php endif; ?> |
| 55 | <!-- Google Drive --> |
| 56 | <?php if (SGBoot::isFeatureAvailable('GOOGLE_DRIVE')): ?> |
| 57 | <div class="form-group"> |
| 58 | <label class="col-md-3 sg-control-label"> |
| 59 | <div class="sg-cloud-icon-wrapper"> |
| 60 | <span class="sg-cloud-icon sg-cloud-google-drive"></span> |
| 61 | </div> |
| 62 | <div class="sg-cloud-label-wrapper"> |
| 63 | <?php echo 'Google Drive' ?> |
| 64 | <?php if(!empty($gdriveUsername)): ?> |
| 65 | <br/> |
| 66 | <span class="text-muted sg-gdrive-user sg-helper-block"><?php echo $gdriveUsername;?></span> |
| 67 | <?php endif;?> |
| 68 | </div> |
| 69 | </label> |
| 70 | <div class="col-md-3"> |
| 71 | <label class="sg-switch-container"> |
| 72 | <input data-on-text="<?php _backupGuardT('ON')?>" data-off-text="<?php _backupGuardT('OFF')?>" data-storage="GOOGLE_DRIVE" data-remote="cloudGdrive" type="checkbox" class="sg-switch" <?php echo !empty($gdrive)?'checked="checked"':''?>> |
| 73 | </label> |
| 74 | </div> |
| 75 | </div> |
| 76 | <?php endif; ?> |
| 77 | <!-- FTP --> |
| 78 | <?php if (SGBoot::isFeatureAvailable('FTP')): ?> |
| 79 | <div class="form-group"> |
| 80 | <label class="col-md-3 sg-control-label sg-user-info"> |
| 81 | <div class="sg-cloud-icon-wrapper"> |
| 82 | <span class="sg-cloud-icon sg-cloud-ftp"></span> |
| 83 | </div> |
| 84 | <div class="sg-cloud-label-wrapper"> |
| 85 | <?php echo 'FTP / SFTP' ?> |
| 86 | <?php if(!empty($ftpUsername)): ?> |
| 87 | <br/> |
| 88 | <span class="text-muted sg-ftp-user sg-helper-block"><?php echo $ftpUsername;?></span> |
| 89 | <?php endif;?> |
| 90 | </div> |
| 91 | </label> |
| 92 | <div class="col-md-3"> |
| 93 | <label class="sg-switch-container"> |
| 94 | <input type="checkbox" data-on-text="<?php _backupGuardT('ON')?>" data-off-text="<?php _backupGuardT('OFF')?>" data-storage="FTP" data-remote="cloudFtp" class="sg-switch" <?php echo !empty($ftp)?'checked="checked"':''?>> |
| 95 | <a id="ftp-settings" href="javascript:void(0)" class="hide" data-toggle="modal" data-modal-name="ftp-settings" data-remote="modalFtpSettings"><?php echo 'FTP '._backupGuardT('Settings', true) ?></a> |
| 96 | </label> |
| 97 | </div> |
| 98 | </div> |
| 99 | <?php endif; ?> |
| 100 | <!-- Amazon S3 --> |
| 101 | <?php if (SGBoot::isFeatureAvailable('AMAZON')): ?> |
| 102 | <div class="form-group"> |
| 103 | <label class="col-md-3 sg-control-label"> |
| 104 | <div class="sg-cloud-icon-wrapper"> |
| 105 | <span class="sg-cloud-icon sg-cloud-amazon"></span> |
| 106 | </div> |
| 107 | <div class="sg-cloud-label-wrapper"> |
| 108 | <?php echo (backupGuardIsAccountGold()? 'Amazon ':'').'S3'?> |
| 109 | <?php if (!empty($amazonInfo)):?> |
| 110 | <br/> |
| 111 | <span class="text-muted sg-amazonr-user sg-helper-block"><?php echo $amazonInfo;?></span> |
| 112 | <?php endif;?> |
| 113 | </div> |
| 114 | </label> |
| 115 | <div class="col-md-3"> |
| 116 | <label class="sg-switch-container"> |
| 117 | <input type="checkbox" data-on-text="<?php _backupGuardT('ON')?>" data-off-text="<?php _backupGuardT('OFF')?>" data-storage="AMAZON" data-remote="cloudAmazon" class="sg-switch" <?php echo !empty($amazon)?'checked="checked"':''?>> |
| 118 | <a id="amazon-settings" href="javascript:void(0)" class="hide" data-toggle="modal" data-modal-name="amazon-settings" data-remote="modalAmazonSettings"><?php echo 'Amazon'._backupGuardT('Settings', true)?></a> |
| 119 | </label> |
| 120 | </div> |
| 121 | </div> |
| 122 | <?php endif; ?> |
| 123 | <!-- One Drive --> |
| 124 | <?php if (SGBoot::isFeatureAvailable('ONE_DRIVE')): ?> |
| 125 | <div class="form-group"> |
| 126 | <label class="col-md-3 sg-control-label"> |
| 127 | <div class="sg-cloud-icon-wrapper"> |
| 128 | <span class="sg-cloud-icon sg-cloud-one-drive"></span> |
| 129 | </div> |
| 130 | <div class="sg-cloud-label-wrapper"> |
| 131 | <?php echo 'One Drive' ?> |
| 132 | <?php if(!empty($oneDriveInfo)): ?> |
| 133 | <br/> |
| 134 | <span class="text-muted sg-gdrive-user sg-helper-block"><?php echo $oneDriveInfo;?></span> |
| 135 | <?php endif;?> |
| 136 | </div> |
| 137 | </label> |
| 138 | <div class="col-md-3"> |
| 139 | <label class="sg-switch-container"> |
| 140 | <input data-on-text="<?php _backupGuardT('ON')?>" data-off-text="<?php _backupGuardT('OFF')?>" data-storage="ONE_DRIVE" data-remote="cloudOneDrive" type="checkbox" class="sg-switch" <?php echo !empty($oneDrive)?'checked="checked"':''?>> |
| 141 | </label> |
| 142 | </div> |
| 143 | </div> |
| 144 | <?php endif; ?> |
| 145 | </fieldset> |
| 146 | </form> |
| 147 | </div> |
| 148 | </div> |
| 149 | </div> |
| 150 |