hjkhjkjhkhjkgjghjhgjhgjghjhghjghjhgjjnbvnvbnvk
bnmbnmbnhjkhjkhjkhjktyutyutyuytutyutyutyhgjgjghjgjghjguytutyry
/
home
/
wjcvelqp
/
biblog
/
Upload FileeE
HOME
<?php include 'includes/header.php'; ?> <div class="max-w-7xl mx-auto px-4 py-12"> <div class="text-center mb-12"> <h1 class="text-5xl font-bold text-green-800">🎵 Bassa Infotainment Music Hub</h1> <p class="text-gray-600 mt-3 text-lg">Discover & Download Talented Artists Music </p> </div> <!-- Upload Button - Red --> <div class="text-center mb-16"> <a href="upload-music.php" class="inline-flex items-center gap-3 bg-red-600 hover:bg-red-700 text-white px-10 py-5 rounded-2xl text-lg font-semibold transition"> 📤 Upload Your Song </a> </div> <!-- Approved Songs --> <h2 class="text-2xl font-bold mb-8 flex items-center gap-3"> <span class="text-green-600">✅</span> Download Songs </h2> <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-8"> <?php $stmt = $pdo->query("SELECT * FROM music WHERE status = 'approved' ORDER BY created_at DESC LIMIT 12"); $songs = $stmt->fetchAll(PDO::FETCH_ASSOC); if (empty($songs)): ?> <div class="col-span-full text-center py-20 text-gray-500"> No approved songs yet. Check back later! </div> <?php else: ?> <?php foreach($songs as $song): $file_path = 'uploads/' . $song['audio_file']; $file_size = file_exists($file_path) ? round(filesize($file_path) / 1024 / 1024, 2) . ' MB' : 'N/A'; ?> <div class="bg-white rounded-3xl shadow-md overflow-hidden hover:shadow-xl transition"> <?php if($song['cover_image']): ?> <img src="uploads/<?= htmlspecialchars($song['cover_image']) ?>" class="w-full h-56 object-cover"> <?php endif; ?> <div class="p-6"> <h3 class="font-bold text-lg"><?= htmlspecialchars($song['title']) ?></h3> <p class="text-green-700 font-medium"><?= htmlspecialchars($song['artist']) ?></p> <?php if($song['description']): ?> <p class="text-sm text-gray-600 mt-3 line-clamp-3"><?= htmlspecialchars($song['description']) ?></p> <?php endif; ?> <!-- Download Button + Size --> <div class="mt-6 flex items-center gap-4"> <a href="uploads/<?= htmlspecialchars($song['audio_file']) ?>" download="<?= htmlspecialchars($song['title']) ?>.mp3" class="flex-1 bg-green-700 hover:bg-green-800 text-white px-6 py-4 rounded-2xl flex items-center justify-center gap-2 font-medium"> <i class="fas fa-download"></i> Download </a> <span class="text-sm text-gray-500 whitespace-nowrap"> <?= $file_size ?> </span> </div> </div> </div> <?php endforeach; ?> <?php endif; ?> </div> </div> <?php include 'includes/footer.php'; ?>