| Current Path : /home/users/unlimited/www/facebook.codeskitter.site/themes/sunshine/layout/ads/ |
| Current File : /home/users/unlimited/www/facebook.codeskitter.site/themes/sunshine/layout/ads/content.phtml |
<div class="row">
<div class="col-md-4 ads_col_4">
<?php echo Wo_LoadPage('ads/includes/header'); ?>
</div>
<div class="col-md-8 ads_col_8">
<div class="page-margin">
<div class="wow_content popular_posts_hdr">
<h2><svg width="18" height="19" viewBox="0 0 18 19" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M5.82829 14.8091L6.57829 14.8091L5.82829 14.8091ZM9.17397 17.4253L9.0168 16.6919L9.0168 16.6919L9.17397 17.4253ZM9.13102 17.4345L9.28818 18.1678L9.28818 18.1678L9.13102 17.4345ZM7.95508 17.4345L8.11225 16.7011L7.95508 17.4345ZM11.2578 14.8529L12.0078 14.8529L11.2578 14.8529ZM5.82829 13.9966L6.01679 13.2707L5.07829 13.027L5.07829 13.9966L5.82829 13.9966ZM11.2578 14.5124L12.0078 14.5124L12.0078 13.7123L11.2094 13.764L11.2578 14.5124ZM6.57829 14.8091L6.57829 14.4016L5.07829 14.4016L5.07829 14.8091L6.57829 14.8091ZM9.0168 16.6919L8.97385 16.7011L9.28818 18.1678L9.33113 18.1586L9.0168 16.6919ZM8.97385 16.7011C8.6899 16.762 8.3962 16.762 8.11225 16.7011L7.79792 18.1678C8.28907 18.2731 8.79703 18.2731 9.28818 18.1678L8.97385 16.7011ZM5.07829 14.8091C5.07829 16.4297 6.21272 17.8281 7.79792 18.1678L8.11225 16.7011C7.21606 16.5091 6.57829 15.7198 6.57829 14.8091L5.07829 14.8091ZM10.5078 14.8529C10.5078 15.738 9.88793 16.5052 9.0168 16.6919L9.33113 18.1586C10.8913 17.8242 12.0078 16.448 12.0078 14.8529L10.5078 14.8529ZM6.57829 14.4016L6.57829 13.9966L5.07829 13.9966L5.07829 14.4016L6.57829 14.4016ZM11.2094 13.764C9.46346 13.8769 7.71035 13.7104 6.01679 13.2707L5.63979 14.7225C7.48793 15.2024 9.401 15.3841 11.3062 15.2609L11.2094 13.764ZM12.0078 14.8529L12.0078 14.5124L10.5078 14.5124L10.5078 14.8529L12.0078 14.8529Z" class="icon_main_fill"></path><path d="M16.3145 5.64144L17.0559 5.52816L17.0559 5.52816L16.3145 5.64144ZM16.3145 10.5268L17.0559 10.6401L16.3145 10.5268ZM1.69298 10.2751L0.954526 10.4062L1.69298 10.2751ZM1.69298 5.89315L2.43143 6.02424L2.43143 6.02424L1.69298 5.89315ZM4.58249 2.53765L4.80367 3.2543L4.58249 2.53765ZM12.6614 1.79649L12.7485 1.05156L12.7485 1.05156L12.6614 1.79649ZM12.1442 14.4322L12.0572 13.6873L12.0572 13.6873L12.1442 14.4322ZM5.07993 13.7841L5.30111 13.0675L5.30111 13.0675L5.07993 13.7841ZM12.9197 1.82668L12.8327 2.57161L12.9197 1.82668ZM16.217 5.00347L15.4756 5.11675L15.4756 5.11675L16.217 5.00347ZM1.71281 5.78142L0.974359 5.65033L0.974358 5.65033L1.71281 5.78142ZM4.69117 13.6641L4.46999 14.3808L4.46999 14.3808L4.69117 13.6641ZM12.7386 14.3627L12.8257 15.1077L12.8257 15.1077L12.7386 14.3627ZM16.2445 10.985L15.5031 10.8717L16.2445 10.985ZM5.82862 13.9967L6.01712 13.2708L5.82862 13.9967ZM11.2581 14.5126L11.2097 13.7641L11.2581 14.5126ZM12.6515 13.6178L12.0572 13.6873L12.2313 15.1771L12.8257 15.1077L12.6515 13.6178ZM5.30111 13.0675L4.91235 12.9475L4.46999 14.3808L4.85875 14.5008L5.30111 13.0675ZM12.5743 2.54142L12.8327 2.57161L13.0068 1.08175L12.7485 1.05156L12.5743 2.54142ZM2.43143 6.02424L2.45127 5.91252L0.974358 5.65033L0.954525 5.76206L2.43143 6.02424ZM15.4756 5.11675L15.5731 5.75471L17.0559 5.52816L16.9584 4.89019L15.4756 5.11675ZM15.5731 10.4135L15.5031 10.8717L16.9859 11.0983L17.0559 10.6401L15.5731 10.4135ZM15.5731 5.75471C15.809 7.29874 15.809 8.86949 15.5731 10.4135L17.0559 10.6401C17.3147 8.94588 17.3147 7.22235 17.0559 5.52816L15.5731 5.75471ZM2.43143 10.144C2.18952 8.78133 2.18952 7.3869 2.43143 6.02424L0.954526 5.76205C0.681824 7.29814 0.681824 8.87009 0.954526 10.4062L2.43143 10.144ZM4.80367 3.2543C7.3157 2.479 9.96259 2.23617 12.5743 2.54142L12.7485 1.05156C9.92957 0.722096 7.07271 0.984178 4.36131 1.82101L4.80367 3.2543ZM12.8327 2.57161C14.1894 2.73018 15.2703 3.7732 15.4756 5.11675L16.9584 4.89019C16.6507 2.87651 15.032 1.31845 13.0068 1.08175L12.8327 2.57161ZM4.36131 1.82101C2.60343 2.36355 1.29559 3.84089 0.974359 5.65033L2.45127 5.91252C2.67397 4.65808 3.58119 3.63159 4.80367 3.2543L4.36131 1.82101ZM4.91235 12.9475C3.62314 12.5496 2.66631 11.467 2.43143 10.144L0.954526 10.4062C1.28793 12.2842 2.64537 13.8176 4.46999 14.3808L4.91235 12.9475ZM12.8257 15.1077C14.9578 14.8585 16.662 13.2181 16.9859 11.0983L15.5031 10.8717C15.2816 12.3214 14.1152 13.4467 12.6515 13.6178L12.8257 15.1077ZM6.01712 13.2708C5.7772 13.2085 5.53846 13.1407 5.30111 13.0675L4.85875 14.5008C5.11777 14.5807 5.37829 14.6547 5.64012 14.7227L6.01712 13.2708ZM12.0572 13.6873C11.7751 13.7202 11.4925 13.7459 11.2097 13.7641L11.3066 15.261C11.6151 15.2411 11.9235 15.2131 12.2313 15.1771L12.0572 13.6873ZM11.2097 13.7641C9.4638 13.8771 7.71069 13.7106 6.01712 13.2708L5.64012 14.7227C7.48827 15.2026 9.40133 15.3842 11.3066 15.261L11.2097 13.7641Z" fill="currentColor"></path><path d="M9.41699 4.58008L8.78038 4.58008C7.55496 4.58008 6.34637 4.86539 5.25033 5.41341" class="icon_main" stroke-width="1.5" stroke-linecap="round"></path></svg> <?php echo $wo['lang']['my_campaigns']; ?></h2>
</div>
</div>
<div class="ads-cont-wrapper ads-cont-wrapper-home">
<?php if (count($wo['ads']) > 0): ?>
<ul class="list-unstyled wow_ads_list_head">
<li class="aid"><?php echo $wo['lang']['id']; ?></li>
<li class="acomp"><?php echo $wo['lang']['company']; ?></li>
<li class="abid"><?php echo $wo['lang']['bidding']; ?></li>
<li class="aclck"><?php echo $wo['lang']['clicks']; ?></li>
<li class="avew"><?php echo $wo['lang']['views']; ?></li>
<li class="asts"><?php echo $wo['lang']['status']; ?></li>
<li class="aemp"></li>
</ul>
<ul class="list-unstyled wow_ads_lists" id="user-ads">
<?php foreach ($wo['ads'] as $wo['ad']): ?>
<?php echo Wo_LoadPage('ads/includes/ads-list');?>
<?php endforeach; ?>
</ul>
<?php else: ?>
<div class="wow_content">
<div class="empty_state">
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M12,8H4A2,2 0 0,0 2,10V14A2,2 0 0,0 4,16H5V20A1,1 0 0,0 6,21H8A1,1 0 0,0 9,20V16H12L17,20V4L12,8M21.5,12C21.5,13.71 20.54,15.26 19,16V8C20.53,8.75 21.5,10.3 21.5,12Z"></path></svg> <?php echo $wo['lang']['no_ads_found']; ?>
</div>
</div>
<?php endif; ?>
</div>
<div class="col-md-12 col-lg-12 col-sm-12 col-sx-12">
<div class="posts_load">
<?php if (count($wo['ads']) > 0): ?>
<div class="load-more">
<button class="btn btn-default text-center pointer load-more-ads">
<svg xmlns="http://www.w3.org/2000/svg" width="19" height="19" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather"><polyline points="6 9 12 15 18 9"></polyline></svg> <?php echo $wo['lang']['load_more'] ?>
</button>
</div>
<?php endif ?>
</div>
</div>
</div>
</div>
<div class="modal fade" id="delete-ad">
<div class="modal-dialog modal-md">
<div class="modal-content">
<div class="wow_pops_head">
<svg height="100px" preserveAspectRatio="none" version="1.1" viewBox="0 0 300 100" width="300px" xmlns="http://www.w3.org/2000/svg"><path d="M30.913,43.944c0,0,42.911-34.464,87.51-14.191c77.31,35.14,113.304-1.952,146.638-4.729 c48.654-4.056,69.94,16.218,69.94,16.218v54.396H30.913V43.944z" fill="currentColor" opacity="0.6"></path> <path d="M-35.667,44.628c0,0,42.91-34.463,87.51-14.191c77.31,35.141,113.304-1.952,146.639-4.729 c48.653-4.055,69.939,16.218,69.939,16.218v54.396H-35.667V44.628z" fill="currentColor" opacity="0.6"></path> <path d="M-34.667,62.998c0,0,56-45.667,120.316-27.839C167.484,57.842,197,41.332,232.286,30.428 c53.07-16.399,104.047,36.903,104.047,36.903l1.333,36.667l-372-2.954L-34.667,62.998z" fill="currentColor"></path></svg>
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z"></path></svg></button>
<h4><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path fill="currentColor" d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z"></path></svg> <?php echo $wo['lang']['delete_ad'] ?></h4>
</div>
<div class="modal-body">
<p><?php echo $wo['lang']['confirm_delete_ad']; ?></p>
</div>
<div class="modal-footer">
<button type="button" onclick="Wo_DeleteAd($('#delete-ad').attr('data-userad-id'))" class="btn btn-main btn-mat"><?php echo $wo['lang']['delete']; ?></button>
</div>
</div>
</div>
</div>
<script>
jQuery(document).ready(function($) {
$(document).on('click', '.delete-ad', function(event) {
var self = $(this);
$("#delete-ad").attr('data-userad-id',self.attr('id')).modal("show");
});
$(document).on('click', '.toggle-user-ad-status', function(event) {
var self = $(this);
var ad_id = self.attr('id');
var ad_status = self.attr('data-status');
$.ajax({
url: Wo_Ajax_Requests_File(),
type: 'GET',
dataType: 'json',
data: {f: 'ads',s:'ts',ad_id:ad_id,status:ad_status},
})
.done(function(data) {
if (data.status == 200) {
$("[data-ad-status='"+ad_id+"']").find('span').text(data.ad);
if (ad_status == 0) {
self.html('<span class="wow_ad_sts_actv"><?php echo $wo['lang']['active']; ?></span>');
self.attr('data-status',1);
}
else{
self.html('<span class="wow_ad_sts_noactv"><?php echo $wo['lang']['not_active']; ?></span>');
self.attr('data-status',0);
}
}
})
.fail(function() {
console.log("error");
})
});
$(".load-more-ads").click(function(event) {
var last_ad = ($("li[data-ad-id]").length > 0) ? $("li[data-ad-id]").last().attr('data-ad-id') : 0;
var self = $(this);
$.ajax({
url: Wo_Ajax_Requests_File(),
type: 'GET',
dataType: 'json',
data: {f: 'ads',s:'lm',ad_id:last_ad},
})
.done(function(data) {
if (data.status == 200) {
$("#user-ads").append(data.html);
}
else if(data.status == 404){
self.removeClass('load-more-ads').html(data.html);
}
else{
self.remove();
}
})
.fail(function() {
console.log("error");
})
});
});
function Wo_DeleteAd(id){
if (id && id > 0) {
$.ajax({
url: Wo_Ajax_Requests_File(),
type: 'GET',
dataType: 'json',
data: {f: 'wallet',s:'remove',id:id},
})
.done(function(data) {
if (data.status == 200) {
$("tr[data-ad-id="+id+"]").slideUp(function(){
$(this).remove();
})
$("#delete-ad").modal("hide");
location.reload();
}
})
.fail(function() {
console.log("error");
})
}
}
</script>