<?
session_start();
include("menu.php");
include("check.php");
include("forb.php");
include("post_menu.php");
?>
<?
$hent1 = mysql_query("SELECT * FROM post WHERE modtager = '$_SESSION[Brugernavn]' AND laest = 'nej'") or die(mysql_error());
$vis1 = mysql_num_rows($hent1);
?>
<?
$hent2 = mysql_query("SELECT * FROM post WHERE modtager = '$_SESSION[Brugernavn]' AND laest = 'ja'") or die(mysql_error());
$vis2 = mysql_num_rows($hent2);
?>
<?
$hent3 = mysql_query("SELECT * FROM post WHERE modtager = '$_SESSION[Brugernavn]'") or die(mysql_error());
$vis3 = mysql_num_rows($hent3);
print "<div align=right>$vis2 lęste | $vis1 ulęste | $vis3 ialt<br><a href=slet_al_post.php>Slet alle mine breve</a><hr></div>";
?>
<?
$hent = mysql_query("SELECT * FROM post WHERE modtager = '$_SESSION[Brugernavn]' ORDER BY id DESC") or die(mysql_error());
while($vis = mysql_fetch_array($hent)) {
?>
Brev fra <a href='profil.php?b=<? echo $vis[afsender]; ?>'><? echo $vis[afsender]; ?></a>. Sendt d.<? echo $vis[dato]; ?></b> - <a href="laes_post.php?id=<? echo $vis[ID]; ?>">Lęs brevet</a>
<?
if($vis[laest] == "ja") {
print " - Lęst";
}else{
print " - Ulęst";
}
?> - <a href="slet_post.php?id=<? echo $vis[ID]; ?>">Slet</a><br>
<?
}
?>