[ Mini Kiebo ]
Server: Windows NT AKFAR_SERVER 10.0 build 26200 (Windows 10) AMD64
Path:
D:
/
software bumsil
/
APLIKASI SIMAKU
/
unb.simaku.net
/
unb.simaku.net
/
application
/
models
/
[
Home
]
File: Mlogin.php
<?php class Mlogin extends CI_Model { var $table = 'tblu_user'; function __construct() { parent::__construct(); } function check_user($username, $password) { $query = $this->db->get_where($this->table, array('username' => $username, 'password' => $password), 1, 0); if ($query->num_rows() > 0) { return TRUE; } else { return FALSE; } } function check_master($username, $password) { $query = $this->db->get_where('master_pra', array('username' => $username, 'password' => $password), 1, 0); if ($query->num_rows() > 0) { return TRUE; } else { return FALSE; } } function check_ujian($email, $no_ujian) { $query = $this->db->get_where('tbl_mhs', array('email' => $email, 'no_ujian' => $no_ujian), 1, 0); if ($query->num_rows() > 0) { return TRUE; } else { return FALSE; } } function check_peg($user, $pass) { $query = $this->db->get_where('tbl_peg', array('user' => $user, 'pass' => $pass), 1, 0); if ($query->num_rows() > 0) { return TRUE; } else { return FALSE; } } function check_mhs($user, $pass) { $query = $this->db->get_where('tbl_mhs', array('user' => $user, 'pass' => $pass), 1, 0); if ($query->num_rows() > 0) { return TRUE; } else { return FALSE; } } function master($username,$password){ $this->db->where('username',$username); $this->db->where('password',$password); return $this->db->get('master_pra'); } function peserta($email,$no_ujian){ $this->db->where('email',$email); $this->db->where('no_ujian',$no_ujian); return $this->db->get('tbl_mhs'); } function get_id_pass($username,$password){ $this->db->select('*'); $this->db->from('tbl_unit,tblu_user'); $this->db->where('tbl_unit.id = tblu_user.id_unit'); $this->db->where('tblu_user.username',$username); $this->db->where('tblu_user.password',$password); return $this->db->get(); } function get_id_pass_keuangan($username,$password){ $this->db->select('*'); $this->db->from('tblu_user'); $this->db->where('tblu_user.id_unit',0); $this->db->where('tblu_user.username',$username); $this->db->where('tblu_user.password',$password); return $this->db->get(); } function get_id_pass_mhs($username,$password){ $this->db->select('*'); $this->db->from('tbl_mhs,tblu_user'); $this->db->where('tbl_mhs.nim = tblu_user.id_unit'); $this->db->where('tblu_user.username',$username); $this->db->where('tblu_user.password',$password); return $this->db->get(); } function get_id_peg($username,$password){ $this->db->select('*'); $this->db->from('tbl_peg'); $this->db->where('user',$username); $this->db->where('pass',$password); return $this->db->get(); } function get_id_mhs($username,$password){ $this->db->select('*'); $this->db->from('tbl_mhs'); $this->db->where('user',$username); $this->db->where('pass',$password); return $this->db->get(); } function kosong_data(){ $this->db->where('id_unit !=', 0); $this->db->delete('tblu_user'); } }