<?php include_once('header.php'); ?>

<h2><?=$nadpis?></h2>

<?php
	if(!empty($list))
	{
		echo '<fieldset><legend>Filter</legend>';
		echo '<form method="post"><input type="text" name="q">';
		echo '<input type="submit" value="filtrovat"></form></fieldset><br>';
		echo '<form method="POST" action="/admin/aktualizace/" onsubmit="return confirm(\'Vykonat akci??\')">';
		echo '<select name="action">
			<option value="0">-</option>
			<option value="3">smazat</option>
			</select>';
		echo '<input type="submit" value="Vykonat akci">';
		echo '<table width="100%"><tr><th width="20">Vyber</th><th>Nazev</th><th>Email</th><th>www</th><th>titulek</th></tr>';
		$i = 0;
		foreach($list as $v)
		{
			echo '<tr ';
			if($i % 2 == 0)echo 'style="background-color: #eeeeee;"';
			echo '><td><input type="checkbox" name="vyber[]" value="'.$v['id'].'"></td>';
			echo '<td xonmouseover="showPopUp('.$v['id'].')" xonmouseout="hidePopUp('.$v['id'].')"><a href="/admin/aktualizuj/'.$v['id'].'/"';
			if($v['status'] == 0)echo 'style="color: red;"';
			echo '>'.$v['nazev'].'</a><div id="'.$v['id'].'" class="popup">'.$v['popis'].'</div></div></td>';
			echo '<td>'.$v['email'].'</td>';
			echo '<td>'.$v['www'].'</td><td><b>'.$v['title'].'</b></td></tr>';
			$i++;
		}
		echo '</table></form>';
	}else echo 'Zadne aktualizace!';
?>
<?php include_once('footer.php'); ?>
