[ Index ] |
|
Code source de eGroupWare 1.2.106-2 |
1 <?php 2 /**************************************************************************\ 3 * eGroupWare - Administration * 4 * http://www.egroupware.org * 5 * -------------------------------------------- * 6 * This program is free software; you can redistribute it and/or modify it * 7 * under the terms of the GNU General Public License as published by the * 8 * Free Software Foundation; either version 2 of the License, or (at your * 9 * option) any later version. * 10 \**************************************************************************/ 11 12 /* $Id: class.soaccess_history.inc.php 20295 2006-02-15 12:31:25Z $ */ 13 14 class soaccess_history 15 { 16 var $db; 17 var $table = 'egw_access_log'; 18 19 function soaccess_history() 20 { 21 $this->db = clone($GLOBALS['egw']->db); 22 $this->db->set_app('phpgwapi'); 23 } 24 25 function test_account_id($account_id) 26 { 27 if ($account_id) 28 { 29 return array('account_id' => $account_id); 30 } 31 return false; 32 } 33 34 function &list_history($account_id,$start,$order,$sort) 35 { 36 $where = $this->test_account_id($account_id); 37 38 $this->db->select($this->table,'loginid,ip,li,lo,account_id,sessionid',$where,__LINE__,__FILE__,(int) $start,'ORDER BY li DESC'); 39 while (($row = $this->db->row(true))) 40 { 41 $records[] = $row; 42 } 43 return $records; 44 } 45 46 function total($account_id) 47 { 48 $where = $this->test_account_id($account_id); 49 50 $this->db->select($this->table,'COUNT(*)',$where,__LINE__,__FILE__); 51 52 return $this->db->next_record() ? $this->db->f(0) : 0; 53 } 54 55 function return_logged_out($account_id) 56 { 57 $where = array('lo != 0'); 58 if ($account_id) 59 { 60 $where['account_id'] = $account_id; 61 } 62 $this->db->select($this->table,'COUNT(*)',$where,__LINE__,__FILE__); 63 64 return $this->db->next_record() ? $this->db->f(0) : 0; 65 } 66 }
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Feb 25 17:20:01 2007 | par Balluche grâce à PHPXref 0.7 |