#################################################################
## PHP Pro Bid v6.10 ##
##-------------------------------------------------------------##
## Copyright ©2007 PHP Pro Software LTD. All rights reserved. ##
##-------------------------------------------------------------##
#################################################################
session_start();
define ('IN_SITE', 1);
include_once ('includes/global.php');
include_once ('includes/class_formchecker.php');
include_once ('includes/functions_login.php');
include_once ('includes/functions_item.php');
include_once ('global_header.php');
(string) $message_content = null;
## all default content pages
$pages_array_src = array('help', 'news', 'faq', 'about_us', 'contact_us', 'terms', 'privacy', 'announcements');
$pages_array = array('help' => 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 .= '
' . 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; ?>