<?php $this->load->view('header_front'); 
//code for to get web logo		
$candidate_id=$this->session->userdata('user_id');	
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">
                    <ol class="breadcrumb">
						<li><a href="<?php echo base_url();?>">Home</a></li>
						<li><a href="<?php echo base_url();?>front_end/jobdetails">Job Details</a></li>
					</ol>
                    <a class="menubtn" href="#"><i class="fa fa-bars"></i></a>
                </div></br>
                    	<div class="row">
                        	<div class="col-md-3">
                                <div class="vacancies-contan">
                                	<ul class="specialisms-section">
                                    	<h2>Specialisms</h2>
										     	<?php  
												//code to get jobs cateories
                                                foreach($jobscategory as $val_cat)
                                                {	
                                                ?>  
                     <li onclick="window.location='<?php echo base_url();?>front_end/joblisting?job_cat=<?php echo $val_cat->jobs_category_id;?>';"  style="cursor:pointer;text-decoration:underline;width:109%"><?php echo $val_cat->jobs_category_title;?></li>
										<?php }?>
                                     
                                    </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="permanent" <?php if($_GET['permanent']==1){?> checked="checked" <?php }?> value="1" id="Permanent" onchange="this.form.submit()">
                                      <label>Permanent</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="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="fulltime" <?php if($_GET['parttime']==5){?> checked="checked" <?php }?>   value="5" id="fulltime" onchange="this.form.submit()">
                                      <label>Full Time</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>Experience</h2>
                                    	<li>
										<select name="exp" id="exp"  onchange="this.form.submit()">
										<option value="">Select Experience</option>
<option  value="0"  <?php if($_GET['exp']==0){?> 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 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="border-radius: 0px;"/></br>
			<div class="butten-section" style="margin-top: 10px;">
            <input type="submit" name="search_titl" id="search_titl" />
                                       </div></br>
			<h2 style="margin-top: 12px;">Search By Salary</h2>
            <input type="text" name="salary_from" id="salary_from" onkeypress="return isNumberKey(event)" placeholder="25000" autocomplete="off" style="border-radius: 0px;"/></br></br>
			<input type="text" name="salary_to" id="salary_to"onkeypress="return isNumberKey(event)" placeholder="50000" autocomplete="off" style="border-radius: 0px;"/>
			<div class="butten-section" style="margin-top: 10px;">
            <input type="submit" name="search_salary" id="search_salary" />
                                       </div>
                                      
                                    </ul>
                                    
                                 <!--   <div class="show-more-section">
                                    	<a href="#">Show More</a>
                                    </div>-->
                                    
                                     <!--<ul class="specialisms-section">
                                    	<h2>Date posted</h2>
                                    	<li>
                                        	<select>
                                            	<option>Today</option>
                                                <option>Today</option>
                                                <option>Today</option>
                                            </select>
                                        </li>
                                    </ul>-->
                                    
                                </div>
<?php
/*Code for dynamic adverts on left 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="image" onClick="window.location='<?php echo $row->url;?>'" style="cursor:pointer;">
</div>
<?php }
/*******************************************/?></br></br>
                            </div>
                            <div class="col-md-9">
                            	<div class="jobs-vacancies-section">
								<p style="color:#FF0000;"> <?php echo $this->session->flashdata('job_list');?></p> 
                                	<h3><?php echo $count_number;?> Jobs & Vacancies</h3>
                                   	<div class="righ-secalet">
						<select name="job_order" id="job_order"  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
												foreach($joblist as $val)
                                               {
											   $currency_value=$val->currency;
												if($currency_value==1)
												{
												$currency='&pound;';
												}
												if($currency_value==2)
												{
												$currency='$';
												}
												if($currency_value==3)
												{
												$currency='&euro;';
												}
												if($currency_value==4)
												{
												$currency='&#x20B9;';
												}
							  //code fot to counter job view
							 $query_frocouner=mysql_query("insert into jobview_counters set job_id='".$val->job_id."',
																						date='".date("Y/m/d")."'");
							
											   ?>
											   <p style="color:#FF0000;"> <?php echo $this->session->flashdata('sendemail');?></p> 
                                                <li style="border-bottom: 1px solid #000;">
                                                    <div class="col-md-3 adds-bd">
                                                            <div class="logo-adds">
   <img 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="report-bg" style="margin-top:11px!important;">
           <a href="#"><i class="fa fa-check" aria-hidden="true"></i>Shortlist job</a>
                                                            </div>
			<?php }
			else
			{?>
			<div  class="report-bg" style="margin-top:11px!important;">
           <a href="<?php echo base_url();?>front_end/add_shortlist?job_id=<?php echo $val->job_id;?>"><i class="fa fa-star" aria-hidden="true"></i>Shortlist job</a>
                                                            </div>
			<?php }?>
															  <div class="report-bg" style="margin-top:11px!important;">
   <a href="<?php echo base_url();?>front_end/sendemail?job_id=<?php echo $val->job_id;?>" data-target="#sendemail" data-toggle="modal"  >
   <i class="fa fa-envelope-o" aria-hidden="true"></i>Email job</a>
                                                            </div>
                                                           
                                                            <?php 
															
									$sql=mysql_query("SELECT * FROM  candidate_listjobs WHERE candidate_id='".$candidate_id."' and  job_id='".$val->job_id."'");
											$count=mysql_num_rows($sql);
											if($count > 0)
											{?>
											 <span>You have already applied for this</span>
											<?php }
											else
											{
												$today = date("Y-m-d");
												$exp_date = $val->exp_date;
												if ($exp_date > $today) {
											?>
   <div class="report-bg" style="margin-top:11px!important;">
   <a href="<?php echo base_url();?>front_end/appl_job?job_id=<?php echo $val->job_id;?>">
   <i class="fa fa-chevron-circle-right" aria-hidden="true"></i>Apply Now</a>
   </div>
   <?php } ?>
   <div>
 <?php if ($exp_date < $today) {  ?>
	<label style="text-align:center; padding-top: 10px; color:#cd0329 ">Application Date Expired</label>
    <?php } ?>
    </div>
   <?php } ?>
                                                            
                                                            
                                                        </div>
                                                    <div class="col-md-9">
                                                        <div class="customer-service-section">
                                                            <h4><?php echo $val->job_title; ?></h4>
                                                            <span>
															<?php
															$sel_countries=mysql_query("select * from countries where id='".$val->job_location_id."'");
															$fetch_countries = mysql_fetch_array($sel_countries);
	$sel_cities=mysql_query("select * from cities where id='".$val->city."'");
	$fethch_cities=mysql_fetch_array($sel_cities);
	echo $fetch_countries['name'].", ".$fethch_cities['name']
	?></span>
                                                        </div>
                                                        <ul class="Permanent-section margin-top-45" style="margin-top:13px!important;">
                                                            <li><i class="fa fa-clock-o" aria-hidden="true"></i>
												 <?php if($val->job_type==1){ echo "Permanent";}?>
								                 <?php if($val->job_type==2){ echo "Contract";}?>
												 <?php if($val->job_type==3){ echo "Temporary";}?>
												 <?php if($val->job_type==4){ echo "Part Time";}?>
												 <?php if($val->job_type==5){ echo "Full Time";}?>		</li>
												 <li><i class="fa fa-industry" aria-hidden="true"></i>
												 <?php
							  //select catgeiries id
	$sel_catids=mysql_query("select * from njobn_industeries where job_id='".$val->job_id."'");
	while($fatch_arrya_data=mysql_fetch_array($sel_catids))
	{
	//get names indutereos
	$sel_industeries=mysql_query("select * from njobn_jobs_category where jobs_category_id='".$fatch_arrya_data['industeries_id']."'");
    $fethch_induteries=mysql_fetch_array($sel_industeries);
echo $fethch_induteries['jobs_category_title'].' '.','.' ';
	}
	?></li>
                                                            <li><i class="fa fa-user" 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;
															?>
															</li>
															<li &peranum></li>
                                                            <li><i class="fa fa-money" aria-hidden="true"></i>
                                                           <!-- get job salary-->
												<?php echo 'From'.' '.$val->job_salary_from.' '.$currency.' ','To'.' '.$val->job_salary_to.' '.$currency;?>
															<?php //echo '&pound;'.$val->job_salary_from.' ','-'.' '.$currency.$val->job_salary_to.' '.'per annum';?>
															</li>
                                                            <li>
                                                            <?php
															$get_gender = $val->gender;
															if ($get_gender == 1) 
															{ //its male ?> 
                                                            	<i class="fa fa-male" aria-hidden="true"></i>
                                                                <?php echo "Male"; 
															}
															elseif ($get_gender == 2) 
															{ //female ?>
																<i class="fa fa-female" aria-hidden="true"></i>
                                                                <?php echo "Female"; 
															}
															else
															{?>
                                                            <i class="fa fa-genderless" aria-hidden="true"></i>
                                                            <?php echo "Doesnt Matter";
															}?>
                                                            
															
                                                            </li>
                                                            
                                                            <li>
                                                            <i class="fa fa-calendar" aria-hidden="true"></i>
                                                            <?php 
															$today = date("Y-m-d");
															$exp_date = $val->exp_date;
															if ($exp_date > $today )
															echo "Apply Before: ".$val->exp_date;
															if ($exp_date < $today ){
																echo "Application Date Expired";
															}?>
                                                            </li>
                                                            <li>
                                                            <i class="fa fa-book" aria-hidden="true"></i>
                                                            <?php
															if($val->carLevel==1){ echo "Intern/Student";}
              if($val->carLevel==2){echo "Entry Level";}
              if($val->carLevel==3){ echo "Experienced Professional";}
              if($val->carLevel==4){echo "Department Head";}
              if($val->carLevel==5){echo "GM / CEO / Country Head / President";}?>
                                                            </li>
                                                            <li>
                                                            <i class="fa fa-circle-o" aria-hidden="true"></i>
                                                            <?php echo $val->total_postions." Position Available";?>
                                                            </li>
                                                            <li>
                                                            <?php if($val->job_shift==1){ ?>
                                                            <i class="fa fa-sun-o" aria-hidden="true"></i>
															<?php echo "First Shift (Day)";}
															if($val->job_shift==2){?>
                                                            <i class="fa fa-moon-o" aria-hidden="true"></i>
															<?php echo "Night Shift (Night)";
                                                            }?>
                                                            </li>
                                                            <li>
                                                            <i class="fa fa-user" aria-hidden="true"></i>
                                                            <?php echo 'Age '.' '.$val->fage.' ','To'.' '.$val->tage;?>
                                                            </li>
                                                            <li>
                                                            <?php if($val->degreetitle==1){ echo "Education Level: "."Non-Matriculation";}
	                                    if($val->degreetitle==2){echo "Education Level: "."Matriculation/O-Level";}
										if($val->degreetitle==3){echo "Education Level: "."Intermediate/A-Level";}
										if($val->degreetitle==4){echo "Education Level: "."Bachelors";}
										if($val->degreetitle==5){echo "Education Level: "."Masters";}
										if($val->degreetitle==6){echo "Education Level: "."MPhil/MS";}
										if($val->degreetitle==7){echo "Education Level: "."PHD/Doctorate";}
										if($val->degreetitle==8){echo "Education Level: "."Certification";}
										if($val->degreetitle==9){echo "Education Level: "."Diploma";}
										if($val->degreetitle==10){echo "Education Level: "."Short Course";}
										?>
                                                            </li>
															<?php /*
															
									$sql=mysql_query("SELECT * FROM  candidate_listjobs WHERE candidate_id='".$candidate_id."' and  job_id='".$val->job_id."'");
											$count=mysql_num_rows($sql);
											if($count > 0)
											{?>
											 <span>You have already apply for this</span>
											<?php }
											else
											{
											?>
															<div class="applynew"> <a href="<?php echo base_url();?>front_end/appl_job?job_id=<?php echo $val->job_id;?>" style="text-align: center;"><i class="fa" aria-hidden="true"></i>Apply Now</a>
                                                            </div>
															<?php }*/?>
                                                        </ul>
                                                    </div>
                                            	</li>
												<p style="font-weight:bold">Role OverView</p>
												<p style="color: #757575;font-size: 15px;padding: 4px 0;">
                                                           <?php echo   strip_tags($val->job_des);?>
                                                </p>
												<?php }?>
												<?php echo $this->pagination->create_links();?>
                                   			</ul>
                                    	</div>
                                   <?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 class="row">
<div class="edit-filds">
<div class="modal fade" id="sendemail" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      
      <div class="modal-body">
	  
    </div>
  </div>
</div>
</div>
 </div>
</div>
                    	</div>
                	</div>
					</form>
        </div>
<?php $this->load->view('footer_front'); ?>