if (!defined('W2P_BASE_DIR')) { die('You should not call this file directly.'); } $sort = w2PgetParam($_REQUEST, 'sort', 'asc'); $forum_id = w2PgetParam($_REQUEST, 'forum_id', 0); $message_id = w2PgetParam($_REQUEST, 'message_id', 0); $perms =& $AppUI->acl(); if (!$perms->checkModuleItem('forums', 'view', $forum_id)) { $AppUI->redirect(ACCESS_DENIED); } $forum = new CForum(); $forum->load($forum_id); $project = new CProject(); $project->load($forum->forum_project); $messages = $forum->getMessages(null, $forum_id, $message_id, $sort); // get the prefered date format $df = $AppUI->getPref('SHDATEFORMAT'); $df .= ' ' . $AppUI->getPref('TIMEFORMAT'); $pdfdata = array(); $pdfhead = array('Date', 'User', 'Message'); foreach ($messages as $row) { // Find the parent message - the topic. if ($row['message_id'] == $message_id) { $topic = $row['message_title']; } $date = new w2p_Utilities_Date($AppUI->formatTZAwareTime($row['message_date'], '%Y-%m-%d %T')); $pdfdata[] = array($date->format($df), $row['contact_display_name'], '<b>' . $row['message_title'] . '</b>' . "\n" . $row['message_body']); } $font_dir = W2P_BASE_DIR . '/lib/ezpdf/fonts'; $temp_dir = W2P_BASE_DIR . '/files/temp';
<?php /* $Id: view_messages.php 1517 2010-12-05 08:07:54Z caseydk $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/forums/view_messages.php $ */ if (!defined('W2P_BASE_DIR')) { die('You should not access this file directly.'); } $AppUI->savePlace(); $sort = w2PgetParam($_REQUEST, 'sort', 'asc'); $viewtype = w2PgetParam($_REQUEST, 'viewtype', 'normal'); $hideEmail = w2PgetConfig('hide_email_addresses', false); $forum = new CForum(); $messages = $forum->getMessages($AppUI, $forum_id, $message_id, $sort); ?> <script language="javascript" type="text/javascript"> <?php if ($viewtype != 'normal') { ?> function toggle(id) { <?php if ($viewtype == 'single') { ?> var elems = document.getElementsByTagName('div'); for (var i=0, i_cmp=elems.length; i<i_cmp; i++) if (elems[i].className == 'message') { elems[i].style.display = 'none'; } document.getElementById(id).style.display = 'block'; <?php } elseif ($viewtype == 'short') { ?>