
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns='http://www.w3.org/1999/xhtml' xmlns:b='http://www.google.com/2005/gml/b' xmlns:data='http://www.google.com/2005/gml/data' xmlns:expr='http://www.google.com/2005/gml/expr'>
<head>
<script src='http://ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js' type='text/javascript'></script>
<link type='text/css' rel='stylesheet' href='https://www.blogger.com/static/v1/widgets/3841957138-widget_css_bundle.css' />
<link type='text/css' rel='stylesheet' href='https://www.blogger.com/dyn-css/authorization.css?targetBlogID=3512129179211407069&zx=4b343764-50db-4fb0-afb2-45e56d07b253' />
<style id='page-skin-1' type='text/css'><!--

--></style>
<script type="text/javascript">
if (window.jstiming) window.jstiming.load.tick('headEnd');
</script></head>
<body>

<div  align="center">
<div class='navbar section' id='navbar'></div>

<div class='margin'>
<div  id='player'>
<?php 
if ($random == 'si') {$order = "ORDER BY rand()";} else{$order = "ORDER BY ID";};


include('../concha.php');

$sql = "SELECT * FROM mp3 WHERE cat = 'autodj' $order LIMIT 1";

$consulta = $conn->query($sql);
while ($row = $consulta->fetch_assoc())
{
$ID = $row["ID"];
$titulo = $row["titulo"];
$mp3 = $row["mp3"];
$N = $N + 1;
?>
            
                
                
   
                
                
                <?
}
$consulta->free_result();?>     

<audio controls autoplay="autoplay" id='audio' preload='auto' tabindex='0' type='audio/mpeg'>
<source src='<?php echo $mp3 ?>' type='audio/mp3'></source>
        Hola, tu navegador no está actualizado y no puede mostrar este contenido.
    </audio>
</div>
<ul id='playlist'>

<?php 






$sql = "SELECT * FROM mp3 WHERE cat = 'autodj' $order";

$consulta = $conn->query($sql);
while ($row = $consulta->fetch_assoc())
{
$ID = $row["ID"];
$titulo = $row["titulo"];
$mp3 = $row["mp3"];
$N = $N + 1;
?>
<li><a href='<?php echo $mp3 ?>'></a></li>

                
                
                
   
                
                
                <?
}
$consulta->free_result();?>       

</ul>
</div>
</div>
<script>
//<![CDATA[
var audio;
var playlist;
var tracks;
var current;

init();
function init(){
    current = 0;
    audio = $('audio');
    playlist = $('#playlist');
    tracks = playlist.find('li a');
    len = tracks.length - 1;
    audio[0].volume = 1;
    playlist.find('a').click(function(e){
        e.preventDefault();
        link = $(this);
        current = link.parent().index();
        run(link, audio[0]);
    });
    audio[0].addEventListener('ended',function(e){
        current++;
        if(current > len){
            current = 0;
            link = playlist.find('a')[0];
        }else{
            link = playlist.find('a')[current];    
        }
        run($(link),audio[0]);
    });
}
function run(link, player){
        player.src = link.attr('href');
        par = link.parent();
        par.addClass('active').siblings().removeClass('active');
        audio[0].load();
        audio[0].play();
}
  //]]>
</script>


</body>
</html>