Current File : /home/pacjaorg/wpt.pacja.org/km/components/com_djclassifieds/layouts/auctionform.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;
$app = JFactory::getApplication();
$bids = $displayData['bids'];
$item = $displayData['item'];
$user = $displayData['user'];
$show_form = !empty($displayData['show_form']);
$bid_active = !empty($displayData['bid_active']);
$min_bid = isset($displayData['min_bid']) ? $displayData['min_bid'] : '';
$par = $displayData['par'];
?>
<div class="auction_bids" data-date-exp="<?php echo JFactory::getDate($item->date_exp)->format('Y/m/d H:i:s'); ?>" data-date-now="<?php echo JFactory::getDate()->format('Y/m/d H:i:s'); ?>">
<div class="bids_title"><h2><?php echo JText::_('COM_DJCLASSIFIEDS_CURRENT_BIDS'); ?></h2></div>
<?php if($bids && $item->price_reserve && $bids[0]->price < $item->price_reserve){ ?>
<div class="bids_subtitle"><?php echo JText::_('COM_DJCLASSIFIEDS_RESERVE_PRICE_NOT_REACHED'); ?></div>
<?php } ?>
<div class="bids_list">
<?php if($bids){ ?>
<div class="bids_row bids_row_title">
<div class="bids_col bids_col_name"><?php echo JText::_('COM_DJCLASSIFIEDS_NAME'); ?>:</div>
<div class="bids_col bids_col_date"><?php echo JText::_('COM_DJCLASSIFIEDS_DATE'); ?>:</div>
<div class="bids_col bids_col_bid"><?php echo JText::_('COM_DJCLASSIFIEDS_BID'); ?>:</div>
<div class="clear_both"></div>
</div>
<?php foreach($bids as $bid){ ?>
<?php
if($par->get('mask_bidder_name','0')== 1){
$bid->u_name = mb_substr($bid->u_name, 0, 1,'UTF-8').'.....'.mb_substr($bid->u_name, -1, 1,'UTF-8');
}
?>
<div class="bids_row">
<div class="bids_col bids_col_name">
<?php if($user->id && $user->id == $item->user_id){ ?>
<a data-bs-toggle="modal" data-toggle="modal" data-target="#contact<?php echo $bid->id; ?>" href="#contact<?php echo $bid->id; ?>"><?php echo $bid->u_name; ?></a>
<?php }else{ ?>
<?php echo $bid->u_name; ?>
<?php } ?>
</div>
<div class="bids_col bids_col_date"><?php echo DJClassifiedsTheme::formatDate(strtotime($bid->date)); ?></div>
<div class="bids_col bids_col_bid">
<?php echo DJClassifiedsTheme::priceFormat($bid->price, $item->currency); ?>
<?php if($user->id && $user->id == $item->user_id){ ?>
<?php echo '<a class="bid_del_icon" data-bs-toggle="modal" data-toggle="modal" data-target="#confirm_bid_delete'.$bid->id.'" href="#confirm_bid_delete'.$bid->id.'"></a>'; ?>
<?php } ?>
</div>
<div class="clear_both"></div>
</div>
<?php if($user->id && $user->id == $item->user_id){ ?>
<?php echo JHtmlBootstrap::renderModal('contact'.$bid->id, array('bodyHeight' => '60', 'modalWidth' => '40', 'url' => JRoute::_('index.php?option=com_djclassifieds&view=contact&id='.$item->id.'&bid='.$bid->id.'&tmpl=component', false), 'title'=> $bid->u_name)); ?>
<?php echo JHtml::_('bootstrap.renderModal', 'confirm_bid_delete'.$bid->id, array('modalWidth' => '40', 'title' => JText::_('COM_DJCLASSIFIEDS_BID_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').'&task=delBid&id='.$item->id.'&bid='.$bid->id.'" class="button btn btn-primary">'.JText::_('COM_DJCLASSIFIEDS_DELETE').'</a>'), JText::sprintf('COM_DJCLASSIFIEDS_BID_DELETE_CONFIRM', '<a href="'.$item->item_uri.'">'.$item->name.'</a>')); ?>
<?php } ?>
<?php } ?>
<?php }else{ ?>
<div class="bids_row no_bids_row"><?php echo JText::_('COM_DJCLASSIFIEDS_NO_SUBMITTED_BIDS'); ?></div>
<?php }?>
<div class="clear_both"></div>
</div>
</div>
<?php if($show_form && $user->id != $item->user_id){ ?>
<div class="bids_form" id="djbids_form">
<?php if(!$user->id){ ?>
<div class="bids_login_info log_in_msg"><?php echo JText::sprintf('COM_DJCLASSIFIEDS_LOG_IN_TO_POST_BIDS', '<a href="'.JRoute::_('index.php?option=com_users&view=login&return='.base64_encode(JUri::getInstance()), false).'">'.JText::_('COM_DJCLASSIFIEDS_LOG_IN_LINK').'</a>'); ?></div>
<?php }elseif($bid_active){ ?>
<div class="bids_box">
<div class="bids_info">
<span class="bid_label"><?php echo JText::_('COM_DJCLASSIFIEDS_PLACE_BID'); ?></span>
<?php if($item->bid_max > 0 && !$item->auction_assist){
echo '<span class="bid_max">'.JText::_('COM_DJCLASSIFIEDS_MAX_BIDDING').' '.DJClassifiedsTheme::priceFormat($item->bid_max, $item->currency).'</span>';
} ?>
</div>
<div class="bids_input">
<?php if ($par->get('unit_price_position','0')== 1) {
echo ($item->currency) ? $item->currency : $par->get('unit_price');
} ?>
<input class="inputbox input-small" id="djbid_value" type="text" name="bid_max" id="bid_max" autocomplete="off" value="<?php echo floatval($min_bid); ?>" placeholder="<?php echo JText::_('COM_DJCLASSIFIEDS_BID_PLACEHOLDER'); ?>" />
<?php if ($par->get('unit_price_position','0')== 0) {
echo ($item->currency) ? $item->currency : $par->get('unit_price');
} ?>
</div>
<div class="bids_button">
<button class="button" id="bid_submit"><?php echo JText::_('COM_DJCLASSIFIEDS_PLACE_BID_BUTTON'); ?></button>
</div>
<div class="clear_both"></div>
</div>
<?php }else{ ?>
<div class="bids_close_info"><?php echo JText::_('COM_DJCLASSIFIEDS_AUCTION_IS_CLOSED'); ?></div>
<?php } ?>
<div class="clear_both"></div>
</div>
<?php } ?>