egroupware/admin/inc/class.bolog.inc.php

86 lines
2.9 KiB
PHP
Raw Permalink Normal View History

2001-08-05 08:48:42 +02:00
<?php
/***************************************************************************\
2004-01-27 00:26:19 +01:00
* eGroupWare - log *
* http://www.egroupware.org *
2001-08-05 08:48:42 +02:00
* Written by : Jerry Westrick [jerry@westrick.com] *
* ------------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\***************************************************************************/
2001-12-18 07:00:48 +01:00
2001-08-05 08:48:42 +02:00
/* $Id$ */
class bolog
{
var $public_functions = array
(
'read_log' => True
2001-08-05 08:48:42 +02:00
);
function bolog($session=False)
{
2005-10-14 19:03:16 +02:00
$this->so =& CreateObject('admin.solog');
2001-08-05 08:48:42 +02:00
}
function get_error_cols()
{
$fields = $this->so->get_error_cols();
// boAccounts
$fields['account_pwd']['include'] = false;
return $fields;
}
function get_error_cols_e()
{
$fields = $this->so->get_error_cols_e();
2001-12-18 07:00:48 +01:00
$fields['log_date_e'] = array();
$fields['log_msg_date_e'] = array();
$fields['log_full_name'] = array();
2001-08-05 08:48:42 +02:00
// boAccounts
2001-12-18 07:00:48 +01:00
$fields['account_pwd']['include'] = false;
$fields['account_lastlogin_e'] = array();
$fields['account_lastloginfrom_e'] = array();
2001-08-05 08:48:42 +02:00
$fields['account_lastpwd_change_e'] = array();
return $fields;
}
function get_error($values='')
{
$rows = $this->so->get_error($values);
// should remove the accounts_pwd
return $rows;
}
2001-08-12 03:06:07 +02:00
function get_no_errors()
{
$rows = $this->so->get_no_errors();
return $rows;
}
2001-08-05 08:48:42 +02:00
function get_error_e($values='')
{
$rows = $this->so->get_error_e($values);
2001-08-05 08:48:42 +02:00
// Enhance the fields
reset($rows);
while(list($rno,$r)=each($rows))
{
unset($r['acount_pwd']); // remove the accounts_pwd
2005-10-14 19:03:16 +02:00
$r['log_date_e']['value'] = $GLOBALS['egw']->common->show_date($GLOBALS['egw']->db->from_timestamp($r['log_date']['value']));
$r['log_msg_date_e']['value'] = $GLOBALS['egw']->common->show_date($GLOBALS['egw']->db->from_timestamp($r['log_msg_date']['value']));
2001-08-12 03:06:07 +02:00
$r['log_full_name']['value'] = $r['account_lastname']['value'] . ', ' .$r['account_firstname']['value'];
2005-10-14 19:03:16 +02:00
$r['account_lastlogin_e']['value'] = $GLOBALS['egw']->common->show_date($GLOBALS['egw']->db->from_timestamp($r['account_lastlogin']['value']));
$r['account_lastpwd_change_e']['value'] = $GLOBALS['egw']->common->show_date($GLOBALS['egw']->db->from_timestamp($r['account_lastpwd_change']['value']));
2001-08-12 03:06:07 +02:00
$r['account_lastloginfrom_e']['value'] = 'www.nowhere.com';
2001-08-05 08:48:42 +02:00
2001-08-12 03:06:07 +02:00
$r['log_msg_text']['value'] = lang($r['log_msg_msg']['value'],explode('|',$r['log_msg_parms']['value']));
2001-08-05 08:48:42 +02:00
$rows[$rno]=$r;
}
return $rows;
}
}
?>