Sindbad~EG File Manager
<?php
$options = get_option('imic_options');
global $id;
$image = $banner_type = '';
$animation = get_post_meta($id, 'imic_pages_banner_animation', true);
$overlay = get_post_meta($id, 'imic_pages_banner_overlay', true);
$overlay_class = ($overlay == 1) ? 'page-header-overlay' : '';
$type = get_post_meta($id, 'imic_pages_Choose_slider_display', true);
if ($type != 7)
{
if ($type == 1 || $type == 2 || $type == 3)
{
$height = get_post_meta($id, 'imic_pages_slider_height', true);
}
else
{
$height = '';
}
$color = get_post_meta($id, 'imic_pages_banner_color', true);
$banner_desc = get_post_meta($id, 'imic_pages_banner_description', true);
$color = ($color != '' && $color != '#') ? $color : '';
if ($type == 2)
{
$image = get_post_meta($id, 'imic_header_image', true);
$image_src = wp_get_attachment_image_src($image, 'full', '', array());
if (is_array($image_src))
{
$image = $image_src[0];
}
else
{
$image = (isset($options['header_image'])) ? $options['header_image']['url'] : '';
}
}
$post_type = get_post_type($id);
$title = '';
$title = get_the_title($id);
if ($post_type == 'event')
{
$date = get_query_var('event_date');
if (empty($date))
{
$date = get_post_meta($id, 'imic_event_start_dt', true);
}
$event_time = get_post_meta($id, 'imic_event_start_dt', true);
$event_time = strtotime($event_time);
$event_end_time = get_post_meta($id, 'imic_event_end_dt', true);
$event_end_time = strtotime($event_end_time);
$date = strtotime($date);
}
//$title = ($id>0)?get_the_title($id):'Blog';
if (is_page_template('template-contact.php'))
{
$banner_type = get_post_meta($id, 'imic_contact_banner_type', true);
$map_address = get_post_meta($id, 'imic_contact_map_address', true);
}
if ($banner_type == 1)
{
wp_enqueue_script('imic_contact_map');
wp_localize_script('imic_contact_map', 'contact', array(
'address' => $map_address
));
echo '<div class="page-header parallax clearfix">
<div id="contact-map"></div>
</div>';
}
else
{
if ($overlay == 1)
{ ?>
<div class="page-header parallax clearfix" style="background-color:<?php echo esc_attr($color); ?>; height:<?php echo esc_attr($height) . 'px' ?>">
<div class="<?php echo esc_attr($overlay_class); ?>" style="background-image:url(<?php echo esc_url($image); ?>);"></div>
<?php
}
else
{ ?>
<div class="page-header parallax clearfix" style="background-image:url(<?php echo esc_url($image); ?>); background-color:<?php echo esc_attr($color); ?>; height:<?php echo esc_attr($height) . 'px' ?>;">
<?php
} ?>
<div class="title-subtitle-holder">
<div class="title-subtitle-holder-inner">
<?php if (get_post_type($id) == 'event')
{
if ($date != '')
{
$st_event_date = get_post_meta($id, 'imic_event_start_dt', true);
$en_event_date = get_post_meta($id, 'imic_event_end_dt', true);
$st_event_str = strtotime($st_event_date);
$en_event_str = strtotime($en_event_date);
$event_diff = imic_dateDiff($st_event_date, $en_event_date); ?>
<h2><?php echo esc_attr(adorechurch_date_localization(get_option('date_format') , $date)); ?></h2>
<?php if ($event_diff > 0)
{ ?>
<div class="header-event-time"><?php echo esc_attr(adorechurch_date_localization(get_option('date_format') . ' ' . get_option('time_format') , $st_event_str)); ?></span> - <?php echo esc_attr(adorechurch_date_localization(get_option('date_format') . ' ' . get_option('time_format') , $en_event_str)); ?></div>
<?php
}
else
{ ?>
<div class="header-event-time"><?php _e('From ', 'framework');
echo esc_attr(adorechurch_date_localization(get_option('time_format') , $st_event_str)); ?></span> <?php _e('to', 'framework');
echo ' ' . esc_attr(adorechurch_date_localization(get_option('time_format') , $en_event_str)); ?></div>
<?php
}
}
}
elseif (is_page_template('template-speakers-sermon.php'))
{
echo get_the_post_thumbnail(get_query_var('speakers') , '210x210', array(
'class' => 'spkser-thumb'
));
echo '<h2>' . get_the_title(get_query_var('speakers')) . '</h2>';
}
else
{
if ((is_category()) || is_tag())
{
echo '<h2>' . single_term_title("", false) . '</h2>';
}
elseif (get_post_type($id) == 'product')
{ ?>
<h2><?php _e('Shop', 'framework'); ?></h2>
<?php
}
elseif (is_front_page())
{ ?>
<h2><?php _e('Blog', 'framework'); ?></h2>
<?php
}
else
{ ?>
<h2><?php echo esc_attr($title); ?></h2>
<?php
}
if ($banner_desc != '')
{ ?>
<hr class="sm">
<span class="subtitle"><?php echo esc_attr($banner_desc); ?></span>
<?php
}
} ?>
</div>
</div><?php if ($animation == 1)
{
wp_enqueue_script('imic_jquery_home');
echo '<canvas id="canvas-animation"></canvas>';
} ?>
</div><?php
} ?>
<!-- End Page Header --><?php if (function_exists('bcn_display'))
{ ?>
<!-- Breadcrumbs -->
<div class="lgray-bg breadcrumb-cont">
<div class="container">
<ol class="breadcrumb">
<?php bcn_display(); ?>
</ol>
</div>
</div>
<?php
}
}
else
{
} ?>
Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists