D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
ksclnmuac
/
public_html
/
grievance
/
application
/
models
/
Filename :
AccessLog.php
back
Copy
<?php /** * Model For Access Log Creation And Update * * @author Softpro India Pvt. Ltd. */ defined('BASEPATH') OR exit('No direct script access allowed'); class AccessLog extends CI_Model { function __construct() { parent::__construct(); $this->load->database(); } function createAccessLog($id, $userType, $loginStatus, $ip, $browserInfo) { $accessLogInfo = array( 'access_ip' => $ip, 'access_browser_details' => $browserInfo, 'access_login_status' => $loginStatus, 'access_auth_id' => $id, 'access_user_type' => $userType, 'access_login_at' => date("Y-m-d H:i:s") ); $this->db->insert('tbl_access_log', $accessLogInfo); return $this->db->insert_id(); } function updateAccessLog($accessId,$loginStatus){ $accessLogInfo = array( 'access_active_status' => $loginStatus, 'access_logout_at' => date("Y-m-d H:i:s") ); $this->db->where('access_id', $accessId); $this->db->update('tbl_access_log', $accessLogInfo); } }