Esempio n. 1
0
function pb_backupbuddy_stash_pass_form()
{
    echo 'Please enter your iThemes.com Member Password to access your full Stash listing including files stored from other sites:<br><br><br>';
    echo '<form method="post"><b>iThemes Member Password</b>: &nbsp;&nbsp;&nbsp; <input type="password" name="stash_password" size="20"> &nbsp;&nbsp;&nbsp; <input type="submit" name="submit" value="Authenticate" class="button button-primary">';
    pb_backupbuddy::nonce();
    echo '</form>';
    echo '<br><br><br><br>';
}
Esempio n. 2
0
	return false;
}
*/
if ('1' == pb_backupbuddy::_POST('regenerate_api_key')) {
    pb_backupbuddy::verify_nonce();
    // Security check.
    pb_backupbuddy::$options['api_key'] = backupbuddy_core::generate_api_key();
    pb_backupbuddy::save();
}
?>

<b>Note:</b> wp-config.php files as well as BackupBuddy settings will NOT be transferred in either direction. Your current BackupBuddy settings, destinations, API keys etc. will remain as they are on both sites.<br><br>

<form method="post">
	<?php 
pb_backupbuddy::nonce();
?>
	<input type="hidden" name="regenerate_api_key" value="1">
	<button class="button secondary-button" onClick="jQuery('.backupbuddy_api_key-hide').toggle(); return false;">Show API Key</button><span class="backupbuddy_api_key-hide" style="display: none;">&nbsp;&nbsp;<input type="submit" name="submit" value="Generate New API Key" class="button button-primary"></span>
	<br>
	<br>
	<div class="backupbuddy_api_key-hide" style="display: none;">
		<b>Api Key:</b><br>
		<textarea style="width: 100%; padding: 15px;" readonly="readonly" onClick="this.focus();this.select();"><?php 
echo pb_backupbuddy::$options['api_key'];
?>
</textarea>
	</div>
</form>

<br><br>
Esempio n. 3
0
    public static function list_table($items, $settings)
    {
        $default_settings = array('columns' => array(), 'hover_actions' => array(), 'bulk_actions' => array(), 'hover_action_column_key' => '', 'action' => '', 'reorder' => '', 'after_bulk' => '', 'css' => '');
        // Merge defaults.
        $settings = array_merge($default_settings, $settings);
        // Function to iterate through bulk actions. Top and bottom set are the same.
        if (!function_exists('bulk_actions')) {
            function bulk_actions($settings, $hover_note = false)
            {
                if (count($settings['bulk_actions']) > 0) {
                    echo '<div style="padding-bottom: 3px; padding-top: 3px;">';
                    if (count($settings['bulk_actions']) == 1) {
                        foreach ($settings['bulk_actions'] as $action_slug => $action_title) {
                            echo '<input type="hidden" name="bulk_action" value="' . $action_slug . '">';
                            echo '<input type="submit" name="do_bulk_action" value="' . $action_title . '" class="button secondary-button">';
                        }
                    } else {
                        echo '<select name="bulk_action" class="actions">';
                        foreach ($settings['bulk_actions'] as $action_slug => $action_title) {
                            echo '<option>Bulk Actions</option>';
                            echo '<option value="' . $action_slug . '">' . $action_title . '</option>';
                        }
                        echo '</select> &nbsp;';
                        //echo self::button( '#', 'Apply' );
                        echo '<input type="submit" name="do_bulk_action" value="Apply" class="button secondary-button">';
                    }
                    echo '&nbsp;&nbsp;';
                    echo $settings['after_bulk'];
                    echo '<div class="alignright actions">';
                    if ($hover_note === true) {
                        echo pb_backupbuddy::$ui->note('Hover over items above for additional options.');
                    }
                    if ($settings['reorder'] != '') {
                        echo '	<input type="submit" name="save_order" id="save_order" value="Save Order" class="button-secondary" />';
                    }
                    echo '</div>';
                    echo '</div>';
                }
            }
            // End subfunction bulk_actions().
        }
        // End if function does not exist.
        if ($settings['action'] != '') {
            echo '<form method="post" action="' . $settings['action'] . '">';
            pb_backupbuddy::nonce();
            if ($settings['reorder'] != '') {
                echo '<input type="hidden" name="order" value="" id="pb_order">';
            }
        }
        echo '<div style="width: 70%; min-width: 720px; ' . $settings['css'] . '">';
        // Display bulk actions (top).
        bulk_actions($settings);
        echo '<table class="widefat"';
        echo ' id="test">';
        echo '		<thead>
					<tr class="thead">';
        if (count($settings['bulk_actions']) > 0) {
            echo '		<th scope="col" class="check-column"><input type="checkbox" class="check-all-entries" /></th>';
        }
        foreach ($settings['columns'] as $column) {
            echo '<th>' . $column . '</th>';
        }
        echo '		</tr>
				</thead>
			<tfoot>
				<tr class="thead">';
        if (count($settings['bulk_actions']) > 0) {
            echo '	<th scope="col" class="check-column"><input type="checkbox" class="check-all-entries" /></th>';
        }
        foreach ($settings['columns'] as $column) {
            echo '<th>' . $column . '</th>';
        }
        echo '	</tr>
			</tfoot>
			<tbody';
        if ($settings['reorder'] != '') {
            echo ' class="pb_reorder"';
        }
        echo '>';
        // LOOP THROUGH EACH ROW.
        foreach ((array) $items as $item_id => $item) {
            echo '	<tr class="entry-row alternate" id="pb_rowitem-' . $item_id . '">';
            if (count($settings['bulk_actions']) > 0) {
                echo '	<th scope="row" class="check-column"><input type="checkbox" name="items[]" class="entries" value="' . $item_id . '"></th>';
            }
            echo '		<td>';
            if (is_array($item['0'])) {
                if ($item['0'][1] == '') {
                    echo '&nbsp;';
                } else {
                    echo $item['0'][1];
                }
            } else {
                if ($item['0'] == '') {
                    echo '&nbsp;';
                } else {
                    echo $item['0'];
                }
            }
            echo '			<div class="row-actions">';
            //  style="margin:0; padding:0;"
            $i = 0;
            foreach ($settings['hover_actions'] as $action_slug => $action_title) {
                // Display all hover actions.
                $i++;
                if ($settings['hover_action_column_key'] != '') {
                    if (is_array($item[$settings['hover_action_column_key']])) {
                        $hover_action_column_value = $item[$settings['hover_action_column_key']][0];
                    } else {
                        $hover_action_column_value = $item[$settings['hover_action_column_key']];
                    }
                } else {
                    $hover_action_column_value = '';
                }
                if (strstr($action_slug, 'http') === false) {
                    // Word hover action slug.
                    $hover_link = pb_backupbuddy::page_url() . '&' . $action_slug . '=' . $item_id . '&value=' . $hover_action_column_value;
                } else {
                    // URL hover action slug so just append value to URL.
                    $hover_link = $action_slug . $hover_action_column_value;
                }
                echo '<a href="' . $hover_link . '" class="pb_' . pb_backupbuddy::settings('slug') . '_hoveraction_' . $action_slug . '" rel="' . $hover_action_column_value . '">' . $action_title . '</a>';
                if ($i < count($settings['hover_actions'])) {
                    echo ' | ';
                }
            }
            echo '			</div>
						</td>';
            if ($settings['reorder'] != '') {
                $count = count($item) + 1;
                // Extra row for reordering.
            } else {
                $count = count($item);
            }
            // LOOP THROUGH COLUMNS FOR THIS ROW.
            for ($i = 1; $i < $count; $i++) {
                echo '<td';
                if ($settings['reorder'] != '') {
                    if ($i == $settings['reorder']) {
                        echo ' class="pb_draghandle" align="center"';
                    }
                }
                echo '>';
                if ($settings['reorder'] != '' && $i == $settings['reorder']) {
                    echo '<img src="' . pb_backupbuddy::plugin_url() . '/pluginbuddy/images/draghandle.png" alt="Click and drag to reorder">';
                } else {
                    if ($item[$i] == '') {
                        echo '&nbsp;';
                    } else {
                        echo $item[$i];
                    }
                }
                echo '</td>';
            }
            echo '	</tr>';
        }
        echo '	</tbody>';
        echo '</table>';
        // Display bulk actions (bottom).
        bulk_actions($settings, true);
        echo '</div>';
        if ($settings['action'] != '') {
            echo '</form>';
        }
    }
Esempio n. 4
0
 public function end($echo = false)
 {
     $this->_ended = true;
     // TODO: fields maybe?
     //$return = pb_backupbuddy::nonce( $this->_form_name );
     $return = pb_backupbuddy::nonce(false);
     // Do not echo.
     $return .= '</form>';
     if ($echo === true) {
         echo $return;
     } else {
         return $return;
     }
 }
Esempio n. 5
0
				data = jQuery.trim( data );
				alert( data );
			}
		);
	}
</script>


<p>
	Complete this optional wizard to start using BackupBuddy right away. See the <a href="admin.php?page=pb_backupbuddy_settings" target="_top">Settings</a> page for all configuration options.
</p>


<form id="pb_backupbuddy_quickstart_form" method="post">
	<?php 
pb_backupbuddy::nonce(true);
?>
	<input type="hidden" name="quicksetup" value="true">
	<div class="setup">
		<div class="step email">
			<h4><span class="number">1.</span> Enter your e-mail address to get backup and error notifications.</h4>
<!--			<p>You'll get emails when backups are completed or if there is an error with a backup.</p> -->
			<div class="backupbuddy-quickstart-indent">
				<label>E-mail Address</label>
				<input type="email" id="pb_backupbuddy_quickstart_email" name="email" value="<?php 
echo pb_backupbuddy::$options['email_notify_error'];
?>
">
				<img src="<?php 
echo pb_backupbuddy::plugin_url();
?>
Esempio n. 6
0
							</td>
							<td style="white-space: nowrap;">
								<?php
									echo pb_backupbuddy::$format->date( pb_backupbuddy::$format->localize_time( $results[$rekey]['time'] ) );
									echo '<br /><span class="description">(' . pb_backupbuddy::$format->time_ago( $results[$rekey]['time'] ) . ' ago)</span>';
								?>
							</td>
							<td style="white-space: nowrap;">
								<?php echo pb_backupbuddy::$format->file_size( $results[$rekey]['size'] ); ?>
							</td>
							<td>
								<?php echo '<a href="' . pb_backupbuddy::page_url() . '&custom=' . $_GET['custom'] . '&destination_id=' . $_GET['destination_id'] . '&#38;copy_file=' . $bubup . '">', __('Copy to local', 'it-l10n-backupbuddy' ), '</a>'; ?>
							</td>
						</tr>
						<?php
					}
				}
			}
			?>
		</tbody>
	</table>
	<div class="tablenav">
		<div class="alignleft actions">
			<input type="submit" name="delete_file" value="Delete from S3" class="button-secondary delete" />
		</div>
	</div>
	
	<?php pb_backupbuddy::nonce(); ?>
</form><br />
</div>