Esempio n. 1
0
        $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");
        $admin_orders_url->add_parameter("s_ex", REQUEST, "s_ex");
        $admin_orders_url->add_parameter("s_cct", REQUEST, "s_cct");
        $admin_orders_url->add_parameter("sort_ord", REQUEST, "sort_ord");
        $admin_orders_url->add_parameter("sort_dir", REQUEST, "sort_dir");
        $t->set_var("admin_orders_url", $admin_orders_url->get_url());
        //$t->parse("orders_path", false);
    }
}
$default_columns = "";
if ($table == "users") {
    $sql = " SELECT exported_user_fields FROM " . $table_prefix . "admins WHERE admin_id=" . $db->tosql(get_session("session_admin_id"), INTEGER);
    $default_columns = get_db_value($sql);
} else {
    if ($table == "newsletters_users") {
        $sql = " SELECT exported_user_fields FROM " . $table_prefix . "admins WHERE admin_id=" . $db->tosql(get_session("session_admin_id"), INTEGER);
        $default_columns = get_db_value($sql);
        //$t->parse("newsletters_path", false);
    } else {
        if ($table == "orders") {
            $sql = " SELECT exported_order_fields FROM " . $table_prefix . "admins WHERE admin_id=" . $db->tosql(get_session("session_admin_id"), INTEGER);
Esempio n. 2
0
} 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);
$t->set_var("user_home_href", get_custom_friendly_url("user_home.php"));
$t->set_var("user_profile_href", $user_profile_url);
$t->set_var("user_profile_url", $user_profile_url);
Esempio n. 3
0
 $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));
 $t->set_var("item_id", get_translation($item_id));
 $t->set_var("a_title", htmlspecialchars($a_title));
 $t->set_var("item_name", get_translation($db->f("item_name")));
 $t->set_var("type_name", get_translation($db->f("type_name")));
 $t->set_var("price", currency_format($price));
 $t->set_var("quantity", $quantity);
 $t->set_var("quantity_bought", $quantity_bought);
 $t->set_var("cart_url", $cart_url->get_url());
 $t->set_var("delete_url", $delete_url->get_url());
 if ($friendly_urls && strlen($friendly_url)) {
     $t->set_var("product_details_url", htmlspecialchars($friendly_url . $friendly_extension));
 } else {
     $product_link = get_custom_friendly_url("product_details.php") . "?item_id=" . $item_id;
     $t->set_var("product_details_url", htmlspecialchars($product_link));
 }
 $small_image = $db->f($image_field);
 $small_image_alt = get_translation($db->f($image_field_alt));
 if (!strlen($small_image)) {
     $image_exists = false;
     $small_image = $product_no_image;
 } elseif (!image_exists($small_image)) {
     $image_exists = false;
     $small_image = $product_no_image;
 } else {
Esempio n. 4
0
        $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);
if ($total_new > 0) {
    $t->set_var("exported_order_id", urlencode($exported_order_id));
    $t->set_var("total_new", $total_new);
     }
 }
 $is_next_record = $db->next_record();
 $is_new_top = $top_category_id != $db->f("top_category_id");
 if ($categories_type == 2) {
     if (intval($shown_sub_categories) >= $catalog_sub_number || $shown_sub_categories == 0) {
         if ($sub_category_id && (!$allowed_sub_categories_ids || !in_array($sub_category_id, $allowed_sub_categories_ids))) {
             $t->set_var("restricted_sub_class", " restrictedSubCategory");
             $t->sparse("restricted_sub_image", false);
         } else {
             $t->set_var("restricted_sub_class", "");
             $t->set_var("restricted_sub_image", "");
         }
         if ($friendly_urls && $sub_friendly_url) {
             $list_url->remove_parameter("category_id");
             $t->set_var("list_url", htmlspecialchars($list_url->get_url($sub_friendly_url . $friendly_extension)));
         } else {
             $list_url->add_parameter("category_id", CONSTANT, $sub_category_id);
             $t->set_var("list_url", htmlspecialchars($list_url->get_url($list_page)));
         }
         if ($category_id == $sub_category_id) {
             $t->set_var("class_sub_selected", "selectedsubCategory");
         } else {
             $t->set_var("class_sub_selected", "subCategory");
         }
         if ($is_next_record && !$is_new_top) {
             $t->parse("catalog_sub_separator", false);
         } else {
             $t->set_var("catalog_sub_separator", "");
         }
         $t->parse("catalog_sub", true);