<?php
// Change to the fees directory to match the relative paths in my_fees.php
chdir('fees');

session_start();

// Simulate a student login
$_SESSION['user_id'] = 16992;
$_SESSION['user_role'] = 'student';

// Include the my_fees.php content but capture the output
ob_start();
include 'my_fees.php';
$content = ob_get_contents();
ob_end_clean();

// Check if payments are displayed
if (strpos($content, 'Payment History') !== false || strpos($content, 'পেমেন্ট হিস্টোরি') !== false) {
    echo "SUCCESS: Payment history section found in the page\n";
    
    // Check if actual payments are displayed
    if (strpos($content, '450.00') !== false) {
        echo "SUCCESS: Payment amounts found in the page\n";
    } else {
        echo "WARNING: No payment amounts found in the page\n";
    }
} else {
    echo "ERROR: Payment history section not found in the page\n";
}

echo "Test completed.\n";
?>