<?php defined('ABSPATH') or die("No script kiddies please!"); ?>
<?php 
        global $wpdb;
        $pages = $this->get_all_page_lists();
        $posts = $this->get_all_post_lists();
        $categories = $this->get_categories();
		$category=array();
        $product_categories = $this->get_product_categories('product_cat', $category);
        $product_tags = $this->get_product_categories('product_tag', $category);
        $args = array('public'   => true,'_builtin' => false);
        $output = 'objects'; 
        $operator = 'and';
        $post_types = get_post_types( $args, $output, $operator );
        $all_post_types = array();
        foreach($post_types as $post_type){ 
            $all_post_types[] = $post_type->name; 
            }
        $table_name = $wpdb->prefix . "wp_floating_menu_details";
        $menu_detail = $wpdb->get_results("SELECT * FROM $table_name WHERE id=".$_GET['id']);
        foreach ($menu_detail as $rows){
            $id = $_GET['id'];
        }    
        $menu_option_setting = unserialize($rows->menu_display_setting_details);
    ?>
<div class="wpfm-menu-option-setting-wrapper" style="display: block;">
    <div class="wpfm-header-title"><h3><?php _e('Menu Options','wpfm-floating-menu-pro'); ?></h3></div>
    <p class="wpfm-text"><?php _e('You can also select individual menu options in pages.','wpfm-floating-menu-pro'); ?></p>
    <div class="wpfm-menu-option-setting-field">
        <label class="menu-option-label-controller"><h4><?php _e('Enable/Disable Menu','wp-floating-menu-pro');?></h4>
            <input type="checkbox" value="1" name="menu_option[menu_enable_disable]" <?php if(isset($menu_option_setting['menu_option']['menu_enable_disable'])&& $menu_option_setting['menu_option']['menu_enable_disable'] == '1'){?>checked="checked"<?php } ?>/>
        </label>
    </div>
     <div class="wpfm-menu-option-setting-field">
        <label class="menu-option-label-controller"><h4><?php _e('Enable/Disable For Mobile','wp-floating-menu-pro');?></h4>
            <input type="checkbox" value="1" name="menu_option[mobile_menu_enable_disable]" <?php if(isset($menu_option_setting['menu_option']['mobile_menu_enable_disable'])&& $menu_option_setting['menu_option']['mobile_menu_enable_disable'] == '1'){?>checked="checked"<?php } ?>/>
        </label>
    </div>
    <div class="wpfm-menu-option-setting-field">
        <label class="menu-option-label-controller"><h4><?php _e('Show Menu On','wp-floating-menu-pro');?></label></h4>
        <div class="menu-option-inner-input">
            <select name="menu_option[menu_show_hide_on]" class="wpfm-display-menu-option" >
                <option value="all-pages"  <?php if(isset($menu_option_setting['menu_option']['menu_show_hide_on'])&& $menu_option_setting['menu_option']['menu_show_hide_on'] == 'all-pages'){?>selected="selected"<?php } ?>><?php _e('Show on all Pages','wp-floating-menu-pro');?></option>
                <option value="home-page"  <?php if(isset($menu_option_setting['menu_option']['menu_show_hide_on'])&& $menu_option_setting['menu_option']['menu_show_hide_on'] == 'home-page'){?>selected="selected"<?php } ?>><?php _e('Home page Only','wp-floating-menu-pro');?></option>
                <option value="page-specific"  <?php if(isset($menu_option_setting['menu_option']['menu_show_hide_on'])&& $menu_option_setting['menu_option']['menu_show_hide_on'] == 'page-specific'){?>selected="selected"<?php } ?>><?php _e('Show on Specific Pages','wp-floating-menu-pro');?></option>
            </select>
        </div>
    </div>
    <div class="menu-option-select-specific-page"  <?php if(isset($menu_option_setting['menu_option']['menu_show_hide_on'])&& $menu_option_setting['menu_option']['menu_show_hide_on'] == 'page-specific'){?>style="display: block;"<?php } else{?> style="display: none;"<?php } ?>>
    <?php 
        if(count($pages) > 0){
        foreach($pages as $key=>$val){ ?>
                <ul class="wpfm-page-specific-display">
                    <li>
                        <input type="checkbox" id="wpfm-page-display-checkbox" class="wpfm-display-add-check" name="menu_option[page_specific_display][]" id="wpfm-add-check-page" value="<?php echo $key;?>" <?php if(!empty( $showpages_array) && in_array($key ,$showpages_array)) { echo "selected='selected'"; } ?>/>
                        <span class="pages"><?php echo $val;?></span>
                    </li>
                </ul>
        <?php } } else{ echo __('<span class="wpfm-no-content-error">No pages to display</span>','wp-floating-menu-pro'); }?>

    </div>
</div>