require_once("include/bittorrent.php"); dbconn(false); loggedinorreturn(); $res = do_mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location IN ('in', 'both')") or print(mysql_error()); $arr = mysql_fetch_row($res); $messages = $arr[0]; $res = do_mysql_query("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND location IN ('in', 'both') AND unread='yes'") or print(mysql_error()); $arr = mysql_fetch_row($res); $unread = $arr[0]; $res = do_mysql_query("SELECT COUNT(*) FROM messages WHERE sender=" . $CURUSER["id"] . " AND location IN ('out', 'both')") or print(mysql_error()); $arr = mysql_fetch_row($res); $outmessages = $arr[0]; stdhead( sprintf( _("Private page for %s"), $CURUSER["username"], false) ); if ($_GET["edited"]) { print("
/logout.php>= _('Logout')?> | /mytorrents.php>= _('My torrents')?> | /friends.php>= _('My users lists')?> |
';
printf( _('You have %u message(s) (%u new) in your %s inbox %s') , $messages, $unread, "","
");
if ($outmessages)
//print("and $outmessages message" . ($outmessages != 1 ? "s" : "") . " in your sentbox.\n
';
printf( _("Your %s inbox %s is empty,
"), "", '');
if ($outmessages)
printf( _("and you have %u message(s) in your %s sentbox %s") , $outmessages, "", ".\n