function authenticate($topic) { global $lang; global $is_auth; global $userdata; $is_auth = auth(AUTH_ALL, $topic->getForumId(), $userdata); if (!OUtils::isForumContributor()) { message_die(GENERAL_MESSAGE, $lang['Not_Moderator'], $lang['Not_Authorised']); } }
} else { $l_edited_by = ''; } // // Again this will be handled by the templating // code at some point // $row_color = !($i % 2) ? $theme['td_color1'] : $theme['td_color2']; $row_class = !($i % 2) ? $theme['td_class1'] : $theme['td_class2']; if ($i == 0) { $advertisement_file = 'templates/ad1.txt'; } elseif ($i == $total_posts - 1) { $advertisement_file = 'templates/ad2.txt'; } else { $advertisement_file = null; } if (!is_null($advertisement_file)) { $topic_advertisement = '<div style="margin-top: 0.5em; margin-bottom: 0.5em">' . file_get_contents($advertisement_file) . "</div>"; } else { $topic_advertisement = ''; } $template->assign_block_vars('postrow', array('ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class, 'POSTER_NAME' => $poster, 'POSTER_RANK' => $poster_rank, 'RANK_IMAGE' => $rank_image, 'POSTER_JOINED' => $poster_joined, 'POSTER_POSTS' => $poster_posts, 'POSTER_FROM' => $poster_from, 'POSTER_AVATAR' => $poster_avatar, 'POST_DATE' => $post_date, 'POST_SUBJECT' => $post_subject, 'MESSAGE' => $message, 'SIGNATURE' => $user_sig, 'EDITED_MESSAGE' => $l_edited_by, 'MINI_POST_IMG' => $mini_post_img, 'PROFILE_IMG' => $profile_img, 'PROFILE' => $profile, 'SEARCH_IMG' => $search_img, 'SEARCH' => $search, 'PM_IMG' => $pm_img, 'PM' => $pm, 'EMAIL_IMG' => $email_img, 'EMAIL' => $email, 'WWW_IMG' => $www_img, 'WWW' => $www, 'ICQ_STATUS_IMG' => $icq_status_img, 'ICQ_IMG' => $icq_img, 'ICQ' => $icq, 'AIM_IMG' => $aim_img, 'AIM' => $aim, 'MSN_IMG' => $msn_img, 'MSN' => $msn, 'YIM_IMG' => $yim_img, 'YIM' => $yim, 'EDIT_IMG' => $edit_img, 'EDIT' => $edit, 'QUOTE_IMG' => $quote_img, 'QUOTE' => $quote, 'IP_IMG' => $ip_img, 'IP' => $ip, 'DELETE_IMG' => $delpost_img, 'DELETE' => $delpost, 'L_MINI_POST_ALT' => $mini_post_alt, 'U_MINI_POST' => $mini_post_url, 'U_POST_ID' => $postrow[$i]['post_id'], 'TOPIC_ADVERTISEMENT' => $topic_advertisement)); display_post_attachments($postrow[$i]['post_id'], $postrow[$i]['post_attachment']); } if (OUtils::isForumContributor()) { $template->assign_block_vars('is_forum_contributor', array()); $template->assign_vars(array('SID' => $userdata['session_id'])); } include $phpbb_root_path . 'quick_reply.' . $phpEx; $template->pparse('body'); include $phpbb_root_path . 'includes/page_tail.' . $phpEx;