ajax
3 years ago
config
4 years ago
cron
6 years ago
css
3 years ago
fonts
5 years ago
img
3 years ago
include
3 years ago
js
3 years ago
templates
3 years ago
backups.php
3 years ago
boot.php
3 years ago
cloud.php
3 years ago
dashboardWidget.php
3 years ago
pagesContent.php
3 years ago
proFeatures.php
3 years ago
restore_wordpress.php
3 years ago
schedule.php
3 years ago
security.php
3 years ago
services.php
3 years ago
settings.php
3 years ago
support.php
3 years ago
systemInfo.php
3 years ago
videoTutorials.php
3 years ago
schedule.php
90 lines
| 1 | <?php |
| 2 | |
| 3 | require_once(SG_BACKUP_PATH . 'SGBackupSchedule.php'); |
| 4 | $allSchedules = SGBackupSchedule::getAllSchedules(); |
| 5 | $contentClassName = esc_attr(getBackupPageContentClassName('schedule')); |
| 6 | ?> |
| 7 | <div id="sg-backup-page-content-schedule" class="sg-backup-page-content <?php echo $contentClassName; ?>"> |
| 8 | <div class="sg-schedule-container"> |
| 9 | <fieldset> |
| 10 | <div><h1 class="sg-backup-page-title"><?php _backupGuardT('Schedules') ?></h1></div> |
| 11 | <button class="pull-left btn btn-success sg-backup-action-buttons" data-toggle="modal" |
| 12 | data-modal-name="create-schedule" data-remote="modalCreateSchedule"> |
| 13 | <span class="sg-backup-cross sg-backup-buttons-content"></span> |
| 14 | <span class="sg-backup-buttons-text sg-backup-buttons-content"><?php _backupGuardT('Create schedule') ?></span> |
| 15 | </button> |
| 16 | <div class="clearfix"></div> |
| 17 | <br/> |
| 18 | <table class="table table-striped sg-schedule paginated sg-backup-table"> |
| 19 | <thead> |
| 20 | <tr> |
| 21 | <th><?php _backupGuardT('Label') ?></th> |
| 22 | <th><?php _backupGuardT('Recurrence') ?></th> |
| 23 | <th><?php _backupGuardT('Execution date') ?></th> |
| 24 | <th><?php _backupGuardT('Backup options') ?></th> |
| 25 | <th><?php _backupGuardT('Upload to') ?></th> |
| 26 | <th><?php _backupGuardT('Status') ?></th> |
| 27 | <th><?php _backupGuardT('Actions') ?></th> |
| 28 | </tr> |
| 29 | </thead> |
| 30 | <tbody> |
| 31 | <?php if (empty($allSchedules)) : ?> |
| 32 | <tr> |
| 33 | <td colspan="7"><?php _backupGuardT('No schedules found.') ?></td> |
| 34 | </tr> |
| 35 | <?php endif; ?> |
| 36 | <?php foreach ($allSchedules as $schedule) : |
| 37 | $backupOptions = backupGuardParseBackupOptions($schedule); |
| 38 | ?> |
| 39 | <tr> |
| 40 | <td><?php echo esc_html($schedule['label']) ?></td> |
| 41 | <td><?php echo esc_html($schedule['recurrence']) ?></td> |
| 42 | <td><?php echo backupGuardConvertDateTimezone(@date('Y-m-d H:i:s', (int)$schedule['executionDate']), true) ?></td> |
| 43 | <td> |
| 44 | <?php |
| 45 | $showOptions = array(); |
| 46 | if (!$backupOptions['isCustomBackup']) { |
| 47 | $showOptions[] = 'Full'; |
| 48 | } else { |
| 49 | if ($backupOptions['isDatabaseSelected']) { |
| 50 | $showOptions[] = 'DB'; |
| 51 | } |
| 52 | if ($backupOptions['isFilesSelected']) { |
| 53 | $selectedDirectories = str_replace('wp-content/', '', $backupOptions['selectedDirectories']); |
| 54 | if (in_array('wp-content', $selectedDirectories)) { |
| 55 | $showOptions[] = 'wp-content'; |
| 56 | } else { |
| 57 | $showOptions = array_merge($showOptions, $selectedDirectories); |
| 58 | } |
| 59 | } |
| 60 | } |
| 61 | echo implode(', ', $showOptions); |
| 62 | ?> |
| 63 | </td> |
| 64 | <td> |
| 65 | <?php |
| 66 | foreach ($backupOptions['selectedClouds'] as $cloud) { |
| 67 | echo '<span class="btn-xs sg-status-icon sg-status-3' . $cloud . '"> </span> '; |
| 68 | } |
| 69 | ?> |
| 70 | </td> |
| 71 | <td><?php echo (int)$schedule['status'] == SG_SHCEDULE_STATUS_PENDING ? '<span class="sg-schedule-pending">' . _backupGuardT('Pending', true) . '</span>' : '<span class="sg-schedule-inactive">' . _backupGuardT('Inactive', true) . '</span>' ?></td> |
| 72 | <td> |
| 73 | <a data-toggle="modal" data-modal-name="create-schedule" data-remote="modalCreateSchedule" |
| 74 | data-sgbp-params="<?php echo $schedule['id'] ?>" |
| 75 | class="btn-xs sg-schedule-icon sg-schedule-edit" title="<?php _backupGuardT('Edit') ?>"> </a> |
| 76 | <a onclick="sgBackup.removeSchedule(<?php echo $schedule['id'] ?>)" |
| 77 | class="btn-xs sg-schedule-icon sg-schedule-delete" |
| 78 | title="<?php _backupGuardT('Delete') ?>">  </a> |
| 79 | </td> |
| 80 | </tr> |
| 81 | <?php endforeach; ?> |
| 82 | </tbody> |
| 83 | </table> |
| 84 | <div class="text-right sg-schedule"> |
| 85 | <ul class="pagination"></ul> |
| 86 | </div> |
| 87 | </fieldset> |
| 88 | </div> |
| 89 | </div> |
| 90 |