<?php 
	
	include_once("../view/header-footer/header.php");     
		
?> 

<div id="body">
<div class="wrapper">
<div class="bradeCrubs">
<a href="#">Home</a>
<a href="#">Job</a>
<a href="#" class="current">Accountant</a>
</div>
	<div id="dataLeft">
    <div class="filterHead">Filter jobs 
    <a class="clearAll" href="javascript:void(0)" id="clear_all_job_filers">Clear All</a>
    </div>
    <div class="panel-group" id="accordion">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 data-toggle="collapse" data-parent="#accordion" href="#collapse1"  class="panel-title expand">
           <div class="right-arrow pull-right" >+</div>
          <a href="#">Roles</a>
        </h4>
      </div>
	  
      <div id="collapse1" class="panel-collapse">
	  <input type=" text" class="filterInput" id="search_roles_" name="search_roles_" placeholder="Search Role E.q. Marketing">  
	  <div id="suggesstion_search_roles_">  </div> 
        <div class="panel-body" id="role-collapse"> 
            <ul class="innUl" id="job-role-ul"> 
				<?php   
				foreach($job_categories as $key=>$dt)
				{   
					$stmt =  $conn->prepare("select  name, id  from sub_job_categories   where category_id=:category_id  ");         
					$stmt->bindValue(':category_id', $dt->id, PDO::PARAM_INT); 
					$stmt->execute();   
					$sub_job_categories = $stmt->fetchAll(PDO::FETCH_OBJ);

				?>
            	<li id="job-category<?php echo $key;?>" >
					<input type="radio" <?php if($dt->id == end($category_id)) echo 'checked=checked'; ?>  name="job-category" onclick="search_by_category(<?php echo $key;?>,'<?php echo $dt->name;?>',<?php echo $dt->id;?>)" >&nbsp;<?php echo $dt->name;?>
					
					<?php 
						if($dt->id == end($category_id)) 
						{ 
							
							if($_SESSION['set_job_sub_category_val'])
							{
								$test_array = explode(",",$_SESSION['set_job_sub_category_val']); 
								array_pop($test_array); 	
							} 
					?>
						<input type="hidden" name="hidden_role_key_val" id="hidden_role_key_val"  value="<?php echo $key;?>" />
					<?php } ?>	
                	<ul class="innUlCheck"  id="job-sub-category-span<?php echo $key;?>" >
						<?php   
						foreach($sub_job_categories as  $dt1)
						{ 
						?> 
                        <li><input  type="checkbox"  <?php if (!empty($test_array)){ if(in_array($dt1->id,$test_array))  echo 'checked=checked'; } ?>  name="job-sub-category" id="job-sub-category<?php echo $dt1->id;?>"  value="<?php echo $dt1->id;?>"  onclick="search_by_sub_category(<?php echo $dt1->id;?>)" > &nbsp; <?php echo $dt1->name;?> </li>
						<?php 
						} 
						?>
                    </ul>
                </li> 
				<?php 
					} 
				?>
                
            </ul>
        </div>
      </div>
    </div>
	
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 data-toggle="collapse" data-parent="#accordion" href="#collapse2" class="panel-title expand">
            <div class="right-arrow pull-right">+</div>
          <a href="#">Locality</a>
        </h4>
      </div>
      <div id="collapse2" class="panel-collapse collapse">   
        <div class="panel-body">  
			 <!-- combo-box  -->
			 <a href="javascript:void(0)" class="cleFilter" id="clear_job_locality">Clear Filter</a> 
			<div class="comboOut">
				<input type="text" class="comboText" placeholder="E.q. Shalimar" id="job-locality" > 
				<ul id="job-locality-ul">
				<?php 
				$stmt =  $conn->prepare("select id,location_name from city_lacations  where city_id=:city_id  ");	  
				$stmt->bindValue(':city_id', $_COOKIE['search_city_id'] , PDO::PARAM_INT); 
				$stmt->execute();   
				$city_locations = $stmt->fetchAll(PDO::FETCH_OBJ); 
				foreach($city_locations as $dt) 
				{
				?> 
					<li><a href="javascript:void(0)" onClick="search_by_locality(<?php echo $dt->id;?>,'<?php echo $dt->location_name;?>')"><?php echo $dt->location_name;?></a></li> 
				<?php } ?>
				</ul>
					<span id="locality_placed">
						<?php 
						$test_array = explode(",",$_SESSION['search_by_locality_name']);
						array_pop($test_array); 
						foreach($test_array as $dt)
						$val .= $dt.' <br>';  
						echo $val;
						?> 
					</span>	
			</div>
			<div id="suggesstion_comboText"></div>  
			<!--  combo-box  -->  
        </div>
      </div>
    </div>
	
	
	<div class="panel panel-default">
      <div class="panel-heading">
        <h4 data-toggle="collapse" data-parent="#accordion" href="#collapse3" class="panel-title expand">
            <div class="right-arrow pull-right">+</div>
          <a href="#">Monthly Salay</a>
        </h4>
      </div>
      <div id="collapse3" class="panel-collapse collapse">
        <div class="panel-body">
			<a href="javascript:void(0)"class="cleFilter" id="clear_job_price">Clear Filter</a> 
        	<ul class="innUl">  
				<li><input type="radio" name="month-salary" class="month-salary" value="5000" <?php if($_SESSION['month_salary_val']==5000) echo 'checked=checked'; ?> />5,000 & above    </li>   
				<li><input type="radio" name="month-salary" class="month-salary"  value="6000" <?php if($_SESSION['month_salary_val']==6000) echo 'checked=checked'; ?> />6,000 & above       </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="7000" <?php if($_SESSION['month_salary_val']==7000) echo 'checked=checked'; ?> />7,000 & above       </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="8000" <?php if($_SESSION['month_salary_val']==8000) echo 'checked=checked'; ?> />8000 & above        </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="9000" <?php if($_SESSION['month_salary_val']==9000) echo 'checked=checked'; ?> />9,000 & above        </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="10000" <?php if($_SESSION['month_salary_val']==10000) echo 'checked=checked'; ?> />10,000 & above     </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="12000" <?php if($_SESSION['month_salary_val']==12000) echo 'checked=checked'; ?> />12,000 & above     </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="15000" <?php if($_SESSION['month_salary_val']==15000) echo 'checked=checked'; ?> />15,000 & above     </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="18000" <?php if($_SESSION['month_salary_val']==18000) echo 'checked=checked'; ?> />18,000 & above     </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="25000" <?php if($_SESSION['month_salary_val']==25000) echo 'checked=checked'; ?> />25,000 & above     </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="30000" <?php if($_SESSION['month_salary_val']==30000) echo 'checked=checked'; ?> />30,000 & above     </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="40000" <?php if($_SESSION['month_salary_val']==40000) echo 'checked=checked'; ?> />40,000 & above     </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="50000" <?php if($_SESSION['month_salary_val']==50000) echo 'checked=checked'; ?> />50,000 & above     </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="70000" <?php if($_SESSION['month_salary_val']==70000) echo 'checked=checked'; ?> />70000 & above     </li>
				<li><input type="radio" name="month-salary" class="month-salary"  value="100000" <?php if($_SESSION['month_salary_val']==100000) echo 'checked=checked'; ?> />1,00,000 & above     </li>
 
                 
            </ul>
        </div>
      </div>
    </div>
	
		
	<?php 
		$test_array = explode(",",$_SESSION['search_by_type_val']); 
		array_pop($test_array);     
	?> 
	<div class="panel panel-default">
      <div class="panel-heading">
        <h4 data-toggle="collapse" data-parent="#accordion" href="#collapse4" class="panel-title expand">
            <div class="right-arrow pull-right">+</div>
          <a href="#">Job Type</a>
        </h4>
      </div>
      <div id="collapse4" class="panel-collapse collapse">
        <div class="panel-body">
			<!--<a href="javascript:void(0)"class="cleFilter" id="clear_job_type">Clear Filter</a> -->
        	<ul class="innUl">   
				<li><input type="checkbox" name="job-type" id="job-type3" onclick="search_by_type(3)" <?php if(in_array(3,$test_array)) echo 'checked=checked'; ?> /> &nbsp;Full Time      </li>
				
				<li> <input type="checkbox" name="job-type" id="job-type2" onclick="search_by_type(2)" <?php if(in_array(2,$test_array)) echo 'checked=checked'; ?>  /> &nbsp;  Part Time  </li>
				
				<li><input type="checkbox" name="job-type" id="job-type1" onclick="search_by_type(1)" <?php if(in_array(1,$test_array)) echo 'checked=checked'; ?>  /> &nbsp;   Work From  Home  </li>
				
				<li> <input type="checkbox" name="job-type" id="job-type4" onclick="search_by_type(4)"<?php if(in_array(4,$test_array)) echo 'checked=checked'; ?>   />&nbsp;Internship </li>  
            </ul>
        </div>
      </div>
    </div>
	
   
  </div> 
    
    </div>
   <div id="MyIframeDivs"> <?php include_once 'basic-search.php';	?> </div>    
<div class="clear"></div>
</div>
<br>

    
 <input type="hidden" value="<?php echo  $_COOKIE['search_city_id'];?>" id="search_city_id_hidden" name="search_city_id_hidden" />

</div>

<?php include_once("../view/header-footer/footer.php");  