Example #1
0
         if ($stream_config['showplayer'] == 'yes') {
             $tpl->set('{player}', '<iframe src="http://api.cybergame.tv/p/embed.php?c=' . $info_stream['login'] . '&w=' . $stream_config['width'] . '&h=' . $stream_config['height'] . '&type=embed" width="' . $stream_config['width'] . '" height="' . $stream_config['height'] . '" frameborder="0"></iframe>');
         } else {
             $tpl->set('{player}', 'Вывод плеера отключено в настройках!');
         }
         if ($config['allow_alt_url']) {
             $tpl->set('{full_stream}', $config['http_home_url'] . "stream/" . $info_stream['login'] . "/");
         } else {
             $tpl->set('{full_stream}', $config['http_home_url'] . "index.php?do=stream-info&stream=" . $info_stream['login']);
         }
         $tpl->compile('streams');
         $out++;
     }
     break;
 case 'goodgame':
     $stream_goodgame = getgoodgame($info_stream['login']);
     if ($stream_goodgame->stream->status == 'Live') {
         $tpl->set('{title}', $info_stream['title']);
         $tpl->set('{streamer}', $info_stream['login']);
         $tpl->set('{streampic}', $info_stream['pic']);
         $tpl->set('{description}', $parse->BB_Parse($info_stream['description']));
         $tpl->set('{status}', $stream_config['online']);
         $tpl->set('{viewers}', $stream_goodgame->stream->viewers);
         $tpl->set('{games}', $stream_goodgame->stream->games);
         if ($stream_config['showplayer'] == 'yes') {
             $tpl->set('{player}', '<div style="width: ' . $stream_config['width'] . 'px;height: ' . $stream_config['height'] . 'px;">' . $stream_goodgame->stream->embed . '</div>');
         } else {
             $tpl->set('{player}', 'Вывод плеера отключено в настройках!');
         }
         if ($config['allow_alt_url']) {
             $tpl->set('{full_stream}', $config['http_home_url'] . "stream/" . $info_stream['login'] . "/");
Example #2
0
function setTitleGG($login)
{
    $stream_goodgame = file_get_contents("http://goodgame.ru/api/getchannelstatus?id=" . totranslit($login) . "&fmt=json");
    $stream_goodgame = json_decode($stream_goodgame, true);
    $idXml = getgoodgame(totranslit($login));
    $id = explode("=>", $idXml->stream->stream_id);
    return $stream_goodgame[$id[0]];
}
Example #3
0
     case 'twitch':
         $twitch_check = check_twitch($data['login']);
         if (!$twitch_check) {
             msg("error", "Ошибка", "Трансляции с таким логином не найдено.", "?mod=stream-info&action=edit");
             die;
         }
         break;
     case 'cybergame':
         $cybergame_check = getcybergame($data['login']);
         if (!$cybergame_check['thumbnail']) {
             msg("error", "Ошибка", "Трансляции с таким логином не найдено.", "?mod=stream-info&action=edit");
             die;
         }
         break;
     case 'goodgame':
         $goodgame_check = getgoodgame($data['login']);
         if (!$goodgame_check->stream->key) {
             msg("error", "Ошибка", "Трансляции с таким логином не найдено.", "?mod=stream-info&action=edit");
             die;
         }
         break;
 }
 $title = $parse->process(trim(strip_tags($data['title'])));
 $title = $db->safesql($title);
 $service = trim(strip_tags($data['service']));
 $login = strtolower(trim(strip_tags($data['login'])));
 $descr = $parse->process(strip_tags($data['descr']));
 $pic = $data['pic'];
 $dbquery = $db->query("UPDATE " . PREFIX . "_streams SET title = '{$title}', service = '{$service}', login = '{$login}', description = '{$descr}', pic = '{$pic}' WHERE id = '" . $id . "'");
 if ($dbquery) {
     $dle_api->clean_cache("stream-info");