<?php
$cartCustomerCore = new cartCustomerCore;

class cartCustomerCore{

	public $config = array();
	
	public function get_header($ITEM_DETAILS,$COMPANY_DETAILS){
		$html='<title>'.$COMPANY_DETAILS['COMPANY_NAME'].'</title>
<!--css-->
<link href="css/bootstrap.css" rel="stylesheet" type="text/css" media="all"/>
<link href="css/style.css" rel="stylesheet" type="text/css" media="all" />
<link href="css/font-awesome.css" rel="stylesheet">
<!--css-->
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="keywords" content="New Shop Responsive web template, Bootstrap Web Templates, Flat Web Templates, Android Compatible web template, 
Smartphone Compatible web template, free webdesigns for Nokia, Samsung, LG, SonyEricsson, Motorola web design" />
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<script src="js/jquery.min.js"></script>
<link href="//fonts.googleapis.com/css?family=Cagliostro" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Open+Sans:400,800italic,800,700italic,700,600italic,600,400italic,300italic,300" rel="stylesheet" type="text/css">
<!--search jQuery-->
	<script src="js/main.js"></script>
<!--search jQuery-->
<script type="text/javascript" src="js/bootstrap-3.1.1.min.js"></script>
 <!-- cart -->
<script src="js/simpleCart.min.js"></script>
<!-- cart -->
  <script defer src="js/jquery.flexslider.js"></script>
<link rel="stylesheet" href="css/flexslider.css" type="text/css" media="screen" />
<script src="js/imagezoom.js"></script>
';
return $html;
	}
	
	function md5_base64_encode($data){
		$encode_data=base64_encode($data);
		return $encode_data;
	}
	function md5_base64_decode($data){
		$decode_data=base64_decode($data);
		return $decode_data;
	}
	public function ClearInput($dirty){

		$dirty = mysql_real_escape_string($dirty);

		return $dirty;

	}
	
	function add_reviews($item_id){
		global $cartCustomerCore;
		$decrypt_id=$cartCustomerCore->md5_base64_decode($item_id);
		$NAME=$cartCustomerCore->ClearInput($_POST['NAME']);
		$MESSAGE=$_POST['MESSAGE'];
		$EMAIL=$_POST['EMAIL'];
		
		mysql_query("INSERT INTO `CART_PRODUCT_REVIEW`(SELLING_PRODUCT_ID,`NAME`, `EMAIL`, `MESSAGE`, `DATE_TIME`) VALUES('".$decrypt_id."','".$NAME."','".$EMAIL."','".$MESSAGE."',CURRENT_TIMESTAMP);");
		
		$_SESSION['success']='done';
		
		echo '<meta http-equiv="refresh" content="0; URL="../index.php?item_id='.$item_id.'">';
	}
	
	
}
?>