<?php 
    $options[] = array(
        'name' => __('Opciones ilimitadas Servidor','HOSTING_SP'),
        'type' => 'heading',
		'std'  => 'dashboard'
    );

        $options[] = array(
            'id' => 'unl_img_back',
            'desc' => 'Imagen fondo',
            'type' => 'upload'
        );
        $options[] = array(
            'id' => 'show_server_unl',
            'desc' => 'Configuración Mostrar Estilo',
            'std' => 1,
            'type' => 'checkbox'
        );

          $options[] = array(
            'name' => __('Información Planes Zona','HOSTING_SP'),
            'type' => 'toggle'
          );
            $options[] = array(
                'id' => 'show_unl_plans',
                'desc' => 'Configuración Mostrar Estilo',
                'std' => 1,
                'type' => 'checkbox'
            );
            $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' => 'unlim_plan',
                'desc' => 'Planee Categoría para mostrar',
                'std' => 'Plan1',
                'options' => array(
                    'Plan1' => 'Plan1',
                    'Plan2' => 'Plan2',
                    'Plan3' => 'Plan3',
                    'Plan4' => 'Plan4'
                ),
                'type' => 'select'
            );
           /* $options[] = array(
                'id' => 'unl_plans_num',
                'desc' => 'Numeros de plan',
                'std' => '4',
                'type' => 'text',
                'class' => 'mini'
            );
            if(of_get_option('unl_plans_num')?$cant_p=of_get_option('unl_plans_num'):$cant_p=4);
            for($i=1; $i<=$cant_p; $i++){
                $options[] = array(
                        'name' => 'Plan '.$i,
                        'type' => 'toggle'
                    );
                        $options[] = array(
                            'id' => 'unl_plans_title'.$i,
                            'desc' => 'Titulo',
                            'std' => 'Basic',
                            'type' => 'text',
                            'class' => 'medium'
                        );
                        $options[] = array(
                            'id' => 'unl_plans_detail'.$i,
                            'desc' => 'Detalle',
                            'std' => 'Basic',
                            'type' => 'text',
                            'class' => 'medium'
                        );

                            $options[] = array(
                                'id' => 'show_unl_plans_price'.$i,
                                'desc' => 'Configuración Mostrar Estilo',
                                'std' => 1,
                                'type' => 'checkbox'
                            );
                            $options[] = array(
                                'id' => 'unl_plans_price'.$i,
                                'desc' => 'Precio',
                                'std' => '500',
                                'type' => 'text',
                                'class' => 'mini'
                            );
                            $options[] = array(
                                'id' => 'unl_plans_frec'.$i,
                                'desc' => 'Ciclo Facturacion',
                                'std' => 'Daitly',
                                'options' => array(
                                    'Daitly' => 'Diario',
                                    'Monthly' => 'Mensual',
                                    'Yearly' => 'Anual'
                                ),
                                'type' => 'radio',
                                'class' => 'side'
                            );

                        $options[] = array(
                            'id' => 'unl_plans_row_num'.$i,
                            'desc' => 'Number of Row\'s Plan',
                            'std' => '5',
                            'type' => 'text',
                            'class' => 'mini'
                        );
                        if(of_get_option('unl_plans_row_num'.$i)?$cant_plans_row=of_get_option('unl_plans_row_num'.$i):$cant_plans_row=5);
                        for($j=1; $j<=$cant_plans_row; $j++){
                            $options[] = array(
                                'name' => 'Row '.$j,
                                'type' => 'toggle'
                            );
                                $options[] = array(
                                    'id' => 'unl_plans_row'.$i.$j,
                                    'desc' => 'Descripcion',
                                    'std' => '500 GB Disk Space',
                                    'type' => 'text',
                                );
                                foreach(font_awesome_icon('unl_plan'.$i.$j) as $val){
                                    $options[] = $val;
                                }      
                            $options[] = array(
                                'name' => 'Row '.$j,
                                'type' => 'toggle-close'
                            );
                        }
                        $options[] = array(
                            'id' => 'unl_plans_btn'.$i,
                            'desc' => 'Texto Boton',
                            'std' => 'Choose Plan',
                            'type' => 'text',
                            'class' => 'medium'
                        );
                        $options[] = array(
                            'id' => 'unl_plans_btn_link'.$i,
                            'desc' => 'Link Boton',
                            'type' => 'text'
                        );
                    $options[] = array(
                        'name' => 'Plan '.$i,
                        'type' => 'toggle-close'
                    );
            }  */
          $options[] = array(
            'name' => __('Información Planes Zona','HOSTING_SP'),
            'type' => 'toggle-close'
          );
          $options[] = array(
            'name' => __('Trabajadores Info Zona','HOSTING_SP'),
            'type' => 'toggle'
          );
            $options[] = array(
                'id' => 'show_unl_work',
                'desc' => 'Configuración Mostrar Estilo',
                'std' => 1,
                'type' => 'checkbox'
            );
            $options[] = array(
                'id' => 'unl_work_title',
                'desc' => 'Titulo',
                'std' => 'Title Text',
                'type' => 'text'
            );
            $options[] = array(
                'id' => 'unl_work_detail',
                'desc' => 'Detalle',
                'std' => 'Detail Text',
                'type' => 'text'
            );
            $options[] = array(
                'id' => 'unl_work_num',
                'desc' => 'Número de Workkers',
                'std' => '6',
                'type' => 'text',
                'class' => 'mini'
            );
            if(of_get_option('unl_work_num')?$cant_i=of_get_option('unl_work_num'):$cant_i=6);
            for($i=1; $i<=$cant_i; $i++){
                $options[] = array(
                    'name' => 'Image '.$i,
                    'type' => 'toggle'
                );  
                    $options[] = array(
                        'id' => 'unl_work_name'.$i,
                        'desc' => 'Nombre',
                        'std' => 'Name Text',
                        'type' => 'text'
                    );
                    $options[] = array(
                        'id' => 'unl_work_ocupation'.$i,
                        'desc' => 'Ocupacion',
                        'std' => 'Ocupation Text',
                        'type' => 'text'
                    );
                    $options[] = array(
                        'id' => 'unl_work_img'.$i,
                        'std' => 'Image URL',
                        'type' => 'upload'
                    );
                $options[] = array(
                    'name' => 'Image '.$i,
                    'type' => 'toggle-close'
                );  
            }
          $options[] = array(
            'name' => __('Trabajadores Info Zona','HOSTING_SP'),
            'type' => 'toggle-close'
          );
?>