HEX
Server: Apache/2.4.46 (Ubuntu)
System: Linux localhost 5.11.0-49-generic #55-Ubuntu SMP Wed Jan 12 17:36:34 UTC 2022 x86_64
User: root (0)
PHP: 7.4.16
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/pharma.fieldblaze.com/application/models/Login_model.php
<?php

	class Login_model extends CI_Model{


	function __consturct(){
	parent::__construct();
	
	}
	#Match admin credentials
	public function getUser($credential){			
    return $this->db->get_where('user', $credential);
	}
/*	public function getdata(){
	$query =$this->db->get('users');
	$result=$query->result();
	return $result;
	}*/
	//**exists employee email check**//
   public function Does_email_exists($email) {
		$user = $this->db->dbprefix('user');
        $sql = "SELECT `email` FROM $user
		WHERE `email`='$email'";
		$result=$this->db->query($sql);
        if ($result->row()) {
            return $result->row();
        } else {
            return false;
        }
    }
    public function Create_Login_Status($data){
        $this->db->insert('login_history',$data);
    }    
 /*   public function insertUser($data){
		$this->db->insert('users',$data);
	}
	public function UpdateKey($data,$email){
		$this->db->where('email',$email);
		$this->db->update('users',$data);
	}
	public function UpdatePassword($key,$data){
		$this->db->where('forgotten_code',$key);
		$this->db->update('users',$data);	    
	}*/	
	public function Update_Login_Status($ltime,$id,$data){
$this->db->where('login', $ltime);
$this->db->where('em_id', $id);
$this->db->update('login_history', $data);	    
	}
	//**exists employee email check**//
/*    public function Does_Key_exists($reset_key) {
		$user = $this->db->dbprefix('users');
        $sql = "SELECT `forgotten_code` FROM $user
		WHERE `forgotten_code`='$reset_key'";
		$result=$this->db->query($sql);
        if ($result->row()) {
            return $result->row();
        } else {
            return false;
        }
    }
	public function GetUserInfo($key){
		$user = $this->db->dbprefix('users');
        $sql = "SELECT `password` FROM $user
		WHERE `forgotten_code`='$key'";
		$query=$this->db->query($sql);
		$result = $query->row();
		return $result;			
	}		
	public function GetuserInfoBycode($verifycode){
		$user = $this->db->dbprefix('users');
        $sql = "SELECT * FROM $user
		WHERE `confirm_code`='$verifycode'";
		$query=$this->db->query($sql);
		$result = $query->row();
		return $result;			
	}*/	
}
?>