<commit_before><?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Login_model extends CI_Model {
    /*
     * Constructor 
     */

    public function __construct() {
        parent::__construct();
    }

    /*
     * Check Login function
     */
    public function checkLogin($argPost) {
        $query = $this->db->select('*')
                ->from('tbl_admin')
                ->where(array('email' => $argPost['email'], 'password' => $argPost['password'], 'status' => '0'))
                ->get();
        if ($query->num_rows() > 0) {
            $row = $query->row();
            $userData = array(
                'ADMIN_USERNAME' => $row->username,
                'ADMIN_ID' => $row->id,
            );
            $this->session->set_userdata($userData);
            return true;
        }
        return false;
    }
    
    /*
     * Check Auth for delete record
     */
    public function checkAuth($argPassword,$argUserId) {
        $query = $this->db->select('*')
                ->from('tbl_admin')
                ->where('password=',$argPassword)
				->where('status=','1')
                ->get();
        if ($query) 
		{
		   $this->db->delete("gsp_school",array("userid"=>$argUserId));
		   $this->db->delete("gsp_user",array("id"=>$argUserId));
		   $this->db->delete("gsp_answers",array("userid"=>$argUserId));
		   echo $this->db->last_query();
        }
    }
	
	
	public function checkAuth_unable($argPassword,$argUserId) {
		
		 if($argPassword=="<PASSWORD>")
		 {
			 $this->db->where('userid',$argUserId);
	         $this->db->update("gsp_school",array("make_school_disabled"=>"1"));
			 
		    return true;
		 }else
			{
				return false;
			}
        
  }
}<commit_msg>checkAuth_unable1 add<commit_after><?php

defined('BASEPATH') OR exit('No direct script access allowed');

class Login_model extends CI_Model {
    /*
     * Constructor 
     */

    public function __construct() {
        parent::__construct();
    }

    /*
     * Check Login function
     */
    public function checkLogin($argPost) {
        $query = $this->db->select('*')
                ->from('tbl_admin')
                ->where(array('email' => $argPost['email'], 'password' => $argPost['password'], 'status' => '0'))
                ->get();
        if ($query->num_rows() > 0) {
            $row = $query->row();
            $userData = array(
                'ADMIN_USERNAME' => $row->username,
                'ADMIN_ID' => $row->id,
            );
            $this->session->set_userdata($userData);
            return true;
        }
        return false;
    }
    
    /*
     * Check Auth for delete record
     */
    public function checkAuth($argPassword,$argUserId) {
        $query = $this->db->select('*')
                ->from('tbl_admin')
                ->where('password=',$argPassword)
				->where('status=','1')
                ->get();
        if ($query) 
		{
		   $this->db->delete("gsp_school",array("userid"=>$argUserId));
		   $this->db->delete("gsp_user",array("id"=>$argUserId));
		   $this->db->delete("gsp_answers",array("userid"=>$argUserId));
		   echo $this->db->last_query();
        }
    }
	
	
	public function checkAuth_unable($argPassword,$argUserId) {
		
		 if($argPassword=="<PASSWORD>")
		 {
			 $this->db->where('userid',$argUserId);
	         $this->db->update("gsp_school",array("make_school_disabled"=>"1"));
			 
		    return true;
		 }else
			{
				return false;
			}
        
  }
	
	public function checkAuth_unable1($argPassword,$argUserId) {
		
		 if($argPassword=="<PASSWORD>")
		 {
			 $this->db->where('userid',$argUserId);
	         $this->db->update("gsp_school",array("make_school_disabled"=>"0"));
			 
		    return true;
		 }else
			{
				return false;
			}
        
  }
	
}
{'fraction_non_alphanumeric': 0.18265926513349193, 'fraction_numerical': 0.002907745175786413, 'mean_word_length': 2.088979591836735, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 89, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6602659', 'n_tokens_mistral': 1290, 'n_tokens_neox': 1172, 'n_words': 174}