images
2 years ago
ui-blocks
3 years ago
abstract.html
6 months ago
activity-report-content.php
3 days ago
blue.html
6 months ago
default.html
6 months ago
envelope.html
6 months ago
leftist.html
6 months ago
no-template.html
3 years ago
panel.html
6 months ago
activity-report-content.php
408 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Activity Report Email Content Template |
| 4 | * |
| 5 | * Variables available: |
| 6 | * - $data: Array with report data |
| 7 | * - $sections: Array of enabled sections |
| 8 | * |
| 9 | * @package WPDM |
| 10 | * @since 7.0.2 |
| 11 | */ |
| 12 | |
| 13 | if (!defined('ABSPATH')) die('!'); |
| 14 | |
| 15 | // Inline styles for email clients |
| 16 | $styles = [ |
| 17 | 'section' => 'margin-bottom: 32px; padding: 24px; background: #ffffff; border: 1px solid #e5e7eb; border-radius: 8px;', |
| 18 | 'heading' => 'margin: 0 0 16px 0; font-size: 18px; font-weight: 600; color: #111827;', |
| 19 | 'subheading' => 'margin: 0 0 8px 0; font-size: 14px; font-weight: 600; color: #374151;', |
| 20 | 'stat_grid' => 'width: 100%; border-collapse: separate; border-spacing: 12px;', |
| 21 | 'stat_card' => 'background: #f9fafb; padding: 16px; border-radius: 6px; text-align: center; vertical-align: top;', |
| 22 | 'stat_value' => 'display: block; font-size: 28px; font-weight: 700; color: #111827; margin-bottom: 4px;', |
| 23 | 'stat_label' => 'display: block; font-size: 12px; color: #6b7280; text-transform: uppercase; letter-spacing: 0.5px;', |
| 24 | 'change_positive' => 'display: inline-block; padding: 2px 8px; background: #d1fae5; color: #065f46; font-size: 12px; font-weight: 600; border-radius: 9999px; margin-top: 8px;', |
| 25 | 'change_negative' => 'display: inline-block; padding: 2px 8px; background: #fee2e2; color: #991b1b; font-size: 12px; font-weight: 600; border-radius: 9999px; margin-top: 8px;', |
| 26 | 'table' => 'width: 100%; border-collapse: collapse; font-size: 14px;', |
| 27 | 'th' => 'padding: 12px 16px; text-align: left; background: #f9fafb; color: #374151; font-weight: 600; font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid #e5e7eb;', |
| 28 | 'td' => 'padding: 12px 16px; border-bottom: 1px solid #f3f4f6; color: #374151;', |
| 29 | 'link' => 'color: #4f46e5; text-decoration: none; font-weight: 500;', |
| 30 | 'badge' => 'display: inline-block; padding: 2px 8px; background: #eef2ff; color: #4338ca; font-size: 11px; font-weight: 600; border-radius: 4px;', |
| 31 | 'badge_gold' => 'display: inline-block; padding: 2px 8px; background: #fef3c7; color: #92400e; font-size: 11px; font-weight: 600; border-radius: 4px;', |
| 32 | 'bar' => 'height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden;', |
| 33 | 'bar_fill' => 'height: 100%; background: linear-gradient(90deg, #6366f1, #4f46e5); border-radius: 4px;', |
| 34 | 'empty' => 'padding: 32px; text-align: center; color: #9ca3af; font-size: 14px;', |
| 35 | ]; |
| 36 | ?> |
| 37 | |
| 38 | <!-- Report Header --> |
| 39 | <div style="text-align: center; margin-bottom: 32px;"> |
| 40 | <h1 style="margin: 0 0 8px 0; font-size: 24px; font-weight: 700; color: #111827;"> |
| 41 | <?php echo esc_html($data['period_label']); ?> <?php _e('Activity Report', 'download-manager'); ?> |
| 42 | </h1> |
| 43 | <p style="margin: 0; font-size: 14px; color: #6b7280;"> |
| 44 | <?php echo esc_html($data['date_range']); ?> |
| 45 | </p> |
| 46 | </div> |
| 47 | |
| 48 | <?php if (!empty($data['download_summary'])): ?> |
| 49 | <!-- Download Summary --> |
| 50 | <div style="<?php echo $styles['section']; ?>"> |
| 51 | <h2 style="<?php echo $styles['heading']; ?>"> |
| 52 | <?php _e('Downloads Overview', 'download-manager'); ?> |
| 53 | </h2> |
| 54 | |
| 55 | <table style="<?php echo $styles['stat_grid']; ?>"> |
| 56 | <tr> |
| 57 | <td style="<?php echo $styles['stat_card']; ?> width: 33%;"> |
| 58 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['download_summary']['total']); ?></span> |
| 59 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Total Downloads', 'download-manager'); ?></span> |
| 60 | <?php |
| 61 | $changeClass = $data['download_summary']['change_class'] === 'positive' ? $styles['change_positive'] : $styles['change_negative']; |
| 62 | ?> |
| 63 | <span style="<?php echo $changeClass; ?>"><?php echo esc_html($data['download_summary']['change']); ?></span> |
| 64 | </td> |
| 65 | <td style="<?php echo $styles['stat_card']; ?> width: 33%;"> |
| 66 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['download_summary']['daily_average'], 1); ?></span> |
| 67 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Daily Average', 'download-manager'); ?></span> |
| 68 | </td> |
| 69 | <td style="<?php echo $styles['stat_card']; ?> width: 33%;"> |
| 70 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['download_summary']['peak_day_count']); ?></span> |
| 71 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Peak Day', 'download-manager'); ?></span> |
| 72 | <span style="display: block; font-size: 12px; color: #6b7280; margin-top: 4px;"><?php echo esc_html($data['download_summary']['peak_day']); ?></span> |
| 73 | </td> |
| 74 | </tr> |
| 75 | </table> |
| 76 | </div> |
| 77 | <?php endif; ?> |
| 78 | |
| 79 | <?php if (!empty($data['top_packages'])): ?> |
| 80 | <!-- Top Packages --> |
| 81 | <div style="<?php echo $styles['section']; ?>"> |
| 82 | <h2 style="<?php echo $styles['heading']; ?>"> |
| 83 | <?php _e('Top Downloads', 'download-manager'); ?> |
| 84 | </h2> |
| 85 | |
| 86 | <?php if (count($data['top_packages']) > 0): ?> |
| 87 | <table style="<?php echo $styles['table']; ?>"> |
| 88 | <thead> |
| 89 | <tr> |
| 90 | <th style="<?php echo $styles['th']; ?> width: 40px;">#</th> |
| 91 | <th style="<?php echo $styles['th']; ?>"><?php _e('Package', 'download-manager'); ?></th> |
| 92 | <th style="<?php echo $styles['th']; ?> width: 120px; text-align: right;"><?php _e('Downloads', 'download-manager'); ?></th> |
| 93 | </tr> |
| 94 | </thead> |
| 95 | <tbody> |
| 96 | <?php foreach ($data['top_packages'] as $package): ?> |
| 97 | <tr> |
| 98 | <td style="<?php echo $styles['td']; ?>"> |
| 99 | <?php if ($package['rank'] <= 3): ?> |
| 100 | <span style="<?php echo $styles['badge_gold']; ?>">#<?php echo $package['rank']; ?></span> |
| 101 | <?php else: ?> |
| 102 | <span style="color: #9ca3af;">#<?php echo $package['rank']; ?></span> |
| 103 | <?php endif; ?> |
| 104 | </td> |
| 105 | <td style="<?php echo $styles['td']; ?>"> |
| 106 | <a href="<?php echo esc_url($package['url']); ?>" style="<?php echo $styles['link']; ?>"> |
| 107 | <?php echo esc_html($package['title']); ?> |
| 108 | </a> |
| 109 | <div style="margin-top: 8px;"> |
| 110 | <div style="<?php echo $styles['bar']; ?>"> |
| 111 | <div style="<?php echo $styles['bar_fill']; ?> width: <?php echo $package['bar_width']; ?>%;"></div> |
| 112 | </div> |
| 113 | </div> |
| 114 | </td> |
| 115 | <td style="<?php echo $styles['td']; ?> text-align: right; font-weight: 600;"> |
| 116 | <?php echo number_format($package['downloads']); ?> |
| 117 | </td> |
| 118 | </tr> |
| 119 | <?php endforeach; ?> |
| 120 | </tbody> |
| 121 | </table> |
| 122 | <?php else: ?> |
| 123 | <div style="<?php echo $styles['empty']; ?>"> |
| 124 | <?php _e('No downloads recorded during this period.', 'download-manager'); ?> |
| 125 | </div> |
| 126 | <?php endif; ?> |
| 127 | </div> |
| 128 | <?php endif; ?> |
| 129 | |
| 130 | <?php if (!empty($data['trending_packages'])): ?> |
| 131 | <!-- Trending Packages --> |
| 132 | <div style="<?php echo $styles['section']; ?>"> |
| 133 | <h2 style="<?php echo $styles['heading']; ?>"> |
| 134 | <?php _e('Trending Packages', 'download-manager'); ?> |
| 135 | </h2> |
| 136 | |
| 137 | <?php if (count($data['trending_packages']) > 0): ?> |
| 138 | <table style="<?php echo $styles['table']; ?>"> |
| 139 | <thead> |
| 140 | <tr> |
| 141 | <th style="<?php echo $styles['th']; ?>"><?php _e('Package', 'download-manager'); ?></th> |
| 142 | <th style="<?php echo $styles['th']; ?> width: 100px; text-align: center;"><?php _e('Previous', 'download-manager'); ?></th> |
| 143 | <th style="<?php echo $styles['th']; ?> width: 100px; text-align: center;"><?php _e('Current', 'download-manager'); ?></th> |
| 144 | <th style="<?php echo $styles['th']; ?> width: 100px; text-align: right;"><?php _e('Growth', 'download-manager'); ?></th> |
| 145 | </tr> |
| 146 | </thead> |
| 147 | <tbody> |
| 148 | <?php foreach ($data['trending_packages'] as $package): ?> |
| 149 | <tr> |
| 150 | <td style="<?php echo $styles['td']; ?>"> |
| 151 | <a href="<?php echo esc_url($package['url']); ?>" style="<?php echo $styles['link']; ?>"> |
| 152 | <?php echo esc_html($package['title']); ?> |
| 153 | </a> |
| 154 | </td> |
| 155 | <td style="<?php echo $styles['td']; ?> text-align: center; color: #6b7280;"> |
| 156 | <?php echo number_format($package['previous_downloads']); ?> |
| 157 | </td> |
| 158 | <td style="<?php echo $styles['td']; ?> text-align: center; font-weight: 600;"> |
| 159 | <?php echo number_format($package['current_downloads']); ?> |
| 160 | </td> |
| 161 | <td style="<?php echo $styles['td']; ?> text-align: right;"> |
| 162 | <span style="<?php echo $styles['change_positive']; ?>"><?php echo esc_html($package['growth_text']); ?></span> |
| 163 | </td> |
| 164 | </tr> |
| 165 | <?php endforeach; ?> |
| 166 | </tbody> |
| 167 | </table> |
| 168 | <?php else: ?> |
| 169 | <div style="<?php echo $styles['empty']; ?>"> |
| 170 | <?php _e('No trending packages found for this period.', 'download-manager'); ?> |
| 171 | </div> |
| 172 | <?php endif; ?> |
| 173 | </div> |
| 174 | <?php endif; ?> |
| 175 | |
| 176 | <?php if (!empty($data['user_activity'])): ?> |
| 177 | <!-- User Activity --> |
| 178 | <div style="<?php echo $styles['section']; ?>"> |
| 179 | <h2 style="<?php echo $styles['heading']; ?>"> |
| 180 | <?php _e('User Activity', 'download-manager'); ?> |
| 181 | </h2> |
| 182 | |
| 183 | <table style="<?php echo $styles['stat_grid']; ?>"> |
| 184 | <tr> |
| 185 | <td style="<?php echo $styles['stat_card']; ?> width: 25%;"> |
| 186 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['user_activity']['new_users']); ?></span> |
| 187 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('New Users', 'download-manager'); ?></span> |
| 188 | </td> |
| 189 | <td style="<?php echo $styles['stat_card']; ?> width: 25%;"> |
| 190 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['user_activity']['unique_downloaders']); ?></span> |
| 191 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Unique Downloaders', 'download-manager'); ?></span> |
| 192 | </td> |
| 193 | <td style="<?php echo $styles['stat_card']; ?> width: 25%;"> |
| 194 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['user_activity']['registered_downloaders']); ?></span> |
| 195 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Registered', 'download-manager'); ?></span> |
| 196 | </td> |
| 197 | <td style="<?php echo $styles['stat_card']; ?> width: 25%;"> |
| 198 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['user_activity']['guest_downloaders']); ?></span> |
| 199 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Guests', 'download-manager'); ?></span> |
| 200 | </td> |
| 201 | </tr> |
| 202 | </table> |
| 203 | |
| 204 | <?php if (!empty($data['user_activity']['top_downloaders'])): ?> |
| 205 | <h3 style="<?php echo $styles['subheading']; ?> margin-top: 24px;"> |
| 206 | <?php _e('Top Downloaders', 'download-manager'); ?> |
| 207 | </h3> |
| 208 | <table style="<?php echo $styles['table']; ?>"> |
| 209 | <thead> |
| 210 | <tr> |
| 211 | <th style="<?php echo $styles['th']; ?>"><?php _e('User', 'download-manager'); ?></th> |
| 212 | <th style="<?php echo $styles['th']; ?> width: 100px; text-align: right;"><?php _e('Downloads', 'download-manager'); ?></th> |
| 213 | </tr> |
| 214 | </thead> |
| 215 | <tbody> |
| 216 | <?php foreach ($data['user_activity']['top_downloaders'] as $user): ?> |
| 217 | <tr> |
| 218 | <td style="<?php echo $styles['td']; ?>"> |
| 219 | <strong><?php echo esc_html($user['name']); ?></strong> |
| 220 | <span style="display: block; font-size: 12px; color: #6b7280;"><?php echo esc_html($user['email']); ?></span> |
| 221 | </td> |
| 222 | <td style="<?php echo $styles['td']; ?> text-align: right; font-weight: 600;"> |
| 223 | <?php echo number_format($user['downloads']); ?> |
| 224 | </td> |
| 225 | </tr> |
| 226 | <?php endforeach; ?> |
| 227 | </tbody> |
| 228 | </table> |
| 229 | <?php endif; ?> |
| 230 | </div> |
| 231 | <?php endif; ?> |
| 232 | |
| 233 | <?php if (!empty($data['category_breakdown'])): ?> |
| 234 | <!-- Category Breakdown --> |
| 235 | <div style="<?php echo $styles['section']; ?>"> |
| 236 | <h2 style="<?php echo $styles['heading']; ?>"> |
| 237 | <?php _e('Category Breakdown', 'download-manager'); ?> |
| 238 | </h2> |
| 239 | |
| 240 | <?php if (count($data['category_breakdown']) > 0): ?> |
| 241 | <table style="<?php echo $styles['table']; ?>"> |
| 242 | <thead> |
| 243 | <tr> |
| 244 | <th style="<?php echo $styles['th']; ?>"><?php _e('Category', 'download-manager'); ?></th> |
| 245 | <th style="<?php echo $styles['th']; ?> width: 100px; text-align: center;"><?php _e('Downloads', 'download-manager'); ?></th> |
| 246 | <th style="<?php echo $styles['th']; ?> width: 80px; text-align: center;"><?php _e('Share', 'download-manager'); ?></th> |
| 247 | <th style="<?php echo $styles['th']; ?> width: 80px; text-align: right;"><?php _e('Change', 'download-manager'); ?></th> |
| 248 | </tr> |
| 249 | </thead> |
| 250 | <tbody> |
| 251 | <?php foreach (array_slice($data['category_breakdown'], 0, 10) as $category): ?> |
| 252 | <tr> |
| 253 | <td style="<?php echo $styles['td']; ?>"> |
| 254 | <?php if (!is_wp_error($category['url'])): ?> |
| 255 | <a href="<?php echo esc_url($category['url']); ?>" style="<?php echo $styles['link']; ?>"> |
| 256 | <?php echo esc_html($category['name']); ?> |
| 257 | </a> |
| 258 | <?php else: ?> |
| 259 | <?php echo esc_html($category['name']); ?> |
| 260 | <?php endif; ?> |
| 261 | </td> |
| 262 | <td style="<?php echo $styles['td']; ?> text-align: center; font-weight: 600;"> |
| 263 | <?php echo number_format($category['downloads']); ?> |
| 264 | </td> |
| 265 | <td style="<?php echo $styles['td']; ?> text-align: center;"> |
| 266 | <span style="<?php echo $styles['badge']; ?>"><?php echo $category['percentage']; ?>%</span> |
| 267 | </td> |
| 268 | <td style="<?php echo $styles['td']; ?> text-align: right;"> |
| 269 | <?php |
| 270 | $isPositive = strpos($category['change'], '+') === 0; |
| 271 | $changeStyle = $isPositive ? $styles['change_positive'] : $styles['change_negative']; |
| 272 | ?> |
| 273 | <span style="<?php echo $changeStyle; ?>"><?php echo esc_html($category['change']); ?></span> |
| 274 | </td> |
| 275 | </tr> |
| 276 | <?php endforeach; ?> |
| 277 | </tbody> |
| 278 | </table> |
| 279 | <?php else: ?> |
| 280 | <div style="<?php echo $styles['empty']; ?>"> |
| 281 | <?php _e('No category data available.', 'download-manager'); ?> |
| 282 | </div> |
| 283 | <?php endif; ?> |
| 284 | </div> |
| 285 | <?php endif; ?> |
| 286 | |
| 287 | <?php if (!empty($data['revenue_summary'])): ?> |
| 288 | <!-- Revenue Summary --> |
| 289 | <div style="<?php echo $styles['section']; ?> border-color: #10b981;"> |
| 290 | <h2 style="<?php echo $styles['heading']; ?> color: #065f46;"> |
| 291 | <?php _e('Revenue Summary', 'download-manager'); ?> |
| 292 | </h2> |
| 293 | |
| 294 | <table style="<?php echo $styles['stat_grid']; ?>"> |
| 295 | <tr> |
| 296 | <td style="<?php echo $styles['stat_card']; ?> background: #ecfdf5; width: 33%;"> |
| 297 | <span style="<?php echo $styles['stat_value']; ?> color: #065f46;"><?php echo esc_html($data['revenue_summary']['revenue_formatted']); ?></span> |
| 298 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Total Revenue', 'download-manager'); ?></span> |
| 299 | <?php |
| 300 | $changeClass = $data['revenue_summary']['change_class'] === 'positive' ? $styles['change_positive'] : $styles['change_negative']; |
| 301 | ?> |
| 302 | <span style="<?php echo $changeClass; ?>"><?php echo esc_html($data['revenue_summary']['change']); ?></span> |
| 303 | </td> |
| 304 | <td style="<?php echo $styles['stat_card']; ?> width: 33%;"> |
| 305 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['revenue_summary']['orders']); ?></span> |
| 306 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Orders', 'download-manager'); ?></span> |
| 307 | </td> |
| 308 | <td style="<?php echo $styles['stat_card']; ?> width: 33%;"> |
| 309 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo esc_html($data['revenue_summary']['average_order']); ?></span> |
| 310 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Avg. Order Value', 'download-manager'); ?></span> |
| 311 | </td> |
| 312 | </tr> |
| 313 | </table> |
| 314 | |
| 315 | <?php if (!empty($data['revenue_summary']['top_products'])): ?> |
| 316 | <h3 style="<?php echo $styles['subheading']; ?> margin-top: 24px;"> |
| 317 | <?php _e('Top Selling Products', 'download-manager'); ?> |
| 318 | </h3> |
| 319 | <table style="<?php echo $styles['table']; ?>"> |
| 320 | <thead> |
| 321 | <tr> |
| 322 | <th style="<?php echo $styles['th']; ?>"><?php _e('Product', 'download-manager'); ?></th> |
| 323 | <th style="<?php echo $styles['th']; ?> width: 80px; text-align: center;"><?php _e('Sold', 'download-manager'); ?></th> |
| 324 | <th style="<?php echo $styles['th']; ?> width: 100px; text-align: right;"><?php _e('Revenue', 'download-manager'); ?></th> |
| 325 | </tr> |
| 326 | </thead> |
| 327 | <tbody> |
| 328 | <?php foreach ($data['revenue_summary']['top_products'] as $product): ?> |
| 329 | <tr> |
| 330 | <td style="<?php echo $styles['td']; ?>"><?php echo esc_html($product['title']); ?></td> |
| 331 | <td style="<?php echo $styles['td']; ?> text-align: center;"><?php echo number_format($product['quantity']); ?></td> |
| 332 | <td style="<?php echo $styles['td']; ?> text-align: right; font-weight: 600; color: #065f46;"> |
| 333 | <?php echo esc_html($data['revenue_summary']['currency'] . number_format($product['revenue'], 2)); ?> |
| 334 | </td> |
| 335 | </tr> |
| 336 | <?php endforeach; ?> |
| 337 | </tbody> |
| 338 | </table> |
| 339 | <?php endif; ?> |
| 340 | </div> |
| 341 | <?php endif; ?> |
| 342 | |
| 343 | <?php if (!empty($data['storage_usage'])): ?> |
| 344 | <!-- Storage Usage --> |
| 345 | <div style="<?php echo $styles['section']; ?>"> |
| 346 | <h2 style="<?php echo $styles['heading']; ?>"> |
| 347 | <?php _e('Storage Usage', 'download-manager'); ?> |
| 348 | </h2> |
| 349 | |
| 350 | <table style="<?php echo $styles['stat_grid']; ?>"> |
| 351 | <tr> |
| 352 | <td style="<?php echo $styles['stat_card']; ?> width: 25%;"> |
| 353 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo esc_html($data['storage_usage']['total_size']); ?></span> |
| 354 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Total Size', 'download-manager'); ?></span> |
| 355 | </td> |
| 356 | <td style="<?php echo $styles['stat_card']; ?> width: 25%;"> |
| 357 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['storage_usage']['file_count']); ?></span> |
| 358 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Total Files', 'download-manager'); ?></span> |
| 359 | </td> |
| 360 | <td style="<?php echo $styles['stat_card']; ?> width: 25%;"> |
| 361 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['storage_usage']['package_count']); ?></span> |
| 362 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('Packages', 'download-manager'); ?></span> |
| 363 | </td> |
| 364 | <td style="<?php echo $styles['stat_card']; ?> width: 25%;"> |
| 365 | <span style="<?php echo $styles['stat_value']; ?>"><?php echo number_format($data['storage_usage']['new_packages']); ?></span> |
| 366 | <span style="<?php echo $styles['stat_label']; ?>"><?php _e('New This Period', 'download-manager'); ?></span> |
| 367 | </td> |
| 368 | </tr> |
| 369 | </table> |
| 370 | |
| 371 | <?php if (!empty($data['storage_usage']['largest_packages'])): ?> |
| 372 | <h3 style="<?php echo $styles['subheading']; ?> margin-top: 24px;"> |
| 373 | <?php _e('Largest Packages', 'download-manager'); ?> |
| 374 | </h3> |
| 375 | <table style="<?php echo $styles['table']; ?>"> |
| 376 | <thead> |
| 377 | <tr> |
| 378 | <th style="<?php echo $styles['th']; ?>"><?php _e('Package', 'download-manager'); ?></th> |
| 379 | <th style="<?php echo $styles['th']; ?> width: 100px; text-align: right;"><?php _e('Size', 'download-manager'); ?></th> |
| 380 | </tr> |
| 381 | </thead> |
| 382 | <tbody> |
| 383 | <?php foreach ($data['storage_usage']['largest_packages'] as $package): ?> |
| 384 | <tr> |
| 385 | <td style="<?php echo $styles['td']; ?>"><?php echo esc_html($package['title']); ?></td> |
| 386 | <td style="<?php echo $styles['td']; ?> text-align: right; font-weight: 600;"> |
| 387 | <?php echo esc_html($package['size']); ?> |
| 388 | </td> |
| 389 | </tr> |
| 390 | <?php endforeach; ?> |
| 391 | </tbody> |
| 392 | </table> |
| 393 | <?php endif; ?> |
| 394 | </div> |
| 395 | <?php endif; ?> |
| 396 | |
| 397 | <!-- Footer --> |
| 398 | <div style="text-align: center; padding: 24px 0; border-top: 1px solid #e5e7eb; margin-top: 32px;"> |
| 399 | <p style="margin: 0 0 8px 0; font-size: 13px; color: #6b7280;"> |
| 400 | <?php _e('This report was automatically generated by WordPress Download Manager.', 'download-manager'); ?> |
| 401 | </p> |
| 402 | <p style="margin: 0;"> |
| 403 | <a href="<?php echo admin_url('edit.php?post_type=wpdmpro&page=settings&tab=activity-reports'); ?>" style="<?php echo $styles['link']; ?> font-size: 13px;"> |
| 404 | <?php _e('Manage Report Settings', 'download-manager'); ?> |
| 405 | </a> |
| 406 | </p> |
| 407 | </div> |
| 408 |