function trace_PM()
{
global $db, $user, $config, $cache;
$trace = $db->get_traced_pms($user->id);
$i = '';
$j = '';
while ($t = $trace->row())
{
$to = $cache->query("get_username_from_id", array($t->to_id));
$to = $to[0];
//$to = $db->get_username_from_id($t->to_id);
//$to = $to->row();
$date = date($config->timestamp1, $t->date);
if ($t->read == '0')
{
$delete = "Recall message";
$i .= "
| {$to->name} | {$t->title} | $date | $delete |
";
}
else
{
$j .= "| {$to->name} | {$t->title} | $date{$status} |
";
}
}
echo "Unread messages
";
echo "";
echo "| To | Title | Date | Recall |
";
echo $i;
echo "
";
echo "Read Messages
";
echo "";
echo "| To | Title | Date | Recall |
";
echo $j;
echo "
";
return true;
}