0) {
// get the correct display for the inbox view
if($vars['page_view'] == "inbox") {
$counter = 0;
foreach($vars['entity'] as $message) {
if ($message->owner_guid == get_loggedin_userid() || $message->toId == get_loggedin_userid()) {
//make sure to only display the messages that have not been 'deleted' (1 = deleted)
if($message->hiddenFrom != 1){
// check to see if the message has been read, if so, set the correct container class
if($message->readYet == 1){
echo "
";
}else{
echo "
";
}
// get the icon of the user who owns the message
$from = get_entity($message->fromId);
echo "
"; // close the message container
}//end of hiddenFrom if statement
} // end of user check
$counter++;
if ($counter == $limit) break;
}//end of for each loop
}//end of inbox if statement
// get the correct display for the sentbox view
if($vars['page_view'] == "sent") {
$counter = 0;
foreach($vars['entity'] as $message) {
//make sure to only display the messages that have not been 'deleted' (1 = deleted)
if($message->hiddenTo != 1){
//get the correct user entity
$user = get_entity($message->toId);
echo "
";
//get the icon for the user the message was sent to
echo "