<?php $this->load->view('header_front');
//code for to get web logo
error_reporting(0);
?>
<form name="job_order_from" method="request" action="<?php echo base_url();?>front_end/joblisting">
         <div class="vacancies-section">
                	<div class="container">
					<div class="section-welcome nav-welcome" style="margin-bottom: 0px !important;">
                    <ol class="breadcrumb">
						<li><a href="<?php echo base_url();?>">Home</a></li>
						<li><a href="<?php echo base_url();?>front_end/joblisting?job_order=1">Browse Jobs</a></li>
					</ol>
                    <a class="menubtn" href="#"><i class="fa fa-bars"></i></a>
                </div>
                    	<div class="row">
                        	<div class="col-md-3">
                                <div class="vacancies-contan">
                                	<ul class="specialisms-section">
                                    	<h2>Sectors</h2>
										     	<?php
												//code to get jobs cateories
												//$catCounter = 8;
                                                foreach($jobscategory as $val_cat)
                                                {
													$cat_id = $val_cat->jobs_category_id;
													$select = mysql_query("SELECT * FROM njobn_industeries WHERE industeries_id ='".$cat_id."'");
													$total = mysql_num_rows($select);
													if ($total > 0)
													{
													?>


                     <li onclick="window.location='<?php echo base_url();?>front_end/joblisting?job_cat=<?php echo $val_cat->jobs_category_id;?>';"  style="cursor:pointer;width:109%"><?php echo $val_cat->jobs_category_title;?></li>
										<?php
										//if($catCounter < 1){break;}
													}
												}?>
                                     <h2 style="margin-top: 12px;">Search By Job Title</h2>
            <input type="text" name="job_titlesearch" id="search_title" onkeypress="return alphaOnly(event)" autocomplete="off" style="outline: none;"/></br>
			<div class="butten-section" style="margin-top: 10px;">
            <input type="submit" name="search_titl" id="search_titl" />
                                       </div></br>

                                    </ul>
                                    <div class="show-more-section">
                                    <!--	<a href="#">Show More</a>-->
                                    </div>
                                    <ul class="specialisms-section">
                                    	<h2>Job Type</h2>

									<li><input type="checkbox" name="fulltime" <?php if($_GET['fulltime']==5){?> checked="checked" <?php }?>   value="5" id="fulltime" onchange="this.form.submit()">
											<label>Full Time</label>
										</li>
											<li><input type="checkbox" name="parttime" <?php if($_GET['parttime']==4){?> checked="checked" <?php }?>   value="4" id="parttime" onchange="this.form.submit()">
											<label>Part Time</label>
										</li>
											<li><input  type="checkbox" name="contract" <?php if($_GET['contract']==2){?> checked="checked" <?php }?> value="2" id="contract" onchange="this.form.submit()">
											<label>Contract</label>
										</li>
										<li><input  type="checkbox" <?php if($_GET['temporary']==3){?> checked="checked" <?php }?>   name="temporary" value="3" id="temporary" onchange="this.form.submit()">
											<label>Temporary</label>
										</li>
										<li><input type="checkbox" name="permanent" <?php if($_GET['permanent']==7){?> checked="checked" <?php }?> value="7" id="permanent" onchange="this.form.submit()">
											<label>Permanent</label>
										</li>
									
										<li><input  type="checkbox" <?php if($_GET['volunteer']==1){?> checked="checked" <?php }?>   name="volunteer" value="1" id="volunteer" onchange="this.form.submit()">
											<label>Volunteer</label>
										</li>
										<li><input  type="checkbox" <?php if($_GET['other']==6){?> checked="checked" <?php }?>   name="other" value="6" id="other" onchange="this.form.submit()">
											<label>Other</label>
										</li>

                                    </ul>
                                    <div class="show-more-section">
                                    	<!--<a href="#">Show More</a>-->
                                    </div>

                                     <!--<ul class="specialisms-section">
                                    	<h2>Posted By</h2>
                                    	<li><input type="checkbox">
                                        	<label>Agency</label>
                                        </li>
                                        <li><input type="checkbox">
                                        	<label>Employer</label>
                                        </li>
                                    </ul>-->
<!--                                    <div class="show-more-section">
                                    	<a href="#">Show More</a>
                                    </div>
-->
                                    <ul class="specialisms-section">
                                    	<h2>Select Experience</h2>
                                    	<li>
										<select name="exp" id="exp"  style="outline: none;" onchange="this.form.submit()">
										<option value="">Select Min Experience</option>
<option  value="555"  <?php if($_GET['exp']==555){?> selected="selected" <?php }?>>Fresh</option>
<option  value="233" <?php if($_GET['exp']==233){?> selected="selected" <?php }?>>Less than 1 Year</option>
<?php
for($i=1;$i<=35;$i++)
{?>
<option  value="<?php echo $i ?>" <?php if($_GET['exp']==$i){?> selected="selected" <?php }?>><?php echo $i ?> Years</option>
<?php }?>
<option value="36" <?php if($_GET['exp']==36){?> selected="selected" <?php }?>>More than 35 Years</option>
</select>
                                        </li>
										
										<h2>Max Experience</h2>
                                    	<li>
										<select name="exp1" id="exp1"  style="outline: none;" onchange="this.form.submit()">
										<option value="">Select Max Experience</option>
<option  value="555"  <?php if($_GET['exp1']==555){?> selected="selected" <?php }?>>Fresh</option>
<option  value="233" <?php if($_GET['exp1']==233){?> selected="selected" <?php }?>>Less than 1 Year</option>
<?php
for($i=1;$i<=35;$i++)
{?>
<option  value="<?php echo $i ?>" <?php if($_GET['exp1']==$i){?> selected="selected" <?php }?>><?php echo $i ?> Years</option>
<?php }?>
<option value="36" <?php if($_GET['exp1']==36){?> selected="selected" <?php }?>>More than 35 Years</option>
</select>
                                        </li>

			<h2 style="margin-top: 12px;">Search By Salary</h2>
            <input type="text" name="salary_from" id="salary_from" onkeyup="javascript:this.value=Comma(this.value);"  placeholder="£ Min" autocomplete="off"  style="outline: none;"/></br></br>
			<input type="text" name="salary_to" id="salary_to" onkeyup="javascript:this.value=Comma(this.value);"  placeholder="£ Max" autocomplete="off"  style="outline: none;"/>
			<div class="butten-section" style="margin-top: 10px;">
            <input type="submit" name="search_salary" id="search_salary" />
                                       </div>
                                    </ul>
                                </div>
								<?php
								/*Code  for dynamic adverts on left side of page*****************************/
							/*foreach ($img_left as $row)
								{


								?>
                                <div class="add-section margin-top-30">
                                    <img src="--><?php //echo base_url();?><!--assets/upload/--><?php //echo $row->image?><!--" alt="add-image" onClick="window.location='--><?php //echo $row->url;?>//'" style="cursor:pointer;">
                                </div>
                                <div class="add-section margin-top-30 mobile-space">
                                    <img src="<?php //echo base_url();?><!--assets_front/images/--><?php //echo $row->image?><!--" alt="add-image">-->
                                </div>
                               <?php }*/?>
								</br></br>
                                <!--<div class="add-section margin-top-30">
                                    <img src="<?php echo base_url();?>assets_front/images/add-image.png" alt="add-image">
                                </div>
                                <div class="add-section margin-top-30 mobile-space">
                                    <img src="<?php echo base_url();?>assets_front/images/add-image2.png" alt="add-image">
                                </div>-->
                            </div>
                            <div class="col-md-9">
                            	<div class="jobs-vacancies-section">
                                	<h3><?php echo $count_number;?> Job(s)</h3>
                                   	<div class="righ-secalet">
						<select name="job_order" id="job_order"  style="outline: none;" onchange="this.form.submit()">
						<option  value="">Select Option</option>
							<option value="1" <?php if($_GET['job_order']==1){?> selected="selected" <?php }?>>All Job</option>
							<option value="2" <?php if($_GET['job_order']==2){?> selected="selected" <?php }?>>New Jobs</option>

						</select>
                                    </div>
                                </div>
                                <div class="row margin-top-45">
                                    <div class="col-md-10">
                                            <ul class="customer-bg">
                                                <?php
												//echo $search_string;
									/****************************************************************************/
									if (count($joblist) == 0) //if array size is null, no jobs exist
										{

										 if ($search_string == '')
										 {?>
<div><label style="text-align:center; padding-top: 10px; color:#cd0329">There are no vacancies available for "<?php if($search_string!=''){ echo $search_string ;}
else{ echo "this search";}
?>"</label></div>
										 <?php }
										 else
										 {?>
										  <div><label style="text-align:center; padding-top: 10px; color:#cd0329">There are no vacancies available for "<?php echo $search_string ?>"</label></div>
										 <?php }
										}
												/****************************************************************************/
												foreach($joblist as $val)
                                               {
											   $currency_value=$val->currency;
											   if($val->perday==1)
												{
												$perday='Per Day';
												}
												if($val->perday==2)
												{
												$perday='Per Week';
												}
												if($val->perday==3)
												{
												$perday='Per Annum';
												}
												$this->db->where('skill_id',$currency_value);
												$querycurrency=$this->db->get('currency');
												$resultscurrency = $querycurrency->result();
												foreach ($resultscurrency as $rowcurrency)
												{
												$currency=$rowcurrency->skill_code;
												}

											   ?>
                                                <li>
                                                    <div class="col-md-3 adds-bd">
                                                            <div class="logo-adds">
                                                                <img style="cursor:pointer;" onclick="window.location='<?php echo base_url();?>front_end/jobdetails?job_id=<?php echo $val->job_id;?>';" src="<?php echo base_url();?>assets/upload/<?=$val->comapny_image;?>" alt="<?php echo $val->company_name; ?>" class="img-responsive">
                                                            </div>
<?php
$can_id=$this->session->userdata('user_id');
$query = mysql_query("SELECT  * FROM shot_listjob where candidate_id='".$can_id."' AND job_id='".$val->job_id."'");
$total_pages = mysql_num_rows($query);
?>
		<?php
		if($total_pages >0)
		{?>
	<div class="butten-bg margin-top-30 mobile-space"> <a href="#"><i class="fa fa-check"" aria-hidden="true"></i>Shortlisted</a>
                                                            </div>
			<?php }
			else
			{?>
			<div class="butten-bg margin-top-30 mobile-space"> <a href="<?php echo base_url();?>front_end/add_shortlist?job_id=<?php echo $val->job_id;?>&exp_date=<?php echo $val->exp_date;?>&shortjoblist=shortjoblist"><i class="fa fa-star" aria-hidden="true"></i>Shortlist job</a>
                                                            </div>
			<?php }?>




                                                        </div>
                                                    <div class="col-md-9">
                                                        <div class="customer-service-section">
                                                            <h4><a href="<?php echo base_url();?>front_end/jobdetails?job_id=<?php echo $val->job_id;?>"><?php echo $val->job_title; ?></a></h4>
                                                            <span><?php
	$sel_cities=mysql_query("select * from cities where id='".$val->city."'");
	$fethch_cities=mysql_fetch_array($sel_cities);
	echo $fethch_cities['name']
	?></span>
                                                      
													  <p>
													  <?php
													  $fulldet=strip_tags($val->job_des);
													  $desvarib=substr($fulldet,0,200);
													  echo $desvarib;
													  ?>
													  </p>
													  <?php //echo   substr($val->job_des,0,50).'......';?>
                                                        </div>
                                                        <ul class="Permanent-section margin-top-45" style="margin-top: 8px !important;">
                                                            <li class="clock"><i class="fa" aria-hidden="true"></i>
															 <?php if($val->job_type==5){ echo "Full Time";}?>
								                 <?php if($val->job_type==4){ echo "Part Time";}?>
												 <?php if($val->job_type==2){ echo "Contract";}?>
												 <?php if($val->job_type==3){ echo "Temporary";}?>
												 <?php if($val->job_type==1){ echo "Volunteer";}?>
                                                  <?php if($val->job_type==7){ echo "Permanent";}?>
												<?php if($val->job_type==6){ echo "Other";}?></li>
                                                            <li class="views"><i class="fa" aria-hidden="true"></i>
															<?php
															//get applciations numbers
															$sel_apllicatons_count=mysql_query("select * from candidate_listjobs where job_id='".$val->job_id."'");
															$number_applciations=mysql_num_rows($sel_apllicatons_count);
															echo $number_applciations." Views";
															?></li>
															<!--<li &peranum></li>-->
                                                            <li class="money"><i class="fa" aria-hidden="true"></i>
				<?php echo 'From:'.' '.$currency.' '.$val->job_salary_from.' ,'.' '.'To:'.' '.$currency.' '.$val->job_salary_to.' '.$perday;?>
															</li>
                                                        </ul>
                                                    </div>
                                            	</li>
                                                <?php }?>
												<?php echo $this->pagination->create_links();?>
                                   			</ul>
                                    	</div>
                                    <div class="col-md-2 mobile-space">
                                    	<?php/*
								/*Code for dynamic adverts on right of page*****************************/
								/*foreach ($img_right as $row)
								{
								?>

                                    	<div class="add-imag-section">
                                        	<img  src="<?php echo base_url();?>assets/upload/<?php echo $row->image?>" alt="image" onClick="window.location='<?php echo $row->url;?>'" style="cursor:pointer;"/>
                                        </div>
                                        <?php /*<div class="add-imag-section margin-top-20">
                                        	<img src="<?php echo base_url();?>assets_front/images/<?php echo $row1->image?>" alt="image">
                                        </div> */?>
<?php //}?>
                                    </div>
                                </div>
                            	</div>
                        	</div>
                    	</div>
                	</div>
					</form>
        </div>
<?php $this->load->view('footer_front'); ?>