示例#1
0
 public function forgot_password()
 {
     $email = $this->input->post('email');
     $query = $this->db->get_where('users', array('emailid' => $email));
     if ($query->num_rows() > 0) {
         $output = $this->db->query("SELECT * FROM `users` WHERE `emailid`='" . $email . "'")->row()->password;
         $password = _base64_decrypt($output, 'bytes789');
         $mailgun_fromemail = $this->db->query("SELECT * FROM sitesettings WHERE type='mailgun_fromemail'")->row()->description;
         $this->load->library('email');
         $this->email->from($mailgun_fromemail, 'Your Name');
         $this->email->to($email);
         $this->email->subject('Your Password');
         $this->email->message('Your password : '******'flash_message', 'Please check your mail');
         redirect(base_url() . 'admin/login', 'refresh');
     } else {
         $this->session->set_flashdata('flash_message', 'Error : Please provide correct email ID');
         redirect(base_url() . 'admin/login', 'refresh');
     }
 }
示例#2
0
    public function forgot_password()
    {
        $email = $this->input->post('email');
        $query = $this->db->get_where('users', array('emailid' => $email));
        if ($query->num_rows() > 0) {
            $output = $this->db->query("SELECT * FROM `users` WHERE `emailid`='" . $email . "'")->row()->password;
            $password = _base64_decrypt($output, 'bytes789');
            /*$this->load->library('email');
            		$this->email->from('*****@*****.**', 'Your Name');
            		$this->email->to($email);
            		$this->email->subject('Your Password');
            		$this->email->message('Your password : '******'
		
		<html>
<body>
<table width="720" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td><h1 style="color:#06F;">Jobrabbit</h1></td>
  </tr>
  <tr>
    <td align="center" background=""><table width="85%" border="0" cellspacing="0" cellpadding="0" >
      <tr>
        <td style="line-height:1.75; font-family:Arial, Helvetica, sans-serif; font-size:14px; color:#666; font-style:300;">
		<strong>Hello ' . $email . '</strong>
      <p>Password :<b>' . $password . '</b></p>
      
 </td>
      </tr>
     
    </table></td>
  </tr>

</table>
</body>
</html>
		
		
		';
            $this->sent_mail('*****@*****.**', $email, 'jobrabbit Password', $msg);
            $this->session->set_flashdata('flash_message', '<p style="color:green;text-align: center;" class="flashMsg flashSuccess">Please check your mail</p>');
            redirect(base_url() . 'home/login', 'refresh');
        } else {
            $this->session->set_flashdata('flash_message', '<p style="color: red;text-align: center;" class="flashMsg flashSuccess">>Error : Please provide correct email ID</p');
            redirect(base_url() . 'home/login', 'refresh');
        }
    }
    ?>
                        <div class="padded">
                            <div class="control-group">
                                <label class="control-label">User name</label>
                                <div class="controls">
                                    <input type="text" class="validate[required]" name="uname" value="<?php 
    echo $row['uname'];
    ?>
"/>
                                </div>
                            </div>
                            
                              <div class="control-group">
                                <label class="control-label">Password</label>
                                <div class="controls"><?php 
    $out = _base64_decrypt($row['password'], 'bytes789');
    ?>
  
                                    <input type="text" class="validate[required]" name="password" value="<?php 
    echo $out;
    ?>
"/>
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Email</label>
                                <div class="controls">
                                    <input type="text" class="validate[required]" name="email" value="<?php 
    echo $row['emailid'];
    ?>
"/>
示例#4
0
 public function forgot_password()
 {
     $data['email'] = $this->input->post('email');
     $query = $this->db->get_where('users', array('emailid' => $data['email']));
     if ($query->num_rows() > 0) {
         $output = $this->db->query("SELECT * FROM `users` WHERE `emailid`='" . $data['email'] . "'")->row()->password;
         $data['password'] = _base64_decrypt($output, 'bytes789');
         $this->email_model->forgot_password($data);
         $this->session->set_flashdata('flash_message', '<p style="color:green;text-align: center;" class="flashMsg flashSuccess">Please check your mail</p>');
         redirect(base_url() . 'home/login', 'refresh');
     } else {
         $this->session->set_flashdata('flash_message', '<p style="color: red;text-align: center;" class="flashMsg flashSuccess">Error : Please provide correct email ID</p');
         redirect(base_url() . 'home/login', 'refresh');
     }
 }