<?
		
		include './system/common.php';
		
 include './system/functions.php';
				
			include './system/user.php';
		
if(!$user OR $user['access'] < 2) {

	header('location: /');
		
exit;

}


		$title = 'Адми логи';    

include './system/h.php';

?>

<div class='title'><?=$title?></div>
 <div class='line'></div>

<?

		$max = 10;
	$count = mysql_result(mysql_query('SELECT COUNT(*) FROM `adm_logs`'),0);
	$pages = ceil($count/$max);
	 $page = _string(_num($_GET['page']));

		if($page > $pages) {
		
	 $page = $pages;
		
		}
	
		if($page < 1) {
		
	 $page = 1;
		
		}
		
	$start = $page * $max - $max;

if($count > 0) {

?>

<div class='menu'>
	<li><table width='100%' cellpadding='0' cellspacing='0'>
	<tr>
	<td width='18%'> Редактировали <td>
	<td width='10%'> Серебра </td>
	<td width='10%'> Золота </td>
	<td widgt='10%'> Уровень </td>
	<td widgt='10%'> Сила </td>
	<td widgt='10%'> Жизнь </td>
	<td widgt='10%'> Удача </td>
	<td widgt='10%'> Защита </td>
	<td widgt='10%'> Мана </td>
 </tr></table></li>
<?

$q = mysql_query('SELECT * FROM `adm_logs` ORDER BY `id` DESC LIMIT '.$start.', '.$max.'');

	while($row = mysql_fetch_array($q)) {



?>

<li><table width='100%' cellpadding='0' cellspacing='0'>
	<tr>
	<td width='18%'><?=$row['id_user']?> </td>
	<td width='10%'><?=$row['s']?> </td>
	<td width='10%'><?=$row['g']?> </td>
	<td width='10%'><?=$row['level']?> </td>
	<td width='10%'><?=$row['str']?> </td>
	<td width='10%'><?=$row['vit']?> </td>
	<td width='10%'><?=$row['agi']?> </td>
	<td width='10%'><?=$row['def']?> </td>
	<td width='10%'><?=$row['mana']?> </td>
	

 </tr></table></li>

<?

	}

?>

 <li class='no_b'><?=pages('/adm_logs.php?&')?></li>

</div>

<?

}
else
{

?>

<?

}


include './system/f.php';
?>