<?php 
$this->load->view('header_front'); 
$this->load->view('security_front'); 
foreach($footer_data1 as $val_profile)
{
$can_image=$val_profile->image;
}
//get compnay name
foreach($profile as $val_employeeprofile)
{
$cname=$val_employeeprofile->cname;
}
?>
<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>assets/css/tcal.css" />
<script type="text/javascript" src="<?php echo base_url();?>assets/js/tcal.js"></script>
<script type="text/javascript" src="<?php echo base_url();?>assets/js/jquery-1.4.1.min.js"></script>
<script language="javascript" type="text/javascript">
function getvalue(country_id)
{

	if(country_id!="-1"){
		loadData('state',country_id);
		$("#city_dropdown").html("<option value='-1'>Select city</option>");	
	}else{
	
		$("#state_dropdown").html("<option value='-1'>Select state</option>");
		$("#city_dropdown").html("<option value='-1'>Select city</option>");		
	}
}

function selectCity(state_id){
	if(state_id!="-1"){
		loadData('city',state_id);
	
	}
	else{
		$("#city_dropdown").html("<option value='-1'>Select city</option>");		
	}
}

function loadData(loadType,loadId)
{
	var dataString = 'loadType='+ loadType +'&loadId='+ loadId;
	//alert(dataString);
	$("#"+loadType+"_loader").show();
    $("#"+loadType+"_loader").fadeIn(400).html('Please wait... <img src="<?php echo base_url();?>assets/images/loading.gif" />');
	$.ajax({
		type: "POST",
		url: "<?php echo base_url();?>manage/loadData?"+dataString,
		data: dataString,
		cache: false,
		success: function(result)
		{
			$("#"+loadType+"_loader").hide();
			$("#"+loadType+"_dropdown").html("<option value='-1'>Select "+loadType+"</option>");  
			$("#"+loadType+"_dropdown").append(result);  
		}
	});
}
</script>
  
  <div class="reports-section margin-top-30">
  
            	<div class="container">
				    <div class="section-welcome nav-welcome">
                 <ol class="breadcrumb">
                      <li><a href="<?php echo base_url();?>front_end/employee_dashboard">Dashboard</a></li>
                      <li><a href="<?php echo base_url();?>front_end/addjob">Add Job</a></li>
                    </ol>
                  
                </div>
                	<div class="users-reports-section">
                    	<h3>Add Job</h3>
                        <div class="job_expiry">
                        	<!--<span>job expiry reminder:</span>-->
                            <ol class="breadcrumb">
							
                             <!-- <li><a href="#">ON</a></li>
                              <li><a href="#">Turn off</a></li>-->
							  <!--<li><a href="<?php echo base_url();?>front_end/manage_users">Add user</a></li>-->
                            </ol>
                        </div>
                    </div>
                    <form id="demo-form2" class="form-horizontal"  action="<?php base_url();?>update_job_details" method="post" name="loginform" onSubmit="return add_job_details()"  enctype="multipart/form-data">
<?php 
foreach($query as $val)
{
$date_get=$val->exp_date;
$datearray=explode("-", $date_get);
$year=$datearray[0];
$month=$datearray[1];
$day=$datearray[2];
$orginal_date=$month."-".$day."-".$year; 
?>
	<input type="hidden" name="image" id="image" value="<?php echo $can_image;?>" />
	<input type="hidden" value="<?php echo $val->job_id; ?>" name="job_id" id="job_id" >
	<input  name="company_name" id="company_name" type="hidden"  value="<?php echo $cname;?>">
					
        
        <div class="panel panel-default" id="profileBasicinfo">
          <h3 style="text-align:center">Job details</h3>
		  <div  id="recsucccessDiv" class="reg_error" style="margin-top: 0px;margin-bottom: 9px;padding-left: 9px;"></div> 
<div  id="recerrorDiv" class="reg_error"></div> 
<div  id="recsucccessDiv" class="reg_error"></div>
          <div class="row">
            <div class="col-sm-8 col-sm-push-1">
             <div class="form-group">
                <label class="col-sm-4 control-label" for="new-password">Company Name:</label>
                <div class="col-sm-8">
				
	<input  name="company_name33" id="company_name23" type="text" class="form-control" readonly="readonly" value="<?php echo $cname;?>">
                 
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-4 control-label" for="new-password">Job Title:</label>
                <div class="col-sm-8">
                <input placeholder="Job Title" class="form-control" name="job_title" id="job_title" type="text" value="<?php echo $val->job_title; ?>"> 
                </div>
              </div>
              <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Job Description:</label>
                <div class="col-sm-8">
                 <textarea name="job_des" id="job_des" placeholder="Job Description" class="form-control" <?php echo $val->job_des; ?>></textarea></div>
              </div>
			  
			  
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Job Type:</label>
                <div class="col-sm-8">
                  <select name="job_type" class="form-control" id="job_type"  >
								<option value="5" <?php if($val->job_type==5){?> selected="selected"  <?php }?>>Full Time</option>
	<option value="4" <?php if($val->job_type==4){?> selected="selected"  <?php }?>>Part Time</option>
	<option value="2" <?php if($val->job_type==2){?> selected="selected" <?php }?>>Contract</option>
	<option value="3" <?php if($val->job_type==3){?> selected="selected"  <?php }?> >Temporary</option>
	<option value="7" <?php if($val->job_type==7){?> selected="selected" <?php }?>>Permanent</option>
	<option value="1" <?php if($val->job_type==1){?> selected="selected" <?php }?>>Volunteer</option>
	<option value="6" <?php if($val->job_type==6){?> selected="selected" <?php }?>>Other</option>	
    							</select></div>
              </div>
			  
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Job Status</label>
                <div class="col-sm-8">
                 <select name="job_status" class="form-control" id="job_status">
								<option value="1" <?php if($val->job_status==1){?> selected="selected" <?php }?>>Active</option>
	<option value="2" <?php if($val->job_status==2){?> selected="selected" <?php }?>>Deactivate</option>
						         </select></div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Gender:</label>
                <div class="col-sm-8">
                  <select name="gender" class="form-control" id="gender">
	                          
	                           <option value="1" <?php if($val->gender==1){?> selected="selected" <?php }?>>Male</option>
	                           <option value="2" <?php if($val->gender==2){?> selected="selected" <?php }?>>Female</option>
							   <option value="2" <?php if($val->gender==3){?> selected="selected" <?php }?>>Doesn't matter</option>
							   
                               </select>
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Min Experience:</label>
                <div class="col-sm-8"><select name="exp" class="form-control" id="exp" >
								 <option class="black" value="555"  <?php if($val->exp==555){?> selected="selected" <?php }?>>Fresh</option>
<option class="black" value="233" <?php if($val->exp==233){?> selected="selected" <?php }?>>Less than 1 Year</option>
<?php
for($i=1;$i<=35;$i++)
{?>
<option class="black" value="<?php echo $i ?>" <?php if($val->exp==$i){?> selected="selected" <?php }?>><?php echo $i ?> Years</option>
<?php }?>
<option class="black" value="36" <?php if($val->exp==36){?> selected="selected" <?php }?>>More than 35 Years</option>
</select>
								</div>
              </div>
			 <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Max Experience:</label>
                <div class="col-sm-8">
                 <select name="exp1" class="form-control" id="exp1">
								  <option class="black" value="">Select Max Experience</option>
	                           
<option class="black" value="555"  <?php if($val->exp1==555){?> selected="selected" <?php }?>>Fresh</option>
<option class="black" value="233" <?php if($val->exp1==233){?> selected="selected" <?php }?>>Less than 1 Year</option>
<?php
for($i=1;$i<=35;$i++)
{?>
<option class="black" value="<?php echo $i ?>" <?php if($val->exp1==$i){?> selected="selected" <?php }?>><?php echo $i ?> Years</option>
<?php }?>
<option class="black" value="36" <?php if($val->exp1==36){?> selected="selected" <?php }?>>More than 35 Years</option>
</select>
								</div>
              </div>
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Career Level:</label>
                <div class="col-sm-8">
				<select name="carLevel" class="form-control" id="carLevel">

<option  value="1" <?php if($val->carLevel==1){?> selected="selected" <?php }?>>Not Applicable</option>
<option  value="2"<?php if($val->carLevel==2){?> selected="selected" <?php }?>>Internship/Apprenticeship/Graduate</option>
<option  value="3" <?php if($val->carLevel==3){?> selected="selected" <?php }?>>Entry Level/Associate</option>
<option  value="4" <?php if($val->carLevel==4){?> selected="selected" <?php }?>>Mid-Senior Level</option>
<option  value="5" <?php if($val->carLevel==5){?> selected="selected" <?php }?>>Director</option>
<option  value="5" <?php if($val->carLevel==6){?> selected="selected" <?php }?>>Executive</option>

</select>
		
								</div>
              </div>
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Total Positions:</label>
                <div class="col-sm-8">
				
				 <select name="total_postions" class="form-control" id="total_postions">
	                           <?php
for($p=1;$p<=30;$p++)
{?>
<option  value="<?php echo $p ;?>" <?php if($val->total_postions==$p){?> selected="selected" <?php }?>><?php echo $p ;?> Postions</option>
<?php }?>
                               </select>
				
				
								</div>
              </div>
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Job Shift:</label>
                <div class="col-sm-8">
				
				 <select name="job_shift" class="form-control" id="job_shift">

<option  value="">Select</option>
<option  value="1" <?php if($val->job_shift==1){?> selected="selected" <?php }?>>First Shift (Day)</option>
<option  value="2"  <?php if($val->job_shift==2){?> selected="selected" <?php }?>>Night Shift (Night)</option>                               </select>
				
				
								</div>
              </div>
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Age(From):</label>
                <div class="col-sm-8">
				
				 <select class="form-control"  name="fage" id="fage">
							  							   <option  value="">Select</option>
<?php
for($fage=20;$fage<=60;$fage++)
{?>
<option  value="<?php echo $fage ?>" <?php if($val->fage==$fage){?> selected="selected" <?php }?>><?php echo 'From'.' '.$fage;?></option>
<?php }?>
</select>	
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Age(To):</label>
                <div class="col-sm-8">
				
<select class="form-control"  name="tage" id="tage">
<option  value="">Select</option>
<?php
for($tage=20;$tage<=60;$tage++)
{?>
<option  value="<?php echo $tage;?>" <?php if($val->tage==$tage){?> selected="selected" <?php }?>><?php echo 'To'.' '.$tage;?></option>
<?php }?>
</select>
				
				
								</div>
              </div>
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Degree Title:</label>
                <div class="col-sm-8">
				
				 <select  class="form-control"  name="degreetitle" id="degreetitle">
<option value="">Select</option>
<option value="1"<?php if($val->degreetitle==1){?> selected="selected" <?php }?>>CSE/GNVQ/O levels</option>
<option value="2" <?php if($val->degreetitle==2){?> selected="selected" <?php }?>>A levels/advanced GNVQ</option>
<option value="3"  <?php if($val->degreetitle==3){?> selected="selected" <?php }?>>HND/HNC</option>
<option value="4" <?php if($val->degreetitle==4){?> selected="selected" <?php }?>>University degree</option>
<option value="5" <?php if($val->degreetitle==5){?> selected="selected" <?php }?>>Masters degree or higher</option>
<option value="6" <?php if($val->degreetitle==6){?> selected="selected" <?php }?> >BTEC</option>
<option value="7" <?php if($val->degreetitle==7){?> selected="selected" <?php }?>>City & Guides</option>
<option value="8" <?php if($val->degreetitle==8){?> selected="selected" <?php }?>>Diploma</option>
<option value="9" <?php if($val->degreetitle==9){?> selected="selected" <?php }?>>Senior business or technical qualification</option>
<option value="10" <?php if($val->degreetitle==10){?> selected="selected" <?php }?>>PhD</option>
</select>
				
				
								</div>
              </div>
			  
<div class="form-group">
<label class="col-sm-4 control-label" for="confirm-password">Job reference:</label>
<div class="col-sm-8">

<input type="text"  name="job_refernce" class="form-control"  id="job_refernce" placeholder="Enter job reference number" value="<?php echo $val->job_refernce;?>"  >
</div>
</div>

<div class="form-group">
<label class="col-sm-4 control-label" for="confirm-password">Job Exp Date:</label>
<div class="col-sm-8">

<input type="text" name="exp_date"   class="tcal form-control"  value="" id="exp_date"  placeholder="mm-dd-yyyy" onfocus="this.placeholder = ''" onblur="this.placeholder = 'mm-dd-yyyy'"  value="<?php echo $orginal_date;?>">
</div>
</div>
			  
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password"><strong>Salary Details:</strong></br></label>
                <div class="col-sm-8">
				
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Salary From:</label>
                <div class="col-sm-8">
				
				<input type="text" class="form-control"  name="job_salary_from" id="job_salary_from" placeholder="From" onkeyup="javascript:this.value=Comma(this.value);" value="<?php echo $val->job_salary_from;?>">
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Salary To:</label>
                <div class="col-sm-8">
				
				<input type="text"  name="job_salary_to"  class="form-control" id="job_salary_to" style="vertical-align:top;" placeholder="To" onkeyup="javascript:this.value=Comma(this.value);" value="<?php echo $val->job_salary_to;?>"/>
				
				
								</div>
              </div>
			  
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Currency:</label>
                <div class="col-sm-8">
				
				<select  name="currency" class="form-control">
<?php
$querycurrency=$this->db->get('currency');
$resultscurrency = $querycurrency->result();
foreach ($resultscurrency as $rowcurrency)
{?>
<option value="<?php echo $rowcurrency->skill_id;?>" <?php if($val->currency==$rowcurrency->skill_id){?> selected="selected" <?php }?>><?php echo $rowcurrency->skill_code;?></option>
<?php }?>
</select>
				
				
								</div>
              </div>
			  
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Per Day ,Per Week,Per Annum:</label>
                <div class="col-sm-8">
							
	<select  id="perday" name="perday" class="form-control">
     
    <option value="1" <?php if($val->perday==1){?> selected="selected" <?php }?>>Per Day</option>
	 <option value="2" <?php if($val->perday==2){?> selected="selected" <?php }?>>Per Week</option> 
	 <option value="3" <?php if($val->perday==3){?> selected="selected" <?php }?>>Per Annum</option> 
     </select>
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Display salary figure on the job ad</label>
                <div class="col-sm-8">
				
			
                              <input type="checkbox" name="displaySalary" id="displaySalary" value="1" <?php if($val->displaySalary==1){?> checked="checked" <?php }?>/>
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Additional salary info:</label>
                <div class="col-sm-8">
				
				<input type="text" class="form-control"  name="job_salary_info"  value="<?php echo $val->job_salary_info;?>" id="job_salary_info" placeholder="Max 70 characters." >
				
				
								</div>
              </div>
			    <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password"><strong>Job Location:</strong></br></label>
                <div class="col-sm-8">
				
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Country:</label>
                <div class="col-sm-8">
				
				<input type="text"  name="job_location_id" id="job_location_id" placeholder="Enter Country Name" class="form-control" value="<?php echo $val->job_location_id;?>"/>
				
				
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">State/Region:</label>
                <div class="col-sm-8">
				
				<input type="text"  name="state" id="state_dropdown" placeholder="Enter Country Name" class="form-control" value="<?php echo $val->state;?>"/>
				
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">City:</label>
                <div class="col-sm-8">
				
				 <input type="text"  name="city" id="city_dropdown" placeholder="Enter Country Name" value="<?php echo $val->city;?>" class="form-control"/>
				
				
								</div>
              </div>
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Postal code:</label>
                <div class="col-sm-8">
				
				<input type="text" class="form-control"   name="job_postalcode" id="job_postalcode" placeholder="Enter Postal code" value="<?php echo $val->job_postalcode;?>">
				
				
								</div>
              </div>
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password"><strong>Contact details:</strong></br></label>
                <div class="col-sm-8">
				
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">First Name:</label>
                <div class="col-sm-8">
	<input type="text"  name="job_contact_fname" id="job_contact_fname" placeholder="Enter First Name" value="<?php echo $val->job_contact_fname;?>"  class="form-control"  />
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Last Name:</label>
                <div class="col-sm-8">
<input type="text"  name="job_contact_lname" id="job_contact_lname" value="<?php echo $val->job_contact_lname;?>" placeholder="Enter Last Name"  class="form-control"/>
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Emai:</label>
                <div class="col-sm-8">
 <input type="text"  name="job_contact_email" id="job_contact_email" placeholder="Enter Email" value="<?php echo $val->job_contact_email;?>" class="form-control" />
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Telephone</label>
                <div class="col-sm-8">
<input type="text"  name="telephone" id="telephone" placeholder="Enter Telephone Number" class="form-control" value="<?php echo $val->telephone;?>" >
				
				
								</div>
              </div>
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Address</label>
                <div class="col-sm-8">
				  <input type="text"  name="address" id="address" placeholder="Enter Address" class="form-control" value="<?php echo $val->address;?>" >
				
				
								</div>
              </div>
<div class="form-group">
<label class="col-sm-4 control-label" for="confirm-password"><strong>Sectors:</strong></br></label>
<div class="col-sm-8">



</div>
</div>
			  
			  
			  <div class="form-group">
                <label class="col-sm-4 control-label" for="confirm-password">Choose up to 2 sectors that are most relevant to this job</label>
                <div class="col-sm-8">
				 <link rel="stylesheet" href="<?php echo base_url();?>assets/docsupport/prism.css">
  <link rel="stylesheet" href="<?php echo base_url();?>assets/docsupport/chosen.css">
  <style>
  .chosen-container-multi .chosen-choices {
    width: 487px!important;
	}
  </style>
 <select name="secters[]" data-placeholder="Choose Industry sectors..." class="chosen-select" multiple="multiple" style="width:525px;"  id="secters" >
            <option value=""></option>
		 <?php
  $sel_industeries=mysql_query("select * from njobn_jobs_category");
  while($fethch_induteries=mysql_fetch_array($sel_industeries))
	{
	//select catgeiries id
	$sel_catids=mysql_query("select * from njobn_industeries where industeries_id='".$fethch_induteries['jobs_category_id']."' AND job_id='".$val->job_id."'");
	$fatch_arrya_data=mysql_fetch_array($sel_catids);
	?>
   <option value="<?php echo $fethch_induteries['jobs_category_id'];?>" <?php if($fatch_arrya_data['industeries_id']==$fethch_induteries['jobs_category_id']){?> selected="selected" <?php }?>><?php echo $fethch_induteries['jobs_category_title'];?></option>
     <?php }?>     
          </select>
<!--<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js" type="text/javascript"></script>-->
  <script src="<?php echo base_url();?>assets/docsupport/chosen.jquery.js" type="text/javascript"></script>
  <script src="<?php echo base_url();?>assets/docsupport/prism.js" type="text/javascript" charset="utf-8"></script>
  <script type="text/javascript">
    var config = {
      '.chosen-select'           : {},
      '.chosen-select-deselect'  : {allow_single_deselect:true},
      '.chosen-select-no-single' : {disable_search_threshold:10},
      '.chosen-select-no-results': {no_results_text:'Oops, nothing found!'},
      '.chosen-select-width'     : {width:"95%"}
    }
    for (var selector in config) {
      $(selector).chosen(config[selector]);
    }
  </script>
				
								</div>
              </div>
              <br>
              <div class="form-group">
                <label class="col-sm-4 control-label">&nbsp;</label>
                <div class="col-sm-8">
                  <button type="submit" class="btn btn-primary btn-block" name="update">Update Job</button>
                </div>
              </div>
            </div>
          </div>
          <br>
        </div>
<?php }?>
    </form>
					
                    
					
                </div>
		 
            </div>
		 
		 
            </div></br>

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