<?php
/* --------------------------------------------------------------
xtc_address_label.inc.php 2009-11-30 mb
Gambio GmbH
http://www.gambio.de
Copyright (c) 2009 Gambio GmbH
Released under the GNU General Public License (Version 2)
[http://www.gnu.org/licenses/gpl-2.0.html]
--------------------------------------------------------------
based on:
(c) 2000-2001 The Exchange Project (earlier name of osCommerce)
(c) 2002-2003 osCommerce(general.php,v 1.225 2003/05/29); www.oscommerce.com
(c) 2003 nextcommerce (xtc_address_label.inc.php,v 1.5 2003/08/13); www.nextcommerce.org
(c) 2003 XT-Commerce - community made shopping http://www.xt-commerce.com ($Id: xtc_address_label.inc.php 899 2005-04-29 02:40:57Z hhgag $)
Released under the GNU General Public License
---------------------------------------------------------------------------------------*/
// include needed functions
require_once(DIR_FS_INC . 'xtc_get_address_format_id.inc.php');
require_once(DIR_FS_INC . 'xtc_address_format.inc.php');
function xtc_address_label($customers_id, $address_id = 1, $html = false, $boln = '', $eoln = "\n") {
// BOF GM_MOD:
$address_query = xtc_db_query("select entry_firstname as firstname, entry_lastname as lastname, entry_company as company, entry_street_address as street_address, entry_house_number as house_number, entry_additional_info as additional_address_info, entry_suburb as suburb, entry_city as city, entry_postcode as postcode, entry_state as state, entry_zone_id as zone_id, entry_country_id as country_id from " . TABLE_ADDRESS_BOOK . " where customers_id = '" . (int)$customers_id . "' and address_book_id = '" . (int)$address_id . "'");
$address = xtc_db_fetch_array($address_query);
$format_id = xtc_get_address_format_id($address['country_id']);
return xtc_address_format($format_id, $address, $html, $boln, $eoln);
}