<?php
/**
 * available values
 * taxonomies
 * nodes
 */
?>
<!--Table-->
<table>
	<tr>
		<th><?= t('Nazwa');?></th>
		<th><?= t('Email');?></th>
		<th><?= t('Kategoria');?></th>
		<th><?= t('Nazwa quizu');?></th>
		<th><?= t('Zwycięzca quizu/kategorii');?></th>
	</tr>
	<!--Category winners-->
	<?php foreach ($taxonomies as $term => $key): ?>
			<!--Users-->
			<?php foreach ($key as $user_key => $user): ?>
			<tr>
				<td><a href="user/<?= $user->uid ?>"><?= $user->name ?></a></td>
				<td><?= $user->mail ?></td>
				<td><?= $term ?></td>
				<td></td>
				<td><?= t('kategoria'); ?></td>
			</tr>
			<?php endforeach; ?>
	<?php endforeach; ?>
	<!--Nodes winners-->
	<?php foreach ($nodes as $nid => $key): ?>
		<?php foreach ($key as  $user_key => $element): ?>
			<tr>
				<td><a href="user/<?= $element['user']->uid ?>"><?= $element['user']->name ?></td>
				<td><?= $element['user']->mail ?></td>
				<td><?= $element['term'] ?></td>
				<td><a href="node/<?= $element['node']->nid ?>/edit"><?= $element['node']->title ?></a></td>
				<td><?= t('quiz'); ?></td>
			</tr>
		<?php endforeach; ?>
	<?php endforeach; ?>
</table>