<?php
/**
 * @version		$Id: view.feed.php 10381 2008-06-01 03:35:53Z pasamio $
 * @package		Contact_Enhanced
 * @copyright	Copyright (C) 2006 - 2010 Ideal Custom Software Development
 * @author     Douglas Machado {@link http://ideal.fok.com.br}
 * @author     Created on 28-Jul-09
 * @license		GNU/GPL, see license.txt
 * Contact Enhanced  is free software. This version may have been modified pursuant
 * to the GNU General Public License, and as distributed it includes or
 * is derivative of works licensed under the GNU General Public License or
 * other free or open source software licenses. 
 */
defined( '_JEXEC' ) or die( 'Restricted access' );


if ( ( ( $this->contact->params->get( 'address_check' ) > 0 ) &&  ( $this->contact->address || $this->contact->suburb  || $this->contact->state || $this->contact->country || $this->contact->postcode ) )
					OR ( ($this->contact->email_to && $this->contact->params->get( 'show_email' )) || $this->contact->telephone  || $this->contact->fax || $this->contact->mobile || $this->contact->webpage )
					OR ( $this->contact->misc && $this->contact->params->get( 'show_misc' ) )
					OR ( $this->contact->image && $this->contact->params->get( 'show_image' ) )
		) : ?>

	<?php if ( $this->contact->image && $this->contact->params->get( 'show_image' ) AND ( $this->contact->params->get( 'access_details' ) <= $this->user->aid )	) : ?>
		<div style="float: right;">
			<?php echo JHTML::_('image',  JURI::base().$this->config->image_path . $this->contact->image, JText::_( 'Contact' ), array('align' => 'middle')); ?>
		</div>
	<?php endif; ?>
	
	<?php if ( ( ( ( $this->contact->params->get( 'address_check' ) > 0 ) &&  ( $this->contact->address || $this->contact->suburb  || $this->contact->state || $this->contact->country || $this->contact->postcode ) )
				OR ( ($this->contact->email_to && $this->contact->params->get( 'show_email' )) || $this->contact->telephone  || $this->contact->fax || $this->contact->mobile || $this->contact->webpage )
				OR ( $this->contact->misc && $this->contact->params->get( 'show_misc' ) ) )
				AND ( $this->contact->params->get( 'access_details' ) <= $this->user->aid )	){
					echo $this->loadTemplate('address');  
				}
	?>
	
	<?php if ( $this->contact->params->get( 'show_customfields',0 ) AND ( $this->contact->params->get( 'access_details' ) <= $this->user->aid )	) : ?>
		<div class="ce-contact-extra-fields">
			<?php echo $this->loadTemplate('contactcustomfields'); ?>
		</div>
	<?php endif; ?>
	
	<?php if ( $this->contact->misc && $this->contact->params->get( 'show_misc' ) ) : ?>
		<div class="ce-contact-misc">
			<?php echo $this->contact->misc; ?>
		</div>
	<?php endif; ?>
	
	
	<?php if ( $this->contact->params->get( 'allow_vcard' ) ) : ?>
		<div>
		<?php echo JText::_( 'Download information as a' );?>
			<a href="<?php echo JURI::base(); ?>index.php?option=com_contact_enhanced&amp;task=vcard&amp;contact_id=<?php echo $this->contact->id; ?>&amp;format=raw&amp;tmpl=component">
				<?php echo JText::_( 'VCard' );?></a>
		</div>
	<?php endif; ?>
<?php endif; ?>