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 ""; echo $i; echo "
ToTitleDateRecall
"; echo "

Read Messages

"; echo ""; echo ""; echo $j; echo "
ToTitleDateRecall
"; return true; }