当前位置: 首页>>代码示例>>PHP>>正文


PHP pb_backupbuddy::alert方法代码示例

本文整理汇总了PHP中pb_backupbuddy::alert方法的典型用法代码示例。如果您正苦于以下问题:PHP pb_backupbuddy::alert方法的具体用法?PHP pb_backupbuddy::alert怎么用?PHP pb_backupbuddy::alert使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pb_backupbuddy的用法示例。


在下文中一共展示了pb_backupbuddy::alert方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: plugin_information

function plugin_information($plugin_slug, $data)
{
    $plugin_path = $data['path'];
    ?>
	
	<textarea readonly="readonly" rows="7" cols="65" wrap="off" style="width: 100%;"><?php 
    //echo "Version History:\n\n";
    readfile($plugin_path . '/history.txt');
    ?>
</textarea>
	<script type="text/javascript">
		jQuery(document).ready(function() {
			jQuery("#pluginbuddy_<?php 
    echo $plugin_slug;
    ?>
_debugtoggle").click(function() {
				jQuery("#pluginbuddy_<?php 
    echo $plugin_slug;
    ?>
_debugtoggle_div").slideToggle();
			});
		});
	</script>
	<?php 
    if (pb_backupbuddy::_POST('reset_defaults') == $plugin_slug) {
        if (call_user_func('pb_' . $plugin_slug . '::reset_options', true) === true) {
            pb_backupbuddy::alert('Plugin settings have been reset to defaults for plugin `' . $data['name'] . '`.');
        } else {
            pb_backupbuddy::alert('Unable to reset plugin settings. Verify you are running the latest version.');
        }
    }
    ?>
	
	<?php 
}
开发者ID:netfor,项目名称:nextrading,代码行数:35,代码来源:_other.php

示例2: finalActions

function finalActions($restore)
{
    // Rename .htaccess.bb_temp back to .htaccess.
    $restore->renameHtaccessTempBack();
    // Remove any temporary .maintenance file created by ImportBuddy.
    $restore->maintenanceOff($onlyOurCreatedFile = true);
    // Remove any temporary index.htm file created by ImportBuddy.
    $restore->scrubIndexFiles();
    // TODO: Make these thnings be able to output stuff into the cleanupSettings.ejs template. Add functions?
    // Update wpconfig if needed.
    $wpconfig_result = $restore->migrateWpConfig();
    if ($wpconfig_result !== true) {
        pb_backupbuddy::alert('Error: Unable to update wp-config.php file. Verify write permissions for the wp-config.php file then refresh this page. You may manually update your wp-config.php file by changing it to the following:<textarea readonly="readonly" style="width: 80%;">' . $wpconfig_result . '</textarea>');
    }
    // Scan for 'trouble' such as a remaining .maintenance file, index.htm, index.html, missing wp-config.php, missing .htaccess, etc etc.
    $problems = $restore->troubleScan();
    if (count($problems) > 0) {
        $restore->_state['potentialProblems'] = $problems;
        $trouble_text = '';
        foreach ($problems as $problem) {
            $trouble_text .= '<li>' . $problem . '</li>';
        }
        $trouble_text = '<ul>' . $trouble_text . '</ul>';
        pb_backupbuddy::status('warning', 'One or more potential issues detected that may require your attention: ' . $trouble_text);
    }
    pb_backupbuddy::status('details', 'Finished final actions function.');
}
开发者ID:AgilData,项目名称:WordPress-Skeleton,代码行数:27,代码来源:5.php

示例3: start

 public function start($sourceInfo)
 {
     $this->_before(__FUNCTION__);
     $pingTimePre = microtime(true);
     if (false === ($this->_state['remoteInfo'] = backupbuddy_remote_api::remoteCall($this->_state['destination'], 'getPreDeployInfo', array(), $timeout = 10))) {
         pb_backupbuddy::alert(implode(', ', backupbuddy_remote_api::getErrors()));
         return false;
     }
     $this->_state['remoteInfo'] = $this->_state['remoteInfo']['data'];
     $pingTimePost = microtime(true);
     $this->_state['remoteInfo']['pingTime'] = $pingTimePost - $pingTimePre;
     // Calculate plugins that do not match.
     $this->_state['pushPluginFiles'] = $this->calculatePluginDiff($sourceInfo['activePlugins'], $this->_state['remoteInfo']['activePlugins']);
     $this->_state['pullPluginFiles'] = $this->calculatePluginDiff($this->_state['remoteInfo']['activePlugins'], $sourceInfo['activePlugins']);
     if ($sourceInfo['activeTheme'] == $this->_state['remoteInfo']['activeTheme']) {
         // Calculate themes that do not match.
         $this->_state['pushThemeFiles'] = $this->calculateFileDiff($sourceInfo['themeSignatures'], $this->_state['remoteInfo']['themeSignatures']);
         $this->_state['pullThemeFiles'] = $this->calculateFileDiff($this->_state['remoteInfo']['themeSignatures'], $sourceInfo['themeSignatures']);
     } else {
         $this->_state['sendTheme'] = false;
         pb_backupbuddy::status('details', 'Different themes. No theme data will be sent.');
     }
     // Calculate media files that do not match.
     $this->_state['pushMediaFiles'] = $this->calculateFileDiff($sourceInfo['mediaSignatures'], $this->_state['remoteInfo']['mediaSignatures']);
     // was calculateMediaDiff().
     $this->_state['pullMediaFiles'] = $this->calculateFileDiff($this->_state['remoteInfo']['mediaSignatures'], $sourceInfo['mediaSignatures']);
     // was calculateMediaDiff().
     unset($this->_state['remoteInfo']['mediaSignatures']);
     unset($this->_state['remoteInfo']['themeSignatures']);
     return true;
 }
开发者ID:emjayoh,项目名称:bhag,代码行数:31,代码来源:deploy.php

示例4: get_info

 public static function get_info($destination_type)
 {
     // Initialize destination.
     if (false === ($destination = self::_init_destination(array('type' => $destination_type)))) {
         pb_backupbuddy::alert('Unable to load destination files. Your BackupBuddy installation may be incomplete or your server may no longer support a destination you previously configured. Some destination may require PHP 5.3 or newer to function.');
         return false;
     }
     return $destination['info'];
 }
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:9,代码来源:bootstrap.php

示例5: _connect

 private static function _connect($accessToken)
 {
     try {
         self::$_dbxClient = new dbx\Client($accessToken, 'BackupBuddy v' . pb_backupbuddy::settings('version'));
     } catch (\Exception $e) {
         pb_backupbuddy::alert('Dropbox Error: ' . $e->getMessage() . '<br><br>' . pb_backupbuddy::$ui->button(pb_backupbuddy::page_url(), '&larr; go back & retry'), true);
         return false;
     }
     pb_backupbuddy::status('details', 'Connected to Dropbox.');
     return true;
 }
开发者ID:russtx,项目名称:tac,代码行数:11,代码来源:init.php

示例6: upload

/**
 *	upload()
 *
 *	Processes uploaded backup file.
 *
 *	@return		array		True on upload success; false otherwise.
 */
function upload()
{
    if (isset($_POST['upload']) && $_POST['upload'] == 'local') {
        if (pb_backupbuddy::$options['password'] != '#PASSWORD#') {
            $path_parts = pathinfo($_FILES['file']['name']);
            if (strtolower(substr($_FILES['file']['name'], 0, 6)) == 'backup' && strtolower($path_parts['extension']) == 'zip') {
                if (move_uploaded_file($_FILES['file']['tmp_name'], basename($_FILES['file']['name']))) {
                    pb_backupbuddy::alert('File Uploaded. Your backup was successfully uploaded.');
                    return true;
                } else {
                    pb_backupbuddy::alert('Sorry, there was a problem uploading your file.', true);
                    return false;
                }
            } else {
                pb_backupbuddy::alert('Only properly named BackupBuddy zip archives with a zip extension may be uploaded.', true);
                return false;
            }
        } else {
            pb_backupbuddy::alert('Upload Access Denied. To prevent unauthorized file uploads an importbuddy password must be configured and properly entered to use this feature.');
            return false;
        }
    }
    // DOWNLOAD FILE FROM STASH TO LOCAL.
    if (pb_backupbuddy::_POST('upload') == 'stash') {
        pb_backupbuddy::set_greedy_script_limits(true);
        /*
        echo '<pre>';
        print_r( $_POST );
        echo '</pre>';
        */
        $requestcore_file = dirname(dirname(dirname(__FILE__))) . '/lib/requestcore/requestcore.class.php';
        require_once $requestcore_file;
        $link = pb_backupbuddy::_POST('link');
        $destination_file = dirname(dirname(dirname(dirname(__FILE__)))) . '/' . basename(pb_backupbuddy::_POST('link'));
        $destination_file = substr($destination_file, 0, stripos($destination_file, '.zip') + 4);
        $_GET['file'] = basename($destination_file);
        $request = new RequestCore($link);
        $request->set_write_file($destination_file);
        echo '<div id="pb_importbuddy_working" style="padding: 20px;">Downloading backup from Stash to `' . $destination_file . '`...<br><br><img src="' . pb_backupbuddy::plugin_url() . '/images/loading_large.gif" title="Working... Please wait as this may take a moment..."><br><br></div>';
        flush();
        $response = $request->send_request(false);
        if ($response !== true) {
            pb_backupbuddy::alert('Error #8548459598. Unable to download file from Stash. You may manually download it and upload to the server via FTP.');
        } else {
            // No error.
            if (!file_exists($destination_file)) {
                pb_backupbuddy::alert('Error #34845745878. Stash returned a success but the backup file was not found locally. Check this server\'s directory write permissions. You may manually download it and upload to the server via FTP.');
            }
        }
        echo '<script type="text/javascript">jQuery("#pb_importbuddy_working").hide();</script>';
    }
}
开发者ID:brettex,项目名称:pspark,代码行数:59,代码来源:1.php

示例7: get_info

 public static function get_info($destination_type)
 {
     // Initialize destination.
     $destination_class = self::_init_destination($destination_type);
     if (!class_exists($destination_class)) {
         pb_backupbuddy::alert('Unable to load class `' . $destination_class . '` for destination type `' . $destination_type . '`.');
         return self::$_destination_info_defaults;
     }
     // Get default dest info from class. Was using a variable class name but had to change this for PHP 5.2 compat.
     $vars = get_class_vars($destination_class);
     $default_info = $vars['destination_info'];
     unset($vars);
     $destination_info = array_merge(self::$_destination_info_defaults, $default_info);
     // Merge in defaults from destination over defaults for BB destinations.
     return $destination_info;
 }
开发者ID:mariakhair,项目名称:bootstrap,代码行数:16,代码来源:bootstrap.php

示例8: upload

/**
 *	upload()
 *
 *	Processes uploaded backup file.
 *
 *	@return		array		True on upload success; false otherwise.
 */
function upload() {
	if ( isset( $_POST['upload'] ) && ( $_POST['upload'] == 'local' ) ) {
		if ( pb_backupbuddy::$options['password'] != '#PASSWORD#' ) {
			$path_parts = pathinfo( $_FILES['file']['name'] );
			if ( ( strtolower( substr( $_FILES['file']['name'], 0, 6 ) ) == 'backup' ) && ( strtolower( $path_parts['extension'] ) == 'zip' ) ) {
				if ( move_uploaded_file( $_FILES['file']['tmp_name'], basename( $_FILES['file']['name'] ) ) ) {
					pb_backupbuddy::alert( 'File Uploaded. Your backup was successfully uploaded.' );
					return true;
				} else {
					pb_backupbuddy::alert( 'Sorry, there was a problem uploading your file.', true );
					return false;
				}
			} else {
				pb_backupbuddy::alert( 'Only properly named BackupBuddy zip archives with a zip extension may be uploaded.', true );
				return false;
			}
		} else {
			pb_backupbuddy::alert( 'Upload Access Denied. To prevent unauthorized file uploads an importbuddy password must be configured and properly entered to use this feature.' );
			return false;
		}
	}
}
开发者ID:verbazend,项目名称:AWFA,代码行数:29,代码来源:1.php

示例9: get_manage_data

 public static function get_manage_data($settings)
 {
     $itxapi_username = $settings['itxapi_username'];
     $itxapi_password = $settings['itxapi_password'];
     require_once dirname(__FILE__) . '/lib/class.itx_helper.php';
     require_once dirname(dirname(__FILE__)) . '/_s3lib/aws-sdk/sdk.class.php';
     $stash = new ITXAPI_Helper(pb_backupbuddy_destination_stash::ITXAPI_KEY, pb_backupbuddy_destination_stash::ITXAPI_URL, $itxapi_username, $itxapi_password);
     //  get the url to use to request management credentials
     //  url looks something like this - http://api.ithemes.com/stash/upload?apikey=sb31kesem0c879m0&expires=1347439653&subscriber=jwooley&signature=VFMbmXb5OorWwqE0iedOCsDtSgs%3D
     $manage_url = $stash->get_manage_url();
     //  create a new RequestCore to get the credentials
     //  NOTE: RequestCore is part of the AWS SDK, it's a generic http request class.
     //        You can use any available function to make the api request, the wordpress http class for example,
     //        or even just the basic file_get_contents()
     $request = new RequestCore($manage_url);
     //  send the api request
     $response = $request->send_request(true);
     //  see if the request was successful
     if (!$response->isOK()) {
         //throw new Exception('Request for management credentials failed.');
         $error = 'Request for management credentials failed.';
         pb_backupbuddy::status('error', $error);
         pb_backupbuddy::alert($error);
         return false;
     }
     //  see if we got a json response
     if (!($manage_data = json_decode($response->body, true))) {
         $error = 'Did not get valid JSON response.';
         pb_backupbuddy::status('error', $error);
         pb_backupbuddy::alert($error);
         return false;
     }
     //  finally see if the API returned an error
     if (isset($manage_data['error'])) {
         $error = 'Error: ' . implode(' - ', $manage_data['error']);
         pb_backupbuddy::status('error', $error);
         pb_backupbuddy::alert($error);
         return false;
     }
     return $manage_data;
 }
开发者ID:adrianjonmiller,项目名称:animalhealth,代码行数:41,代码来源:init.php

示例10: sprintf

		pb_backupbuddy::alert( sprintf( __('Unable to create backup storage directory (%s)', 'it-l10n-backupbuddy' ) , pb_backupbuddy::$options['backup_directory'] ), true, '9002' );
	}
}

// Keep temp directory up to date.
if ( pb_backupbuddy::$options['temp_directory'] != ( ABSPATH . 'wp-content/uploads/backupbuddy_temp/' ) ) {
	pb_backupbuddy::status( 'details', 'Temporary directory has changed. Updating from `' . pb_backupbuddy::$options['temp_directory'] . '` to `' . ABSPATH . 'wp-content/uploads/backupbuddy_temp/' . '`.' );
	pb_backupbuddy::$options['temp_directory'] = ABSPATH . 'wp-content/uploads/backupbuddy_temp/';
	pb_backupbuddy::save();
}
// Make backup directory if it does not exist yet.
if ( !file_exists( pb_backupbuddy::$options['temp_directory'] ) ) {
	pb_backupbuddy::status( 'details', 'Temporary directory does not exist. Attempting to create.' );
	if ( pb_backupbuddy::$filesystem->mkdir( pb_backupbuddy::$options['temp_directory'] ) === false ) {
		pb_backupbuddy::status( 'error', sprintf( __('Unable to create temporary storage directory (%s)', 'it-l10n-backupbuddy' ) , pb_backupbuddy::$options['temp_directory'] ) );
		pb_backupbuddy::alert( sprintf( __('Unable to create temporary storage directory (%s)', 'it-l10n-backupbuddy' ) , pb_backupbuddy::$options['temp_directory'] ), true, '9002' );
	}
}
/********** End directory checking. **********/


// The below is no longer needed? - Dustin May 12, 2012:
// ZipBuddy handles all zipping, testing available zip methods, etc. Only runs on backupbuddy pages here.
// TODO: Make sure zipbuddy testing is cached.
/*
//todo: add this back in. temp disabled just for some testing jan 25, 11am.
if ( strstr( pb_backupbuddy::_GET( 'page' ), 'backupbuddy' ) && !isset( pb_backupbuddy::$classes['zipbuddy'] ) ) { // Only run if zipbuddy object not already loaded.
	require_once( pb_backupbuddy::plugin_path() . '/lib/zipbuddy/zipbuddy.php' );
	pb_backupbuddy::$classes['zipbuddy'] = new pluginbuddy_zipbuddy( pb_backupbuddy::$options['backup_directory'] );
}
*/
开发者ID:verbazend,项目名称:AWFA,代码行数:31,代码来源:init_admin.php

示例11: migrateHtaccess

 /**
  *	migrateHtaccess()
  *
  *	Migrates .htaccess.bb_temp file if it exists.
  *
  *	@return		boolean		False only if file is unwritable. True if write success; true if file does not even exist.
  *
  */
 function migrateHtaccess()
 {
     $htaccessFile = ABSPATH . '.htaccess.bb_temp';
     // If no .htaccess.bb_temp file exists then create a basic default one then migrate that as needed. @since 2.2.32.
     if (!file_exists($htaccessFile)) {
         pb_backupbuddy::status('message', 'No `' . basename($htaccessFile) . '` file found. Creating basic default .htaccess.bb_temp file (to be later renamed to .htaccess).');
         // Default .htaccess file.
         $htaccess_contents = "# BEGIN WordPress\n\n\t\t\t\t<IfModule mod_rewrite.c>\n\n\t\t\t\tRewriteEngine On\n\n\t\t\t\tRewriteBase /\n\n\t\t\t\tRewriteRule ^index\\.php\$ - [L]\n\n\t\t\t\tRewriteCond %{REQUEST_FILENAME} !-f\n\n\t\t\t\tRewriteCond %{REQUEST_FILENAME} !-d\n\n\t\t\t\tRewriteRule . /index.php [L]\n\n\t\t\t\t</IfModule>\n\n\t\t\t\t# END WordPress\n";
         file_put_contents($htaccessFile, $htaccess_contents);
         unset($htaccess_contents);
     }
     pb_backupbuddy::status('message', 'Migrating `' . basename($htaccessFile) . '` file...');
     $oldurl = strtolower($this->_state['dat']['siteurl']);
     $oldurl = str_replace('/', '\\', $oldurl);
     $oldurl = str_replace('http:\\', '', $oldurl);
     $oldurl = trim($oldurl, '\\');
     $oldurl = explode('\\', $oldurl);
     $oldurl[0] = '';
     $old_path = implode('/', $oldurl);
     $newurl = strtolower($this->_state['siteurl']);
     $newurl = str_replace('/', '\\', $newurl);
     $newurl = str_replace('http:\\', '', $newurl);
     $newurl = trim($newurl, '\\');
     $newurl = explode('\\', $newurl);
     $newurl[0] = '';
     pb_backupbuddy::status('message', 'Checking `' . basename($htaccessFile) . '` file.');
     if ($newurl !== $oldurl) {
         pb_backupbuddy::status('message', 'URL directory has changed. Updating from `' . implode('/', $oldurl) . '` to `' . implode('/', $newurl) . '`.');
     }
     $rewrite_lines = array();
     $got_rewrite = false;
     $rewrite_path = implode('/', $newurl);
     $file_array = file($htaccessFile);
     $htaccessNeedsUpdating = false;
     // Loop through .htaccess lines, updating as needed.
     foreach ((array) $file_array as $line_number => $line) {
         if ($got_rewrite == true) {
             // In a WordPress section.
             if (strstr($line, 'END WordPress')) {
                 // End of a WordPress block so stop replacing.
                 $got_rewrite = false;
                 $rewrite_lines[] = $line;
                 // Captures end of WordPress block.
             } else {
                 if ($newurl !== $oldurl) {
                     if (strstr($line, 'RewriteBase')) {
                         // RewriteBase
                         $rewrite_lines[] = 'RewriteBase ' . $rewrite_path . '/' . "\n";
                         $htaccessNeedsUpdating = true;
                     } elseif (strstr($line, 'RewriteRule')) {
                         // RewriteRule
                         if (strstr($line, '^index\\.php$')) {
                             // Handle new strange rewriterule. Leave as is.
                             $rewrite_lines[] = $line;
                             pb_backupbuddy::status('details', '.htaccess ^index\\.php$ detected. Leaving as is.');
                         } elseif (!strstr($line, 'RewriteRule . ')) {
                             // Handle what is probably a user generated rule - better detection needed.
                             $new_line = str_replace($old_path, $rewrite_path, $line);
                             $rewrite_lines[] = $new_line;
                             $htaccessNeedsUpdating = true;
                             if ($new_line != $line) {
                                 pb_backupbuddy::status('message', '.htaccess line changed from `' . trim($line) . '` to `' . trim($new_line) . '`.');
                             }
                         } else {
                             // Normal spot.
                             $rewrite_lines[] = 'RewriteRule . ' . $rewrite_path . '/index.php' . "\n";
                             $htaccessNeedsUpdating = true;
                         }
                     } else {
                         // User custom rewriterule we did not update.
                         $rewrite_lines[] = $line;
                         // Captures everything inside WordPress block we arent modifying.
                         if (false !== strstr($line, 'RewriteRule . ')) {
                             // RewriteRule, warn user potentially if path may need changed.
                             if ($old_path !== $rewrite_path) {
                                 pb_backupbuddy::status('warning', 'User-defined RewriteRule found and WordPress path has changed so this rule MAY need manually updated by you to function properly.  Line: "' . $line . '".');
                             }
                         }
                     }
                 }
             }
         } else {
             // Outside a WordPress section.
             if (strstr($line, 'BEGIN WordPress')) {
                 $got_rewrite = true;
                 // Beginning of a WordPress block so start replacing.
             }
             if (strstr($line, 'AddHandler')) {
                 // Has AddHandler. Skip keeping this line -- if importbuddy is running now then we do not need this most likely.
                 $message = 'An AddHandler directive has been found in your .htaccess file. This could result in WordPress and PHP not running properly if configured improperly, especially when migrating to a new server. If you encounter problems such as an Internal Server Error or Error 500, try removing this line from your .htaccess file.  Line: "' . $line . '".';
                 pb_backupbuddy::status('warning', $message);
                 pb_backupbuddy::alert($message);
//.........这里部分代码省略.........
开发者ID:arobbins,项目名称:iab,代码行数:101,代码来源:restore.php

示例12: dir_size_map

 function dir_size_map($dir, $base, $exclusions, &$dir_array)
 {
     $dir = rtrim($dir, '/\\');
     // Force no trailing slash.
     if (!is_dir($dir)) {
         return 0;
     }
     $ret = 0;
     $ret_with_exclusions = 0;
     $ret_objects = 0;
     $ret_objects_with_exclusions = 0;
     $exclusions_result = $exclusions;
     $sub = @opendir($dir);
     if (false === $sub) {
         // Cannot access.
         pb_backupbuddy::alert('Error #568385: Unable to access directory: `' . $dir . '`. Verify proper permissions.', true);
         return 0;
     } else {
         while ($file = readdir($sub)) {
             $exclusions_result = $exclusions;
             $dir_path = '/' . str_replace($base, '', $dir . '/' . $file);
             //str_replace( $base, '', $dir . $file . '/' );
             if ($file == '.' || $file == '..') {
                 // Do nothing.
             } elseif (is_dir($dir . '/' . $file)) {
                 // DIRECTORY.
                 if ($exclusions === true || self::in_array_substr($exclusions, $dir_path, '/')) {
                     $exclusions_result = true;
                 }
                 $result = $this->dir_size_map($dir . '/' . $file . '/', $base, $exclusions, $dir_array);
                 $this_size = $result[0];
                 $this_objects = $result[2];
                 if ($exclusions_result === true) {
                     // If excluding then wipe excluded value.
                     $this_size_with_exclusions = false;
                     $this_objects_with_exclusions = 0;
                 } else {
                     $this_size_with_exclusions = $result[1];
                     // / 1048576 );
                     $this_objects_with_exclusions = $result[3];
                     // / 1048576 );
                 }
                 $dir_array[$dir_path] = array($this_size, $this_size_with_exclusions, $this_objects, $this_objects_with_exclusions);
                 // $dir_array[ DIRECTORY_PATH ] = DIRECTORY_SIZE;
                 $ret += $this_size;
                 $ret_objects += $this_objects;
                 $ret_with_exclusions += $this_size_with_exclusions;
                 $ret_objects_with_exclusions += $this_objects_with_exclusions;
                 unset($file);
             } else {
                 // FILE.
                 $stats = stat($dir . '/' . $file);
                 $ret += $stats['size'];
                 $ret_objects++;
                 if ($exclusions !== true && !in_array($dir_path, $exclusions)) {
                     // Not excluding.
                     $ret_with_exclusions += $stats['size'];
                     $ret_objects_with_exclusions++;
                 }
                 unset($file);
             }
         }
         closedir($sub);
         unset($sub);
         return array($ret, $ret_with_exclusions, $ret_objects, $ret_objects_with_exclusions);
     }
 }
开发者ID:mariakhair,项目名称:bootstrap,代码行数:67,代码来源:filesystem.php

示例13: flush

<?php

$page_title = 'Unzipping Backup File';
require_once '_header.php';
echo '<div class="wrap">';
echo pb_backupbuddy::$classes['import']->status_box('Extracting backup ZIP file with ImportBuddy v' . pb_backupbuddy::$options['bb_version'] . '... Powered by BackupBuddy.');
echo '<div id="pb_importbuddy_working"><img src="' . pb_backupbuddy::plugin_url() . '/images/loading_large.gif" title="Working... Please wait as this may take a moment..."></div>';
flush();
$results = extract_files();
echo '<script type="text/javascript">jQuery("#pb_importbuddy_working").hide();</script>';
if (true === $results) {
    // Move on to next step.
    echo '<br><br><p style="text-align: center;">Files successfully extracted.</p>';
    echo '<form action="?step=3" method=post>';
    echo '<input type="hidden" name="options" value="' . htmlspecialchars(serialize(pb_backupbuddy::$options)) . '" />';
    echo '</div><!-- /wrap -->';
    echo '<div class="main_box_foot"><input type="submit" name="submit" value="Next Step &rarr;" class="button" /></div>';
    echo '</form>';
} else {
    pb_backupbuddy::alert('File extraction process did not complete successfully. Unable to continue to next step. Manually extract the backup ZIP file and choose to "Skip File Extraction" from the advanced options on Step 1.', true, '9005');
    echo '<p style="text-align: center;"><a href="http://pluginbuddy.com/tutorials/unzip-backup-zip-file-in-cpanel/">Click here for instructions on manual ZIP extraction as a work-around.</a></p>';
    echo '</div><!-- /wrap -->';
}
rename_htaccess_temp();
// Rename .htaccess to .htaccess.bb_temp until end of migration.
get_dat_from_backup();
require_once '_footer.php';
开发者ID:brettex,项目名称:pspark,代码行数:27,代码来源:html_2.php

示例14: elseif

        echo '</form>';
    }
    // end authorication code submitted.
} elseif ('edit' == $mode) {
    // EDIT mode.
    $accessToken = $destination_settings['access_token'];
    try {
        $dropboxClient = new \Dropbox\Client($accessToken, 'BackupBuddy v' . pb_backupbuddy::settings('version'));
    } catch (\Exception $e) {
        pb_backupbuddy::alert('Dropbox Error #143838: ' . $e->getMessage() . '<br><br>' . pb_backupbuddy::$ui->button(pb_backupbuddy::page_url(), '&larr; go back & retry'), true);
        return false;
    }
    try {
        $accountInfo = $dropboxClient->getAccountInfo();
    } catch (\Exception $e) {
        pb_backupbuddy::alert('Dropbox Error #132852: ' . $e->getMessage() . '<br><br>' . pb_backupbuddy::$ui->button(pb_backupbuddy::page_url(), '&larr; go back & retry'), true);
        return false;
    }
    $show_config_form = true;
    // Enable showing configuration form below.
} elseif ('save' == $mode) {
    $show_config_form = true;
} else {
    // UNKNOWN mode.
    die('Error #3283489434: Unknown destination form mode.');
}
// End checking mode.
// Display configuration form.
if (true === $show_config_form) {
    if ('save' != $mode) {
        // Account info.
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:31,代码来源:_configure.php

示例15: array

    echo '<br>';
    pb_backupbuddy::status('details', 'Scheduling Cron for creating Dropbox copy.');
    backupbuddy_core::schedule_single_event(time(), pb_backupbuddy::cron_tag('process_destination_copy'), array($destination, pb_backupbuddy::_GET('cpy')));
    spawn_cron(time() + 150);
    // Adds > 60 seconds to get around once per minute cron running limit.
    update_option('_transient_doing_cron', 0);
    // Prevent cron-blocking for next item.
}
// Delete selected dropbox backup(s) from form submission.
if ('delete_backup' == pb_backupbuddy::_POST('bulk_action')) {
    pb_backupbuddy::verify_nonce();
    if (is_array(pb_backupbuddy::_POST('items'))) {
        if (true === ($result = pb_backupbuddy_destinations::delete($destination, pb_backupbuddy::_POST('items')))) {
            pb_backupbuddy::alert(__('Selected file(s) deleted.', 'it-l10n-backupbuddy'));
        } else {
            pb_backupbuddy::alert(__('Unable to delete one or more files. Details: ', 'it-l10n-backupbuddy') . $result);
        }
        echo '<br>';
    }
}
$files_result = pb_backupbuddy_destinations::listFiles($destination);
$backup_files = array();
foreach ((array) $files_result['contents'] as $file) {
    // Loop through files looking for backups.
    if ($file['is_dir'] == '1') {
        // Do NOT display subdirectories.
        continue;
    }
    $filename = str_ireplace($files_result['path'] . '/', '', $file['path']);
    // Remove path from filename.
    if (isset($file['client_mtime'])) {
开发者ID:Ezyva2015,项目名称:SMSF-Academy-Wordpress,代码行数:31,代码来源:_manage.php


注:本文中的pb_backupbuddy::alert方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。