<html>

<head>

	<link href="style.css" type="text/css" rel="stylesheet">

</head>

<div id="select" style="position: absolute; left: -200; top: -200; visibility: hidden;">
<div id="selecttext" style="background-color: #F4C63C; COLOR: #000000; font-family: Tahoma; font-size: 9pt;  BORDER-RIGHT: #000000 1px solid; BORDER-TOP: #000000 1px solid; BORDER-LEFT: #000000 1px solid; BORDER-BOTTOM: #000000 1px solid; POSITION: absolute">
</div>
</div>
<center><b>Ting:</b><center>
<hr>
<a href="index.php?vis=normale">Normale ting(GL)</a> - 
<a href="index.php?vis=specielle">Specielle ting</a> - 
<a href="index.php?vis=falske">Falske ting</a> -   
<a href="index.php?vis=nye">Nye ting</a> 
</center></center>
</table>
<hr>
<?
if($_GET[vis] == "" OR $_GET[vis] == "normale") {
include("mysql/mysql.php");
$hent = mysql_query("SELECT * FROM ting_avis WHERE type = 'normale' ORDER BY name ASC");
$antal_normale = mysql_num_rows($hent);
echo("Der er ialt <b>".$antal_normale."</b> normale ting!<br><br>");
$hent_ting = mysql_query("SELECT * FROM ting_avis WHERE type = 'normale' ORDER BY name ASC") or die(mysql_error());
while($vis = mysql_fetch_array($hent_ting)) {
print "<a href='vis_ting.php?id=$vis[id]'>$vis[name]</a><br> Slet: <a href="slet.php?id=<? echo $vis[id]; ?>"> <u>Tryk her!</u></a>";
	}
}
if($_GET[vis] == "specielle") {
include("mysql/mysql.php");
$hent = mysql_query("SELECT * FROM ting_avis WHERE type = 'specielle' ORDER BY name ASC");
$antal_spc = mysql_num_rows($hent);
echo("Der er ialt <b>".$antal_spc."</b> specielle ting!<br><br>");
$hent_ting = mysql_query("SELECT * FROM ting_avis WHERE type = 'specielle' ORDER BY name ASC") or die(mysql_error());
while($vis = mysql_fetch_array($hent_ting)) {
print "<a href='vis_ting.php?id=$vis[id]'>$vis[name]</a><br>Slet: <a href="slet.php?id=<? echo $vis[id]; ?>"> <u>Tryk her!</u></a>";
	}
}
if($_GET[vis] == "falske") {
include("mysql/mysql.php");
$hent = mysql_query("SELECT * FROM ting_avis WHERE type = 'falske' ORDER BY name ASC");
$antal_falske = mysql_num_rows($hent);
echo("Der er ialt <b>".$antal_falske."</b> falske ting!<br><br>");
$hent_ting = mysql_query("SELECT * FROM ting_avis WHERE type = 'falske' ORDER BY name ASC") or die(mysql_error());
while($vis = mysql_fetch_array($hent_ting)) {
print "<a href='vis_ting.php?id=$vis[id]'>$vis[name]</a><br>Slet: <a href="slet.php?id=<? echo $vis[id]; ?>"> <u>Tryk her!</u></a>";
	}
}
if($_GET[vis] == "nye") {
include("mysql/mysql.php");
$hent = mysql_query("SELECT * FROM ting_avis WHERE type = 'nye' ORDER BY name ASC");
$antal_nye = mysql_num_rows($hent);
echo("Der er ialt <b>".$antal_nye."</b> nye ting!<br><br>");
$hent_ting = mysql_query("SELECT * FROM ting_avis WHERE type = 'nye' ORDER BY name ASC") or die(mysql_error());
while($vis = mysql_fetch_array($hent_ting)) {
print "<a href='vis_ting.php?id=$vis[id]'>$vis[name]</a><br>Slet: <a href="slet.php?id=<? echo $vis[id]; ?>"> <u>Tryk her!</u></a>";
	}
}
?>
</body>

</html>