-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsong-list.php
57 lines (55 loc) · 2.65 KB
/
song-list.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?php
session_start();
include("includes/config.php");
// checkig whelther admin is logged in or not
if(isset($_SESSION['adminLoggedIn']) && !empty($_SESSION['adminLoggedIn'])){
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="https://pro.fontawesome.com/releases/v5.10.0/css/all.css" integrity="sha384-AYmEC3Yw5cVb3ZcuHtOA93w35dYTsvhLPVnYs9eStHfGJvOvKxVfELGroGkvsg+p" crossorigin="anonymous"/>
<link rel="shortcut icon" type="/image/png" href="assets/images/titleimage.png">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x" crossorigin="anonymous">
<link rel="stylesheet" href="assets/css/song-list.css">
<title>Song-list</title>
</head>
<body>
<div class="fluid-container">
<nav class="navbar navbar-light bg-success" style="border-bottom:2px solid black; position:sticky; top:0; width:100%;">
<div class="container-fluid">
<a class="" href="admin-view.php" style="text-decoration: none; color:black; font-weight:bold;"><i class="fas fa-backward"></i> Back</a>
<a class="navbar-brand mx-auto" style="text-decoration: none; color:black; font-weight:bold;"href="song-list.php">Song List</a>
</div>
</nav>
<?php
$query = "SELECT * FROM songs";
$returnobj = $con->query($query);
$table = $returnobj->fetchAll();
foreach ($table as $song){
?>
<div class="song-list">
<div class="indiv">
<h5><?php echo $song['id']; ?></>
<h5><?php echo $song['title']; ?></h5><br>
<audio controls>
<source src="<?php echo $song['song_path'];?>" type="audio/mp3">
</audio>
</div>
</div>
<?php
}
?>
</div>
</body>
</html>
<?php
}
else{
?>
<script>location.assign('admin-login.php')</script>
<?php
}
?>