session_start(); $ecom_link = mysql_connect($DB_Host , $DB_Username , $DB_Password) or die ("Couldn't connect to the ecom server."); $ecom_db = mysql_select_db($DB_Name,$ecom_link) or die ("Couldn't select the ecom database."); $myGlobal_Variables = Array(); $qry = "SELECT * FROM ecom_global_variables WHERE Customer='$Customer'"; $result = mysql_query($qry, $ecom_link) or die("Error in selecting global variables
" . mysql_error()); if($arow=mysql_fetch_array($result)) $myGlobal_Variables = $arow; mysql_free_result($result);//$paypal_url = "https://www.sandbox.paypal.com/cgi-bin/webscr"; $paypal_url = "https://www.paypal.com/cgi-bin/webscr"; function getProductCount($fun_cid) { GLOBAL $myProductCount; $qry = "SELECT * FROM ecom_product_categories WHERE Category_Id=$fun_cid"; $result = mysql_query($qry) or die("Error in selecting product categories
" . mysql_error()); $myProductCount += mysql_num_rows($result); mysql_free_result($result); $qry = "SELECT * FROM ecom_categories WHERE Parent_Category_Id=$fun_cid"; $result = mysql_query($qry) or die("Error in slecting child categories
" . mysql_error()); while($arow=mysql_fetch_array($result)) getProductCount($arow["Category_Id"]); mysql_free_result($result); } function getParentCategory($fun_cid) { $qry = "SELECT Parent_Category_Id FROM ecom_categories WHERE Category_Id=$fun_cid"; $result = mysql_query($qry) or die("Error in slecting parent category ids
" . mysql_error()); if($arow=mysql_fetch_array($result)) $fun_result = $arow["Parent_Category_Id"]; else $fun_result = 0; mysql_free_result($result); return $fun_result; } function isHard($fun_cart) { $myResult = false; for($i=0;$i" . mysql_error()); if($arow=mysql_fetch_array($result)) { if($arow["Product_Format"]=="Hard") $myResult = true; } mysql_free_result($result); } return $myResult; } function fsockPost($data) { GLOBAL $paypal_url; $web=parse_url($paypal_url); $postdata=""; foreach($data as $i=>$v) $postdata.= $i . "=" . urlencode($v) . "&"; $postdata.="cmd=_notify-validate"; if($web[scheme] == "https") { $web[port]="443"; $ssl="ssl://"; } else $web[port]="80"; $fp=@fsockopen($ssl . $web[host],$web[port],$errnum,$errstr,30); if(!$fp) echo "$errnum: $errstr"; else { fputs($fp, "POST $web[path] HTTP/1.1\r\n"); fputs($fp, "Host: $web[host]\r\n"); fputs($fp, "Content-type: application/x-www-form-urlencoded\r\n"); fputs($fp, "Content-length: ".strlen($postdata)."\r\n"); fputs($fp, "Connection: close\r\n\r\n"); fputs($fp, $postdata . "\r\n\r\n"); while(!feof($fp)) $info[]=@fgets($fp, 1024); fclose($fp); $info=implode(",",$info); } return $info; }echo "\n"; echo " \n\n"; echo "
"; Template Garden
Template Garden
Home Developers Area Check Out Contact  
SELECT A CATEGORY THAT BEST DESCRIBES YOUR BUSINESS:
High performance LOW COST
 
 
Featured Products
echo " "; $ProductCount = 0; $qry = "SELECT * FROM ecom_featured_product_settings WHERE Customer='$Customer'"; $result = mysql_query($qry) or die("Error in selecting featured product settings
" . mysql_error()); if($arow=mysql_fetch_array($result)) { $Cols = $arow["Cols"]; $PageSize = $arow["PageSize"]; } else { $Cols = 1; $PageSize = 2; } mysql_free_result($result); if($PageSize!=0 && $Cols!=0) { $Product_Image_Width = $myGlobal_Variables["Category_Image_Width"]; $Product_Image_Height = $myGlobal_Variables["Category_Image_Height"]; if(!isset($CPage) || intval($CPage==0)) { $CPage=1; } $startdisp = $PageSize*($CPage-1); $qry = "SELECT P.*, PC.Category_Id FROM ecom_products P, ecom_featured_product FP, ecom_product_categories PC WHERE P.Product_Id=PC.Product_Id AND P.Product_Id=FP.Product_Id AND FP.Customer='$Customer' ORDER BY FP.Display_Order, P.Name"; $result = mysql_query($qry) or die("error in selecting featured products
" . mysql_error()); if(mysql_num_rows($result)>0) { if($PageSize==0) $PageSize = mysql_num_rows($result); $tpage = ceil(mysql_num_rows($result)/$PageSize); mysql_free_result($result); } else $tpage=0; $qry .= " LIMIT $startdisp,$PageSize"; $result = mysql_query($qry) or die("error in selecting featured products with limit
" . mysql_error()); echo " "; while($arow=mysql_fetch_array($result)) { $ProductCount++; $Description = $arow["Short_Description"]; $Price = ""; if($myGlobal_Variables["Show_Price_Range"]=="Yes") { $min_price_qry = "SELECT MIN(Price) as Min_Price FROM ecom_items WHERE Product_Id=" . $arow["Product_Id"]; $min_price_result = mysql_query($min_price_qry) or die("Error in selecting minimum price for the product
" . mysql_error()); if($min_price_arow=mysql_fetch_array($min_price_result)) $Min_Price = $min_price_arow["Min_Price"]; else $Min_Price = 0; mysql_free_result($min_price_result); $max_price_qry = "SELECT MAX(Price) as Max_Price FROM ecom_items WHERE Product_Id=" . $arow["Product_Id"]; $max_price_result = mysql_query($max_price_qry) or die("Error in selecting maximum price for the product
" . mysql_error()); if($max_price_arow=mysql_fetch_array($max_price_result)) $Max_Price = $max_price_arow["Max_Price"]; else $Max_Price = 0; mysql_free_result($max_price_result); if($Min_Price==$Max_Price) $Price = "Price: " . $myGlobal_Variables["Site_Currency_Sign"] . $Min_Price; else $Price = "Price: " . $myGlobal_Variables["Site_Currency_Sign"] . $Min_Price . " - " . $myGlobal_Variables["Site_Currency_Sign"] . $Max_Price; $Price = "" . $Price . ""; } if(isset($arow["Large"]) && $arow["Large"]!="") $Large_Option = "Image"; else if(isset($arow["Link"]) && $arow["Link"]!="") $Large_Option = "Link"; else $Large_Option = "n/a"; if(isset($arow["Thumb"])) { $Thumb = "ecom_image.php?id=" . $arow["Product_Id"] . "&tbl=products&type=Thumb"; $ThumbW = $arow["Thumb_Width"]; $ThumbH = $arow["Thumb_Height"]; } else { $Thumb = "pro_images/none_thumb.gif"; $ThumbHW = GetImageSize($Thumb); $ThumbW = $ThumbHW[0]; $ThumbH = $ThumbHW[1]; } $ratio = ($ThumbW/$ThumbH); if($ThumbW >= $Product_Image_Width) { $ThumbW = $Product_Image_Width; $ThumbH = ($ThumbW / $ratio); if($ThumbH>=$Product_Image_Height) { $ThumbH = $Product_Image_Height; $ThumbW = ($ThumbH * $ratio); } } else if($ThumbH >= $Product_Image_Height) { $ThumbH = $Product_Image_Height; $ThumbW = ($ThumbH * $ratio); if($ThumbW>=$Product_Image_Width) { $ThumbW = $Product_Image_Width; $ThumbH = ($ThumbW / $ratio); } } if(isset($myGlobal_Variables["Category_Title_Height"]) && $myGlobal_Variables["Category_Title_Height"]!="" && $myGlobal_Variables["Category_Title_Height"]!=0) $myHeight = "height=" . $myGlobal_Variables["Category_Title_Height"]; else $myHeight = ""; echo " "; if(bcmod($ProductCount,$Cols)==0) print ""; } echo "
"; print ""; print ""; print $arow["Name"]; print ""; echo "
"; if(isset($Description) && $Description!="") print nl2br($Description) . "
"; if($Price!="") print $Price . "
"; echo "
"; $qry = "SELECT * FROM ecom_buttons WHERE Customer='$Customer' AND Button_Text='Buy Now'"; $result_button = mysql_query($qry, $ecom_link) or die("Error in selecting buy now button
" . mysql_error()); if($arow_button=mysql_fetch_array($result_button)) { if($arow_button["Text_Image"]=="Image" && isset($arow_button["Image"])) $Buy_Now_Image = "ecom_image.php?id=$arow_button[Button_Id]&tbl=buttons&type=Image"; } mysql_free_result($result_button); if(isset($Buy_Now_Image) && $Buy_Now_Image!="") print "\"Buy"; else print ""; echo "
 
"; mysql_free_result($result); echo "
"; }
 
TemplateGarden templates are ready to use web designs created by top notch professionals from around the world. You can use them as it is, or use it as a starting point and customize them as per your needs. You can replace the dummy text and images with your own content. Within minutes you will have a professional website ready to be uploaded and go live on the world wide web.

TemplateGarden templates are sold for a one-use only basis. If you need to use the same template for another site, you will need to pay again and download a second copy before using it to prepare the second website. Usage of our templates more than once without additional payment constitutes a violation of the Terms & Conditions of the purchase of TemplateGarden templates.

TemplateGarden templates will be made available to you (UserID) for a period of 24 hours from the time of purchase.

TemplateGarden provides you with access to over 1000 web templates, designed by some of the leading designers from around the world. For a fraction of what it would cost to develop a custom template, you would be able to provide a professional look to your website instantaneously.

TemplateGarden in partnership with WEBPAK, provides complete web solutions, starting with a low-cost high performance website, complete with database functionalities, to high end solutions for e-commerce, appointment scheduling, dependable web hosting, etc.

TemplateGarden invites design professionals to partner with us in a mutually beneficial relationship by marketing your templates through the TemplateGarden portal. Send us a mail through the ContactUs page and we will get in touch with you.

 
 

|     Home      |      Contact      |
© Copyright 2004