-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathadmin-GetClickSong.php
75 lines (74 loc) · 3.54 KB
/
admin-GetClickSong.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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<?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">
<link rel="stylesheet" href="assets/css/message.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
$song_id = $_GET['sid'];
$query = "SELECT * FROM songs WHERE id=$song_id";
$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>
<div class="confirmform">
<div class="innerform">
<h6>
Do you want to ban this member?
</h6>
<button class="btn-danger p-1 btn-sm" onclick="BanMember(<?php echo $song_id; ?>);"><i class="fas fa-trash-alt"></i> Yes</button>
<button class="btn-success p-1 mx-2 btn-sm" onclick="NoBanned()"><i class="fas fa-window-close"></i> No</button>
</div>
</div>
</body>
<script>
function BanMember(song_id){
location.assign('includes/handlers/banMemberHandler.php?id='+song_id);
}
function NoBanned(){
location.assign('admin-view.php');
}
</script>
</html>
<?php
}
else{
?>
<script>location.assign('admin-login.php')</script>
<?php
}
?>