|
Server : Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/1.0.0-fips mod_auth_passthrough/2.1 mod_bwlimited/1.4 System : Linux server.jackjohnson.com 2.6.32-279.5.2.el6.x86_64 #1 SMP Fri Aug 24 01:07:11 UTC 2012 x86_64 User : jackjohn ( 502) PHP Version : 5.3.17 Disable Function : NONE Directory : /home/jackjohn/public_html/cgi-bin/sc/templates/includes/ |
Upload File : |
#Congruence Include File
#Copyright ShopSite inc. Design by Lauren
<script type="text/JavaScript">
var cookies=document.cookie; //read in all cookies
var start = cookies.indexOf("ss_cart_[-- STORE_Serial_Number --]=");
var cartvalues = "";
var linecount = 0;
var start1;
var end1;
var tmp;
// Start Output
if (start == -1) //No cart cookie
{
document.write("<a href=\"[-- SHOPPING_CART_URL --]\" style=\"text-decoration: underline;\">");
document.write("0 [-- STORE.Items --]");
document.write("<\/a> ");
}
else //cart cookie is present
{
start = cookies.indexOf("=", start) +1;
var end = cookies.indexOf(";", start);
if (end == -1)
{
end = cookies.length;
}
cartvalues = unescape(cookies.substring(start,end)); //read in just the cookie data
start = 0;
while ((start = cartvalues.indexOf("|", start)) != -1)
{
start++;
end = cartvalues.indexOf("|", start);
if (end != -1)
{
linecount++;
if (linecount == 2) // Total Quantity of Items
{
tmp = cartvalues.substring(start,end);
colon = tmp.indexOf(":", 0);
document.write("<a href=\"[-- SHOPPING_CART_URL --]\" style=\"text-decoration: underline;\">");
document.write(tmp.substring(colon+1,end - start));
if ((tmp.substring(colon+1,end - start)) == 1 )
{
document.write(" [-- STORE.Item --]");
}
else
{
document.write(" [-- STORE.Items --]");
}
document.write(": ");
}
if (linecount == 3) // Product Subtotal
{
tmp = cartvalues.substring(start,end);
colon = tmp.indexOf(":", 0);
document.write(tmp.substring(colon+1,end - start));
document.write("<\/a>");
}
start = end;
}
else
break;
}
}
</script>