📁 Folder Navigator
Position:
Root
/
apphome
/
support
Create
Folders
No folders here.
Files
📄 displayadmintimecatalog.php
📄 index.php
📄 terms.php
📝 File Editor
Editing:
displayadmintimecatalog.php
<?php // Path to your xml file database $xmlFilePath = '../admin\access\vidkeys\adminmasterusers.xml'; if (!file_exists($xmlFilePath)) { die("Error: The file database '{$xmlFilePath}' does not exist."); } // Load the XML file $xml = simplexml_load_file($xmlFilePath); if ($xml === false) { die("Error: Failed to parse XML file."); } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Inline User Expiration Dashboard</title> <style> body { font-family: Arial, sans-serif; background-color: #f4f6f9; margin: 05px; } .user-card { background: transparent; padding: 5px; margin-bottom: 5px; border-radius: 6px; box-shadow: 0 2px 4px rgba(0,0,0,0.00); } .user-id { font-weight: bold; color: #007bff; } .user-email { color: #555; font-style: italic; } /* Style to handle the clean inline presentation layout */ .date-inline-wrapper { display: inline-block; margin-left: 5px; font-size: 10px; background: #eef2f7; padding: 0px 0px; border-radius: 4px; } .date-label { font-weight: bold; color: #333; } .date-val { color: #28a745; font-family: monospace; } .date-divider { color: #aaa; margin: 0 6px; } </style> </head> <body> <?php foreach ($xml->user as $user): ?> <?php // 1. Calculate Start Date (Since XML has no explicit creation field, we fallback toEpoch 0 or use current server time) // If you later add a <start_date> timestamp tag, change time() to: (int)$user->start_date $startTime = time(); $startDateStr = date('Y-m-d H:i', $startTime); // 2. Extract and parse the End/Expiration Date tag safely from your file $endTime = isset($user->expires) ? (int)$user->expires : 0; $endDateStr = ($endTime > 0) ? date('Y-m-d H:i', $endTime) : 'Never'; ?> <center> <div class="user-card"> <!-- Basic User Metadata Details --> <span style="font-size: 11px;" class="user-id">APPHOST ID: <?php echo htmlspecialchars($user->virtual_id); ?></span> <span style="font-size: 11px;" class="user-id">May Access <?php echo htmlspecialchars($user->access_levels); ?> Only!</span> <br> <!-- Clean Inline Presentation Block Grid --> <div class="date-inline-wrapper"> <span class="date-label">Start:</span> <span class="date-val"><?php echo $startDateStr; ?></span> <span class="date-divider">|</span> <span class="date-label">End/Expires:</span> <span class="date-val"><?php echo $endDateStr; ?></span><br> <span style="font-size: 7px;" class="user-id">*Invites sold after app host's end date are invalid. Send Complaint to complaint@n4sappme.com/Visit n4sappme.com to verify apphost. </span> </div> </div></center> <?php endforeach; ?> </body> </html>
💾 Save Changes