<?php
require('includes/application_top.php');
global $currencies;
$my_data = tep_db_prepare_input(tep_sanitize_string($_GET['q']));
$my_data = addslashes($my_data);
$append_query = '';
/*$sql=tep_db_query("SELECT * from customers
	where customers_firstname LIKE '%".$my_data."%' "); */
    $pages_query = tep_db_query("SELECT p.products_id, pd.products_name,p.products_image,p.products_model from " . TABLE_PRODUCTS . " p, " . TABLE_PRODUCTS_DESCRIPTION . " pd
																			WHERE p.products_id = pd.products_id
																			  and pd.language_id = '" . $languages_id . "'
																			ORDER BY pd.products_name");

if(tep_db_num_rows($pages_query))
{
	while($row=tep_db_fetch_array($pages_query))
	{
		echo '<div class="autocomplete-style customer-badge"><a href="javascript:void(0)" onclick="javascript:selectpage_product('.$row['products_id'].');"   class="auto_link" style=""> <div class="avatar">'.tep_image('../'.DIR_WS_IMAGES . $row['products_image'],'','','36').' </div> <div class="details"><p class="prod_name" style="margin-bottom:5px;color:#000000;font-size:15px;">'.$row['products_name'].'</p>'.(($row['products_model'] != '')?'<p>Model:'. $row['products_model'].'</p>':'').'</div></a></div>'."\n";

	}
}
?>