function email_item($thread_id) { global $tp; $gen = new convert(); include_once e_PLUGIN . 'forum/forum_class.php'; $forum = new e107forum(); $thread_info = $forum->thread_get($thread_id, 0, 999); $thread_name = $tp->toHTML($thread_info[0]['thread_name'], TRUE); $text = "<b>" . $thread_name . "</b><br />\n\t" . $thread_info[0]['user_name'] . ", " . $gen->convert_date($thread_info[0]['thread_datestamp'], "forum") . "<br /><br />\n\t" . $tp->toHTML($thread_info[0]['thread_thread'], TRUE); $count = 1; unset($thread_info[0], $thread_info['head']); foreach ($thread_info as $reply) { $text .= "<br /><br />Re: <b>" . $thread_name . "</b><br />\n\t\t" . $reply['user_name'] . ", " . $gen->convert_date($reply['thread_datestamp'], "forum") . "<br /><br />\n\t\t" . $tp->toHTML($reply['thread_thread'], TRUE); } return $text; }
require_once HEADERF; $text = "<form action='" . e_PLUGIN . "forum/forum_viewtopic.php?" . e_QUERY . "' method='post'> <table style='width:100%'>\n\t\t\t<tr>\n\t\t\t<td style='width:50%' >\n\t\t\t" . LAN_415 . ": " . $thread_name . " <a href='" . e_PLUGIN . "forum/forum_viewtopic.php?" . $thread_id . ".post'><span class='smalltext'>" . LAN_420 . " </span>\n\t\t\t</a>\n\t\t\t</td>\n\t\t\t<td style='text-align:center;width:50%'>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td>" . LAN_417 . "<br />" . LAN_418 . "\n\t\t\t</td>\n\t\t\t<td style='text-align:center;'>\n\t\t\t<textarea cols='40' rows='10' class='tbox' name='report_add'></textarea>\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t<tr>\n\t\t\t<td colspan='2' style='text-align:center;'><br />\n\t\t\t<input type='hidden' name='e-token' value='" . e_TOKEN . "' />\n\t\t\t<input class='button' type='submit' name='report_thread' value='" . LAN_419 . "' />\n\t\t\t</td>\n\t\t\t</tr>\n\t\t\t</table>"; $ns->tablerender(LAN_414, $text, array('forum_viewtopic', 'report2')); } require_once FOOTERF; exit; } $pm_installed = $pref['pm_title'] ? TRUE : FALSE; $replies = $forum->thread_count($thread_id) - 1; if ($topic_from === 'last') { $pref['forum_postspage'] = $pref['forum_postspage'] ? $pref['forum_postspage'] : 10; $pages = ceil(($replies + 1) / $pref['forum_postspage']); $topic_from = ($pages - 1) * $pref['forum_postspage']; } $gen = new convert(); $thread_info = $forum->thread_get($thread_id, $topic_from - 1, $pref['forum_postspage']); if (intval($thread_info['head']['thread_forum_id']) == 0) { require_once HEADERF; $ns->tablerender(LAN_01, FORLAN_104, array('forum_viewtopic', '104')); require_once FOOTERF; exit; } $forum_info = $forum->forum_get($thread_info['head']['thread_forum_id']); if (!check_class($forum_info['forum_class']) || !check_class($forum_info['parent_class'])) { header("Location:" . e_PLUGIN . "forum/forum.php"); exit; } $forum->thread_incview($thread_id); define("e_PAGETITLE", LAN_01 . " / " . $tp->toHTML($forum_info['forum_name'], TRUE, 'USER_TITLE') . " / " . $tp->toHTML($thread_info['head']['thread_name'], TRUE, 'USER_TITLE')); //define("MODERATOR", (preg_match("/".preg_quote(ADMINNAME)."/", $forum_info['forum_moderators']) && getperms('A') ? TRUE : FALSE)); define("MODERATOR", $forum_info['forum_moderators'] != "" && check_class($forum_info['forum_moderators']));