<h1><?= ucfirst($this->localization['uzytkownicy']);?></h1>
<table class="news_data_table">
	<tr class="admin_table_header">
		<td>Login</td>
		<td><?= ucfirst($this->localization['imie']);?></td>
		<td><?= ucfirst($this->localization['nazwisko']);?></td>
		<td><?= ucfirst($this->localization['grupa']);?></td>
		<td><?= ucfirst($this->localization['aktywny']);?></td>
		<td><?= ucfirst($this->localization['edytuj']);?></td>
		<td><?= ucfirst($this->localization['usun']);?></td>
	</tr>
<?php
	foreach($users as $user){
		echo '<tr class="data_row">';
			echo '<td>'.$user['login'].'</td>';	
			echo '<td>'.$user['fname'].'</td>';	
			echo '<td>'.$user['lname'].'</td>';	
			echo '<td>'.$user['name'].'</td>';	
			if($user['active']){
				echo '<td>'.ucfirst($this->localization['aktywny']).'</td>';
			}else{
				echo '<td>'.ucfirst($this->localization['nieaktywny']).'</td>';
			}
			echo '<td>'.form_open('admin/edit_user/'.$user['idusers']).form_submit('submit', ucfirst($this->localization['edytuj'])).form_close().'</td>';
			echo '<td><input type="button" value="'.ucfirst($this->localization['usun']).'" onClick="if(window.confirm(\''.ucfirst($this->localization['czy_napewno_usunac']).'\')){window.location=\'/admin/delete_user/'.$user['idusers'].'\';}"></td>';
		echo '<tr>';
	}
?>
</table>