-
Notifications
You must be signed in to change notification settings - Fork 4
/
index.html
executable file
·89 lines (82 loc) · 3.9 KB
/
index.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
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
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<meta name="HandheldFriendly" content="True" />
<title>VoteMPD - Vote</title>
<link rel="stylesheet" href="js/jquery-ui-1.11.4.custom/jquery-ui.css">
<script src="js/jquery-1.11.3.min.js"></script>
<script src="js/jquery-ui-1.11.4.custom/jquery-ui.js"></script>
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<link rel="icon" href="gfx/favicon.ico" type="image/vnd.microsoft.icon">
</head>
<body>
<div id="banner">
VoteMPD
</div>
<div id="head">
<div id="innerhead">
Aktuelle informationen
</div>
</div>
<div id="next">
next
</div>
<div id="accordion">
<h3>Meine Stimmen</h3><div id="myvotes"></div>
<h3>Highscore anzeigen</h3><div id="high"></div>
<h3>Suchen</h3>
<div id="search">
<input type="text" id="search-text" name="search-text" placeholder="Eingabe..."><button onclick="javascript:doSearch();">Suchen</button>
<script>
$("#search-text").keyup(function(event){
if(event.keyCode == 13){
doSearch();
}
});
</script>
<ul></ul>
</div>
<h3>Ordner</h3><div id="browse-folders"></div>
<h3>Interpret</h3><div id="browse-artists"></div>
<h3>Album</h3><div id="browse-albums"></div>
<h3>Wiedergabelisten</h3><div id="browse-playlists"></div>
<h3>Häufig in Wiedergabelisten</h3><div id="browse-often-playlists"></div>
<h3>Häufig abgestimmt</h3><div id="browse-often-votes"></div>
<h3>Als letztes wiedergegeben</h3><div id="browse-playlog"></div>
<h3>Derzeitiges Lied überspringen</h3><div id="vote-skip"></div>
<h3>Datei hochladen</h3><div id="upload-file"></div>
<h3>Datei herunterladen</h3><div id="download-file"></div>
<h3>Häufig abgespielt</h3><div id="browse-often-played"></div>
</div>
<script type="text/javascript" src="js/script.js.php"></script>
<script type="text/javascript">
var ajaxpath = window.location.origin+"/ajax.php"; //absolute url to ajax.php
var ajaxpathrel = "ajax.php"; //relative path to ajax.php
var lastcurrent = null; //last fileinfos for currently played song
var tempposition = null; //interpolated position of song
var intervalfast = 1000; //fast update interval (interpolate song position)
var currentFolder = -1; //first folder for "browse-folders"
var currentArtist = "ROOT"; //first folder for "browse-artists"
var currentAlbum = "ROOT"; //first folder for "browse-albums"
var currentPlaylist = "ROOT"; //first folder for "browse-playlists"
var loading = '<img src="gfx/loading.gif">'; //image html code for ajax-loader.gif
//on start (called on end of html file)
$(function() {
//create accordion
$( "#accordion" ).accordion({
active: null,
heightStyle: "content",
collapsible: true,
activate: function( event, ui ) {loadTab();},
animate: 0
});
$("#search-text").val(""); //clear search input field
getCurrent(); //update fileinfos for currently played song
getNext(); //update fileinfos for next played song
setInterval(function(){ intervalSlow(); }, 30000); //do slow update every 30s (not really needed, but for safety)
setInterval(function(){ intervalMid(); }, 5000); //do mid update (current song changed?, paused? current position in song?)
setInterval(function(){ intervalFast(); }, intervalfast); //do fast update (only local, interpolate song position)
});
</script>
</body>
</html>