fonction radiolive plus utile

This commit is contained in:
chankalan 2021-09-23 15:46:57 +02:00
parent e3006e80dd
commit 12719a9c86
1 changed files with 26 additions and 26 deletions

View File

@ -207,29 +207,29 @@ function titre_chronique_court($titre) {
} }
function radiolive() { // function radiolive() {
$dateetheure= time(); // $dateetheure= time();
//
$h1=strtotime("15:15:00"); // $h1=strtotime("15:15:00");
$h2=strtotime(date ('H:i:s',$dateetheure)); // $h2=strtotime(date ('H:i:s',$dateetheure));
//
$radio = ''; // $radio = '';
//
if((date("w", $dateetheure ) == 2) && ($h2 >= $h1) && (date("G", $dateetheure ) < 17)) { // if((date("w", $dateetheure ) == 2) && ($h2 >= $h1) && (date("G", $dateetheure ) < 17)) {
// $radio = 'live'; // // $radio = 'live';
//
$radio = ' // $radio = '
<div style="text-align:center;"> // <div style="text-align:center;">
<div style="font-family: sans-serif; text-align: center; // <div style="font-family: sans-serif; text-align: center;
background-color: white; padding: 2px; border: 4px solid #ee5921; // background-color: white; padding: 2px; border: 4px solid #ee5921;
color: black; margin-top: 1em; width: 90%; min-width: 260px; max-width: 400px; margin: 1em auto; -webkit-border-radius: 4px; // color: black; margin-top: 1em; width: 90%; min-width: 260px; max-width: 400px; margin: 1em auto; -webkit-border-radius: 4px;
-moz-border-radius: 2px; border-radius: 4px;" > // -moz-border-radius: 2px; border-radius: 4px;" >
<h4>Écoutez le direct (mardi 15h30 à 17h)</h4> // <h4>Écoutez le direct (mardi 15h30 à 17h)</h4>
<audio controls> <source src="https://icecast.libre-a-toi.org:8444/voixdulat_mp3" type="audio/mpeg">.Votre navigateur ne supporte pas l\'élément <code>audio</code> : <a href="https://icecast.libre-a-toi.org:8444/voixdulat_mp3">écoutez l\'émission</a>.</audio> // <audio controls> <source src="https://icecast.libre-a-toi.org:8444/voixdulat_mp3" type="audio/mpeg">.Votre navigateur ne supporte pas l\'élément <code>audio</code> : <a href="https://icecast.libre-a-toi.org:8444/voixdulat_mp3">écoutez l\'émission</a>.</audio>
</div> // </div>
</div>'; // </div>';
} // }
//
return $radio; // return $radio;
//
} // }