"); echo("

INSTALLATION ERROR

"); echo(""); echo("
 
"); echo("
$string

 

"); echo("

If you require help installing please contact support@polyspaston.com

"); echo(""); exit(); } function upload_images($image,$type,$d,$f,$id) { require("config.php"); $smallimage = $path . $id . "_thumb_$d.jpg"; $bigimage = $path . $id . "_original_$d.jpg"; delete_image($id, $d); if (!strstr($type,"jpeg")) { message("Invalid Upload Image","You must upload a JPEG image. The image you uploaded was $type");} $size = GetImageSize($image); $sizeh = $size[1]; $sizew = $size[0]; $proport = $sizeh / $sizew; $new_height = $proport * $new_width; if ($new_height < $max_height) { $createdimage = imagecreatefromjpeg("$image"); $destimage = imagecreatetruecolor($new_width,$new_height); if(!$destimage) { message("GD PROBLEM","You do not have GD version 2.0 on your server.

To rectify this open config/functions.php and replace all occurences of imagecreatetruecolor with imagecreate."); } $output_img = imagecopyresampled($destimage, $createdimage, 0, 0, 0, 0, $new_width, $new_height,$sizew,$sizeh); if(!$output_img) { message("GD PROBLEM","imagecopyresized error."); } $imagejpeg = imagejpeg($destimage,$smallimage); if(!$imagejpeg) { message("Unable To Create Thumbnail","Please make sure you have set the permissions of your $uploads_dir to 0777"); } } else { $new_width = (($sizew / $sizeh) * $max_height); $createdimage = imagecreatefromjpeg("$image"); $destimage = imagecreatetruecolor($new_width,$max_height); if(!$destimage) { message("GD PROBLEM","You do not have GD version 2.0 on your server.

To rectify this open config/functions.php and replace all occurences of imagecreatetruecolor with imagecreate."); } $output_img = imagecopyresampled($destimage, $createdimage, 0, 0, 0, 0, $new_width, $max_height,$sizew,$sizeh); if(!$output_img) { message("GD PROBLEM","imagecopyresized error."); } $imagejpeg = imagejpeg($destimage,$smallimage); if(!$imagejpeg) { message("Unable To Create Thumbnail","Please make sure you have set the permissions of your $uploads_dir to 0777"); } } move_uploaded_file ($image,$bigimage); return 1; } function delete_image($id,$d) { require("config.php"); $smallimage = $path . $id . "_thumb_$d.jpg"; $bigimage = $path . $id . "_original_$d.jpg"; if (file_exists($smallimage)) { unlink($smallimage); } if (file_exists($bigimage)) { unlink($bigimage); } } function check_login($my_session) { require("config.php"); $connection = mysql_connect($host,$usr,$pwd); $query = mysql_db_query($db, "SELECT username from cart_login_$shop_code where session='$my_session'", $connection); while ($row = mysql_fetch_array($query)) { $username = $row["username"]; } return $username; } function get_postage($session) { $postage = $_SESSION['postage']; $postage_name = $_SESSION['postage_name']; return $postage; } function cart_rows($my_session,$filename) { if(!function_exists(dynamic_menu)) { require("/var/www/vhosts/teakcreations.co.uk/httpdocs/dynamic.php"); } $dynamic_menu = dynamic_menu(); require("config.php"); $connection = mysql_connect($host,$usr,$pwd); $summary = cart_summary($my_session); $array = array(); $query = mysql_db_query($db, "SELECT * FROM cart_temp_$shop_code where session='$my_session' and product_show != 'N' ", $connection); if(!mysql_num_rows($query)) { $query = mysql_db_query($db, "delete from cart_temp_$shop_code where session='$my_session'", $connection); $summary = cart_summary($my_session); $filename = "shop_cart_empty.html"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); $contents = str_replace("Xpage_fromX", $_SESSION['cart_url'], $contents); $contents = str_replace("Xsummary_priceX", $summary[0], $contents); $contents = str_replace("Xsummary_qtyX", $summary[1], $contents); $contents = str_replace("Z~", $currency, $contents); $contents = str_replace("Xdynamic_menuX", $dynamic_menu, $contents); print $contents; fclose ($handle); exit(); } while ($row = mysql_fetch_array($query)) { $product_name = $row["product_name"]; $product_code = $row["product_code"]; $product_price = $row["product_price"]; $product_tax = $row["product_tax"]; $product_weight = $row["product_weight"]; $product_quantity = $row["product_quantity"]; $id = $row["id"]; $product_price_total = $product_price * $product_quantity; $product_price_total = sprintf("%.2f",$product_price_total); $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); $contents = str_replace("XquantityX", $product_quantity, $contents); $contents = str_replace("Xproduct_nameX", $product_name, $contents); $contents = str_replace("Xproduct_codeX", $product_code, $contents); $contents = str_replace("XpriceX", $product_price, $contents); $contents = str_replace("XtotalX", $product_price_total, $contents); $contents = str_replace("Xproduct_taxX", $product_tax, $contents); $contents = str_replace("Xproduct_weightX", $product_weight, $contents); $contents = str_replace("XidX", $id, $contents); $contents = str_replace("Xpage_fromX", $from, $contents); $contents = str_replace("Z~", $currency, $contents); array_push($array,$contents); fclose ($handle); } return implode("\n", $array); } function cart_details($my_session,$country,$delivery_country) { $array = array(); $subtotal = 0; $weight = 0; $taxable = 0; require("config.php"); $connection = mysql_connect($host,$usr,$pwd); $query = mysql_db_query($db, "SELECT * FROM cart_temp_$shop_code where session='$my_session'", $connection); while ($row = mysql_fetch_array($query)) { $product_price = $row["product_price"]; $product_weight = $row["product_weight"]; $product_quantity = $row["product_quantity"]; $product_tax = $row["product_tax"]; $subtotal += ($product_price * $product_quantity); $weight += ($product_weight * $product_quantity); if($product_tax == "Yes") { $taxable += ($product_price * $product_quantity); } } $postage = get_postage($my_session); $tax = get_tax($country); $tax = ($taxable * $tax) - ($tax * total_discount($my_session)); $total = $subtotal + $postage + $tax; $subtotal = sprintf("%.2f",$subtotal); $postage = sprintf("%.2f",$postage); $taxable = sprintf("%.2f",$taxable); $tax = sprintf("%.2f",$tax); $total = sprintf("%.2f",$total); $discount = sprintf("%.2f",total_discount($my_session)); array_push($array, $subtotal); array_push($array, $weight); array_push($array, $taxable); array_push($array, $postage); array_push($array, $tax); array_push($array, $total); array_push($array, $discount); return $array; } function total_discount($my_session) { $discount = 0; require("config.php"); $connection = mysql_connect($host,$usr,$pwd); $query = mysql_db_query($db, "SELECT * FROM cart_temp_$shop_code where session='$my_session' and product_show='N' ", $connection); while ($row = mysql_fetch_array($query)) { $product_price = $row["product_price"]; $discount += $product_price; } $discount = $discount * -1; $discount = sprintf("%.2f",$discount); return $discount; } function get_dm($delivery_country) { require("config.php"); $connection = mysql_connect($host,$usr,$pwd); $query = mysql_db_query($db, "SELECT delivery_multiplier from cart_countries_$shop_code where country_name LIKE '%$delivery_country%'", $connection); check_mysql($query); while ($row = mysql_fetch_array($query)) { $delivery_multiplier = $row["delivery_multiplier"]; } return $delivery_multiplier; } function get_tax($country) { require("config.php"); $connection = mysql_connect($host,$usr,$pwd); $query = mysql_db_query($db, "SELECT tax_rate from cart_countries_$shop_code where country_name LIKE '%$country%'", $connection); while ($row = mysql_fetch_array($query)) { $tax_rate = $row["tax_rate"]; } $tax_rate = $tax_rate / 100; return $tax_rate; } function email_products($my_session) { require("config.php"); $connection = mysql_connect($host,$usr,$pwd); $array = array(); $query = mysql_db_query($db, "SELECT * from cart_temp_$shop_code where session = '$my_session' and product_show != 'N' ", $connection); while ($row = mysql_fetch_array($query)) { $product_name = $row["product_name"]; $product_code = $row["product_code"]; $product_price = $row["product_price"]; $product_quantity = $row["product_quantity"]; $product_total = $product_price * $product_quantity; $product_total = sprintf("%.2f",$product_total); array_push($array, "$product_quantity x $product_name ($product_code) - $currency $product_total"); } return $array; } function products_to_database($my_session,$orderno,$status) { $now = time(); require("config.php"); $connection = mysql_connect($host,$usr,$pwd); $details = mysql_db_query($db, "SELECT * from cart_customers_$shop_code where session='$my_session'", $connection); check_mysql($details); while ($row = mysql_fetch_array($details)) { $email = $row["email"]; } $query = mysql_db_query($db, "SELECT * from cart_temp_$shop_code where session = '$my_session' and product_show != 'N' ", $connection); while ($row = mysql_fetch_array($query)) { $product_name = $row["product_name"]; $product_code = $row["product_code"]; $product_price = $row["product_price"]; $product_quantity = $row["product_quantity"]; $pid = $row["pid"]; $product_name = addslashes($product_name); $insert = mysql_db_query($db, "INSERT into cart_record_$shop_code (email, orderno, product_name, product_code, product_price, product_quantity, status, statusdate, orderplaced, message) VALUES ('$email', '$orderno', '$product_name', '$product_code', '$product_price', '$product_quantity', '$status', '$now', '$now', '')", $connection); check_mysql($insert); $update = mysql_db_query($db, "update cart_products_$shop_code set product_stock=product_stock-$product_quantity where product_name='$product_name' and product_code='$product_code'", $connection); check_mysql($update); $query = mysql_db_query($db, "SELECT * FROM cart_set_$shop_code where original_product='$pid'", $connection); while ($row = mysql_fetch_array($query)) { $related_product = $row["related_product"]; $setqty = $row["setqty"]; $setqty = $setqty * $product_quantity; $reduce = mysql_db_query($db, "update cart_products_$shop_code set product_stock=product_stock-$setqty where id='$related_product'", $connection); } } $delete = mysql_db_query($db, "DELETE from cart_temp_$shop_code where session='$my_session'", $connection); check_mysql($delete); return; } function forgot_password($email) { require("config.php"); $connection = mysql_connect($host,$usr,$pwd); $query = mysql_db_query($db, "SELECT * from cart_customers_$shop_code where email = '$email' and email != '' ", $connection); if(!mysql_num_rows($query)) { message("Account Error","Unable to locate your e-mail address in our database.

Click here to try again."); } while ($row = mysql_fetch_array($query)) { $name = $row["name"]; $password = $row["password"]; $filename = "../emails/forgot_password.txt"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); $contents = str_replace("XnameX", $name, $contents); $contents = str_replace("XemailX", $email, $contents); $contents = str_replace("XpasswordX", $password, $contents); mail("$email","$forgot_password","$contents","From: $forgot_password_email"); fclose ($handle); } message("Password Sent","Your password has been e-mailed to $email

Click here to return to the log-in page."); } function database_connect($shost,$susr,$spwd) { require("config.php"); $kfile = str_replace($uploads_dir, $kfile, $path); $kfile = substr_replace($kfile, "",-1); $handle = @fopen ($kfile, "r"); if(!$handle) { database_error("@ rMEZORW oRXVMHV pVB"); exit(); } $lk = fread ($handle, filesize ($kfile)); fclose ($handle); list($q1,$q2,$q3)= split ("-", $lk, 3); if(strlen($q1) != "10") { database_error("@@ rMEZORW oRXVMHV pVB"); exit(); } if(md5(getenv("SERVER_NAME")) != $q2) { database_error("@@@ rMEZORW oRXVMHV pVB"); exit(); } $qfrom = '0123456789'; $qto = 'bYL+QaeVxC'; $strc = strtr($q3, $qto, $qfrom); $now = time(); if($strc < $now) { database_error("rMEZORW oRXVMHV pVB"); exit(); } return mysql_connect($shost,$susr,$spwd); } function worldpay($my_session) { $filename = "../credit_cards/worldpay.txt"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); return $contents; } function paypal($my_session) { $filename = "../credit_cards/paypal.txt"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); return $contents; } function invoice($my_session) { $filename = "../credit_cards/invoice.txt"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); return $contents; } function secure($my_session) { $filename = "../credit_cards/ssl.txt"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); return $contents; } function protx($my_session) { $filename = "../credit_cards/protx.txt"; $handle = fopen ($filename, "r"); $contents = fread ($handle, filesize ($filename)); fclose ($handle); return $contents; } function backup_table ($table) { require("config.php"); $connection = mysql_connect($host,$usr,$pwd); $result .= "# Dump of $table \n"; $result .= "# Dump DATE : " . date("d-M-Y") ."\n\n"; $query = mysql_db_query($db, "select * from $table", $connection); $num_fields = @mysql_num_fields($query); while ($row = mysql_fetch_row($query)) { $result .= "INSERT INTO ".$table." VALUES("; for($j=0; $j<$num_fields; $j++) { # $row[$j] = addslashes($row[$j]); $row[$j] = str_replace("'", "", $row[$j]); $row[$j] = ereg_replace("\n","\\n",$row[$j]); if (isset($row[$j])) $result .= "\"$row[$j]\"" ; else $result .= "\"\""; if ($j<($num_fields-1)) $result .= ","; } $result .= ");\n"; } return $result . "\n\n\n"; } function protx_crypt($total,$name,$email,$address1,$address2,$town,$county,$postcode) { require("../config/config.php"); $ThisVendorTxCode = rand(100000,999999); $stuff = "VendorTxCode=" . $ThisVendorTxCode . "&"; $stuff .= "Amount=" . $total . "&"; $stuff .= "Currency=" . $currency_code . "&"; $stuff .= "Description=" . $protx_desc . "&"; $stuff .= "SuccessURL=" . $protx_callback . "&"; $stuff .= "FailureURL=" . $protx_callback . "&"; $stuff .= "CustomerName=" . $name . "&"; $stuff .= "CustomerEmail=" . $email . "&"; $stuff .= "BillingAddress=" . "$address1\x0D\x0A$address2\x0D\x0A$town\x0D\x0A$county" . "&"; $stuff .= "BillingPostCode=" . $postcode; $crypt = base64Encode(SimpleXor($stuff,$encryption_password)); return $crypt; } function base64Encode($plain) { $output = ""; $output = base64_encode($plain); return $output; } function base64Decode($scrambled) { $output = ""; $output = base64_decode($scrambled); return $output; } function simpleXor($InString, $Key) { $KeyList = array(); $output = ""; for($i = 0; $i < strlen($Key); $i++){ $KeyList[$i] = ord(substr($Key, $i, 1)); } for($i = 0; $i < strlen($InString); $i++) { $output.= chr(ord(substr($InString, $i, 1)) ^ ($KeyList[$i % strlen($Key)])); } return $output; } function getToken($thisString) { $Tokens = array("Status","StatusDetail","VendorTxCode","VPSTxID","TxAuthNo","Amount","AVSCV2"); $output = array(); $resultArray = array(); for ($i = count($Tokens)-1; $i >= 0 ; $i--){ $start = strpos($thisString, $Tokens[$i]); if ($start !== false){ $resultArray[$i]->start = $start; $resultArray[$i]->token = $Tokens[$i]; } } sort($resultArray); for ($i = 0; $istart + strlen($resultArray[$i]->token) + 1; if ($i==(count($resultArray)-1)) { $output[$resultArray[$i]->token] = substr($thisString, $valueStart); } else { $valueLength = $resultArray[$i+1]->start - $resultArray[$i]->start - strlen($resultArray[$i]->token) - 2; $output[$resultArray[$i]->token] = substr($thisString, $valueStart, $valueLength); } } return $output; } function randomise() { list($usec, $sec) = explode(' ', microtime()); return (float) $sec + ((float) $usec * 100000); } function redirect2($url) { echo(" "); exit(); } ?> Exquisite Solid Reclaimed Teak Wood Designer Furniture

Teak Creations - Exquisite reclaimed teak furniture collections
Dining Room Furniture | Living Room Furniture | Bedroom Furniture | Bathroom | Accessories | Garden Furniture
 

Teak Creations offer unique and original solid reclaimed teak furniture collections for both indoor and outdoor living.

Our exquisite reclaimed wooden furniture designs are crafted to last a lifetime with attention to detail that is unsurpassed.
We source only the finest recycled teak wood timber which has been correctly seasoned and chosen for the best grain. All our reclaimed timber is at least 80 years old and salvaged from old buildings, bridges and railways. Each piece of reclaimed teak furniture is individual and unique because of the characteristics of the wood. Bespoke commissions can also be undertaken to individual client's exact specifications.
 
Home | About Us | Environment | Materials | Craftsmanship | Furniture Care | Guarantee | Bespoke and Commercial | Contact Us

Privacy | Terms And Conditions | Resources | Bespoke and Commercial Enquiries
We accept all major credit cards
VAT No: GB93 2096 231 | © Copyright 2010 all rights reserved