Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div class="box-body">
- <table id="example2" class="table table-bordered table-hover">
- <thead>
- <tr>
- <th></th>
- <th>First Name</th>
- <th>Last Name</th>
- <th>Email</th>
- <th>Mobile Number</th>
- <th>experience</th>
- <th>CTC</th>
- <th>Expected Ctc</th>
- <th>role</th>
- <th>Vendor</th>
- <th>Current Location</th>
- <th>Desired Location</th>
- <th>Notice Period</th>
- <th>Resume</th>
- <th>Actions</th>
- </tr>
- </thead>
- <?php
- foreach ($view_candidates as $idata)
- {
- ?>
- <tbody>
- <tr id="domain<?php echo $idata->candidate_id;?>">
- <td class="cell checkbox">
- <input type="checkbox" class="selectedId" name="selectedId" />
- </td>
- <td><?php echo $idata->first_name;?></td>
- <td><?php echo $idata->last_name;?></td>
- <td><?php echo $idata->email;?></td>
- <td><?php echo $idata->mobile_number;?></td>
- <td><?php echo $idata->experience;?></td>
- <td><?php echo $idata->ctc;?></td>
- <td><?php echo $idata->expectedctc;?></td>
- <td><?php echo $idata->role_name;?></td>
- <td><?php echo $idata->user_id;?></td>
- <td><?php echo $idata->current_location;?></td>
- <td><?php echo $idata->desired_location;?></td>
- <td><?php echo $idata->notice_period;?></td>
- <td><?php echo $idata->resume;?></td>
- <td><button id="<?php echo $idata->candidate_id; ?>" name="button" id="button" onClick="CallFunction(this.id)" class="btn btn-info request_info"><!-- <?php echo $idata->candidate_id; ?> --><?php $status == 0? 'REQUEST CONTACT INFO':'FINISHED';?>REQUEST CONTACT INFO</button></td>
- </tr>
- <?php
- }
- ?>
- </tbody>
- </table>
- </div>
- <!-- /.box-body -->
- </div>
- <!-- /.box -->
- function CallFunction(id)
- var url = 'http://127.0.0.1/job_portal/Candidate/change_status';
- $.ajax({
- url: url,
- type: 'POST',
- data: {candidate_id: id},
- dataType: 'JSON',
- success: function(data)
- {
- console.log(data);
- }
- });
- public function change_status()
- $candidate_id = $this->input->post('candidate_id');
- $this->CandidateModel->update_status($candidate_id);
- $config = Array(
- 'protocol' => 'smtp',
- 'smtp_host' => 'ssl://md-in-42.webhostbox.net',
- 'smtp_port' => 465,
- 'smtp_user' => 'test3@clozloop.com',
- 'smtp_pass' => 'test3'
- );
- $this->load->library('email',$config);
- $this->email->set_mailtype("html");
- $this->email->from('test3@clozloop.com', 'bharathi');
- $this->email->to( $email);
- $this->email->subject('Request for contact info');
- $link = 'Click on this link - <a href="http://localhost/job_portal/index.php/Login/signin">Click Here</a>';
- $this->email->message($link);
- if($this->email->send())
- {
- echo "email send";
- }
- else
- {
- echo "failed";
- }
- echo true;
- exit;
- function update_status($candidate_id)
- $this->db->select('*');
- $this->db->from('candidates_details');
- $status = $this->db->query("update candidates_details set status='1' where candidate_id ='$candidate_id'");
- $data=array('status'=>$status);
- $this->db->where('candidate_id',$candidate_id);
- //$this->db->update('candidates_details',$data);
- //$query=$this->db->get();
- echo $this->db->last_query();
- //return $query->result();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement