AnonSec Shell
Server IP : 54.36.91.62  /  Your IP : 216.73.217.112
Web Server : Apache
System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64
User : coopiak ( 151928)
PHP Version : 8.3.23
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/coopiak/plats-individuels/lyon/components/com_djclassifieds/views/useritems/tmpl/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/coopiak/plats-individuels/lyon/components/com_djclassifieds/views/useritems/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');

JHtml::_('jquery.framework');
JHTML::_('bootstrap.tooltip', '.Tips1', array('container' => '#dj-classifieds', 'placement' => 'right'));

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

$order = $app->input->getCmd('order', $par->get('useritems_ordering','date_a'));
$ord_t = $ord_t_orig = $app->input->getCmd('ord_t', $par->get('useritems_ordering_dir','desc'));
$ord_t = $ord_t == 'desc' ? 'asc' : 'desc';

$search = $app->input->getVar('search');
$filter = $app->input->get('filter');

?>
<div id="dj-classifieds" class="clearfix useritems djcftheme-<?php echo $par->get('theme','default'); ?> <?php echo $par->get('pageclass_sfx'); ?>">
	<div class="title_top">
		<h1><?php echo $this->page_heading ? $this->page_heading : JText::_('COM_DJCLASSIFIEDS_YOUR_ADS'); ?></h1>
	</div>
	<form action="<?php echo JRoute::_('index.php'); ?>" method="get" id="djForm" name="djForm" class="form" enctype="multipart/form-data">
		<div class="useritems_search djinputbox float-start pull-left">
			<input type="text" size="25" name="search" class="inputbox" value="<?php echo $app->input->getVar('search'); ?>" placeholder="<?php echo JText::_('COM_DJCLASSIFIEDS_SEARCH'); ?>" />
			<button class="button" type="submit"><?php echo JText::_('COM_DJCLASSIFIEDS_SEARCH_BUTTON'); ?></button>
		</div>
		<div class="useritems_search djfilterbox float-end pull-right ms-2">
			<select name="filter" onchange="this.form.submit()">
				<option value=""><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_FILTER_ALL'); ?></option>
				<option value="active"<?php if($filter == 'active') echo ' selected'; ?>><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_FILTER_ACTIVE'); ?></option>
				<option value="inactive"<?php if($filter == 'inactive') echo ' selected'; ?>><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_FILTER_INACTIVE'); ?></option>
				<option value="expired"<?php if($filter == 'expired') echo ' selected'; ?>><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_FILTER_EXPIRED'); ?></option>
				<?php if($par->get('allow_user_block_ad',0)){ ?>
					<option value="blocked"<?php if($filter == 'blocked') echo ' selected'; ?>><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_FILTER_BLOCKED'); ?></option>
				<?php } ?>
				<?php if($par->get('user_ad_delete',0)==0 && $par->get('allow_user_archive',0)){ ?>
					<option value="archived"<?php if($filter == 'archived') echo ' selected'; ?>><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_FILTER_ARCHIVED'); ?></option>
				<?php } ?>
			</select>
		</div>
		<div class="useritems_search action-buttons float-end pull-right">
			<button type="button" class="button delete" data-action="delete" data-bs-toggle="modal" data-toggle="modal" data-target="#confirm_delete" href="#confirm_delete" style="display:none"><?php echo JText::_('COM_DJCLASSIFIEDS_DELETE'); ?> (<span class="djcounter">0</span>)</button>
			<?php 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><button type="button" data-action="delete" class="button action-button delete btn btn-primary">'.JText::_('COM_DJCLASSIFIEDS_DELETE').'</button>'), JText::_('COM_DJCLASSIFIEDS_USERITEMS_CONFIRM_DELETE')); ?>
			<?php if($par->get('user_ad_delete',0)==0 && $par->get('allow_user_archive',0)){ ?>
				<button type="button" class="button archive" data-action="archive" data-bs-toggle="modal" data-toggle="modal" data-target="#confirm_archive" href="#confirm_archive" style="display:none"><?php echo JText::_('COM_DJCLASSIFIEDS_ARCHIVE'); ?> (<span class="djcounter">0</span>)</button>
				<?php echo JHtml::_('bootstrap.renderModal', 'confirm_archive', array('modalWidth' => '40', 'title' => JText::_('COM_DJCLASSIFIEDS_MOVE_TO_ARCHIVE_CONFIRMATION'), 'footer' => '<button type="button" class="button cancel btn btn-secondary" data-dismiss="modal" data-bs-dismiss="modal">'.JText::_('COM_DJCLASSIFIEDS_CANCEL').'</button><button type="button" data-action="archive" class="button action-button archive btn btn-primary">'.JText::_('COM_DJCLASSIFIEDS_ARCHIVE').'</button>'), JText::_('COM_DJCLASSIFIEDS_USERITEMS_CONFIRM_ARCHIVE')); ?>
			<?php } ?>
			<?php if($par->get('allow_user_block_ad',0)){ ?>
				<button type="button" class="button action-button block" data-action="block" style="display:none"><?php echo JText::_('COM_DJCLASSIFIEDS_BLOCK_ADVERT'); ?> (<span class="djcounter">0</span>)</button>
				<button type="button" class="button action-button activate" data-action="activate" style="display:none"><?php echo JText::_('COM_DJCLASSIFIEDS_ACTIVATE_ADVERT'); ?> (<span class="djcounter">0</span>)</button>
			<?php } ?>
		</div>
		<div class="clear_both"></div>
		<input type="hidden" id="action_type" name="action" disabled>
		<input type="hidden" id="action_ids" name="ids" disabled>
		<input type="hidden" name="order" value="<?php echo $order; ?>">
		<input type="hidden" name="ord_t" value="<?php echo $ord_t_orig; ?>">
	</form>

	<?php foreach($app->triggerEvent('onDJClassifiedsDisplayUserItemsForms', array()) as $plug_out) echo $plug_out; ?>

	<div class="useritems">
		<div class="dj-useradverts">
			<div class="main_title">
				<?php
					$sort_cols = array(
						'title' => 'COM_DJCLASSIFIEDS_TITLE',
						'date_a' => 'COM_DJCLASSIFIEDS_DATE_ADDED',
						'date_e' => 'COM_DJCLASSIFIEDS_DATE_EXPIRATION',
						'display' => 'COM_DJCLASSIFIEDS_DISPLAYED',
						'active' => 'COM_DJCLASSIFIEDS_ACTIVE'
					);
				?>
				<?php foreach($sort_cols as $col_id => $col_title){ ?>
					<?php $class = $order == $col_id ? 'active' : 'normal'; ?>
					<div class="main_title_box <?php echo $class; ?><?php echo $col_id == 'title' ? ' first' : ''; ?>">
						<div class="main_title_box_in">
						<?php if($col_id == 'title'){ ?>
							<input type="checkbox" class="chx-all float-start pull-left">
						<?php } ?>
						<a class="<?php echo $class; ?>" href="<?php echo DJClassifiedsSEO::getViewUri($app->input->getVar('view')); ?>&order=<?php echo $col_id; ?>&ord_t=<?php echo $ord_t; ?><?php echo ($search ? '&search='.$search : '').($filter ? '&filter='.$filter : ''); ?>">
							<?php
								echo JText::_($col_title);
								if($order == $col_id){
									echo '<img src="'.JURI::base(true).'/'.DJClassifiedsTheme::getImgAssetPath($ord_t == 'asc' ? 'sort_asc.gif' : 'sort_desc.gif').'" alt="" />';			
								}else{
									echo '<img src="'.JURI::base(true).'/'.DJClassifiedsTheme::getImgAssetPath('sort.svg').'" alt="sort" />';
								}
							?>
							</a>
						</div>
					</div>
				<?php } ?>
				<div class="clear_both"></div>
			</div>
			<?php foreach($this->items as $i){
				if($par->get('tooltip_img','1') || $par->get('tooltip_title','1')){
					$tip_cont = DJClassifiedsTheme::renderLayout('tooltip', array('item' => $i, 'par' => $par));
				}
				echo '<div class="row_ua'.($i->special ? ' special special_first' : '').'" data-id="'.$i->id.'">';
					echo '<div class="row_ua1"><div class="row_ua1_in">';
						echo '<div class="col_ua_chx"><div class="col_ua_in"><input type="checkbox" class="chx"><div class="clear_both"></div></div></div>';
						echo '<div class="col_ua icon_name"><div class="col_ua_in">';					
							echo '<a class="icon" href="'.$i->item_uri.$this->anch.'">';
							$img_cl = $img_style = $img_alt = $img_title = '';
							if($i->images){
								$img_src = JURI::base(true).$i->images[0]->thumb_user_items;
								$img_alt = str_ireplace('"', "'", $i->images[0]->caption);
							}else{
								if($par->get('blank_img_source','0')==1){
									$img_src = DJClassifiedsImage::getCatImage($i->cat_id);
								}else{
									$img_src = JURI::base().DJClassifiedsTheme::getImgAssetPath('no-image.svg');
									$img_cl .= 'no-image';
								}
								$img_style = DJClassifiedsImage::getThumbStyle(DJClassifiedsImage::getThumbType('user_items'),$par);
							}
							if($par->get('tooltip_img','1')){
								$img_cl .= ($img_cl ? ' ' : '').'Tips1';
								$img_title = $tip_cont;
							}
							echo '<img src="'.$img_src.'"'.($img_cl ? ' class="'.$img_cl.'"' : '').($img_style ? ' style="'.$img_style.'"' : '').($img_alt ? ' alt="'.$img_alt.'"' : '').($img_title ? ' title="'.$img_title.'"' : '').' />';
							foreach($app->triggerEvent('onAfterDJClassifiedsDisplayImage', array($i, $par, 'useritems')) as $plug_out) echo $plug_out;
							echo '</a>';					
						
							if($par->get('tooltip_title','1')){
								echo '<a class="title Tips1" href="'.$i->item_uri.$this->anch.'" title="'.$tip_cont.'">'.$i->name.'</a>';
							}else{
								echo '<a class="title" href="'.$i->item_uri.$this->anch.'">'.$i->name.'</a>';
							}
							echo '<div class="c_name">';
							if($i->event->DJClassifiedsDisplayCategory){
								echo $i->event->DJClassifiedsDisplayCategory;
							}else{
								echo DJClassifiedsCategory::getCatFullPath($i->cat_id);
							}
							echo '</div>';
							if(!empty($i->added_from_plan)){
								echo '<div class="from_plan">'.JText::sprintf('COM_DJCLASSIFIEDS_ADDED_FROM_PLAN_X', '<span class="from_plan_name">'.$i->added_from_plan->name.'</span>').'</div>';
							}
							echo '<div class="clear_both"></div>';
						echo '</div></div>';
						echo '<div class="col_ua public_status"><div class="col_ua_in">';
							echo '<div class="col_ua_row date_start">'.JText::_('COM_DJCLASSIFIEDS_DATE_ADDED').': <span>'.DJClassifiedsTheme::formatDate(strtotime($i->date_start),'',$par->get('date_format_type',0)).'</span></div>';
							echo '<div class="col_ua_row date_exp">'.JText::_('COM_DJCLASSIFIEDS_DATE_EXPIRATION').': ';
								echo '<span title="'.$i->date_start.' - '.$i->date_exp.'" style="color:'.($i->published==2 ? 'grey' : ($i->date_exp >= JFactory::getDate()->toSQL() ? '#559D01' : '#C23C00')).';font-weight:bold;">'.DJClassifiedsTheme::formatDate(strtotime($i->date_exp),'',$par->get('date_format_type',0)).'</span>';
							echo '</div>';
							if($i->published != 2){
								echo '<div class="col_ua_row status">'.JText::_('COM_DJCLASSIFIEDS_PUBLISHED').': ';
									if($i->published){
										echo '<img src="'.JURI::base().DJClassifiedsTheme::getImgAssetPath('active.svg').'" alt="'.JText::_('JYES').'" />';
									}else{
										echo '<img src="'.JURI::base().DJClassifiedsTheme::getImgAssetPath('unactive.svg').'" alt="'.JText::_('JNO').'" />';
									}
								echo '</div>';
							}
							echo '<div class="col_ua_row hits">'.JText::_('COM_DJCLASSIFIEDS_DISPLAYED').': <span>'.$i->display.'</span></div>';													
							if(count($i->promotions_active)){
								foreach($i->promotions_active as $prom_active){ 
									echo '<div class="col_ua_row proms">'.JText::_($prom_active->label).': <span>'.DJClassifiedsTheme::formatDate(strtotime($prom_active->date_exp),'',$par->get('date_format_type',0)).'</span></div>';
								}
							}
						echo '</div></div>';

					
						echo '<div class="col_ua advert_active last" align="center"><div class="col_ua_in">';
							if($i->published==2){
								echo '<img title="'.JText::_('COM_DJCLASSIFIEDS_ARCHIVED').'" src="'.JURI::base().DJClassifiedsTheme::getImgAssetPath('archive.svg').'" alt="'.JText::_('JARCHIVE').'" />';
							}else if($i->s_active){
								echo '<img title="'.JText::_('COM_DJCLASSIFIEDS_ACTIVE').'" src="'.JURI::base().DJClassifiedsTheme::getImgAssetPath('active.svg').'" alt="'.JText::_('JYES').'" />';
							}else{
								echo '<img title="'.JText::_('COM_DJCLASSIFIEDS_INACTIVE').'" src="'.JURI::base().DJClassifiedsTheme::getImgAssetPath('unactive.svg').'" alt="'.JText::_('JNO').'" />';
							}
						echo '</div></div>';
						echo '<div class="clear_both"></div>';
					echo '</div></div>';
										
					if($i->published!=2){
						echo '<div class="row_ua2"><div class="row_ua2_in">';
							foreach($app->triggerEvent('onDJClassifiedsDisplayUserItemsButtons', array($i)) as $plug_out) echo $plug_out;
							if($i->published == '0' && $i->new_draft){
								echo '<a class="button publish prom_top" href="'.DJClassifiedsSEO::getViewUri('additem', array('cat_id' => $i->cat_id)).'&task=publish&id='.$i->id.'">'.JText::_('COM_DJCLASSIFIEDS_SAVE_AND_PUBLISH').'</a>';
							}
							$can_edit = DJClassifiedsAccess::canEditItem($i, $par, true);
							if($can_edit){
								if($can_edit === true){
									echo '<a class="button edit" href="'.DJClassifiedsSEO::getViewUri('additem', array('cat_id' => $i->cat_id)).'&id='.$i->id.'">'.JText::_('COM_DJCLASSIFIEDS_EDIT').'</a>';
								}else{
									echo '<a class="button edit" href="javascript:void(0)" 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('allow_user_copy_ad',0)){
								echo '<a class="button copy" href="'.DJClassifiedsSEO::getViewUri('additem', array('cat_id' => $i->cat_id)).'&copy='.$i->id.'">'.JText::_('COM_DJCLASSIFIEDS_COPY').'</a>';
							}
							if(JFactory::getDate('now + '.$par->get('renew_days','3').' day')->toSQL() >= $i->date_exp){
								if($i->auction && $par->get('auction_renew_lock') && !DJClassifiedsAccess::canRenewAuctionItem($i, $par)){
									echo '<a class="button renew" href="javascript:void(0)" style="cursor:not-allowed;opacity:0.65;filter:alpha(opacity=65);box-shadow:none;" title="'.JText::_('COM_DJCLASSIFIEDS_AUCTION_RENEW_LOCK_MESSAGE').'">'.JText::_('COM_DJCLASSIFIEDS_RENEW').'</a>';
								}else{
									echo '<a class="button renew" href="'.DJClassifiedsSEO::getViewUri('renewitem').'&id='.$i->id.($i->subscr_id ? '&subscr_id='.$i->subscr_id : '').'">';
									echo JText::_('COM_DJCLASSIFIEDS_RENEW');
									$exp_days = ($par->get('durations_list', 1) || !empty($i->added_from_plan)) ? null : $par->get('exp_days', 0);
									if($exp_days){
										echo '&nbsp;('.$exp_days.'&nbsp;';
										echo $exp_days == 1 ? JText::_('COM_DJCLASSIFIEDS_DAY') : JText::_('COM_DJCLASSIFIEDS_DAYS');
										echo ')';
									}
									echo '</a>';
								}
							}
																							
							if($par->get('promotion_move_top',0) && $i->s_active && $i->published){
								$move_top_price_arr = DJClassifiedsPayment::getMoveTopPriceArr($par);
								echo '<a class="button prom_top" href="'.DJClassifiedsSEO::getViewUri('payment').'&id='.$i->id.'&type=prom_top">';
									echo JText::_('COM_DJCLASSIFIEDS_PROMOTION_MOVE_TO_TOP');
									$pricetext = DJClassifiedsPayment::getPriceText($move_top_price_arr['price'], $move_top_price_arr['points'], $par);
									if($pricetext){
										echo ' <span>('.$pricetext.')</span>';
									}
								echo '</a>';
							}
							if($i->pay_type){
								echo '<a class="button pay" href="'.DJClassifiedsSEO::getViewUri('payment').'&id='.$i->id.'">'.JText::_('COM_DJCLASSIFIEDS_PAY').'</a>';
							}
							if($i->published && $par->get('allow_user_block_ad',0)){
								if($i->blocked){
									echo '<a class="button activate" href="'.DJClassifiedsSEO::getViewUri('item').'&task=activate&id='.$i->id.'" data-action="activate">'.JText::_('COM_DJCLASSIFIEDS_ACTIVATE_ADVERT').'</a>';										
								}else{
									echo '<a class="button block" href="'.DJClassifiedsSEO::getViewUri('item').'&task=block&id='.$i->id.'" data-action="block">'.JText::_('COM_DJCLASSIFIEDS_BLOCK_ADVERT').'</a>';
								}
							}
							if($par->get('user_ad_delete',0)==0 && $par->get('allow_user_archive',0)){
								echo '<a class="button archive" data-action="archive" data-bs-toggle="modal" data-toggle="modal" data-target="#confirm_archive" href="#confirm_archive">'.JText::_('COM_DJCLASSIFIEDS_ARCHIVE').'</a>';
							}
							echo '<a class="button delete" data-action="delete" data-bs-toggle="modal" data-toggle="modal" data-target="#confirm_delete" href="#confirm_delete">'.JText::_('COM_DJCLASSIFIEDS_DELETE').'</a>';
							echo '<div class="clear_both"></div>';
						echo '</div></div>';
					}else if($par->get('user_ad_delete',0)==0 && $par->get('allow_user_delete_archive',0)==1){
						echo '<div class="row_ua2"><div class="row_ua2_in">';
							if($par->get('allow_user_copy_ad',0)){
								echo '<a class="button copy" href="'.DJClassifiedsSEO::getViewUri('additem', array('cat_id' => $i->cat_id)).'&copy='.$i->id.'">'.JText::_('COM_DJCLASSIFIEDS_COPY').'</a>';
							}
							echo '<a class="button delete" data-action="delete" data-bs-toggle="modal" data-toggle="modal" data-target="#confirm_delete" href="#confirm_delete">'.JText::_('COM_DJCLASSIFIEDS_DELETE').'</a>';
							echo '<div class="clear_both"></div>';
						echo '</div></div>';
					}
					?>
					<?php if($i->payments){ ?>
					<div class="row_ua_orders payments">
						<div class="row_ua_orders_in">
							<div class="row_ua_orders_title">
								<?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_PAYMENTS'); ?><span></span>
							</div>
							<div class="row_ua_orders_content in" style="display:none">							
								<div class="dj-items-table2">							
									<div class="item_row item_header main_title">
										<div class="item_col normal first"><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_PAYMENT_TYPE') ?></div>
										<div class="item_col normal"><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_PAYMENT_METHOD') ?></div>
										<div class="item_col normal"><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_PAYMENT_PRICE') ?></div>
										<div class="item_col normal"><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_PAYMENT_DATE') ?></div>
										<div class="item_col normal"><?php echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_PAYMENT_STATUS') ?></div>			
									</div>
									<?php foreach($i->payments as $payment){ ?>
										<div class="item_row">
											<div class="item_col payment-type first">
												<?php 
													if($payment->type == '2'){					 		
														echo JText::_('COM_DJCLASSIFIEDS_PROMOTION_MOVE_TO_TOP');
													}else if($payment->type == '0'){
														if($payment->type_details){
															$type_labels = DJClassifiedsPayment::getAdvertPaymentTypeDetails($payment->type_details);
															$type_labels = $type_labels ? $type_labels : array($payment->type_details);
															foreach($type_labels as $type_label){
																echo '<div class="type-detail">'.$type_label.'<br></div>';
															}
														}else{
															echo JText::_('COM_DJCLASSIFIEDS_ADVERT');
														}
													}
												?>
											</div>
											<div class="item_col payment-method">									
												<?php
													if(JText::_('COM_DJCLASSIFIEDS_PAYMENT_METHOD_'.strtoupper($payment->method)) != 'COM_DJCLASSIFIEDS_PAYMENT_METHOD_'.strtoupper($payment->method)){
														echo JText::_('COM_DJCLASSIFIEDS_PAYMENT_METHOD_'.strtoupper($payment->method));
													}else{
														echo str_replace('djcf', '', JText::_($payment->method));
													}
												?>
											</div>
											<div class="item_col payment-price">
												<?php if($payment->method == 'points'){ ?>
													<?php echo intval($payment->price).' '.JTEXT::_('COM_DJCLASSIFIEDS_POINTS_SHORT'); ?>
												<?php }else{ ?>
													<?php echo DJClassifiedsTheme::priceFormat($payment->price); ?>
												<?php } ?>
											</div>	
											<div class="item_col payment-date"> 
												<?php echo DJClassifiedsTheme::formatDate(strtotime($payment->date)); ?>
											</div>
											<div class="item_col payment-status"> 
												<?php echo JText::_('COM_DJCLASSIFIEDS_PAYMENT_STATUS_'.strtoupper($payment->status)); ?>
											</div>
										</div>
									<?php } ?>
								</div> 							
							</div>						
						</div>
					</div>
					<?php } ?>

					<?php if(!empty($i->renewed_from_plans)){ ?>
					<div class="row_ua_orders renewed-from-plans">
						<div class="row_ua_orders_in">
							<div class="row_ua_orders_title">
								<?php echo JText::_('COM_DJCLASSIFIEDS_PLANS_RENEW_HISTORY'); ?><span></span>
							</div>
							<div class="row_ua_orders_content in" style="display:none">							
								<div class="dj-items-table2">
									<div class="item_row item_header main_title">
										<div class="item_col normal first"><?php echo JText::_('COM_DJCLASSIFIEDS_PLANS_RENEW_HISTORY_PLAN') ?></div>
										<div class="item_col normal"><?php echo JText::_('COM_DJCLASSIFIEDS_PLANS_RENEW_HISTORY_DATE') ?></div>	
									</div>
									<?php foreach($i->renewed_from_plans as $plan_renew){ ?>
										<div class="item_row">
											<div class="item_col first">									
												<?php
													echo $plan_renew->name;
												?>
											</div>
											<div class="item_col"> 
												<?php echo DJClassifiedsTheme::formatDate(strtotime($plan_renew->date)); ?>
											</div>
										</div>
									<?php } ?>
								</div> 							
							</div>						
						</div>
					</div>
					<?php } ?>
					
					<?php if($i->buynow && $i->orders){ ?>
						<div class="row_ua_orders"><div class="row_ua_orders_in">
							<div class="row_ua_orders_title">
								<?php echo JText::_('COM_DJCLASSIFIEDS_ORDERS_HISTORY').' ('.count($i->orders).')'; ?><span></span>
							</div>
							<div class="row_ua_orders_content in" style="display:none">							
								<div class="dj-items-table2">
									<div class="item_row item_header main_title">
										<div class="item_col name normal first" style="text-align:center;"><?php echo JText::_('COM_DJCLASSIFIEDS_BUYER') ?></div>
										<div class="item_col normal" style="text-align:center;"><?php echo JText::_('COM_DJCLASSIFIEDS_PRICE') ?></div>
										<div class="item_col normal" style="text-align:center;"><?php echo JText::_('COM_DJCLASSIFIEDS_DATE') ?></div>				
									</div>	
									<?php foreach($i->orders as $iorder){
										echo '<div class="item_row">';										
											echo '<div class="item_col first">';										
												$uid_slug = DJClassifiedsSEO::getUserSlug($iorder->user_id, $iorder->username);
												echo '<a class="profile_name" href="'.$iorder->profile_uri.'">'.$iorder->username.'</a><br/>';
												echo '<a class="profile_email" href="mailto:'.$iorder->email.'">'.$iorder->email.'</a>';											
											echo '</div>';	?>
											<div class="item_col"> 
												<div class="djcf_prow_desc_row">
													<span class="djcf_prow_desc_label"><?php echo JText::_("COM_DJCLASSIFIEDS_PRICE");?>:</span>
													<span class="djcf_prow_desc_value"><?php echo DJClassifiedsTheme::priceFormat($iorder->price,$i->currency);?></span>
													<div class="clear_both"></div>
												</div>
												<div class="djcf_prow_desc_row">
													<span class="djcf_prow_desc_label"><?php echo JText::_("COM_DJCLASSIFIEDS_QUANTITY");?>:</span>
													<span class="djcf_prow_desc_value"><?php echo $iorder->quantity;?></span>
													<div class="clear_both"></div>
												</div>
											</div>	
											<div class="item_col"> 
												<?php echo DJClassifiedsTheme::formatDate(strtotime($iorder->date)); ?>						
											</div>
											<?php 
										echo '</div>';
									}?>
								</div> 							
							</div>						
						</div></div>
					<?php } ?>

					<?php if($i->offer && $i->offers){ ?>
						<div class="row_ua_orders"><div class="row_ua_orders_in">
							<div class="row_ua_orders_title">
								<?php echo JText::_('COM_DJCLASSIFIEDS_OFFERS_HISTORY').' ('.count($i->offers).')'; ?><span></span>
							</div>
							<div class="row_ua_orders_content in" style="display:none">							
								<div class="dj-items-table2">
									<div class="item_row item_header main_title">
										<div class="item_col name normal first" style="text-align:center;"><?php echo JText::_('COM_DJCLASSIFIEDS_BUYER') ?></div>
										<div class="item_col normal" style="text-align:center;"><?php echo JText::_('COM_DJCLASSIFIEDS_OFFER') ?></div>
										<div class="item_col normal" style="text-align:center;"><?php echo JText::_('COM_DJCLASSIFIEDS_DATE') ?></div>				
									</div>	
									<?php
									$io = 0;
									foreach($i->offers as $ioffer){
										$io++;
										echo '<div class="item_row">';								
											echo '<div class="item_col first">';										
												$uid_slug = DJClassifiedsSEO::getUserSlug($ioffer->user_id, $ioffer->username);
												echo '<a class="profile_name" href="'.$ioffer->profile_uri.'">'.$ioffer->username.'</a><br/>';
												echo '<a class="profile_email" href="mailto:'.$ioffer->email.'">'.$ioffer->email.'</a>';											
											echo '</div>';	?>
											<div class="item_col"> 
												<div class="djcf_prow_desc_row">
													<span class="djcf_prow_desc_label"><?php echo JText::_("COM_DJCLASSIFIEDS_PRICE");?>:</span>
													<span class="djcf_prow_desc_value"><?php echo DJClassifiedsTheme::priceFormat($ioffer->price,$ioffer->currency);?></span>
													<div class="clear_both"></div>
												</div>
												<div class="djcf_prow_desc_row">
													<span class="djcf_prow_desc_label"><?php echo JText::_("COM_DJCLASSIFIEDS_QUANTITY");?>:</span>
													<span class="djcf_prow_desc_value"><?php echo $ioffer->quantity;?></span>
													<div class="clear_both"></div>
												</div>
											</div>	
											<div class="item_col"> 
												<?php echo DJClassifiedsTheme::formatDate(strtotime($ioffer->date)); ?>						
											</div>
										<?php echo '</div>'; ?>
										</div>
										<div class="dj-items-table2 dj-items-table2-offer-msg">
											<div class="item_row item_row_msg">
												<div class="item_col first">
													<div class="item_message_title">
														<?php echo JText::_('COM_DJCLASSIFIEDS_MESSAGE_FROM_BUYER'); ?>
													</div>
													<div class="item_message">													
														<?php echo $ioffer->message; ?>
													</div>
												</div>	
												<div class="item_col">
													<div class="item_response">
														<?php if($ioffer->status==0){ ?>
															<form action="<?php JRoute::_('index.php'); ?>" method="post" name="djForm<?php echo $ioffer->id;?>" id="djForm<?php echo $ioffer->id;?>" class="form-validate" enctype="multipart/form-data">															
																<select name="offer_status" class="inputbox required">
																	<option value=""><?php echo JText::_('COM_DJCLASSIFIEDS_SELECT_STATUS'); ?></option>
																	<option value="1"><?php echo JText::_('COM_DJCLASSIFIEDS_ACCEPT_OFFER'); ?></option>
																	<option value="2"><?php echo JText::_('COM_DJCLASSIFIEDS_DECLINE_OFFER'); ?></option>
																</select>
																<div class="item_response_msg_box">
																	<textarea name="offer_msg"  class="inputbox required" id="offer_msg<?php echo $ioffer->id;?>" placeholder="<?php echo JText::_('COM_DJCLASSIFIEDS_OFFER_RESPONSE'); ?>"></textarea>
																</div>
																<button class="button validate" type="submit" id="submit_b<?php echo $ioffer->id;?>"><?php echo JText::_('COM_DJCLASSIFIEDS_SEND_RESPONSE'); ?></button>			    
															    <input type="hidden" name="item_id" value="<?php echo $i->id; ?>">
															    <input type="hidden" name="offer_id"value="<?php echo $ioffer->id; ?>">
															    <input type="hidden" name="option" value="com_djclassifieds" /> 
															    <input type="hidden" name="view" value="contact" />
															    <input type="hidden" name="task" value="saveOfferResponse" />
															    <input type="hidden" name="Itemid" value="<?php echo $app->input->getInt('Itemid', 0); ?>" />
															   <div class="clear_both"></div>
															</form>	
														<?php }else{ ?>
															<div class="item_status">
																<span><?php echo JText::_('COM_DJCLASSIFIEDS_STATUS'); ?>: </span>
																<?php 
																	if($ioffer->status==1){
																		echo JText::_('COM_DJCLASSIFIEDS_OFFER_ACCEPTED');	
																	}else{
																		echo JText::_('COM_DJCLASSIFIEDS_OFFER_DECLINED');
																	}
																?>
															</div>
															<?php														
															if($ioffer->status==1  && DJClassifiedsPayment::getUserPaypal($user->id) && $par->get('buynow_direct_payment',0)){ ?>
																<div class="item_status">
																	<span><?php echo JText::_('COM_DJCLASSIFIEDS_PAYMENT_STATUS'); ?>: </span>
																	<?php 
																		if($ioffer->paid==1){
																			echo JText::_('COM_DJCLASSIFIEDS_PAID');	
																		}else{
																			echo JText::_('COM_DJCLASSIFIEDS_PENDING');
																		}
																	?>
																</div>	
															<?php } ?>
															<div class="item_response">
																<?php echo $ioffer->response; ?>
															</div>
														<?php }?>
													</div>
												</div>
											</div>
										</div>
										<div class="dj-items-table2">			
										<?php if($io < count($i->offers)){ ?>					
											<div class="item_row item_header main_title">
												<div class="item_col name normal first" style="text-align:center;"><?php echo JText::_('COM_DJCLASSIFIEDS_BUYER') ?></div>
												<div class="item_col normal" style="text-align:center;"><?php echo JText::_('COM_DJCLASSIFIEDS_PRICE') ?></div>
												<div class="item_col normal" style="text-align:center;"><?php echo JText::_('COM_DJCLASSIFIEDS_DATE') ?></div>				
											</div>
										<?php } ?>
									<?php } ?>
								</div> 							
							</div>						
						</div></div>							
					<?php }	?>
					<?php echo $i->event->sections;	?>
			<?php echo '</div>'; ?>
		<?php } ?>
		<?php foreach($app->triggerEvent('onDJClassifiedsDisplayUserItemsRows', array(&$par)) as $plug_out) echo $plug_out; ?>
		<?php 
			if(!$this->items){
				echo '<div class="no_results">';
					echo JText::_('COM_DJCLASSIFIEDS_USERITEMS_NO_RESULTS');
				echo '</div>';
			}
		?>
	</div>
	<?php
		if($this->pagination->getPagesLinks()){
			echo '<div class="pagination">';
				echo $this->pagination->getPagesLinks();
			echo '</div>';
		}
	?>
</div>	

</div>
<script>

	jQuery(function($){
		$('#dj-classifieds').on('click', '.row_ua_orders .row_ua_orders_title', function(){
			$(this).toggleClass('active');
			$(this).closest('.row_ua_orders').find('.row_ua_orders_content').stop(true, false).slideToggle('fast');
		});
	});

</script>

<script>

	jQuery(function($){
		$('.payment-type').each(function(){
			if($(this).find('.type-detail').length > 2){
				$(this).find('.type-detail').hide();
				$(this).find('.type-detail:nth-of-type(1), .type-detail:nth-of-type(2)').show();
				$(this).find('.type-detail').last().after('<a href="javascript:void()" class="showmore-click"><?php echo JText::_('COM_DJCLASSIFIEDS_PAYMENT_SHOW_MORE'); ?></a>');
			}
		});
		$('#dj-classifieds').on('click', '.showmore-click', function(){
			$(this).closest('.payment-type').find('.type-detail').show();
			$(this).remove();
		});

		$('#dj-classifieds').on('change', '.chx', function(){
			if(!$(this).is(':checked')){
				$('.chx-all').prop('checked', false);
			}
			showCounter();
		});
		$('#dj-classifieds').on('change', '.chx-all', function(){
			$('.chx').prop('checked', $(this).is(':checked'));
			showCounter();
		});
		function showCounter()
		{
			$('.action-buttons .djcounter').each(function(){
				var action = $(this).closest('button').attr('data-action');
				if(typeof action !== 'undefined'){
					var ids_arr = getIdsArr(action);
					$(this).text(ids_arr.length).closest('button').css('display', (ids_arr.length ? '' : 'none'));
				}
			});
		}
		function getIdsArr(action)
		{
			var ids = [];
			$('.chx:checked').each(function(){
				var item_id = $(this).closest('.row_ua').attr('data-id');
				if(item_id !== 'undefined' && $(this).closest('.row_ua').find('.button[data-action="'+action+'"]').length){
					ids.push(item_id);
				}
			});
			return ids;
		}
		$('#dj-classifieds').on('click', '.row_ua .button.delete, .row_ua .button.archive', function(){
			var item_id = $(this).closest('.row_ua').attr('data-id');
			if(item_id !== 'undefined'){
				$('.chx-all').prop('checked', false).trigger('change');
				$(this).closest('.row_ua').find('.chx').prop('checked', true).trigger('change');
			}
		});
		$('#dj-classifieds').on('click', '.action-button[data-action]', function(){
			var action = $(this).attr('data-action');
			$('#action_type').val(action).prop('disabled', false);
			$('#action_ids').val(getIdsArr(action).join(',')).prop('disabled', false);
			$('#djForm').submit();
		});
	});

</script>

Anon7 - 2022
AnonSec Team