<?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'       => 'PopupAdsCtl',
                    'field_type'     => 'switch',
                    'field_title'     => 'Show Popup Ad',
                    'field_data' => $_POST['PopupAdsCtl'],
                ),
                array(
                    'field_id'       => 'PopupAds',
                    'field_type'     => 'ads',
                    'field_title'    => 'Popup Ads',
                    'field_subtitle' => 'Show Popup Ad all page',
                    'field_data'     => $_POST['PopupAds'],
                ),
                array(
                    'field_id'       => 'PopupAdsLoadTime',
                    'field_type'     => 'text',
                    'field_title'    => 'Load Ad Time',
                    'field_subtitle' => 'Show   Ad after Load page (in second)',
                    'field_data'     => $_POST['PopupAdsLoadTime'],
                ),
                array(
                    'field_id'       => 'PopupAdsLoadAdd',
                    'field_type'     => 'text',
                    'field_title'    => 'Ads Distance ',
                    'field_subtitle' => 'Show Ad after First Load (in minutes)',
                    'field_data'     => $_POST['PopupAdsLoadAdd'],
                ),
                array(
                    'field_type'     => 'separetor',
                ),
                array(
                    'field_id'       => 'topPopupAds',
                    'field_type'     => 'ads',
                    'field_title'    => 'Top Floating Ads',
                    'field_subtitle' => 'Floating Header Ads',
                    'field_data'     => $_POST['topPopupAds'],
                ),
                array(
                    'field_type'     => 'separetor',
                ),
                array(
                    'field_id'       => 'bottomPopupAds',
                    'field_type'     => 'ads',
                    'field_title'    => 'Bottom Floating Ads',
                    'field_subtitle' => 'Floating Bottom Ads',
                    'field_data'     => $_POST['bottomPopupAds'],
                ),
                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'); ?>
