PluginProbe
RabbitLoader / 4.0
RabbitLoader v4.0
4.0.1 4.0 3.2.0 3.1.1 3.1.0 3.0.5 3.0.3 3.0.4 2.17.1 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.7 2.18.0 2.18.1 2.18.2 2.18.3 2.18.4 2.18.5 2.18.6 2.18.7 2.18.8 2.18.9 All 128 releases
rabbit-loader / admin / views / usage.php

usage.php in RabbitLoader 4.0, at admin/views/usage.php

66 lines 2.5 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 if (!defined('ABSPATH')) {
3 exit;
4 }
5
6 $dashboard = isset($dashboard) && is_array($dashboard) ? $dashboard : [];
7 $ok = !empty($dashboard['ok']);
8 $used = $ok ? (float) $dashboard['pageviews_used'] : 0;
9 $quota = $ok ? (float) $dashboard['pageviews_quota'] : 0;
10 $percent = $ok ? (float) $dashboard['pageviews_percent'] : 0;
11 ?>
12 <section class="rl6-page-heading">
13 <div>
14 <span class="rl6-eyebrow">Account usage</span>
15 <h1>Usage</h1>
16 <p>Page-view allowance, plan information and the 30-day usage trend.</p>
17 </div>
18 </section>
19
20 <div class="rl6-usage-top">
21 <section class="rl6-card rl6-usage-summary">
22 <span class="rl6-metric-label">Page views this period</span>
23 <div class="rl6-usage-number">
24 <strong><?php echo esc_html($ok ? number_format_i18n($used) : ''); ?></strong>
25 <span>/ <?php echo esc_html($ok ? number_format_i18n($quota) : ''); ?></span>
26 </div>
27 <div class="rl6-progress rl6-progress-large"><span style="width:<?php echo esc_attr($percent); ?>%"></span></div>
28 <p><?php echo esc_html($percent); ?>% of the current page-view allowance used.</p>
29 </section>
30
31 <section class="rl6-card rl6-usage-summary">
32 <span class="rl6-metric-label">Bandwidth</span>
33 <div class="rl6-usage-number"><strong>Unlimited</strong></div>
34 <p>Unlimited bandwidth is included with all RabbitLoader accounts.</p>
35 </section>
36
37 <section class="rl6-card rl6-usage-summary">
38 <span class="rl6-metric-label">Current plan</span>
39 <div class="rl6-usage-number"><strong><?php echo esc_html($ok ? $dashboard['plan_title'] : ''); ?></strong></div>
40 <p>
41 <?php echo !empty($dashboard['plan_end_date'])
42 ? 'Current cycle ends ' . esc_html($dashboard['plan_end_date'])
43 : 'Plan details from your RabbitLoader account.'; ?>
44 </p>
45 </section>
46 </div>
47
48 <section class="rl6-card rl6-section-card">
49 <div class="rl6-section-title-row">
50 <div>
51 <span class="rl6-eyebrow">Last 30 days</span>
52 <h2>Page Views</h2>
53 </div>
54 </div>
55
56 <div class="rl6-chart-placeholder">
57 <div class="rl6-chart-grid">
58 <span></span><span></span><span></span><span></span>
59 </div>
60 <div class="rl6-chart-message">
61 <strong>30-day trend UI is ready</strong>
62 <p>The old UI used the RabbitLoader page-view trend endpoint. Historical data wiring is the next functional step.</p>
63 </div>
64 </div>
65 </section>
66