Пример #1
0
////////////////////////////////////////////////////////////////////////////////////
error_reporting(0);
if (!defined("IN_BTIT")) {
    die("non direct access!");
}
global $btit_settings, $BASEURL;
$listennowtpl = new bTemplate();
require load_language("lang_userdetails.php");
include "./radiostats/shoutcast.class.php";
$listen = new ShoutCast();
$listen->host = $btit_settings["radio_ip"];
$listen->port = $btit_settings["radio_port"];
$listen->passwd = $btit_settings["radio_pass"];
if ($listen->openstats()) {
    // We got the XML, gogogo!..
    if ($listen->GetStreamStatus()) {
        require load_language("lang_shoutcast.php");
        $hostname = $listen->GetListeners();
        $j = 0;
        $list = array();
        if (is_array($hostname)) {
            for ($i = 0; $i < sizeof($hostname); $i++) {
                $ip = $hostname[$i]["hostname"];
                $client = $hostname[$i]["useragent"];
                $damn = do_sqlquery("select id,username FROM {$TABLE_PREFIX}users WHERE cip='" . $ip . "' ORDER BY lastconnect ASC LIMIT 1", true);
                if (@mysqli_num_rows($damn) > 0) {
                    $gimme = mysqli_fetch_array($damn);
                } else {
                    $gimme["id"] = 1;
                    $gimme["username"] = "******";
                }
Пример #2
0
            return $tmphours . ":" . $tmpminutes . ":" . $tmpseconds;
        } else {
            return "00:" . substr("0" . intval($seconds / 60), -2) . ":" . $tmpseconds;
        }
    } else {
        return "00:00:" . $tmpseconds;
    }
}
$shoutcast = new ShoutCast();
$shoutcast->host;
$shoutcast->port;
$shoutcast->tunein;
$shoutcast->passwd;
// var_dump($shoutcast->openstats());
if ($shoutcast->openstats()) {
    if ($shoutcast->GetStreamStatus()) {
        echo "Status:  " . $shoutcast->GetStreamStatus() . " Open:  " . $shoutcast->openstats();
        echo "<br>";
        ////////////////////////////////////////////////////
        // UMWANDLUNG VON FEHLERHAFT ANGEZEIGTEN UMLAUTEN //
        ////////////////////////////////////////////////////
        $aktuellertitel = $shoutcast->GetCurrentSongTitle();
        echo "was ankommt:  " . $shoutcast->GetCurrentSongTitle();
        echo "<br>";
        $uml = array("ä", "ö", "Ã", "ü", "Ä", "Ö", "Ü", "ß", "´");
        $ohne_uml = array("ae", "oe", "oe", "ue", "Ae", "Oe", "Ue", "ss", "'");
        $aktuellertitel_g = str_replace($uml, $ohne_uml, $aktuellertitel);
        /////////////////////////////////////////////////////////////////////////////////////////
        // JEDER ERSTE BUCHSTABE GROSS -- FALLs UNGEWÜNSCHT, DIE FOLGENDE ZEILE AUSKOMMENTIREN //
        /////////////////////////////////////////////////////////////////////////////////////////
        $aktuellertitel_n = ucwords($aktuellertitel_g);
Пример #3
0
            $tmpminutes = substr("0" . intval($seconds / 60 - 60 * $tmphours), -2);
            return $tmphours . ":" . $tmpminutes . ":" . $tmpseconds;
        } else {
            return "00:" . substr("0" . intval($seconds / 60), -2) . ":" . $tmpseconds;
        }
    } else {
        return "00:00:" . $tmpseconds;
    }
}
$shoutcast = new ShoutCast();
$shoutcast->host = $btit_settings["radio_ip"];
$shoutcast->port = $btit_settings["radio_port"];
$shoutcast->passwd = $btit_settings["radio_pass"];
if ($shoutcast->openstats()) {
    // We got the XML, gogogo!..
    if ($shoutcast->GetStreamStatus()) {
        require "../" . load_language("lang_shoutcast.php");
        echo "<link rel=\"stylesheet\" type=\"text/css\" href=" . $STYLEURL . "/main.css\" />";
        echo "<table width=100% cellpadding=3 cellspacing=0><tr><td class=blocklist>";
        echo "<br><center><img src=radiostats/images/radio-online.png></center><br><br>";
        echo "<table border=0 cellpadding=0 cellspacing=0 align=center class=main>";
        $todayis = date('D');
        $timenow = date('G:i');
        $Query = do_sqlquery('SELECT u.id as realid, sc.uid, sc.activedays, sc.activetime, sc.genre, u.username, g.prefixcolor, g.suffixcolor FROM ' . $TABLE_PREFIX . 'shoutcastdj sc LEFT JOIN ' . $TABLE_PREFIX . 'users u ON sc.uid=u.id LEFT JOIN ' . $TABLE_PREFIX . 'users_level g ON u.id_level=g.id WHERE sc.active = \'1\' ORDER by activetime') or die;
        if (mysqli_num_rows($Query) > 0) {
            $found = 0;
            while ($List = mysqli_fetch_assoc($Query)) {
                if (preg_match('@' . $todayis . '@Ui', $List['activedays'])) {
                    $timeslot = explode("-", $List["activetime"]);
                    $start_time = explode(":", $timeslot[0]);
                    $end_time = explode(":", $timeslot[1]);