<?php
// Temporary connection to cyberbotnet database
$conn = new mysqli('localhost', 'root', '', 'cyberbotnet');

if ($conn->connect_error) {
    die("Connection failed: " . $conn->connect_error);
}

// Show all users with their license information
echo "Users and their license information:<br><br>";
$users = $conn->query("SELECT id_user, username, license_key, license_start, license_end, license_status FROM users");
if ($users) {
    while ($user = $users->fetch_assoc()) {
        echo "Username: " . $user['username'] . "<br>";
        echo "License Key: " . ($user['license_key'] ?? 'NULL') . "<br>";
        echo "License Start: " . ($user['license_start'] ?? 'NULL') . "<br>";
        echo "License End: " . ($user['license_end'] ?? 'NULL') . "<br>";
        echo "License Status: " . ($user['license_status'] ?? 'NULL') . "<br>";
        echo "<br>";
    }
} else {
    echo "Error: " . $conn->error . "<br>";
}

$conn->close();
?> 