Prv8 Shell
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/jackjohn/public_html/cgi-bin/sc/templates/includes/classy_pa_minicart.js
<script type="text/javascript">
function DisplayMiniCart(name,style) {
  var cookies=document.cookie;  //read in all cookies
  var start = cookies.indexOf(name + "=");  //set start to beginning of ss_cart cookie
  var cartvalues = "";
  var linecount = 0;
  var start1;
  var end1;
  var tmp;
 if (style != "DetailLite")
 {
  document.write("<div class=\"MiniCart\">\n");
  if (style == "Detail")
  {
    document.write("<table class=\"MiniCart\" border=\"0\">\n");
    document.write("<tr>\n");
    document.write("<th class=\"MiniCart\" colspan=\"3\">");
    document.write("<a class=\"MiniCart\" href=\"[-- SHOPPING_CART_URL --]\"[-- IF ANALYTICS_MULTI_DOMAIN --] onclick=\"__utmLinker(this.href);\"[-- END_IF --]>");
    document.write("[-- STORE.SC_YourShoppingCart --]");
    document.write("<\/a><\/th><\/tr>");
  }
  else if (style == "Summary")
  {
    document.write("<a class=\"MiniCart\" href=\"[-- SHOPPING_CART_URL --]\"[-- IF ANALYTICS_MULTI_DOMAIN --] onclick=\"__utmLinker(this.href);\"[-- END_IF --]>");
    document.write("[-- STORE.SC_YourShoppingCart --]");
    document.write("<\/a>");
  }
  else
  {
    document.write("<a class=\"MiniCart\" href=\"[-- SHOPPING_CART_URL --]\"[-- IF ANALYTICS_MULTI_DOMAIN --] onclick=\"__utmLinker(this.href);\"[-- END_IF --]>");
    document.write("<img src=\"[-- OUTPUT_DIRECTORY_URL --]/[-- VAR.Media --]/cart-[-- VAR.MiniCartColor --].gif\" border=\"0\" name=\"cart\" align=\"top\">");
    document.write("<\/a>&nbsp;");
  }
  if (start == -1)  //No cart cookie
  {
    if (style == "Detail")
    {
      document.write("<\/table>\n");
    }
    else if ((style == "ItemCount") || (style == "Subtotal"))
    {
      document.write("<a class=\"MiniCart\" href=\"[-- SHOPPING_CART_URL --]\"[-- IF ANALYTICS_MULTI_DOMAIN --] onclick=\"__utmLinker(this.href);\"[-- END_IF --]>");
      document.write("0 [-- STORE.Items --]");
      document.write("<\/a>&nbsp;");
      document.write("<\/div>\n");
    }
    else
    {
      document.write("<\/div>\n");
    }      
  }
  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) && (style != "Detail"))  // Total Quantity of Items
        {
          tmp = cartvalues.substring(start,end);
          colon = tmp.indexOf(":", 0);
          if ((style == "ItemCount") || (style == "Subtotal"))
          {
            document.write("<a class=\"MiniCart\" href=\"[-- SHOPPING_CART_URL --]\"[-- IF ANALYTICS_MULTI_DOMAIN --] onclick=\"__utmLinker(this.href);\"[-- END_IF --]>");
          }

          if (style == "Summary")
          {
            document.write("<br>[-- STORE.Contains --] <b>");
          } 
          document.write(tmp.substring(colon+1,end - start));
          if (style == "Summary")
          {
            document.write("<\/b>");
          }
          if ((tmp.substring(colon+1,end - start)) == 1 )
          {
            document.write(" [-- STORE.Item --]");
          }
          else
          {
            document.write(" [-- STORE.Items --]");
          }
          if (style == "ItemCount")
          {
            document.write("<\/a>");
          } 
          else if (style == "Subtotal")
          {
            document.write(": ");
          } 
          else if (style == "Summary")
          {
            document.write("<br>[-- STORE.Subtotal --]: <b>");
          }
        }

        if (linecount == 3)  // Product Subtotal
        {
          if ((style == "Subtotal") || (style == "Summary"))
          {
            tmp = cartvalues.substring(start,end);
            colon = tmp.indexOf(":", 0);
            document.write(tmp.substring(colon+1,end - start));
            if (style == "Summary") 
            {
              document.write("<\/b>");
            }
            else
            {
            document.write("<\/a>");
            }
          }
          else if (style == "Detail")
          {
            start1 = start;
            end1 = end;
            document.write("<tr><td class=\"MiniCartHead\">[-- STORE.Qty --]<\/td>");
            document.write("<td class=\"MiniCartHead\">[-- STORE.Product --]<\/td>");
            document.write("<td class=\"MiniCartHead\">[-- STORE.Price --]<\/td><\/tr>\n");
          }
        }

        if ((linecount > 3) && (style == "Detail"))  // individual products
        {
          tmp = cartvalues.substring(start,end);
          colon = tmp.indexOf(":", 0);
          document.write("<tr>");
          document.write("<td class=\"MiniCartQty\">");
          document.write(tmp.substring(0,colon));
          document.write("<\/td><td class=\"MiniCartProduct\">");
          colon2 = tmp.indexOf(":", colon+1);
          document.write(tmp.substring(colon2+1,end - start));
          document.write("<\/td><td class=\"MiniCartPrice\">");
          document.write(tmp.substring(colon+1,colon2));
          document.write("<\/td><\/tr>\n");
        }
        start = end;
      }
      else
        break;
    } // end while loop

    //close minicart HTML
    if (style != "Detail")
    {
      document.write("<\/div>\n");
    }
    else
    {
      document.write("<tr>");
      document.write("<td class=\"MiniCartSubtotalText\" colspan=\"2\">Subtotal<\/td>");
      document.write("<td class=\"MiniCartSubtotal\">");
      tmp = cartvalues.substring(start1,end1);
      colon = tmp.indexOf(":", 0);
      document.write(tmp.substring(colon+1,end1 - start1));
      document.write("<\/td>");
      document.write("<\/tr>");
      document.write("<\/table>\n");
      document.write("<\/div>\n");
    }
  }
 }
 else  // DetailLite
 {
   document.write("<div class=\"MiniCart\">\n");
   document.write("<table class=\"MiniCart\" border=\"0\">\n");
   document.write("<tr>\n");
   document.write("<th class=\"MiniCart\" colspan=\"2\">");
   document.write("<a class=\"MiniCart\" href=\"[-- SHOPPING_CART_URL --]\"[-- IF ANALYTICS_MULTI_DOMAIN --] onclick=\"__utmLinker(this.href);\"[-- END_IF --]>");
   document.write("<img class=\"MiniCart\" src=\"[-- OUTPUT_DIRECTORY_URL --]/[-- VAR.Media --]/cart-[-- VAR.MiniCartColor --].gif\" border=\"0\">&nbsp;");
   document.write("[-- STORE.SC_YourShoppingCart --]");
   document.write("<\/a><\/th><\/tr>");
   
   if (start == -1)  //No cart cookie
   {
     document.write("<\/table>\n");
   }
   else // Cart Cookie
   {
     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 == 3)  // Product Subtotal
         {
           start1 = start;
           end1 = end;
         }

         if (linecount > 3)  // individual products
         {
           tmp = cartvalues.substring(start,end);
           colon = tmp.indexOf(":", 0);
           document.write("<tr>");
           document.write("<td class=\"MiniCartProduct\">");
           colon2 = tmp.indexOf(":", colon+1);
           document.write(tmp.substring(colon2+1,end - start));
           document.write("<\/td><td class=\"MiniCartPrice\">");
           document.write(tmp.substring(colon+1,colon2));
           document.write("<\/td><\/tr>\n");
         }
         start = end;
       }
       else
         break;
     } // end while loop

     //close minicart HTML
     document.write("<tr>");
     document.write("<td class=\"MiniCartSubtotalText\">Subtotal<\/td>");
     document.write("<td class=\"MiniCartSubtotal\">");
     tmp = cartvalues.substring(start1,end1);
     colon = tmp.indexOf(":", 0);
     document.write(tmp.substring(colon+1,end1 - start1));
     document.write("<\/td>");
     document.write("<\/tr>");
     document.write("<\/table>\n");
     document.write("<\/div>\n");
   }
 }
}
</script>

haha - 2025