<?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
          // Get All Categorys
          $all_cat = [];
          $data_published_cat = showAllttdata("mahamudfutureit_category", "WHERE CategorySataus ='Published'");
          if (!empty($data_published_cat)) {
            foreach ($data_published_cat as $this_category) {
              $my_cat_id = $this_category['CategoryID'];
              $all_cat[$my_cat_id] = $this_category['CategoryName'];
            }
          } 
          $args = array(
              'fields' => array(
                array(
                    'field_id'       => 'Footer_Design',
                    'field_type'     => 'ui-select',
                    'field_title'     => 'Footer Layout',
                    'field_data' => $_POST['Footer_Design'],
                    'field_plc_img' => 'includes/template-part/footer/images/',
                    'field_plc_img_size' => 'col-md-12',
                    'field_required' => true,
                    'field_options' =>  array(
                      'footer_one' => 'Footer Layout One',
                      'footer_two' => 'Footer Layout Two',
                      'footer_three' => 'Footer Layout Three',
                      'footer_four' => 'Footer Layout Four',
                      'footer_five' => 'Footer Layout Five',
                      'footer_six' => 'Footer Layout Six',
                     ),
                ),
                array(
                    'field_id'       => 'Footer_Container',
                    'field_type'     => 'select',
                    'field_title'     => 'Footer Container',
                    'field_data' => $_POST['Footer_Container'],
                    'field_options' =>  array(
                      'container' => 'Boxed',
                      'container-fluid' => 'Full Width',
                     ),
                ),
                array(
                    'field_id'       => 'Footer_Categorys',
                    'field_type'     => 'select',
                    'field_title'     => 'Category List',
                    'field_multiple'     => true,
                    'field_data' => $_POST['Footer_Categorys'],
                    'field_options' => $all_cat,
                ),
                array(
                    'field_id'       => 'Footer_BgColor',
                    'field_type'     => 'color',
                    'field_title'     => 'Footer Background Color',
                    'field_data' => $_POST['Footer_BgColor'],
                ),

                array(
                    'field_id'       => 'Footer_BgColor_Dark',
                    'field_type'     => 'color',
                    'field_title'     => 'Background Color Dark',
                    'field_data' => $_POST['Footer_BgColor_Dark'],
                ),
                array(
                    'field_id'       => 'Footer_BgImage',
                    'field_type'     => 'select_file',
                    'field_image'   => true,
                    'field_title'     => 'Footer Background Image',
                    'field_data' => $_POST['Footer_BgImage'],
                ),
                array(
                    'field_id'       => 'Footer_Logo',
                    'field_type'     => 'select_file',
                    'field_image'   => true,
                    'field_title'     => 'Footer Logo',
                    'field_desc'  => 'Logo For Mobile and PC Footer',
                    'field_data' => $_POST['Footer_Logo'],
                    'field_required' => true,
                ),

                array(
                    'field_id'       => 'Footer_Logo_Dark',
                    'field_type'     => 'select_file',
                    'field_image'   => true,
                    'field_title'     => '  Logo Dark',
                    'field_desc'  => 'Logo For Mobile and PC Footer Dark Theme',
                    'field_data' => $_POST['Footer_Logo_Dark'],
                    'field_required' => true,
                ),
                array(
                    'field_id'       => 'Footer_logo_size',
                    'field_type'     => 'text',
                    'field_title'     => 'Footer Logo Size',
                    'field_desc'  => 'Footer Logo Size in px.',
                    'field_data' => $_POST['Footer_logo_size'],
                    'field_required' => true,
                ),
                array(
                    'field_id'       => 'Footer_Copyright_Text',
                    'field_type'     => 'text',
                    'field_title'     => 'Copyright Text',
                    'field_data' => $_POST['Footer_Copyright_Text'],
                ),
                array(
                    'field_type'     => 'separetor',
                    'field_title'     => 'Footer Top',
                    'field_desc'  => 'Footer Top Style',
                ),
                array(
                    'field_id'       => 'FooterTop_BgColor',
                    'field_type'     => 'color',
                    'field_title'     => 'Background Color',
                    'field_data' => $_POST['FooterTop_BgColor'],
                ),
                array(
                    'field_id'       => 'FooterTop_BgColor_Dark',
                    'field_type'     => 'color',
                    'field_title'     => 'Background Color Dark',
                    'field_data' => $_POST['FooterTop_BgColor_Dark'],
                ),
                array(
                    'field_id'       => 'FooterTop_TextColor',
                    'field_type'     => 'color',
                    'field_title'     => 'Text Color',
                    'field_data' => $_POST['FooterTop_TextColor'],
                ),
                array(
                    'field_id'       => 'FooterTop_TextColor_Dark',
                    'field_type'     => 'color',
                    'field_title'     => 'Text Color Dark',
                    'field_data' => $_POST['FooterTop_TextColor_Dark'],
                ),
                array(
                    'field_id'       => 'FooterTop_Padding',
                    'field_type'     => 'text',
                    'field_title'     => 'Padding',
                    'field_data' => $_POST['FooterTop_Padding'],
                    'field_desc'  => 'Padding in PX (Top Right Bottom Left)',
                ),
                array(
                    'field_id'       => 'FooterTop_TextSize',
                    'field_type'     => 'text',
                    'field_title'     => 'Text Size',
                    'field_data' => $_POST['FooterTop_TextSize'],
                ),
                array(
                    'field_id'       => 'FooterTop_BorderColor',
                    'field_type'     => 'color',
                    'field_title'     => 'Border Bottom',
                    'field_data' => $_POST['FooterTop_BorderColor'],
                ),
                array(
                    'field_type'     => 'separetor',
                    'field_title'     => 'Footer Middle',
                    'field_desc'  => 'Footer Middle Style',
                ),
                array(
                    'field_id'       => 'FooterMiddleBgColor',
                    'field_type'     => 'color',
                    'field_title'     => 'Background Color',
                    'field_data' => $_POST['FooterMiddleBgColor'],
                ),
                array(
                    'field_id'       => 'Footer_Middle_BgImage',
                    'field_type'     => 'select_file',
                    'field_image'   => true,
                    'field_title'     => 'Background Image',
                    'field_data' => $_POST['Footer_Middle_BgImage'],
                ),
                array(
                    'field_id'       => 'FooterMiddle_TextColor',
                    'field_type'     => 'color',
                    'field_title'     => 'Text Color',
                    'field_data' => $_POST['FooterMiddle_TextColor'],
                ),
                array(
                    'field_id'       => 'FooterMiddle_TextColor_Dark',
                    'field_type'     => 'color',
                    'field_title'     => 'Text Color Dark',
                    'field_data' => $_POST['FooterMiddle_TextColor_Dark'],
                ),
                array(
                    'field_id'       => 'FooterMiddlePadding',
                    'field_type'     => 'text',
                    'field_title'     => 'Padding',
                    'field_data' => $_POST['FooterMiddlePadding'],
                    'field_desc'  => 'Padding in PX (Top Right Bottom Left)',
                ),
                array(
                    'field_id'       => 'FooterMiddleTextSize',
                    'field_type'     => 'text',
                    'field_title'     => 'Text Size',
                    'field_data' => $_POST['FooterMiddleTextSize'],
                ),
                array(
                    'field_type'     => 'separetor',
                    'field_title'     => 'Footer Bottom',
                    'field_desc'  => 'Footer Bottom Style',
                ),
                array(
                    'field_id'       => 'FooterBottom_BgColor',
                    'field_type'     => 'color',
                    'field_title'     => 'Background Color',
                    'field_data' => $_POST['FooterBottom_BgColor'],
                ),
                array(
                    'field_id'       => 'FooterBottom_BgColor_Dark',
                    'field_type'     => 'color',
                    'field_title'     => 'Background Color Dark',
                    'field_data' => $_POST['FooterBottom_BgColor_Dark'],
                ),
                array(
                    'field_id'       => 'FooterBottom_TextColor',
                    'field_type'     => 'color',
                    'field_title'     => 'Text Color',
                    'field_data' => $_POST['FooterBottom_TextColor'],
                ),
                array(
                    'field_id'       => 'FooterBottom_TextColor_Dark',
                    'field_type'     => 'color',
                    'field_title'     => 'Text Color Dark',
                    'field_data' => $_POST['FooterBottom_TextColor_Dark'],
                ),
                array(
                    'field_id'       => 'FooterBottom_Padding',
                    'field_type'     => 'text',
                    'field_title'     => 'Padding',
                    'field_data' => $_POST['FooterBottom_Padding'],
                    'field_desc'  => 'Padding in PX (Top Right Bottom Left)',
                ),
                array(
                    'field_id'       => 'FooterBottom_TextSize',
                    'field_type'     => 'text',
                    'field_title'     => 'Text Size',
                    'field_data' => $_POST['FooterBottom_TextSize'],
                ),
                array(
                    'field_id'       => 'FooterBottom_BorderColor',
                    'field_type'     => 'color',
                    'field_title'     => 'Border Top',
                    'field_data' => $_POST['FooterBottom_BorderColor'],
                ),
                array(
                    'field_type'     => 'separetor',
                    'field_title'     => 'Site Information',
                    'field_desc'  => 'Publisher Info',
                ),
                array(
                    'field_id'       => 'Publisher_Info',
                    'field_type'     => 'textarea',
                    'field_title'     => 'Publisher Information',
                    'field_data' => $_POST['Publisher_Info'],
                ),
                array(
                    'field_id'       => 'Publisher_Address',
                    'field_type'     => 'textarea',
                    'field_title'     => 'Office Address',
                    'field_data' => $_POST['Publisher_Address'],
                    'field_plugin' => true,
                ),
                array(
                    'field_type'     => 'separetor',
                    'field_title'     => 'Social Media',
                    'field_desc'  => 'Social Media Style',
                ),
                array(
                    'field_id'       => 'Footer_SocialIcon',
                    'field_type'     => 'ui-select',
                    'field_title'     => 'Social Icon Style',
                    'field_data' => $_POST['Footer_SocialIcon'],
                    'field_plc_img' => 'includes/template-part/header/images/',
                    'field_desc'  => '<a href="option-social.php">Add Social Media Link </a>',
                    'field_plc_img_size' => 'col-md-6',
                    'field_required' => true,
                    'field_options' =>  array(
                      'border_rounded_color' => 'Border Rounded Color',
                      'border_rounded_gray' => 'Border Rounded  Gray',
                      'border_squere_color' => 'Border Squere Color',
                      'border_squere_gray' => 'Border Squere Gray',
                      'normal_color' => 'Normal Color',
                      'normal_gray' => 'Normal  Gray',
                     ),
                ),
                array(
                    'field_type'     => 'separetor',
                    'field_title'     => 'Download Buttons',
                    'field_desc'  => 'Play Store and App Store Button',
                ),
                array(
                    'field_id'       => 'FT_PlayStore_Link',
                    'field_type'     => 'text',
                    'field_title'     => 'Android App Link',
                    'field_data' => $_POST['FT_PlayStore_Link'],
                ),
                array(
                    'field_id'       => 'FT_AppStore_Link',
                    'field_type'     => 'text',
                    'field_title'     => 'App Store Link',
                    'field_data' => $_POST['FT_AppStore_Link'],
                ),
                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'); ?>
