<?php $__env->startSection('content'); ?>
    <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">
                            <h4>Edit Publisher</h4>
                        </div>
                        <div class="card-body">
                            <form action="<?php echo e(url('admin/update-publishers')); ?>" method="post" id="updates_publisher"
                                enctype="multipart/form-data">
                                <?php echo csrf_field(); ?>
                                <input type="hidden" id="id" name="id" value="<?php echo e($data->id); ?>">
                                <input type="hidden" name="hidden_img" value="<?php echo e($data->publisher_image); ?>">
                                <input type="hidden" name="hidden_nid" value="<?php echo e($data->nid); ?>">
                                <input type="hidden" name="hidden_tax" value="<?php echo e($data->tax_file); ?>">
                                <div class="row">
                                    <div class="form-group col-lg-6">
                                        <label><b> Name</b></label>
                                        <input type="text" value="<?php echo e($data->name); ?>" name="name" class="form-control">
                                    </div>
                                    <div class="col-lg-6   ">
                                        <label><b>Phone</b></label>
                                        <div class="form-group">
                                            <select class="form-control" name="phone_code"
                                                style="width: 30%;float: left;">
                                                <?php $__currentLoopData = $country_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cuntry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($cuntry->phonecode); ?>"
                                                        <?php echo e($cuntry->phonecode == $data->phone_code ? 'selected' : null); ?>>
                                                        <?php echo e($cuntry->phonecode); ?>-<?php echo e($cuntry->country_name); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                            <input type="number" placeholder="Enter Phone Number "
                                                style="width: 70%;float: left" class="form-control"
                                                value="<?php echo e($data->phone); ?>" name="phone">
                                        </div>
                                    </div>
                                    <div class="form-group col-lg-6">
                                        <label><b>Address</b></label>
                                        <input type="text" value="<?php echo e($data->address); ?>" name="address"
                                            class="form-control">
                                    </div>
                                    <div class="form-group col-lg-6">
                                        <label><b>Region</b></label>
                                        <input type="text" value="<?php echo e($data->regions); ?>" name="regions"
                                            class="form-control">
                                    </div>
                                    <div class="form-group col-lg-6">
                                        <label><b>City</b></label>
                                        <input type="text" value="<?php echo e($data->city); ?>" name="city" class="form-control">
                                    </div>
                                    <div class="col-lg-6  col-lg-6">
                                        <div class="form-group">
                                            <label><b>Zip/Postal Code</b></label>
                                            <input type="text" placeholder="Enter Zip/Postal Code" class="form-control "
                                                value="<?php echo e($data->postal_code); ?>" name="zip">

                                        </div>
                                    </div>
                                    <div class="col-lg-6">
                                        <div class="form-group">
                                            <label><b>Skype</b></label>
                                            <input type="text" placeholder="Enter Skype Name "
                                                class="form-control <?php $__errorArgs = ['skype'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                value="<?php echo e($data->skype); ?>" name="skype">

                                        </div>
                                    </div>

                                    <div class="col-lg-6  form-group">
                                        <label> Account Status</label>
                                        <select type="text" name="status" id="status" class="form-control">
                                            
                                            <option value="Inactive" <?php echo e($data->status == 'Inactive' ? 'selected' : ''); ?>>
                                                Inactive</option>
                                            <option value="Active" <?php echo e($data->status == 'Active' ? 'selected' : ''); ?>>
                                                Active
                                            </option>
                                        </select>
                                    </div>
                                    <div class="col-lg-6  form-group">
                                        <label> Affliate Manager</label>
                                        <select type="text" name="affliate_manager" class="form-control">
                                            <option value="">Select Affliate Manager</option>

                                            <?php $__currentLoopData = $Affliate; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $Affliate): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($Affliate->id); ?>"
                                                    <?php echo e($data->affliate_manager_id == $Affliate->id ? 'selected' : ''); ?>>
                                                    <?php echo e($Affliate->name); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>

                                    <div class="col-lg-6 form-group">
                                        <label> Email</label>
                                        <input type="email" name="email" value="<?php echo e($data->email); ?>"
                                            class="form-control" required="">
                                    </div>

                                    <div class="col-lg-6 form-group">
                                        <label class="form-label">Countries</label>

                                        <select class="form-control" name="countries" style="width: 100%">
                                            <option></option>
                                            <?php $__currentLoopData = $country_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $cuntry): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                <option value="<?php echo e($cuntry->country_name); ?>"
                                                    <?php echo e($data->country == $cuntry->country_name ? 'selected' : ''); ?>>
                                                    <?php echo e($cuntry->country_name); ?></option>
                                            <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                        </select>
                                    </div>

                                    <div class="col-lg-6  ">
                                        <div class="form-group">
                                            <label><b>Website Url</b></label>
                                            <input type="text" placeholder="Enter Website Url " class="form-control "
                                                value="<?php echo e($data->website_url); ?>" name="website_url">

                                        </div>
                                    </div>
                                    <div class="col-lg-6  ">
                                        <div class="form-group">
                                            <label><b>Payment terms</b></label>
                                            <select class="form-control"  value="<?php echo e($data->payment_terms); ?>" name="payment_terms">
                                                    <option <?php if($data->payment_terms == 'net45'): ?> selected <?php endif; ?> value="net45">Every
                                                45 Days</option>
                                            <option <?php if($data->payment_terms == 'net30'): ?> selected <?php endif; ?> value="net30">
                                                Monthly</option>
                                            <option <?php if($data->payment_terms == 'net15'): ?> selected <?php endif; ?> value="net15">Every
                                                15 days</option>
                                            <option <?php if($data->payment_terms == 'net7'): ?> selected <?php endif; ?> value="net7">
                                                Weekly</option>
                                        </select>
                                        </div>
                                    </div>


                                    <div class="col-lg-6  ">
                                        <div class="form-group">
                                            <label><b>Monthly Traffic</b></label>

                                            <select class="form-control <?php $__errorArgs = ['monthly_traffic'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                value="<?php echo e($data->monthly_traffic); ?>" name="monthly_traffic">
                                                <option value="">Select Traffic</option>
                                                <option value="Less than 1k"
                                                    <?php echo e('Less than 1k' == $data->monthly_traffic ? 'selected' : null); ?>>
                                                    Less
                                                    than 1k</option>
                                                <option value="1K to 5K"
                                                    <?php echo e('1K to 5K' == $data->monthly_traffic ? 'selected' : null); ?>>1K to
                                                    5K
                                                </option>
                                                <option value="5K to 10K"
                                                    <?php echo e('5K to 10K' == $data->monthly_traffic ? 'selected' : null); ?>>5K to
                                                    10K
                                                </option>
                                                <option value="10K to 50K"
                                                    <?php echo e('10K to 50K' == $data->monthly_traffic ? 'selected' : null); ?>>10K
                                                    to 50K
                                                </option>
                                                <option value="50K  to 100K"
                                                    <?php echo e('50K  to 100K ' == $data->monthly_traffic ? 'selected' : null); ?>>
                                                    50K to
                                                    100K</option>
                                                <option value="100K to 1M"
                                                    <?php echo e('100K to 1M' == $data->monthly_traffic ? 'selected' : null); ?>>100K
                                                    to 1M
                                                </option>
                                                <option value="More than 1 M"
                                                    <?php echo e('More than 1 M' == $data->monthly_traffic ? 'selected' : null); ?>>
                                                    More
                                                    than 1 M</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="col-lg-6  ">
                                        <div class="form-group">
                                            <label><b>Site Category</b></label>
                                            <select name="category"
                                                class="form-control <?php $__errorArgs = ['category'];
$__bag = $errors->getBag($__errorArgs[1] ?? 'default');
if ($__bag->has($__errorArgs[0])) :
if (isset($message)) { $__messageOriginal = $message; }
$message = $__bag->first($__errorArgs[0]); ?> is-invalid <?php unset($message);
if (isset($__messageOriginal)) { $message = $__messageOriginal; }
endif;
unset($__errorArgs, $__bag); ?>"
                                                value="<?php echo e($data->category); ?>">
                                                <option value="">Select Category</option>
                                            
                                                <?php $__currentLoopData = $site_category_list; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $site): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                    <option value="<?php echo e($site->site_category_name); ?>"
                                                        <?php echo e($site->site_category_name == $data->category ? 'selected' : null); ?>>
                                                        <?php echo e($site->site_category_name); ?></option>
                                                <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                                            </select>
                                        </div>
                                    </div>
                                    
                                    <div class="col-lg-10  form-group">
                                        <label> Photo</label>
                                        <input type="file" name="photo1" class="form-control">
                                    </div>
                                    <div class="col-lg-2  form-group">

                                        <a id="publisher_image_anchor" target="_blank"><img width="70px" height="100px"
                                                id="publisher_image"
                                                src="<?php echo e(asset('uploads')); ?>/<?php echo e($data->publisher_image); ?>"></a>
                                    </div>
                                        <div class="row my-4" id="showdata">
                                                        
                                                         <?php $__currentLoopData = $payment; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $p): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                                                             <div class="col-12 col-lg-6 mb-3">
                                                                 <div class="card shadow-none border mb-3 mb-md-0">
                                                                     <div class="card-body">
                                                                         <div class="media align-items-center">
                                                                             <div class="col-lg-5 text-center">
                                                                                 <?php if($p->payment_type == 'Paypal'): ?>
                                                                                     <img src="<?php echo e(url('assets/img/paypal.png')); ?>"
                                                                                         height="150" width='100%' alt="">
                                                                                 <?php elseif($p->payment_type == 'Skrill'): ?>
                                                                                     <img src="<?php echo e(url('assets/img/skrill.png')); ?>"
                                                                                         height="150" width='100%' alt="">
                                                                                 <?php elseif($p->payment_type == 'Bitcoin'): ?>
                                                                                     <img src="<?php echo e(url('assets/img/bitcoin.png')); ?>"
                                                                                         height="150" width='100%' alt="">
                                                                                 <?php elseif($p->payment_type == 'Payoneer'): ?>
                                                                                     <img src="<?php echo e(url('assets/img/payoneer.png')); ?>"
                                                                                         height="150" width='100%' alt="">
                                                                                 <?php elseif($p->payment_type == 'Web Money'): ?>
                                                                                     <img src="<?php echo e(url('assets/img/webmoney.png')); ?>"
                                                                                         height="150" width='100%' alt="">
                                                                                 <?php elseif($p->payment_type == 'Bank Wire'): ?>
                                                                                     <img src="<?php echo e(url('assets/img/bankwire.png')); ?>"
                                                                                         height="150" width='100%' alt="">
                                                                                 <?php endif; ?>
                                                                             </div>
                                                                             <div class="media-body ml-2">

                                                                                 <h6 class="mb-0 ">
                                                                                     ....<?php echo e(substr($p->payment_details, strlen($p->payment_details) - 4)); ?>

                                                                                 </h6>
                                                                                 <p class="text-warning">
                                                                                     <?php echo e($p->created_at); ?></p>
                                                                                 <p class="text-primary">
                                                                                     <?php echo e($p->is_primary == 1 ? 'Primary' : ''); ?>

                                                                                 </p>
                                                                             </div>
                                                                         </div>
                                                                     </div>
                                                                
                                                                 </div>
                                                             </div>
                                                         <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                                                    

                                                     </div>
                                    <div class="col-lg-12 mt-2">
                                        <button type="submit" class="btn btn-primary">Update</button>
                                    </div>

                                </div>
                            </form>
                        </div>
                    </div>
                </div>
            </div>

        </div>
    </div>
<?php $__env->stopSection(); ?>
<?php $__env->startSection('js'); ?>
<script>
$(function() {
     
        <?php if(Session::has('success')): ?>
            Swal.fire('Success','<?php echo e(Session::get('success')); ?>','success');
        <?php endif; ?>
        <?php if(Session::has('error')): ?>
            Swal.fire('Error','<?php echo e(Session::get('error')); ?>','error');
                
            <?php endif; ?>
});
</script>
<?php $__env->stopSection(); ?>

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