force_compile = true; $smarty->debugging = false; $smarty->caching = false; $smarty->cache_lifetime = 120; ##================================= ##================================= include_once('libs/db_config.php'); include_once('libs/my_class.php'); ##============================================================ if (!isset($obj)) $obj = new myclass($SERVER, $DBASE, $USERNAME, $PASSWORD); ##============================================================ if(isset($_REQUEST["file"])) { $file=$_REQUEST["file"]; } ##========== if(!isset($_SESSION["customerRegistrationEmail"])) { $_SESSION["customerRegistrationEmail"]=""; } ##========== ##============================================================ include_once("libs/general_settings.php"); ##============================================================ include_once("function/general0.php"); include_once("function/general1.php"); /***********/ include_once("function/catalog_functions0.php"); include_once("function/catalog_functions1.php"); ##============================================================ ##============================================================ ##============================================================ ?> itemcount > 0) { $cart_rec = $cart->get_all_contents(); $cart_total = $cart->total; } else { $_SESSION['top_grand_total']=''; $cart_rec=array(); } $smarty->assign("tot_cart_item", count($cart_rec)); $smarty->assign("cart_item_total", $_SESSION['top_grand_total']); ##=============================== ##======================================================== $site_url2="https://www.choicefurnituresuperstore.co.uk/"; //$site_url2="https://www.thefurnshop.co.uk/"; ##======================================================== ?> insert($ins_sql); if ($_SESSION['customerRegistrationEmail'] != "") { $obj->sql_query("Update newsletter set pageCount=pageCount+1,lastClicked='".getSystemDateTime()."',lastPage='".getenv('REQUEST_URI')."' where vEmail='".$_SESSION['customerRegistrationEmail']."'"); }} if (isset($_REQUEST['unblock']) && $_REQUEST['unblock'] == "unblock") { $usrIpIs0 = explode(",",getIP()); $obj->sql_query("Update ip_black_listing set eStatus='Inactive' where ip LIKE '".$usrIpIs0["0"]."%'"); } /* check and add ip black listing */ $usrIpIs = explode(",",getIP()); /* ODOO Server IP : 45.84.21.155 // Do Not Restrict This IP */ $sql_login_logs_chk = "Select iLLogsId from login_logs where vIP LIKE '%".$usrIpIs["0"]."%'"; $db_login_logs_chk = $obj->select($sql_login_logs_chk); if ($usrIpIs["0"] != "" && count($db_login_logs_chk) == 0 && !strstr(getIP(),"66.249") && !strstr(getenv('REQUEST_URI'),"Cataloging") && !strstr(getenv('REQUEST_URI'),"gclid") && !strstr(getenv('REQUEST_URI'),"utm_source") && !strstr(getenv('REQUEST_URI'),"notify_admin_ask_question") && !strstr(getIP(),"103.42.194") && !strstr(getIP(),"192.166.44") && !strstr(getIP(),"185.156.64") && !strstr(getIP(),"45.84.21.155") && !strstr(getIP(),"172.26.89.57")) { ##====== $sql_ip_black_listing = "Select ipId,iCount from ip_black_listing where ip LIKE '".$usrIpIs["0"]."%' AND eStatus='Active'"; $db_ip_black_listing = $obj->select($sql_ip_black_listing); if (count($db_ip_black_listing) > 0) { ##=========== $obj->sql_query("Update ip_black_listing set iCount=iCount+1,dDate='".getSystemDateTime()."' where ipId='".$db_ip_black_listing["0"]['ipId']."'"); ##=========== if ($db_ip_black_listing["0"]['iCount'] >= 10000) { /* $headers0 = 'From: Praveen CFS'."\n"; $headers0 .= 'MIME-Version: 1.0'."\n"; $headers0 .= 'Content-type: text/html; charset=UTF-8'."\r\n"; @mail("prvnupdy@gmail.com","CFS : IP Blocked : ".getIP(),"IP : ".getIP(),$headers0); die("..."); */ } ##================================= //header("HTTP/1.1 301 Moved Permanently"); //header("Location: ".$site_url."404error.html"); //exit(); ##================================= } else { if (strstr(getenv('REQUEST_URI'),"wp-admin") || strstr(getenv('REQUEST_URI'),"wordpress") || strstr(getenv('REQUEST_URI'),"wp-content") || strstr(getenv('REQUEST_URI'),"wp-login") || strstr(getenv('REQUEST_URI'),"login") || strstr(getenv('REQUEST_URI'),"/admin/") || strstr(getenv('REQUEST_URI'),"admin/") || strstr(getenv('REQUEST_URI'),"webadmin") || strstr(getenv('REQUEST_URI'),"/phpmyadmin/") || strstr(getenv('REQUEST_URI'),"myadmin") || strstr(getenv('REQUEST_URI'),"siteadmin") || strstr(getenv('REQUEST_URI'),"/pma/") || strstr(getenv('REQUEST_URI'),"/db/") || strstr(getenv('REQUEST_URI'),"shopadmin") || strstr(getenv('REQUEST_URI'),"administrator") || strstr(getenv('REQUEST_URI'),"xampp") || strstr(getenv('REQUEST_URI'),"cpanel") || strstr(getenv('REQUEST_URI'),"/install/") || strstr(getenv('REQUEST_URI'),"configure") || strstr(getenv('REQUEST_URI'),"config") || strstr(getenv('REQUEST_URI'),"forum") || strstr(getenv('REQUEST_URI'),"setup.php") || strstr(getenv('REQUEST_URI'),"sql") || strstr(getenv('REQUEST_URI'),"database") || strstr(getenv('REQUEST_URI'),"connector") || strstr(getenv('REQUEST_URI'),"mysql") || strstr(getenv('REQUEST_URI'),"upload") || strstr(getenv('REQUEST_URI'),"m=member") || strstr(getenv('REQUEST_URI'),"siteid") || strstr(getenv('REQUEST_URI'),".rar") || strstr(getenv('REQUEST_URI'),".zip") || strstr(getenv('REQUEST_URI'),".ini") || strstr(getenv('REQUEST_URI'),".asp") || strstr(getenv('REQUEST_URI'),"sqzr") || strstr(getenv('REQUEST_URI'),".aspx") || strstr(getenv('REQUEST_URI'),"cache") || strstr(getenv('REQUEST_URI'),"fuck") || strstr(getenv('REQUEST_URI'),"formguide") || strstr(getenv('REQUEST_URI'),"fuck") || strstr(getenv('REQUEST_URI'),"default.php") || strstr(getenv('REQUEST_URI'),"default.htm") || strstr(getenv('REQUEST_URI'),"defect.php") || strstr(getenv('REQUEST_URI'),"hell.php") || strstr(getenv('REQUEST_URI'),"help.php") || strstr(getenv('REQUEST_URI'),"htdocs") || strstr(getenv('REQUEST_URI'),"java.php") || strstr(getenv('REQUEST_URI'),"knal.php") || strstr(getenv('REQUEST_URI'),"/joomla/") || strstr(getenv('REQUEST_URI'),"phpStudy") || strstr(getenv('REQUEST_URI'),"phpplus") || strstr(getenv('REQUEST_URI'),"filezilla") || strstr(getenv('REQUEST_URI'),"invoker") || strstr(getenv('REQUEST_URI'),"wls-wsat") || strstr(getenv('REQUEST_URI'),"w00t") || strstr(getenv('REQUEST_URI'),"WAITFOR") || strstr(getenv('REQUEST_URI'),"DELAY") || strstr(getenv('REQUEST_URI'),"varchar") || strstr(getenv('REQUEST_URI'),"syscolumns") || strstr(getenv('REQUEST_URI'),"convert") || strstr(getenv('REQUEST_URI'),"SLEEP(") || strstr(getenv('REQUEST_URI'),"timeout") || strstr(getenv('REQUEST_URI'),"boot.ini") || strstr(getenv('REQUEST_URI'),"win.ini") || strstr(getenv('REQUEST_URI'),"windows") || strstr(getenv('REQUEST_URI'),"passwd") || strstr(getenv('REQUEST_URI'),".ini") || strstr(getenv('REQUEST_URI'),"/etc/") || strstr(getenv('REQUEST_URI'),"SCHEMA") || strstr(getenv('REQUEST_URI'),"select%2") || strstr(getenv('REQUEST_URI'),"/admin/") || strstr(getenv('REQUEST_URI'),"/plus/") || strstr(getenv('REQUEST_URI'),"webkit-linear-gradient") || strstr(getenv('REQUEST_URI'),"webkit-gradient") || strstr(getenv('REQUEST_URI'),"/admin/") || strstr(getenv('REQUEST_URI'),"/admin/") || strstr(getenv('REQUEST_URI'),"/admin/") || strstr(getenv('REQUEST_URI'),"/admin/") || strstr(getenv($_SERVER['HTTP_REFERER']),"testing") || strstr(getenv('REQUEST_URI'),"testing") || strstr(getenv('REQUEST_URI'),"besttempmail") || strstr(getenv('REQUEST_URI'),"controlpanel") || strstr(getenv('REQUEST_URI'),"sysdate") || strstr(getenv('REQUEST_URI'),"sleep(") || strstr(getenv('REQUEST_URI'),"now(") || strstr(getenv('REQUEST_URI'),"controlpanel") || strstr(getenv('REQUEST_URI'),"controlpanel") || strstr(getenv('REQUEST_URI'),"controlpanel") || strstr(getenv('REQUEST_URI'),"controlpanel") || strstr(getenv('REQUEST_URI'),"controlpanel") || strstr(getenv('REQUEST_URI'),"wp-admin")) { /************************************/ $obj->sql_query("Insert INTO ip_black_listing set ip='".getIP()."',iCount=iCount+1,dDate='".getSystemDateTime()."',vReferPageUrl='".$_SERVER['HTTP_REFERER']."',vLastPageUrl='".getenv('REQUEST_URI')."',eStatus='Active'"); /************************************/ //header("HTTP/1.1 301 Moved Permanently"); //header("Location: ".$site_url."404error.html"); //exit(); /************************************/ } } } } #========================================================== #========== /* Sandbox $amazonPay_merchantId = "A1H1GL45F2X25Z"; $amazonPay_publickey = "SANDBOX-AE7GNVIYLBZZJ2IC45JHMV6Z"; $amazonPay_privateKey = "AmazonPay_SANDBOX-AE7GNVIYLBZZJ2IC45JHMV6Z.pem"; $amazonPay_environment = true; // True for sandbox */ /* Live $amazonPay_merchantId = "A1H1GL45F2X25Z"; $amazonPay_publickey = "LIVE-AH6Z2G2FH52KWZMUFRXBA44C"; $amazonPay_privateKey = "AmazonPay_LIVE-AH6Z2G2FH52KWZMUFRXBA44C.pem"; $amazonPay_environment = false; // false for Live */ //AmazonPay_SANDBOX-AE7GNVIYLBZZJ2IC45JHMV6Z.pem //AmazonPay_LIVE-AH6Z2G2FH52KWZMUFRXBA44C.pem $amazonPay_merchantId = "A1H1GL45F2X25Z"; $amazonPay_publickey = "LIVE-AH6Z2G2FH52KWZMUFRXBA44C"; $amazonPay_privateKey = "AmazonPay_LIVE-AH6Z2G2FH52KWZMUFRXBA44C.pem"; $amazonPay_environment = false; // false for Live $amazonPayConfig = array( 'public_key_id' => $amazonPay_publickey, 'private_key' => $amazonPay_privateKey, 'region' => 'UK', // EU 'sandbox' => $amazonPay_environment ); $smarty->assign("amazonPay_publickey", $amazonPay_publickey); $smarty->assign("amazonPay_environment", $amazonPay_environment); #========== #========================================================== ## Braintree Credentials /* TEST */ /* $BT_environment="sandbox"; $BT_merchantId="mcxfnwmbgfsxbfx5"; $BT_publicKey="xkwhfkbq588jnryy"; $BT_privateKey="82c462a9e1500ceb778fee9a6019c564"; */ ##=============== /* LIVE */ $BT_environment="production"; $BT_merchantId="67dmvpx3m4cr6bt4"; $BT_publicKey="fh844khnrh9y9w3w"; $BT_privateKey="bf7492dc43ae75aa6c805bba8d71325b"; #========================================================== #========================================================== ## Klarna Credentials /* Test */ /* $Klarna_apiKey = "K517351_882fc5f3cacf"; $Klarna_apiPassword = "xTig1QYNvv5VIdrO"; $Klarna_testApiTxt="playground."; */ /* Live */ /* $Klarna_apiKey = "K517351_a8ed20b2c777"; $Klarna_apiPassword = "mPULDsLcqhpxEYkK"; $Klarna_testApiTxt=""; */ $Klarna_apiKey = "K517351_a8ed20b2c777"; $Klarna_apiPassword = "mPULDsLcqhpxEYkK"; $Klarna_testApiTxt=""; #========================================================== /* Weekdays */ $dayTagLine = "Winter Sale"; $dayTagLineShort = "Winter Sale"; $saleUrl = $site_url . "Furniture-Clearance-Sale.html"; $TodaysCoupon = "BOX10"; $TodaysCouponPercentage = "0"; $DayOfferDiscPerc = "0"; #===== $smarty->assign("dayTagLine", $dayTagLine); $smarty->assign("TodaysCoupon", $TodaysCoupon); $smarty->assign("saleUrl", $saleUrl); $smarty->assign("dayTagLineShort", $dayTagLineShort); $smarty->assign("TodaysCouponPercentage", $TodaysCouponPercentage); $smarty->assign("DayOfferDiscPerc", $DayOfferDiscPerc); #===== $v12_minAmount = '670'; $smarty->assign("v12_minAmount", $v12_minAmount); #===== /**09-07-2025****************/ $coupDiscPercCalcAmt1=100;//85 $coupDiscPercCalcAmt2=100;//88 $coupDiscPercCalcAmt3=100;//90 $smarty->assign("coupDiscPercCalcAmt1",$coupDiscPercCalcAmt1); $smarty->assign("coupDiscPercCalcAmt2",$coupDiscPercCalcAmt2); $smarty->assign("coupDiscPercCalcAmt3",$coupDiscPercCalcAmt3); /****************************/ ?> assign("msg", $msg); } else { $msg=""; $smarty->assign("msg", $msg); } ?> select( $sql_user_session_product ); $smarty->assign( "db_user_session_product", $db_user_session_product ); } else { $smarty->assign( "db_user_session_product",array()); } if ( isset($_SESSION[ 'iSess_CustomerId' ])) { $user_id = $_SESSION[ 'iSess_CustomerId' ]; $smarty->assign( "user_id", $user_id ); $sql_user = "SELECT `vSFirstName` from customer where iCustomerId=" . $user_id; $data_user = $obj->select( $sql_user ); $user_name = $data_user["0"][ 'vSFirstName' ]; $smarty->assign( "user_name", $user_name ); } ##================================================ /*Show All Brands*/ $sql_all_brand = "Select vTitle,iBrandId from brand where eStatus='Active' AND iBrandId NOT IN(91,5,6,132,23,71,85,86,130,139,360,1,138) order by iDispOrder ASC limit 0, 25"; $db_all_brand = $obj->select( $sql_all_brand ); $smarty->assign( "db_all_brand", $db_all_brand ); ##================================================ ?> assign("rand1", $rand1); $rand2=rand(1,9); $smarty -> assign("rand2", $rand2); ?> = $date_timer) { if ($date_timer >= $timer_limit) { $timer_date = date("M d Y H:i:s", mktime($hour_date + $hour, $minute_date + $minute, $second_date + $second, $month, $time_date, $year)); } } else { $timer_date_confirm = date("Y-m-d H:i:s", mktime($hour_date + $hour, $minute_date + $minute, $second_date + $second, $month, $time_date, $year)); $timer_limit_confirm = strtotime($timer_date_confirm); if ($timer_limit_confirm >= $date_timer) { if ($date_timer >= $timer_limit_confirm) { $timer_date = date("M d Y H:i:s", mktime($hour_date + $hour, $minute_date + $minute, $second_date + $second, $month, $time_date, $year)); } else { $timer_date = date("M d Y H:i:s", mktime($hour_date + $hour, $minute_date + $minute, $second_date + $second, $month, $time_date, $year)); } } else { $timer_date = date("M d Y H:i:s", mktime($hour_date + $hour, $minute_date + $minute, $second_date + $second, $month, $time_date, $year)); $ptimer_limit = strtotime($timer_date); $pdate_timer = time(); if ($ptimer_limit < $pdate_timer) { $obj->sql_query("Update setting set vValue='".date("d-m-y 00:00:01")."' where vName='SALE_TIMER_START_DATE'"); } } } ?> 0) { $iProductIdsCookies = $_REQUEST['id']."_".$_COOKIE["iProductIdsCookies"]; // Split the string into an array using '_' as the delimiter $iProductIdsCookies = explode('_', $iProductIdsCookies); // Remove duplicates by converting the array to a set (unique values only) $iProductIdsCookies = array_unique($iProductIdsCookies); // Join the unique array back into a string using '_' as the delimiter $iProductIdsCookies = implode('_', $iProductIdsCookies); setcookie("iProductIdsCookies",$iProductIdsCookies, time() + (86400 * 90)); } else if($file=="c-category" && $_REQUEST['iCategoryId']>0) { $iCategoryIdsCookies = $_REQUEST['iCategoryId']."_".$_COOKIE["iCategoryIdsCookies"]; // Split the string into an array using '_' as the delimiter $iCategoryIdsCookies = explode('_', $iCategoryIdsCookies); // Remove duplicates by converting the array to a set (unique values only) $iCategoryIdsCookies = array_unique($iCategoryIdsCookies); // Join the unique array back into a string using '_' as the delimiter $iCategoryIdsCookies = implode('_', $iCategoryIdsCookies); setcookie("iCategoryIdsCookies",$iCategoryIdsCookies, time() + (86400 * 90)); } else if($file=="c-category" && trim($_REQUEST['q'])!="") { $iCategorySearchCookies = trim($_REQUEST['q'])."_".$_COOKIE["iCategorySearchCookies"]; // Split the string into an array using '_' as the delimiter $iCategorySearchCookies = explode('_', $iCategorySearchCookies); // Remove duplicates by converting the array to a set (unique values only) $iCategorySearchCookies = array_unique($iCategorySearchCookies); // Join the unique array back into a string using '_' as the delimiter $iCategorySearchCookies = implode('_', $iCategorySearchCookies); setcookie("iCategorySearchCookies",$iCategorySearchCookies, time() + (86400 * 90)); } else if($file=="c-brand_range_product" && $_REQUEST['iRangeId']>0) { $iRangeIdsCookies = $_REQUEST['iRangeId']."_".$_COOKIE["iRangeIdsCookies"]; // Split the string into an array using '_' as the delimiter $iRangeIdsCookies = explode('_', $iRangeIdsCookies); // Remove duplicates by converting the array to a set (unique values only) $iRangeIdsCookies = array_unique($iRangeIdsCookies); // Join the unique array back into a string using '_' as the delimiter $iRangeIdsCookies = implode('_', $iRangeIdsCookies); setcookie("iRangeIdsCookies",$iRangeIdsCookies, time() + (86400 * 90)); } else if(count($cart_rec)>0) { for($i=0;$i assign("SALE_TIME_LIMIT", $SALE_TIME_LIMIT); $smarty -> assign("SALE_TIMER_START_DATE", $SALE_TIMER_START_DATE); $smarty -> assign("TODAY_DATE_FOR_TIMER", $today_date_for_timer); $smarty -> assign("TIMER_TITLE", addslashes($TIMER_TITLE)); $smarty -> assign("timer_date", $timer_date); /*************************************************************/ // Convert string to array $COUPON_HIDDEN_BRANDS_ARRAY = array_map('intval', explode(",", $COUPON_HIDDEN_BRANDS)); //print_r($COUPON_HIDDEN_BRANDS_ARRAY); $smarty->assign('COUPON_HIDDEN_BRANDS_ARRAY', $COUPON_HIDDEN_BRANDS_ARRAY); /*************************************************************/ ##======================== $smarty->assign("site_url", $site_url); $site_url2=$site_url; $smarty->assign("site_url2", $site_url2); ##======================== $smarty->assign( "blog_url", $site_url . "blog/" ); $smarty->assign( "infog_url", $site_url . "Infographic/" ); ##======================== ##=========== Cookie information 14-04-2023 =============== $CookieInformationConsent=$_COOKIE['CookieInformationConsent']; $CookieInformationConsent = json_decode ($CookieInformationConsent, true); $cookie_consents_approved=$CookieInformationConsent["consents_approved"]; $smarty->assign("cookie_consents_approved", $cookie_consents_approved); if($_COOKIE["cookieValue"] > 0){ $cookie_name = "cookieValue"; $cookie_value = $_COOKIE["cookieValue"]+1; setcookie($cookie_name, $cookie_value++, time() + (86400 * 30), "/"); // 86400 = 1 day }else{ $cookie_name = "cookieValue"; $cookie_value = 1; setcookie($cookie_name, $cookie_value, time() + (86400 * 30), "/"); // 86400 = 1 day } ##======================================= /*26-03-2023*/ $smarty->assign("todaysDay",date("D")); $smarty->assign("todaysDayTime",date("H")); ##======================== if ( $_SESSION["customerRegistrationEmail"] != "" ) { $custEmail_plain = $_SESSION["customerRegistrationEmail"]; $custEmail_md5 = md5($_SESSION["customerRegistrationEmail"]); $smarty->assign("custEmail_plain", $custEmail_plain); $smarty->assign("custEmail_md5", $custEmail_md5); } ##======================== $smarty->assign("AWS_URL", $AWS_URL); $smarty->assign("CDN_URL", $CDN_URL); ##======================== $smarty->assign("module", $module); $smarty->assign("file", $file); $smarty->display('template.tpl'); ?>