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

 class Admin_panel extends CI_Controller{
 	function __construct()
 	{
 		parent::__construct();
 		$this->data[]='';
 		$this->load->helper('url');
 		$this->data['url']=base_url();
		$this->load->library('parser');
		$this->load->library('session');
		$this->load->model('admin_model');
		$this->load->model('login_model');
	}

 	/* Function for login Admin area view.......................................................................*/
 	function index()
 	{
 		$this->parser->parse('include/header',$this->data);
 		$this->load->view('admin_login',$this->data);
 	}
 	
 	/* Function for verify Admin for his account area view.......................................................................*/
 	function verify_admin()
 	{
 		$userid=$this->input->post('username');
 		if('admin'== $userid && '<PASSWORD>'== $this->input->post('password'))
 		{
 			$this->session->set_userdata('username',array('username'=>'admin'));
 			$this->session->userdata('username');
 			redirect('admin_panel/admin_dashboard');
 		}
 		elseif($userid && $this->input->post('password'))
 		{
 			$data=array(
 					'Username'=>$this->input->post('username'),
 					'Password'=><PASSWORD>($this->input->post('password'))
 			);
 			$query=$this->admin_model->verify_admin('organizations',$data);
 			$qry=$this->admin_model->org_list($query[0]->organization_id);
 				if($qry){ 
			 			$session_data=array(
			 										'username'=>$userid,
			 										'organization_id'=>$qry[0]->organization_id,
			 										'organization_name'=>$qry[0]->organization_name,
			 										'app_name'=>$qry[0]->application_id,
			 										'email'=>$qry[0]->email
			 									   );
			 					$this->session->set_userdata('username',$session_data);
			 					$this->session->userdata('username');
 						}
 					else{
 						$session_data=array(
 								'username'=>$userid,
 								'organization_id'=>$query[0]->organization_id,
			 					'organization_name'=>$query[0]->organization_name,
 						);
 						$this->session->set_userdata('username',$session_data);
 						$this->session->userdata('username');
 						}
 			if($query)
 			{
 				redirect('admin_panel/admin_dashboard');
 			}
 			else
 			{
 				$this->session->set_flashdata('category_error','message');
 				$this->session->set_flashdata('message','please enter correct user id and password');
 				redirect('admin_panel');
 			}
 		}
 		else 
 		{
 			$this->session->set_flashdata('category_error','message');
 			$this->session->set_flashdata('message','please enter correct user id and password');	
 			redirect('admin_panel');
 		}
	 		
 	}
 	
 	/* Function for Admin panel dashboard area view.......................................................................*/
 	function admin_dashboard()
 	{
 		if (!$this->session->userdata('username')){ $this->session->set_flashdata('category_error_login', " Your Session Is Expired!! Please Login Again. "); redirect(base_url());}
 		$this->parser->parse('include/header',$this->data);
 		$this->parser->parse('include/left_menu',$this->data);
 		$this->load->view('admin_dashboard',$this->data);
 		$this->parser->parse('include/footer',$this->data);
 	}
 	
 	/* Function for Super Admin panel area view.......................................................................*/
 	
 	function manage_admin()
 	{
 		
 		/* code for when server update response his password */
 		if(isset($_GET['session']) && $_GET['session']!=='')
 		{
 			$data=array('Username'=>$_GET['session']);
 			$query=$this->admin_model->verify_admin('organizations',$data);
 			$qry=$this->admin_model->org_list($query[0]->organization_id);
 			$session_data=array(
 					'username'=>$_GET['session'],
 					'organization_id'=>$qry[0]->organization_id,
 					'app_name'=>$qry[0]->application_id,
 					'email'=>$qry[0]->email, 
 			);
 			$this->session->set_userdata('username',$session_data);
 			$this->session->set_flashdata('category_success', 'success message');
 			$this->session->set_flashdata('message', $this->config->item("user").' Application Password Update successfully');
 			redirect('admin_panel/manage_admin');
 		} 
 		$username=$this->session->userdata('username');
 		if($username['username']=='admin')
 		{ 
 			$org_list=$this->data['org_list']=$this->admin_model->org_list();print_r($org_list);die;
 		}
 		else  
	 	{	
	 		if($username['organization_id']!=='')
	 		{<commit_msg>changes code<commit_after><?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

 class Admin_panel extends CI_Controller{
 	function __construct()
 	{
 		parent::__construct();
 		$this->data[]='';
 		$this->load->helper('url');
 		$this->data['url']=base_url();
		$this->load->library('parser');
		$this->load->library('session');
		$this->load->model('admin_model');
		$this->load->model('login_model');
	}

 	/* Function for login Admin area view.......................................................................*/
 	function index()
 	{
 		$this->parser->parse('include/header',$this->data);
 		$this->load->view('admin_login',$this->data);
 	}
 	
 	/* Function for verify Admin for his account area view.......................................................................*/
 	function verify_admin()
 	{
 		$userid=$this->input->post('username');
 		if('admin'== $userid && 'admin'== $this->input->post('password'))
 		{
 			$this->session->set_userdata('username',array('username'=>'admin'));
 			$this->session->userdata('username');
 			redirect('admin_panel/admin_dashboard');
 		}
 		elseif($userid && $this->input->post('password'))
 		{
 			$data=array(
 					'Username'=>$this->input->post('username'),
 					'Password'=><PASSWORD>($this->input->post('password'))
 			);
 			$query=$this->admin_model->verify_admin('organizations',$data);
 			$qry=$this->admin_model->org_list($query[0]->organization_id);
 				if($qry){ 
			 			$session_data=array(
			 										'username'=>$userid,
			 										'organization_id'=>$qry[0]->organization_id,
			 										'organization_name'=>$qry[0]->organization_name,
			 										'app_name'=>$qry[0]->application_id,
			 										'email'=>$qry[0]->email
			 									   );
			 					$this->session->set_userdata('username',$session_data);
			 					$this->session->userdata('username');
 						}
 					else{
 						$session_data=array(
 								'username'=>$userid,
 								'organization_id'=>$query[0]->organization_id,
			 					'organization_name'=>$query[0]->organization_name,
 						);
 						$this->session->set_userdata('username',$session_data);
 						$this->session->userdata('username');
 						}
 			if($query)
 			{
 				redirect('admin_panel/admin_dashboard');
 			}
 			else
 			{
 				$this->session->set_flashdata('category_error','message');
 				$this->session->set_flashdata('message','please enter correct user id and password');
 				redirect('admin_panel');
 			}
 		}
 		else 
 		{
 			$this->session->set_flashdata('category_error','message');
 			$this->session->set_flashdata('message','please enter correct user id and password');	
 			redirect('admin_panel');
 		}
	 		
 	}
 	
 	/* Function for Admin panel dashboard area view.......................................................................*/
 	function admin_dashboard()
 	{
 		if (!$this->session->userdata('username')){ $this->session->set_flashdata('category_error_login', " Your Session Is Expired!! Please Login Again. "); redirect(base_url());}
 		$this->parser->parse('include/header',$this->data);
 		$this->parser->parse('include/left_menu',$this->data);
 		$this->load->view('admin_dashboard',$this->data);
 		$this->parser->parse('include/footer',$this->data);
 	}
 	
 	/* Function for Super Admin panel area view.......................................................................*/
 	
 	function manage_admin()
 	{
 		
 		/* code for when server update response his password */
 		if(isset($_GET['session']) && $_GET['session']!=='')
 		{
 			$data=array('Username'=>$_GET['session']);
 			$query=$this->admin_model->verify_admin('organizations',$data);
 			$qry=$this->admin_model->org_list($query[0]->organization_id);
 			$session_data=array(
 					'username'=>$_GET['session'],
 					'organization_id'=>$qry[0]->organization_id,
 					'app_name'=>$qry[0]->application_id,
 					'email'=>$qry[0]->email, 
 			);
 			$this->session->set_userdata('username',$session_data);
 			$this->session->set_flashdata('category_success', 'success message');
 			$this->session->set_flashdata('message', $this->config->item("user").' Application Password Update successfully');
 			redirect('admin_panel/manage_admin');
 		} 
 		$username=$this->session->userdata('username');
 		if($username['username']=='admin')
 		{ 
 			$org_list=$this->data['org_list']=$this->admin_model->org_list();
 		}
 		else  
	 	{	
	 		if($username['organization_id']!=='')
	 		{
{'fraction_non_alphanumeric': 0.2528929333782721, 'fraction_numerical': 0.0024716324008538368, 'mean_word_length': 2.9250440917107583, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 230, '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': '2124557', 'n_tokens_mistral': 3417, 'n_tokens_neox': 2804, 'n_words': 327}