| Current Path : /home/users/unlimited/www/facebook.codeskitter.site/themes/sunshine/layout/offers/ |
| Current File : /home/users/unlimited/www/facebook.codeskitter.site/themes/sunshine/layout/offers/content.phtml |
<div class="page-margin">
<div class="row">
<div class="col-md-2 leftcol"><?php echo Wo_LoadPage("sidebar/left-sidebar"); ?></div>
<div class="col-md-7 singlecol">
<?php if ($wo['config']['user_ads'] == 1): ?>
<div id="sidebar-sticky-offer">
<?php
$wo['sidebar-ad'] = Wo_GetAdsByType('offer');
if (!empty($wo['sidebar-ad'])) {
echo Wo_LoadPage('ads/includes/offer-ad');
}
?>
<div class="clear"></div>
</div>
<?php endif; ?>
<div class="page-margin mt-0">
<div class="wow_content popular_posts_hdr">
<h2><svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.04495 2.82205C7.77675 1.05932 10.2233 1.05932 10.9551 2.82205L11.4648 4.04986C11.7645 4.77175 12.4225 5.2722 13.1856 5.35868L14.608 5.51987C16.4044 5.72344 17.1463 7.97958 15.8344 9.24903L14.6267 10.4176C14.0957 10.9314 13.8611 11.6882 14.0057 12.4204L14.2973 13.8965C14.6664 15.765 12.6647 17.1757 11.0848 16.1606L10.1309 15.5476C9.4397 15.1035 8.5603 15.1035 7.86909 15.5476L6.91516 16.1606C5.33528 17.1757 3.33359 15.765 3.7027 13.8965L3.99429 12.4204C4.13894 11.6882 3.90431 10.9314 3.37331 10.4176L2.16559 9.24903C0.853651 7.97958 1.5956 5.72344 3.39195 5.51987L4.81438 5.35868C5.57754 5.2722 6.23553 4.77175 6.53522 4.04986L7.04495 2.82205Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
<path d="M7.86909 15.5476L6.91516 16.1606C5.33528 17.1757 3.33359 15.765 3.7027 13.8965L3.99429 12.4204C4.13894 11.6882 3.90431 10.9314 3.37331 10.4176L2.16559 9.24903C0.853651 7.97958 1.5956 5.72344 3.39195 5.51987L4.81438 5.35868C5.57754 5.27219 6.23553 4.77175 6.53522 4.04986L7.04495 2.82205C7.77675 1.05932 10.2233 1.05932 10.9551 2.82205L11.4648 4.04986C11.7645 4.77175 12.4225 5.27219 13.1856 5.35868L14.608 5.51987C16.4044 5.72344 17.1463 7.97958 15.8344 9.24903L14.6267 10.4176C14.0957 10.9314 13.8611 11.6882 14.0057 12.4204" class="icon_main" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path>
</svg> <?php echo $wo['lang']['offers']; ?></h2>
</div>
</div>
<?php
$data = array();
$data['limit'] = 10;
$offers = Wo_GetAllOffers($data);
if (count($offers) > 0) {
?>
<div class="row" id="products">
<?php
foreach ($offers as $key => $wo['offer']) {
echo Wo_LoadPage('offers/offers');
}
} else {
echo '<div class="wow_content"><div class="empty_state"><svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.04495 2.82205C7.77675 1.05932 10.2233 1.05932 10.9551 2.82205L11.4648 4.04986C11.7645 4.77175 12.4225 5.2722 13.1856 5.35868L14.608 5.51987C16.4044 5.72344 17.1463 7.97958 15.8344 9.24903L14.6267 10.4176C14.0957 10.9314 13.8611 11.6882 14.0057 12.4204L14.2973 13.8965C14.6664 15.765 12.6647 17.1757 11.0848 16.1606L10.1309 15.5476C9.4397 15.1035 8.5603 15.1035 7.86909 15.5476L6.91516 16.1606C5.33528 17.1757 3.33359 15.765 3.7027 13.8965L3.99429 12.4204C4.13894 11.6882 3.90431 10.9314 3.37331 10.4176L2.16559 9.24903C0.853651 7.97958 1.5956 5.72344 3.39195 5.51987L4.81438 5.35868C5.57754 5.2722 6.23553 4.77175 6.53522 4.04986L7.04495 2.82205Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path><path d="M7.86909 15.5476L6.91516 16.1606C5.33528 17.1757 3.33359 15.765 3.7027 13.8965L3.99429 12.4204C4.13894 11.6882 3.90431 10.9314 3.37331 10.4176L2.16559 9.24903C0.853651 7.97958 1.5956 5.72344 3.39195 5.51987L4.81438 5.35868C5.57754 5.27219 6.23553 4.77175 6.53522 4.04986L7.04495 2.82205C7.77675 1.05932 10.2233 1.05932 10.9551 2.82205L11.4648 4.04986C11.7645 4.77175 12.4225 5.27219 13.1856 5.35868L14.608 5.51987C16.4044 5.72344 17.1463 7.97958 15.8344 9.24903L14.6267 10.4176C14.0957 10.9314 13.8611 11.6882 14.0057 12.4204" class="icon_main" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg> ' . $wo['lang']['no_available_offers'] . '</div></div>';
}
?>
</div>
<div class="posts_load load-produts">
<?php if (count($offers) > 0): ?>
<div class="load-more">
<button class="btn btn-default text-center wo_load_more" onclick="Wo_LoadOffers();">
<span><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z"></path></svg></span> <?php echo $wo['lang']['load_more_offers'] ?>
</button>
</div>
<?php endif ?>
</div>
<div class="clear"></div>
</div>
<div class="clear"></div>
<br>
<?php echo Wo_LoadPage('footer/content'); ?>
</div>
<div class="modal fade" id="delete-offer-modal" role="dialog">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg></span></button>
<h4 class="modal-title"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-trash-2"><polyline points="3 6 5 6 21 6"></polyline><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6m3 0V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2"></path><line x1="10" y1="11" x2="10" y2="17"></line><line x1="14" y1="11" x2="14" y2="17"></line></svg> <?php echo $wo['lang']['delete_offer']; ?></h4>
</div>
<div class="modal-body">
<p><?php echo $wo['lang']['confirm_delete_offer']; ?></p>
<input type="hidden" id="delet_offer_id">
</div>
<div class="modal-footer">
<div class="ball-pulse"><div></div><div></div><div></div></div>
<button id="delete-all-post" type="button" onclick="Wo_DeleteOffer();" class="btn btn-main"><?php echo $wo['lang']['delete']; ?></button>
</div>
</div>
</div>
</div>
</div>
<script>
function Wo_OpenOfferDeleteBox(offer_id) {
$('#delet_offer_id').val(offer_id);
var delete_box = $('#delete-offer-modal');
delete_box.modal({
show: true
});
}
function Wo_DeleteOffer() {
Wo_CloseLightbox();
var offer_id = $('#delet_offer_id').val();
var delete_box = $('#delete-offer-modal');
$('#delete-offer-modal').find('.ball-pulse').fadeIn(100);
$.get(Wo_Ajax_Requests_File(), {
f: 'offer',
s: 'delete_offer',
offer_id: offer_id
}, function (data) {
if(data.status == 200) {
delete_box.modal('hide');
setTimeout(function () {
$('#product-' + offer_id).slideUp(200, function () {
$(this).remove();
});
}, 300);
}
$('#delete-offer-modal').find('.ball-pulse').fadeOut(100);
});
}
function Wo_LoadOffers() {
$('.load-produts').html('<div class="white-loading list-group"><div class="cs-loader"><div class="cs-loader-inner"><label> ●</label><label> ●</label><label> ●</label><label> ●</label><label> ●</label><label> ●</label></div></div></div>');
var $last_id = $('.product:last').attr('data-id');
$.post(Wo_Ajax_Requests_File() + '?f=offer&s=load_more', {last_id: $last_id}, function (data) {
if (data.status == 200) {
if (data.html.length > 0) {
$('.load-produts').html('<div class="load-more"><button class="btn btn-default text-center pointer" onclick="Wo_LoadOffers();"><i class="fa fa-arrow-down progress-icon" data-icon="arrow-down"></i> <?php echo $wo['lang']['load_more_offers'] ?></button></div>');
$('#products').append(data.html);
} else {
$('.load-produts').html('<div class="load-more"><button class="btn btn-default text-center pointer" onclick="Wo_LoadOffers();"><?php echo $wo['lang']['no_available_offers'] ?></button></div>');
}
}
});
}
</script>