<?
////////////////////////////////////////////////////////////////////////
/*SMI - SHOUTcast Management Interface
A web based shoutcast server management program
Founding Author: Scott D. Harvanek <scotth@sourcemirrors.org>

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.

This program 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 this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.*/
////////////////////////////////////////////////////////////////////////
?>
<table border="0" width="400px">
	<tr>
                <td align="left">
                <b>Event Log</b><br>
                </td>
        </tr>
</table>

<table border="0" class="events">
<?
$i = "0";
if(useraccess($_SESSION['username']) < "4"){
        $db = dbConnect();
	$rows = $db->getRows('events', array('event_user', $_SESSION['username']), '*', 'id', 'DESC LIMIT 10');
	//$query = mysql_query('SELECT * from events WHERE event_user='.$_SESSION['username'].' ORDER BY id DESC LIMIT 10');
}else{
	$db = dbConnect();
	$rows = $db->getRows('events', '', '*', 'id', 'DESC LIMIT 10');
	//$query = mysql_query('SELECT * from events ORDER BY id DESC LIMIT 10');
}
if (isset($rows)) {
  foreach ($rows as $row) {
    $bgcolor = ($i++ & 1) ? '#FFFFFF' : '#cfcfcf';
    echo "<tr bgcolor='$bgcolor'>\n";
?>
		<td align="left" width="25px" valign="top">
                <i>
                <?echo $row[0];?>
                </i>
                </td>
		<td align="left" width="150px" valign="top">
		<i>
		<?echo $row[4];?> - 
		</i>
		</td>
		<td align="left">
		<i>
		<?echo $row[2];?>
		</i>
		</td>
	</tr>
<?
     }
}
?>
</table>

