/var/www/(Del)hsihk.com/wp-content/plugins/backupbuddy/destinations/site/_pushpull_foot.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
<?php
// Incoming vars:
// $deployDirection        push or pull
?>
<table class="widefat">
    <thead>
        <tr class="thead">
            <th>&nbsp;</th><th><?php echo $headFoot[0]; ?></th><th><span class="dashicons dashicons-arrow-right-alt"></span></th><th><?php echo $headFoot[1]; ?></th>
        </tr>
    </thead>
    <tfoot>
        <tr class="thead">
            <th>&nbsp;</th><th><?php echo $headFoot[0]; ?></th><th><span class="dashicons dashicons-arrow-right-alt"></span></th><th><?php echo $headFoot[1]; ?></th>
        </tr>
    </tfoot>
    <tbody>
        <?php
        $i 
0;
        foreach( 
$pushRows as $pushTitle => $pushRow ) { ?>
            <tr class="entry-row alternate">
                <td class="tdhead"><?php echo $pushTitle?></td>
                <td><?php echo $pushRow[0]; ?></td>
                <td>&nbsp;</td>
                <td><?php echo $pushRow[1]?></td>
            </tr>
        <?php }
        
?>
    </tbody>
</table>


<?php
if ( is_network_admin() ) {
    
$backup_url network_admin_url'admin.php' );
} else {
    
$backup_url admin_url'admin.php' );
}
$backup_url .= '?page=pb_backupbuddy_backup';
?>
<br>

<!-- <form id="pb_backupbuddy_deploy_form" method="post" action="<?php echo pb_backupbuddy::ajax_url'deploy' ); ?>?action=pb_backupbuddy_backupbuddy&function=deploy&step=run"> -->
<form target="_top" id="pb_backupbuddy_deploy_form" method="post" action="<?php echo $backup_url?>&backupbuddy_backup=deploy&direction=<?php echo $deployDirection?>">
    <input type="hidden" name="destination_id" value="<?php echo $destination_id?>">
    <h3>Database Find & Replace</h3>
    The site URL (www and domain) and paths will be updated. Serialized data will be accounted for.<br>
    <input type="text" value="<?php echo $localInfo['siteurl']; ?>" disabled> &rarr; <input type="text" value="<?php echo $deployData['remoteInfo']['siteurl']; ?>" disabled><br>
    <input type="text" value="<?php echo $localInfo['abspath']; ?>" disabled> &rarr; <input type="text" value="<?php echo $deployData['remoteInfo']['abspath']; ?>" disabled><br>
    <!-- <input type="text"> -&gt; <input type="text"> - +<br> -->
    <br>

    <style>
        .database_contents_select {
            padding: 5px;
            line-height: 1.7em;
            max-height: 100px;
            overflow: scroll;
            border: 1px solid #ddd;
            background: #f9f9f9;
            max-width: 400px;
        }
        .database_contents_select::-webkit-scrollbar {
            -webkit-appearance: none;
            width: 11px;
            height: 11px;
        }
        .database_contents_select::-webkit-scrollbar-thumb {
            border-radius: 8px;
            border: 2px solid white; /* should match background, can't be transparent */
            background-color: rgba(0, 0, 0, .1);
        }
        .database_contents_shortcuts {
            color: #ADADAD;
            margin-bottom: 3px;
        }
        .database_contents_shortcuts a {
            text-decoration: none;
            cursor: pointer;
        }
    </style>
    
    <script>
        jQuery(document).ready(function() {
            
            jQuery( '.database_contents_shortcuts-all' ).click( function(e){
                e.preventDefault();
                jQuery( '.database_contents_select' ).find( 'input' ).prop( 'checked', true );
            });
            
            jQuery( '.database_contents_shortcuts-none' ).click( function(e){
                e.preventDefault();
                jQuery( '.database_contents_select' ).find( 'input' ).prop( 'checked', false );
            });
            
            jQuery( '.database_contents_shortcuts-prefix' ).click( function(e){
                e.preventDefault();
                
                if ( 'push' == jQuery('#backupbuddy_deploy_direction').attr( 'data-direction' ) ) {
                    prefix = jQuery( '#backupbuddy_deploy_prefixA' ).attr( 'data-prefix' );
                } else {
                    prefix = jQuery( '#backupbuddy_deploy_prefixB' ).attr( 'data-prefix' );
                }
                
                jQuery( '.database_contents_select' ).find( 'input' ).each( function(index){
                    if ( jQuery(this).val().indexOf( prefix ) == 0 ) {
                        jQuery(this).prop( 'checked', true );
                    } else {
                        jQuery(this).prop( 'checked', false );
                    }
                });
            });
            
        });
    </script>

    <h3>Database Contents</h3>
    <input type="hidden" name="backup_profile" value="1">
    <div class="database_contents_shortcuts">
        <a class="database_contents_shortcuts-all" title="Select all database tables.">Select All</a> | <a class="database_contents_shortcuts-none" title="Unselect all database tables.">Unselect All</a> | <a class="database_contents_shortcuts-prefix" title="Select database tables matching the WordPress table prefix of the source site.">WordPress Table Prefix</a>
    </div>
    <div class="database_contents_select">
        <?php
        
if ( 'pull' == $deployDirection ) {
            
$tables $deployData['remoteInfo']['tables'];
        } else { 
// push
            
$tables $localInfo['tables'];
        }
        foreach( 
$tables as $table ) {
            echo 
'<label><input type="checkbox" name="tables[]" value="' $table '"> ' $table '</label><br>';
        }
        
?>
    </div>
    <br>
    
    <h3>Plugins</h3>
    <label><input type="checkbox" name="sendPlugins" value="true"> Update destination plugins with newer or missing versions to match.</label>
    <br><br>
    
    <h3>Active Theme</h3>
    <?php
    
if ( $deployData['remoteInfo']['activeTheme'] == $localInfo['activeTheme'] ) {
        echo 
'<label><input type="checkbox" name="sendTheme" value="true"> Update destination active theme files with newer or missing files to match.</label>';
    } else {
        echo 
'<span class="description">' __'Active theme differs so theme deployment is disabled.''it-l10n-backupbuddy' ) . '</span>';
    }
    
?>
    <br><br>
    
    <h3>Media / Attachments</h3>
    <label><input type="checkbox" name="sendMedia" value="true"> Update destination media files with newer or missing files to match.</label>
    <br><br>
    
    <br>
    <?php pb_backupbuddy::nonce(); ?>
    <input type="hidden" name="destination" value="<?php echo $destination_id?>">
    <input type="hidden" name="deployData" value="<?php echo base64_encodeserialize$deployData ) ); ?>">
    <input type="submit" name="submitForm" class="button button-primary" value="<?php
    
if ( 'pull' == $deployDirection ) {
        
_e('Begin Pull');
    } elseif( 
'push' == $deployDirection ) {
        
_e('Begin Push');
    } else {
        echo 
'{Err3849374:UnknownDirection}';
    }
    
?> &raquo;">
    
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    
    <a class="button button-secondary" onclick="jQuery('.pb_backupbuddy_advanced').toggle();">Advanced Options</a>
    <span class="pb_backupbuddy_advanced" style="display: none; margin-left: 15px;">
        <label>Source chunk time limit: <input size="5" maxlength="5" type="text" name="sourceMaxExecutionTime" value="<?php echo $localInfo['php']['max_execution_time']; ?>"> sec</label>
        &nbsp;&nbsp;&nbsp;
        <label>Destination chunk time limit: <input size="5" maxlength="5" type="text" name="destinationMaxExecutionTime" value="<?php echo $deployData['remoteInfo']['php']['max_execution_time']; ?>"> sec</label>
    </span>
    
</form>