+ + + ID, 'lqdvi_congreso_fecha', true); + $hora_inicio = get_post_meta($post->ID, 'lqdvi_congreso_hora_inicio', true); + $hora_fin = get_post_meta($post->ID, 'lqdvi_congreso_hora_fin', true); + $fecha_inicio_inscripciones = get_post_meta($post->ID, 'lqdvi_congreso_fecha_inicio_inscripciones', true); + + $lugar = get_post_meta($post->ID, 'lqdvi_congreso_lugar', true); + $foto_url = wp_get_attachment_url(get_post_thumbnail_id($congreso->ID)); + + $congreso_finalizado = (strtotime("now") > strtotime($fecha_congreso)); + $inscripciones_han_comenzado = (strtotime("now") >= strtotime($fecha_inicio_inscripciones)); + + + + // Información del congreso + $info_txt = ''; + $info_txt .= '

' . __traducir('Information', LQDVI_THEME_NAME) . '

'; + + $info_txt .= '' . __traducir('Date', LQDVI_THEME_NAME) . ': ' . lqdvi_format_date($fecha_congreso) . '
'; + $info_txt .= (!empty($hora_inicio) ? '' . __traducir('Start time', LQDVI_THEME_NAME) . ': ' . $hora_inicio . 'h.' : '') . '
'; + $info_txt .= (!empty($hora_fin) ? '' . __traducir('End time', LQDVI_THEME_NAME) . ': ' . $hora_fin . 'h.' : '') . '
'; + + $lugar_txt = ''; + $lugar_txt .= '

' . __traducir('Place', LQDVI_THEME_NAME) . '

'; + $lugar_txt .= $lugar; + $lugar_txt .= '
' . lqdvi_google_map_link(array('address' => $lugar, 'type' => 'text')); + if (!$inscripciones_han_comenzado && !empty($foto_url)) { + $lugar_txt .= '

[image_with_animation image_url="'. $foto_url .'" alignment="center" animation="Fade In"]'; + } + + + + // Sidebar del congreso + $sidebar_txt = ''; + if (lqdvi_is_national_congress($post)) { + ob_start(); + dynamic_sidebar('national-congresse-sidebar'); + $sidebar_txt = ob_get_contents(); + ob_end_clean(); + } else { + ob_start(); + dynamic_sidebar('international-congresse-sidebar'); + $sidebar_txt = ob_get_contents(); + ob_end_clean(); + } + + // Formulario de registro + $form_txt = ''; + + // Descripción del evento + $desc_txt = ''; + + if (!$inscripciones_han_comenzado) { + $desc_txt .= '

' . + __traducir('You will be able to register starting ', 'event_espresso') . ' ' . lqdvi_format_date($fecha_inicio_inscripciones) . + '


'; + } + + $meta_txt = get_post_meta($post->ID, 'lqdvi_congreso_evento_descripcion', true); + if (!empty($meta_txt)) { + $desc_txt .= $meta_txt; + } else { + $desc_txt .= get_the_content(); + } + + // Contruir la página de registro + $registro_txt = ''; + $registro_txt .= '[vc_row type="in_container" text_color="dark" text_align="left"]'; + + $registro_txt .= '[vc_column width="2/3" animation="Fade In"]'; + if (!empty($desc_txt) || !empty($form_txt)) { + + $registro_txt .= '[vc_column_text]'; + $registro_txt .= $desc_txt; + $registro_txt .= '[/vc_column_text]'; + + $registro_txt .= '[vc_column_text]'; + $registro_txt .= $form_txt; + $registro_txt .= '[/vc_column_text]'; + + if ($is_active['status'] != 'REGISTRATION_OPEN') { + $registro_txt .= '[vc_column_text]'; + $registro_txt .= $sidebar_txt; + $registro_txt .= '[/vc_column_text]'; + } + } else { + $registro_txt .= '[vc_column_text]'; + $registro_txt .= $info_txt; + $registro_txt .= '[/vc_column_text]'; + + $registro_txt .= '[vc_column_text]'; + $registro_txt .= $sidebar_txt; + $registro_txt .= '[/vc_column_text]'; + } + $registro_txt .= '[/vc_column]'; + + $registro_txt .= '[vc_column width="1/3" animation="Fade In"]'; + + $registro_txt .= '[vc_column_text]'; + if (!empty($desc_txt) || !empty($form_txt)) { + $registro_txt .= $info_txt; + } + $registro_txt .= $lugar_txt; + + if ($is_active['status'] == 'REGISTRATION_OPEN') { + $registro_txt .= $sidebar_txt; + } + + $registro_txt .= '[/vc_column_text]'; + $registro_txt .= '[/vc_column]'; + + $registro_txt .= '[/vc_row]'; + + $registro_txt .= '[vc_row][vc_column width="1/1"][/vc_column][/vc_row]'; + + echo do_shortcode($registro_txt); + + ?> + + the_slug(false), + 'item_id' => get_the_ID(), + 'speaker_link' => ($congreso_finalizado) ? true : false, + 'show_program' => ($inscripciones_han_comenzado) ? true : false, + 'show_post' => true, + 'show_speakers' => ($inscripciones_han_comenzado) ? true : false, + 'show_post_content' => false + )); ?> + + +