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