<?php $this->load->view('header_frontinner'); 
 $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="activity-reports-section add-job">
                    	<h3>Add Job Post</h3>
                    </div>
                    <form id="demo-form2" data-parsley-validate class="form-horizontal form-label-left" 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="row">
                    	<div class="col-md-6">
                            <div class="add-job-section">
                            	<h4>Select the company you are creating a job ad for:</h4>
                                <label>Company:</label>
                                <input placeholder="Company Name" name="company_name" id="company_name" type="text" value="<?php echo $cname;?>" readonly="readonly">
                            </div>
                        </div>
                        <div class="col-md-6">
                        	<div class="add-logo-contan">
                                <div class="add-logo-section">
                                    <span>Your logo will appear on all job ads</span>
                                </div>
                                <div class="add-logo-rights">
                                    	<?php
if($can_image!='')
{?>
		 <a href="#"><img src="<?php echo base_url();?>assets/upload/<?php echo $can_image;?>" style="    width: 205px;
    height: 46px;
    padding: 5px;"/></a>
										<?php }
										else
										{?>
		 <a href="#"><img src="<?php echo base_url();?>assets_front/images/JNJUKWebLogo.png" alt="logo-image" style="    width: 205px;
    height: 46px;
    padding: 5px;" ></a>								
										<?php }
										?>
                                </div>
                                <div class="company-logo-sections">
                                	Company logo
                                </div>
                               
                             </div>
                        </div>
                    </div>-->
                    
                    <div class="Information-section margin-top-30" style="margin-top: -49px !important;">
                    	<h5>Job Details</h5>
                        <!--<div class="job-details-section">
                        	<h6>Job details</h6>
                            <p>The job title is the most important part of your job ad, so make it as clear as possible using relevant details. Be sure to include keywords that jobseekers may use to search for this type of role. Things to avoid include using all uppercase letters in your job title or special characters. It's also not necessary to include information clearly displayed elsewhere, such as salary. For more advice, take a look at our <span>tips for writing a great job</span> ad. It is your legal responsibility to make sure your job ad doesn't discriminate in any way. Please refer to the <span>current guidelines</span> for information and guidance.</p>
                            <h6>Need help?</h6>
                            <p>Check out our <span>Help & Support</span> pages or call us on 123 4 4567  FREE.</p>
                        </div>-->
                    <div class="fields-marked">
                    	<div class="fields-section" style="padding: 12px 20px;">
                        	<p>Fields marked with <span>*</span> are mandatory.</p>
                        </div>
                        <ul class="fields-input-section margin-top-10">
                        	<li><label>Job Title:</label><input placeholder="Job Title" name="job_title" id="job_title" type="text" value="<?php echo $val->job_title; ?>"  style="width: 79%;"><span>*</span></li>
                            <li><label>Job Description:</label><textarea name="job_des" id="job_des" placeholder="Job Description"><?php echo $val->job_des;?></textarea><span>*</span></li>
                            <li><label>Job Type:</label>
                                <select name="job_type" class="form-control" id="job_type" style="width: 78.3%;" >
	<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><span>*</span>
                            </li>
							<li><label>Job Status:</label>
                                <select name="job_status" class="formjob_statuscontrol" id="job_type" style="width: 78.3%;" >
	<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><span>*</span>
                            </li>
							 <li><label>Gender:</label>
								 <select name="gender" class="form-control" id="gender" style="width: 78.3%;">
	                           <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>
								 <span>*</span>
                            </li>
							 <li><label>Min Experience:</label>
								 <select name="exp" class="form-control" id="exp" style="width: 78.3%;">
								 <option class="black" value="">Select Min Experience</option>
	                            <option class="black" value="555">Fresh</option>
<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>
								 <span></span>
                            </li>
							<li><label>Max Experience:</label>
								 <select name="exp1" class="form-control" id="exp1" style="width: 78.3%;">
								 <option class="black" value="">Select Max Experience</option>
	                            <option class="black" value="555">Fresh</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>
								 <span></span>
                            </li>
							 <li><label>Career Level:</label>
<select name="carLevel" class="form-control" id="carLevel" style="width: 78.3%;">

<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>
								 <span>*</span>
                            </li>
							 <li><label>Total Positions:</label>
<select name="total_postions" class="form-control" id="total_postions" style="width: 78.3%;">
<?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>
								 <span></span>
                            </li>
							 <li><label>Job Shift:</label>
<select name="job_shift" class="form-control" id="job_shift" style="width: 78.3%;">
<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>
								 <span></span>
                            </li>
							<li><label>Age:</label>
							   <select class="form-control" style="width:40%" 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> 
<select class="form-control" style="width:38%;" 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>
								 <span>*</span>
                            </li>
							<li><label>Degree Title:</label>
			<select  class="form-control"  name="degreetitle" id="degreetitle" style="width: 78.3%;">
			<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>
								 <span>*</span>
                            </li>
                            <li><label>Job reference:</label><input type="text"  name="job_refernce"  style="width: 79%;height:35px;" id="job_refernce" placeholder="Enter job reference number"  value="<?php echo $val->job_refernce;?>" ><span>*</span></li>
							<!--<li><label>Job Exp Date:</label><input type="text" name="exp_date"   class="tcal" value="<?php echo $val->exp_date;?>" id="exp_date"  placeholder="2016/03/25" onfocus="this.placeholder = ''" onblur="this.placeholder = '2016/03/25'" style="width: 79%;"><span>*</span></li>-->
<li><label>Job Exp Date:</label><input type="text" name="exp_date"   class="tcal" value="<?php echo $orginal_date;?>" id="exp_date"  placeholder="mm-dd-yyyy" onfocus="this.placeholder = 'mm-dd-yyyy'" onblur="this.placeholder = 'mm-dd-yyyy'" style="width: 79%;"><span>*</span></li>
                        </ul>
                    </div>
                    <div class="salary-details">
                        <h6>Salary Details</h6>
                        <p>Please add salary details below.</p>
                    </div>
                    
                    <div class="basic-salary-section">
                    	
						
						<ul class="fields-input-section margin-top-10">
                            
                            <li style="width:19%">
               <input type="text" style="vertical-align:top;"  name="job_salary_from" id="job_salary_from" placeholder="From" onkeyup="javascript:this.value=Comma(this.value);" value="<?php echo $val->job_salary_from;?>">
                            </li>
                            <li style="width:19%">
    <input type="text"  name="job_salary_to"  id="job_salary_to" style="vertical-align:top;" placeholder="To" onkeyup="javascript:this.value=Comma(this.value);" value="<?php echo $val->job_salary_to;?>" />
                            </li>
<li style="width:19%">
<select  name="currency" style="width: 94.3%;">
<?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><!--<span>*</span>-->
							<li style="width:19%">
	<select  id="perday" name="perday" style="width: 94.3%;">
    <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>
							</li>
                            <li class="add-checkbox">
                              <input type="checkbox" name="displaySalary" id="displaySalary" value="1" <?php if($val->displaySalary==1){?> checked="checked" <?php }?>/>
                              <label>Display salary figure on the job ad</label>
                            </li>
                        </ul>
                        
                        <ul class="fields">
                             <li class="additional">
                               <label>Additional salary info:</label>
                               <input type="text"  name="job_salary_info" id="job_salary_info" value="<?php echo $val->job_salary_info;?>" placeholder="Max 70 characters."  style="border-radius: 0px;">
                            </li>
                        </ul>
                        
                        <div class="salary-details">
                            <h6>Job Location</h6>
                            <!--<p>For best results, and to get the most relevant applications, we recommend you use a postcode here. Check the location preview to see how the location will appear on your job ad. </p>-->
                    	</div>
                        
                       <div class="job-location" style="margin-top: -22px;">
                        	<ul class="fields-input-section margin-top-10">
                        <li><label>Country:</label>
                                <select name="job_location_id"  onchange="getvalue(this.value)" >
								<option value="-1">Select Country</option>
									<?php
									$sel_countries=mysql_query("select * from countries");
									while($fethch_counries=mysql_fetch_array($sel_countries))
									{
									?>
									<option value="<?php echo $fethch_counries['id'];?>" <?php if($val->job_location_id==$fethch_counries['id']){?> selected="selected" <?php }?>><?php echo $fethch_counries['name'];?></option>
									<?php }?>
									</select>
                            </li>
							
							<li><label>State:</label>
                                <select name="state" id="state_dropdown" onchange="selectCity(this.options[this.selectedIndex].value)">
								<option value="-1">Select state</option>
													<?php
	$sel_state=mysql_query("select * from states");
	while($fethch_state=mysql_fetch_array($sel_state))
	{
	?>
<option value="<?php echo $fethch_state['id'];?>" <?php if($val->state==$fethch_state['id']){?> selected="selected" <?php }?>><?php echo $fethch_state['name'];?></option>
	<?php }?>
							</select>
                            </li>
							<li><label>City:</label>
                                <select name="city"  id="city_dropdown">
								<option value="-1">Select city</option>
													<?php
	$sel_cities=mysql_query("select * from cities");
	while($fethch_cities=mysql_fetch_array($sel_cities))
	{
	?>
	<option value="<?php echo $fethch_cities['id'];?>" <?php if($val->city==$fethch_cities['id']){?> selected="selected" <?php }?>><?php echo $fethch_cities['name'];?></option>
	<?php }?>
							</select>
                            </li>
							
                           <li><label>Postal code:</label>
                               <input type="text"  name="job_postalcode" id="job_postalcode" value="<?php echo $val->job_postalcode;?>" placeholder="Enter Postal code" style="width: 79%;">
                            </li>
                        </ul>	
                        </div>
                        
                        <div class="salary-details">
                            <h6>Contact Details</h6>
                           <!-- <p>For best results, and to get the most relevant applications, we recommend you use a postcode here. Check the location preview to see how the location will appear on your job ad.  </p>-->
                    	</div>
                        <div class="contact-details">
                        	 <ul class="fields">
                                <li class="additional">
                                   <!--<label>Contact:</label>-->
                                <!--   <span>Add a new contact</span>-->
                                </li>
                                 <li class="additional">
                                   <label>First Name:</label>
                                   <input type="text"  name="job_contact_fname" id="job_contact_fname" value="<?php echo $val->job_contact_fname;?>" placeholder="Enter First Name" style="border-radius: 0px;"/>
                                </li>
                                 <li class="additional">
                                   <label>Last Name:</label>
                                   <input type="text"  name="job_contact_lname" id="job_contact_lname" value="<?php echo $val->job_contact_lname;?>" placeholder="Enter Last Name" style="border-radius: 0px;"/>
                                </li>
                                <li class="additional">
                                   <label>Emai:</label>
                                   <input type="text"  name="job_contact_email" id="job_contact_email" value="<?php echo $val->job_contact_email;?>" placeholder="Enter Email" style="border-radius: 0px;"/>
                                   <!--<span>Add telephone / address</span>-->
                                </li>
								<li class="additional">
                                   <label>Telephone</label>
                                   <input type="text"  name="telephone" id="telephone" value="<?php echo $val->telephone;?>" placeholder="Enter Telephone Number" style="border-radius: 0px;" >
                                </li>
								<li class="additional">
                                   <label>Address</label>
								   <input type="text"  name="address" id="address" value="<?php echo $val->address;?>" placeholder="Enter Address" style="border-radius: 0px;" >
                                </li>
                        	</ul>
                            
                        </div>
                    </div>
                </div>
                <div class="Information-section margin-top-30">
                    <h5>Information to help job searching </h5>
                    <div class="job-details-section">
                        <!--<p>This information will help ensure jobseekers can search and find your vacancy quickly and easily.</p>-->
                      <!--  <h6><span>*</span>Contact details</h6>-->
                        <p>   Choose up to 2 sectors that are most relevant to this job</p>
						 <link rel="stylesheet" href="<?php echo base_url();?>assets/docsupport/prism.css">
  <link rel="stylesheet" href="<?php echo base_url();?>assets/docsupport/chosen.css">
 <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>
                
                <!--<div class="Information-section margin-top-30">
                    <h5>How jobseekers apply for the job </h5>
                    <div class="job-details-section">
                    <p>Select which jobseekers can see your job and the method by which they can contact you<br>Here you can choose which jobseekers can view your job. By default your job will be seen by jobseekers located within the EU (based on their IP address). </p>
                       
                        <h6>Show jobs to</h6>
                        <p>  The conduct of Employment Agencies and Employment Business Regulations 2003 require that employment agencies propose only jobseekers with the necessary levels of experience, training, qualifications and authorisation. We are only a venue and do not propose or introduce work-seekers to recruiters and recommend that you take appropriate steps to ensure a jobseeker's suitability. </p>
                    </div>
                </div>-->
                
                <div class="butten-add margin-top-20">
                	<button>Save and Advertise</button>
                    <!--<button class="cancel">Cancel</button>-->
                </div>
<?php
}
?>
          
                </form>
            </div>
         </div>
            </div></br>

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