<?php $this->load->view('header_front');	
foreach($footer_data1 as $val_profile)
{
$can_image=$val_profile->image;
}
?>
  <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/manage_users">Manage Clients</a></li>
                    </ol>
                  
                </div>
                	<div class="users-reports-section">
                    	<h3>Client/Company</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>
                    
					<?php if(isset($_GET['user_id'])!='')
					{
					$sel_update_data=mysql_query("select * from njobn_webusers where user_id='".$_GET['user_id']."'");
					$fetch_data_user_update=mysql_fetch_array($sel_update_data);
					?>
					
					
					
					<form id="recruiters" name="recruiters" class="styled"  method="post" onSubmit="return update_recruitersform()">
					<input type="hidden" name="user_id" id="user_id" value="<?php echo $_GET['user_id'];?>" />
					<div class="add_users-section">
                    	<div class="row">
                        	<!--<h4 class="add-users">Update user<i class="fa fa-angle-up" aria-hidden="true"></i></h4>-->
							<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="col-sm-4">
                            	<div class="grant-section margin-top-30">
                                	<h5>Grant this user access to:</h5>
                                    <ul class="row add-users-emali margin-top-15">
                                    	<li class="col-sm-6"><input value="<?php echo  $fetch_data_user_update['fname'];?>" placeholder="First Name" name="recfname" id="recfname" type="text" onBlur="recruitersfirstname(this.value)"><span id="recfname_error" class="reg_error">Enter your first name </span>  </li>
                                        <li class="col-sm-6"><input placeholder="Last Name" value="<?php echo  $fetch_data_user_update['lname'];?>" name="reclname" id="reclname" type="text" onblur="recruiterslastname(this.value)"> 	<span id="reclname_error" class="reg_error">Enter your last name</span></li>
										<li class="col-sm-6"><input placeholder="Company Name" value="<?php echo  $fetch_data_user_update['cname'];?>"  name="reccname" id="reccname" type="text" onblur="recruiterscname(this.value)"><span id="reccname_error" class="reg_error">Enter Company Name</span></li>
										
                                        <li class="col-sm-6"><input placeholder="Phone Number" value="<?php echo  $fetch_data_user_update['phone'];?>" name="recphone" id="recphone" type="text" onblur="recruitersphone(this.value)"><span id="recphone_error" class="reg_error">Enter phone number</span></li>
                                        <li class="col-sm-12"><input placeholder="Email" value="<?php echo  $fetch_data_user_update['email'];?>" name="recemail" id="recemail" type="text" onBlur="recruitersemail(this.value)"><span id="recemail_error" class="reg_error">Enter your email address</span>
			  <span id="recemail_error_valid" class="reg_error">Enter email address is not valid</span>
				<span id="emailall" class="reg_error"></span>
								<input type="hidden" name="recerror_email_exit" id="recerror_email_exit" value="" /></li>
								<li class="col-sm-12" >
										<select  name="user_satus" id="user_satus" style="margin-bottom: 10px;border-radius: 0px;">
						<option value="1" <?php if($fetch_data_user_update['user_satus']==1){?> selected="selected" <?php }?> >Active</option>
						<option value="2" <?php if($fetch_data_user_update['user_satus']==2){?> selected="selected" <?php }?>>Deactive</option>
										</select>
										</li>
<li class="col-sm-12">
<input placeholder="Password" name="rec1password" id="rec1password" type="password" value="" maxlength="8" onBlur="recruiterspassword(this.value)">
										<span id="recpass_error" class="reg_error">Enter your password</span></li>
										<li class="col-sm-12"><input placeholder="Confirm Password" name="reccpassword" id="reccpassword" maxlength="8" type="password" onBlur="recruiterscpassword(this.value)">
				<span id="reccpass_error" class="reg_error">Enter confirm password</span>
			   <span id="recnot_error" class="reg_error">confirm password does not match</span>
										</li>
										
                                    </ul>
                                    <button>Save</button>
                                </div>
                            </div>
                            
                            <div class="col-sm-4"  style=" width: 42%;">
                            	<ul class="stander margin-top-30">
                                	<li><h5>Post Job</h5></br><input <?php if($fetch_data_user_update['standard_jobs']==1){?> checked="checked"  <?php }?> type="checkbox" name="standard_jobs" id="standard_jobs" value="1"></li>
                                    <li><h5>Add Job</h5></br><input <?php if($fetch_data_user_update['featured_jobs']==1){?> checked="checked"  <?php }?>  type="checkbox" name="featured_jobs" id="featured_jobs" value="1"></li>
                                    <li><h5>View CVs</h5></br><input <?php if($fetch_data_user_update['premium_jobs']==1){?> checked="checked"  <?php }?> type="checkbox" name="premium_jobs" id="premium_jobs" value="1"></li>
									<li><h5>Download CVs</h5></br><input type="checkbox" name="licences_jobs" id="licences_jobs" value="1" <?php if($fetch_data_user_update['licences_jobs']==1){?> checked="checked"  <?php }?>></li>
                                </ul>
                                
                            </div>
                            
                            <!--<div class="col-sm-4">
                            	<ul class="stander-bg margin-top-30">
                                	
                                    <li><h5>Candidates By Email</h5></br><input type="checkbox" name="email_jobs" id="email_jobs" value="1" <?php if($fetch_data_user_update['email_jobs']==1){?> checked="checked"  <?php }?>></li>
                                    <li><h5>CV Match</h5></br><input type="checkbox" <?php if($fetch_data_user_update['match_jobs']==1){?> checked="checked"  <?php }?> name="match_jobs" id="match_jobs" value="1"></li>
                                </ul>
                              	
                            </div>-->
                        </div>
                    </div>
					</form>
					<?php }
					else
					{?>
					<form id="recruiters" name="recruiters" class="styled"  method="post" onSubmit="return reg_recruitersform()">
					<div class="add_users-section">
                    	<div class="row">
                        	<!--<h4 class="add-users">&nbsp;<i class="fa fa-angle-up" aria-hidden="true"></i></h4>-->
							<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="col-sm-4">
                            	<div class="grant-section margin-top-30">
                                	<h5>Grant this user access to:</h5>
                                    <ul class="row add-users-emali margin-top-15">
                                    	<li class="col-sm-6"><input placeholder="First Name" name="recfname" id="recfname" type="text" onBlur="recruitersfirstname(this.value)"><span id="recfname_error" class="reg_error">Enter your first name </span>  </li>
                                        <li class="col-sm-6"><input placeholder="Last Name" name="reclname" id="reclname" type="text" onblur="recruiterslastname(this.value)"> 	<span id="reclname_error" class="reg_error">Enter your last name</span></li>
										<li class="col-sm-6"><input placeholder="Company Name" name="reccname" id="reccname" type="text" onblur="recruiterscname(this.value)"><span id="reccname_error" class="reg_error">Enter Company Name</span></li>
										
                                        <li class="col-sm-6"><input placeholder="Phone Number" name="recphone" id="recphone" type="text" onblur="recruitersphone(this.value)"><span id="recphone_error" class="reg_error">Enter phone number</span></li>
                                        <li class="col-sm-12"><input placeholder="Email" name="recemail" id="recemail" type="text" onBlur="recruitersemail(this.value)"><span id="recemail_error" class="reg_error">Enter your email address</span>
			  <span id="recemail_error_valid" class="reg_error">Enter email address is not valid</span>
				<span id="emailall" class="reg_error"></span>
								<input type="hidden" name="recerror_email_exit" id="recerror_email_exit" value="" /></li>
								<li class="col-sm-12" >
										<select  name="user_satus" id="user_satus" style="margin-bottom: 10px;border-radius: 0px;">
										<option value="1">Active</option>
										<option value="2">Deactive</option>
										</select>
										</li>
<li class="col-sm-12">
<input placeholder="Password" name="rec1password" id="rec1password" type="password" maxlength="8" onBlur="recruiterspassword(this.value)">
										<span id="recpass_error" class="reg_error">Enter your password</span></li>
										<li class="col-sm-12"><input placeholder="Confirm Password" name="reccpassword" id="reccpassword" maxlength="8" type="password" onBlur="recruiterscpassword(this.value)">
				<span id="reccpass_error" class="reg_error">Enter confirm password</span>
			   <span id="recnot_error" class="reg_error">confirm password does not match</span>
										</li>
										
                                    </ul>
                                    <button>Save</button>
                                </div>
                            </div>
                            
                            <div class="col-sm-4"  style=" width: 42%;">
                            	<ul class="stander margin-top-30">
                                	<li><h5>Post Job</h5></br><input checked="checked" type="checkbox" name="standard_jobs" id="standard_jobs" value="1"></li>
                                    <li><h5>Add User</h5></br><input type="checkbox" name="featured_jobs" id="featured_jobs" value="1"></li>
                                    <li><h5>View CVs</h5></br><input type="checkbox" name="premium_jobs" id="premium_jobs" value="1"></li>
									<li><h5>Download CVs</h5></br><input type="checkbox" name="licences_jobs" id="licences_jobs" value="1"></li>
                                </ul>
                                
                            </div>
                            
                            <!--<div class="col-sm-4">
                            	<ul class="stander-bg margin-top-30">
                                	<li><h5>Download CVs</h5></br><input type="checkbox" name="licences_jobs" id="licences_jobs" value="1"></li>
                                    <li><h5>Candidates By Email</h5></br><input type="checkbox" name="email_jobs" id="email_jobs" value="1"></li>
                                    <li><h5>CV Match</h5></br><input type="checkbox" name="match_jobs" id="match_jobs" value="1"></li>
                                </ul>
                              	
                            </div>-->
                        </div>
                    </div>
					</form>
					<?php }
					?>
					
                    <div class="users-table">
                    
                    <!--<div class="userstab-section">
                     	<h4>Users</h4>
                        <h5>Products</h5>
                    </div>-->
                    
                    	<div class="table-section margin-top-45 mobile-space">
						<div class="table-responsive">
                                    <table width="100%" class="table" id="datatable-responsive">
                                          <thead>
                                            <tr>
                                             
                                              <th style="width: 243px;text-align: center;">Name</th>
											  <th style="width: 150px;text-align: center;">Email</th>
                                              <th style="width: 150px;text-align: center;">Post Job</th>
                                              <th style="text-align: center;">Add User</th>
                                              <th style="text-align: center;">View CVs</th>
                                              <th style="text-align: center;">Download CVs</th>
                                             <!-- <th>Candidates By Email</th>
                                              <th>CV Match</th>-->
                                              <th style="width: 90px;text-align: center;">Status</th>
                                              <th style="text-align: center;">Action</th>
                                            </tr>
                                          </thead>
                                          <tbody>
                                            <?php
											$sel_data=mysql_query("select * from njobn_webusers where created_by='".$this->session->userdata('user_id')."'");
                                            if(mysql_num_rows($sel_data) > 0)
											{
											while($fetch_get_data=mysql_fetch_array($sel_data))
											{?>
                                            <tr <?php if($fetch_get_data['user_satus']==1){?> class="table-section-color" <?php }?>>
                                              <td>
                                        <span>
										<?php echo $fetch_get_data['fname'].' '.$fetch_get_data['lname'].'<br>';?>										</span>										</td>
											  <td>
                                        <span>
										<?php echo $fetch_get_data['email'];?></span></td>
                                              <td style="text-align: center;">
											  <?php
											  if($fetch_get_data['standard_jobs']==1)
											  {?>
											  <img src="<?php echo base_url();?>/assets_front/images/table-icon.png" alt="image"/>
											  <?php }
											  ?>											  </td>
                                              <td style="text-align: center;"> 
											  <?php
											  if($fetch_get_data['featured_jobs']==1)
											  {?>
											  <img src="<?php echo base_url();?>/assets_front/images/table-icon.png" alt="image"/>
											  <?php }?>											  </td>
                                              <td style="text-align: center;"> 
											  <?php
											  if($fetch_get_data['premium_jobs']==1)
											  {?>
											  <img src="<?php echo base_url();?>/assets_front/images/table-icon.png" alt="image"/>
											  <?php }?></td>
                                              <td style="text-align: center;"> <?php
											  if($fetch_get_data['licences_jobs']==1)
											  {?>
											  <img src="<?php echo base_url();?>/assets_front/images/table-icon.png" alt="image"/>
											  <?php }?></td>
                                              <!--<td> <?php
											  if($fetch_get_data['email_jobs']==1)
											  {?>
											  <img src="<?php echo base_url();?>/assets_front/images/table-icon.png" alt="image"/>
											  <?php }?></td>-->
                                              <!--<td> 
											  <?php
											  if($fetch_get_data['match_jobs']==1)
											  {?>
											  <img src="<?php echo base_url();?>/assets_front/images/table-icon.png" alt="image"/>
											  <?php }?>											  </td>-->
                                              <td>
											  <?php
											  if($fetch_get_data['user_satus']==1){ echo "Active";}
											  if($fetch_get_data['user_satus']==2){ echo "Deactive";}
											  ?></td>
 											  <td><a href="<?php echo base_url();?>front_end/manage_users?user_id=<?php echo $fetch_get_data['user_id'];?>">Edit</a></td>
                                            </tr>
											<?php }
											}
											else
											{?>
											<tr>
	  <td style="font-size:11px; font-family:Segoe UI;width: 23%;">
	  <h3 style="font-size: 18px;">No Client/Company found.</h3></td>
	  <td></td>
	  <td></td>
	  <td></td>
	  <td></td>
	  <td></td>
	  <td></td>
	  <td></td>
	 
		   </tr>
											
											<!--<tr>
											<td colspan="9"><p style="color:#FF0000;text-align:center">No Records Found</p></td>
											</tr>-->
											<?php }
											?>
                                          </tbody>
                                    </table>
									</div>
									
                                  
           			  </div>
                    </div>
					
                </div>
				</form>
            </div>
            </div></br>

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