ב הוא חיבור של הרב יהושע בועז שתוכנו מראי מקומות למקורותشسdggרות הל555ה התafhgfh
במסgרות ה gh//شی הוא חיבור של הרב יהושע בועז שתוכנו מראי מקומות למקורותהתנדaghhhhו12ין יעל, המעציfghfghfע
/
www-data
/
newsites
/
adminpanel
/
application
/
models
/
Upload FileeE
HOME
<?php defined('BASEPATH') OR exit('No direct script access allowed'); class Login_Model extends CI_Model { public function index($user_email,$user_pwd) { $query=$this->db->query("select * from user where login_name='".$user_email."' and password='".$user_pwd."'"); //echo "select * from user where login_name='".$user_email."' and password='".$user_pwd."'"; //print_r($query);exit; if($query->num_rows() == 1) { // If there is a user, then create session data $row = $query->row(); $data = array( 'user_id' => $row->id, 'username' => $row->login_name, 'validated' => true ); $this->session->set_userdata($data); return true; } // If the previous process did not validate // then return false. return false; } public function redirect_login($user_email) { $query=$this->db->query("select * from user where login_name='".$user_email."'"); if($query->num_rows() == 1) { // If there is a user, then create session data $row = $query->row(); $data = array( 'user_id' => $row->id, 'username' => $row->login, 'validated' => true ); $this->session->set_userdata($data); return true; } // If the previous process did not validate // then return false. return false; } public function check_user_mail($user_email) { $query=$this->db->query("select * from user where logine_name='".$user_email."' "); return $query->row(); } public function update_password($password,$user_id) { $user_password=md5($password); $customer_id=base64_decode($user_id); //echo "update user set password='$user_password' where id='$customer_id'"; return $this->db->query("update user set password='$user_password' where id='$customer_id'"); } public function get_profile($id) { $query=$this->db->query("select * from user where id='".$id."'"); $result = $query->result_array(); $count = count($result); if(empty($count) || $count > 1) { $log = 0; return $log ; } else { return $result; } } }