<commit_before><?php defined('BASEPATH') OR exit('No direct script access allowed');
 
class Dashboard extends CI_Controller{
	
	function __construct()
	{
		parent::__construct();
		$this->load->model('user','',TRUE);
		$this->load->model('accounts','',TRUE);
		$this->load->model('log_model','logs');
	}
	
	public function index()
	{	if($this->session->userdata('logged_in'))
		{
			$session_data = $this->session->userdata('logged_in');
			$data['username'] = $session_data['username'];
			$data['nbusers'] = $this->user->getTotal();
			$data['nbaccounts'] = $this->accounts->getTotal();
			$data['name'] = $this->user->getInfo($session_data['id']);
			$data['platschauds'] = $this->logs->getMealsOfTheDay();
			$data['title'] = "Tableau de bord";
			$this->load->view('dashboard', $data);
		}
		else
		{
			//If no session, redirect to login page
			redirect('/login/');
		}
		
	}
	
	public function logout()
	{
		$this->session->unset_userdata('logged_in');
		session_destroy();
		redirect('/dashboard/');
	}
}<commit_msg>Mise à jour du dashboard<commit_after><?php defined('BASEPATH') OR exit('No direct script access allowed');
 
class Dashboard extends CI_Controller{
	
	function __construct()
	{
		parent::__construct();
		$this->load->model('user','',TRUE);
		$this->load->model('accounts','',TRUE);
		$this->load->model('log_model','logs');
	}
	
	public function index()
	{	if($this->session->userdata('logged_in'))
		{
			$session_data = $this->session->userdata('logged_in');
			$data['username'] = $session_data['username'];
			$data['nbusers'] = $this->user->getTotal();
			$data['nbaccounts'] = $this->accounts->getTotal();
			$data['name'] = $this->user->getInfo($session_data['id']);
			$data['platschauds'] = $this->logs->getMealsOfTheDay();
			$data['title'] = "Tableau de bord journalier";
			$this->load->view('dashboard', $data);
		}
		else
		{
			//If no session, redirect to login page
			redirect('/login/');
		}
		
	}
	
	public function logout()
	{
		$this->session->unset_userdata('logged_in');
		session_destroy();
		redirect('/dashboard/');
	}
}
{'fraction_non_alphanumeric': 0.21697203471552556, 'fraction_numerical': 0.0, 'mean_word_length': 4.861581920903955, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 47, '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': '4653041', 'n_tokens_mistral': 791, 'n_tokens_neox': 710, 'n_words': 115}