-
Notifications
You must be signed in to change notification settings - Fork 4
/
header.html
64 lines (61 loc) · 1.9 KB
/
header.html
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
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SonicFlow</title>
<link rel="stylesheet" href="assets/style.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php if (isset($refresh) && $refresh) { ?>
<script type="text/javascript" src="assets/jquery.js"></script>
<script type="text/javascript">
function getUpdate() {
var data = {
id_front:<?php echo $from == "playing" ? '$("#songId").html()' : "\"$song_front->id\""; ?>,
id_back: "<?php echo $from == "queue" ? $song_back->id : ''; ?>",
from:"<?php echo $from; ?>"
};
jQuery.post('update.php',data, function(response) {
<?php if ($from == "playing") {
?>
if (response != 0) {
// logic for handling updated song for now playing.
updatePlaying(JSON.parse(response));
}
<?php } else {
?>
if (response == 1) {
window.location.reload();
}
<?php
}
?>
setTimeout("getUpdate()",<?php echo REFRESH_INTERVAL;?>);
});
}
</script>
<?php
}
?>
<link href="assets/sf.png" rel="icon" type="image/png" />
<script src="assets/functions.js"></script>
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-34485301-1']);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<div id="header" class="header"></div>
<div id="topNav" class="topNav" style="float:bottom;">
<ul>
<a href="queue.html"><li>Queue</li></a>
<a href="playing.html"><li>Now Playing</li></a>
<a href="search.html"><li>Search</li></a>
</ul>
</div>
<br />
<div class="content">