コード例 #1
0
ファイル: page_layout.php プロジェクト: nisargadesign/CES
<?php

/*
  ****************************************************************************
  ***                                                                      ***
  ***      ViArt Shop 4.0.5                                                ***
  ***      File:  page_layout.php                                          ***
  ***      Built: Fri Jan 28 01:45:24 2011                                 ***
  ***      Updated: Wed May 16 2012                                 ***
  ***      http://www.viart.com                                            ***
  ***                                                                      ***
  ****************************************************************************
*/
// initialize template class
$t = new VA_Template($settings["templates_dir"]);
// get and set global values
$site_url = get_setting_value($settings, "site_url", "");
$secure_url = get_setting_value($settings, "secure_url", "");
if ($is_ssl) {
    $absolute_url = $secure_url;
} else {
    $absolute_url = $site_url;
}
$parsed_url = parse_url($site_url);
$site_path = isset($parsed_url["path"]) ? $parsed_url["path"] : "/";
$css_file = "";
if (strlen(get_setting_value($settings, "style_name", ""))) {
    $css_file = $absolute_url;
    $css_file .= "styles/" . get_setting_value($settings, "style_name");
    if (strlen(get_setting_value($settings, "scheme_name", ""))) {
        $css_file .= "_" . get_setting_value($settings, "scheme_name");
コード例 #2
0
include_once $root_folder_path . "includes/record.php";
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));
コード例 #3
0
ファイル: admin_export.php プロジェクト: nisargadesign/CES
$s_cct = get_param("s_cct");
$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") {
コード例 #4
0
function write_to($xml, $echo_this = false)
{
    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;');
コード例 #5
0
ファイル: page.php プロジェクト: nisargadesign/CES
        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");
    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 ";
}
コード例 #6
0
ファイル: admin_orders.php プロジェクト: nisargadesign/CES
//END customization
$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;