<?php 
    $options[] = array(
        'name' => __('Opciones de Servicios','HOSTING_SP'),
        'type' => 'heading',
		'std'  => 'sitemap'
    );
        $options[] = array(
            'id' => 'sevice_img_back',
            'desc' => 'Imagen de fondo',
            'type' => 'upload'
        );
        $options[] = array(
            'id' => 'show_services',
            'desc' => 'Configuración Mostrar Estilo',
            'std' => 1,
            'type' => 'checkbox'
        );
        //SERVICE ONE
       $options[] = array(
            'name' => __('Primero Informacion de Servicio','HOSTING_SP'),
            'type' => 'toggle'
        );
            $options[] = array(
                'id' => 'show_service_one',
                'desc' => 'Configuración Mostrar Estilo',
                'std' => 1,
                'type' => 'checkbox'
            );
            $options[] = array(
                'id' => 'service_one_title',
                'desc' => 'Titulo',
                'std' => 'Services Option One',
                'type' => 'text'
            );
            $options[] = array(
                'id' => 'service_one_desc',
                'desc' => 'Descripcion',
                'std' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit',
                'type' => 'textarea'
            );
            $options[] = array(
                'id' => 'service_one_num',
                'desc' => 'Número de Servicios',
                'std' => '4',
                'type' => 'text',
                'class' => 'mini'
            );
            if(of_get_option('service_one_num')?$cant_1=of_get_option('service_one_num'):$cant_1=4);
            for($i=1; $i<=$cant_1; $i++){
                $options[] = array(
                    'name' => 'Un servicio de '.$i,
                    'type' => 'toggle'
                );
                    $options[] = array(
                        'id' => 'service_one_title'.$i,
                        'desc' => 'Titulo',
                        'std' => 'Public Cloud',
                        'type' => 'text'
                    );
                    $options[] = array(
                        'id' => 'service_one_detail'.$i,
                        'desc' => 'Detallle',
                        'std' => 'Best Security',
                        'type' => 'text'
                    );
                    $options[] = array(
                        'id' => 'service_one_desc'.$i,
                        'desc' => 'Descripcion',
                        'std' => 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.',
                        'type' => 'textarea'
                    );
                    $options[] = array(
                        'id' => 'service_one_img'.$i,
                        'type' => 'upload'
                    );
                $options[] = array(
                    'name' => 'Un servicio de '.$i,
                    'type' => 'toggle-close'
                );
            }
        $options[] = array(
            'name' => __('Primera informacion  de servicio','HOSTING_SP'),
            'type' => 'toggle-close'
        );  
        //SERVICE TWO
        $options[] = array(
            'name' => __('Segunda informacion de servicio','HOSTING_SP'),
            'type' => 'toggle'
        );
            $options[] = array(
                'id' => 'show_service_two',
                'desc' => 'Configuración Mostrar Estilo',
                'std' => 1,
                'type' => 'checkbox'
            );
            $options[] = array(
                'id' => 'service_two_title',
                'desc' => 'Titulo',
                'std' => 'Services Option One',
                'type' => 'text'
            );
            $options[] = array(
                'id' => 'service_two_desc',
                'desc' => 'Descripcion',
                'std' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit',
                'type' => 'textarea'
            );
            $args=array(
                'post_type' => 'std_serv',
                'post_status' => 'publish',
                'posts_per_page' => -1,
            );
            $my_query = null;
            $my_query = new WP_Query($args);
            $std_serv = array();
            
            while ($my_query->have_posts()) {
                $my_query->the_post();
                $std_serv[] = array(
                    'title' => get_the_title(),
                    'icono' => get_field('icon'),
                    'subtitle' => get_field('subtitle'),
                    'description' => get_field('description'),
                    'btn_title' => get_field('btn_title'),
                    'btn_link' => get_field('btn_link')
                );
            }
            $c = 0;
            
            $options[] = array(
                'name' => 'Servicios Standar para mostrar',
                'type' => 'info'
            );
            
            foreach($std_serv as $key){
                $c++;
                $options[] = array(
                    'id' => 'service_two_serv'.$c,
                    'desc' => 'Servicio Standar: '.$key['title'],
                    'std' => 0,
                    'type' => 'checkbox'
                );
            }
          /*  $options[] = array(
                'id' => 'service_two_num',
                'desc' => 'Numero de servicios',
                'std' => '3',
                'type' => 'text',
                'class' => 'mini'
            );
            if(of_get_option('service_two_num')?$cant_2=of_get_option('service_two_num'):$cant_2=3);
            for($i=1; $i<=$cant_2; $i++){
                $options[] = array(
                    'name' => 'Servicio de dos '.$i,
                    'type' => 'toggle'
                );
                   $options[] = array(
                        'id' => 'service_two_title'.$i,
                        'desc' => 'Titulo',
                        'std' => 'Data Center',
                        'type' => 'text'
                    );
                    $options[] = array(
                        'id' => 'service_two_detail'.$i,
                        'desc' => 'Detalle',
                        'std' => 'All in Security',
                        'type' => 'text'
                    );
                    $options[] = array(
                        'id' => 'service_two_desc'.$i,
                        'desc' => 'Descripcion',
                        'std' => 'Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Vestibulum tortor quam, feugiat vitae, ultricies eget, tempor sit amet, ante.',
                        'type' => 'textarea'
                    );
                    foreach(font_awesome_icon('serv_two'.$i) as $val){
                        $options[] = $val;
                    } 
                    $options[] = array(
                        'id' => 'sarvice_two_btn'.$i,
                        'desc' => 'Texto Boton',
                        'std' => 'Learn More',
                        'type' => 'text',
                        'class' => 'medium'
                    );
                    $options[] = array(
                        'id' => 'sarvice_two_btn_link'.$i,
                        'desc' => 'Link boton',
                        'type' => 'text',
                    );
                $options[] = array(
                    'name' => 'Servicio de dos '.$i,
                    'type' => 'toggle-close'
                );
            }   */
        $options[] = array(
            'name' => __('Segundo servicio de informacion','HOSTING_SP'),
            'type' => 'toggle-close'
        );
        //SERVICE THREE
        $options[] = array(
            'name' => __('Tercera Información del servicio','HOSTING_SP'),
            'type' => 'toggle'
        );
              $options[] = array(
                'id' => 'show_service_three',
                'desc' => 'Configuración Mostrar Estilo',
                'std' => 1,
                'type' => 'checkbox'
            );
            $options[] = array(
                'id' => 'service_three_title',
                'desc' => 'Titulo',
                'std' => 'Services Option One',
                'type' => 'text'
            );
            $options[] = array(
                'id' => 'service_three_desc',
                'desc' => 'Descripcion',
                'std' => 'Lorem ipsum dolor sit amet, consectetuer adipiscing elit',
                'type' => 'textarea'
            );
            $args=array(
                'post_type' => 'serv',
                'post_status' => 'publish',
                'posts_per_page' => -1,
            );
            $my_query = null;
            $my_query = new WP_Query($args);
            $serv = array();
            
            while ($my_query->have_posts()) {
                $my_query->the_post();
                $serv[] = array(
                    'title' => get_the_title(),
                    'icono' => get_field('icon'),
                    'price' => get_field('price'),
                    'title1' => get_field('title'),
                    'subtitle' => get_field('subtitle'),
                    'description' => get_field('description')
                );
            }
            $c = 0;
            
            $options[] = array(
                'name' => 'Servicios para mostrar',
                'type' => 'info'
            );
            
            foreach($serv as $key){
                $c++;
                $options[] = array(
                    'id' => 'service_three_serv'.$c,
                    'desc' => 'Servicio: '.$key['title'],
                    'std' => 0,
                    'type' => 'checkbox'
                );
            }
            /*$options[] = array(
                'id' => 'service_three_num',
                'desc' => 'Numero de servicios',
                'std' => '4',
                'type' => 'text',
                'class' => 'mini'
            );
            if(of_get_option('service_three_num')?$cant_=of_get_option('service_three_num'):$cant_=4);
            for($i=1; $i<=$cant_; $i++){
               $options[] = array(
                    'name' => 'Service Three '.$i,
                    'type' => 'toggle'
               ); 
                    $options[] = array(
                        'id' => 'service_three_title'.$i,
                        'desc' => 'Titulo',
                        'std' => 'Domain Registration',
                        'type' => 'text'
                    );
                    $options[] = array(
                        'id' => 'service_three_detail'.$i,
                        'desc' => 'Detalle',
                        'std' => 'Subtitle',
                        'type' => 'text'
                    );
                    $options[] = array(
                        'id' => 'service_three_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'
                    );
                    foreach(font_awesome_icon('serv_three'.$i) as $val){
                        $options[] = $val;
                    } 
                    $options[] = array(
                        'id' => 'service_three_price'.$i,
                        'desc' => 'Precio',
                        'std' => '500',
                        'type' => 'text',
                        'class' => 'mini'
                    );
                    $options[] = array(
                        'id' => 'service_three_link'.$i,
                        'desc' => 'Link',
                        'type' => 'text',
                    );
               $options[] = array(
                    'name' => 'Servicio Tres '.$i,
                    'type' => 'toggle-close'
               );
            } */
        $options[] = array(
            'name' => __('Tercera Información del servicio','HOSTING_SP'),
            'type' => 'toggle-close'
        );
?>