".$http_pos.""; return $var; } else { return $text; } } function ici_address_label($customer_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n", $sendto = 0) { $tab = explode('_',$address_id); if($sendto != 0){ $query_customer = " select entry_firstname as customers_firstname, entry_lastname as customers_lastname from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customer_id . "' and address_book_id = '" . (int)$sendto . "'"; } else { $query_customer = "select customers_firstname, customers_lastname from customers where customers_id = ".(int)$customer_id; } $res_query_customer = tep_db_query($query_customer); $customer = tep_db_fetch_array($res_query_customer); $query = "select '".$customer['customers_firstname']."' as firstname, '".$customer['customers_lastname']."' as lastname, SUBSTRING(shop_name,1,32) as company, adresse_1 as street_address, '' as suburb, city, postal_code as postcode, '' as state, 0 as zone_id, zone_country_id as country_id from icirelais left join " . TABLE_ZONES . " on LOCATE( substring(postal_code,1,2), zone_code ) > 0 where relay_id = '" . $address_id . "'"; $address_query = tep_db_query($query); $address = tep_db_fetch_array($address_query); $format_id = tep_get_address_format_id($address['country_id']); return tep_address_format($format_id, $address, $html, $boln, $eoln); } ?>