if (!$use_tabs) { $t->sparse("title_desc", false); } if ($full_description) { if ($php_in_full_desc) { eval_php_code($full_description); } $t->set_var("full_description", $full_description); $t->parse("description", false); $parse_description = true; } else { $t->set_var("description", ""); } if (strlen($notes)) { if ($php_in_notes) { eval_php_code($notes); } $t->set_var("notes", $notes); $t->parse("notes_block", false); $parse_description = true; } if (!$hide_weight_details && $weight > 0) { if (strpos($weight, ".") !== false) { while (substr($weight, strlen($weight) - 1) == "0") { $weight = substr($weight, 0, strlen($weight) - 1); } } if (substr($weight, strlen($weight) - 1) == ".") { $weight = substr($weight, 0, strlen($weight) - 1); } $t->set_var("weight", $weight . " " . $weight_measure);
$sql .= $related_type_order; $db->query($sql); $t->set_var("ri_rows", ""); $ri_columns = get_setting_value($vars, $related_columns_param, 1); $t->set_var("ri_column", 100 / $ri_columns . "%"); $ri_number = 0; while ($db->next_record()) { $ri_number++; $item_id = $db->f("item_id"); $item_type_id = $db->f("item_type_id"); $item_name = get_translation($db->f("item_name")); $a_title = get_translation($db->f("a_title")); $friendly_url = $db->f("friendly_url"); $short_description = get_translation($db->f("short_description")); if ($php_in_short_desc) { eval_php_code($short_description); } if ($friendly_urls && $friendly_url) { $details_url = $friendly_url . $friendly_extension; } else { $details_url = "product_details.php?item_id=" . urlencode($item_id); } $t->set_var("item_id", $item_id); $t->set_var("item_name", $item_name); $t->set_var("a_title", htmlspecialchars($a_title)); $t->set_var("details_url", $details_url); $t->set_var("short_description", $short_description); $t->set_var("ri_tax_price", ""); $t->set_var("ri_tax_sales", ""); $stock_level = $db->f("stock_level"); $use_stock_level = $db->f("use_stock_level");
$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_title = get_currency_message($page_title, $currency); $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); } $page_body = $is_html ? $page_body : "<div align=\"justify\">" . nl2br(htmlspecialchars($page_body)) . "</div>"; } else { //$page_title = "Page Error"; //$page_body = "<div align=\"center\"><font color=\"red\"><b>Page '" . htmlspecialchars($custom_page_code) . "' was not found</b></font></div>"; header("Location: index.php"); exit; } } else { header("Location: index.php"); exit; } if ($page_type == 2) { $t = new VA_Template($settings["templates_dir"]); $t->set_file("main", "page_popup.html");