<?php
// ----------------------------------------------------------------------
// Copyright (C) 2007 by GREGORY LE BRAS
// ----------------------------------------------------------------------
// LICENSE
//
// This file is part of ODCNMS - Open DataCenter Network Management System
//
// ODCNMS 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.
//
// Foobar is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Foobar; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
// ----------------------------------------------------------------------
// Original Author of file: GREGORY LE BRAS - http://www.odcnms.org/
// ----------------------------------------------------------------------
?>
<div class="title"><img src="images/history.gif" alt="History" align="bottom"> <?php echo TXT_HISTORY; ?></div>
<table class="subtitle" width="100%" cellspacing="0" cellpadding="0">
<tr>
<td width="100%"><h4><img src="images/login.gif" alt="Login" align="top"> 100 <?php echo TXT_LATEST; ?> <?php echo TXT_LOGS; ?></h4></td>
<tr>
</table>
<table class="sortable list" id="sortable" width="100%" cellspacing="2" cellpadding="3">
<tr class="list_title">
<td><?php echo TXT_DATE; ?></td>
<td><?php echo TXT_TIME; ?></td>
<td><?php echo TXT_ACTION; ?></td>
<td><?php echo TXT_WHAT; ?></td>
<td><?php echo TXT_DESCRIPTION; ?></td>
</tr>
<?php
$list1 = "list1";
$list2 = "list2";
$line_count = 0;
$request=mysql_query("SELECT id FROM $name_table_users WHERE username=\"$login\"") or die ("ERROR!");
while($tmp_request=mysql_fetch_array($request))
{
$request2=mysql_query("SELECT * FROM $name_table_users_log WHERE users_id=\"$tmp_request[id]\" ORDER BY id DESC LIMIT 10") or die ("ERROR!");
while($tmp_request2=mysql_fetch_array($request2))
{
$line_color = ($line_count % 2) ? $list1 : $list2;
?>
<tr class="<?php echo "$line_color"; ?>">
<td><?php echo $tmp_request2['date']; ?></td>
<td><?php echo $tmp_request2['time']; ?></td>
<td><?php echo $tmp_request2['action']; ?></td>
<td><?php echo $tmp_request2['what']; ?></td>
<td><?php echo $tmp_request2['description']; ?></td>
</tr>
<?php
$line_count++;
}
}
?>
</table>
<br><center><a href="javascript:history.go(-1);"><?php echo TXT_BACK; ?></a></center>