<?php 
    $options[] = array(
        'name' => __('Opciones Tienda Online','HOSTING_SP'),
        'type' => 'heading',
		'std'  => 'shopping-cart'
    );

        $options[] = array(
            'id' => 'online_img_back',
            'desc' => 'Imagen de fondo',
            'type' => 'upload'
        );
        $options[] = array(
            'id' => 'show_online',
            'desc' => 'Configuración Mostrar Estilo',
            'std' => 1,
            'type' => 'checkbox'
        );
        //SERVICE PAGE        
            $options[] = array(
                'name' => __('Online Información tienda','HOSTING_SP'),
                'type' => 'toggle'
            );
                $options[] = array(
                    'id' => 'show_online_desc',
                    'desc' => 'Configuración Mostrar Estilo',
                    'std' => 1,
                    'type' => 'checkbox'
                );
                $options[] = array(
                    'id' => 'online_desc_title',
                    'desc' => 'Titulo',
                    'std' => 'Domain Registration',
                    'type' => 'text'
                );
                $options[] = array(
                    'id' => 'online_desc_desc',
                    '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' => 'online_desc_img',
                    'type' => 'upload'
                );
                $options[] = array(
                    'id' => 'online_desc_img_pos',
                    'desc' => 'Posicion de imagen',
                    'options' => array(
                        '1' => 'Izquierdo',
                        '2' => 'Derecho'
                    ),
                    'class' => 'side',
                    'type' => 'radio'
                );
            $options[] = array(
                'name' => __('Online Información tienda','HOSTING_SP'),
                'type' => 'toggle-close'
            );
            //PLANS
            $options[] = array(
                'name' => __('Informacion de planes','HOSTING_SP'),
                'type' => 'toggle'
            );
                $options[] = array(
                    'id' => 'show_online_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' => 'online_plan',
                'desc' => 'Seleccione Categoría para mostrar',
                'std' => 'Plan1',
                'options' => array(
                    'Plan1' => 'Plan1',
                    'Plan2' => 'Plan2',
                    'Plan3' => 'Plan3',
                    'Plan4' => 'Plan4'
                ),
                'type' => 'select'
            );
              /*  $options[] = array(
                    'id' => 'online_plans_num',
                    'desc' => 'Numero de planes',
                    'std' => '4',
                    'type' => 'text',
                    'class' => 'mini'
                );
                $options[] = array(
                    'id' => 'online_plans_row_num',
                    'desc' => 'Numero de fila (s) del plan',
                    'std' => '5',
                    'type' => 'text',
                    'class' => 'mini'
                );
                if(of_get_option('online_plans_num')?$cant_plans=of_get_option('online_plans_num'):$cant_plans=4);
                for($i=1; $i<=$cant_plans; $i++){
                    $options[] = array(
                        'name' => 'Plan '.$i,
                        'type' => 'toggle'
                    );
                        $options[] = array(
                            'id' => 'online_plans_title'.$i,
                            'desc' => 'Titulo',
                            'std' => 'Basic',
                            'type' => 'text',
                            'class' => 'medium'
                        );
                        $options[] = array(
                            'name' => 'Fila',
                            'type' => 'toggle'
                        );
                            $options[] = array(
                                'id' => 'show_online_plans_price'.$i,
                                'desc' => 'Configuración Mostrar Estilo',
                                'std' => 1,
                                'type' => 'checkbox'
                            );
                            $options[] = array(
                                'id' => 'online_plans_price'.$i,
                                'desc' => 'Precio',
                                'std' => '500',
                                'type' => 'text',
                                'class' => 'mini'
                            );
                            $options[] = array(
                                'id' => 'online_plans_frec'.$i,
                                'desc' => 'Cantidad impuesto',
                                'std' => 'Daitly',
                                'options' => array(
                                    'Daitly' => 'Diario',
                                    'Monthly' => 'Mensual',
                                    'Yearly' => 'Anual'
                                ),
                                'type' => 'radio',
                                'class' => 'side'
                            );
                        $options[] = array(
                            'name' => 'Fila',
                            'type' => 'toggle-close'
                        );
                        if(of_get_option('online_plans_row_num')?$cant_plans_row=of_get_option('online_plans_row_num'):$cant_plans_row=5);
                        for($j=1; $j<=$cant_plans_row; $j++){
                            $options[] = array(
                                'name' => 'Fila '.$j,
                                'type' => 'toggle'
                            );
                                $options[] = array(
                                    'id' => 'online_plans_row'.$i.$j,
                                    'desc' => 'Descripcion',
                                    'std' => '500 GB Disk Space',
                                    'type' => 'text',
                                );
                                foreach(font_awesome_icon('online'.$i.$j) as $val){
                                    $options[] = $val;
                                }          
                            $options[] = array(
                                'name' => 'Fila '.$j,
                                'type' => 'toggle-close'
                            );
                        }
                        $options[] = array(
                            'id' => 'online_plans_btn'.$i,
                            'desc' => 'Texto Boton',
                            'std' => 'Choose Plan',
                            'type' => 'text',
                            'class' => 'medium'
                        );
                        $options[] = array(
                            'id' => 'online_plans_btn_link'.$i,
                            'desc' => 'Link Boton',
                            'type' => 'text'
                        );
                    $options[] = array(
                        'name' => 'Plan '.$i,
                        'type' => 'toggle-close'
                    );
                } */
            $options[] = array(
                'name' => __('Informacion de planes','HOSTING_SP'),
                'type' => 'toggle-close'
            );
            $options[] = array(
                'name' => __('Last Section Info','HOSTING_SP'),
                'type' => 'toggle'
            );
                $options[] = array(
                    'id' => 'show_online_last',
                    'desc' => 'Show Style Configuration',
                    'std' => 1,
                    'type' => 'checkbox'
                );
                $options[] = array(
                    'id' => 'online_last_title',
                    'desc' => 'Titulo',
                    'std' => 'Why Choose Us',
                    'type' => 'text'
                );
                $options[] = array(
                    'id' => 'online_last_desc',
                    'desc' => 'Description',
                    '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'
                );
                //ACCORDION
                $options[] = array(
                    'name' => __('Linea acordeon','HOSTING_SP'),
                    'type' => 'toggle'
                );
                    $options[] = array(
                        'id' => 'show_online_accordion',
                        'desc' => 'Configuración Mostrar Estilo',
                        'std' => 1,
                        'type' => 'checkbox'
                    );
                    $options[] = array(
                        'id' => 'online_accordion_num',
                        'desc' => 'Número de Acordeón',
                        'std' => '3',
                        'type' => 'text',
                        'class' => 'mini'
                    );
                    $value = '';
                    if(of_get_option('online_accordion_num')?$cant_acc=of_get_option('online_accordion_num'):$cant_acc=3);                    
                    for($i=1; $i<=$cant_acc; $i++){
                        foreach(Hide_Toggle('online_accordion'.$i,$i) as $val){
                            $options[] = $val;
                        }
                    }
                $options[] = array(
                    'name' => __('Acordeon','HOSTING_SP'),
                    'type' => 'toggle-close'
                );
                //RIGHT ZONE
                $options[] = array(
                    'name' => __('Zona derecha','HOSTING_SP'),
                    'type' => 'toggle'
                );
                    $options[] = array(
                        'id' => 'show_online_last_right',
                        'desc' => 'Configuración Mostrar Estilo',
                        'std' => 1,
                        'type' => 'checkbox'
                    );
                    //ZONE 1 
                    $options[] = array(
                        'name' => __('Zona 1','HOSTING_SP'),
                        'type' => 'toggle'
                    );
                        $options[] = array(
                            'id' => 'show_online_zone1',
                            'desc' => 'Configuración Mostrar Estilo',
                            'std' => 1,
                            'type' => 'checkbox'
                        );
                        $options[] = array(
                            'id' => 'online_zone1_title',
                            'desc' => 'Titulo',
                            'std' => 'We Accepted Payment',
                            'type' => 'text'
                        );
                        $options[] = array(
                            'id' => 'online_zone1_pay_num',
                            'desc' => 'Número de Tarjetas de Pago',
                            'std' => '6',
                            'type' => 'text',
                            'class' => 'mini'
                        );
                        $options[] = array(
                            'name' => __('Tarjetas de pago','HOSTING_SP'),
                            'type' => 'toggle'
                        );
                        if(of_get_option('online_zone1_pay_num')?$cant_pay=of_get_option('online_zone1_pay_num'):$cant_pay=6);
                        for($i=1; $i<=$cant_pay; $i++){
                                $options[] = array(
                                    'id' => 'online_zone1_card'.$i,
                                    'desc' => 'Tarjetas de pago '.$i,
                                    'type' => 'upload'
                                );
                        }
                        $options[] = array(
                            'name' => __('Tarjetas de pago','HOSTING_SP'),
                            'type' => 'toggle-close'
                        );
                        $options[] = array(
                            'name' => __('Llamadas','HOSTING_SP'),
                            'type' => 'toggle'
                        );
                            $options[] = array(
                                'id' => 'online_zone1_title_call',
                                'desc' => 'Titulo',
                                'std' => 'If you have any questions, call us',
                                'type' => 'text'
                            ); 
                            $options[] = array(
                                'id' => 'online_zone1_call_img',
                                'type' => 'upload',
                            );
                            $options[] = array(
                                'id' => 'online_zone1_call_num',
                                'desc' => 'Número de llamadas',
                                'std' => '3',
                                'type' => 'text',
                                'class' => 'mini'
                            );
                            if(of_get_option('online_zone1_call_num')?$cant_call=of_get_option('online_zone1_call_num'):$cant_call=3);
                            for($i=1; $i<=$cant_call; $i++){
                                $options[] = array(
                                    'name' => __('Llamadas','HOSTING_SP'),
                                    'type' => 'toggle'
                                );
                                    $options[] = array(
                                        'id' => 'online_zone1_call_title'.$i,
                                        'desc' => 'Titulo',
                                        'std' => 'Pais',
                                        'type' => 'text',
                                        'class' => 'medium'
                                    );
                                    $options[] = array(
                                        'id' => 'online_zone1_call_phone'.$i,
                                        'desc' => 'Teléfono',
                                        'std' => '01-8000-034-567',
                                        'type' => 'text',
                                        'class' => 'medium'
                                    );
                                $options[] = array(
                                    'name' => __('Llamados','HOSTING_SP'),
                                    'type' => 'toggle-close'
                                );
                            }
                        $options[] = array(
                            'name' => __('Llamados','HOSTING_SP'),
                            'type' => 'toggle-close'
                        );
                    $options[] = array(
                        'name' => __('Zona 1','HOSTING_SP'),
                        'type' => 'toggle-close'
                    );
                    //ZONE 2
                    $options[] = array(
                        'name' => __('Zona 2','HOSTING_SP'),
                        'type' => 'toggle'
                    );
                        $options[] = array(
                            'id' => 'show_online_zone2',
                            'desc' => 'Configuración Mostrar Estilo',
                            'std' => 1,
                            'type' => 'checkbox'
                        );
                        $options[] = array(
                            'id' => 'online_zone2_title',
                            'desc' => 'Titulo',
                            'std' => 'Transfer your Site',
                            'type' => 'text'
                        );
                        $options[] = array(
                            'id' => 'online_zone2_desc',
                            'desc' => 'Descripcion',
                            'std' => 'We\'ll help you t make transfering your website and domain name fast and easy',
                            'type' => 'textarea'
                        );
                        foreach(font_awesome_icon('tranf') as $val){
                                    $options[] = $val;
                        }
                        $options[] = array(
                            'id' => 'online_zone2_tran_num',
                            'desc' => 'Traslados',
                            'std' => '4',
                            'type' => 'text',
                            'class' => 'mini'
                        );
                        if(of_get_option('online_zone2_tran_num')?$cant_=of_get_option('online_zone2_tran_num'):$cant_=4);
                        for($i=1; $i<=$cant_; $i++){
                           $options[] = array(
                                'name' => __('Traslados','HOSTING_SP'),
                                'type' => 'toggle'
                            ); 
                                $options[] = array(
                                    'id' => 'online_zone2_tran_title'.$i,
                                    'desc' => 'Titulo',
                                    'std' => 'Transfer Option',
                                    'type' => 'text'
                                );    
                                $options[] = array(
                                    'id' => 'online_zone2_tran_link'.$i,
                                    'desc' => 'Titulo',
                                    'std' => 'Transfer Option',
                                    'type' => 'text'
                                );                                  
                            $options[] = array(
                                'name' => __('Traslados','HOSTING_SP'),
                                'type' => 'toggle-close'
                            ); 
                        }
                    $options[] = array(
                        'name' => __('Zona 2','HOSTING_SP'),
                        'type' => 'toggle-close'
                    );
                $options[] = array(
                    'name' => __('Zona derecha','HOSTING_SP'),
                    'type' => 'toggle-close'
                );
            $options[] = array(
                'name' => __('Informacion ultima seccion','HOSTING_SP'),
                'type' => 'toggle-close'
            );   

?>