Welcome to Gourmet Lollipops

Are you bored of the same old candy and the same boring flavors? Then you have got to give gourmet lollipops a try! With so many exciting, delicious, and creative flavors to choose from, its like a new adventure every time! From Apple Cinnamon to Wild Cherry, you will never get bored.

Gourmet lollipops are the perfect long lasting fat-free snack when your get that craving to satisfy your sweet tooth. At 1.35 inches wide, each lollipop lasts up to an hour of sweet smooth deliciousness.
'; $body .= ""; $result = mysqli_query($mysqli, "select * from products where active=1"); while ($row = mysqli_fetch_array($result)) { $i++; $item .= ""; $item2 .= ""; if ($row['price'] > 24) { //$freeship = ' + Free Shipping'; } else { //$freeship = ''; } $item3 .= ""; if ($i % 3 == 0) { $body .= "".$item."".$item2."".$item3.""; $item =''; $item2=''; $item3=''; } } if ($i % 3 != 0) { $body .= "
".$row['product']."Price: \$".$row['price']."".$freeship."

".$item."".$item2."".$item3."
"; $item =''; $item2=''; $item3=''; } $body .= ''; $body .= '
Not only are gourmet lollipops great as a candy treat, they make excellent fundraiser items. Lollipops stand out among the crowd while everyone else is selling candy bars. The low price makes them great impulse buys. The long lasting treat will advertise itself in a school and have all the peers looking for them.

Gourmet lollipops make great gifts and office sweets. Check out the lollipop tree for ideas!

'; template("Gourmet Lollipops - Large Gourmet Flavor Lollipops",$body); break; case "browse": $cat = $_GET['cat']; $seg = $_GET['seg']; $page = $_GET['page']; if ($seg) { $category = $seg; $list = "segment='".$seg."'"; } else { $category = $cat; $list = "category='".$cat."'"; } $body .= "
Products for ".$category."
"; $body .= ""; $result2 = mysqli_query($mysqli, "select * from products where ".$list." and active=1 and skugroup='' order by product asc"); while ($row2 = mysqli_fetch_array($result2)) { $result = mysqli_query($mysqli, "select * from products where sku='".$row2['sku']."'"); while ($row = mysqli_fetch_array($result)) { $body .= ""; } $count++; if ($count % 2 == 0) { $body .= "\n\n"; } } $result = mysqli_query($mysqli, "select filename,groupname, min(price) as minprice, max(price) as maxprice,thumb from products where ".$list." and skugroup!='' and active=1 group by skugroup order by groupname"); while ($row = mysqli_fetch_array($result)) { $body .= ""; $count++; if ($count % 2 == 0) { $body .= "\n\n"; } } if ($count % 2 != 0) { $body .= ""; } $body .= "
"; $body .= "
"; if ($row['thumb']) { $body .= ""; } $body .= ""; $body .= ""; //$body .= ""; $result3 = mysqli_query($mysqli, "select min(price) as minprice, max(price) as maxprice from options where sku='".$row2['sku']."' and price>0"); $row3 = mysqli_fetch_array($result3); if ($row3['minprice'] == $row3['maxprice']) { $price = $row['price']; } else { $price = $row3['minprice']." to \$".$row3['maxprice']; } $body .= ""; $body .= ""; $body .= "
".$row['product']."
Price: \$".$row['price']."
".$row['product']."
Price: \$".$price."
"; $body .= "
"; $body .= "
"; if ($row['thumb']) { $body .= ""; } $body .= ""; $body .= ""; if ($row['minprice'] != $row['maxprice']) { $price = $row['minprice']." to \$".$row['maxprice']; } else { $price = $row['minprice']; } $body .= ""; $body .= ""; $body .= "
".$row['groupname']."
Price: \$".$price."
"; $body .= "
"; template(C_SITENAME." - ".$cat,$body); break; case "view": $result = mysqli_query($mysqli, "select * from products where filename='".$_GET['filename']."'"); if (mysqli_affected_rows($mysqli) == 0) { if ($_GET['filename'] == "faq.html") { helppage(); } elseif ($_GET['filename'] == "privacy.html") { privacypage(); } elseif ($_GET['filename'] == "terms.html") { termspage(); } elseif ($_GET['filename'] == "contact.html") { contactpage(); } elseif ($_GET['filename'] == "about.html") { aboutpage(); } elseif ($_GET['filename'] == "cvv2.html") { ccv2page(); } elseif ($_GET['filename'] == "thankyou.html") { thankyoupage(); }else { if (file_exists(C_PATH.'/'.$_GET['filename'])) { //$handle = fopen(C_PATH.'/'.$_GET['filename'], "r"); //$contents = fread($handle, filesize($filename)); //fclose($handle); $result2 = mysqli_query($mysqli, "select * from infosites.pages where filename='".$_GET['filename']."' and domain='".C_NAME."'"); $row2 = mysqli_fetch_array($result2); $contents = $row2['content']; $title = $row2['title']; template($title, $contents); } else { $content = "Page not found"; template ("404 error", $content); } } exit; } $row = mysqli_fetch_array($result); $body .= ""; if ($row['category']) { $body .= ""; } $body .= ""; $body .= ""; $price = getpricerange($row['sku'], $row['skugroup']); $body .= ""; } else { $price = getpricerange($row['sku'], $row['skugroup']); $body .= ""; } $result = mysqli_query($mysqli, "select distinct optionnum from options where sku='".$row['sku']."' order by num asc"); $optionsnum = mysqli_affected_rows($mysqli); if ($optionsnum > 0) { $body .= " "; $checker = "onsubmit=\"return validate(this)\";"; } $body .= ""; $body .= "
Category: ".$row['category']."
"; $body .= ""; $body .= ""; $body .= ""; if ($row['groupname']) { $productname = $row['groupname']; } else { $productname = $row['product']; } $body .= ""; if ($row['groupname']) { $body .= "
".$productname."

"; $result2 = mysqli_query($mysqli, "select * from products where groupname='".$row['groupname']."' and active=1 order by product"); if (mysqli_affected_rows($mysqli) > 1) { while ($row2 = mysqli_fetch_array($result2)) { if (empty($parent)) { $parent = $row2['product']; } else { $product = str_replace($parent.' ', '', $row2['product']); $product = str_replace(' ', ' ', $product); $body .= ""; $body .= ""; } } } else { $price = getpricerange($row['sku'], $row['skugroup']); $body .= ""; } if (!preg_match("/(CR2430|CR2450)/", $row['groupname'])) { //$body .= ""; //$body .= ""; } $body .= "
".$product."
 \$".$row2['price']." 
".$price."

 \$0.00See Details
"; } else { if ($row['regprice'] > $row['price']) { $body .= "
Regular Price: \$".$row['regprice']."
Sale Price: ".$price."

Our Price: ".$price."

"; for ($i=0; $i<=$optionsnum; $i++) { $result2 = mysqli_query($mysqli, "select * from options where sku='".$row['sku']."' and optionnum='".$i."' order by num asc"); if (mysqli_affected_rows($mysqli) > 0) { $body .= "

"; } } $body .= "
"; } $body .= '
'; $body .= ""; $body .= "Description"; #$temp = $row['description']; #$temp = preg_replace("/pair of plastic display stands./","pair of plastic display stands (stands are out of stock). Currently substituting with boxes.",$temp); $body .= "".$row['description']."
".$size.""; $body .= ""; template($productname,$body); break; case "search": $keywords = $_GET['q']; $keywords = trim($keywords); $keywords_array = explode(" ",$keywords); for($i=0; $i 1) { $searchmenu .= " "; if ($page > 1) $searchmenu .= "Previous  "; if($page > 10 && $pages > 20) { for($i=$page-10;$i<$page+10;$i++) { if($page==$i) { $searchmenu .= "".$i."  "; } else { $searchmenu .= "".$i."  "; } if($page == $pages) break; } } else { for($i=1;$i<$page+10;$i++) { if($page==$i) { $searchmenu .= "".$i."  "; } else { $searchmenu .= "".$i."  "; } if($i == $pages) break; } } if (($num > $listmax) && (($limit + $listmax) < $num)) $searchmenu .= "Next"; $searchmenu .= ""; } if($num==0) { $body .= "No products found."; } else { $i=1; $body .= ""; $body .= "$searchmenu"; $result = mysqli_query($mysqli, "Select distinct products.product, products.thumb, products.filename, products.sku from products where (".$search_str.") and products.active=1 group by products.product order by products.price,products.category asc limit ".$limit.",".$listmax.""); while ($row = mysqli_fetch_array($result)) { $price = getpricerange($row['sku']); $body .= " "; } $body .= $searchmenu."
Found $num matches $max
Result
".$row['product']."
\$".$price."
"; } template("Search", $body); break; case "gettemplate": template("__TITLE__", "__BODY__"); break; } function wget($url) { $curl = curl_init (); curl_setopt ($curl, CURLOPT_URL, $url); curl_setopt ($curl, CURLOPT_HEADER, 0); curl_setopt ($curl, CURLOPT_RETURNTRANSFER, 1); $result = curl_exec ($curl); curl_close($curl); return $result; } function getasinofferid($asin,$seller="") { require_once("/home/sha256.inc.php"); $AWSAccessKeyId = "AKIAILXKWCRMYR2XSP7A"; $SecretAccessKey = "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"; $String = "ResponseGroup=Large,Variations&Operation=ItemLookup&ItemId=".$asin."&MerchantId=".$seller.""; $ecsurl = "http://webservices.amazon.com/onca/xml?AWSAccessKeyId=$AWSAccessKeyId&Service=AWSECommerceService&".$String; $SignedRequest = getRequest($SecretAccessKey, $ecsurl, $AWSAccessKeyID, "2009-03-01"); $ecsurl = $SignedRequest; $result = wget($ecsurl); $xml2 = new SimpleXMLElement($result); preg_match("/OfferListingId\] => ([^\[]+)\[ExchangeId\] => $exchangeid/s",print_r($xml2,true),$matches); $offerlistingid = $matches[1]; preg_match("/(\S+)[\n\r]/",$offerlistingid,$matches); $offerlistingid = $matches[1]; mysqli_query($mysqli, "update products set offerlistingid='".$offerlistingid."' where asin='".$asin."'"); return $offerlistingid; } function getasinprice($asin,$exchangeid="",$seller="") { global $mysqli; require_once("/home/sha256.inc.php"); $AWSAccessKeyId = "AKIAILXKWCRMYR2XSP7A"; $SecretAccessKey = "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"; if ($exchangeid) { $String = "ResponseGroup=SellerListing&Operation=SellerListingLookup&SellerId=".$seller."&IdType=ASIN&Id=".$asin; $ecsurl = "http://webservices.amazon.com/onca/xml?AWSAccessKeyId=$AWSAccessKeyId&Service=AWSECommerceService&".$String; $SignedRequest = getRequest($SecretAccessKey, $ecsurl, $AWSAccessKeyID, gmdate("Y-m-d")); $ecsurl = $SignedRequest; $result = wget($ecsurl); $xmlParser = new uspsxmlParser(); $amznxml = $xmlParser->xmlparser($result); $amznxml = $xmlParser->getData(); $price = $amznxml['SellerListingLookupResponse']['SellerListings']['SellerListing']['Price']['Amount']['VALUE']/100; if ($price) { mysqli_query($mysqli, "update products set price='".$price."' where asin='".$asin."'"); } } else { $ItemId = $asin; // ASIN $ResponseGroup = "Large"; $String = "&ItemId=$ItemId&Operation=ItemLookup&ResponseGroup=$ResponseGroup"; $ecsurl = "http://webservices.amazon.com/onca/xml?AWSAccessKeyId=$AWSAccessKeyId&Service=AWSECommerceService&AssociateTag=clubandrave-20".$String; $SignedRequest = getRequest($SecretAccessKey, $ecsurl, $AWSAccessKeyID, gmdate("Y-m-d")); $ecsurl = $SignedRequest; $result = wget($ecsurl); $xmlParser = new uspsxmlParser(); $amznxml = $xmlParser->xmlparser($result); $amznxml = $xmlParser->getData(); if ((string) $amznxml['ItemLookupResponse']['Items']['Request']['Errors']['Error']['Message'] == 'We did not find any matches for your request.') { $price = ""; } else { foreach ($amznxml['ItemLookupResponse']['Items'] as $item) { $price = $item['OfferSummary']['LowestNewPrice']['Amount']['VALUE']/100; if ($price) { mysqli_query($mysqli, "update products set price='".$price."' where asin='".$asin."'"); } } } } return $price; } class uspsxmlParser { var $params = array(); //Stores the object representation of XML data var $root = NULL; var $global_index = -1; var $fold = false; /* Constructor for the class * Takes in XML data as input( do not include the tag */ function xmlparser($input, $xmlParams=array(XML_OPTION_CASE_FOLDING => 0)) { $xmlp = xml_parser_create(); foreach($xmlParams as $opt => $optVal) { switch( $opt ) { case XML_OPTION_CASE_FOLDING: $this->fold = $optVal; break; default: break; } xml_parser_set_option($xmlp, $opt, $optVal); } if(xml_parse_into_struct($xmlp, $input, $vals, $index)) { $this->root = $this->_foldCase($vals[0]['tag']); $this->params = $this->xml2ary($vals); } xml_parser_free($xmlp); } function _foldCase($arg) { return( $this->fold ? strtoupper($arg) : $arg); } /* * Credits for the structure of this function * http://mysrc.blogspot.com/2007/02/php-xml-to-array-and-backwards.html * * Adapted by Ropu - 05/23/2007 * */ function xml2ary($vals) { $mnary=array(); $ary=&$mnary; foreach ($vals as $r) { $t=$r['tag']; if ($r['type']=='open') { if (isset($ary[$t]) && !empty($ary[$t])) { if (isset($ary[$t][0])){ $ary[$t][]=array(); } else { $ary[$t]=array($ary[$t], array()); } $cv=&$ary[$t][count($ary[$t])-1]; } else { $cv=&$ary[$t]; } $cv=array(); if (isset($r['attributes'])) { foreach ($r['attributes'] as $k=>$v) { $cv[$k]=$v; } } $cv['_p']=&$ary; $ary=&$cv; } else if ($r['type']=='complete') { if (isset($ary[$t]) && !empty($ary[$t])) { // same as open if (isset($ary[$t][0])) { $ary[$t][]=array(); } else { $ary[$t]=array($ary[$t], array()); } $cv=&$ary[$t][count($ary[$t])-1]; } else { $cv=&$ary[$t]; } if (isset($r['attributes'])) { foreach ($r['attributes'] as $k=>$v) { $cv[$k]=$v; } } $cv['VALUE'] = (isset($r['value']) ? $r['value'] : ''); } elseif ($r['type']=='close') { $ary=&$ary['_p']; } } $this->_del_p($mnary); return $mnary; } // _Internal: Remove recursion in result array function _del_p(&$ary) { foreach ($ary as $k=>$v) { if ($k==='_p') { unset($ary[$k]); } else if(is_array($ary[$k])) { $this->_del_p($ary[$k]); } } } /* Returns the root of the XML data */ function GetRoot() { return $this->root; } /* Returns the array representing the XML data */ function GetData() { return $this->params; } } function hmac($key, $data, $hashfunc='sha256') { $blocksize=64; if (strlen($key) > $blocksize) $key=pack('H*', $hashfunc($key)); $key=str_pad($key, $blocksize, chr(0x00)); $ipad=str_repeat(chr(0x36), $blocksize); $opad=str_repeat(chr(0x5c), $blocksize); $hmac = pack('H*', $hashfunc(($key^$opad) . pack('H*', $hashfunc(($key^$ipad) . $data)))); return $hmac; } function getRequest($secretKey, $request, $accessKeyID="", $version="2010-01-01") { // Get host and url $url = parse_url($request); // Get Parameters of request $request = $url['query']; $parameters = array(); parse_str($request, $parameters); $parameters["Timestamp"] = gmdate("Y-m-d\TH:i:s\Z"); $parameters["Version"] = $version; if ($accessKeyID != '') $parameters["AWSAccessKeyId"] = $accessKeyID; // Sort paramters ksort($parameters); // re-build the request $request = array(); foreach ($parameters as $parameter=>$value) { $parameter = str_replace("_", ".", $parameter); $parameter = str_replace("%7E", "~", rawurlencode($parameter)); $value = str_replace("%7E", "~", rawurlencode($value)); $request[] = $parameter . "=" . $value; } $request = implode("&", $request); $signatureString = "GET" . chr(10) . $url['host'] . chr(10) . $url['path'] . chr(10) . $request; $signature = urlencode(base64_encode(hmac($secretKey, $signatureString))); $request = "http://" . $url[host] . $url['path'] . "?" . $request . "&Signature=" . $signature; return $request; } function getpricerange($sku,$skugroup="") { global $mysqli; if ($skugroup) { $result3 = mysqli_query($mysqli, "select * from products where skugroup='".$skugroup."' and price>0 and cost>0 and active=1"); if (mysqli_affected_rows($mysqli) == 0) { $price = "Out of Stock"; } else { $result3 = mysqli_query($mysqli, "select min(price) as minprice, max(price) as maxprice from products where skugroup='".$skugroup."' and price>0 and cost>0 and active=1"); $row3 = mysqli_fetch_array($result3); if ($row3['minprice'] == $row3['maxprice']) { $price = "\$".$row3['minprice']; } else { $price = "\$".$row3['minprice']." to \$".$row3['maxprice']; } } } else { $result3 = mysqli_query($mysqli, "select min(price) as minprice, max(price) as maxprice from options where sku='".$sku."' and price>0"); $row3 = mysqli_fetch_array($result3); if ($row3['minprice'] == $row3['maxprice']) { if ($row3['minprice'] == 0) { $result = mysqli_query($mysqli, "select varient from options where sku='".$sku."' and varient regexp 'out'"); if (mysqli_affected_rows($mysqli) > 0) { $price = "Out of Stock"; } else { $result = mysqli_query($mysqli, "select price from products where sku='".$sku."'"); $row = mysqli_fetch_array($result); $price = $row['price']; } } else { $price = "\$".$row3['minprice']; } } else { $price = "\$".$row3['minprice']." to \$".$row3['maxprice']; } } return $price; } function fcap($word="") { $word = ucwords(strtolower($word)); return $word; } function thankyoupage() { $content = "
Thank you for your order!
Thank you for checking out with PayPal. Please review your PayPal receipt to make sure all the information is correct for your order. If you have any questions, feel free to contact us.
"; template("Thank You", $content); } function helppage() { $content = "
Frequently Asked Questions

What is the return policy?
What are the shipping fees?
Where do you ship from?
Do you offer international deliveries?
What if I have more questions?


What is the return policy?
To ensure the safety of our products, we do not accept returns of food goods. However, if there was an error made on our end, or shipping damage, please notify us within 7 days of receipt.

What are the shipping fees?
Shipping is calculated during the checkout process. We ship with USPS or FedEx. There is a calculate shipping link in the shopping cart to view shipping prices before checking out.

Where do you ship from?
We ship from Georgia.

Do you offer international deliveries?
Sorry, we do not ship food goods overseas.

What if I have more questions?
For all customer inquiries and questions, please contact us by email using the \"Contact Us\" link.
"; template("Help", $content); } function aboutpage() { $content = "

About Us

We are website specializing in the online sales of tastey gourmet lollipops. We know you have come to our site looking for that unique long lasting flavor. Everybody has their own favorite. The flavor selection of our gourmet lollipops is the best out there, and all our lollipops are guaranteed to be fresh. All we want to do is give you the best tasting lollipops at the best price!

We want you to know that customer service is our top priority, so rest assured we will do our best to make you happy. Feel free to contact us about any questions you may have and thanks for visiting our website!
"; template("About GourmetLollipops.net", $content); } function privacypage() { $content = "
Privacy Policy

What information do we collect?
".C_SITENAME." only collects infomation we need to serve the customer with our services and to better improve our services. When you use ".C_SITENAME." to purchase products, you will provide the necessary information to process your order and to have your products shipped to your destination. This information includes: Your first and last name, address, city, state, zipcode, and email address.
".C_SITENAME." may use third party payment processors. The processors may collect additional information and may set cookies to track the user. ".C_SITENAME." does not control the use of third party cookies or collected information and such infomation is not covered by ".C_SITENAME."'s privacy policy.

Indirect information
This type of information is only of technical nature and does not personally identify the customer. The information is not directly submitted by the user and consists of details such as browser information, IP address, and ".C_SITENAME." related cookies. ".C_SITENAME." uses this information to help improve the performance of the web site.

Sharing of information
".C_SITENAME." does not sell customer related information. We do not share your billing information, except with third party processers we use to process payments for the customer.

Children
".C_SITENAME." is not for use for children under 13 and we do not collect information of children of whom we know are under 13. Children must have their legal guardian use the site to purchase products.
"; template("Privacy Policy", $content); } function termspage() { $content ="

Terms of use

This document is intended to provide a basic understand of ".C_SITENAME."'s Terms of Use. The following are guidelines for the establishment and enforcement of ".C_SITENAME."'s terms:

".C_SITENAME." intends to provide its customers access to products at bargain prices. The site and its contents are for personal use only. Content may not be reproduced, published, transmitted, modified, sold, used to create derivative works from, or distributed in any way. You agree to these terms and conditions by using the site and ".C_SITENAME." reserves the right to revise these terms at any time. If you have any questions regarding this policy, please contact us.

Disclaimers
".C_SITENAME." is provided \"AS-IS\". ".C_SITENAME." makes no representations or warranties of any kind, expressed or implied. You agree to use all operations, information, content, and products on this site at your own risk. To the full extent of the law, ".C_SITENAME." disclaims all warranties and will not be liable for any damages of any kind arising from the use of this site, including, but not limited to direct, indirect, incidental, punitive, and consquential damages.

"; template("Terms of Use", $content); } function contactpage() { $content = "

Contact Us

";/*

Phone:


*/ $content .= "

Email Us

To contact us via email"; $content .= " or complete the form below.

"; $content .='
'; template("Contact Us", $content); } function cvv2page() { $content = " Credit Card Code - CVV2
How to find the Card Code Value

Visa, MasterCard, and Discover



The CVV2 value is a 3-digit number printed at the end of the credit card number on the signature panel on the back of the credit card.

American Express



American Express numbers are 4 digits long and are located on the front of your card at the right hand side above your card number.
"; echo $content; } function sendmail($from,$to,$sub,$mes,$type) { switch ($type) { case 'html':$content='text/html';break; case "text":$content="text/plain";break; default:$h="text/plain";break;} $mes=stripslashes($mes); $sub=stripslashes($sub); $head="From: ".$from."\nReply-To: ".$from."\nContent-Type: ".$content.";charset=iso-8859-1\n"; @mail($to,$sub,$mes,$head); } function template($head="", $body="", $option="") { global $mysqli; global $darkcolor; ?> <?=$head?> '; }?>
$value) { list($id, $qty, $type) = explode("~", $value); $items += $qty; $result2 = mysqli_query($mysqli, "select * from products where id='".$id."'"); $row2 = mysqli_fetch_array($result2); $total += $row2['price']*$qty; } ?>
Items | $