This repository was archived by the owner on Feb 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathp_index.php
More file actions
114 lines (101 loc) · 3.05 KB
/
Copy pathp_index.php
File metadata and controls
114 lines (101 loc) · 3.05 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
<?php
require_once("header.php");
require_once("hash_functions.php");
require_once("position_check.php");
require_once("connect.php");
if(empty($_SESSION['username'] && $_POST)){
$login = Login();
$var = $login[0];
$message = $login[1];
if(!$var){
die("$message<br><a href='p_login.php'>Try again!</a>");
}
}
$statusID = $_SESSION['statusID'];
$username = 'fractimal';
$playlistsquery = "
SELECT playlist_name, playlistID, username
FROM libplaylists
WHERE
username = 'fractimal'
LIMIT 10";
//Submit Queries
$playlists = mysql_query($playlistsquery, $link);
echo "
<!DOCTYPE html>
<html lang='en'>
<head>
<script src='//ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js'></script>
<meta charset='utf-8'>
<title>WIZBIZ</title>
<link rel='stylesheet' href='p_style.css' />
</head>
<body>
<div id='container'>
<div id = 'header'>
<h1>WSBF-FM Clemson</h1>
<strong>Welcome, ".$_SESSION['username']."</strong>
<a href=\"logout.php\">Log out</a>
</div>
<div id ='plateau'>
<div id='actions_container'>
<a live = true href='p_library.php'>Library</a> <br>
<a href='p_automate.php'>Automation Queue</a> <br>
<a href='p_profile.php'>Profiles and Archives</a><br>
<a href='schedule/schedule.php'>Schedule</a><br>
<a href=\"rotation_control.php\">Labels/Rotation</a><br>
<a href=\"import/import_main.php\">Import Music</a><br>
<a href='p_weekly_top_20_tracks.php'>Weekly top 20</a><br>
<a href='p_playlists.php'>Playlists</a><br>";
//if ($playlists) {
while ( $row = mysql_fetch_assoc($playlists)) {
echo " <a href='p_playlists.php?playlistID=".$row['playlistID']."'> - ".$row['playlist_name']."</a><br>";
}
//}
echo "
</div>
<div id='center'></div>
</div>
<div id = 'footer'>
<a>|> BIRBS w/ Rob & Katie</a>
</div>
</div>
</body>";
/*
if(reviewCheck()){}
if(MD_check()){}
if(positionCheck("seniorstaff")){}
if(positionCheck(array("Computer Engineer", "Chief Engineer", "Equipment Engineer", "Promotions Director"))){}
if ($statusID == 0 or $statusID == 1 or $statusID == 2 or $statusID == 4) {}
*/
echo "
<script type = 'text/javascript'>
$(function() {
$.post('p_library.php', function(data) {
$('#center').html(data);
});
});
$('#actions_container a').click(function (event) {
event.preventDefault();
var wizbif = $(this).attr('href');
$.post(wizbif, function(data) {
$('#center').html(data);
});
$('[live=true]').attr('live', false);
$(this).attr('live', true);
//change browser URL to the given link location
if(wizbif!=window.location){
//window.history.pushState({path:wizbif},'',wizbif);
}
/*
// the below code is to override back button to get the ajax content without page reload
$(window).bind('popstate', function() {
$.ajax({wizbif,success: function(data){
//$('#center').html(data);
}});
});
*/
});
</script>
</html>";
?>