$css_file .= ".css"; } $t->set_var("CHARSET", CHARSET); $t->set_var("meta_language", $language_code); $t->set_var("site_url", $site_url); $t->set_var("secure_url", $secure_url); $t->set_var("absolute_url", $absolute_url); $t->set_var("css_file", $css_file); if (isset($current_page)) { $t->set_var("current_href", $current_page); } // add google analytics code to hidden blocks $google_analytics = get_setting_value($settings, "google_analytics", 0); $google_tracking_code = get_setting_value($settings, "google_tracking_code", ""); if ($google_analytics && $google_tracking_code) { $t->set_file("head_tag", "ga.html"); $t->set_var("google_tracking_code", $google_tracking_code); } if (isset($debug_mode) && $debug_mode) { $t->set_var("debug_buffer", $debug_buffer); } // check page settings id $sql = " SELECT cps.* "; $sql .= " FROM (" . $table_prefix . "cms_pages_settings cps "; $sql .= " INNER JOIN " . $table_prefix . "cms_pages cp ON cp.page_id=cps.page_id) "; if (isset($cms_ps_id) && strlen($cms_ps_id)) { $sql .= " WHERE cps.ps_id=" . $db->tosql($cms_ps_id, INTEGER); } else { $sql .= " WHERE cp.page_code=" . $db->tosql($cms_page_code, TEXT); $sql .= " AND cps.key_code='' AND cps.key_type='' "; if (isset($site_id) && $site_id != 1) {
include_once $root_folder_path . "includes/editgrid.php"; include_once $root_folder_path . "messages/" . $language_code . "/cart_messages.php"; include_once $root_folder_path . "messages/" . $language_code . "/download_messages.php"; include_once "./admin_common.php"; check_admin_security("products_settings"); // additional connection $dbs = new VA_SQL(); $dbs->DBType = $db_type; $dbs->DBDatabase = $db_name; $dbs->DBUser = $db_user; $dbs->DBPassword = $db_password; $dbs->DBHost = $db_host; $dbs->DBPort = $db_port; $dbs->DBPersistent = $db_persistent; $t = new VA_Template($settings["admin_templates_dir"]); $t->set_file("main", "admin_products_settings.html"); include_once "./admin_header.php"; $t->set_var("admin_href", "admin.php"); $t->set_var("admin_items_list_href", "admin_items_list.php"); $t->set_var("admin_products_settings_href", "admin_products_settings.php"); $t->set_var("admin_upload_href", "admin_upload.php"); $t->set_var("admin_select_href", "admin_select.php"); $t->set_var("admin_tax_rates_href", "admin_tax_rates.php"); $t->set_var("admin_column_code_href", "admin_column_code.php"); $t->set_var("hide_add_message", str_replace("{button_name}", ADD_TO_CART_MSG, HIDE_BUTTON_MSG)); $t->set_var("hide_view_message", str_replace("{button_name}", VIEW_CART_MSG, HIDE_BUTTON_MSG)); $t->set_var("hide_goto_message", str_replace("{button_name}", GOTO_CHECKOUT_MSG, HIDE_BUTTON_MSG)); $t->set_var("hide_wish_message", str_replace("{button_name}", ADD_TO_WISHLIST_MSG, HIDE_BUTTON_MSG)); $t->set_var("hide_shipping_message", str_replace("{button_name}", SHIPPING_CALCULATOR_MSG, HIDE_BUTTON_MSG)); $t->set_var("date_edit_format", join("", $date_edit_format)); $full_image_url = get_setting_value($settings, "full_image_url", 0);
$s_sti = get_param("s_sti"); $s_rn = get_param("s_rn"); // registration number $s_ap = get_param("s_ap"); // approved $s_pi = get_param("s_pi"); // product id $type = get_param("type"); // to separate filtered and all requests) $s = trim(get_param("s")); $sc = get_param("sc"); $sl = get_param("sl"); $ss = get_param("ss"); $ap = get_param("ap"); $t = new VA_Template($settings["admin_templates_dir"]); $t->set_file("main", "admin_export.html"); include_once "./admin_header.php"; include_once "./admin_footer.php"; $t->set_var("admin_select_href", "admin_select.php"); $t->set_var("admin_export_href", "admin_export.php"); $t->set_var("admin_items_list_href", "admin_items_list.php"); $t->set_var("admin_users_list_href", "admin_newsletter_users.php"); $admin_export_custom_url = new VA_URL("admin_export_custom.php", true, array("table")); $admin_export_custom_url->add_parameter("table", CONSTANT, $table); $t->set_var("admin_export_custom_url", $admin_export_custom_url->get_url()); $is_export = true; if ($table == "items" || $table == "items_files") { include_once "./admin_common.php"; check_admin_security("products_export"); if ($table == "items") { include_once "./admin_table_items.php";
{ global $write_to_file, $fp, $xml_string; if ($write_to_file) { fwrite($fp, $xml); } else { if ($echo_this) { echo $xml_string .= $xml; $xml_string = null; } else { $xml_string .= $xml; } } } if ($show_stats == 1) { $t = new VA_Template($settings["admin_templates_dir"]); $t->set_file("main", "admin_export_google_base.html"); $countries = array(NOT_SPECIFIED_GB, US_MSG_GB, UK_DE_FR_MSG_GB, JP_MSG_GB, GOOGLE_RECOMEND_GB); if ($error) { $t->set_var('error_msg', $error); $t->parse('block_error', false); $t->set_var('block_stats', ''); $t->set_var('feed_button', ''); } else { $t->set_var('block_error', ''); $t->set_var('gb_file_name', $google_base_filename); $t->set_var('country', $countries[$google_base_country]); $t->set_var('work_time', round($workTime, 3)); $t->set_var('path', trim($site_url, '/') . $google_base_save_path . $google_base_filename); if ($warning) { $t->set_var('mess_style', 'color:red;float:left;margin-bottom:4px;'); $t->set_var('mess_text', ERRORS_MSG);
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"); include_once "./header.php"; $t->set_var("page_title", $page_title); $t->set_var("page_body", $page_body); $t->pparse("main"); return; } $sql = " SELECT ps_id FROM " . $table_prefix . "cms_pages_settings "; $sql .= " WHERE key_code=" . $db->tosql($custom_page_id, TEXT); $sql .= " AND key_rule='custom'"; if (isset($site_id) && $site_id != 1) { $sql .= " AND (site_id=1 OR site_id=" . $db->tosql($site_id, INTEGER) . ") "; } else { $sql .= " AND site_id=1 "; } $cms_ps_id = get_db_value($sql);
$orders_currency = get_setting_value($settings, "orders_currency", 0); $permissions = get_permissions(); $operation = get_param("operation"); $orders_ids = get_param("orders_ids"); $status_id = get_param("status_id"); $orders_errors = ""; $recurring_errors = ""; $recurring_success = ""; if ($operation == "recurring") { include_once "./admin_orders_recurring.php"; if ($recurring_errors) { $orders_errors = $recurring_errors; } } $t = new VA_Template($settings["admin_templates_dir"]); $t->set_file("main", "admin_orders.html"); $t->set_var("date_edit_format", join("", $date_edit_format)); if ($operation == "update_status") { if (isset($permissions["update_orders"]) && $permissions["update_orders"] == 1) { if (strlen($orders_ids) && strlen($status_id)) { $ids = explode(",", $orders_ids); for ($i = 0; $i < sizeof($ids); $i++) { update_order_status($ids[$i], $status_id, true, "", $status_error); if ($status_error) { $orders_errors .= $status_error . "<br>"; } } } } else { $orders_errors .= NOT_ALLOWED_UPDATE_ORDERS_MSG; }