<?php 
$addon_path="../../";
include $addon_path."includes/config.php";
include $addon_path."includes/database.php";
include $addon_path."includes/keyword.php";
include $addon_path."includes/function.php";
include $addon_path."includes/session.php";
$addon_path="";





$query_display="SELECT * FROM t_".$key_table_prefix."_product_photo";
$query_display=$query_display." WHERE pho_product_code = '".$_REQUEST["code"]."';";
$result_display=mysqli_query($dbconn,$query_display)or die("Get Data failed- Err msg  ". mysqli_error($dbconn));
		
if($line_display=mysqli_fetch_array($result_display,MYSQLI_ASSOC))
{

	header("Content-Type: image/jpg");
	//header('Content-Length: '.mb_strlen($line_display["pho_file"]));
	header('Content-Length: '.strlen($line_display["pho_file"]));
	
	echo $line_display["pho_file"];

}



?>