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

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

<?php
	if(!empty($list))
	{
		echo '<form method="POST" action="/admin/index/" onsubmit="return confirm(\'Vykonat akci??\')">';
		echo '<select name="action">
			<option value="1">povolit</option>
			<option value="2">zakazat</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/detail/'.$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 nove firmy!';
?>
<?php include_once('footer.php'); ?>
