コード例 #1
0
ファイル: admin_export.php プロジェクト: nisargadesign/CES
    if ($table_name == $table_prefix . "items") {
        $admin_downloadable_export_url = new VA_URL("admin_export.php", false);
        $admin_downloadable_export_url->add_parameter("table", CONSTANT, "items_files");
        $admin_downloadable_export_url->add_parameter("id", REQUEST, "id");
        $admin_downloadable_export_url->add_parameter("ids", REQUEST, "ids");
        $admin_downloadable_export_url->add_parameter("category_id", REQUEST, "category_id");
        $admin_downloadable_export_url->add_parameter("s", REQUEST, "s");
        $admin_downloadable_export_url->add_parameter("sl", REQUEST, "sl");
        $admin_downloadable_export_url->add_parameter("ss", REQUEST, "ss");
        $admin_downloadable_export_url->add_parameter("ap", REQUEST, "ap");
        $t->set_var("admin_downloadable_export_url", $admin_downloadable_export_url->get_url());
        $t->parse("products_other_links", false);
    }
} else {
    if ($table == "orders") {
        $admin_orders_url = new VA_URL("admin_orders.php", false);
        $admin_orders_url->add_parameter("ids", REQUEST, "ids");
        $admin_orders_url->add_parameter("page", REQUEST, "page");
        $admin_orders_url->add_parameter("s_on", REQUEST, "s_on");
        $admin_orders_url->add_parameter("s_ne", REQUEST, "s_ne");
        $admin_orders_url->add_parameter("s_kw", REQUEST, "s_kw");
        //Customization by Vital
        $admin_orders_url->add_parameter("s_coupon", REQUEST, "s_coupon");
        $admin_orders_url->add_parameter("s_sku", REQUEST, "s_sku");
        $admin_orders_url->add_parameter("s_category", REQUEST, "s_category");
        //END customization
        $admin_orders_url->add_parameter("s_sd", REQUEST, "s_sd");
        $admin_orders_url->add_parameter("s_ed", REQUEST, "s_ed");
        $admin_orders_url->add_parameter("s_os", REQUEST, "s_os");
        $admin_orders_url->add_parameter("s_ci", REQUEST, "s_ci");
        $admin_orders_url->add_parameter("s_si", REQUEST, "s_si");
コード例 #2
0
if ($secure_user_login) {
    $user_login_url = $secure_url . get_custom_friendly_url("user_login.php");
    $forgot_password_url = $secure_url . get_custom_friendly_url("forgot_password.php");
} else {
    $user_login_url = $site_url . get_custom_friendly_url("user_login.php");
    $forgot_password_url = $site_url . get_custom_friendly_url("forgot_password.php");
}
if ($secure_user_profile) {
    $user_profile_url = $secure_url . get_custom_friendly_url("user_profile.php");
} else {
    $user_profile_url = $site_url . get_custom_friendly_url("user_profile.php");
}
$user_home_url = $site_url . get_custom_friendly_url("user_home.php");
$return_page = get_param("return_page");
if (!$is_ssl && $secure_user_login && $secure_redirect && preg_match("/^https/i", $secure_url)) {
    $ulu = new VA_URL($user_login_url, false);
    $ulu->add_parameter("return_page", REQUEST, "return_page");
    $ulu->add_parameter("type_error", REQUEST, "type_error");
    header("Location: " . $ulu->get_url());
    exit;
}
//Customization by Vital - login redirection
if (!strlen($return_page) && isset($_SERVER['HTTP_REFERER']) && (strpos($_SERVER['HTTP_REFERER'], $site_url) !== false || strpos($_SERVER['HTTP_REFERER'], $secure_url) !== false)) {
    $return_page = $_SERVER['HTTP_REFERER'];
}
//END customization -  - login redirection
if (!strlen($return_page)) {
    $return_page = $user_home_url;
}
$t->set_var("login_desc", $login_desc);
$t->set_var("user_login_href", $user_login_url);
コード例 #3
0
 $sql = " SELECT si.cart_item_id, si.item_id, si.item_name, si.price, st.type_name, si.quantity, si.quantity_bought, si.date_added, i.friendly_url, i.small_image, i.small_image_alt, i.a_title ";
 $sql .= " FROM ((" . $table_prefix . "saved_items si ";
 $sql .= " LEFT JOIN " . $table_prefix . "saved_types st ON st.type_id=si.type_id) ";
 $sql .= " LEFT JOIN " . $table_prefix . "items i ON i.item_id=si.item_id) ";
 $sql .= " WHERE si.user_id=" . $db->tosql($_COOKIE['wishlist_user_id'], INTEGER);
 $sql .= " AND si.cart_id=0 ";
 $sql .= $s->order_by;
 $db->query($sql);
 if ($db->next_record()) {
     $t->parse("sorters", false);
     $t->set_var("no_records", "");
     $t->set_var("wishlist_message", "<p>Here is a list of the items you have selected.</p>Your wishlist is saved on this browser on this computer only. If you want to see your wishlist from another computer please <a href=\"./user_login.php?return_page=" . urlencode($site_url . get_custom_friendly_url('user_wishlist.php')) . "\">login to save it</a>.<br /><br />");
     $cart_url = new VA_URL("user_wishlist.php", false);
     $cart_url->add_parameter("cart_item_id", DB, "cart_item_id");
     $cart_url->add_parameter("operation", CONSTANT, "add");
     $delete_url = new VA_URL("user_wishlist.php", false);
     $delete_url->add_parameter("cart_item_id", DB, "cart_item_id");
     $delete_url->add_parameter("operation", CONSTANT, "delete");
     do {
         $cart_item_id = $db->f("cart_item_id");
         $item_id = $db->f("item_id");
         $price = $db->f("price");
         $quantity = $db->f("quantity");
         $quantity_bought = $db->f("quantity_bought");
         $item_name = $db->f("item_name");
         $type_name = $db->f("type_name");
         $friendly_url = $db->f("friendly_url");
         $date_added = $db->f("date_added", DATETIME);
         $a_title = get_translation($db->f("a_title"));
         $t->set_var("cart_item_id", $db->f("cart_item_id"));
         $t->set_var("date_added", va_date($datetime_show_format, $date_added));
コード例 #4
0
ファイル: admin_orders.php プロジェクト: nisargadesign/CES
        $t->parse("update_status", false);
    }
    if (isset($permissions["remove_orders"]) && $permissions["remove_orders"] == 1) {
        $t->parse("remove_orders_button", false);
    }
}
if (strlen($orders_errors)) {
    $t->set_var("errors_list", $orders_errors);
    $t->parse("orders_errors", false);
}
if (strlen($recurring_success)) {
    $t->set_var("messages_list", $recurring_success);
    $t->parse("orders_messages", false);
}
if (strlen($where) && $total_records > 0) {
    $admin_export_filtered_url = new VA_URL("admin_export.php", true);
    $admin_export_filtered_url->add_parameter("table", CONSTANT, "orders");
    $admin_export_filtered_url->add_parameter("type", CONSTANT, "filtered");
    $t->set_var("admin_export_filtered_url", $admin_export_filtered_url->get_url());
    $t->set_var("total_filtered", $total_records);
    $t->parse("export_filtered", false);
}
if (isset($permissions["create_orders"]) && $permissions["create_orders"] == 1) {
    $t->parse("generate_recurring", false);
}
$sql = " SELECT exported_order_id FROM " . $table_prefix . "admins ";
$sql .= " WHERE admin_id=" . $db->tosql(get_session("session_admin_id"), INTEGER);
$exported_order_id = intval(get_db_value($sql));
$sql = " SELECT COUNT(*) FROM " . $table_prefix . "orders ";
$sql .= " WHERE order_id>" . $db->tosql($exported_order_id, INTEGER);
$total_new = get_db_value($sql);
コード例 #5
0
        if ($session_category_id && get_db_value("SELECT COUNT(*) FROM " . $table_prefix . "items_categories where item_id=" . $db->tosql($item_id, INTEGER) . " AND category_id=" . $session_category_id)) {
            $category_id = $session_category_id;
        }
        //END customization
    } else {
        $category_id = "0";
    }
}
$category_id = intval($category_id);
$t->set_var("products_href", get_custom_friendly_url("products.php"));
$t->set_var("list_href", get_custom_friendly_url("products.php"));
$t->set_var("details_href", get_custom_friendly_url("product_details.php"));
$t->set_var("top_category_name", PRODUCTS_TITLE);
$t->set_var("category_rss", "");
$list_page = get_custom_friendly_url("products.php");
$list_url = new VA_URL($list_page);
$categories_image = get_setting_value($vars, "categories_image");
if ($categories_type == 1 || $categories_type == 2) {
    if (file_exists("images/" . $settings["style_name"] . "/category_image.gif")) {
        $image_tree_top = "images/" . $settings["style_name"] . "/category_image.gif";
    } else {
        $image_tree_top = "images/category_image.gif";
    }
    $html_template = get_setting_value($block, "html_template", "block_categories_catalog.html");
    $t->set_file("block_body", $html_template);
    $t->set_var("catalog_sub", "");
    $t->set_var("catalog_sub_more", "");
    $t->set_var("catalog_rows", "");
    $t->set_var("catalog_top", "");
    $t->set_var("catalog_description", "");
    $categories_ids = VA_Categories::find_all_ids("c.parent_category_id=" . $db->tosql($category_id, INTEGER), VIEW_CATEGORIES_PERM);