<?

if ( $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest' ) {
    //header( 'Content-type: text/html; charset=windows-1251' );
} else {
    if ( !defined( 'MISOFT' ) ) { exit(); }
}

/*$cokie_task_status_css = ( int ) $_COOKIE['task_status'];
if($cokie_task_status_css > 0) {
	if(check_text( $_COOKIE['type'] ) == 'kategories') {
		$cokie_task_value_css = ( int ) $_COOKIE['zapros'];
	} 
	
	
}*/

?>

<script type="text/javascript">
	function search_kategories(e) {
		$('.wrap_body').scrollTop(0);
		if(e > 0) {
			document.cookie = "task_status=1";
			document.cookie = "type=kategories";
			document.cookie = "zapros="+e;
		} else {
			document.cookie = "task_status=0";
			document.cookie = "type=";
			document.cookie = "zapros=";
		}
		$('.body').load('/modules/tasks/show.php', {type:'kategories', zapros:e});
	}
	function search_status(e) {
		$('.wrap_body').scrollTop(0);
		if(e > 0) {
			document.cookie = "task_status=1";
			document.cookie = "type=status";
			document.cookie = "zapros="+e;
		} else {
			document.cookie = "task_status=0";
			document.cookie = "type=";
			document.cookie = "zapros=";
		}
		$('.body').load('/modules/tasks/show.php', {type:'status', zapros:e});
	}
	function search_task(a,b) {
		$('.wrap_body').scrollTop(0);
		if(a == 'id' || a == 'autor' || a == 'url') {
			document.cookie = "task_status=1";
			document.cookie = "type="+a;
			document.cookie = "zapros="+b;
		}
		$('.body').load('/modules/tasks/show.php', {type:a, zapros:b});
	}
	function up_money_task(e) {
		$('.wrap_body').scrollTop(0);
		document.cookie = "task_status=1";
		document.cookie = "type=money";
		document.cookie = "zapros="+e;
		$('.body').load('/modules/tasks/show.php', {type:'money', zapros:e});
	}
	function up_comment_task(e) {
		$('.wrap_body').scrollTop(0);
		document.cookie = "task_status=1";
		document.cookie = "type=coment";
		document.cookie = "zapros="+e;
		$('.body').load('/modules/tasks/show.php', {type:'coment', zapros:e});
	}

	$(document).ready(function(){
		$('.up_money_task').tipTip({defaultPosition:'right'});
		$('#sta1').tipTip({defaultPosition:'right'});
		$('#sta2').tipTip({defaultPosition:'right'});
		$('#sta3').tipTip({defaultPosition:'right'});
		
		
	});
</script>

<style>
	input[type="text"] {
	  border: 1px solid rgba(0, 0, 0, 0.15);
	  background: #ffffff !important;
	  outline: none;
	  height: 24px;
	  width: 240px;
	  color: #333;
	  font-size: 14px;
	  font-family: Tahoma;
	  padding-left: 5px;
	  padding-bottom: 4px;
	  padding-top: 3px;
	  
	}

	input[type="text"]:focus {
	  border: 1px solid #999999;
	}
</style>

<div style="width: 100%; height: 82px; background: #F4F4F4; ">
	<div style="color: #008BB1; padding-top: 10px; padding-bottom: 7px; padding-left: 10px; padding-right: 7px; "> <i class="fa fa-search" aria-hidden="true"></i> Поиск</div>
	<div class="searh-task-select">
		<select class="form-control " style="width: 180px;" id="search_type">
			<option value="id">ID задания</option>
			<option value="autor">ID рекламодателя</option>
			<option value="url">по ссылкам (URL)</option>
		</select>
	</div>
	<div class="searh-task-input">
		<input type="text" class="form-control input-fix-shearth-task" style="padding-left: 14px; position: absolute;" id="search_text" value="" placeholder="Что искать?">
	</div>
	<div class="searh-task-input">
		<button type="submit" class="btn btn-primary-searh" onclick="search_task($('#search_type').val(), $('#search_text').val());" ><i class="fa fa-search"></i> Искать</button>
	</div>
</div>

<div style="width: 758px; height: auto; background: #F4F4F4; margin-top: 10px; padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
	<div style="color: #008BB1; padding-top: 10px; padding-bottom: 7px; padding-right: 7px; "> <i class="fa fa-bars"></i> По категориям</div>
	<div class="btn-searh-categories-fix">	
		<span onclick="search_kategories();" class="btn-searh-categories">Все</span> 
		<span onclick="search_kategories(1);" class="btn-searh-categories">Только регистрация</span> 
		<span onclick="search_kategories(2);" class="btn-searh-categories">Только клики</span> 
		<span onclick="search_kategories(3);" class="btn-searh-categories">Регистрация с активностью</span> 
		<span onclick="search_kategories(4);" class="btn-searh-categories">Приглашение в рефералы</span> 
		<span onclick="search_kategories(5);" class="btn-searh-categories">Социальные сети</span>
	</div>
	<div class="btn-searh-categories-fix">	
		<span onclick="search_kategories(6);" class="btn-searh-categories">YouTube</span> 
		<span onclick="search_kategories(7);" class="btn-searh-categories">Постинг в форумы и/или блоги</span> 
		<span onclick="search_kategories(8);" class="btn-searh-categories">Написать статью или пресс-релиз</span> 
		<span onclick="search_kategories(9);" class="btn-searh-categories">Отзыв/проголосовать</span> 
		<span onclick="search_kategories(10);" class="btn-searh-categories">Forex</span> 
		<span onclick="search_kategories(11);" class="btn-searh-categories">Bitcoin</span> 
	</div>
	<div>
		<span onclick="search_kategories(12);" class="btn-searh-categories">Играть в игры</span> 
		<span onclick="search_kategories(13);" class="btn-searh-categories">Инвестировать</span> 
		<span onclick="search_kategories(14);" class="btn-searh-categories">Мобильные приложения</span> 
		<span onclick="search_kategories(15);" class="btn-searh-categories">Бонусы</span> 
		<span onclick="search_kategories(16);" class="btn-searh-categories">Прочее</span> 
	</div>
</div>

<div style="width: 758px; height: auto; background: #F4F4F4; margin-top: 10px; padding-left: 10px; padding-right: 10px; padding-bottom: 10px;">
	<div style="color: #008BB1; padding-top: 10px; padding-bottom: 7px; padding-right: 7px; "> <i class="fa fa-tags"></i> По типу</div>
	<div class="btn-searh-categories-fix">	
		<span onclick="search_status();" class="btn-searh-categories">Все</span> 
		<span onclick="search_status(1);" class="btn-searh-categories">V.I.P</span> 
		<span onclick="search_status(2);" class="btn-searh-categories">Многоразовые</span> 
	</div>
</div>
<br>		
<div style="width: 774px; margin-bottom: 20px;">
	<div style="margin-left: 60px; margin-bottom: -18px; margin-top: 18px;"><i class="fa fa-sticky-note-o" aria-hidden="true"></i> Название</div>
	<div class="" style="margin-left: 518px; position: absolute; margin-bottom: 25px; margin-top: -25px;">
		<div>Стоимость</div>
		<div style="margin-left: 15px;" >
			<a onclick="up_money_task(1);" class="tooltips " data-container="body"><i class="fa fa-arrow-down up_money_task" title="Cамые дорогие первыми"></i></a> &nbsp; 
			<a onclick="up_money_task(2);" class="tooltips " data-container="body"><i class="fa fa-arrow-up up_money_task" title="Cамые дешёвые первыми"></i></a>
		</div>
	</div>
	<div class="text-center" style="margin-left: 630px; position: absolute; margin-bottom: 25px; margin-top: -25px;">
		<div>Статистика</div>
		<div>
			<a onclick="up_comment_task(1);" class="tooltips " ><i id="sta1" class="color-green fa fa-flag  pointer " title="Первыми по количеству оплаченных заявок" ></i></a> &nbsp; 
			<a onclick="up_comment_task(2);" class="tooltips " ><i id="sta2" class="color-red fa fa-flag pointer" title="Первыми по количеству отказанных заявок" ></i></a> &nbsp;
			<a onclick="up_comment_task(3);" class="tooltips " ><i id="sta3" class="color-grey fa fa-flag pointer" title="Первыми по количеству тех, которые на проверке" ></i></a>
		</div>
	</div>
	<div class="text-center" style="margin-left: 735px; margin-bottom: 5px; margin-top: -5px; position: absolute;">
		<i class="fa fa-cogs"></i>    
	</div>
</div>



