<?php
//<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
//sigurnost:
if (!defined('SIGURICA')) die('Nedozvoljen pristup!');
if ($prava_pristup_admin!=1) die('Nedozvoljen pristup!');
?>
<script type="text/javascript">
$(document).ready(function(){
//JQuery ready is quicker than onload
$(".stripeMe tr").mouseover(function() {$(this).addClass("over");}).mouseout(function() {$(this).removeClass("over");});
$(".stripeMe tr:even").addClass("alt");
});
</script>
<div id="main_content">
<h1>zadnjih 50 logina u webadmin:</h1>
<?php
$sql99 = "select * from b7_login order by id desc limit 50";
$rez99 = mysql_query($sql99, $conn);
if ($rez99) $num99=mysql_num_rows($rez99);
if ($num99>0) {
	$cur99=1;
	?>
	<table class="stripeMe" cellpadding="5" cellspacing="1" border="0">
    <tr>
    <th>Red. br.</th>
    <th>Username</th>
    <th>Password</th>
    <th>Login time</th>
    <th>IP adress</th>
    </tr>
    <?php
	while ($num99>=$cur99) {
		$row99=mysql_fetch_array($rez99);	
		$rez_user = $row99[1];
		$rez_pass = $row99[2];
		$log_time = $row99[3];
		$ip_adress = $row99[4];
		?>
        <tr>
        <td><?php echo $cur99; ?></td>
        <td><?php echo $rez_user; ?></td>
        <td><?php echo $rez_pass; ?></td>
        <td><?php echo date_format(date_create($log_time), 'd.m.Y - H:i:s') ?></td>
        <td><?php echo $ip_adress; ?></td>        
       	</tr>
        <?php
		$cur99++;
	}
	?>
    </table>
    <?php	
}
?>
</div>