-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.php
More file actions
94 lines (75 loc) · 3.4 KB
/
test.php
File metadata and controls
94 lines (75 loc) · 3.4 KB
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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
include("includes/config.php");
include("includes/classes/Artist.php");
include("includes/classes/Album.php");
include("includes/classes/Song.php");
// session_destroy(); :LOGOUT
if (isset($_SESSION['userLoggedIn'])) {
$userLoggedIn = $_SESSION['userLoggedIn'];
echo "<script> userLoggedIn = '$userLoggedIn' ; </script>";
} else {
header("Location: register.php");
}
?>
<!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://cdn.jsdelivr.net/npm/bootstrap-icons@1.7.2/font/bootstrap-icons.css">
<link rel="stylesheet" href="assets/css/style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script src="assets/js/script.js"></script>
<title>Mood</title>
</head>
<body>
<!--Main Container------------------->
<div id="mainContainer">
<!--Top Container------------------->
<div id="topContainer">
<div id="navBarContainer">
<nav class="navBar">
<span onclick="openPage('index.php')" class="logo">
<i class="bi bi-boombox-fill"></i> MOOD
</span>
<div class="group">
<div class="navItem">
<span onclick='openPage("search.php")' class="navItemLink">
search
<img src="assets/images/icons/searchr.png" class="icon" alt="search">
</span>
</div>
</div>
<div class="group">
<div class="navItem">
<span onclick="openPage('yourPlaylist.php')" class="navItemLink">Your Playlist</span>
</div>
</div>
</nav>
</div><!--navBar Left-->
<div id="mainViewContainer"><!--MainView Container------------------->
<div id="mainContent">
<?php
include("includes/includedFile.php") ;
?>
<h1 class="pageHeadingBig">Song Album</h1>
<div class="gridViewContainer">
<?php
$albumQuery = mysqli_query($con, "SELECT * FROM albums ORDER BY rand() LIMIT 10");
while ($row = mysqli_fetch_array($albumQuery)) {
echo "<div class='gridViewItem'>
<span onclick='openPage(\"album.php?id=".$row['id']."\")'>
<img src='" .$row['artworkPath']. "'>
<div class='gridViewInfo'>" .$row['title']. "</div>
</span>
</div>";
}
?>
</div>
</div>
</div>
</div><!--Top Container END here-->
</div><!--Main Container END here-->
</body>
</html>