Advertisement
Guest User

Untitled

a guest
Feb 27th, 2017
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.91 KB | None | 0 0
  1. <div class="box-body">
  2. <table id="example2" class="table table-bordered table-hover">
  3. <thead>
  4. <tr>
  5. <th></th>
  6.  
  7. <th>First Name</th>
  8. <th>Last Name</th>
  9. <th>Email</th>
  10. <th>Mobile Number</th>
  11. <th>experience</th>
  12. <th>CTC</th>
  13. <th>Expected Ctc</th>
  14. <th>role</th>
  15. <th>Vendor</th>
  16. <th>Current Location</th>
  17. <th>Desired Location</th>
  18. <th>Notice Period</th>
  19. <th>Resume</th>
  20. <th>Actions</th>
  21.  
  22.  
  23. </tr>
  24. </thead>
  25.  
  26. <?php
  27.  
  28. foreach ($view_candidates as $idata)
  29. {
  30. ?>
  31.  
  32.  
  33. <tbody>
  34.  
  35.  
  36.  
  37. <tr id="domain<?php echo $idata->candidate_id;?>">
  38. <td class="cell checkbox">
  39. <input type="checkbox" class="selectedId" name="selectedId" />
  40. </td>
  41.  
  42.  
  43. <td><?php echo $idata->first_name;?></td>
  44. <td><?php echo $idata->last_name;?></td>
  45. <td><?php echo $idata->email;?></td>
  46. <td><?php echo $idata->mobile_number;?></td>
  47. <td><?php echo $idata->experience;?></td>
  48. <td><?php echo $idata->ctc;?></td>
  49. <td><?php echo $idata->expectedctc;?></td>
  50. <td><?php echo $idata->role_name;?></td>
  51. <td><?php echo $idata->user_id;?></td>
  52. <td><?php echo $idata->current_location;?></td>
  53. <td><?php echo $idata->desired_location;?></td>
  54. <td><?php echo $idata->notice_period;?></td>
  55. <td><?php echo $idata->resume;?></td>
  56.  
  57. <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>
  58. </tr>
  59.  
  60. <?php
  61. }
  62. ?>
  63.  
  64. </tbody>
  65.  
  66. </table>
  67. </div>
  68. <!-- /.box-body -->
  69. </div>
  70. <!-- /.box -->
  71.  
  72. function CallFunction(id)
  73.  
  74. var url = 'http://127.0.0.1/job_portal/Candidate/change_status';
  75. $.ajax({
  76. url: url,
  77. type: 'POST',
  78. data: {candidate_id: id},
  79. dataType: 'JSON',
  80. success: function(data)
  81. {
  82.  
  83. console.log(data);
  84. }
  85. });
  86.  
  87. public function change_status()
  88.  
  89. $candidate_id = $this->input->post('candidate_id');
  90. $this->CandidateModel->update_status($candidate_id);
  91.  
  92.  
  93. $config = Array(
  94. 'protocol' => 'smtp',
  95. 'smtp_host' => 'ssl://md-in-42.webhostbox.net',
  96. 'smtp_port' => 465,
  97. 'smtp_user' => 'test3@clozloop.com',
  98. 'smtp_pass' => 'test3'
  99. );
  100. $this->load->library('email',$config);
  101. $this->email->set_mailtype("html");
  102. $this->email->from('test3@clozloop.com', 'bharathi');
  103. $this->email->to( $email);
  104.  
  105. $this->email->subject('Request for contact info');
  106. $link = 'Click on this link - <a href="http://localhost/job_portal/index.php/Login/signin">Click Here</a>';
  107. $this->email->message($link);
  108.  
  109. if($this->email->send())
  110. {
  111. echo "email send";
  112. }
  113.  
  114. else
  115. {
  116. echo "failed";
  117. }
  118. echo true;
  119. exit;
  120.  
  121. function update_status($candidate_id)
  122.  
  123. $this->db->select('*');
  124. $this->db->from('candidates_details');
  125. $status = $this->db->query("update candidates_details set status='1' where candidate_id ='$candidate_id'");
  126. $data=array('status'=>$status);
  127. $this->db->where('candidate_id',$candidate_id);
  128. //$this->db->update('candidates_details',$data);
  129. //$query=$this->db->get();
  130. echo $this->db->last_query();
  131. //return $query->result();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement