$receiverName .= '; ' . $modulemessages->msgGroupNameSplit($row['user']); } else { $user = new User($gDb, $gProfileFields, $row['user']); $receiverName .= '; ' . $user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME'); } } $receiverName = substr($receiverName, 2); $message = new TableMessage($gDb, $row['msg_id']); ++$key; $messageAdministration = $part1 . $key . '&name=' . urlencode($message->getValue('msg_subject')) . '&database_id=' . $message->getValue('msg_id') . $part2; // @ptabaden: changed order and icons, changed order, delted two cols $table->addRowByArray(array('<h4 id="mail_timestamp">' . $message->getValue('msg_timestamp') . '</h4><div id="mail" class="table_group"><h4 id="mail_receiver">' . $gL10n->get('MSG_OPPOSITE') . ': ' . $receiverName . '</h4><h3 id="event_title"><a ' . $href . $message->getValue('msg_id') . '">' . $message->getValue('msg_subject') . '</a></h3></div>', $messageAdministration), 'row_message_' . $key); } } // find all unread PM messages $statement = $modulemessages->msgGetUserUnread($gCurrentUser->getValue('usr_id')); if (isset($statement)) { while ($row = $statement->fetch()) { if ($row['msg_usr_id_sender'] == $gCurrentUser->getValue('usr_id')) { $user = new User($gDb, $gProfileFields, $row['msg_usr_id_receiver']); } else { $user = new User($gDb, $gProfileFields, $row['msg_usr_id_sender']); } $receiverName = $user->getValue('FIRST_NAME') . ' ' . $user->getValue('LAST_NAME'); $message = new TableMessage($gDb, $row['msg_id']); ++$key; $messageAdministration = $part1 . $key . '&name=' . urlencode($message->getValue('msg_subject')) . '&database_id=' . $message->getValue('msg_id') . $part2; $table->addRowByArray(array('<a class="admidio-icon-link" ' . $href . $message->getValue('msg_id') . '"> <img class="admidio-icon-info" src="' . THEME_PATH . '/icons/pm.png" alt="' . $gL10n->get('PMS_MESSAGE') . '" title="' . $gL10n->get('PMS_MESSAGE') . '" />', '<a ' . $href . $message->getValue('msg_id') . '">' . $message->getValue('msg_subject') . '</a>', $receiverName, $message->getValue('msg_timestamp'), $messageAdministration), 'row_message_' . $key, array('style' => 'font-weight: bold')); } }