-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmusic_library.php
120 lines (114 loc) · 2.54 KB
/
music_library.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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
<?php
/************************************************
* Module: music_library.php *
* Author Name: J.D. Stone *
* *
* Purpose: Displays music library to user *
*************************************************/
require_once("Auth.inc.php");
require_once("Music.inc.php");
$pagename = basename($_SERVER['PHP_SELF']);
$auth = new Auth();
$music = new Music($pagename);
$music->setPageTitle("my music");
// Initialize the session
if (!isset($_SESSION)) {
session_start();
}
// Delete record
if ((isset($_GET['delete'])) && (is_numeric($_GET['delete']))) {
$music->deleteMusicRecord($_GET['delete']);
}
// Logout the current user
$logoutAction = $_SERVER['PHP_SELF']."?doLogout=true";
if ((isset($_SERVER['QUERY_STRING'])) && ($_SERVER['QUERY_STRING'] != "")) {
$logoutAction .= "&".htmlentities($_SERVER['QUERY_STRING']);
}
if ((isset($_GET['doLogout'])) && ($_GET['doLogout'] == "true")) {
$auth->doLogout();
}
// Restrict Access To Page: Grant or deny access to specified page
$authorizedUsers = "1,3";
$donotCheckaccess = "false";
$auth->checkAccess($authorizedUsers);
?>
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>StoneLibrary - My Music</title>
<link type="text/css" href="css/main.css" rel="stylesheet" media="screen">
<style type="text/css">
<!--
a {
text-decoration: none;
}
img {
border: 0;
}
.sidebar1 {
float: left;
width: 180px;
padding-bottom: 10px;
background-color: #ABBEDC;
height: 601px;
}
.content ul, .content ol {
padding: 0 15px 15px 40px;
}
#library {
background-image: url(images/rays_wood_1680_1_by_yc.jpg);
}
#library ul {
list-style-type: none;
margin: 0px;
list-style-position: outside;
}
#library ul li {
display: table-header-group;
}
#library fieldset {
border-top-style: none;
border-right-style: none;
border-bottom-style: none;
border-left-style: none;
}
.library_item {
position: relative;
width: 85px;
height: 100px;
float: left;
overflow: hidden;
padding: 8px;
margin: 5px 0 5px 10px;
}
.library_item img {
padding-right: 10px;
padding-left: 10px;
position: relative;
top: -22px;
}
.overlay_delete_item img {
position: relative;
z-index: 1;
top: -9px;
left: 76px;
margin: 0px;
padding: 0px;
}
-->
</style>
</head>
<body>
<div class="container">
<div class="sidebar1">
<?php echo $music->buildNavBar("music", $logoutAction); ?>
</div>
<div class="content">
<!-- **future feature** When library is empty, offer to 'add media' -->
<?php $music->buildLibrary("music"); ?>
</div>
<div class="clearfloat"></div>
</div>
</body>
</html>