This repository has been archived by the owner on Jul 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
208 lines (201 loc) · 8.43 KB
/
index.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
<?php
if(!isset($_COOKIE['token'])){
header("Location: login/");
}else if($_SERVER['REQUEST_URI'] == '/'){
//header("Location: /index.php");
}
?>
<!DOCTYPE html>
<html lang="ru">
<head>
<!-- title -->
<title>Vitasha Music</title>
<!-- styles -->
<link rel="preload" href="assets/css/preloader.css" as="style">
<link href="assets/css/preloader.css" rel="stylesheet">
<link href="assets/css/index.css" rel="stylesheet">
<link href="assets/fonts/Roboto_swap.css" rel="stylesheet">
<!-- meta -->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta name="apple-mobile-web-app-status-bar" content="#27272c">
<meta name="theme-color" content="#27272c">
<!-- images -->
<link href="assets/images/logo.png" as="image">
<link href="assets/images/logo_black.png" as="image">
<link href="assets/images/play.png" as="image">
<link href="assets/images/pause.png" as="image">
<link href="assets/images/home.png" as="image">
<link href="assets/images/search.png" as="image">
<link href="assets/images/exclicit.png" as="image">
<!-- js -->
<script src="assets/js/jquery.min.js"></script>
<script src="assets/js/index.js"></script>
<!-- manifest for pwa -->
<link rel="manifest" href="manifest2.json">
<link rel="apple-touch-icon" href="assets/images/logo_black.png">
<!-- favicon -->
<link rel="shortcut icon" href="assets/images/logo.png" type="image/png">
</head>
<body>
<!-- Прелоадер -->
<div id="preloader">
<div id="preloader_img_div">
<svg id="preloader_img" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="currentColor"
d="M304 48c0 26.51-21.49 48-48 48s-48-21.49-48-48 21.49-48 48-48 48 21.49 48 48zm-48 368c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zm208-208c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.49-48-48-48zM96 256c0-26.51-21.49-48-48-48S0 229.49 0 256s21.49 48 48 48 48-21.49 48-48zm12.922 99.078c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.491-48-48-48zm294.156 0c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48c0-26.509-21.49-48-48-48zM108.922 60.922c-26.51 0-48 21.49-48 48s21.49 48 48 48 48-21.49 48-48-21.491-48-48-48z">
</path>
</svg>
</div>
</div>
<!-- Элементы приложения -->
<div id="search_history_back" onclick="search_history_hide();"></div>
<div id="search_history"></div>
<div id="home">
<div id="search">
<div class="search_news_btn" onclick="open_news()">
<div id="news_btn"><img src="assets/images/home.png" alt="home"></div>
</div>
<div class="search_field_div">
<input type="text" name="search_field_input" id="search_field" autocomplete="off" onclick="search_history_show();" placeholder="Search...">
</div>
<div class="search_search_btn" onclick="search()">
<div id="search_btn"><img src="assets/images/search.png" alt="search"></div>
</div>
</div>
<div id="home_news_div">
<!-- tracks -->
<h3>Connecting internet...</h3>
</div>
</div>
<div id="my">
<div id="my_header">
<div id="my_home" onclick="my()">
<div id="reopen_my_btn"><img src="assets/images/home.png" alt="home"></div>
</div>
<div id="my_playlist_opened_name">
<span>Open playlist</span>
</div>
<div id="refresh_my" onclick="refresh_my()">
<div id="refresh_my_btn">Refresh</div>
</div>
</div>
<div id="my_main">
</div>
</div>
<div id="settings">
<h3>Настройки:</h3>
<button onclick="change_pass_open()" id="change_pass">Сменить пароль</button>
<div id="pass_change_div">
<form action="" autocomplete="off">
<label for="new_pass_1">Новый пароль:</label><br>
<input id="new_pass_1" type="password" autocomplete="current-password" name="password"><br>
<label for="new_pass_2">Повторите новый пароль:</label><br>
<input id="new_pass_2" type="password" autocomplete="current-password" name="password2"><br>
<button onclick="change_pass()">Сменить</button>
</form>
</div>
<button onclick="feed_back_open()" id="feed_back">Написать отзыв</button>
<div id="feed_back_div">
<label for="feed_back_text">Ваш отзыв:</label><br>
<textarea id="feed_back_text" name="" id=""></textarea><br>
<button onclick="feed_back()">Отправить</button>
</div>
<button onclick="support_open()" id="support">Поддержка</button>
<div id="support_div">
<label for="support_text">Ваш отзыв:</label><br>
<textarea id="support_text" name="" id=""></textarea><br>
<button onclick="support()">Отправить</button>
</div>
<button onclick="sign_out()" id="sign_out">Выйти</button>
<span id="version">beta 1.2</span>
</div>
<div id="player">
<div id="player_close_btn" onclick="player();">
<span>∨</span>
</div>
<div id="player_cover">
</div>
<div id="player_name">
</div>
<div id="player_author">
</div>
<div id="player_volume">
<label for="player_volume_input">Громкость</label><br>
<input id="player_volume_input" type="range" min="0" max="100" value="100" onchange="change_song_volume()">
</div>
<div id="player_song_moment">
<label for="player_song_moment_input">Песня</label><br>
<input id="player_song_moment_input" type="range" min="0" max="100" value="0" onchange="change_song_moment()">
</div>
<div id="player_btns">
<div id="player_prev_btn">
<button onclick="prev();">Prev</button>
</div>
<div id="player_play_btn">
<button onclick="toggle_song_playing();"><img src="assets/images/pause.png" alt="search"></button>
</div>
<div id="player_next_btn">
<button onclick="next('yes');">Next</button>
</div>
</div>
<div id="player_next_type_btn">
<button onclick="type_song_playing();"><!-- repeat track/repeat playlist/no repeat --></button>
</div>
<div id="player_add_to_favorites">
</div>
</div>
<div id="under_player_closed">
<span>Start listen ANYTHING!</span>
</div>
<div id="player_closed" onclick="player();">
<div id="player_closed_name_and_author">
<div id="player_closed_name">
</div>
<div id="player_closed_author">
</div>
</div>
<div id="player_closed_btn_play">
<button onclick="toggle_song_playing();"><img src="assets/images/pause.png" alt="search"></button>
</div>
</div>
<footer> <!-- CSS added, JS added -->
<div class="footer_btn" id="footer_main_btn" onclick="open_main();"> <!-- CSS added for .footer_btn -->
<span>Home</span>
</div>
<div class="footer_btn" id="footer_my_btn" onclick="open_my();">
<span>My</span>
</div>
<div class="footer_btn" id="footer_settings_btn" onclick="open_settings();">
<span>Settings</span>
</div>
</footer>
<script>
async function registerSW(){
if('serviceWorker' in navigator) {
try{
await navigator.serviceWorker.register('sw.js?new1');
}catch(e){
console.log('SW registration failed');
}
}
}
window.onload = function () {
$('#preloader').remove();
my();
news();
$("#search_field").keyup(function(event){
if(event.keyCode == 13){
event.preventDefault();
search_history_hide();
search();
}
});
$("#player_closed_btn_play").on("click", function(ev){
ev.stopPropagation();
});
registerSW();
}
</script>
</body>
</html>