Пример #1
0
?>


<span id="backupbuddy_gdrive_loading"><h3><img src="<?php 
echo pb_backupbuddy::plugin_url();
?>
/images/loading.gif" alt="' . __('Loading...', 'it-l10n-backupbuddy' ) . '" title="' . __('Loading...', 'it-l10n-backupbuddy' ) . '" width="16" height="16" style="vertical-align: -3px;"> <?php 
_e('Loading...', 'it-l10n-backupbuddy');
?>
</h3></span>


<?php 
pb_backupbuddy::flush();
$info = pb_backupbuddy_destination_gdrive::getDriveInfo($settings);
$folderMeta = pb_backupbuddy_destination_gdrive::getFileMeta($settings, $folderID);
if (false === $folderMeta) {
    pb_backupbuddy::alert('Error connecting to Google Drive.');
    ?>
	<script>jQuery( '#backupbuddy_gdrive_loading' ).hide();</script>
	<?php 
    return false;
}
//echo '<h3>Files in folder "<a href="' . $folderMeta->alternateLink . '" target="_new">' . $folderMeta->title . '</a>" <span style="font-size: 0.6em;">(Used ' . pb_backupbuddy::$format->file_size( $info['quotaUsed'] ) . ' of ' . pb_backupbuddy::$format->file_size( $info['quotaTotal'] ) . ' available space)</span></h3>';
$usagePercent = ceil($info['quotaUsed'] / $info['quotaTotal'] * 100);
echo '<center><b>Usage</b>:&nbsp; ' . pb_backupbuddy::$format->file_size($info['quotaUsed']) . ' &nbsp;of&nbsp; ' . pb_backupbuddy::$format->file_size($info['quotaTotal']) . ' &nbsp;( ' . $usagePercent . ' % )</center>';
$files = pb_backupbuddy_destination_gdrive::listFiles($settings, "title contains 'backup-' AND '" . $folderID . "' IN parents AND trashed=false");
//"title contains 'backup' and trashed=false" );
if (false === $files) {
    die('Error #834843: Error attempting to list files.');
}