<?php
if ($tpl['arr']['employer_show'] == 'T')
{
	ob_start();
	if (!empty($tpl['arr']['company_name']))
	{
		?>
		<dl>
			<dt><?php __('front_label_company_name'); ?></dt>
			<dd class="light"><?php echo stripslashes($tpl['arr']['company_name']); ?></dd>
		</dl>
		<?php
	}
	if (!empty($tpl['arr']['contact_name']))
	{
		?>
		<dl>
			<dt><?php __('front_label_contact_name'); ?></dt>
			<dd class="light"><?php echo stripslashes($tpl['arr']['contact_name']); ?></dd>
		</dl>
		<?php
	}
	if (!empty($tpl['arr']['phone']))
	{
		?>
		<dl>
			<dt><?php __('front_label_phone'); ?></dt>
			<dd><?php echo stripslashes($tpl['arr']['phone']); ?></dd>
		</dl>
		<?php
	}
	if (!empty($tpl['arr']['emp_email']))
	{
		$email = $tpl['arr']['emp_email'];
		$plain_email = strip_tags($email);
		$ascii_email = pjUtil::toAscii($plain_email);
		$text_email = str_replace($plain_email, $ascii_email, $email);
		?>
		<dl>
			<dt><?php __('front_label_email'); ?></dt>
			<dd class="light"><?php echo !pjValidation::pjActionEmail($plain_email) ? $email : '<a href="mailto:'.$ascii_email.'">'.$text_email.'</a>';?></dd>
		</dl>
		<?php
	}
	if (!empty($tpl['arr']['url']))
	{
		?>
		<dl>
			<dt><?php __('front_label_website'); ?></dt>
			<dd><?php echo preg_replace('@(https?://([-\w\.]+)+(:\d+)?(/([\w/_\.]*(\?\S+)?)?)?)@', '<a href="$1" target="_blank">$1</a>', $tpl['arr']['url']); ?></dd>
		</dl>		
		<?php
	}
	if (!empty($tpl['arr']['country']))
	{
		?>
		<dl>
			<dt><?php __('front_label_country'); ?></dt>
			<dd><?php echo stripslashes($tpl['arr']['country']); ?></dd>
		</dl>		
		<?php
	}
	if (!empty($tpl['arr']['lang_state']))
	{
		?>
		<dl>
			<dt><?php __('front_label_state'); ?></dt>
			<dd><?php echo stripslashes($tpl['arr']['lang_state']); ?></dd>
		</dl>
		<?php
	}else{
		if (!empty($tpl['arr']['address_state']))
		{
			?>
			<dl>
				<dt><?php __('front_label_state'); ?></dt>
				<dd><?php echo stripslashes($tpl['arr']['address_state']); ?></dd>
			</dl>
			<?php
		}
	}
	if (!empty($tpl['arr']['lang_city']))
	{
		?>
		<dl>
			<dt><?php __('front_label_city'); ?></dt>
			<dd><?php echo stripslashes($tpl['arr']['lang_city']); ?></dd>
		</dl>
		<?php
	}else{
		if (!empty($tpl['arr']['address_city']))
		{
			?>
			<dl>
				<dt><?php __('front_label_city'); ?></dt>
				<dd><?php echo stripslashes($tpl['arr']['address_city']); ?></dd>
			</dl>
			<?php
		}
	}
	$ob_contact = ob_get_contents();
	ob_end_clean();
	if (!empty($ob_contact))
	{
		echo $ob_contact;
	}
}
?>