display_contents($session); $numberOfItems = $cart->num_items($session); //----------------------------------------------------------------------- //----------------------------------------------------------------------- // USPS Configuration $USPS_debug = false; // Display the XML response from USPS $USPS_international = false; // Whether or not to support international shipping $USPS_url = "http://Production.ShippingAPIs.com/ShippingAPI.dll"; $USPS_username = "593THREA1827"; $USPS_password = "103XM40PO661"; $USPS_domestic_ZipOrigination = "85034"; $USPS_domestic_Service = "Priority"; $USPS_domestic_Container = "Flat Rate Envelope"; $USPS_domestic_Size = "REGULAR"; $USPS_intl_MailType = "Package"; // Calculate Weight // 1 pound = 16 ounces $USPS_shirt_ounces = 0; $USPS_numberOfShirts = 0; $USPS_numberOfPrints = 0; $USPS_numberOfAll = 0; for ($i=0; $i < $numberOfItems; $i++) { if ($contents['style'][$i] != "NULL" && $contents['color'][$i] != "NULL" && $contents['size'][$i] != "NULL") { //Item is NOT a print.. $USPS_shirt_ounces += ($contents['quantity'][$i] * ($lookUpWeights[$contents['size'][$i]])); //Gather some stats $USPS_numberOfShirts += 1; $USPS_numberOfAll += 1; } else { //Gather some stats $USPS_numberOfPrints += 1; $USPS_numberOfAll += 1; } } $USPS_shirt_pounds = floor($USPS_shirt_ounces / 16); $USPS_shirt_ounces = $USPS_shirt_ounces % 16; $city = ""; $state= ""; //----------------------------------------------------------------------- //----------------------------------------------------------------------- // This section calculates the shipping information. Interfaces with // the USPS site via XML. $validShipping = false; // If this stays false, there will be a "Pending" price on the form, and // the Checkout button will be unavailable. Instead the $zipError value // will be displayed in it's place. $USofA = true; $zipError = ""; $displayZipCode = "style=\"display:\""; //This is used when a country is selected, it hides the zip code menu on load $displayButton = "Submit Zip Code"; //This is used if a country is selected, it will be "zip code" with US, and "Country" with //Every other country... //Build out the Country selection box, defaulted to the US being selected. $countryDropDown = ""; foreach($lookUpCountry as $key => $value) { if ($key == "US") { $countryDropDown .= ""; } else { $countryDropDown .= ""; } } $sql = "SELECT * FROM accounting_zipcode WHERE session='" . $session . "'"; $zip_result = $db->getRow($sql); if (is_object($zip_result)) { // Either a zipcode, or a country is associated with this session.. $shipping_zip = "value='" . $zip_result->zipcode . "'"; if ($USPS_numberOfPrints < $USPS_numberOfAll) { // A shirt exists in the cart... (not just prints) if ($zip_result->country == "US") { //If it's the US, interface with the USPS domestic shipping API using zipcodes //$shipping_zip = "value='" . $zip_result->zipcode . "'"; //------------------------------------------------------------------------------------------------------------------- // SHIPPING SECTION //------------------------------------------------------------------------------------------------------------------- $data_string = "API=RateV2&XML="; $data_string .= ""; $data_string .= "" . $USPS_domestic_Service . ""; $data_string .= "" . $USPS_domestic_ZipOrigination . ""; $data_string .= "" . $zip_result->zipcode . ""; $data_string .= "" . $USPS_shirt_pounds . ""; $data_string .= "" . $USPS_shirt_ounces . ""; $data_string .= "" . $USPS_domestic_Container . ""; $data_string .= "" . $USPS_domestic_Size . ""; $data_string .= ""; $data_string .= ""; // Get a CURL handle $curl_handle = curl_init (); // Tell CURL the URL of the recipient script curl_setopt ($curl_handle, CURLOPT_URL, $USPS_url); // This section sets various options. See http://www.php.net/manual/en/function.curl-setopt.php curl_setopt ($curl_handle, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($curl_handle, CURLOPT_POST, 1); curl_setopt ($curl_handle, CURLOPT_POSTFIELDS, $data_string); // Perform the POST and get the data returned by the server. $result = curl_exec ($curl_handle) or die ("There has been a CURL_EXEC error"); // Close the CURL handle curl_close ($curl_handle); if ($USPS_debug) echo "" . htmlentities($result) . ""; if (!ereg("Error", $result)) { //If there was no error, display the shipping rate. $split = split("", $result); $result = split("", $split[1]); $Shipping_price = $result[0]; $validShipping = true; } else { //If an error was encountered, get the error description from the USPS $split = split("", $result); $result = split("", $split[1]); $zipError = "USPS Response: " . $result[0]; $Shipping_price = 0; } //------------------------------------------------------------------------------------------------------------------- // TAX SECTION //------------------------------------------------------------------------------------------------------------------- // ExcelFile($filename, $encoding); $data = new Spreadsheet_Excel_Reader(); // Set output Encoding. $data->setOutputEncoding('CP1251'); $data->read('../script/taxrates.xls'); error_reporting(E_ALL ^ E_NOTICE); for ($i = 2; $i <= $data->sheets[0]['numRows']; $i++) { $tempData[trim($data->sheets[0]['cells'][$i][2])] = trim($data->sheets[0]['cells'][$i][8]); } //print_r($zipLookup); foreach ($tempData as $zips=>$rate) { $ziplist = explode(",", $zips); foreach ($ziplist as $key) { $zipLookup[trim($key)] = trim($rate); } } /* print ""; print_r($zipLookup); print "

"; print "Matching zipcode " . $zip_result->zipcode . " with rate: " . $zipLookup[$zip_result->zipcode] . "
"; print "
"; */ $taxRate = $zipLookup[$zip_result->zipcode]; } else { //Country was NOT the United States, so interface with the International Shipping // API from the USPS $displayZipCode = "style=\"display:none;\""; $displayButton = "Submit Country"; $USofA = false; $data_string = "API=IntlRate&XML="; $data_string .= ""; $data_string .= "" . $USPS_shirt_pounds . ""; $data_string .= "" . $USPS_shirt_ounces . ""; $data_string .= "" . $USPS_intl_MailType . ""; $data_string .= "" . $lookUpCountry[$zip_result->country] . ""; $data_string .= ""; $data_string .= ""; // Get a CURL handle $curl_handle = curl_init (); // Tell CURL the URL of the recipient script curl_setopt ($curl_handle, CURLOPT_URL, $USPS_url); // This section sets various options. See http://www.php.net/manual/en/function.curl-setopt.php curl_setopt ($curl_handle, CURLOPT_FOLLOWLOCATION, 1); curl_setopt ($curl_handle, CURLOPT_RETURNTRANSFER, 1); curl_setopt ($curl_handle, CURLOPT_POST, 1); curl_setopt ($curl_handle, CURLOPT_POSTFIELDS, $data_string); // Perform the POST and get the data returned by the server. $result = curl_exec ($curl_handle) or die ("There has been a CURL_EXEC error"); // Close the CURL handle curl_close ($curl_handle); if ($USPS_debug) echo "" . htmlentities($result) . ""; if (!ereg("Error", $result)) { //If there was no error, display the shipping rate. $split = split("", $result); $result_price = split("", $split[1]); $Shipping_price = $result_price[0]; $validShipping = true; } else { //If an error was encountered, get the error description from the USPS $split = split("", $result); $result = split("", $split[1]); $zipError = "USPS Response: " . $result[0]; $Shipping_price = 0; } // Build out the country dropdown, overwrites the default US dropdown.. $countryDropDown = ""; foreach($lookUpCountry as $key => $value) { if ($key == $zip_result->country) { $countryDropDown .= ""; } else { $countryDropDown .= ""; } } } } else { //The Only items in the cart are prints.. $validShipping = true; $Shipping_price = 0; } } else { $Shipping_price = 0; } //----------------------------------------------------------------------- ?> ThreadCult - Shopping Cart _ _

0) { ?> 0) { ?> \n"; print "\n"; if ($cartPrint) { print "\n"; } else { print "\n"; } print "\n"; print "\n"; if (!$cartPrint) { print "\n"; print "\n"; print "\n"; print "\n"; } else { print "\n"; } } ?>

"; } //Print the prices print ""; print ""; print ""; } ?>
"; print ""; //Print the Quantity print ""; print ""; print ""; print ""; print ""; print ""; //Print the small thumbnail, and the shirt name print ""; //Print the thumbnail of the style, and the style, color, and size print ""; } else { //$useColor = $contents['color'][$i]; //if ($useColor == "s_blk") $useColor = "s_black"; //$image = "../../images/shirtstyles/" . $useColor . ".jpg"; $image = "../../images/shirts/styles/" . $contents['scimage'][$i]; print "
REMOVE QTY. DESIGN / PREVIEW DESCRIPTION UNIT PRICE TOTAL
"; $sql = "SELECT mfname, lfname FROM shirts WHERE code='" . $contents['code'][$i] . "'"; $result = $db->getRow($sql); $largeimage = "../../images/shirts/large/" . $result->lfname; $mediumimage = "../../images/shirts/medium/" . $result->mfname; print ""; print ""; print ""; print "" . stripslashes($contents['name'][$i]) . "
"; if ($cartPrint == "1") { print "
Full sized print exclusively from ThreadCult, autographed by the artist
"; print ""; print ""; print ""; print "
Style:
" . $contents['style'][$i] . "
Color:
" . $contents['color'][$i] . "
Size:
" . $contents['size'][$i] . "
$ " . number_format($contents['price'][$i], 2, '.', ',') . "$ " . number_format($contents['total'][$i], 2, '.', ',') . "
 
Expect 8-15 days for delivery Subtotal: $
Questions? CLICK HERE for our FAQ USPS Shipping & Handling:
0) { ?> 0) { ?> Total: $
Country:
Domestic shipping only. Sales tax will be applied during checkout for all Colorado orders.
>Enter Zip Code For Shipping: >

 

 

 
YOU MIGHT ALSO LIKE THESE OTHER THREADCULT CREATIONS!
 
'" . $contents['code'][$i] . "'"; } $sql = "SELECT shirts.insertnum, shirts.code, shirts.name, shirts.background, shirts.price, shirts.sprice, shirts.sfname, shirts.onsale, shirtbg.small FROM shirts, shirtbg WHERE shirts.active='1' AND shirts.background = shirtbg.id" . $sqlExclude . " ORDER BY shirts.insertnum DESC"; $result = $db->getAll($sql); $numResults = count($result); $random = range(0, $numResults - 1); shuffle($random); print ""; if ($numResults < 4) $max = $numResults; else $max = 4; if ($max == 0) { print ""; } for ($i=0; $i < $max; $i += 1) { print ""; } print ""; ?>
I dare you to buy all " . $numberOfItems . " shirts"; print "
"; print ""; print ""; print " "; print ""; print ""; print " "; print ""; print ""; print " "; print ""; print "
"; print " "; print " "; print " "; print " "; print "
"; print " "; $size = getimagesize("../images/shirts/small/" . $result[$random[$i]]->sfname); $shirtImage = explode(".", $result[$random[$i]]->sfname); print ""; print " "; print "
"; print "
"; print " "; print "
"; print ""; if ($result[$random[$i]]->onsale == 0) $price = number_format($result[$random[$i]]->price / 100, 2, '.', ','); else $price = number_format($result[$random[$i]]->sprice / 100, 2, '.', ','); print stripslashes($result[$random[$i]]->name) . "
$ " . $price; print "
"; print "
"; print "
"; print "
 
For an alternate route to Journal of Emerging finance market.There are affordable cars, and then there are cars that offer thrilling performance. Rarely do the two ever converge, but Japanese automake mazada.new impreza 2008 Impreza Photos | Subaru News, Articles, Road Tests, Test Drives, Comparisons, Concepts.manhattan beach toyota Los Angeles Toyota Dealer, is a New & Pre-Owned Toyota dealership, with OEM Toyota parts and professional Toyota service.fashions like you need it: make fashion trends work for you, get fashion on a budget, dress for your body and look great for special occasions.How to treat a fragile man without health insurance man.gadget store buy drinking games, gadgets & boys toys. Shop online for fun gifts, presents, gizmos and games.Review and road test of the Ford mondeo.Discover new cars from hyndai.Find new kia.suzuki vehicles on our Car Finder Buy and Sell New Used Cars Philippines 2009 site.Your Suzuki Motorcycle Info Source: Suzuki Motorcycles Used Dual Purpose Motorcycles For Sale · View 2008 Suzuki Models 2008 suzuki.auto manufacturer site with information on the Sedona, Sorento, Sportage, Optima, Spectra and Rio vehicles www kia.Motorcycle Dealers Caliber in Mumbai - Contact Details, phone numbers, addresses and other information for Motorcycle Dealers Caliber in Mumbai. dealerships caliber.Electronics and gadgets are two words that fit very well together. The electronic gadget.2001 excursion highlights from Consumer Guide Automotive. Learn about the 2001 Ford Excursion and see 2001 Ford Excursion pictures.ford Motor Company maker of cars, trucks, SUVs and other vehicles. View our vehicle showroom, get genuine Ford parts and accessories, find dealers.The soul of Formula M: reloaded. Combining motorsport capabilities with everyday driving. The bmw coupe.Vintage and Classic Car Club of India vintage car.Welcome - Feel Good Natural health stores.Welcome to mazdas global website.Locate the nearest Chevrolet Car chevy dealermark2 savage magazine problems

mark2 savage magazine problems

for why one finds

regular basis

animal charities

secondary education

Honda car

great way

successful webmaster

having sex

good condition

apartment building

virtual office

grammar school

spread open

which she held

Pacific Sunwears

Kansas City

kept staring

best way

possessed of supernormal

good news

Greater London

loved seeing

sex life

web page

high blood

female dog

hard cock

electoral college

bottom line

tongue over

hard nipples

exhibitions group

long way

best way

of health care

public school

its a priorism

double seat

great deal

pet foods

Natural Nutritionist

Success Secrets

while agreeing

internet marketing

and sometimes

consider buying

presidential system

reoccurring problem

Kill the Director

Austral Mortgage

cock still

take place

preconstruction investing

adult dog

computer network

about the persons

gradually made perfect

long way

wild instrument kept

long distance

called stimulated emission

shape equate hot miss

man said

Louis Vuitton

body language

dog training

pickup truck

fully nude models

what we do think

mature thumbnail sex pics

off plan

stories blackmail sex

could feel

crossdressers gay transvestites

would like

stephanie kramer topless

making love

hairy pussy magazine

daily basis

blowjobs with foreskin

car bike

british film stars nude

wide range

hairy female nudist pictures

iPod video

carmen hayes naked pictures

fatty acids

naked granny cartoons

Western Australia

chicks in booty shorts

side effects

discrete sex greenville nc

look good

ilion new york topless

open spaces

erotic traveler show

The Communications Decency

heroin use in teens

discounted price

tila tequila bang

written records of island

urdu sex story

cum covered

cheap erotic massage chicago

best friend

joan staley nude

deep breath

shemales london

dog food

korean porn downloads

Russian President

nude mateur amateur

raw food

women flashing boobs vagina

arms around

mature nl

this first visit was

dirty sex teens

language groups

suitcase voyeur

toll booths

teen short short model

animal protein

kristen dalton naked

pet foods

bunny ranch girls nude

pet products

naked chinese girls fucking

look like

bound and gaged hentai

popular culture

i love you nikhilesh

positive cash

sam dick

sexual dysfunction

eva mendes nude porn

sexual dysfunction

kevin zegers nude

video games

baby face teen galleries

good quality

barbra eden topless

United States

gigagaleries nude coed

break lady yard rise

easy sluts movies

Shih Tzu

jenifer anastin naked

music files

indian nude housewives

web site

bus fuck

Great Barrier

licking pusy

middle school

hijab slut

side effects

rockettes nude

commercial mortgage

martha macisaac naked

fairy tale

porn star soleil

United States

nadia bjorlin naked

Pacific Sunwears

porn by tila tequila

various subjects

skye blu teeny blonde

bad credit

porn star fiona flaps

unlimited music

men in sheer pantyhose

bad credit

jessica clement sex story

Sri Lankan

trish coren naked

not to be the best policy

nylon lycra tights

because it takes

asian mixed race porn

Australian Capital

recipe for stuffed chicken breast

John Dewey