<?php $this->load->view('security'); ?>
<?php $this->load->view('header'); ?>            <!-- sidebar menu -->
<?php $this->load->view('left_bar');
error_reporting(0);
 ?>

          
        <!-- page content -->
        <div class="right_col" role="main">
          <div class="">
            

            <div class="clearfix"></div>

            <div class="row">
			<div class="col-md-4 col-sm-4 col-xs-12" style="width: 25%;">
              <div class="x_panel tile fixed_height_320 overflow_hidden" style="display:none;">
                <div class="x_title">
                  <h2>N-JOB-N Activity Graph</h2>
                  <ul class="nav navbar-right panel_toolbox">
                    <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
                    </li>
                    <li class="dropdown">
                      <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false"><i class="fa fa-wrench"></i></a>
                      <ul class="dropdown-menu" role="menu">
                        <li><a href="#">Settings 1</a>
                        </li>
                        <li><a href="#">Settings 2</a>
                        </li>
                      </ul>
                    </li>
                    <li><a class="close-link"><i class="fa fa-close"></i></a>
                    </li>
                  </ul>
                  <div class="clearfix"></div>
                </div>
                <div class="x_content">
                  <table class="" style="width:100%">
                    <tr>
                      <th style="width:37%;">
                        <p></p>
                      </th>
                      <th>
                        <div class="col-lg-7 col-md-7 col-sm-7 col-xs-7">
                          <p class=""></p>
                        </div>
                        <div class="col-lg-5 col-md-5 col-sm-5 col-xs-5">
                          <p class=""></p>
                        </div>
                      </th>
                    </tr>
                    <tr>
                      <td>
                        <canvas id="canvas1" height="140" width="140" style="margin: 15px 10px 10px 0"></canvas>
                      </td>
                      <td>
                        <table class="tile_info">
                          <tr>
                            <td>
                              <p><i class="fa fa-square blue"></i>Total Jobs</p>
                            </td>
                            <td>30%</td>
                          </tr>
                          <tr>
                            <td>
                              <p><i class="fa fa-square green"></i>Active Jobs</p>
                            </td>
                            <td>10%</td>
                          </tr>
                          <tr>
                            <td>
                              <p><i class="fa fa-square purple"></i>Short Listed Jobs</p>
                            </td>
                            <td>20%</td>
                          </tr>
                          <tr>
                            <td>
                              <p><i class="fa fa-square aero"></i>Total Candidate's</p>
                            </td>
                            <td>15%</td>
                          </tr>
                          <tr>
                            <td>
                              <p><i class="fa fa-square red"></i>Total Recruiter's</p>
                            </td>
                            <td>30%</td>
                          </tr>
                        </table>
                      </td>
                    </tr>
                  </table>
                </div>
              </div>
            </div>
			<div class="col-md-6 col-sm-6 col-xs-12">
            <?php 
			foreach($query as $val)
			{
				
				
			?>
                <div class="x_panel">
                  <div class="x_title">
                  <?php if($val->user_type==1){?><h2>View Jobseekers</h2><?php }?>
                  <?php if($val->user_type==2){?><h2>View Clients / Companies</h2><?php }?>
                    
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content">

                    <table class="table table-bordered" >
                     
                      <tbody>

                            <tr>
                                <td width="49%">First Name</td>
                                <td width="51%"><?php echo $val->fname; ?></td>
							</tr>
                            <tr>
                              <td>Last Name</td>
                              <td><?php echo $val->lname; ?></td>
                            </tr>
                            <tr>
                              <td>User Type</td>
                              <td> <?php if($val->user_type==1){echo "Candidate";}?>
							  <?php if($val->user_type==2){echo "Employee";}?></td>
                            </tr>
                            <tr>
                              <td>Email</td>
                              <td><?php echo $val->email; ?></td>
                            </tr>
							
                          <?php /*  <tr>
                              <td>Password</td>
                              <td><?php echo $val->password; ?></td>
                            </tr>	*/ ?>
                            <tr>
                              <td>Phone</td>
                              <td><?php echo $val->phone; ?></td>
                            </tr>  
                            <tr>
                              <td>Address</td>
                              <td><?php echo $val->address; ?></td>
                            </tr>
                            <tr>
                            <?php
							if($val->user_type==1)
							{?>
								<td>Summary</td>
                             	<td><?php echo $val->summery; ?></td> 
                            <?php
							 }
							 else
							 {?>
								<td>Company Name</td>
                             	<td><?php echo $val->cname; ?></td>
                             <?php } ?>
                             
                            </tr>
							         <tr>
                            <?php
       if($val->user_type==1)
       {?>
        <td>CV File</td>
                              <td>
        
                                <span><input type="submit" onClick="window.open('<?php echo base_url();?>manage/download_cv?document=<?php echo $val->cv_file;?>&cand_id=<?php echo $val->user_id;?>')" target="_blank" value="Download CV"></span>&nbsp;
                                <span><input type="submit" onClick="window.open('<?php echo base_url();?>manage/view_cv?document=<?php echo $val->cv_file;?>&cand_id=<?php echo $val->user_id;?>')" target="_blank" value="View CV"> </span></br>
                                
                                
                                </td> 
                            <?php
        }?>
                            </tr> 
                            <!--<tr>
                            <?php
							if($val->user_type==1)
							{?>
								<td>CV File</td>
                             	<td><?php echo $val->cv_file; ?></td> 
                            <?php
							 }?>
                            </tr>--> 
                            <tr>
                            <?php
							if($val->user_type==1)
							{?>
								<td>Cover Info</td>
                             	<td><?php echo $val->cover_info; ?></td> 
                            <?php
							 }?>
                            </tr>
                            <tr>
                            <td>Skills</td>
                            <td>
                            <?php 
							$select_skill = mysql_query("select * from candidate_skills where candidate_id='".$val->user_id."'");
							while ($fetch_skill = mysql_fetch_array($select_skill))
							{
								/*$skill_id = $fetch_skill['skill_id'];*/
								$result = mysql_query("SELECT * FROM skills WHERE skill_id='".$fetch_skill['skill_id']."'");
								$skills = mysql_fetch_array($result);
							
							echo $skills['skill_name']."; ";
							}?>
                            </td>
                            </tr>
                            <tr>
                          <td>Preferred Work Location</td>
                            <td>
                            
                            <?php 
							$select_location = mysql_query("select * from candidate_locations where candidate_id='".$val->user_id."'");
							while ($fetch_location = mysql_fetch_array($select_location))
							{
								
								$result = mysql_query("SELECT * FROM countries WHERE id='".$fetch_location['location_id']."'");
								$locations = mysql_fetch_array($result);
							
							echo $locations['name']."; ";
							}?>
                            
                            
                            </td>
                            </tr>
                            <tr>
                          <td>Salary</td>
                            <td>
                            
                            <?php 
							$select_salary = mysql_query("select * from njobn_candidate where candidate_id='".$val->user_id."'");
							while ($fetch_salary = mysql_fetch_array($select_salary))
							{
								
								$result = mysql_query("SELECT * FROM njobn_candidate WHERE can_table_id='".$fetch_salary['can_table_id']."'");
								$salary = mysql_fetch_array($result);
								if($salary['currency']==1)
								{
								$currency='&pound;';
								}
								if($salary['currency']==2)
								{
								$currency='$';
								}
								if($salary['currency']==3)
								{
								$currency='&euro;';
								}
								if($salary['currency']==4)
								{
								$currency='&#x20B9;';
								}
							
							echo "From: ".$salary['salary_from'].$currency." To: ".$salary['salary_to'].$currency;
							}?>
                            
                            
                            
                            </td>
                            </tr>
                            <tr>
                          <td>Job Type</td>
                            <td>
                            <?php 
							$select_type = mysql_query("select * from job_type where cand_id='".$val->user_id."'");
							while ($fetch_type = mysql_fetch_array($select_type))
							{
								
								$result = mysql_query("SELECT * FROM job_type WHERE job_type_id='".$fetch_type['job_type_id']."'");
								$type = mysql_fetch_array($result);
							
							if ($type['job_type_id']==1){echo "Permanent"."; ";}
							if($type['job_type_id']==2){echo "Temporary"."; ";}
							if($type['job_type_id']==3){echo "Contract"."; ";}
							if($type['job_type_id']==4){echo "Part Time"."; ";}
							if($type['job_type_id']==5){echo "Full Time"."; ";}
							}?>
                            
                            
                            </td>
                            </tr>
                            <tr>
                          <td>Sectors</td>
                            <td>
                            <?php 
							$select_sector = mysql_query("select * from candidate_industeries where candidate_id='".$val->user_id."'");
							while ($fetch_sector = mysql_fetch_array($select_sector))
							{
								
								$result = mysql_query("SELECT * FROM njobn_jobs_category WHERE jobs_category_id='".$fetch_sector['industeries_id']."'");
								$sectors = mysql_fetch_array($result);
							
							echo $sectors['jobs_category_title']."; ";
							}?>
                            
                            
                            </td>
                            </tr>
                            <tr>
                          <td>Previous Company</td>
                            <td>
                            <?php 
							$select_company = mysql_query("select * from work_history where candidate_id='".$val->user_id."'");
							while ($fetch_company = mysql_fetch_array($select_company))
							{
								
								$result = mysql_query("SELECT * FROM work_history WHERE work_id='".$fetch_company['work_id']."'");
								$sectors = mysql_fetch_array($result);
							
							echo $sectors['cname']." - ";
							echo "From: ".$sectors['fyear']." To: ".$sectors['tyear'].";";
							}?>
                            
                            
                            
                            
                            </td>
                            </tr>
                            <tr>
                          <td>Qualifications</td>
                            <td>
                            <?php 
							$select_qualification = mysql_query("select * from qualifications where candidate_id='".$val->user_id."'");
							while ($fetch_qualification = mysql_fetch_array($select_qualification))
							{
								
								$result = mysql_query("SELECT * FROM qualifications WHERE qualifications_id='".$fetch_qualification['qualifications_id']."'");
								$qualifications = mysql_fetch_array($result);
							
							if ($qualifications['type']==2){echo "Matriculation/O-Level"."; ";}
							if($qualifications['type']==3){echo "Intermediate/A-Level"."; ";}
							if($qualifications['type']==4){echo "Bachelors"."; ";}
							if($qualifications['type']==5){echo "Masters"."; ";}
							if($qualifications['type']==6){echo "MPhil/MS"."; ";} 
							if($qualifications['type']==7){echo "PHD/Doctorate"."; ";}
							if($qualifications['type']==8){echo "Certification"."; ";}
							if($qualifications['type']==9){echo "Diploma"."; ";}
							if($qualifications['type']==10){echo "Short Course"."; ";}
							}?>
                            
                            
                            
                            </td>
                            </tr>
                            <tr>
                          <td>Languages</td>
                            <td>
                            <?php 
							$select_language = mysql_query("select * from candidate_language where candidate_id='".$val->user_id."'");
							while ($fetch_language = mysql_fetch_array($select_language))
							{
								
								$result = mysql_query("SELECT * FROM languages WHERE language_id='".$fetch_language['language_id']."'");
								$skills = mysql_fetch_array($result);
							
							echo $skills['language_name']."; ";
							}?>
                            
                            
                            
                            </td>
                            </tr>
                            <tr>
                          <td>Driving License</td>
                            <td>
                            <?php 
							$select_license = mysql_query("select * from candidate_license where candidate_id='".$val->user_id."'");
							while ($fetch_license = mysql_fetch_array($select_license))
							{
								
								$result = mysql_query("SELECT * FROM candidate_license WHERE licensecheck1='".$fetch_license['licensecheck1']."'");
								$license = mysql_fetch_array($result);
							
							if ($license['licensecheck1']==1){echo "Yes";}else{"No";}
							}?>
                            
                            
                            
                           
                            </td>
                            </tr>
                          <tr>
                          <td>Car</td>
                            <td>
                           
                            <?php 
							$select_car = mysql_query("SELECT * FROM candidate_license WHERE candidate_id='".$val->user_id."'");
							while ($fetch_car = mysql_fetch_array($select_car))
							{
								
								$result = mysql_query("SELECT * FROM candidate_license WHERE carcheck1='".$fetch_car['carcheck1']."'");
								$car = mysql_fetch_array($result);
							
								if ($car['carcheck1']==1)
								{
									echo "Yes";
								}
								else
								{
									echo "No";
								}
							}?>
                            </td>
                            </tr>
							<tr>
                            <?php
       $sel_linkedin = mysql_query("SELECT * FROM njobn_webusers WHERE user_id='".$val->user_id."'");
       while ($fetch_linkedin = mysql_fetch_array($sel_linkedin)){?>
        <td>LinkedIn</td>
                              <td><?php echo $fetch_linkedin['linkedin']; ?></td> 
                            <?php
        }?>
                            </tr>
                            
           <?php }?>
                      
                      </tbody>
                    </table>

                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
<?php $this->load->view('footer'); ?>





