<?php
/**
 * Copy Right IJH.CC
 * Each engineer has a duty to keep the code elegant
 * $Id$
 */

if(!defined('__CORE_DIR')){
    exit("Access Denied");
}

class Mdl_Staff_Log extends Mdl_Table
{   
  
    protected $_table = 'staff_log';
    protected $_pk = 'log_id';
    protected $_cols = 'log_id,staff_id,money,intro,admin,clientip,dateline';

    public function logs($staff_id, $num=0, $intro='')
    {
        $a = array();
        if(!$staff_id = (int)$staff_id){
            return false;
        }
        $a = array('staff_id'=>$staff_id, 'money'=>$num, 'intro'=>$intro);
        /*if(defined('IN_ADMIN')){
            $admin = K::$system->admin->admin;
            $a['admin'] = "{$admin['admin_id']}:{$admin['admin_name']}";
        }*/
        $a['clientip'] = __IP;
        $a['dateline'] = __CFG::TIME;
        return $this->db->insert($this->_table, $a, true);
    }
}