Location: PHPKode > scripts > GalleryShuffle > v1.0/php/Models/userLogs.php
<?php

/**
* USER LOGS
**/

class model_userLogs extends model_classicTable
{
	
	public function __construct()
	{
	
		parent::__construct('user_logs');
		
	}
	
	public function verifyIsActiveLineByUid($uid)
	{
		
		$buffer = DB::qry("SELECT * FROM `" . $this->tableName . "` WHERE UID='" . $uid . "'", 2);
		
		if($buffer['is_active'] == 1) return true;
		return false;
		
	}
	
	public function insertNewLine($uid, $clientIp)
	{
		
		$params = "
		`UID`='" . $uid . "', 
		`client_IP`='" . $clientIp . "'";
		
		parent::insertNewLine($params, 1);
		
	}
	
	public function updateLineByUid($uid) 
	{
		
		DB::qry($req = "UPDATE `" . $this->tableName . "` SET 
		`date_modified`='" . FUNCTIONS::getCurrentDateTime() . "' 
		WHERE `UID`='" . $uid . "'");
		
	}
	
	public function updateNoActiveLineByUid($uid) 
	{
		
		DB::qry($req = "UPDATE `" . $this->tableName . "` SET 
		`is_active`=0,
		`date_modified`='" . FUNCTIONS::getCurrentDateTime() . "' 
		WHERE `UID`='" . $uid . "'");
		
	}
	
}

?>
Return current item: GalleryShuffle