<?php

/**
 *--------------------------------------
 * log
 *--------------------------------------
 * @project		: loga
 * @author		: cblee
 * @created		: 2016-06-28
 * @copyright	: (c)2016 AsThis
 *--------------------------------------
 */
defined('PFA_PATH') or exit('Access Denied');

class LogModl extends Modl {
	public function get_logList($where = array(), $order = '`l_time` DESC', $limit = 3) {
		$_LL = $this->where($where)->order($order)->limit($limit)->select();
		return $_LL;
	}

	public function add_log($operation, $status = 1) {
		$data = array();
		$data['l_operation'] = $operation;
		$data['l_status'] = $status;
		$data['l_time'] = NOW_TIME;
		$data['l_ip'] = CLIENT_IP;
		$data['lang'] = LANG_NAME;
		return $this->insert($data);
	}
}

?>