newer version of veiwer...

This commit is contained in:
jerrywestrick 2001-08-12 01:06:07 +00:00
parent cd2676a3a6
commit e41e0cc481
4 changed files with 385 additions and 154 deletions

View File

@ -54,6 +54,12 @@
return $rows;
}
function get_no_errors()
{
$rows = $this->so->get_no_errors();
return $rows;
}
function get_error_e($values='')
{
$rows = $this->so->get_error_e($values);
@ -63,14 +69,14 @@
while(list($rno,$r)=each($rows))
{
unset($r['acount_pwd']); // remove the accounts_pwd
$r['log_date_e'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['log_date']));
$r['log_msg_date_e'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['log_msg_date']));
$r['log_full_name'] = $r['account_lastname'] . ', ' .$r['account_firstname'];
$r['account_lastlogin_e'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['account_lastlogin']));
$r['account_lastpwd_change_e'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['account_lastpwd_change']));
$r['account_lastloginfrom_e'] = 'www.nowhere.com';
$r['log_date_e']['value'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['log_date']));
$r['log_msg_date_e']['value'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['log_msg_date']));
$r['log_full_name']['value'] = $r['account_lastname']['value'] . ', ' .$r['account_firstname']['value'];
$r['account_lastlogin_e']['value'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['account_lastlogin']));
$r['account_lastpwd_change_e']['value'] = $GLOBALS['phpgw']->common->show_date($GLOBALS['phpgw']->db->from_timestamp($r['account_lastpwd_change']));
$r['account_lastloginfrom_e']['value'] = 'www.nowhere.com';
$r['log_msg_text'] = lang($r['log_msg_msg'],explode('|',$r['log_msg_parms']));
$r['log_msg_text']['value'] = lang($r['log_msg_msg']['value'],explode('|',$r['log_msg_parms']['value']));
$rows[$rno]=$r;
}

View File

@ -16,7 +16,7 @@ class html
{
function hash_table($rows,$head='',$obj, $frtn)
{
global $phpgw;
global $phpgw, $start, $phpgw_info;
$html = '';
$edittable =$head['_edittable'];
if (isset($edittable))
@ -29,13 +29,38 @@ class html
else
{
$html .= "<form method=\"post\" action=\""
. $phpgw->link('/admin/log.php')
. "&editable=true\">\n";
$html .= "<input type=\"submit\" name=\"submit\" value=\"Edit Table Format\">";
. $phpgw->link('/admin/log.php') ;
// . "&editable=true\">\n";
// --------------------------------- nextmatch ---------------------------
// nextmatchs
$bo = CreateObject('admin.bolog',True);
if (!isset($start))
{
$start = 0;
}
$num_rows = $phpgw_info['user']['preferences']['common']['maxmatchs'];
$stop = $start + $num_rows;
if ($stop > count($rows))
{
$stop = count($rows);
}
$nextmatchs = CreateObject('phpgwapi.nextmatchs');
$total_records = $bo->get_no_errors();
$left = $nextmatchs->left('/admin/log.php',$start,$total_records,$extradata='');
$right = $nextmatchs->right('/admin/log.php',$start,$total_records,$extradata='');
$hits = $nextmatchs->show_hits($total_records,$start);
// -------------------------- end nextmatch ------------------------------------
$html .= "<table width=\"98%\"><tr>";
$html .= "<td align=left>$left</td>";
$html .= "<td align=right> $hits</td>";
$html .= "<td align=left> <A href=".$phpgw->link('/admin/log.php'). "&editable=true" ."> Edit Table format </A></td>";
$html .= "<td align=right>$right</td>";
$html .= "</tr></table>";
}
}
$params = $head['_table_parms'];
if ($head == '')
{
$frow = $rows[0];
@ -53,62 +78,40 @@ class html
else
{
$cols = $head['_cols'];
};
$html .= "<table $params>\n";
// Build Header Row...
$html .= "\t<tr> ";
reset($cols);
while (list(,$name) = each($cols))
{
$values = $head[$name];
$title = $values['title'];
if ($title == '')
{
$title = $name;
}
$html .= "\t\t<td ".$values['parms_hdr'].">".$title."</td>\n";
}
$html .= "\t</tr>\n";
// Build Header Row...
// First Get the layout arrays...
$layout = $head['#layout'];
if (gettype($layout) != 'array')
{
$layout = array_keys($cols);
}
// printlist, a list of all columns in a logical row,
// with Row/ColSpawn values, in print order...
$printlist = $this->make_printlist($layout,$cols);
// $table contains data for header row....
$table = $this->make_tblhead($printlist,$head);
// get GroupBy
$groupby = $head['_groupby'];
$supres = $head['_supres'];
$lastgroup = '';
// build actual Rows...
/*
** Okay here goes nothing
** Need to build a table in an array so that I can directly access
** the diferent portions and change attributes directly...
*/
// Start by making an empty table, with default values!
$rparms = array();
$table = array();
$mrow = count($rows);
$mcol = count($cols);
$mrow = $stop;
for ($rno=0;$rno<$mrow;$rno++)
{
$rparms[$rno] =
array (
'VALIGN' =>'TOP',
'bgcolor' =>'FFFFFF'
);
for($cno=0;$cno<$mcol;$cno++)
{
$table[$rno][$cno] =
array (
'VALIGN' =>'TOP',
'colspan' =>1,
'rowspan' =>1,
'value' =>$rows[$rno][$cols[$cno]],
'bgcolor' =>'FFFFFF',
'#supres' =>'no'
);
}
// Build GroupKey
if (isset($groupby))
{
@ -116,9 +119,17 @@ class html
reset($groupby);
while (list($gname,)=each($groupby))
{
$gkey .= $rows[$rno][$gname];
$gkey .= $rows[$rno][$gname]['value'];
}
$table[$rno]['#gkey'] = $gkey;
$rows[$rno]['#gkey'] = $gkey;
}
reset($printlist);
while(list($pc,$pcol)=each($printlist))
{
$cname = $pcol['#name'];
$cparms = array_merge($head[$cname],$pcol,array('bgcolor'=>'FFFFFF'),$rows[$rno][$cname]);
$rows[$rno][$cname] = $cparms;
}
}
@ -126,59 +137,76 @@ class html
if (isset($groupby))
{
$grno = 0;
for ($rno=1;$rno<$mrow;$rno++)
$grno = $start;
$gkey = $rows[$start]['#gkey'];
for ($rno=$start+1;$rno<$stop;$rno++)
{
$rowspan = 1;
$gkey = $table[$grno]['#gkey'];
$rkey = $table[$rno]['#gkey'];
$rkey = $rows[$rno]['#gkey'];
while ( $gkey == $rkey)
{
//echo "<p>grno:$grno ($gkey) rno:$rno ($rkey) are equal</p>";
$rowspan = $rowspan + 1;
$row = $rows[$rno];
for ($cno=0;$cno<$mcol;$cno++)
for ($pc=0;$pc<count($row);$pc++)
{
if ($supres[$cols[$cno]])
$c = $row[$cols[$pc]];
$cno = $c['#colno'];
$cname = $c['#name'];
if ($supres[$cname])
{
$table[$rno][$cno]['#supres']='yes';
$table[$rno][$cno]['value']='&nbsp ';
$table[$grno][$cno]['rowspan']=$rowspan;
$rows[$rno][$cname]['#supres']='yes';
$rows[$rno][$cname]['value']='&nbsp ';
$rows[$grno][$cname]['rowspan']=$printlist[$cno]['rowspan']*$rowspan;
}
}
$rno++;
if ($rno >= $mrow)
{
break;
}
$rkey = $table[$rno]['#gkey'];
$rkey = $rows[$rno]['#gkey'];
}
//echo "<p>grno:$grno ($gkey) rno:$rno ($rkey) are not equal</p>";
$grno=$rno;
$gkey=$rkey;
}
}
/*
** Now Generate the Html For the Table Header
*/
//print_r($table);
$html .= $this->html_head($head,$table,$printlist);
/*
** Now (finaly) Generate the Html For the Table
*/
for ($rno=0;$rno<$mrow;$rno++)
//print_r($rows);
for ($rno=$start;$rno<$stop;$rno++)
{
// let user have a hack at the row...
$table[$rno]=$obj->$frtn($rno,$table[$rno]);
$rp = $this->makeparms($rparms[$rno]);
$gkey = $table[$rno]['#gkey'];
$html .= "\t<tr $rp> <comment $gkey>\n";
for($cno=0;$cno<$mcol;$cno++)
$row = $obj->$frtn($rno,$rows[$rno]);
// $row = $rows[$rno];
// $rp = $this->makeparms($row[$rno]['#row_parms']);
$rp = '';
$gkey = $row['#gkey'];
// $html .= "\t<tr $rp> <comment $gkey>\n";
$html .= "\t<tr $rp> \n";
reset($printlist);
while(list($pc,$pcol)=each($printlist))
{
if ($table[$rno][$cno]['#supres']=='no')
$cname = $pcol['#name'];
$cp = $this->makeparms($row[$cname]);
if($row[$cname]['#supres'] != 'yes')
{
$cp = $this->makeparms($table[$rno][$cno]);
$html .= "\t\t<td $cp>".$table[$rno][$cno]['value']."</td>\n";
};
$html .= "\t\t<td $cp>".$row[$cname]['value']."</td>\n";
}
if($pcol['#eor']=='1')
{
$html .= "\t</tr>\n"; // \t<tr $rp>\n
}
}
$html .= "\t</tr>\n";
}
$html .= "</table>\n";
$html .= "</form>";
@ -191,6 +219,10 @@ class html
{
$html = '';
$comma = ' ';
if (gettype($parmlist) != 'array')
{
return '';
}
reset($parmlist);
while(list($pname,$pvalue)=each($parmlist))
{
@ -219,7 +251,7 @@ class html
function edit_table($rows,$head='',$obj, $frtn)
{
global $phpgw, $nocols;
global $phpgw, $nocols, $noflds, $norows, $layout, $_cols;
$html = '';
$html .= "<form method=\"post\" action=\""
. $phpgw->link('/admin/log.php')
@ -237,27 +269,96 @@ class html
}
};
if ( gettype($head['_cols'])=="NULL")
if (isset($_cols))
{
$cols = array_keys($rows[0]);
$cols = $_cols;
}
else
{
$cols = $head['_cols'];
if ( gettype($head['_cols'])=="NULL")
{
$cols = array_keys($rows[0]);
}
else
{
$cols = $head['_cols'];
};
}
if (!isset($noflds))
{
$noflds = count($cols);
}
if (!isset($layout))
{
$layout = $head['#layout'];
};
if (!isset($norows))
{
$norows = count($layout);
}
if (!isset($nocols))
{
$nocols = count($cols);
$nocols = count($layout[0]);
}
// Table Excmple
// Build Header Row...
$html .= "<p>Number of Columns: ";
$html .= "<h2>Table Size</h2>";
// $html .= "<p>";
$html .= "Rows: ";
$html .= "<input type=\"input\" name=\"norows\" value=\"$norows\">";
$html .= "Columns: ";
$html .= "<input type=\"input\" name=\"nocols\" value=\"$nocols\">";
$html .= "<input type=\"submit\" name=\"submit\" value=\"Update Display\">";
$html .= "</p>\n";
$html .= "\t<tr> ";
$html .= "Fields: ";
$html .= "<input type=\"input\" name=\"noflds\" value=\"$noflds\">";
// $html .= "\t<tr> ";
// Column Defintions...
$html .= "<h2>Column Definition</h2>";
$html .= "<table width=\"98%\", bgcolor=\"000000\">\n";
$f = array();
for ($fno=0;$fno<$noflds;$fno++)
{
$f[]=$fno;
};
// Column Headings
$html .= "\t<tr bgcolor=\"D3DCFF\">\n";
for ($cno=0;$cno<$nocols;$cno++)
{
$html .= "\t\t<td align=center>$cno</td>\n";
}
$html .= "\t</tr >\n";
for ($rno=0;$rno<$norows;$rno++)
{
$html .= "\t<tr bgcolor=\"D3DCFF\">\n";
for ($cno=0;$cno<$nocols;$cno++)
{
$c = $layout[$rno][$cno];
$tname = "layout[$rno][]";
$t = $this->DropDown($f,$tname,$c);
$html .= "\t\t<td align=center>$t</td>\n";
}
$html .= "\t</tr >\n";
}
$html .= "</table>\n";
$html .= "<p>\n";
// Header of Table...
$printlist = $this->make_printlist($layout,$cols);
$table = $this->make_tblhead($printlist,$head);
$html .= $this->html_head($head,$table,$printlist);
$html .= "</table>\n";
$html .= "<input type=\"submit\" name=\"submit\" value=\"Update\">";
//Field Definitions
$html .= "<h2>Field Definitions</h2>";
$html .= "<table width=\"98%\", bgcolor=\"D3DCFF\">\n";
$html .= "\t\t<td width=\"2%\", align=\"center\">No</td>\n";
$html .= "\t\t<td width=\"2%\", align=\"center\">Del</td>\n";
$html .= "\t\t<td width=\"5%\">Column</td>\n";
$html .= "\t\t<td width=\"5%\">Field</td>\n";
$html .= "\t\t<td>Value</td>\n";
$html .= "\t</tr>\n";
@ -265,9 +366,9 @@ class html
// Add Table Rows...
reset($cols);
// while (list($cno,$name) = each($cols))
for ($cno=0;$cno<$nocols;$cno++)
for ($fno=0;$fno<$noflds;$fno++)
{
$name = $cols[$cno];
$name = $cols[$fno];
$values = $head[$name];
$title = $values['title'];
if ($title == '')
@ -275,9 +376,10 @@ class html
$title = $name;
}
$html .= "\t</tr>\n";
$html .= "\t\t<td bgcolor=\"FFFFFF\"><input type=\"checkbox\" name=\"_delcol[]\" value=\"$cno\"></td>\n";
$html .= "\t\t<td bgcolor=\"FFFFFF\">$fno</td>\n";
$html .= "\t\t<td bgcolor=\"FFFFFF\"><input type=\"checkbox\" name=\"_delcol[]\" value=\"$fno\"></td>\n";
$html .= "\t\t<td bgcolor=\"FFFFFF\">".$this->dropdown($cnam,'_cols[]',$name)."</td>\n";
$value = $rows[0][$name];
$value = $rows[0][$name]['value'];
$html .= "\t\t<td bgcolor=\"FFFFFF\">$value</td>\n";
$html .= "\t</tr>\n";
}
@ -300,7 +402,7 @@ class html
while (list(,$itm)=each($opts))
{
$html .= '\t<option value="'.$itm.'" ';
$html .= '<option value="'.$itm.'" ';
if ($itm == $sel)
{
$html .= 'selected ';
@ -311,6 +413,110 @@ class html
return $html;
}
function make_printlist($layout,$cols)
{
// Build Printlist... (Col and Row Spans...)
$tlayout = $layout;
$printlist = array();
$mrows = count($tlayout);
$mcols = count($tlayout[0]);
for($pr=0;$pr<$mrows;$pr++)
{
for($pc=0;$pc<$mcols;$pc++)
{
if (isset($tlayout[$pr][$pc]))
{
$cno = $tlayout[$pr][$pc];
$cname = $cols[$cno];
$colspan=1;
$rowspan=1;
while(($pr + $rowspan < $mrows) && ($tlayout[$pr + $rowspan][$pc] == $cno))
{
unset($tlayout[$pr + $rowspan][$pc]);
$rowspan++;
};
while(($pc + $colspan < $mcols) && ($tlayout[$pr][$pc+$colspan] == $cno))
{
unset($tlayout[$pr][$pc+$colspan]);
$colspan++;
};
if ($colspan > 1 && $rowspan > 1)
{
for($r=$pr+1;$r<$pr+$rowspan;$r++)
{
for($c=$pc+1;$c<$pc+$colspan;$c++)
{
unset($tlayout[$r][$c]);
}
}
}
$printlist[]=array('#name' =>$cname,
'rowspan' =>$rowspan,
'colspan' =>$colspan,
'valign' =>'top',
'#colno' =>$cno,
'#eor' =>0
);
}
}
$printlist[count($printlist)-1]['#eor']='1';
}
return $printlist;
}
function make_tblhead($printlist,$head)
{
// Build Title Row
$table = array();
reset($printlist);
while(list($pc,$pcol)=each($printlist))
{
$cname = $pcol['#name'];
$values = $head[$cname];
$title = $values['#title'];
if ($title == '')
{
$title = $cname;
}
$cparms = array_merge($values['#parms_hdr'],$pcol);
$cparms['value']=$title;
$table[0][$pc] = $cparms;
}
return $table;
}
function html_head($head,$table,$printlist)
{
$html = '';
$tparams = $this->makeparms($head['#table_parms']);
$html .= "<table $tparams>\n";
$rp = $this->makeparms($head['#head_parms']);
// $html .= "\t<tr $rp> <comment header>\n";
$html .= "\t<tr $rp> \n";
$row = $table[0];
reset($row);
$intr = true;
while(list(,$col)=each($row))
{
if (!$intr)
{
$html .= "\t<tr $rp>\n";
$intr = true;
}
$cname = $col['#name'];
$cp = $this->makeparms($col);
$html .= "\t\t<td $cp>".$col['value']."</td>\n";
if($col['#eor']=='1')
{
$html .= "\t</tr>\n";
$intr = false;
}
}
return $html;
}
}

View File

@ -107,6 +107,13 @@
return $this->get_error($parms);
}
function get_no_errors()
{ // 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->next_record();
return $this->db->f('max_id');
}
function get_error($parms)
{ // Get paramenter values
$from = $parms['from'];
@ -154,7 +161,7 @@
reset($fields);
while(list($fname,$fopt) = each($fields))
{
$this_row[$fname] = $this->db->f($fname);
$this_row[$fname]['value'] = $this->db->f($fname);
};
$rows[] = $this_row;
};

View File

@ -26,19 +26,17 @@
function uilog()
{
global $phpgw, $_cols, $editable, $modifytable, $nocols, $_delcol, $phpgw_info;
global $phpgw, $_cols, $editable, $modifytable, $nocols, $_delcol, $layout,
$phpgw_info;
$this->bolog = CreateObject('admin.bolog',True);
$this->html = createobject('admin.html');
$this->t = CreateObject('phpgwapi.Template',$phpgw->common->get_tpl_dir('admin'));
$this->lastid = "";
$this->editmode = false;
// nextmatchs
$this->start = 0;
$this->nextmatchs = CreateObject('phpgwapi.nextmatchs');
// Handle the Edit Table Button
if (isset($editable))
@ -60,7 +58,7 @@
if (isset($_cols))
{
$c = array();
for ($i=0;$i<$nocols;$i++)
for ($i=0;$i<count($_cols);$i++)
{
if (!in_array($i, $_delcol))
{
@ -72,14 +70,18 @@
// Reset Mode to display...
$this->editmode = false;
$this->layout = $layout;
// Save the fields_inc values in Session and User Preferences...
$data = array('fields_inc'=>$this->fields_inc);
$data = array('fields_inc'=>$this->fields_inc,'layout'=>$layout);
$phpgw->session->appsession('session_data','log',$data);
$phpgw->preferences->read_repository();
$phpgw->preferences->delete('log','fields_inc');
$phpgw->preferences->add('log','fields_inc',$this->fields_inc);
$phpgw->preferences->delete('log','layout');
$phpgw->preferences->add('log','layout',$this->layout);
$phpgw->preferences->save_repository();
}
@ -92,6 +94,7 @@
{
$this->fields_inc = $data['fields_inc'];
$this->layout = $data['layout'];
}
else
{
@ -101,7 +104,9 @@
{
$fields_inc = $phpgw_info['user']['preferences']['log']['fields_inc'];
$this->fields_inc = $fields_inc;
$phpgw->session->appsession('session_data','log',array('fields_inc',$fields_inc));
$layout = $phpgw_info['user']['preferences']['log']['layout'];
$this->layout = $layout;
$phpgw->session->appsession('session_data','log',array('fields_inc'=>$fields_inc,'layout'=>$layout));
}
else
{
@ -119,12 +124,14 @@
'log_msg_file',
'log_msg_line'
);
$this->layout[]= array( 0, 1, 2, 3, 4, 5, 6, 7, 8, 9);
$this->layout[]= array( 0, 1, 2, 3, 4, 5, 6, 7, 10, 11);
// Store defaults in session data...
$phpgw->session->appsession ('session_data',
'log',
array ('fields_inc'
=>$this->fields_inc
array ('fields_inc'=>$this->fields_inc,
'layout'=>$this->layout
)
);
@ -188,60 +195,65 @@
};
$this->t->set_file(array('log_list_t' => 'log.tpl'));
/*
// --------------------------------- nextmatch ---------------------------
$left = $this->nextmatchs->left('/admin/log.php',$this->start,$this->this->total_records,'&menuaction=admin.uilog.list_log');
$right = $this->nextmatchs->right('/admin/log.php',$this->start,$this->this->total_records,'&menuaction=admin.uilog.list_log');
$this->t->set_var('left',$left);
$this->t->set_var('right',$right);
$this->t->set_var('search_log',$this->nextmatchs->show_hits($this->bolog->total_records,$this->start));
// -------------------------- end nextmatch ------------------------------------
*/
// -------------------------- Layout Description -------------------------------
$phycols = array('2%', '2%', '15%', '10%', '15%', '2%', '20%', '2%', '7%', '25%');
// -------------------------- end Layout Description ---------------------------
// Get list of Possible Columns
$header = $this->bolog->get_error_cols_e();
// Set Table formating parameters
$header['_table_parms']='width="98%", bgcolor="D3DCFF" border="0"';
// Describe table layout...
$header['#phycols'] = $phycols;
$header['#layout'] = $this->layout;
// Set User Configured List of columns to show
$header['_cols']= $this->fields_inc;
// Set Table formating parameters
$header['#table_parms']=array('width'=>"98%", 'bgcolor'=>"000000", 'border'=>"0");
// Set Header formating parameters
$header['#head_parms']=array('bgcolor'=>"D3DCFF");
// Column Log_ID
$header['log_id']['parms_hdr'] = 'align="center", width="2%"';
$header['log_id']['title'] = 'Id';
$header['log_id']['parms'] = 'align="center"';
$header['log_id']['#parms_hdr'] = array('align'=>"center");
$header['log_id']['#title'] = 'Id';
$header['log_id']['align'] = 'center';
// Column Log_Severity
$header['log_severity']['parms_hdr'] = 'align="center", width="2%"';
$header['log_severity']['title'] = 'S';
$header['log_severity']['parms'] = 'align="center"';
$header['log_severity']['#parms_hdr'] = array('align'=>"center");
$header['log_severity']['#title'] = 'S';
$header['log_severity']['align'] = 'center';
// Column Trans Date
$header['log_date_e']['title'] = 'Tans. Date';
$header['log_date_e']['parms'] = '';
$header['log_date_e']['#title'] = 'Tans. Date';
// Column Application
$header['log_app']['title'] = 'Application';
$header['log_app']['parms'] = '';
$header['log_app']['#title'] = 'App.';
// Column FullName
$header['log_full_name']['title'] = 'User';
$header['log_full_name']['parms'] = 'align="center"';
$header['log_full_name']['#title'] = 'User';
$header['log_full_name']['align'] = 'center';
// Column log_msg_seq_no
$header['log_msg_seq_no']['parms_hdr'] = 'align="center"';
$header['log_msg_seq_no']['title'] = 'Sno';
$header['log_msg_seq_no']['parms'] = 'align="center"';
$header['log_msg_seq_no']['#parms_hdr'] = array('align'=>"center");
$header['log_msg_seq_no']['#title'] = 'Sno';
$header['log_msg_seq_no']['align'] = 'center';
// Column log_msg_seq_no
$header['log_msg_date_e']['title'] = 'TimeStamp';
$header['log_msg_severity']['title'] = 'S';
$header['log_msg_code']['title'] = 'Code';
$header['log_msg_text']['title'] = 'Error Msg';
$header['log_msg_date_e']['#title'] = 'TimeStamp';
$header['log_msg_severity']['#title'] = 'S';
$header['log_msg_severity']['align'] = 'center';
$header['log_msg_code']['#title'] = 'Code';
$header['log_msg_text']['#title'] = 'Error Msg';
$header['log_msg_file']['#title'] = 'File';
$header['log_msg_line']['#title'] = 'Line';
// Set up Grouping, Suppression...
$header['_groupby']=array('log_id'=>1);
@ -262,17 +274,17 @@
function format_row($rno, $row)
{
switch($row[$this->column['log_severity']]['value'])
switch($row['log_severity']['value'])
{
case 'D': $row[$this->column['log_severity']]['bgcolor'] = 'D3DCFF'; break;
case 'I': $row[$this->column['log_severity']]['bgcolor'] = 'C0FFC0'; break;
case 'W': $row[$this->column['log_severity']]['bgcolor'] = 'FFFFC0'; break;
case 'E': $row[$this->column['log_severity']]['bgcolor'] = 'FFC0C0'; break;
case 'F': $row[$this->column['log_severity']]['bgcolor'] = 'FF0909'; break;
case 'D': $row['log_severity']['bgcolor'] = 'D3DCFF'; break;
case 'I': $row['log_severity']['bgcolor'] = 'C0FFC0'; break;
case 'W': $row['log_severity']['bgcolor'] = 'FFFFC0'; break;
case 'E': $row['log_severity']['bgcolor'] = 'FFC0C0'; break;
case 'F': $row['log_severity']['bgcolor'] = 'FF0909'; break;
}
switch($row[$this->column['log_msg_severity']]['value'])
switch($row['log_msg_severity']['value'])
{
case 'D': $color = 'D3DCFF'; break;
case 'I': $color = 'C0FFC0'; break;
@ -285,7 +297,7 @@
{
if (substr($fld,0,7) == 'log_msg')
{
$row[$cno]['bgcolor'] = $color;
$row[$fld]['bgcolor'] = $color;
}
else
{