Beispiel #1
0
 $max_rows = $fmf->max_rows;
 $offset = $fmf->offset;
 $fh = new ForumHTML($f);
 if (!$fh || !is_object($fh)) {
     exit_error(_('Error'), _('Error getting new ForumHTML'));
 } elseif ($fh->isError()) {
     exit_error(_('Error'), $fh->getErrorMessage());
 }
 forum_header(array('title' => $fm->getSubject(), 'forum_id' => $forum_id));
 $title_arr = array();
 $title_arr[] = _('Message') . ': ' . $msg_id;
 echo $GLOBALS['HTML']->listTableTop($title_arr);
 echo "<tr class=\"tablecontent\"><td>\n";
 $fa = new ForumAdmin();
 if ($f->userIsAdmin()) {
     echo $fa->PrintAdminMessageOptions($msg_id, $group_id, 0, $forum_id);
     // 0 in thread id because that tells us to go back to message.php instead of forum.php
 }
 echo _('BY') . ': ' . $fm->getPosterRealName() . ' (' . util_make_link_u($fm->getPosterName(), $fm->getPosterID(), $fm->getPosterName()) . ')<br />';
 echo _('DATE') . ': ' . date(_('Y-m-d H:i'), $fm->getPostDate()) . '<br />';
 $am = new AttachManager();
 echo $am->PrintHelperFunctions();
 echo $am->PrintAttachLink($fm, $group_id, $forum_id) . '<br/>';
 echo _('SUBJECT') . ': ' . $fm->getSubject() . '<p>&nbsp;</p>';
 if (!strstr('<', $fm->getBody())) {
     echo nl2br($fm->getBody());
     //backwards compatibility for non html messages
 } else {
     echo $fm->getBody();
 }
 echo "</td></tr>";
    function showNestedMessage(&$msg)
    {
        /*
        accepts a database result handle to display a single message
        		in the format appropriate for the nested messages
        */
        global $HTML, $group_id;
        /*
        See if this message is new or not
        If so, highlite it in bold
        */
        if ($this->Forum->getSavedDate() < $msg->getPostDate()) {
            $bold_begin = '<strong>';
            $bold_end = '</strong>';
        } else {
            $bold_begin = '';
            $bold_end = '';
        }
        $am = new AttachManager();
        $fa = new ForumAdmin();
        $msgforum =& $msg->getForum();
        $ret_val = '
		<table border="0">
			<tr>
				<td class="tablecontent" nowrap="nowrap">';
        if ($msgforum->userIsAdmin()) {
            $ret_val .= $fa->PrintAdminMessageOptions($msg->getID(), $group_id, $msg->getThreadID(), $msgforum->getID());
        }
        $ret_val .= _('By:') . ' ' . util_make_link_u($msg->getPosterName(), $msg->getPosterID(), $msg->getPosterRealName()) . '<br />
';
        $ret_val .= $am->PrintAttachLink($msg, $group_id, $msgforum->getID()) . '
					<br />' . util_make_link('/forum/message.php?msg_id=' . $msg->getID() . '&group_id=' . $group_id, html_image('ic/msg.png', "10", "12", array("border" => "0")) . $bold_begin . $msg->getSubject() . ' [ ' . _('reply') . ' ]' . $bold_end) . ' &nbsp; ' . '<br />' . date(_('Y-m-d H:i'), $msg->getPostDate()) . '
				</td>
			</tr>
			<tr>
				<td>
					';
        if (!strstr($msg->getBody(), '<')) {
            $ret_val .= nl2br($msg->getBody());
            //backwards compatibility for non html messages
        } else {
            $ret_val .= $msg->getBody();
        }
        $ret_val .= '
				</td>
			</tr>
		</table>';
        return $ret_val;
    }