ב הוא חיבור של הרב יהושע בועז שתוכנו מראי מקומות למקורותشسdggרות הל555ה התafhgfh
במסgרות ה gh//شی הוא חיבור של הרב יהושע בועז שתוכנו מראי מקומות למקורותהתנדaghhhhו12ין יעל, המעציfghfghfע
/
www-data
/
newsites
/
adminpanel
/
application
/
controllers
/
Upload FileeE
HOME
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Login extends CI_Controller { function __construct() { parent::__construct(); $this->load->library('form_validation'); $this->load->library('session'); $this->load->helper('url'); } public function index() { $user_id=$this->session->userdata('user_id'); if(!empty($user_id)) { redirect('Users'); } $user_email=$this->input->post('username'); if($this->input->post('userpwd')){ $user_pwd= md5($this->input->post('userpwd')); }else{ $user_pwd= null; } $this->form_validation->set_rules('username','User ID','required'); $this->form_validation->set_rules('userpwd','Password','required'); if($_POST) { $this->load->model('Login_Model'); $result = $this->Login_Model->index($user_email,$user_pwd); // Now we verify the result if(!$result) { // If user did not validate, then show them login page again $this->session->set_flashdata("errors", "Incorrect Login Details"); $this->data['form_validation'] = validation_errors(); $this->load->view('login_view', $this->data); } else { redirect('Users'); } } else { $this->load->view('login_view'); $this->session->sess_destroy(); } } }