<div id="radiobells_container"><a href="https://www.radiobells.om/" rel="nofollow" id="RP_link">Онлайн радио</a> #radiobells_script_hash</div><link href="../files/radio/style.css" type="text/css" rel="stylesheet" /><script type="text/javascript">var rad_backcolor="#4682B4"; var rad_logo = "black"; var rad_autoplay = false; var rad_width = "responsive"; var rad_width_px = 330;var rad_stations =[
['http://air.radiorecord.ru:805/rr_320','Радио Рекорд','radiorecord'],
['https://air2.radiorecord.ru:805/ibiza_128','Record Innocence','radiorecord'],
['http://air.radiorecord.ru:805/deep_320','Record Deep','radiorecord'],
['http://air2.radiorecord.ru:805/rus_320','Russian MIX'],
['http://air2.radiorecord.ru:805/ps_320','Pirate Station'],
['https://hitfm.hostingradio.ru/hitfm96.aacp','Хит FM'],
['http://nashe1.hostingradio.ru/nashe-128.mp3','Наше радио','nashe'],
['http://ep256.hostingradio.ru:8052/europaplus256.mp3','Европа плюс','europaplus'],
['http://ic7.101.ru:8000/a100?userid=0','Авторадио','avtoradio'],
['http://ic7.101.ru:8000/a99?','Радио Energy','nrj'],
['http://nashe1.hostingradio.ru/rock-128.mp3','ROCK FM','rockfm'],
['https://dfm.hostingradio.ru/dfm96.aacp','DFM','dfm'],
['http://ic7.101.ru:8000/a219?userid=0','Like FM','likefm'],
['https://maximum.hostingradio.ru/maximum96.aacp','Радио Максимум','maximum'],
['https://rockhits.hostingradio.ru/rockhits96.aacp','Maximum: Rock Hits','maximumrockhits'],
['http://air2.radiorecord.ru:805/rock_320','Record Rock','recordrock'],
['http://nashe1.hostingradio.ru/best-128.mp3','Радио Best','bestfm'],
['https://montecarlo.hostingradio.ru/montecarlo96.aacp','Радио Монте-Карло','montecarlo'],
['http://jfm1.hostingradio.ru:14536/rock90.mp3','Rock FM: 90s','rockfm90'],
['http://ic7.101.ru:8000/a1?userid=0','Дискотека 80-х','disco80'],
['http://listen1.myradio24.com:9000/5967','90s Eurodance','diskoteka90'],
['http://air2.radiorecord.ru:805/sd90_320','Супердискотека 90-х','super90'],
['https://hitfm-hit2000.hostingradio.ru/hit200096.aacp','Хит FM 2000-е','hitfm2000'],
['http://retro90.hostingradio.ru:8025/retro90-128.mp3','Ретро FM: 90-е','retrofm90'],
['http://retro80.hostingradio.ru:8025/retro80-128.mp3',' Ретро FM: 80-е','retrofm80'],
['http://retro70.hostingradio.ru:8025/retro70-128.mp3','Ретро FM: 70-е','retrofm70'],
['http://air.radiorecord.ru:805/1980_320','Радио Рекорд 1980-е','radiorecord80'],
['http://194.87.111.252:8000/live','Nu Euphoria Trance Radio','nueuphoria'],
['http://91.217.254.41:8000/RadioEssential','Radio Essential','radioessential'],
['http://ic7.101.ru:8000/c16_13?','Euro Hits','eurohits'],
['http://online.radiokarnaval.ru:8000/stream/2/','Радио Карнавал','karnaval'],
['http://streamingads.hotmixradio.fm/hotmixradio-90-128.mp3','HotMix 90th','hotmix90'],
['http://streamingads.hotmixradio.fm/hotmixradio-80-128.mp3','HotMix 80th','hotmix80'],
['http://195.242.219.208:8100/history','Barneo Fm History','barneofmhistory'],
['https://zaycevfm.cdnvideo.ru/ZaycevFM_pop_256.mp3','Зайцев FM: Поп-музыка','zaycevpop'],
['http://zaycevfm.cdnvideo.ru/ZaycevFM_electronic_256.mp3','Зайцев FM: Club','zaycevclub'],
['http://air.radiorecord.ru:805/eurodance_320','Record Eurodance','recordeurodance'],
['http://streamingads.hotmixradio.fm/hotmixradio-rock-128.mp3','HotMix Rocks','hotmixrock'],
['http://sanfm.ru:8000/alternative','SanFm Alternative','sanfmalternative'],
['http://listen6.myradio24.com:9000/51020','KEXXX.Rocks','kexxxrocks'],
['http://195.78.93.18:8000/jazz','More FM Jazz','morefmjazz'],
['http://air.radiorecord.ru:805/trancehouse_320','Record TranceHouse','recordtrancehouse'],
['http://hestia2.cdnstream.com/1301_128','Reggae 141','reggae141'],
['http://listen.megahit.online/mega0mp128','Радио Мегахит','megahitonline'],
['http://air.radiorecord.ru:805/progr_320','Record Progressive','recordprogressive'],
['http://streamingads.hotmixradio.fm/hotmixradio-dance-128.mp3','HotMix Dance','hotmixdance'],
['http://free-shoutcast.com:18586/;stream.nsv?1416664640250.mp3','Music In Paradise','musicinparadise'],
['http://icecast-radiovanya.cdnvideo.ru/radiovanya','Радио Ваня','vanya'],
['http://listen.radiogora.ru:8800/electro320','Радио Гора Electro','radiogoraelectro'],
['http://online-radioroks.tavrmedia.ua/RadioROKS_HD','Radio Roks','radiorocks'],
['http://ic7.101.ru:8000/a202','Comedy Radio','comediradio'],
['http://stream-tx1.radioparadise.com:80/mp3-192','Radio Paradise','paradise'],
['http://ic7.101.ru:8000/c19_1?userid=0','Relax FM: Nature','relaxfmnature'],
['http://195.242.219.208:8200/enigma','Radio Enigma','radioenigma'],
['http://listen1.myradio24.com:9000/2288','Soundeo FM','radiosoundeo']];</script>
<script type="text/javascript" src="../files/radio/v2_1.js" charset="UTF-8"></script>
<div class="r_block">
	<div class="r_block_head">
		<span class="glyphicon glyphicon-comment"></span> Чат
	</div>
	<div id="chat">
		<form>
			<div id="drop_zone">
				<div id="chat_messages"></div>

				<div id="chat_sound_playes"></div>
				<input id="load_val" type="hidden" value="1" />
				<input id="last_mess" type="hidden" value="" />
				<input id="stop_sending" type="hidden" value="0">
				{if(isset($_SESSION['id']))}
				<div class="input-group mt-3">
					<div class="smile_input">
						<input id="message_input" type="text" class="form-control p-r-30" placeholder="Введите сообщение...">
						<div id="smile_btn" class="smile_btn" data-container="body" data-toggle="popover" data-placement="top" data-content="empty"></div>
					</div>
					<span class="input-group-btn">
						<input id="send_button" type="button" class="btn btn-default" value="Отправить" onclick="chat_send_message();"/>
					</span>
				</div>
				{/if}
			</div>
		</form>
	</div>
	<div id="passive" class="disp-n">
		<center>
			<img src="{site_host}templates/{template}/img/zzz.png">
			<p class="mt-10">Включен пассивный режим.</p>
			<p>Вы отсутствовали более чем <b></b> минут.</p>
		</center>
	</div>

	<script>
		$(document).ready( function(){
			var dropZone = $('#drop_zone'),
			maxFileSize = 2*1024*1024; //2мб макс размер
			drop_file = true; //false - выкл , true - вкл | загрузка изображений в чат

			if (typeof(window.FileReader) != 'undefined' && drop_file) {
				dropZone[0].ondragover = function(event) {
					dropZone.addClass('hover');
					return false;
				};

				dropZone[0].ondragleave = function() {
					dropZone.removeClass('hover');
					return false;
				};

				dropZone[0].ondrop = function(event) {
					event.preventDefault();
					dropZone.removeClass('hover');

					var file = event.dataTransfer.files[0];

					if (file.size > maxFileSize) {
						show_noty('Down', 'error', '<a>Файл слишком большой</a>', '3000');
						dropZone.addClass('error');
						setTimeout(function(){
							dropZone.removeClass('error');
						}, 1000);
						return false;
					}

					var data = new FormData;
					data.append("file", file);
					data.append("token", $('#token').val());
					data.append("drop_img", '1');
					data.append("phpaction", '1');

					clearInterval(chat_interval);
					NProgress.start();
					$.ajax({
						type: "POST",
						url: "../ajax/chat_actions.php",
						data: data,
						processData: false,
						contentType: false,
						dataType: "json",

						success: function(result) {
							NProgress.done();
							chat_get_messages(1);
							if(result.status == 1){
								setTimeout(show_ok, 500);
							} else {
								setTimeout(show_error, 500);
								show_noty('Down', 'error', '<a>'+result.data+'</a>', '3000');
								dropZone.addClass('error');
								setTimeout(function(){
									dropZone.removeClass('error');
								}, 1000);
							}
						}
					});
				};
			}
		});

		$('#smile_btn').popover({ html: true, animation: true, trigger: "click" });
		$('#smile_btn').on('show.bs.popover', function () {
			$(document).mouseup(function (e) {
				var container = $(".popover-content");
				if (container.has(e.target).length === 0){
					$('#smile_btn').popover('hide'); selected = 'gcms_smiles';
				}
			});
		});

		function set_sticker(elem){
			if($('#stop_sending').val() == 0){
				var text = "sticker"+$(elem).attr("src");
				text = encodeURIComponent(text);
				chat_send_message(text);
				$('#smile_btn').popover('hide'); selected = 'gcms_smiles';
			}
		}
		function set_smile(elem){
			$("#message_input").focus();
			var text = $("#message_input").val();
			var smile = $(elem).attr("title");
			$("#message_input").val(text+" "+smile+" ");
			$('#smile_btn').popover('hide'); selected = 'gcms_smiles';
		}

		$(document).ready(function (){
			get_smiles('#smile_btn');
			chat_first_messages();

			$('#message_input').keydown(function(event){
				if (event.which == 13 && !event.shiftKey){
					if($('#stop_sending').val() == 0){
						event.preventDefault();
						chat_send_message();
					}
				}
			});
		});

		var block = document.getElementById("chat_messages");
		var load_val = $('#load_val').val();
		block.onscroll = function() {
			if((block.scrollTop < 300) && (load_val == $('#load_val').val())) {
				$('#load_val').val(+load_val + 1);
				chat_load_messages();
			}
		}

		idleTimer = null;
		idleState = false;
		idleWait = 600000;
		$(document).ready( function(){
			$(document).bind('mousemove keydown scroll', function(){
				clearTimeout(idleTimer);
				if(idleState == true){ 
					reset_page();
				}

				idleState = false;
				idleTimer = setTimeout(function(){ 
					clearInterval(chat_interval);
					$("#chat").fadeOut();
					$("#passive").fadeIn();
					$("#passive b").append(idleWait/1000/60);
					idleState = true; 
				}, idleWait);
			});
			$("body").trigger("mousemove");
		});
	</script>
</div>