![]() Server : Apache/2 System : Linux server-15-235-50-60 5.15.0-164-generic #174-Ubuntu SMP Fri Nov 14 20:25:16 UTC 2025 x86_64 User : gositeme ( 1004) PHP Version : 8.2.29 Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname Directory : /home/gositeme/domains/soundstudiopro.com/public_html/ |
<?php
session_start();
echo "š§ Forcing Stephane's Session...\n";
// Force Stephane's user ID (5) into the session
$_SESSION['user_id'] = 5;
$_SESSION['name'] = 'stephane bergeron';
$_SESSION['email'] = 'stevenberg450@gmail.com';
$_SESSION['credits'] = 5;
echo "ā
Session updated:\n";
echo "User ID: " . $_SESSION['user_id'] . "\n";
echo "Name: " . $_SESSION['name'] . "\n";
echo "Email: " . $_SESSION['email'] . "\n";
echo "Credits: " . $_SESSION['credits'] . "\n\n";
// Test the library query with the forced session
require_once 'config/database.php';
try {
$pdo = getDBConnection();
$user_id = $_SESSION['user_id'];
$status_filter = 'all';
$sort_filter = 'latest';
$where_clause = "WHERE mt.user_id = ?";
$params = [$user_id];
if ($status_filter !== 'all') {
$where_clause .= " AND mt.status = ?";
$params[] = $status_filter;
}
$order_clause = "ORDER BY mt.created_at DESC";
$stmt = $pdo->prepare("
SELECT
mt.*,
(SELECT COUNT(*) FROM audio_variations WHERE track_id = mt.id) as variation_count,
CASE
WHEN mt.created_at >= DATE_SUB(NOW(), INTERVAL 1 HOUR) THEN 'š„ Hot'
WHEN mt.created_at >= DATE_SUB(NOW(), INTERVAL 24 HOUR) THEN 'ā New'
ELSE ''
END as badge
FROM music_tracks mt
$where_clause
$order_clause
");
$stmt->execute($params);
$tracks = $stmt->fetchAll();
echo "šµ Library query result: " . count($tracks) . " tracks found\n";
if (count($tracks) > 0) {
echo "First track: " . $tracks[0]['title'] . "\n";
echo "Last track: " . $tracks[count($tracks)-1]['title'] . "\n";
}
echo "\nā
Stephane's session is now active!\n";
echo "šÆ You can now visit /library.php and see all 13 tracks.\n";
echo "š <a href='/library.php'>Go to Library</a>\n";
} catch (Exception $e) {
echo "ā Error: " . $e->getMessage() . "\n";
}
?>