| 1 |
<?php |
| 2 |
/** |
| 3 |
* Destination file. |
| 4 |
* |
| 5 |
* @package wpdbbkp |
| 6 |
*/ |
| 7 |
|
| 8 |
$wpdbbkp_sftp_enabled = get_option( 'wp_db_backup_destination_SFTP',false); |
| 9 |
$wpdbbkp_sftp_details = get_option( 'wp_db_backup_sftp_details',null ); |
| 10 |
$wpdbbkp_sftp_status = '<label><b>Status</b>: Not Configured </label> '; |
| 11 |
|
| 12 |
if($wpdbbkp_sftp_enabled==1 && !empty($wpdbbkp_sftp_details) && isset($wpdbbkp_sftp_details['host']) && isset($wpdbbkp_sftp_details['username']) && (isset($wpdbbkp_sftp_details['password']) ||(isset($wpdbbkp_sftp_details['sftp_key']) && isset($wpdbbkp_sftp_details['key_password'])))) |
| 13 |
{ |
| 14 |
$wpdbbkp_sftp_status='<label><b>Status</b>: <span class="dashicons dashicons-yes-alt" style="color:green;font-size:16px" title="Destination enabled"></span><span class="configured">Configured </span> </label> '; |
| 15 |
} |
| 16 |
|
| 17 |
?> |
| 18 |
<div class="panel panel-default"> |
| 19 |
<div class="panel-heading"> |
| 20 |
<h4 class="panel-title"> |
| 21 |
<a data-toggle="collapse" data-parent="#accordion" href="#collapsesftp"> |
| 22 |
<h2><?php echo esc_html__('SSH/sFTP', 'wpdbbkp') ?> <?php echo $wpdbbkp_sftp_status;?> <span class="dashicons dashicons-admin-generic"></span></h2> |
| 23 |
</a> |
| 24 |
</h4> |
| 25 |
</div> |
| 26 |
<div id="collapsesftp" class="panel-collapse collapse"> |
| 27 |
<div class="panel-body"> |
| 28 |
<p><?php echo esc_html__('SSH/sFTP Destination Define an sFTP destination connection. You can define destination which use sFTP.', 'wpdbbkp') ?></p> |
| 29 |
<?php |
| 30 |
/** |
| 31 |
* Destination form. |
| 32 |
* |
| 33 |
* @package wpdbbkp |
| 34 |
*/ |
| 35 |
|
| 36 |
require plugin_dir_path( __FILE__ ) . 'sftp-form.php'; // Include file. |
| 37 |
?> |
| 38 |
</div> |
| 39 |
</div> |
| 40 |
</div> |
| 41 |
|