 
 <?php $__env->startSection('content'); ?>
     <link href="https://xbladecdn.b-cdn.net/cnew/site/css/bootstrap-slider.css" rel="stylesheet">
         <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
    <link href="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/dataTables.bootstrap4.css" rel="stylesheet"
        type="text/css" />
    <link href="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/datatables.mark.css" rel="stylesheet"
        type="text/css" />
    <link href="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/buttons.bootstrap4.css" rel="stylesheet"
        type="text/css" />
    <link href="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/responsive.bootstrap4.css" rel="stylesheet"
        type="text/css" />
    <link href="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/select.bootstrap4.css" rel="stylesheet"
        type="text/css" />
    <script src="https://cdn.jsdelivr.net/npm/bootstrap-select@1.13.14/dist/js/bootstrap-select.min.js"></script>

        <link href="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/css/select2.min.css" rel="stylesheet" />
     <style type="text/css">
         [slider] {
             position: relative;
             height: 14px;
             border-radius: 10px;
             text-align: left;
             margin: 45px 0 10px 0;
         }
.js-example-basic-multiple, .selectpicker{
 height:43px!important;
}
         .bootstrap-select {
             width: 100% !important;
            
         }

         [slider]>div {
             position: absolute;
             left: 13px;
             right: 15px;
             height: 14px;
         }

         [slider]>div>[inverse-left] {
             position: absolute;
             left: 0;
             height: 14px;
             border-radius: 10px;
             background-color: #CCC;
             margin: 0 7px;
         }

         [slider]>div>[inverse-right] {
             position: absolute;
             right: 0;
             height: 14px;
             border-radius: 10px;
             background-color: #CCC;
             margin: 0 7px;
         }

         [slider]>div>[range] {
             position: absolute;
             left: 0;
             height: 14px;
             border-radius: 14px;
             background-color: #1ABC9C;
         }

         [slider]>div>[thumb] {
             position: absolute;
             top: -7px;
             z-index: 2;
             height: 28px;
             width: 28px;
             text-align: left;
             margin-left: -11px;
             cursor: pointer;
             box-shadow: 0 3px 8px rgba(0, 0, 0, 0.4);
             background-color: #FFF;
             border-radius: 50%;
             outline: none;
         }

         [slider]>input[type=range] {
             position: absolute;
             pointer-events: none;
             -webkit-appearance: none;
             z-index: 3;
             height: 14px;
             top: -2px;
             width: 100%;
             -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
             filter: alpha(opacity=0);
             -moz-opacity: 0;
             -khtml-opacity: 0;
             opacity: 0;
         }

         div[slider]>input[type=range]::-ms-track {
             -webkit-appearance: none;
             background: transparent;
             color: transparent;
         }

         div[slider]>input[type=range]::-moz-range-track {
             -moz-appearance: none;
             background: transparent;
             color: transparent;
         }

         div[slider]>input[type=range]:focus::-webkit-slider-runnable-track {
             background: transparent;
             border: transparent;
         }

         div[slider]>input[type=range]:focus {
             outline: none;
         }

         div[slider]>input[type=range]::-ms-thumb {
             pointer-events: all;
             width: 28px;
             height: 28px;
             border-radius: 0px;
             border: 0 none;
             background: red;
         }

         div[slider]>input[type=range]::-moz-range-thumb {
             pointer-events: all;
             width: 28px;
             height: 28px;
             border-radius: 0px;
             border: 0 none;
             background: red;
         }

         div[slider]>input[type=range]::-webkit-slider-thumb {
             pointer-events: all;
             width: 28px;
             height: 28px;
             border-radius: 0px;
             border: 0 none;
             background: red;
             -webkit-appearance: none;
         }

         div[slider]>input[type=range]::-ms-fill-lower {
             background: transparent;
             border: 0 none;
         }

         div[slider]>input[type=range]::-ms-fill-upper {
             background: transparent;
             border: 0 none;
         }

         div[slider]>input[type=range]::-ms-tooltip {
             display: none;
         }

         [slider]>div>[sign] {
             opacity: 1;
             position: absolute;
             margin-left: -11px;
             top: -39px;
             z-index: 3;
             background-color: #1ABC9C;
             color: #fff;
             width: 28px;
             height: 28px;
             border-radius: 28px;
             -webkit-border-radius: 28px;
             align-items: center;
             -webkit-justify-content: center;
             justify-content: center;
             text-align: center;
         }

         [slider]>div>[sign]:after {
             position: absolute;
             content: '';
             left: 0;
             border-radius: 16px;
             top: 19px;
             border-left: 14px solid transparent;
             border-right: 14px solid transparent;
             border-top-width: 16px;
             border-top-style: solid;
             border-top-color: #1ABC9C;
         }

         [slider]>div>[sign]>span {
             font-size: 12px;
             font-weight: 700;
             line-height: 28px;
         }

         [slider]:hover>div>[sign] {
             opacity: 1;
         }
     </style>

     <!--page-content-wrapper-->
     <div class="page-content-wrapper">
         <div class="page-content">
             <div class="row">
                 <div class="col-lg-12 ">
                     <div class="card radius-10">
                         <div class="card-header">
                             <h5 class="mb-0">Filter All Offers</h5>
                         </div>
                         <div class="card-body">
                             <form  method="get">
                                 <?php echo csrf_field(); ?>
                                 <div class="row">
                                     <div class="col-lg-12 mb-3">
                                         <label>Payout</label>
                                         <div slider id="slider-distance"
                                             style="margin: 0px!important;margin-bottom: 20px!important;">
                                             <div>
                                                 <div inverse-left style="width:70%;"></div>
                                                 <div inverse-right style="width:70%;"></div>
                                                 <div range style="left:30%;right:40%;"></div>
                                                 <span thumb style="left:30%;"></span>
                                                 <span thumb style="left:60%;"></span>
                                                 <div sign style="left:30%;">
                                                     $<span id="value">30</span>
                                                 </div>
                                                 <div sign style="left:60%;">
                                                     $<span id="value">60</span>
                                                 </div>
                                             </div>
                                             <input type="range" tabindex="0" value="30" max="100"
                                                 min="0" name="from_payout" step="1"
                                                 oninput="
                                                this.value=Math.min(this.value,this.parentNode.childNodes[5].value-1);
                                                 var value=(100/(parseInt(this.max)-parseInt(this.min)))*parseInt(this.value)-(100/(parseInt(this.max)-parseInt(this.min)))*parseInt(this.min);
                                                var children = this.parentNode.childNodes[1].childNodes;
                                                children[1].style.width=value+'%';
                                                children[5].style.left=value+'%';
                                                 children[7].style.left=value+'%';children[11].style.left=value+'%';
                                                children[11].childNodes[1].innerHTML=this.value;" />

                                             <input type="range" tabindex="0" value="60" max="100"
                                                 min="0" name="to_payout" step="1"
                                                 oninput="
                                                this.value=Math.max(this.value,this.parentNode.childNodes[3].value-(-1));
                                                 var value=(100/(parseInt(this.max)-parseInt(this.min)))*parseInt(this.value)-(100/(parseInt(this.max)-parseInt(this.min)))*parseInt(this.min);
                                                var children = this.parentNode.childNodes[1].childNodes;
                                                children[3].style.width=(100-value)+'%';
                                                children[5].style.right=(100-value)+'%';
                                                children[9].style.left=value+'%';children[13].style.left=value+'%';
                                                 children[13].childNodes[1].innerHTML=this.value;" />
                                         </div>
                                     </div>
                                     <div class="col-lg-4">
                                         <label class="form-label">Countries</label>

                                         <select class="js-example-basic-multiple" name="countries[]" multiple="multiple"
                                             style="width: 100%;">
                                             <option></option>

                                             <?php $__currentLoopData = $country; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $q): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                 <option value="<?php echo e($q->country_name); ?>"><?php echo e($q->country_name); ?></option>
                                             <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                         </select>
                                     </div>
                                     <div class="col-lg-3">
                                          <label class="form-label">Offer Type</label>
                                         <select type="text" name="o_type"  class="form-control">
                                             <option></option>
                                             <option value="private">Private</option>
                                             <option value="public">Public</option>
                                         </select>
                                     </div>
                                     <div class="col-lg-3">
                                         <label class="form-label">Name</label>
                                         <input type="" name="name" class="form-control"
                                             placeholder="Offer Name" id="name">
                                         <input type="hidden" name="page_type" class="form-control"
                                             placeholder="Enter Name Keyword" value="all_offers">
                                     </div>
                                     <div class="col-lg-2">
                                         <label class="form-label">Offer ID</label>
                                         <input type="" name="id" class="form-control"
                                             placeholder="Offer ID" id="id">
                                     </div>

                                     <div class="col-lg-4">
                                         <label class="form-label">Targeting</label>

                                         <select class="js-example-basic-multiple" name="ua_target[]" id="ua_target" multiple
                                             data-actions-box="true" style="width: 100%">

                                             <option value="Windows">Windows</option>
                                             <option value="Android">Android</option>
                                             <option value="Iphone">Iphone</option>
                                             <option value="Ipad">Ipad</option>
                                             <option value="Mac">Mac</option>

                                         </select>
                                     </div>


                                     <div class="col-lg-4">
                                         <label class="form-label">Category</label>
                                         <select name="category[]" class="js-example-basic-multiple" multiple data-actions-box="true"
                                             style="width: 100%">

                                             <?php $__currentLoopData = $category; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $q): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                 <option value="<?php echo e($q->id); ?>"><?php echo e($q->category_name); ?></option>
                                             <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                         </select>
                                     </div>
                                     <?php
                                     $id = isset($_GET['id']) ? $_GET['id'] : '';
                                     $o_type = isset($_GET['o_type']) ? $_GET['o_type'] : '';
                                     $name = isset($_GET['name']) ? $_GET['name'] : '';
                                     $ascending = isset($_GET['ascending']) ? $_GET['ascending'] : '';
                                     $from_payout = isset($_GET['from_payout']) ? $_GET['from_payout'] : '';
                                     $to_payout = isset($_GET['to_payout']) ? $_GET['to_payout'] : '';
                                     $country_list = isset($_GET['countries']) ? $_GET['countries'] : '';
                                         if (!empty($country_list)) {
                                             $country_list = implode(',', $country_list);
                                         }
                                         $ua_target_list = isset($_GET['ua_target']) ? $_GET['ua_target'] : '';
                                         if (!empty($ua_target_list)) {
                                             $ua_target_list = implode(',', $ua_target_list);
                                         }
                                         $category_list = isset($_GET['category']) ? $_GET['category'] : '';
                                         if (!empty($category_list)) {
                                             $category_list = implode(',', $category_list);
                                         }
                                     ?>
                                     <div class="col-lg-3">
                                         <label class="form-label">Order By</label>
                                         <select type="text" name="ascending" id="ascending" class="form-control">

                                             <option value="desc">Descending</option>
                                             <option value="asc">Ascending</option>
                                         </select>
                                     </div>
                                     <div class="col-lg-2 " style="margin-top: 28px">

                                         <button type="submit" class="btn btn-primary">Search</button>

                                     </div>


                                 </div>

                                 <input type="hidden" id="offer_type" name="offer_type" value="public">
                                 <input type="hidden" id="offer_page_name" name="offer_page_name" value="all">
                             </form>
                         </div>

                     </div>
                 </div>
             </div>
             <div class="row">
                 <div class="col-lg-12 mt-3  table-responsive">
                     <div class="card ">
                         <div class="card-header">
                             <h5 class="mb-0">View Public Offers</h5>
                         </div>
                         <div class="card-body">
                             <div class="table-responsive">
                                 <table id="offer_table" class="table table-bordered table-striped dt-responsive nowrap"
                                     style="border-collapse: collapse; border-spacing: 0; width: 100%;">
                                     <thead class="thead thead-light">
                                         <tr>

                                             <td>OID</td>
                                             <td>Preview Image</td>
                                             <td>Name</td>
                                             <td>Category & Verticals</td>
                                             <td>Payout</td>
                                             <td>Allowed Devices</td>
                                             <td style="max-width:100px">Allowed Countries</td>
                                             <td>Allowed Browsers</td>
                                             <td>Action</td>
                                         </tr>
                                     </thead>
                                     <tbody>
                                     </tbody>
                                     <tfoot>
                                     </tfoot>
                                     
                                 </table>

                             </div>

                         </div>
                     </div>
                 </div>
             </div>
         </div>
     </div>
 <?php $__env->stopSection(); ?>
 <?php $__env->startSection('js'); ?>
     <script src="https://code.jquery.com/jquery-3.5.1.js" integrity="sha256-QWo7LDvxbWT2tbbQ97B53yJnYU3WhH/C8ycbRAkjPDc="
         crossorigin="anonymous"></script>
     <script type="text/javascript" src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/jquery.mark.min.js">
     </script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/jquery.dataTables.min.js"></script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/dataTables.bootstrap4.min.js"></script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/dataTables.buttons.min.js"></script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/buttons.bootstrap4.min.js"></script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/dataTables.keyTable.min.js"></script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/dataTables.select.min.js"></script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/buttons.html5.min.js"></script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/buttons.print.min.js"></script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/dataTables.responsive.min.js"></script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/responsive.bootstrap4.min.js"></script>
     <script src="<?php echo e(config('app.url')); ?>/public/public/vendors/datatables/datatables.mark.js"></script>
    <script src="https://cdn.jsdelivr.net/npm/select2@4.1.0-beta.1/dist/js/select2.min.js"></script>


     <script type="text/javascript">
         $(function() {
             $(document).ready(function() {
                    $('.js-example-basic-multiple').select2();
                 var offer_table = $('#offer_table').DataTable({

                     "mark": true,

                     "order": [

                         [0, "desc"]

                     ],

                     "columnDefs": [

                         {

                             "targets": [0],

                             "render": function(data, type, row, meta) {

                                 return '#' + data;

                             }

                         },

                         {

                             "responsivePriority": 1,

                             "targets": 0

                         },

                         {

                             "responsivePriority": 2,

                             "targets": -1,

                             "orderable": false

                         }

                     ],

                     "processing": true,

                     "serverSide": true,

                     "ajax": {

                         url: "<?php echo e(route('publisher.show-all-offers')); ?>",
                         "data": function(d) {
                             d.offer_name = '<?php echo e($name); ?>';
                             d.offer_id = '<?php echo e($id); ?>';
                             d.o_type = '<?php echo e($o_type); ?>';
                             d.countries = '<?php echo e($country_list); ?>';
                             d.ua_target = '<?php echo e($ua_target_list); ?>';
                             d.category = '<?php echo e($category_list); ?>';
                             d.ascending = '<?php echo e($ascending); ?>';
                             d.from_payout = '<?php echo e($from_payout); ?>';
                             d.to_payout = '<?php echo e($to_payout); ?>';
                             d.offer_type = $('#offer_type').val();
                             d.offer_page_name = $('#offer_page_name').val();
                         },
                         error: function(xhr) {

                             session_error(xhr);

                             // console.log(xhr.status);

                         }

                     },

                     "columns": [

                         {
                             "data": "id"
                         },

                         {
                             "data": "offerimage"
                         },
                         {
                             "data": "offer_name"
                         },
                         {
                             "data": "categoryvertics"
                         },

                         {
                             "data": "oferrevshere"
                         },
                         {
                             "data": "device"
                         },
                         {
                             "data": "countries"
                         },
                         {
                             "data": "broweser"
                         },


                         {
                             "data": "offeraction"
                         },

                     ],

                     drawCallback: function(settings) {

                         $(document).find('[data-toggle="tooltip"]').tooltip();

                     },

                     initComplete: function(settings, json) {

                         // $(document).find('[data-toggle="tooltip"]').tooltip();

                     }

                 })
             });
         });
     </script>
 <?php $__env->stopSection(); ?>

<?php echo $__env->make('publisher.layout.dashboard', \Illuminate\Support\Arr::except(get_defined_vars(), ['__data', '__path']))->render(); ?><?php /**PATH /home/ayixmwuy/public_html/aff/backend/resources/views/publisher/offer/all_offers.blade.php ENDPATH**/ ?>