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
backups.php
201 lines
| 1 | <?php |
| 2 | $backups = SGBackup::getAllBackups(); |
| 3 | $downloadUrl = admin_url('admin-post.php?action=backup_guard_downloadBackup&'); |
| 4 | $contentClassName = getBackupPageContentClassName('backups'); |
| 5 | ?> |
| 6 | <div id="sg-backup-page-content-backups" class="sg-backup-page-content <?php echo $contentClassName; ?>"> |
| 7 | <?php if(SGConfig::get('SG_REVIEW_POPUP_STATE') == SG_SHOW_REVIEW_POPUP): ?> |
| 8 | <!-- Review Box --> |
| 9 | <script type="text/javascript">sgShowReview = 1;</script> |
| 10 | <?php endif; ?> |
| 11 | <?php if(!SGConfig::get('SG_HIDE_VERIFICATION_POPUP_STATE') && ($pluginCapabilities == BACKUP_GUARD_CAPABILITIES_FREE)): ?> |
| 12 | <div id="bg-verify-user-info-container" class="bg-verify-user-info-container"> |
| 13 | <div class="bg-verify-user-info-overlay"></div> |
| 14 | <div class="bg-verify-user-info-popup-tbl"> |
| 15 | <div class="bg-verify-user-info-popup-cel"> |
| 16 | <div class="bg-verify-user-info-popup-content"> |
| 17 | <a href="javascript:void(0)" class="bg-verify-user-info-cancel"><img src="<?php echo SG_IMAGE_URL.'close.png' ?>" class="wp_fm_loader" /></a> |
| 18 | <div class="bg-verify-user-info-popup-inner-content"> |
| 19 | <h3><?php _backupGuardT('Let us be more helpful!'); ?></h3> |
| 20 | <p class="bg-verify-user-info-desc"> |
| 21 | <?php _backupGuardT('Tell us about your primary needs and be aware of our news and updates.'); ?> |
| 22 | </p> |
| 23 | <form> |
| 24 | <div class="bg-verify-user-info-form-group"> |
| 25 | <div class="bg-verify-user-info-form-twocol"> |
| 26 | <input name="bg-verify-user-info-name" id="bg-verify-user-info-name" class="regular-text" type="text" value="" placeholder="First Name" /> |
| 27 | <span id="bg-verify-user-info-name-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter First Name.'); ?></span> |
| 28 | </div> |
| 29 | <div class="bg-verify-user-info-form-twocol"> |
| 30 | <input name="bg-verify-user-info-last-name" id="bg-verify-user-info-last-name" class="regular-text" type="text" value="" placeholder="Last Name" /> |
| 31 | <span id="bg-verify-user-info-last-name-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter Last Name.'); ?></span> |
| 32 | </div> |
| 33 | </div> |
| 34 | <div class="bg-verify-user-info-form-group"> |
| 35 | <div class="bg-verify-user-info-form-onecol"> |
| 36 | <input name="bg-verify-user-info-email" id="bg-verify-user-info-email" class="regular-text" type="text" value="" placeholder="Email Address" /> |
| 37 | <span id="bg-verify-user-info-email-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter Valid Email Address.'); ?></span> |
| 38 | </div> |
| 39 | </div> |
| 40 | <div class="bg-verify-user-info-form-group"> |
| 41 | <div class="bg-verify-user-info-form-onecol"> |
| 42 | <select name="bg-verify-user-prioraty" id="bg-verify-user-prioraty"> |
| 43 | <option value=""><?php _backupGuardT('Please Select Your Priority') ?></option> |
| 44 | <option value="local backup"><?php _backupGuardT('Local Backup') ?></option> |
| 45 | <option value="cloud backup"><?php _backupGuardT('Cloud Backup') ?></option> |
| 46 | <option value="scheduling"><?php _backupGuardT('Scheduling') ?></option> |
| 47 | <option value="migration"><?php _backupGuardT('Migration') ?></option> |
| 48 | <option value="other"><?php _backupGuardT('Other') ?></option> |
| 49 | </select> |
| 50 | <span id="bg-verify-user-info-priority-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Select Your Priority.'); ?></span> |
| 51 | </div> |
| 52 | </div> |
| 53 | <div class="bg-verify-user-info-form-group"> |
| 54 | <div class="bg-verify-user-info-form-onecol"> |
| 55 | <input name="bg-verify-user-priorati-custom" id="bg-verify-user-priorati-custom" class="regular-text" type="text" placeholder="<?php _backupGuardT('Please select your priority.') ?>" hidden> |
| 56 | <span id="bg-verify-user-info-priority-custom-error" class="bg-verify-user-info-error-message"><?php _backupGuardT('Please Enter Your Priority.'); ?></span> |
| 57 | </div> |
| 58 | </div> |
| 59 | <div class="bg-verify-user-info-control-buttons-container"> |
| 60 | <button class="bg-verify-user-info-verify-email button button-primary"><?php _backupGuardT("Subscribe") ?></button> |
| 61 | </div> |
| 62 | </form> |
| 63 | </div> |
| 64 | <div class="bg-privacy-links-container"> |
| 65 | <a href="<?php echo BACKUP_GUARD_TERMS_OF_SERVICE_URL ?>" target="_blank"><?php _backupGuardT('Terms of Service'); ?></a> |
| 66 | <a href="<?php echo BACKUP_GUARD_PRIVACY_POLICY_URL ?>" target="_blank"><?php _backupGuardT('Privacy Policy'); ?></a> |
| 67 | </div> |
| 68 | </div> |
| 69 | </div> |
| 70 | </div> |
| 71 | </div> |
| 72 | |
| 73 | <?php endif; ?> |
| 74 | <fieldset> |
| 75 | <div><h1 class="sg-backup-page-title"><?php _backupGuardT('Backups')?></h1></div> |
| 76 | |
| 77 | <a href="javascript:void(0)" id="sg-manual-backup" class="pull-left btn btn-success sg-backup-action-buttons" data-toggle="modal" data-modal-name="manual-backup" data-remote="modalManualBackup" sg-data-backup-type="<?php echo SG_BACKUP_METHOD_STANDARD ?>"> |
| 78 | <span class="sg-backup-start sg-backup-buttons-content"></span> |
| 79 | <span class="sg-backup-buttons-content sg-backup-buttons-text"><?php _backupGuardT('Backup')?></span> |
| 80 | </a> |
| 81 | |
| 82 | <a href="javascript:void(0)" id="sg-backup-with-migration" class="pull-left btn btn-primary sg-backup-action-buttons" data-toggle="modal" data-modal-name="manual-backup" data-remote="modalManualBackup" sg-data-backup-type="<?php echo SG_BACKUP_METHOD_MIGRATE ?>"<?php echo SGBoot::isFeatureAvailable('BACKUP_WITH_MIGRATION')?'':'disabled' ?>> |
| 83 | <span class="sg-backup-migrate sg-backup-buttons-content"></span> |
| 84 | <span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Migrate')?></span> |
| 85 | </a> |
| 86 | <a href="javascript:void(0)" id="sg-import" class="btn btn-primary sg-margin-left-12 pull-left sg-backup-action-buttons" data-toggle="modal" data-modal-name="import" data-remote="modalImport"> |
| 87 | <span class="sg-backup-import sg-backup-buttons-content"></span> |
| 88 | <span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Import')?><span> |
| 89 | </a> |
| 90 | <?php if ($pluginCapabilities == BACKUP_GUARD_CAPABILITIES_FREE): ?> |
| 91 | <a href="<?php echo BACKUP_GUARD_WORDPRESS_SUPPORT_URL; ?>" target="_blank"> |
| 92 | <button type="button" id="sg-report-problem-button" class="btn btn btn-primary sg-margin-left-12 pull-right sg-backup-action-buttons sg-button-red pull-right"> |
| 93 | <span class="sg-backup-report"></span> |
| 94 | |
| 95 | <span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Report issue')?></span> |
| 96 | </button> |
| 97 | </a> |
| 98 | <?php endif; ?> |
| 99 | <a id="sg-delete-multi-backups" class="pull-right btn btn-danger sg-margin-left-12 sg-backup-action-buttons"> |
| 100 | <span class="sg-backup-delete sg-backup-buttons-content"></span> |
| 101 | <span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Delete')?></span> |
| 102 | </a> |
| 103 | <div class="clearfix"></div><br/> |
| 104 | <table class="table table-striped paginated sg-backup-table"> |
| 105 | <thead> |
| 106 | <tr> |
| 107 | <th><input type="checkbox" id="sg-checkbox-select-all" autocomplete="off"></th> |
| 108 | <th><?php _backupGuardT('Filename')?></th> |
| 109 | <th><?php _backupGuardT('Size')?></th> |
| 110 | <th><?php _backupGuardT('Date')?></th> |
| 111 | <th><?php _backupGuardT('Status')?></th> |
| 112 | <th><?php _backupGuardT('Actions')?></th> |
| 113 | </tr> |
| 114 | </thead> |
| 115 | <tbody> |
| 116 | <?php if(empty($backups)):?> |
| 117 | <tr> |
| 118 | <td colspan="6"><?php _backupGuardT('No backups found.')?></td> |
| 119 | </tr> |
| 120 | <?php endif;?> |
| 121 | <?php foreach($backups as $backup): ?> |
| 122 | <tr> |
| 123 | <td><input type="checkbox" autocomplete="off" value="<?php echo $backup['name']?>" <?php echo $backup['active']?'disabled':''?>></td> |
| 124 | <td><?php echo $backup['name'] ?></td> |
| 125 | <td><?php echo !$backup['active']?$backup['size']:'' ?></td> |
| 126 | <td><?php echo backupGuardConvertDateTimezone($backup['date']) ?></td> |
| 127 | <td id="sg-status-tabe-data-<?php echo $backup['id']?>" <?php echo $backup['active']?'data-toggle="tooltip" data-placement="top" data-original-title="" data-container="#sg-wrapper"':''?>> |
| 128 | <?php if($backup['active']): |
| 129 | $filteredStatuses = backupGuardFilterStatusesByActionType($backup, $backup['options']); |
| 130 | ?> |
| 131 | <input type="hidden" class="sg-active-action-id" value="<?php echo $backup['id'];?>"/> |
| 132 | <?php foreach ($filteredStatuses as $statusCode): ?> |
| 133 | <span class="btn-xs sg-status-icon sg-status-<?php echo $statusCode; ?>"> </span> |
| 134 | <?php endforeach; ?> |
| 135 | <div class="sg-progress progress"> |
| 136 | <div class="progress-bar"></div> |
| 137 | </div> |
| 138 | <?php else: ?> |
| 139 | <?php if ($backup['status'] == SG_ACTION_STATUS_FINISHED_WARNINGS): ?> |
| 140 | <span class="btn-xs text-warning" data-toggle="tooltip" data-placement="top" data-original-title="<?php if($backup['type']==SG_ACTION_TYPE_BACKUP): echo _backupGuardT('Warnings found during backup',true); elseif($backup['type']==SG_ACTION_TYPE_RESTORE): echo _backupGuardT('Warnings found during restore',true); else: echo _backupGuardT('Warnings found during upload',true); endif; ?>" data-container="#sg-wrapper"><?php _backupGuardT('Warning')?></span> |
| 141 | <?php elseif ($backup['status'] == SG_ACTION_STATUS_ERROR): ?> |
| 142 | <span class="btn-xs text-danger" data-toggle="tooltip" data-placement="top" data-original-title="<?php if($backup['type']==SG_ACTION_TYPE_BACKUP): echo _backupGuardT('Errors found during backup',true); elseif($backup['type']==SG_ACTION_TYPE_RESTORE): echo _backupGuardT('Errors found during restore',true); else: echo _backupGuardT('Errors found during upload',true); |
| 143 | endif; ?>" data-container="#sg-wrapper"><?php _backupGuardT('Failed')?></span> |
| 144 | <?php else: ?> |
| 145 | <span class="btn-xs sg-text-success"><?php _backupGuardT('Success')?></span> |
| 146 | <?php endif;?> |
| 147 | <?php endif; ?> |
| 148 | </td> |
| 149 | <td class="sg-backup-actions-td"> |
| 150 | <?php if($backup['active']): ?> |
| 151 | <?php if($backup['type'] != SG_ACTION_TYPE_RESTORE): ?> |
| 152 | <a class="btn-xs sg-cancel-backup" sg-data-backup-id="<?php echo $backup['id']?>" href="javascript:void(0)" title="<?php _backupGuardT('Stop')?>"> </a> |
| 153 | <?php endif; ?> |
| 154 | <?php else: ?> |
| 155 | <a href="javascript:void(0)" data-sgbackup-name="<?php echo htmlspecialchars($backup['name']);?>" data-remote="deleteBackup" class="sg-remove-backup btn-xs" title="<?php _backupGuardT('Delete')?>"> </a> |
| 156 | <div class="btn-group"> |
| 157 | <a href="javascript:void(0)" class="sg-bg-download-button btn-xs" data-toggle="dropdown1" aria-expanded="false" title="<?php _backupGuardT('Download')?>"> |
| 158 | |
| 159 | </a> |
| 160 | <ul class="dropdown-menu"> |
| 161 | <?php if($backup['files']):?> |
| 162 | <li> |
| 163 | <a href="<?php echo $downloadUrl.'backupName='.htmlspecialchars(@$backup['name']).'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_SGBP ?>"> |
| 164 | <i class="glyphicon glyphicon-hdd" aria-hidden="true"></i> <?php _backupGuardT('Backup')?> |
| 165 | </a> |
| 166 | </li> |
| 167 | <?php endif;?> |
| 168 | <?php if($backup['backup_log']):?> |
| 169 | <li> |
| 170 | <a href="<?php echo $downloadUrl.'backupName='.htmlspecialchars(@$backup['name']).'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_BACKUP_LOG ?>"> |
| 171 | <i class="glyphicon glyphicon-list-alt" aria-hidden="true"></i> <?php _backupGuardT('Backup log')?> |
| 172 | </a> |
| 173 | </li> |
| 174 | <?php endif;?> |
| 175 | <?php if($backup['restore_log']):?> |
| 176 | <li> |
| 177 | <a href="<?php echo $downloadUrl.'backupName='.@$backup['name'].'&downloadType='.SG_BACKUP_DOWNLOAD_TYPE_RESTORE_LOG ?>"> |
| 178 | <i class="glyphicon glyphicon-th-list" aria-hidden="true"></i> <?php _backupGuardT('Restore log')?> |
| 179 | </a> |
| 180 | </li> |
| 181 | <?php endif;?> |
| 182 | </ul> |
| 183 | </div> |
| 184 | <?php if(file_exists(SG_BACKUP_DIRECTORY.$backup['name'].'/'.$backup['name'].'.sgbp')):?> |
| 185 | <a href="javascript:void(0)" title="<?php _backupGuardT('Restore')?>" class="sg-restore-button btn-xs" data-toggle="modal" data-modal-name="manual-restore" data-remote="modalManualRestore" data-sgbp-params="<?php echo htmlspecialchars($backup['name']) ?>"> |
| 186 | |
| 187 | </a> |
| 188 | <?php endif;?> |
| 189 | <?php endif; ?> |
| 190 | </td> |
| 191 | </tr> |
| 192 | <?php endforeach; ?> |
| 193 | </tbody> |
| 194 | </table> |
| 195 | |
| 196 | <div class="text-right"> |
| 197 | <ul class="pagination"></ul> |
| 198 | </div> |
| 199 | </fieldset> |
| 200 | <div class="clearfix"></div> |
| 201 | </div> |