<?php 
    $options[] = array(
        'name' => __('Opciones de tablas de precios','HOSTING_SP'),
        'type' => 'heading',
		'std'  => 'dollar'
    );
        $options[] = array(
            'id' => 'pricing_img_back',
            'desc' => 'Imagen de Fondo',
            'type' => 'upload'
        );
        $options[] = array(
            'id' => 'show_pricing',
            'desc' => 'Configuración Mostrar Estilo',
            'std' => 1,
            'type' => 'checkbox'
        );
        //FIRST ZONE CONFIGURATION    
        $options[] = array(
            'name' => __('Primera Zona Info Plan','HOSTING_SP'),
            'type' => 'toggle'
        );
            $options[] = array(
                'id' => 'show_pricing1',
                'desc' => 'Configuración Mostrar Estilo',
                'std' => 1,
                'type' => 'checkbox'
            );
            $options[] = array(
                'id' => 'pricing1_plans_title',
                'desc' => 'Titulo',
                'std' => 'Basic',
                'type' => 'text',
                'class' => 'medium'
            );
            $options[] = array(
                'id' => 'pricing1_plans_detail',
                'desc' => 'Detalle',
                'std' => 'Small Company',
                'type' => 'text',
                'class' => 'medium'
            );
            
            $args=array(
                'post_type' => 'plan',
                'post_status' => 'publish',
                'posts_per_page' => -1,
            );
            $my_query = null;
            $my_query = new WP_Query($args);
            $plan = array();
            
            while ($my_query->have_posts()) {
                $my_query->the_post();
                $plan[] = array(
                    'title' => get_the_title(),
                    'subtitle' => get_field('subtitle'),
                    'price' => get_field('price'),
                    'freq' => get_field('frequency'),
                    'options' => get_field('options'),
                    'category' => get_field('categoria'),
                    'btn_title' => get_field('btn_title'),
                    'btn_link' => get_field('btn_link')
                );
            }
            $c = 0;
            $options[] = array(
                'name' => 'Planes para mostrar',
                'type' => 'info'
            );
            $options[] = array(
                'id' => 'price_first_plansel',
                'desc' => 'Planee Categoría para mostrar',
                'std' => 'Plan1',
                'options' => array(
                    'Plan1' => 'Plan1',
                    'Plan2' => 'Plan2',
                    'Plan3' => 'Plan3',
                    'Plan4' => 'Plan4'
                ),
                'type' => 'select'
            );
            
            /*foreach($plan as $key){
                $c++;
                if(of_get_option('price_first_plansel') && of_get_option('price_first_plansel') == $key['category']){
                    $options[] = array(
                        'id' => 'price_first_plan'.$c,
                        'desc' => 'Plan: '.$key['title'],
                        'std' => 0,
                        'type' => 'checkbox'
                    );
                }
            }*/
                       
        $options[] = array(
            'name' => __('Primera Zona Info Plan','HOSTING_SP'),
            'type' => 'toggle-close'
        );
        
        //SECOND PLAN ZONE
        $options[] = array(
            'name' => __('Segundo Info Zone Plan','HOSTING_SP'),
            'type' => 'toggle'
        );
            $options[] = array(
                'id' => 'show_pricing2',
                'desc' => 'Configuración Mostrar Estilo',
                'std' => 1,
                'type' => 'checkbox'
            );
            $options[] = array(
                'id' => 'pricing2_title',
                'desc' => 'Titulo',
                'std' => 'pricing2s Option One',
                'type' => 'text'
            );
            $options[] = array(
                'id' => 'pricing2_desc',
                'desc' => 'Descripcion',
                'std' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit',
                'type' => 'textarea'
            );
            $options[] = array(
                'id' => 'pricing2_num',
                'desc' => 'Numero de precios',
                'std' => '4',
                'type' => 'text',
                'class' => 'mini'
            );
            if(of_get_option('pricing2_num')?$cant_=of_get_option('pricing2_num'):$cant_=4);
            for($i=1; $i<=$cant_; $i++){
               $options[] = array(
                    'name' => 'Plan Data '.$i,
                    'type' => 'toggle'
               ); 
                    $options[] = array(
                        'id' => 'pricing2_image'.$i,
                        'desc' => 'Imagen',
                        'type' => 'upload'
                    );
                    $options[] = array(
                        'id' => 'pricing2_image_link'.$i,
                        'desc' => 'Imagen Link',
                        'type' => 'Text'
                    );
                    $options[] = array(
                        'id' => 'pricing2_title'.$i,
                        'desc' => 'Titulo',
                        'std' => 'Domain Registration',
                        'type' => 'text'
                    );
                    $options[] = array(
                        'id' => 'pricing2_detail'.$i,
                        'desc' => 'Detalle',
                        'std' => 'Subtitle',
                        'type' => 'text'
                    );
                    $options[] = array(
                        'id' => 'pricing2_desc'.$i,
                        'desc' => 'Descripcion',
                        'std' => 'Register domains quickly and easily through your Core Account. HostDime offers all popular TLD extensions and allows you to managed your web hosting and domains all in one place to make billing and organization as simple as possible. Don\'t have a Core account yet?
    Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante. Donec eu libero sit amet quam egestas semper. Aenean ultricies mi vitae est. Mauris placerat eleifend leo.',
                        'type' => 'textarea'
                    ); 
                        $options[] = array(
                            'id' => 'show_pricing2_price'.$i,
                            'desc' => 'Configuración Mostrar Estilo',
                            'std' => 1,
                            'type' => 'checkbox'
                        );
                        $options[] = array(
                            'id' => 'pricing2_price'.$i,
                            'desc' => 'Precio',
                            'std' => '500',
                            'type' => 'text',
                            'class' => 'mini'
                        );
                        $options[] = array(
                            'id' => 'pricing2_frec'.$i,
                            'desc' => 'Ciclo Facturacion',
                            'std' => 'Daitly',
                            'options' => array(
                                'Daitly' => 'Diario',
                                'Monthly' => 'Mensual',
                                'Yearly' => 'Anual'
                            ),
                            'type' => 'radio',
                            'class' => 'side'
                        );
                    $options[] = array(
                        'id' => 'pricing2_btn'.$i,
                        'desc' => 'Buton',
                        'std' => 'Choose Plan',
                        'type' => 'text',
                    );                   
                    $options[] = array(
                        'id' => 'pricing2_btn_link'.$i,
                        'desc' => 'Link',
                        'type' => 'text',
                    );
               $options[] = array(
                    'name' => 'Plan Data '.$i,
                    'type' => 'toggle-close'
               );
            }
        $options[] = array(
            'name' => __('Segundo Info Zone Plan','HOSTING_SP'),
            'type' => 'toggle-close'
        );
        
        //LAST PLAN ZONE CONFIGURATION
        $options[] = array(
            'name' => __('Información del Tercer Plan de Zona','HOSTING_SP'),
            'type' => 'toggle'
        );
            $options[] = array(
                'id' => 'show_pricing3',
                'desc' => 'Configuración Mostrar Estilo',
                'std' => 1,
                'type' => 'checkbox'
            );
            $options[] = array(
                'id' => 'pricing3_title',
                'desc' => 'Titulo',
                'std' => 'Services Option One',
                'type' => 'text'
            );
            $options[] = array(
                'id' => 'pricing3_desc',
                'desc' => 'Descripcion',
                'std' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit',
                'type' => 'textarea'
            );
            
            $args=array(
                'post_type' => 'price',
                'post_status' => 'publish',
                'posts_per_page' => -1,
            );
            $my_query = null;
            $my_query = new WP_Query($args);
            $plan = array();
            
            while ($my_query->have_posts()) {
                $my_query->the_post();
                $plan[] = array(
                    'title' => get_the_title(),
                    'logo' => get_field('logo'),
                    'price' => get_field('price'),
                    'btn_title' => get_field('btn_title'),
                    'btn_link' => get_field('btn_link')
                );
            }
            $c = 0;
            
            $options[] = array(
                'name' => 'Precios tablas para mostrar',
                'type' => 'info'
            );
            
            foreach($plan as $key){
                $c++;
                $options[] = array(
                    'id' => 'price_first_price'.$c,
                    'desc' => 'Tabla de Precios: '.$key['title'],
                    'std' => 0,
                    'type' => 'checkbox'
                );
            }
          
        $options[] = array(
            'name' => __('Información del Tercer Plan de Zona','HOSTING_SP'),
            'type' => 'toggle-close'
        );
        
        
?>