formatting, globals

This commit is contained in:
Miles Lott 2001-12-18 06:00:48 +00:00
parent b78953097a
commit e6eb32d36f
3 changed files with 35 additions and 37 deletions

View File

@ -9,11 +9,11 @@
* Free Software Foundation; either version 2 of the License, or (at your * * Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. * * option) any later version. *
\***************************************************************************/ \***************************************************************************/
/* $Id$ */ /* $Id$ */
class bolog class bolog
{ {
var $public_functions = array var $public_functions = array
( (
'read_log' => True 'read_log' => True
@ -21,7 +21,6 @@
function bolog($session=False) function bolog($session=False)
{ {
global $phpgw;
$this->so = CreateObject('admin.solog'); $this->so = CreateObject('admin.solog');
} }
@ -36,13 +35,13 @@
function get_error_cols_e() function get_error_cols_e()
{ {
$fields = $this->so->get_error_cols_e(); $fields = $this->so->get_error_cols_e();
$fields['log_date_e'] = array(); $fields['log_date_e'] = array();
$fields['log_msg_date_e'] = array(); $fields['log_msg_date_e'] = array();
$fields['log_full_name'] = array(); $fields['log_full_name'] = array();
// boAccounts // boAccounts
$fields['account_pwd']['include'] = false; $fields['account_pwd']['include'] = false;
$fields['account_lastlogin_e'] = array(); $fields['account_lastlogin_e'] = array();
$fields['account_lastloginfrom_e'] = array(); $fields['account_lastloginfrom_e'] = array();
$fields['account_lastpwd_change_e'] = array(); $fields['account_lastpwd_change_e'] = array();
return $fields; return $fields;
} }

View File

@ -29,8 +29,7 @@
function solog() function solog()
{ {
global $phpgw; $this->db = $GLOBALS['phpgw']->db;
$this->db = $phpgw->db;
} }
function get_error_cols() function get_error_cols()
@ -108,14 +107,16 @@
} }
function get_no_errors() function get_no_errors()
{ /* Get max ErrorId */ {
/* Get max ErrorId */
$this->db->query("select count(*) as max_id from phpgw_log, phpgw_log_msg WHERE phpgw_log.log_id = phpgw_log_msg.log_msg_log_id",__LINE__,__FILE__); $this->db->query("select count(*) as max_id from phpgw_log, phpgw_log_msg WHERE phpgw_log.log_id = phpgw_log_msg.log_msg_log_id",__LINE__,__FILE__);
$this->db->next_record(); $this->db->next_record();
return $this->db->f('max_id'); return $this->db->f('max_id');
} }
function get_error($parms) function get_error($parms)
{ /* Get parameter values */ {
/* Get parameter values */
$from = $parms['from']; $from = $parms['from'];
$where = $parms['where']; $where = $parms['where'];
$orderby = $parms['orderby']; $orderby = $parms['orderby'];

View File

@ -1,53 +1,51 @@
<?php <?php
/**************************************************************************\ /**************************************************************************\
* phpGroupWare - Administration * * phpGroupWare - Administration *
* http://www.phpgroupware.org * * http://www.phpgroupware.org *
* -------------------------------------------- * * -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it * * 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 * * 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 * * Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. * * option) any later version. *
\**************************************************************************/ \**************************************************************************/
/* $Id$ */ /* $Id$ */
class uimenuclass class uimenuclass
{ {
function uimenuclass() function uimenuclass()
{ {
global $phpgw, $phpgw_info; $this->t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
$this->t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
$this->t->set_file(array('menurow' => 'menurow.tpl')); $this->t->set_file(array('menurow' => 'menurow.tpl'));
$this->t->set_block('menurow','menu_links','menu_links'); $this->t->set_block('menurow','menu_links','menu_links');
$this->t->set_block('menurow','link_row','link_row'); $this->t->set_block('menurow','link_row','link_row');
$this->rowColor[0] = $phpgw_info["theme"]["row_on"]; $this->rowColor[0] = $phpgw_info["theme"]["row_on"];
$this->rowColor[1] = $phpgw_info["theme"]["row_off"]; $this->rowColor[1] = $phpgw_info["theme"]["row_off"];
} }
function section_item($pref_link='',$pref_text='', $bgcolor) function section_item($pref_link='',$pref_text='', $bgcolor)
{ {
global $phpgw, $phpgw_info, $t; global $t;
$this->t->set_var('row_link',$pref_link); $this->t->set_var('row_link',$pref_link);
$this->t->set_var('row_text',$pref_text); $this->t->set_var('row_text',$pref_text);
$this->t->set_var('tr_color',$bgcolor); $this->t->set_var('tr_color',$bgcolor);
$this->t->parse('all_rows','link_row',True); $this->t->parse('all_rows','link_row',True);
} }
// $file must be in the following format: // $file must be in the following format:
// $file = array( // $file = array(
// 'Login History' => array('/index.php','menuaction=admin.uiaccess_history.list') // 'Login History' => array('/index.php','menuaction=admin.uiaccess_history.list')
// ); // );
// This allows extra data to be sent along // This allows extra data to be sent along
function display_section($_menuData) function display_section($_menuData)
{ {
global $phpgw, $phpgw_info, $account_id; global $account_id;
$i=0; $i=0;
while(list($key,$value) = each($_menuData)) while(list($key,$value) = each($_menuData))
{ {
if (!empty($value['extradata'])) if (!empty($value['extradata']))
@ -89,7 +87,7 @@
case 'view_user': case 'view_user':
$GLOBALS['menuData'][] = array( $GLOBALS['menuData'][] = array(
'description' => 'User Data', 'description' => 'User Data',
'url' => '/index.php', 'url' => '/index.php',
'extradata' => 'menuaction=admin.uiaccounts.view_user' 'extradata' => 'menuaction=admin.uiaccounts.view_user'
); );
break; break;