/var/www/(Del)hsihk.com/wp-content/plugins/backupbuddy/controllers/pages/rollback/_step0.php


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
// Incoming vars: $backupFile, $step
if ( ! current_user_canpb_backupbuddy::$options['role_access'] ) ) {
    die( 
'Error #473623. Access Denied.' );
}


require_once( 
pb_backupbuddy::plugin_path() . '/classes/restore.php' );
$rollback = new backupbuddy_restore'rollback' );
$status $rollback->startbackupbuddy_core::getBackupDirectory() . $backupFile );
if ( 
false === $status ) {
    
$errors $rollback->getErrors();
    if ( 
count$errors ) > ) {
        
pb_backupbuddy::alert'Errors were encountered: ' implode', '$errors ) . ' If seeking support please click to Show Advanced Details above and provide a copy of the log.' );
    }
    return;
}
$restoreData $rollback->getState();
?>


<?php _e"This will roll back this site's database to the state contained within the selected backup file. Verify details below to make sure this is the correct database to roll back to. Current database tables will be a given a temporary prefix.  You will be given the opportunity to confirm changes before making them permanent. <b>Tip!</b> Create a Database or Full Backup before proceeding."'it-l10n-backupbuddy' ); ?>
<br><br>


<?php
if ( isset( $restoreData['dat']['wordpress_version'] ) ) {
    
$wp_version $restoreData['dat']['wordpress_version'];
} else {
    
$wp_version 'Unknown';
}


// Backup type.
$pretty_type = array(
    
'full'    =>    'Full',
    
'db'    =>    'Database',
    
'files' =>    'Files',
);


$backupInfo = array(
    array( 
'Backup Type'pb_backupbuddy::$format->prettify$restoreData['dat']['backup_type'], $pretty_type ) ),
    array( 
'Backup Date'pb_backupbuddy::$format->datepb_backupbuddy::$format->localize_time$restoreData['dat']['backup_time'] ) ) . ' <span class="description">(' pb_backupbuddy::$format->time_ago$restoreData['dat']['backup_time'] ) . ' ago)</span>' ),
    array( 
'Site URL'$restoreData['dat']['siteurl'] ),
    array( 
'Blog Name'$restoreData['dat']['blogname'] ),
    array( 
'Blog Description'$restoreData['dat']['blogdescription'] ),
    array( 
'BackupBuddy Version'$restoreData['dat']['backupbuddy_version'] ),
    array( 
'WordPress Version'$wp_version ),
    array( 
'Database Prefix'$restoreData['dat']['db_prefix'] ),
    array( 
'Active Plugins'$restoreData['dat']['active_plugins'] ),
);
if ( isset( 
$restoreData['dat']['posts'] ) ) {
    
$backupInfo[] = array(
        
'Total Posts / Pages / Comments / Users'
        
$restoreData['dat']['posts'] . ' / ' .
        
$restoreData['dat']['pages'] . ' / ' .
        
$restoreData['dat']['comments'] . ' / ' .
        
$restoreData['dat']['users']
    );
}
pb_backupbuddy::$ui->list_table(
    
$backupInfo,
    array(
        
'columns'        =>    array( __'Backup Information''it-l10n-backupbuddy' ), 'Value' ),
        
'css'            =>    'width: 100%; min-width: 200px;',
        )
);
?>


<br><br>
<form id="pb_backupbuddy_rollback_form" method="post" action="?action=pb_backupbuddy_backupbuddy&function=rollback&step=1&archive=<?php echo basename$restoreData['archive'] ); ?>">
    <?php pb_backupbuddy::nonce(); ?>
    <input type="hidden" name="restoreData" value="<?php echo base64_encodeserialize$restoreData ) ); ?>">
    <input type="submit" name="submitForm" class="button button-primary" value="<?php echo __('Begin Rollback') . ' &raquo;'?>">
    
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
    <a class="button button-secondary" onclick="jQuery('#pb_backupbuddy_advanced').toggle();">Advanced Options</a>
    <span id="pb_backupbuddy_advanced" style="display: none; margin-left: 15px;">
        <label><input type="checkbox" name="autoAdvance" value="1" checked="checked"> Auto Advance</label>&nbsp;&nbsp;&nbsp;
        <label><input type="checkbox" name="forceMysqlCompatibility" value="1" checked="checked"> Force Mysql Compatibility,</label>
        <label>with chunk time limit: <input size="5" maxlength="5" type="text" name="maxExecutionTime" value="<?php echo backupbuddy_core::detectMaxExecutionTime(); ?>"> sec</label>
    </span>
    
</form>