<?php
/**
* @package HikaShop for Joomla!
* @version 1.4.3
* @author hikashop.com
* @copyright (C) 2010 HIKARI SOFTWARE. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
*/
defined('_JEXEC') or die('Restricted access');
?>
<div id="hikashop_address_listing">
<?php if($this->user_id){ ?>
<fieldset>
<div class="header" style="float: left;"><h1><?php echo JText::_('ADDRESSES');?></h1></div>
<div class="toolbar" id="toolbar" style="float: right;">
<table>
<tr>
<td>
<a class="modal" rel="{handler: 'iframe', size: {x: 450, y: 480}}" href="<?php echo hikashop::completeLink('address&task=add',true);?>">
<span class="icon-32-new" title="<?php echo JText::_('NEW'); ?>">
</span>
<?php echo JText::_('NEW'); ?>
</a>
</td>
<td>
<a href="<?php echo hikashop::completeLink('user');?>" >
<span class="icon-32-cancel" title="<?php echo JText::_('HIKA_CANCEL'); ?>">
</span>
<?php echo JText::_('HIKA_CANCEL'); ?>
</a>
</td>
</tr>
</table>
</div>
</fieldset>
<div class="iframedoc" id="iframedoc"></div>
<?php
if(!empty($this->addresses)){
?>
<div style=" width: 300px ; margin-left: auto ; margin-right: auto ;">
<table width"100%">
<?php
foreach($this->addresses as $address){
$this->address =& $address;
?>
<tr>
<td>
<span>
<?php
$this->setLayout('address_template');
$html = $this->loadTemplate();
foreach($this->fields as $field){
$fieldname = $field->field_namekey;
$html=str_replace('{'.$fieldname.'}',$this->fieldsClass->show($field,$address->$fieldname),$html);
}
echo str_replace("\n","<br/>\n",str_replace("\n\n","\n",preg_replace('#{(?:(?!}).)*}#i','',$html)));
?>
</span>
</td>
<td>
<a href="<?php echo hikashop::completeLink('address&task=delete&address_id='.$address->address_id.'&'.JUtility::getToken().'=1');?>"><img src="<?php echo HIKASHOP_IMAGES; ?>delete.png"/></a>
<a class="modal" rel="{handler: 'iframe', size: {x: 450, y: 480}}" href="<?php echo hikashop::completeLink('address&task=edit&address_id='.$address->address_id,true);?>"><img src="<?php echo HIKASHOP_IMAGES; ?>edit.png"/></a>
</td>
</tr>
<?php
}
?>
</table>
</div>
<?php
}
}
?>
</div>
<div class="clear_both"></div>