| 1 |
<?php |
| 2 |
/** |
| 3 |
* Show header notification in dashboard |
| 4 |
* |
| 5 |
* @package wpdbbkp |
| 6 |
*/ |
| 7 |
|
| 8 |
if ( ! defined( 'ABSPATH' ) ) { |
| 9 |
exit; |
| 10 |
} // Exit if accessed directly |
| 11 |
|
| 12 |
if ( true === isset( $_GET['notification'] ) ) { ?> |
| 13 |
<div class="row wpdbbkp_notification_row"> |
| 14 |
<div class="col-xs-12 col-sm-12 col-md-12"> |
| 15 |
<div class="alert alert-success alert-dismissible fade in" role="alert"> |
| 16 |
<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button> |
| 17 |
<div class="wpdbbkp_notification"> <?php |
| 18 |
if ( true === isset( $_GET['_wpnonce'] ) && wp_verify_nonce( sanitize_text_field( wp_unslash( $_GET['_wpnonce'] ) ), 'wp-database-backup' ) ) { |
| 19 |
if ( 'create' === $_GET['notification'] ) { |
| 20 |
$backup_list = get_option( 'wp_db_backup_backups' ); |
| 21 |
$download_backup = end( $backup_list ); |
| 22 |
$backup_link = '<a href="' . esc_url( $download_backup['url'] ) . '" style="color: #21759B;">' . __( 'Click Here to Download Backup.', 'wpdbbkp' ) . '</a>'; |
| 23 |
esc_attr_e( 'Database Backup Created Successfully. ', 'wpdbbkp' ); |
| 24 |
echo wp_kses_post( $backup_link ); |
| 25 |
} elseif ( 'restore' === $_GET['notification'] ) { |
| 26 |
esc_attr_e( 'Database Backup Restore Successfully', 'wpdbbkp' ); |
| 27 |
} elseif ( 'delete' === $_GET['notification'] ) { |
| 28 |
esc_attr_e( 'Database Backup deleted Successfully', 'wpdbbkp' ); |
| 29 |
} elseif ( 'clear_temp_db_backup_file' === $_GET['notification'] ) { |
| 30 |
esc_attr_e( 'Clear all old/temp database backup files Successfully', 'wpdbbkp' ); |
| 31 |
} elseif ( 'Invalid' === $_GET['notification'] ) { |
| 32 |
esc_attr_e( 'Invalid Access!!!!', 'wpdbbkp' ); |
| 33 |
} elseif ( 'deleteauth' === $_GET['notification'] ) { |
| 34 |
esc_attr_e( 'Dropbox account unlink Successfully', 'wpdbbkp' ); |
| 35 |
} elseif ( 'save' === $_GET['notification'] ) { |
| 36 |
esc_attr_e( 'Backup Setting Saved Successfully', 'wpdbbkp' ); |
| 37 |
} |
| 38 |
} |
| 39 |
?> |
| 40 |
</div> |
| 41 |
</div> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
<?php } ?> |
| 45 |
|
| 46 |
|
| 47 |
<div class="row"> |
| 48 |
<div class="col-xs-8 col-sm-8 col-md-8"> |
| 49 |
<img id="backup_process" style="display:none" width="50" height="50" src="<?php echo esc_url( WPDB_PLUGIN_URL ); ?>/assets/images/icon_loading.gif"> |
| 50 |
</div> |
| 51 |
<div class="col-xs-4 col-sm-4 col-md-4 text-right"> |
| 52 |
|
| 53 |
</div> |
| 54 |
</div> |
| 55 |
|