| 1 |
<?php |
| 2 |
|
| 3 |
use Dev4Press\Plugin\SweepPress\Basic\Database; |
| 4 |
use Dev4Press\v43\Core\Quick\File; |
| 5 |
use function Dev4Press\v43\Functions\panel; |
| 6 |
|
| 7 |
if ( ! defined( 'ABSPATH' ) ) { |
| 8 |
exit; |
| 9 |
} |
| 10 |
|
| 11 |
sweeppress_settings()->set( 'database', Database::instance()->total_wp( 'estimate' ), 'statistics', true ); |
| 12 |
|
| 13 |
?> |
| 14 |
<div class="d4p-group d4p-dashboard-card sweeper-dashboard-database<?php echo sweeppress_settings()->get( 'dashboard_auto_quick', 'sweepers' ) ? '' : ' d4p-card-double'; ?>"> |
| 15 |
<h3> |
| 16 |
<?php esc_html_e( 'Database Status', 'sweeppress' ); ?> |
| 17 |
</h3> |
| 18 |
<div class="d4p-group-inner"> |
| 19 |
<div class="sweeppress-data-block"> |
| 20 |
<div> |
| 21 |
<h4><?php esc_html_e( 'WordPress Core Tables', 'sweeppress' ); ?></h4> |
| 22 |
<dl> |
| 23 |
<dt><?php esc_html_e( 'Total Tables', 'sweeppress' ); ?>:</dt> |
| 24 |
<dd><?php echo esc_html( Database::instance()->total_wp( 'tables' ) ); ?></dd> |
| 25 |
<dt><?php esc_html_e( 'Total Records', 'sweeppress' ); ?>:</dt> |
| 26 |
<dd><?php echo esc_html( number_format_i18n( Database::instance()->total_wp( 'rows' ) ) ); ?></dd> |
| 27 |
<dt><?php esc_html_e( 'Total Size', 'sweeppress' ); ?>:</dt> |
| 28 |
<dd><?php echo esc_html( File::size_format( Database::instance()->total_wp( 'total' ), 2, ' ', false ) ); ?></dd> |
| 29 |
<dt><?php esc_html_e( 'Data Size', 'sweeppress' ); ?>:</dt> |
| 30 |
<dd><?php echo esc_html( File::size_format( Database::instance()->total_wp( 'size' ), 2, ' ', false ) ); ?></dd> |
| 31 |
<dt><?php esc_html_e( 'Data Free', 'sweeppress' ); ?>:</dt> |
| 32 |
<dd><?php echo esc_html( File::size_format( Database::instance()->total_wp( 'free' ), 2, ' ', false ) ); ?></dd> |
| 33 |
<dt><?php esc_html_e( 'Index Size', 'sweeppress' ); ?>:</dt> |
| 34 |
<dd><?php echo esc_html( File::size_format( Database::instance()->total_wp( 'index' ), 2, ' ', false ) ); ?></dd> |
| 35 |
<dt><?php esc_html_e( 'Database Size', 'sweeppress' ); ?>:</dt> |
| 36 |
<dd><?php echo esc_html( Database::instance()->size() ); ?></dd> |
| 37 |
</dl> |
| 38 |
</div> |
| 39 |
<div> |
| 40 |
<h4><?php esc_html_e( 'All Database Tables', 'sweeppress' ); ?></h4> |
| 41 |
<dl> |
| 42 |
<dt><?php esc_html_e( 'Total Tables', 'sweeppress' ); ?>:</dt> |
| 43 |
<dd><?php echo esc_html( Database::instance()->total( 'tables' ) ); ?></dd> |
| 44 |
<dt><?php esc_html_e( 'Total Records', 'sweeppress' ); ?>:</dt> |
| 45 |
<dd><?php echo esc_html( number_format_i18n( Database::instance()->total( 'rows' ) ) ); ?></dd> |
| 46 |
<dt><?php esc_html_e( 'Total Size', 'sweeppress' ); ?>:</dt> |
| 47 |
<dd><?php echo esc_html( File::size_format( Database::instance()->total( 'total' ), 2, ' ', false ) ); ?></dd> |
| 48 |
<dt><?php esc_html_e( 'Data Size', 'sweeppress' ); ?>:</dt> |
| 49 |
<dd><?php echo esc_html( File::size_format( Database::instance()->total( 'size' ), 2, ' ', false ) ); ?></dd> |
| 50 |
<dt><?php esc_html_e( 'Data Free', 'sweeppress' ); ?>:</dt> |
| 51 |
<dd><?php echo esc_html( File::size_format( Database::instance()->total( 'free' ), 2, ' ', false ) ); ?></dd> |
| 52 |
<dt><?php esc_html_e( 'Index Size', 'sweeppress' ); ?>:</dt> |
| 53 |
<dd><?php echo esc_html( File::size_format( Database::instance()->total( 'index' ), 2, ' ', false ) ); ?></dd> |
| 54 |
</dl> |
| 55 |
</div> |
| 56 |
</div> |
| 57 |
</div> |
| 58 |
<div class="d4p-group-footer"> |
| 59 |
<a href="<?php echo esc_url( panel()->a()->panel_url( 'database' ) ); ?>" class="button-primary"><?php esc_html_e( 'Database Panel', 'sweeppress' ); ?></a> |
| 60 |
</div> |
| 61 |
</div> |
| 62 |
|