$buffer = ""; if ($_REQUEST['action'] == "clearCache") { if ($member_id['user_group'] != 1) { die("error"); } $dle_api->clean_cache("stream-info"); $dle_api->clean_cache("stream-info-key"); $dle_api->clean_cache("stream-info-block"); $buffer = "Кеш стрима успешно очищен."; } elseif ($_REQUEST['action'] == 'setTitle') { $login = totranslit($_POST['login']); $error = array(); $service = $_POST['service']; switch ($service) { case "twitch": $titleTW = gettwitch($login, true); if ($titleTW['status'] == '404') { $setTitle = false; $error = array("status" => inv("Данного логина не существует в этом сервисе стримминга. Проверьте правильность веденного логина пользователя."), "code" => 404); } else { $setTitle = $titleTW['status']; } break; case "goodgame": $titleGG = setTitleGG($login); if (!$titleGG) { $setTitle = false; $error = array("status" => inv("Данного логина не существует в этом сервисе стримминга. Проверьте правильность веденного логина пользователя."), "code" => 404); } else { $setTitle = $titleGG['title']; }
if ($stream_count > 0) { if ($config['allow_cache'] != 'yes') { $config['allow_cache'] = 'yes'; $cache = true; } if ($stream_config['cache_allow'] == 'yes') { $tpl->result['streams'] = $dle_api->load_from_cache("stream-info-block", $stream_config['cachelife']); } if (!$tpl->result['streams']) { $tpl->load_template('stream-info-main.tpl'); for ($i = 0; $i < $stream_count; $i++) { if ($out != $stream_config['blocklimit']) { $info_stream = $stream_list[$i]; switch ($info_stream['service']) { case 'twitch': $stream_twitch = gettwitch($info_stream['login']); if ($stream_twitch != NULL) { $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('{viewers}', $stream_twitch['viewers']); $tpl->set('{status}', $stream_config['online']); $tpl->set('{games}', $stream_twitch['game']); if ($stream_config['showplayer'] == 'yes') { $tpl->set('{player}', '<object type="application/x-shockwave-flash" height="' . $stream_config['height'] . '" width="' . $stream_config['width'] . '" id="live_embed_player_flash" data="http://www.twitch.tv/widgets/live_embed_player.swf?channel=' . $info_stream['login'] . '" bgcolor="#000000"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="movie" value="http://www.twitch.tv/widgets/live_embed_player.swf" /><param name="flashvars" value="hostname=www.twitch.tv&channel=' . $info_stream['login'] . '&auto_play=true&start_volume=25" /></object>'); } else { $tpl->set('{player}', 'Вывод плеера отключено в настройках!'); } if ($config['allow_alt_url']) { $tpl->set('{full_stream}', $config['http_home_url'] . "stream/" . $info_stream['login'] . "/");