set_var("CHARSET", CHARSET); $template_name = "page.html"; $page_code = get_param("page"); $currency = get_currency(); $html_title = ""; $meta_description = ""; $meta_keywords = ""; if (strlen($page_code)) { $sql = "SELECT * FROM " . $table_prefix . "pages WHERE is_showing=1 AND page_code=" . $db->tosql($page_code, TEXT); $db->query($sql); if ($db->next_record()) { // meta data $html_title = get_translation($db->f("meta_title")); $meta_description = get_translation($db->f("meta_description")); $meta_keywords = get_translation($db->f("meta_keywords")); $is_html = $db->f("is_html"); $page_type = $db->f("page_type"); $page_url = $db->f("page_url"); $page_path = $db->f("page_path"); if (strlen($page_url)) { header("HTTP/1.0 302 OK"); header("Status: 302 OK"); header("Location: " . $page_url); exit; } $page_title = get_translation($db->f("page_title")); $page_body = get_translation($db->f("page_body")); $page_body = strlen($page_path) ? @join("", file($page_path)) : $page_body; $page_body = get_currency_message($page_body, $currency); if (get_setting_value($settings, "php_in_custom_pages", 0)) { eval_php_code($page_body); } if (!strlen($meta_description)) { $meta_description = $page_body; } if ($page_type == 2) { $template_name = "page_popup.html"; } $page_body = $is_html ? $page_body : "