Current File : /home/pacjaorg/public_html/km/components/com_djclassifieds/views/item/tmpl/default.php
<?php
/**
 * @package DJ-Classifieds
 * @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
 * @license http://www.gnu.org/licenses GNU/GPL
 * @author url: http://dj-extensions.com
 * @author email contact@dj-extensions.com
 */

defined ('_JEXEC') or die('Restricted access');

$app = JFactory::getApplication();
$user = JFactory::getUser();
$par = $this->par;
$item = $this->item;

$item_class = '';
if($item->promotions){
	$item_class .= ' promotion '.str_ireplace(',', ' ', $item->promotions);
}

$icon_new = 0;
if($item->date_start > JFactory::getDate('now - '.$par->get('icon_new_time','3').' day') && $par->get('icon_new','1')){
	$icon_new = 1;
	$item_class .= ' item_new';  
}
if($item->auction){
	$item_class .= ' item_auction';
}			
if($par->get('favourite','1') && $user->id && $item->f_id){
	$item_class .= ' item_fav';
}
if($item->user_id && !empty($this->profile['details']->verified)){
	$item_class .= ' verified_profile';
}

?>
<div id="dj-classifieds" class="clearfix djcftheme-<?php echo $this->theme;?> <?php echo $par->get('pageclass_sfx'); ?><?php if(JFactory::getDate() >= $item->date_exp){ echo ' item_expired'; }?><?php echo $this->cat_path_cl; ?><?php echo $this->ask_form_active ? ' ask-form-active' : ''; ?><?php echo $this->abuse_form_active ? ' abuse-form-active' : ''; ?>">
	<?php echo DJClassifiedsTheme::renderModule('djcf-top'); ?>
	<?php echo DJClassifiedsTheme::renderModule('djcf-top-cat'.$item->cat_id); ?>
	<?php echo DJClassifiedsTheme::renderModule('djcf-item-top'); ?>
	<?php echo DJClassifiedsTheme::renderModule('djcf-item-top'.$item->id); ?>
	<?php if(!$this->item_payments){ ?>
		<?php echo DJClassifiedsTheme::renderModule('djcf-item-top-free'); ?>
	<?php } ?>
	<?php $trigger_before = trim(implode("\n", $app->triggerEvent('onBeforeDJClassifiedsDisplay', array (&$item, &$par, 'item')))); ?>
	<?php if($trigger_before){ ?>
		<div class="djcf_before_display">
			<?php echo $trigger_before; ?>
		</div>
	<?php } ?>
<div class="dj-item<?php echo $item_class; ?>" itemscope itemtype="https://schema.org/Offer">
<?php	
	$heading_tag = $par->get('heading_tag_item', 'h2');
	echo '<div class="title_top info"><'.$heading_tag.' itemprop="name">'.$item->name.'</'.$heading_tag.'>';
		$can_edit = DJClassifiedsAccess::canEditItem($item, $par, true);
		if($can_edit){
			if($can_edit === true){
				echo '<a href="'.DJClassifiedsSEO::getViewUri('additem', array('cat_id' => $item->cat_id)).($app->input->get('token') ? '&token='.$app->input->get('token') : '&id='.$item->id).'" class="title_edit button">'.JText::_('COM_DJCLASSIFIEDS_EDIT').'</a>';
			}else{
				echo '<a href="javascript:void(0)" class="title_edit button" style="cursor:not-allowed;opacity:0.65;filter:alpha(opacity=65);box-shadow:none;" title="'.JText::_($can_edit).'">'.JText::_('COM_DJCLASSIFIEDS_EDIT').'</a>';
			}
			if($par->get('ad_preview','0') && $app->input->getInt('prev',0)){
				echo '<a href="'.DJClassifiedsSEO::getViewUri('additem', array('cat_id' => $item->cat_id)).'&task=publish'.($app->input->get('token') ? '&token='.$app->input->get('token') : '&id='.$item->id).'" class="title_save button">'.JText::_('COM_DJCLASSIFIEDS_SAVE_AND_PUBLISH').'</a>';
			}
		}
		if(DJClassifiedsAccess::canDeleteItem($item)){
			echo '<a class="title_delete button" data-bs-toggle="modal" data-toggle="modal" data-target="#confirm_delete" href="#confirm_delete">'.JText::_('COM_DJCLASSIFIEDS_DELETE').'</a>';
			echo JHtml::_('bootstrap.renderModal', 'confirm_delete', array('modalWidth' => '40', 'title' => JText::_('COM_DJCLASSIFIEDS_DELETE_CONFIRMATION'), 'footer' => '<button type="button" class="button cancel btn btn-secondary" data-dismiss="modal" data-bs-dismiss="modal">'.JText::_('COM_DJCLASSIFIEDS_CANCEL').'</button><a href="'.DJClassifiedsSEO::getViewUri('item').($app->input->get('token') ? '&task=deleteToken&token='.$app->input->get('token') : '&task=delete&id='.$item->id).'" class="button btn btn-primary">'.JText::_('COM_DJCLASSIFIEDS_DELETE').'</a>'), JText::sprintf('COM_DJCLASSIFIEDS_DELETE_CONFIRM', '<a href="'.$item->item_uri.'">'.$item->name.'</a>'));
		}
		if($item->published != '2' && $par->get('promotion_move_top',0) && $this->own_item && !($par->get('ad_preview','0') && $app->input->getInt('prev',0))){
			echo '<a href="'.DJClassifiedsSEO::getViewUri('payment').'&id='.$item->id.'&type=prom_top" class="title_prom_top title_delete button">'.JText::_('COM_DJCLASSIFIEDS_PROMOTION_MOVE_TO_TOP').'</a>';
		}
		if($par->get('show_types','0') && $item->type_id){
			echo DJClassifiedsType::getTypePreview($item->type_id);
		}
		if($icon_new){
			echo '<span class="new_icon">'.JText::_('COM_DJCLASSIFIEDS_NEW').'</span>';
		}
		if($item->user_id && !empty($this->profile['details']->verified)){
			echo '<span class="verified_icon" title="'.JText::_('COM_DJCLASSIFIEDS_VERIFIED_SELLER').'"></span>';
		}
		if($item->published==2){
			echo ' <span class="archived_icon" title="'.JText::_('COM_DJCLASSIFIEDS_ARCHIVE_ADVERT').'"></span>';
		}
		if($par->get('favourite','1')){
			echo DJClassifiedsTheme::renderLayout('favbox', array('item_id' => $item->id, 'i_user_id' => $item->user_id, 'fav' => !empty($item->f_id), 'par' => $par));
		}
		
		if($par->get('sb_position','0')=='top' && $par->get('sb_code','')!=''){
			echo '<div class="sb_top">'.$par->get('sb_code','').'</div>';
		}

		if($par->get('show_print_icon','0')){
			echo '<a class="print_icon" target="_blank" href="'.$this->print_url.'" title="'.JText::_('COM_DJCLASSIFIEDS_PRINT_VIEW').'">';
				echo '<span class="icon-print"> </span>';
			echo '</a>';
			?>
			<style>
				#dj-classifieds .dj-item .print_icon {
					float: right;
					margin: 0 10px;
				}
			</style>
		<?php }
		echo $item->event->title;
	echo '</div>'; ?>
	<?php if($item->event->afterDJClassifiedsDisplayTitle){ ?>
		<div class="djcf_after_title">
			<?php echo $this->item->event->afterDJClassifiedsDisplayTitle; ?>
		</div>
	<?php } ?>
		<div class="dj-item-in">
			<div class="djcf_images_generaldet_box">
				<?php if($this->item_images || $par->get('ad_image_default','0')==1){ 
					echo $this->loadTemplate('images'); 
				} ?>
				<?php echo $this->loadTemplate('generaldetails'); ?>
			</div>
			<?php if($par->get('auctions','0') && $item->auction && $par->get('auctions_position','top')=='middle'){
				echo $this->loadTemplate('auctions');
			} ?>
			<?php echo $this->loadTemplate('description'); ?>
			<?php echo $this->loadTemplate('customdetails'); ?>
			<?php if($this->show_loc){
				echo $this->loadTemplate('localization');
			} ?>
			<?php echo $this->loadTemplate('video'); ?>
			<?php echo $this->loadTemplate('adddetails'); ?>
			<?php if($par->get('auctions','0') && $item->auction && $par->get('auctions_position','top')=='bottom'){
				echo $this->loadTemplate('auctions');
			} ?>									
			<?php if($par->get('sb_position','0')=='bottom' && $par->get('sb_code','')!=''){
				echo '<span class="sb_bottom">'.$par->get('sb_code','').'</span>';
			} ?>
			<div class="clear_both"></div>
			<?php if($this->item->event->afterDJClassifiedsDisplayContent) { ?>
				<div class="djcf_after_desc">
					<?php echo $item->event->afterDJClassifiedsDisplayContent; ?>
				</div>
			<?php } ?>
			<?php echo $this->loadTemplate('comments'); ?>
			<div class="clear_both"></div>
		</div>
	</div>
	<?php $trigger_after = trim(implode("\n", $app->triggerEvent('onAfterDJClassifiedsDisplay', array (&$this->item, &$par, 'item')))); ?>
	<?php if($trigger_after){ ?>
		<div class="djcf_after_display">
			<?php echo $trigger_after; ?>
		</div>
	<?php } ?>
	<?php echo DJClassifiedsTheme::renderModule('djcf-item-bottom'); ?>
	<?php echo DJClassifiedsTheme::renderModule('djcf-bottom'); ?>
	<?php echo DJClassifiedsTheme::renderModule('djcf-bottom-cat'.$item->cat_id); ?>
</div>
Site is undergoing maintenance

PACJA Events

Maintenance mode is on

Site will be available soon. Thank you for your patience!