<commit_before><?php defined('BASEPATH') OR exit('No direct script access allowed');

class Admin_model extends CI_Model
{
	function __construct()
	{
		parent::__construct();
	}

	function get_all_conferences()
	{
		$all_conferences= $this->db->query("SELECT * FROM conferences");
		return $all_conferences->result_array();
	}

	function get_managers($conference_id)
	{
		$managers = $this->db->query("SELECT * FROM users WHERE id=(SELECT userid FROM managers_list WHERE conference_id=$conference_id)");
		return $managers->result_array();
	}

	function get_papers($conference_id)
	{
		$papers = $this->db->query("SELECT * FROM papers");
		return $papers->result_array();
	}

	function get_userdata()
	{
		$id=$this->ion_auth->user()->row()->id;
		$userdata = $this->db->query("SELECT * FROM users WHERE id=$id");
	}

	function get_all_papers()
	{
		$all_papers = $this->db->query("SELECT * FROM papers");
		return $all_papers->result_array();
	}

	function get_conference_input()
	{
		$conference['title']=$this->input->post('conference_title');
		$conference['description']=$this->input->post('conference_description');
		$conference['urlname']=$this->input->post('conference_url');
		$conference['start_date']=$this->input->post('conference_start');
		$conference['end_date']=$this->input->post('conference_end');
		$conference['last_edited_by']=$this->ion_auth->user()->row()->id;
		return $conference;
	}

	function add_conference()
	{
		$this->db->insert('conferences', $this->get_conference_input());
		return true;
	}

	function check_modify_conference_input()
	{
		if($this->input->post('conference_title')) {return false;}
		if($this->input->post('conference_description')) {return false;}
		if($this->input->post('conference_url')) {return false;}
		if($this->input->post('conference_start')) {return false;}
		if($this->input->post('conference_end')) {return false;}
	}
}
?><commit_msg>Admin_models functions<commit_after><?php defined('BASEPATH') OR exit('No direct script access allowed');

class Admin_model extends CI_Model
{
	function __construct()
	{
		parent::__construct();
	}

	function get_all_conferences()
	{
		$all_conferences= $this->db->query("SELECT * FROM conferences");
		return $all_conferences->result_array();
	}

	function get_managers($conference_id)
	{
		$managers = $this->db->query("SELECT * FROM users WHERE id=(SELECT userid FROM managers_list WHERE conference_id=$conference_id)");
		return $managers->result_array();
	}

	function get_papers($conference_id)
	{
		$papers = $this->db->query("SELECT * FROM papers");
		return $papers->result_array();
	}

	function get_userdata()
	{
		$id=$this->ion_auth->user()->row()->id;
		$userdata = $this->db->query("SELECT * FROM users WHERE id=$id");
	}

	function get_all_papers()
	{
		$all_papers = $this->db->query("SELECT * FROM papers");
		return $all_papers->result_array();
	}

	function get_conference_input()
	{
		$conference['title']=$this->input->post('conference_title');
		$conference['description']=$this->input->post('conference_description');
		$conference['urlname']=$this->input->post('conference_url');
		$conference['start_date']=$this->input->post('conference_start');
		$conference['end_date']=$this->input->post('conference_end');
		$conference['last_edited_by']=$this->ion_auth->user()->row()->id;
		return $conference;
	}

	function get_conference($id){
		$conference=$this->db->query("SELECT * FROM conferences where conference_id=$id");
		return $conference->row_array();
	}

	function add_conference()
	{
		$this->db->insert('conferences', $this->get_conference_input());
		return true;
	}

	function check_modify_conference_input()
	{
		if($this->input->post('conference_title')) {return false;}
		if($this->input->post('conference_description')) {return false;}
		if($this->input->post('conference_url')) {return false;}
		if($this->input->post('conference_start')) {return false;}
		if($this->input->post('conference_end')) {return false;}
	}
}
?>
{'fraction_non_alphanumeric': 0.1893939393939394, 'fraction_numerical': 0.0, 'mean_word_length': 6.40373831775701, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 98, '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': '4222355', 'n_tokens_mistral': 1391, 'n_tokens_neox': 1306, 'n_words': 202}