<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Управление медиа проигрывателем</title>
<script src="jquery.js" type="text/javascript"></script>
<style type="text/css">
.button_start_all {
cursor:pointer;
height:40px;
width:154px;
background-image:url('img/start_all.png');
background-repeat:no-repeat;
background-color: #EBF4FB;
border:none;
}
.button_stop_all {
cursor:pointer;
height:40px;
width:154px;
background-image:url('img/stop_all.png');
background-repeat:no-repeat;
background-color: #EBF4FB;
border:none;
}
body{
font-family:Arial, Helvetica, sans-serif;
font-size:13px;
}
.foot_all {
text-align: right;
vertical-align: middle;
margin-top: 10px;
margin-right: 5px;
margin-bottom: 5px;
margin-left: 5px;
}
/* ----------- My Form ----------- */
.myform{
margin:0 auto;
width:600px;
padding:14px;
}
/* ----------- stylized ----------- */
#stylized{
border:solid 2px #b7ddf2;
background:#ebf4fb;
}
#stylized h1,h2,h3,th {
font-size:12px;
font-weight:bold;
margin-bottom:8px;
}
#stylized p{
font-size:11px;
color:#666666;
margin-bottom:20px;
border-bottom:solid 1px #b7ddf2;
padding-bottom:10px;
}
#stylized label{
display:block;
font-weight:bold;
text-align:right;
width:160px;
float:left;
}
#stylized .small{
color:#666666;
display:block;
font-size:11px;
font-weight:normal;
text-align:right;
width:160px;
}
select {
background: transparent;
width: 275px;
font-size: 14px;
/*
border: 1px solid #ccc;
padding: 5px;
*/
padding:4px 2px;
border:solid 1px #aacfe4;
height: 300px;
}
dl.progress,
dl.progress *
{ margin: 0; padding: 0; }
dl.progress {
padding: 1px; border: 1px solid #aacfe4;
height: 20px; width: 99%; }
.progress dt
{ width: 0; height: 0; overflow: hidden; }
.progress .done
{ height: 100%; float: left; }
.progress .done
{
background-color: #73C2E1;
}
.pl_table {
border: medium groove #b7ddf2;
position: relative;
margin: auto;
float: left;
}
.button_stop { cursor:pointer;
height:70px;
width:70px;
background-image:url('img/stop.png');
background-repeat:no-repeat;
background-color: #EBF4FB;
}
.head_player {
font-family: Verdana, Geneva, sans-serif;
font-size: 15px;
font-weight: bold;
color: #227899;
padding-left: 5px;
text-align: right;
}
.global_header {
font-family: Verdana, Geneva, sans-serif;
font-size: 18px;
text-align: left;
}
.min_numbers {
font-size: 10px;
text-align: center;
vertical-align: middle;
font-weight: bold;
}
.min_play {
background-image: url(img/min_play.png);
background-repeat: no-repeat;
background-position: center center;
width: 48px;
height: 48px;
cursor: pointer;
}
.min_stop {
background-image: url(img/min_stop.png);
background-repeat: no-repeat;
background-position: center center;
height: 48px;
width: 48px;
cursor: pointer;
}
</style>
</head>
<body>
<div id="stylized" class="myform">
<div class="foot_all">
<div class="global_header">
Панель управления плеерами
Admin Mode</div>
<form action="" method="post">
<input name="start_all" type="submit" class="button_start_all" id="start_all" value=""/>
<input name="stop_all" type="submit" class="button_stop_all" id="stop_all" value=""/></form>
</div>
<table width="100%" border="0" cellpadding="5" cellspacing="5">
<tr>
<script type="text/javascript">
$(document).ready(function(){
var oldNum;
trackName = function(id){
$.ajax({
type: 'GET',
url: 'get_name.php?id=0',
success: function(data){
$('#track-name'+id).html(data);
}
});
}
reloadcontent =function(){
$.ajax({
dataType: 'json',
type: 'GET',
url: 'get_state.php?id=0',
success: function(data){
if(oldNum != data.num) trackName(data.id);
$('#done'+data.id).css('width',data.percent).html(data.percent);
$('#position'+data.id).html(data.time);
$('#num'+data.id).html(data.num);
oldNum = data.num;
}
});
};
setInterval(reloadcontent, 2000);
});
</script>
<td>
<table width="285" border="1" cellpadding="3" cellspacing="0" class="pl_table">
<tr>
<td>
<img src="img/audio_icon.png" alt="Плеер проигрывает аудио и видео" width="30" height="30" title="Плеер проигрывает аудио и видео" align="left" /><img src="img/video_icon.png" width="30" height="30" alt="Плеер проигрывает аудио и видео" title="Плеер проигрывает аудио и видео" align="left" /><div class="head_player">#1 Медиа-плеер играет</div> </td>
</tr>
<tr>
<td><dl class="progress">
<dd class="done" id="done0" style="width:5%">5% </dl></td>
</tr>
<tr>
<td>Позиция <span id="position0">00:00:32</span></td>
</tr>
<tr>
<td>Текущий трек № <span id="num0">9</span><br /><span id="track-name0">07_mrid.mp3</span></td>
</tr>
<tr>
<td align="center"><a href="adm.php?id=0"><img src="img/player_adm.png" /></a>
http://test1.ru/webplayer/get_state.php?id=0 </td>
</tr>
</table></td>
<script type="text/javascript">
$(document).ready(function(){
var oldNum;
trackName = function(id){
$.ajax({
type: 'GET',
url: 'get_name.php?id=1',
success: function(data){
$('#track-name'+id).html(data);
}
});
}
reloadcontent =function(){
$.ajax({
dataType: 'json',
type: 'GET',
url: 'get_state.php?id=1',
success: function(data){
if(oldNum != data.num) trackName(data.id);
$('#done'+data.id).css('width',data.percent).html(data.percent);
$('#position'+data.id).html(data.time);
$('#num'+data.id).html(data.num);
oldNum = data.num;
}
});
};
setInterval(reloadcontent, 2000);
});
</script>
<td>
<table width="285" border="1" cellpadding="3" cellspacing="0" class="pl_table">
<tr>
<td>
<img src="img/audio_icon.png" alt="Плееер проигрывает только аудио файлы" width="30" height="30" title="Плееер проигрывает только аудио файлы"align="left" /><div class="head_player">#2 Медиа-плеер играет</div> </td>
</tr>
<tr>
<td><dl class="progress">
<dd class="done" id="done1" style="width:5%">5% </dl></td>
</tr>
<tr>
<td>Позиция <span id="position1">00:00:32</span></td>
</tr>
<tr>
<td>Текущий трек № <span id="num1">9</span><br /><span id="track-name1">07_mrid.mp3</span></td>
</tr>
<tr>
<td align="center"><a href="adm.php?id=1"><img src="img/player_adm.png" /></a>
http://test1.ru/webplayer/get_state.php?id=1 </td>
</tr>
</table></td>
</tr><tr> </tr>
</table>
<div align="right">
<strong>Состояниее плееров</strong>
<table border="0" cellpadding="0" cellspacing="3">
<tr class="min_numbers">
<td class="min_play" onClick="location='adm.php?id=0'">1</td><td class="min_play" onClick="location='adm.php?id=1'">2</td> </tr>
</table>
</div>
<!-- АВТОРИЗАЦИЯ АДМИНА -->
<script type="text/javascript">
$(document).ready(function(){
var error = 'ОШИБКА!';
$('#auth').click(function(){
$('.container').slideToggle('slow');
return false;
});
$('#keyboard li').click(function(){
$('#pin').attr('value',$('#pin').attr('value')+$(this).text());
});
$('#autorization').submit(function(){
$.post('_ajax.php',$(this).serialize(), function(data){
if(data == 1){
window.location.href = 'http://test1.ru/webplayer/';
}
else{
alert (error);
}
});
return false;
});
});
</script>
<style>
#keyboard{
list-style: none;
display: block;
background: #CCC;
width: 170px;
margin: 0;
padding: 0;
text-align: center;
}
#keyboard li {
background: none repeat scroll 0 0 #FFFFFF;
border-radius: 10px 10px 10px 10px;
display: inline-block;
height: 50px;
line-height: 50px;
width: 50px;
margin: 2px;
cursor: pointer;
}
</style>
<a href="?logout=1">Завершить сеанс</a> <!-- КОНЕЦ АВТОРИЗАЦИИ -->
</div>
</body>
</html>