GIF89a;
Server IP : 172.26.0.195 / Your IP : 3.133.157.133 Web Server : Apache System : Linux 43-205-77-33.cprapid.com 3.10.0-1160.119.1.el7.tuxcare.els2.x86_64 #1 SMP Mon Jul 15 12:09:18 UTC 2024 x86_64 User : jnclnmuac ( 1026) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /home/jnclnmuac/public_html/web/../admission/application/controllers/admin/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php /** * Description of Authentication * * @author Softpro India Pvt. Ltd */ class Authentication extends CI_Controller { //put your code here public function __construct() { parent::__construct(); $this->load->model("admin/AuthenticationManagement"); $this->load->model("admin/BranchManagement"); } public function index() { if ($this->sessionvalidator->validateSession()) { $this->load->view("admin/Dashboard"); // redirect("admin/Dashboard"); } else { $this->load->view("home"); } } public function authLogin() { $this->form_validation->set_rules("username", "username", "required", array("required" => "Enter Your Username.")); $this->form_validation->set_rules("password", "password", "required", array("required" => "Enter Your Password.")); if ($this->form_validation->run() == false) { $this->index(); } else { $username = $this->input->post("username"); $password = $this->input->post("password"); //$credentials = array("admin_username" => $username, "admin_password" => $password); //$admin = $this->AuthenticationManagement->validateAdmin($credentials)->result(); $branch = $this->BranchManagement->getAllBranches()->result(); if ($username == 'adminadmission@cas.com' && $password == 'bihar@2021') { $smember_id = $this->input->post("smember_id"); $adminData = array("admin_username" => $username, "admin_name" => $username, "admin_id" => $smember_id, "admin_role" => 'M', "isLoggedIn" => true, "admin_type" => 'E'); if (sizeof($branch)) { $br=$branch[0]; $branchData = array( 'branch_id' => $br->branch_id, 'branch_name' => $br->branch_name, 'branch_short_name' => $br->branch_short_name, 'branch_email' => $br->branch_email, 'branch_mobile' => $br->branch_mobile_no, 'branch_tel' => $br->branch_tel_no, 'branch_fax' => $br->branch_fax, 'branch_website' => $br->branch_website_url ); $this->session->set_userdata("branchData", $branchData); } $this->session->set_userdata("admin_data", $adminData); redirect("admin/Dashboard"); } else { $this->session->set_flashdata("errorMessage", "Wrong credentials."); $this->index(); } } } }