/** * Function showPendingMessage * * @param object The message. * * @return returns the html output */ function showPendingMessage(&$msg) { global $HTML, $group_id; $am = new AttachManager(); $ret_val = $am->PrintHelperFunctions(); html_feedback_top(_('This is the content of the pending message')); $ret_val .= ' <table border="0"> <tr> <td class="tablecontent" nowrap="nowrap">' . _('By:') . $msg->getPosterRealName() . '<br /> '; $msgforum =& $msg->getForum(); $ret_val .= $am->PrintAttachLink($msg, $group_id, $msgforum->getID()) . ' <br /> ' . html_image('ic/msg.png', "10", "12", array("border" => "0")) . $bold_begin . $msg->getSubject() . $bold_end . ' ' . '<br />' . date(_('Y-m-d H:i'), $msg->getPostDate()) . ' </td> </tr> <tr> <td> ' . $msg->getBody() . ' </td> </tr> </table>'; return $ret_val; }
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> </p>'; if (!strstr('<', $fm->getBody())) { echo nl2br($fm->getBody()); //backwards compatibility for non html messages } else { echo $fm->getBody(); } echo "</td></tr>"; echo $GLOBALS['HTML']->listTableBottom(); /* Show entire thread */ echo '<br /><br /> <h3>' . _('Thread View') . '</h3>';
//create a pop-up select box showing options for max_row count $vals = array(25, 50, 75, 100); $texts = array(_('Show') . ' 25', _('Show') . ' 50', _('Show') . ' 75', _('Show') . ' 100'); $max_row_popup = html_build_select_box_from_arrays($vals, $texts, 'max_rows', $max_rows, false); //now show the popup boxes in a form $ret_val = ' <form action="' . getStringFromServer('PHP_SELF') . '" method="get"> <input type="hidden" name="set" value="custom" /> <input type="hidden" name="forum_id" value="' . $forum_id . '" /> <table border="0" width="33%"> <tr><td>' . $options_popup . '</td><td>' . $max_row_popup . '</td><td><input type="submit" name="submit" value="' . _('Change View') . '" /> </td></tr> </table></form> <p> </p>'; $am = new AttachManager(); $ret_val .= $am->PrintHelperFunctions(); if ($style == 'nested') { $msg_arr =& $fmf->nestArray($fmf->getNested()); if ($fmf->isError()) { echo $fmf->getErrorMessage(); } $rows = count($msg_arr["0"]); $avail_rows = $fmf->fetched_rows; if ($rows > $max_rows) { $rows = $max_rows; } $i = 0; while ($i < $rows && $total_rows < $max_rows) { $total_rows++; /* New slashdot-inspired nested threads,