| 1 |
<?php |
| 2 |
|
| 3 |
if (class_exists('RabbitLoader_21_Tab_Usage')) { |
| 4 |
#it seems we have a conflict |
| 5 |
return; |
| 6 |
} |
| 7 |
|
| 8 |
final class RabbitLoader_21_Tab_Usage extends RabbitLoader_21_Tab_Init |
| 9 |
{ |
| 10 |
|
| 11 |
public static function init() |
| 12 |
{ |
| 13 |
add_settings_section( |
| 14 |
'rabbitloader_section_usage', |
| 15 |
' ', |
| 16 |
'', |
| 17 |
'rabbitloader-usage' |
| 18 |
); |
| 19 |
} |
| 20 |
|
| 21 |
public static function echoMainContent() |
| 22 |
{ |
| 23 |
|
| 24 |
do_settings_sections('rabbitloader-usage'); |
| 25 |
$overview = self::getOverviewData($apiError, $apiMessage); |
| 26 |
|
| 27 |
?> |
| 28 |
<div class="" style="max-width: 1160px; margin:40px auto;"> |
| 29 |
<div class="row mb-4"> |
| 30 |
<div class="col-sm-12 col-md-4"> |
| 31 |
<?php self::quota_used_box($overview, false); ?> |
| 32 |
</div> |
| 33 |
<div class="col-sm-12 col-md-4"> |
| 34 |
<?php self::quota_remaining_box($overview); ?> |
| 35 |
</div> |
| 36 |
<div class="col-sm-12 col-md-4"> |
| 37 |
<div class="rl-mfe-card tpopup d-flex justify-content-between flex-column h-100" title="<?php RL21UtilWP::_e(sprintf('Your usage cycle will be reset on %s', date('jS M, Y', strtotime($overview['plan_end_date'])))); ?>"> |
| 38 |
<h4 class=""> |
| 39 |
<?php echo date('jS', strtotime($overview['plan_end_date'])); ?> <small style="font-size:14px;"><?php echo date('M', strtotime($overview['plan_end_date'])); ?></small> |
| 40 |
</h4> |
| 41 |
<span class="text-secondary mt-2"><?php RL21UtilWP::_e('Next Quota Reset'); ?></span> |
| 42 |
</div> |
| 43 |
</div> |
| 44 |
</div> |
| 45 |
|
| 46 |
<div class="row mb-4"> |
| 47 |
<div class="col-12"> |
| 48 |
<div id="mfe_page_views" style="height:400px; width:100%;max-width:100%;border: none; box-shadow:none;"></div> |
| 49 |
</div> |
| 50 |
</div> |
| 51 |
|
| 52 |
</div> |
| 53 |
<?php |
| 54 |
} |
| 55 |
} |
| 56 |
|
| 57 |
?> |