delete files...
This commit is contained in:
83
index.php
83
index.php
@@ -1,83 +0,0 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns="https://www.w3.org/1999/xhtml" xml:lang="ru-ru" lang="ru-ru" dir="ltr">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css">
|
||||
<link rel="stylesheet" type="text/css" href="/css/style1.css">
|
||||
<title>My Test Radio</title>
|
||||
<script
|
||||
src="https://code.jquery.com/jquery-3.4.1.js"
|
||||
integrity="sha256-WpOohJOqMqqyKL9FccASB9O0KwACQJpFTUBLTYOVvVU="
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
<script
|
||||
src="https://cdnjs.cloudflare.com/ajax/libs/jsrender/1.0.6/jsrender.js"
|
||||
integrity="sha256-2Mqub/wO44EnER/JI+RrSncU1C4rU9PKK7BaZIn87jI="
|
||||
crossorigin="anonymous">
|
||||
</script>
|
||||
<script src="js/lastfm.api.md5.js" type="text/javascript"></script>
|
||||
<script src="js/lastfm.api.js" type="text/javascript"></script>
|
||||
|
||||
<!--
|
||||
<script id="lastfmTemplateArtistInfo" type="text/x-jsrender">
|
||||
<div class="artist_info">
|
||||
<a href="{{:url}}" rel="nofollow" target="_blank"><b>{{:name}}:</b><img src="{{:image[1]["#text"]}}" alt="{{:name}}" /></a>
|
||||
</div>
|
||||
</script>
|
||||
-->
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
<div class="parent">
|
||||
<div id="song">
|
||||
|
||||
<h1>Just Radio</h1>
|
||||
|
||||
<div id="myPlay">-</div>
|
||||
|
||||
<div id="title">title</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="btn-wrap">
|
||||
<button id="play" class="btn">
|
||||
<i class="fas fa-play-circle"></i>
|
||||
Play
|
||||
</button>
|
||||
<button id="pause" class="btn">
|
||||
<i class="fas fa-pause-circle"></i>
|
||||
Pause
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div>
|
||||
vol:
|
||||
<br>
|
||||
<input id="volume" type="range" min="0" max="10" value="5" step="0.1" />
|
||||
</div>
|
||||
|
||||
<span id="duration"></span>
|
||||
<br>
|
||||
<br>
|
||||
<div id="listeners">title</div>
|
||||
|
||||
<br>
|
||||
|
||||
<h2>Top artist</h2>
|
||||
<div class="content-body-inner" id="curr_artist"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="js/audio.js" type="text/javascript"></script>
|
||||
<script src="js/radio.js" type="text/javascript"></script>
|
||||
<script src="js/info.js" type="text/javascript"></script>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
30
js/radio.js
30
js/radio.js
@@ -34,21 +34,21 @@ function show()
|
||||
MPDfile = array[2].replace(/^vk_kun\//,'').replace(/\.mp3/,'');
|
||||
console.log(MPDfile);
|
||||
|
||||
if (MPDartist !== null) {
|
||||
lastfm.artist.getInfo({artist: MPDartist}, {success: function(data){
|
||||
var artistLink = data.artist.url;
|
||||
// формируем ссылку на артиста в LastFM
|
||||
document.querySelector('a[name="lastFMlink"]').setAttribute('href', artistLink);
|
||||
// выводим название артиста и трека ссылкой
|
||||
$('#title').html(MPDartist+' - '+MPDsong);
|
||||
}, error: function(code, message){
|
||||
console.log('Error #'+code+': '+message);
|
||||
MPDartist = null;
|
||||
}});}
|
||||
else {
|
||||
//document.querySelector('a[name="lastFMlink"]').setAttribute('href', null);
|
||||
//$('#title').html(MPDfile);
|
||||
alert('WTF!?');}
|
||||
if (MPDartist == null && MPDsong == null) {
|
||||
//document.querySelector('a[name="lastFMlink"]').setAttribute('href', null);
|
||||
$('#title').html(MPDfile);
|
||||
} else {
|
||||
lastfm.artist.getInfo({artist: MPDartist}, {success: function(data){
|
||||
var artistLink = data.artist.url;
|
||||
// формируем ссылку на артиста в LastFM
|
||||
document.querySelector('a[name="lastFMlink"]').setAttribute('href', artistLink);
|
||||
// выводим название артиста и трека ссылкой
|
||||
$('#title').html(MPDartist+' - '+MPDsong);
|
||||
}, error: function(code, message){
|
||||
console.log('Error #'+code+': '+message);}
|
||||
});
|
||||
console.log('WHAT??!')
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
80
online.php
80
online.php
@@ -1,80 +0,0 @@
|
||||
<?php
|
||||
/*
|
||||
********************************************************************
|
||||
* Название: Sad Raven's Online Counter *
|
||||
********************************************************************
|
||||
* Версия: 1.0 *
|
||||
* Стоимость: бесплатный скрипт *
|
||||
* Требования: PHP4 и выше *
|
||||
* Платформа: любая *
|
||||
* Язык: русский *
|
||||
* Автор: Sad Raven (http://www.sad-raven.ru) *
|
||||
********************************************************************
|
||||
* Создан: 15 июня 2002 *
|
||||
********************************************************************
|
||||
*/
|
||||
|
||||
$data="online.dat";
|
||||
$time=time();
|
||||
$past_time=time()-600;
|
||||
|
||||
$readdata=fopen($data,"r") or die("Не могу открыть файл $data");
|
||||
$data_array=file($data);
|
||||
fclose($readdata);
|
||||
|
||||
if (getenv('HTTP_X_FORWARDED_FOR'))
|
||||
$user = getenv('HTTP_X_FORWARDED_FOR');
|
||||
else
|
||||
$user = getenv('REMOTE_ADDR');
|
||||
|
||||
$d=count($data_array);
|
||||
for($i=0;$i<$d;$i++)
|
||||
{
|
||||
list($live_user,$last_time)=explode("::","$data_array[$i]");
|
||||
if($live_user!=""&&$last_time!=""):
|
||||
if($last_time<$past_time):
|
||||
$live_user="";
|
||||
$last_time="";
|
||||
endif;
|
||||
if($live_user!=""&&$last_time!="")
|
||||
{
|
||||
if($user==$live_user)
|
||||
{
|
||||
$online_array[]="$user::$time\r\n";
|
||||
}
|
||||
else
|
||||
$online_array[]="$live_user::$last_time";
|
||||
}
|
||||
endif;
|
||||
}
|
||||
|
||||
if(isset($online_array)):
|
||||
foreach($online_array as $i=>$str)
|
||||
{
|
||||
if($str=="$user::$time\r\n")
|
||||
{
|
||||
$ok=$i;
|
||||
break;
|
||||
}
|
||||
}
|
||||
foreach($online_array as $j=>$str)
|
||||
{
|
||||
if($ok==$j) { $online_array[$ok]="$user::$time\r\n"; break;}
|
||||
}
|
||||
endif;
|
||||
|
||||
$writedata=fopen($data,"w") or die("Не могу открыть файл $data");
|
||||
flock($writedata,2);
|
||||
if($online_array=="") $online_array[]="$user::$time\r\n";
|
||||
foreach($online_array as $str)
|
||||
fputs($writedata,"$str");
|
||||
flock($writedata,3);
|
||||
fclose($writedata);
|
||||
|
||||
$readdata=fopen($data,"r") or die("Не могу открыть файл $data");
|
||||
$data_array=file($data);
|
||||
fclose($readdata);
|
||||
$online=count($data_array);
|
||||
|
||||
echo "Listeners : $online";
|
||||
?>
|
||||
@@ -1 +0,0 @@
|
||||
<?php echo exec('mpc current');?>
|
||||
Reference in New Issue
Block a user