<?php
require_once('config.php');
require_once('inc/header.php');
?>
<main id="main" class="main">
  <div class="row">
    <div class="col-6 align-items-center">
      <div class="pagetitle mb-2">
        <h1><?php echo $page_title ?></h1>
      </div>
    </div>
  </div>
  <section class="section mt-4">
    <div class="row">
      <div class="col-lg-12">

        <form action="" method="post" enctype="multipart/form-data">
          <?php
          $args = array(
              'fields' => array(
                array(
                    'field_id'       => 'CategoryAdsCtl',
                    'field_type'     => 'switch',
                    'field_title'     => 'Show Ads Positions',
                    'field_desc'  => 'View ad positions to understand their placement. Hidden ads will appear based on device size.',
                    'field_data' => $_POST['CategoryAdsCtl'],
                ),
                array(
                    'field_id'       => 'CategoryAds1',
                    'field_type'     => 'ads',
                    'field_title'    => 'Category Ads 1',
                    'field_subtitle' => 'Use Image ads or Custom Ads Code',
                    'field_data'     => $_POST['CategoryAds1'],
                ),
                array(
                    'field_id'       => 'CategoryAds2',
                    'field_type'     => 'ads',
                    'field_title'    => 'Category Ads 2',
                    'field_subtitle' => 'Use Image ads or Custom Ads Code',
                    'field_data'     => $_POST['CategoryAds2'],
                ),
                array(
                    'field_id'       => 'CategoryAds3',
                    'field_type'     => 'ads',
                    'field_title'    => 'Category Ads 3',
                    'field_subtitle' => 'Use Image ads or Custom Ads Code',
                    'field_data'     => $_POST['CategoryAds3'],
                ),
                array(
                    'field_id'       => 'CategoryAds4',
                    'field_type'     => 'ads',
                    'field_title'    => 'Category Ads 4',
                    'field_subtitle' => 'Use Image ads or Custom Ads Code',
                    'field_data'     => $_POST['CategoryAds4'],
                ),
                array(
                    'field_id'       => 'CategoryAds5',
                    'field_type'     => 'ads',
                    'field_title'    => 'Category Ads 5',
                    'field_subtitle' => 'Use Image ads or Custom Ads Code',
                    'field_data'     => $_POST['CategoryAds5'],
                ),
                array(
                    'field_id'       => 'CategoryAds6',
                    'field_type'     => 'ads',
                    'field_title'    => 'Category Ads 6',
                    'field_subtitle' => 'Use Image ads or Custom Ads Code',
                    'field_data'     => $_POST['CategoryAds6'],
                ),
                array(
                    'field_id'       => 'CategoryAds7',
                    'field_type'     => 'ads',
                    'field_title'    => 'Category Ads 7',
                    'field_subtitle' => 'Use Image ads or Custom Ads Code',
                    'field_data'     => $_POST['CategoryAds7'],
                ),
                array(
                    'field_id'       => 'CategoryAds8',
                    'field_type'     => 'ads',
                    'field_title'    => 'Category Ads 8',
                    'field_subtitle' => 'Use Image ads or Custom Ads Code',
                    'field_data'     => $_POST['CategoryAds8'],
                ), 
                array(
                    'field_id'     => 'update',
                    'field_type'   => 'button',
                    'btn_theme' => 'success',
                    'field_title'   => 'Save Changes',
                )
              )
          );
          AdvanceNews($args);
          ?>
          </form>

       </div>
    </div>
  </section>
</main>
<?php require_once('inc/footer.php'); ?>
