<?php $__env->startSection('title'); ?> <?php if( ! empty($title)): ?> <?php echo e($title); ?> | <?php endif; ?> ##parent-placeholder-3c6de1b7dd91465d437ef415f94f36afc1fbc8a8## <?php $__env->stopSection(); ?>


<?php $__env->startSection('main'); ?>

        <div id="wrapper">

            <?php echo $__env->make('admin.sidebar_menu', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>

            <div id="page-wrapper">
                <?php if( ! empty($title)): ?>
                    <div class="row">
                        <div class="col-lg-12">
                            <h1 class="page-header"> <?php echo e($title); ?>  </h1>
                        </div> <!-- /.col-lg-12 -->
                    </div> <!-- /.row -->
                <?php endif; ?>

                <?php echo e(Form::open(['route'=>'save_settings','class' => 'form-horizontal', 'files' => true])); ?>


                    <h4><?php echo app('translator')->getFromJson('app.website_monetization_help_text'); ?></h4>

                    <hr />

                    <div class="form-group <?php echo e($errors->has('enable_monetize')? 'has-error':''); ?>">
                        <label class="col-md-4 control-label"><?php echo app('translator')->getFromJson('app.enable_disable'); ?> </label>
                        <div class="col-md-8">
                            <label for="enable_monetize" class="checkbox-inline">
                                <input type="checkbox" value="1" id="enable_monetize" name="enable_monetize" <?php echo e(get_option('enable_monetize') == 1 ? 'checked="checked"': ''); ?>>
                                <?php echo app('translator')->getFromJson('app.enable_monetize'); ?>
                            </label>

                            <?php echo $errors->has('type')? '<p class="help-block">'.$errors->first('type').'</p>':''; ?>

                        </div>
                    </div>

                    <div class="form-group">
                        <label for="" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.test_adsens_code'); ?> </label>
                        <div class="col-sm-8">
<pre><?php echo e('<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- TestCSP -->
<ins class="adsbygoogle"
     style="display:block"
     data-ad-client="ca-pub-8618780985613063"
     data-ad-slot="5484345690"
     data-ad-format="auto"></ins>
<script>
    (adsbygoogle = window.adsbygoogle || []).push({});
</script>'); ?></pre>
                        </div>
                    </div>




                    <legend><?php echo app('translator')->getFromJson('app.homepage'); ?></legend>
                    <div class="form-group">
                        <label for="monetize_code_below_slider" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.below_slider'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_below_slider" class="form-control"><?php echo e(get_option('monetize_code_below_slider')); ?></textarea>
                        </div>
                    </div>


                    <div class="form-group">
                        <label for="monetize_code_below_search_bar" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.below_search_bar'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_below_search_bar" class="form-control"><?php echo e(get_option('monetize_code_below_search_bar')); ?></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="monetize_code_below_categories" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.below_categories'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_below_categories" class="form-control"><?php echo e(get_option('monetize_code_below_categories')); ?></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="monetize_code_below_premium_ads" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.below_premium_ads'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_below_premium_ads" class="form-control"><?php echo e(get_option('monetize_code_below_premium_ads')); ?></textarea>
                        </div>
                    </div>


                    <div class="form-group">
                        <label for="monetize_code_below_regular_ads" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.below_regular_ads'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_below_regular_ads" class="form-control"><?php echo e(get_option('monetize_code_below_regular_ads')); ?></textarea>
                        </div>
                    </div>

                    <legend><?php echo app('translator')->getFromJson('app.listing_page'); ?></legend>

                    <div class="form-group">
                        <label for="monetize_code_listing_sidebar_top" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.sidebar_top'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_listing_sidebar_top" class="form-control"><?php echo e(get_option('monetize_code_listing_sidebar_top')); ?></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="monetize_code_listing_sidebar_bottom" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.sidebar_bottom'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_listing_sidebar_bottom" class="form-control"><?php echo e(get_option('monetize_code_listing_sidebar_bottom')); ?></textarea>
                        </div>
                    </div>


                    <div class="form-group">
                        <label for="monetize_code_listing_above_premium_ads" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.above_premium_ads'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_listing_above_premium_ads" class="form-control"><?php echo e(get_option('monetize_code_listing_above_premium_ads')); ?></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="monetize_code_listing_above_regular_ads" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.above_regular_ads'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_listing_above_regular_ads" class="form-control"><?php echo e(get_option('monetize_code_listing_above_regular_ads')); ?></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="monetize_code_listing_below_regular_ads" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.below_regular_ads'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_listing_below_regular_ads" class="form-control"><?php echo e(get_option('monetize_code_listing_below_regular_ads')); ?></textarea>
                        </div>
                    </div>


                    <legend><?php echo app('translator')->getFromJson('app.single_ad_page'); ?></legend>

                    <div class="form-group">
                        <label for="monetize_code_below_ad_title" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.below_ad_title'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_below_ad_title" class="form-control"><?php echo e(get_option('monetize_code_below_ad_title')); ?></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="monetize_code_below_ad_description" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.below_ad_description'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_below_ad_description" class="form-control"><?php echo e(get_option('monetize_code_below_ad_description')); ?></textarea>
                        </div>
                    </div>

                    <div class="form-group">
                        <label for="monetize_code_below_general_info" class="col-sm-4 control-label"><?php echo app('translator')->getFromJson('app.below_general_info'); ?> </label>
                        <div class="col-sm-8">
                            <textarea name="monetize_code_below_general_info" class="form-control"><?php echo e(get_option('monetize_code_below_general_info')); ?></textarea>
                        </div>
                    </div>

                    <hr />
                <div class="form-group">
                    <div class="col-sm-offset-4 col-sm-8">
                        <button type="submit" id="settings_save_btn" class="btn btn-primary"><?php echo app('translator')->getFromJson('app.save_settings'); ?></button>
                    </div>
                </div>

                <?php echo e(Form::close()); ?>


            </div>   <!-- /#page-wrapper -->

        </div>   <!-- /#wrapper -->
<?php $__env->stopSection(); ?>


<?php $__env->startSection('page-js'); ?>
    <script>
        $(document).ready(function(){

            $('input[type="checkbox"], input[type="radio"]').click(function(){
                var input_name = $(this).attr('name');
                var input_value = 0;
                if ($(this).prop('checked')){
                    input_value = $(this).val();
                }
                $.ajax({
                    url : '<?php echo e(route('save_settings')); ?>',
                    type: "POST",
                    data: { [input_name]: input_value, '_token': '<?php echo e(csrf_token()); ?>' }
                });
            });

            /**
             * Send settings option value to server
             */
            $('#settings_save_btn').click(function(e){
                e.preventDefault();

                var this_btn = $(this);
                this_btn.attr('disabled', 'disabled');

                var form_data = this_btn.closest('form').serialize();
                $.ajax({
                    url : '<?php echo e(route('save_settings')); ?>',
                    type: "POST",
                    data: form_data,
                    success : function (data) {
                        if (data.success == 1){
                            this_btn.removeAttr('disabled');
                            toastr.success(data.msg, '<?php echo app('translator')->getFromJson('app.success'); ?>', toastr_options);
                        }
                    }
                });
            });

        });
    </script>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layout.main', \Illuminate\Support\Arr::except(get_defined_vars(), array('__data', '__path')))->render(); ?>