50000000) { // 50 MB $upload_error = 'File is too large. Maximum size is 50 MB.'; } else { $file_name = uniqid() . '-' . basename($file['name']); $upload_path = 'uploads/' . $file_name; if (move_uploaded_file($file['tmp_name'], $upload_path)) { try { $stmt = db()->prepare("INSERT INTO songs (user_id, title, artist, file_path) VALUES (?, ?, ?, ?)"); $stmt->execute([$user_id, $title, $artist, $upload_path]); $upload_success = 'Song uploaded successfully!'; } catch (PDOException $e) { $upload_error = "Database error: " . $e->getMessage(); } } else { $upload_error = 'Failed to move uploaded file.'; } } } } // Fetch user's songs $songs = []; try { $stmt = db()->prepare("SELECT id, title, artist, uploaded_at FROM songs WHERE user_id = ? ORDER BY uploaded_at DESC"); $stmt->execute([$user_id]); $songs = $stmt->fetchAll(); } catch (PDOException $e) { // Handle database error } // Fetch user's subscription $subscription = null; try { $stmt = db()->prepare("SELECT plan, status, end_date FROM subscriptions WHERE user_id = ? ORDER BY created_at DESC LIMIT 1"); $stmt->execute([$user_id]); $subscription = $stmt->fetch(); } catch (PDOException $e) { // Handle database error } ?> Dashboard - Veritune

Welcome, !

Subscription Status

Plan:

Status:

Next Billing Date:

You are currently on the Free plan.

Upgrade to Pro

Upload a New Song

Your Songs

Title Artist Uploaded On Action
You haven't uploaded any songs yet.
Generate Certificate