MSG_HELP_TOPICS, 'news' => MSG_SITE_NEWS, 'faq' => MSG_FAQ_TITLE, 'about_us' => MSG_ABOUT_US, 'contact_us' => MSG_CONTACT_US, 'terms' => MSG_TERMS, 'privacy' => MSG_PRIVACY, 'announcements' => MSG_ANNOUNCEMENTS_TITLE); ## content pages that support multiple rows $content_pages_array = array('help', 'news', 'faq', 'announcements'); $addl_query = ($_REQUEST['topic_id']) ? "AND topic_id='" . $_REQUEST['topic_id'] . "'" : ''; $sql_select_pages = $db->query("SELECT topic_id, topic_name, topic_content FROM " . DB_PREFIX . "content_pages WHERE MATCH (topic_lang) AGAINST ('" . $session->value('site_lang') . "*' IN BOOLEAN MODE) AND page_handle='" . $_REQUEST['page'] . "' " . $addl_query . " ORDER BY topic_order ASC, reg_date DESC"); if (in_array($_REQUEST['page'], $pages_array_src)) { $message_header = $pages_array[$_REQUEST['page']]; } $message_content = '
'. ''; $counter = 0; while ($content_page = $db->fetch_array($sql_select_pages)) { if (in_array($_REQUEST['page'], array('custom_page'))) { $message_header = $content_page['topic_name']; } if (in_array($_REQUEST['page'], $content_pages_array)) { $message_content .= '
'. //'' . $content_page['topic_name'] . ' '. '' . $content_page['topic_name'] . ' '. '
'; } $style_display = (in_array($_REQUEST['page'], $content_pages_array)) ? 'none' : 'block'; $message_content .= '
' . $db->add_special_chars($content_page['topic_content']) . '
'; $counter++; } $topic_id = intval($_REQUEST['topic_id']); if ($_REQUEST['page'] == 'contact_us') { $user_details = $db->get_sql_row("SELECT name, email, username FROM " . DB_PREFIX . "users WHERE user_id='" . $session->value('user_id') . "'"); if (isset($_POST['form_contactus_send'])) { define ('FRMCHK_ITEM', 1); (int) $item_post = 1; $user_details = $_POST; $frmchk_details = $user_details; include('includes/procedure_frmchk_contactus.php'); $form_submitted = 0; if ($fv->is_error()) { $template->set('display_formcheck_errors', '' . $fv->display_errors() . ''); } else { $form_submitted = 1; ## send email to admin include('language/' . $setts['site_lang'] . '/mails/contact_us.php'); $message_content .= '

' . MSG_CONTACT_EMAIL_SENT_SUCCESS . '

'; } } if (!$form_submitted) { $template->set('user_details', $user_details); $template->set('topic_id', $topic_id); $session->set('pin_value', md5(rand(2,99999999))); $generated_pin = generate_pin($session->value('pin_value')); $pin_image_output = show_pin_image($session->value('pin_value'), $generated_pin); $template->set('pin_image_output', $pin_image_output); $template->set('generated_pin', $generated_pin); $message_content .= $template->process('contact_us.tpl.php'); } } $template->set('message_header', header5($message_header)); $template->set('message_content', $message_content); $template_output .= $template->process('single_message.tpl.php'); include_once ('global_footer.php'); echo $template_output; ?>