<?php $this->load->view('header_front');
//code for to get web logo
error_reporting(0);
?>
<div id="navbar-search" class="navbar-search hidden-xs nav-down">
  <div class="container">
    <!--    <form method="get" class="">-->
	<form name="search" id="search" method="post" action="<?php echo base_url(); ?>front_end/joblisting">
    <div class="row">
      <div class="col-sm-4 col-md-4">
        <div class="input-group"><span class="input-group-addon" id="addon-search"><span class="glyphicon glyphicon-search"></span></span>
		 <input type="text" name="job_title"  class="form-control"  id="search_title" placeholder="Search by job title" onkeypress="return alphaOnly(event)">
         
        </div>
      </div>
      <div class="col-sm-3 col-md-4">
        <input type="text" name="city_state" id="city_state" placeholder="Search By Location" onkeypress="return alphaOnly(event)" class="form-control" >
      </div>
	  <div class="col-sm-2 col-md-2">
                    <input id="btn-upload-resume" type="submit" name="search_job" value="Search" class="btn btn-primary btn-upload-resume btn-block">
                  </div>
      
    </div>
	</form>
    <!--</form>-->
  </div>
</div>
<form name="job_order_from" method="request" action="<?php echo base_url();?>front_end/joblisting">
<div class="container main-content">
  <div class="row">
    <!-- Modal: Mobile Location Filters -->
    
  
    
	
	
  <div class="col-xs-12 col-sm-12 col-md-9" style="background: #F6F6BB;border: 1px solid #F6F6BB">
      <h1 class="hidden-xs"><span itemprop="name"><?php echo $count_number;?>  jobs</span><span class="pull-right"><small></small></span></h1>
      <meta itemprop="url" content="https://www.fastjobs.sg/singapore-jobs/en/all-categories-jobs/">
      <hr class="no-margin hidden-xs">
      <div class="jobs" data-per-page="20">
	   <?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;
												}

											   ?>
<a href="<?php echo base_url();?>front_end/jobdetails?job_id=<?php echo $val->job_id;?>" class="ad-detail-link adbox" data-job-id="628773"  data-offset="0" data-source="web-jobfeed">
        <div class="job-post">
          <div class="row">
            <div class="col-sm-3 hidden-xs">
			<?php 
			if($val->comapny_image!='')
			{?>
			<img src="<?php echo base_url();?>assets/upload/<?=$val->comapny_image;?>" alt="<?php echo $val->company_name; ?>"  class="img-coylogo img-responsive">
			<?php }
			else
			{?>
			<img src="<?php echo base_url();?>assets_front/images/logoweb.png" alt="<?php echo $val->company_name; ?>"  class="img-coylogo img-responsive">
			<?php }
			?>
			</br><?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);
?></div>
            <div class="col-xs-12 col-sm-9">
              <h2 class="hidden-xs"><?php echo $val->job_title; ?></h2>
			   <h2 class="hidden-xs" style="font-size:15px;font-weight: normal;"><?php
									  $fulldet=strip_tags($val->job_des);
									  $desvarib=substr($fulldet,0,200);
									  echo $desvarib;
										?></h2>
              <h2 class="visible-xs"> <?php echo $val->job_title; ?></h2>
              <p class="visible-xs"><?php
									  $fulldet=strip_tags($val->job_des);
									  $desvarib=substr($fulldet,0,200);
									  echo $desvarib;
										?></p>
              <ul class="list-unstyled job-tag">
                <li><span class="glyphicon glyphicon-map-marker"></span>&nbsp; 
                  <?php
	
	echo $val->city;
	?> </li>
                <li><span class="glyphicon glyphicon-tags"></span>&nbsp; <?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="hidden-xs"><span class="glyphicon glyphicon-calendar"></span>&nbsp; <?php if($val->job_shift!=0)
															{?>
                                                            
                                                            <?php if($val->job_shift==1){ ?>
															<?php echo "First Shift (Day)";}
															if($val->job_shift==2){?>
															<?php echo "Night Shift (Night)";
                                                            }?>
                                                           
															<?php }?> </li>
			  </ul>
              <div class="row jobcoy">
                <div class="col-xs-3 visible-xs">
                  <div class="coylogo-holder">
				  	<?php 
			if($val->comapny_image!='')
			{?>
			<img src="<?php echo base_url();?>assets/upload/<?=$val->comapny_image;?>" alt="<?php echo $val->company_name; ?>"  class="img-coylogo img-responsive">
			<?php }
			else
			{?>
			<img src="<?php echo base_url();?>assets_front/images/logoweb.png" alt="<?php echo $val->company_name; ?>"  class="img-coylogo img-responsive">
			<?php }
			?>
				  
				  
				  </div>
                </div>
                <div class="col-xs-9 col-sm-9">
                  <p class="coyinfo"><span class="visible-xs">
				  <span class="salmin"><strong></strong></span>  </span>
				  <span class="hidden-xs"><span class="glyphicon glyphicon-user"></span>&nbsp; 
				  <strong><?php echo $val->company_name; ?></strong>
				  </span>
				  <br class="hidden-xs">
                    <span class="glyphicon glyphicon-time"></span>&nbsp; 
                    Posted On  <?php 
								$date_get=$val->date;
								$datearray=explode("-", $date_get);
								$year=$datearray[0];
								$month=$datearray[1];
								$day=$datearray[2];
								$orginal_date=$month."-".$day."-".$year;
								echo $orginal_date;
			 				  ?>
				  <span class="visible-xs"><span class="glyphicon glyphicon-user"></span>&nbsp; 
				  <strong><?php echo $val->company_name; ?></strong></span><br class="hidden-xs">
               </p>
                </div>
				<div class="col-sm-8 col-md-8 job-salary hidden-xs">
				<span class="salmin"> 
				<span class=""><?php echo 'From:'.' '.$currency.' '.$val->job_salary_from.' ,'.' '.'To:'.' '.$currency.' '.$val->job_salary_to.' '.$perday;?>
				</span>
				</span>
				</div>
              </div>
            </div>
          </div>
        </div>
        </a>											   
		<?php }?>
        
        </div>
   <!--pagination-->
   <?php  $this->pagination->create_links();?>
      <br>
    </div>
    <!-- sidebar -->
    <div class="sidebar col-xs-12 col-sm-4 col-sm-push-0 col-md-3 col-md-push-0 hidden-xs hidden-sm">
      <div class="filters-container">
        <div class="filter-option">
          <h4>Filter by Category</h4>
          <ul class="list-unstyled radio">
            <li>
              <select name="job_order" id="job_order"  class="form-control" onchange="this.form.submit()">
						<option  value="">Select Category</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>
              
            </li>
            
          </ul>
        </div>
        <div class="filter-option">
          <h4>Filter by Job Type</h4>
          <ul class="list-unstyled checkbox">
            <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>
        <div class="filter-option last">
          <h4>Filter by Job Function</h4>
          <ul class="list-unstyled checkbox">
            <?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;}
													}
												}?>
          </ul>
        </div>
		
		<div class="filter-option last">
          <h4>Filter by Job Experience</h4>
          <ul class="list-unstyled checkbox">
           <select name="exp" id="exp" class="form-control"   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>
          </ul>
		  
		  
		  <ul class="list-unstyled checkbox">
		  <select name="exp1" id="exp1"  class="form-control"   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>
           
          </ul>
        </div>
		
		<div class="filter-option last">
          <h4>Search By Salary</h4>
          <ul class="list-unstyled checkbox">
           <input type="text" name="salary_from" id="salary_from" class="form-control" onkeyup="javascript:this.value=Comma(this.value);"  placeholder="Minimum Salary" autocomplete="off"  /></br>
			<input type="text" name="salary_to" id="salary_to" class="form-control" onkeyup="javascript:this.value=Comma(this.value);"  placeholder="Maximum Salary" autocomplete="off"  /></br>
			<div class="col-sm-6 col-sm-push-3 text-center">
                    <input id="btn-upload-resume" type="submit" name="search_salary" value="Search" class="btn btn-primary btn-upload-resume btn-block">
                  </div>
          </ul>
        </div>
      </div>
    </div>
  </div>
</div>
</form>



<?php $this->load->view('footer_front'); ?>