{{featured}}

<div class="popular_below_wrap">
	<div class="below_wrap_heading">
		<h3>{{LANG popular_channels}}</h3>
		<div class="filter_below_wrap_popular">
			<select name="type" class="form-group form-control" id="sort_channels_by">
				<option value="views" <?php echo ($pt->type == 'views') ? 'selected': '';?>>{{LANG views}}</option>
				<option value="subscribers" <?php echo ($pt->type == 'subscribers') ? 'selected': '';?>>{{LANG subscribers}}</option>
				<option value="most_active" <?php echo ($pt->type == 'most_active') ? 'selected': '';?>>{{LANG most_active}}</option>
			</select>
			<select id="sort_channels_type" name="type" class="form-group form-control">
				<option value="today" <?php echo ($pt->cat_type == 'today') ? 'selected': '';?>>{{LANG today}}</option>
				<option value="this_week" <?php echo ($pt->cat_type == 'this_week') ? 'selected': '';?>>{{LANG this_week}}</option>
				<option value="this_month" <?php echo ($pt->cat_type == 'this_month') ? 'selected': '';?>>{{LANG this_month}}</option>
				<option value="this_year" <?php echo ($pt->cat_type == 'this_year') ? 'selected': '';?>>{{LANG this_year}}</option>
				<option value="all_time" <?php echo ($pt->cat_type == 'all_time') ? 'selected': '';?>>{{LANG all_time}}</option>
			</select>
			<button id="submit" name="submit" class="btn btn-main">{{LANG submit}}</button>
		</div>
	</div>


	<div class="author-list channels_list_all">
		{{CHANNELS}}
	</div>

	<?php if ($pt->channels_count > 1) { ?>
		<div class="channel_pt_ab">
			<div class="watch-video-show-more desc load-more" data-type="popular_channels" data-sort-by="<?php echo ($pt->type);?>" <?php if (!empty($pt->cat_type)) { ?> data-sort-type="<?php echo ($pt->cat_type);?>"<?php } ?>>{{LANG show_more}}</div>
		</div>
	<?php } ?>
</div>

<?php /* ?>
<div class="popular_channels_prnt">
	<div class="popular_channels">
		<svg class="bg_trail" preserveAspectRatio="none" xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svgjs="http://svgjs.dev/svgjs" viewBox="0 0 800 800"><g fill="hsl(0, 0%, 100%)"><rect width="101" height="14" x="124.5" y="544" rx="7" transform="rotate(147, 175, 551)" opacity="0.15"></rect><rect width="411" height="14" x="79.5" y="276" rx="7" transform="rotate(147, 285, 283)" opacity="0.52"></rect><rect width="170" height="14" x="45" y="736" rx="7" transform="rotate(147, 130, 743)" opacity="0.77"></rect><rect width="357" height="14" x="-48.5" y="145" rx="7" transform="rotate(147, 130, 152)" opacity="0.88"></rect><rect width="131" height="14" x="-38.5" y="103" rx="7" transform="rotate(147, 27, 110)" opacity="0.64"></rect><rect width="441" height="14" x="162.5" y="637" rx="7" transform="rotate(147, 383, 644)" opacity="0.31"></rect><rect width="129" height="14" x="23.5" y="475" rx="7" transform="rotate(147, 88, 482)" opacity="0.14"></rect><rect width="326" height="14" x="136" y="733" rx="7" transform="rotate(147, 299, 740)" opacity="0.53"></rect><rect width="370" height="14" x="198" y="377" rx="7" transform="rotate(147, 383, 384)" opacity="0.73"></rect><rect width="164" height="14" x="669" y="646" rx="7" transform="rotate(147, 751, 653)" opacity="0.81"></rect><rect width="155" height="14" x="668.5" y="254" rx="7" transform="rotate(147, 746, 261)" opacity="0.97"></rect><rect width="266" height="14" x="327" y="740" rx="7" transform="rotate(147, 460, 747)" opacity="0.35"></rect><rect width="280" height="14" x="26" y="238" rx="7" transform="rotate(147, 166, 245)" opacity="0.37"></rect><rect width="106" height="14" x="-14" y="737" rx="7" transform="rotate(147, 39, 744)" opacity="0.44"></rect><rect width="229" height="14" x="341.5" y="229" rx="7" transform="rotate(147, 456, 236)" opacity="0.49"></rect><rect width="223" height="14" x="272.5" y="519" rx="7" transform="rotate(147, 384, 526)" opacity="0.62"></rect><rect width="56" height="14" x="592" y="271" rx="7" transform="rotate(147, 620, 278)" opacity="0.48"></rect><rect width="238" height="14" x="541" y="724" rx="7" transform="rotate(147, 660, 731)" opacity="0.72"></rect><rect width="95" height="14" x="4.5" y="290" rx="7" transform="rotate(147, 52, 297)" opacity="1.00"></rect><rect width="388" height="14" x="370" y="194" rx="7" transform="rotate(147, 564, 201)" opacity="0.19"></rect><rect width="371" height="14" x="65.5" y="422" rx="7" transform="rotate(147, 251, 429)" opacity="0.73"></rect><rect width="500" height="14" x="116" y="163" rx="7" transform="rotate(147, 366, 170)" opacity="0.59"></rect><rect width="367" height="14" x="-67.5" y="38" rx="7" transform="rotate(147, 116, 45)" opacity="0.26"></rect><rect width="370" height="14" x="-31" y="359" rx="7" transform="rotate(147, 154, 366)" opacity="0.56"></rect><rect width="345" height="14" x="31.5" y="676" rx="7" transform="rotate(147, 204, 683)" opacity="0.16"></rect><rect width="465" height="14" x="271.5" y="358" rx="7" transform="rotate(147, 504, 365)" opacity="0.55"></rect><rect width="57" height="14" x="732.5" y="114" rx="7" transform="rotate(147, 761, 121)" opacity="0.98"></rect><rect width="439" height="14" x="319.5" y="75" rx="7" transform="rotate(147, 539, 82)" opacity="0.38"></rect><rect width="96" height="14" x="-2" y="544" rx="7" transform="rotate(147, 46, 551)" opacity="0.19"></rect><rect width="154" height="14" x="-10" y="629" rx="7" transform="rotate(147, 67, 636)" opacity="0.90"></rect><rect width="73" height="14" x="632.5" y="161" rx="7" transform="rotate(147, 669, 168)" opacity="0.63"></rect><rect width="254" height="14" x="555" y="37" rx="7" transform="rotate(147, 682, 44)" opacity="0.74"></rect><rect width="140" height="14" x="667" y="367" rx="7" transform="rotate(147, 737, 374)" opacity="0.92"></rect><rect width="210" height="14" x="290" y="44" rx="7" transform="rotate(147, 395, 51)" opacity="0.40"></rect><rect width="104" height="14" x="-3" y="399" rx="7" transform="rotate(147, 49, 406)" opacity="0.93"></rect><rect width="203" height="14" x="509.5" y="390" rx="7" transform="rotate(147, 611, 397)" opacity="0.18"></rect><rect width="372" height="14" x="366" y="633" rx="7" transform="rotate(147, 552, 640)" opacity="0.62"></rect><rect width="567" height="14" x="-30.5" y="100" rx="7" transform="rotate(147, 253, 107)" opacity="0.49"></rect><rect width="471" height="14" x="47.5" y="554" rx="7" transform="rotate(147, 283, 561)" opacity="0.17"></rect><rect width="606" height="14" x="393" y="500" rx="7" transform="rotate(147, 696, 507)" opacity="0.32"></rect><rect width="302" height="14" x="355" y="506" rx="7" transform="rotate(147, 506, 513)" opacity="0.33"></rect><rect width="72" height="14" x="13" y="194" rx="7" transform="rotate(147, 49, 201)" opacity="0.59"></rect></g></svg>
		<svg height="512" viewBox="0 0 64 64" width="512" class="icon" xmlns="http://www.w3.org/2000/svg" data-name="Layer 1"><path d="m51.9944 27.467a31.1074 31.1074 0 0 1 -3.389-14.0312v-.0964l-8.2354 3.4523c-.1042-.0498 3.8715-10.7917 3.8715-10.7917-5.8787 1.02-24.7521 12.1022-28.0964 15.7463a22.4309 22.4309 0 1 0 35.8493 5.7207z" fill="#fad657"/><g fill="#e6463c"><path d="m40.5786 33.4591a4.8527 4.8527 0 0 0 -6.8629 0l-1.7157 1.7157-1.7157-1.7157a4.8528 4.8528 0 0 0 -6.8629 6.8629l8.5786 8.7157 8.5786-8.7157a4.8527 4.8527 0 0 0 0-6.8629z"/><circle cx="9" cy="18" r="1"/><circle cx="58" cy="27" r="1"/><circle cx="52" cy="8" r="1"/></g><path d="m58 17c0 1.6569-2 3-2 3s-2-1.3431-2-3 2-3 2-3 2 1.3431 2 3z" fill="#fad657"/><path d="m19.9179 10.9179c-1.5888 1.5888-4.7947.9589-4.7947.9589s-.63-3.2059.9589-4.7947 4.7947-.9589 4.7947-.9589.6299 3.2059-.9589 4.7947z" fill="#fad657"/></svg>
		<h2>{{LANG popular_channels}}</h2>
		<div class="vid_pop_chnl_filtr">
			<span>{{LANG filter_by}}</span>
			<select name="type" class="form-group form-control" id="sort_channels_by">
				<option value="views" <?php echo ($pt->type == 'views') ? 'selected': '';?>>{{LANG views}}</option>
				<option value="subscribers" <?php echo ($pt->type == 'subscribers') ? 'selected': '';?>>{{LANG subscribers}}</option>
				<option value="most_active" <?php echo ($pt->type == 'most_active') ? 'selected': '';?>>{{LANG most_active}}</option>
			</select>
			<select id="sort_channels_type" name="type" class="form-group form-control">
				<option value="today" <?php echo ($pt->cat_type == 'today') ? 'selected': '';?>>{{LANG today}}</option>
				<option value="this_week" <?php echo ($pt->cat_type == 'this_week') ? 'selected': '';?>>{{LANG this_week}}</option>
				<option value="this_month" <?php echo ($pt->cat_type == 'this_month') ? 'selected': '';?>>{{LANG this_month}}</option>
				<option value="this_year" <?php echo ($pt->cat_type == 'this_year') ? 'selected': '';?>>{{LANG this_year}}</option>
				<option value="all_time" <?php echo ($pt->cat_type == 'all_time') ? 'selected': '';?>>{{LANG all_time}}</option>
			</select>
			<button id="submit" name="submit" class="btn btn-main">{{LANG submit}}</button>
	   </div>
	</div>
		
	<div class="row author-list popular_channels_list">
		{{CHANNELS}}
	</div>
</div>


<div class="clear"></div>
<?php if ($pt->channels_count > 1) { ?>
	<div class="watch-video-show-more desc load-more" data-type="popular_channels" data-sort-by="<?php echo ($pt->type);?>" <?php if (!empty($pt->cat_type)) { ?> data-sort-type="<?php echo ($pt->cat_type);?>"<?php } ?>>{{LANG show_more}}</div>
<?php } ?>

<div class="clear"></div>
<?php */ ?>
<script type="text/javascript">
	$('#submit').on('click', function(event) {
		var sort_by = $('#sort_channels_by').val();
		var sort_type = $('#sort_channels_type').val();
		$('#link_redirect_to_page').attr('data-load', '?link1=popular_channels&type='+sort_by+'&sort_type='+sort_type);
		$('#link_redirect_to_page').click();
	});
	
	//$('#toggle-mode').on('change', function(event) {
		//setTimeout(() => {
			//document.location.reload();
		//}, 1000);
	//});
</script>