Broadcaster HTML5 (LIVE)-HTML5, CSS, and jQuery javascript DATA JSON.data

live_broadcaster.htm

<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>Broadcaster html iframe plugin VRAPro Admin</title>
        <link rel="stylesheet" href="live_broadcaster.css">
        <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
        <script type="text/javascript" src="radio.js"></script>
        <script type="text/javascript" src="live_broadcaster.js"></script>
    </head>
    <body>
    <div id='broadcaster'></div>
    </body>
</html>

live_broadcaster.js

$(document).ready(function(){myBroadcaster();});
function myBroadcaster(broadcaster,lis){
if(lis){var page = lis;}else{var page = "0";}
$.getJSON("https://admin.vrapro.hu/json/string/json.php?radio="+radio+"&plugin=broadcaster&lepes="+page+"", function(json) {
//////////////////* start hiba oldalak *//////////////
if (401==json[0].json_status) {
$("#broadcaster").append("Plugin hiba");
 }else{if (404==json[0].json_status){
$("#broadcaster").append("Nem tudtunk kapcsolodni a rádió adminhoz.");
 }else{if (403==json[0].json_status){
$("#broadcaster").append("Lejárt rádió admin.");
 }else{if (402==json[0].json_status) {
$("#broadcaster").append("Az admin fel van függesztve.");
}else{
//////////////////* start lista *//////////////
    var output ="<table class='livebroadcaster'>";
    output +="<tr>";
    var i; var text = ["","Hétfő", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat", "Vasárnap"];
    var dayNames = ["Vasárnap","Hétfő", "Kedd", "Szerda", "Csütörtök", "Péntek", "Szombat", "Vasárnap"];
    for (i = 1; i < text.length; i++) {
    var date = new Date(json[0].datenow*1000);
    var Y = date.getFullYear();
    var d = date.getDate();
    var monthNames = ["Január", "Február", "Március", "Április", "Május", "Június", "Július", "Augusztus", "Szeptember", "Október", "November", "December"];
    var mn = monthNames[date.getMonth()];
    var day = dayNames[date.getDay()];
    var dalap = new Date();
    var daysa = ['7', '1', '2', '3', '4', '5', '6'];
    var dayalap = daysa[dalap.getDay()];
    var daylep = daysa[date.getDay()];
    var yearStart = new Date(date.getFullYear(),0,0);
    var WN = Math.ceil(( ( (date - yearStart) / 86400000) + 0)/7);
    if(i==dayalap){if(dayalap==daylep){var stylstat = " class='social_vrapro_adasterv_le'";}else{var stylstat = " class='social_vrapro_adasterv_now'";}}else{if(daylep==i){var stylstat = " class='social_vrapro_adasterv_le'";}else{var stylstat ='';}}
    output +="<th"+stylstat+"><a style=\"cursor: pointer;\" id=\""+i+"\" onclick=\"myBroadcaster('broadcaster','"+json[0].day_link["a"+i+""]+"')\">"+text[i]+"</a></th>";
}
output +="</tr>";
output +="<tr><td class='centers' colspan='7'>"+Y+"."+mn+"."+d+" "+day+" "+WN+".hét</td></tr>";
for (is = 0; is <= 23; is++) {if (is % json[0].broadcaster == 0){
            var end = is+parseInt(json[0].broadcaster);
        if(json[0].date[is] == json[0].timenow){var css = " class='social_vrapro_adasterv_c'";}else{var css = "";}
    output +="<tr><td"+css+">"+[""+is+""]+":00 - "+end+":00</td><td"+css+" colspan='3'>"+json[0].dj_name[is]+"</td><td"+css+" colspan='3'>"+json[0].dj_title[is]+"</td></tr>";
}}
    output +="</table>";
$("#broadcaster").html(output);
//////////////////* end lista *//////////////
}}}}
//////////////////* end hiba oldalak *//////////////
});
}

live_broadcaster.css

.livebroadcaster {
    border-collapse: collapse;
    width: 100%;
    font-size: 16px;
    font-family: TimesNew-Roman,Georgia,serif;
    margin: 10px auto 10px;
}
.livebroadcaster td, .livebroadcaster th {
    width: 4rem;
    height: 1.5rem;
    border: 3px solid #33343C;
    text-align: center;
    padding: 0px;
    background:#052025;
    color: #DBDAE9;
}
.livebroadcaster th{text-transform: uppercase;}
.livebroadcaster th.social_vrapro_adasterv_now {background-color: #377911;}
.livebroadcaster th.social_vrapro_adasterv_now a{color:#FFFFFF;}
.livebroadcaster th.social_vrapro_adasterv_le {background-color: #440C58;}
.livebroadcaster th.social_vrapro_adasterv_le a {color:#F3F021;}
.livebroadcaster th a {color:#FF6060; text-decoration: none;}
.livebroadcaster th:hover{background-color: #440C58;}
.livebroadcaster td.social_vrapro_adasterv_c {color: #3CFFA1; background:#342A1A; font-weight: bold;}
.livebroadcaster td.centers {padding: 6px 0px; font-weight: bold;}

Tömörített állomány létöltése (.zip)

Hozzászolások

Ehhez a plugonhoz, még nem érkeztek hozzászólások.


Új hozzászóláshoz be kel jelentkezni. Bejelentkezés | Regisztráció