File: /home/mmickelson/tfgarchive/wpblogtest1.old/wp-content/themes/rt_nexus_wp/search.php
<?php get_header(); ?>
<?php $option = get_option('nexus-options'); ?>
<!-- Begin Main Body -->
<div id="main-body">
<div id="main-body-surround">
<div id="main-content" class="<?php echo $option['layout_subpage']; ?>">
<div class="colmask leftmenu <?php if (rok_isIe(6)) echo 'wrapper'; ?>">
<?php if (!rok_isIe(6)):?><div class="wrapper"><?php endif; ?>
<div class="colmid">
<div class="colright">
<!-- Begin Main Column (col1wrap) -->
<div class="col1wrap">
<div class="col1pad">
<div class="col1">
<div id="maincol">
<div class="bodycontent">
<div id="maincontent-block">
<div class="blog search">
<?php $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; ?>
<?php query_posts($query_string.'&posts_per_page='.$option['search_postcount'].'&paged='.$paged); ?>
<?php if (have_posts()) : ?>
<div class="article-rel-wrapper">
<h2 class="componentheading"><?php _re('Search Results for '); ?>‘<?php the_search_query(); ?>’</h2>
</div>
<?php while (have_posts()) : the_post(); ?>
<!-- Begin Post -->
<?php
$title = get_the_title();
$content = get_the_content(false);
$excerpt = get_the_excerpt();
$keys = explode(" ",$s);
$title = preg_replace('/('.implode('|', $keys) .')/iu', '<span class="search-excerpt">\0</span>', $title);
$content = preg_replace('/('.implode('|', $keys) .')/iu', '<span class="search-excerpt">\0</span>', $content);
$excerpt = preg_replace('/('.implode('|', $keys) .')/iu', '<span class="search-excerpt">\0</span>', $excerpt);
?>
<div class="leading">
<div <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<?php if ($option['search_title'] == 'true') { ?>
<!-- Begin Title -->
<div class="article-rel-wrapper">
<?php if ($option['search_titlelink'] == 'true') { ?>
<h2 class="contentheading">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php echo $title; ?></a>
</h2>
<?php } else { ?>
<h2 class="contentheading">
<?php echo $title; ?>
</h2>
<?php } ?>
</div>
<!-- End Title -->
<?php } ?>
<?php if ($option['search_postmeta'] == 'true') { ?>
<!-- Begin Post Meta -->
<div class="article-info-surround">
<div class="article-info-surround2">
<?php if ($option['search_postmeta_comments'] == 'true') { ?>
<!-- Begin Comments Button -->
<div class="article-info-right">
<p class="buttonheading">
<a href="<?php the_permalink(); ?>#comments" title="<?php comments_number(_r('No Comments'), _r('1 Comment'), _r('% Comments')); ?>">
<img src="<?php bloginfo('template_directory'); ?>/images/pdf_button.png" alt="<?php comments_number(_r('No Comments'), _r('1 Comment'), _r('% Comments')); ?>" />
</a>
</p>
</div>
<!-- End Comments Button -->
<?php } ?>
<?php if ($option['search_postmeta_author_date'] == 'true') { ?>
<!-- Begin Date & Author -->
<div class="iteminfo">
<div class="article-info-left">
<span class="createdate">
<span class="date1">
<?php the_time('M j'); ?>
</span>
<span class="date2">
<span class="date-div">|</span>
<?php the_author(); ?> • <?php the_time('H:i'); ?>
</span>
</span>
</div>
</div>
<!-- End Date & Author -->
<?php } ?>
</div>
</div>
<!-- End Post Meta -->
<?php } ?>
<?php $thumb = get_post_meta($post->ID, 'thumb', TRUE); ?>
<?php if(function_exists('has_post_thumbnail') && has_post_thumbnail()) { ?>
<!-- Begin Post Image -->
<div class="image-main-surround">
<?php the_post_thumbnail(); ?>
</div>
<!-- End Post Image -->
<?php } else { ?>
<?php if ($thumb != '') { ?>
<!-- Begin Post Image -->
<div class="image-main-surround">
<img src="<?php bloginfo('template_directory'); ?>/timthumb.php?src=<?php echo $thumb ?>&w=<?php echo $option['thumb_width']; ?>&h=<?php echo $option['thumb_height']; ?>&zc=1&q=75" alt="<?php the_title(); ?>" />
</div>
<!-- End Post Image -->
<?php } ?>
<?php } ?>
<!-- Begin Post Text -->
<div class="main-text">
<?php if ($option['search_contentdis'] == 'content') { ?>
<?php echo $content; ?>
<?php } else { ?>
<?php echo $excerpt; ?>
<?php } ?>
<div class="clr"></div>
<?php if(preg_match('/<!--more(.*?)?-->/', $post->post_content)) { ?>
<div class="readon-wrap1">
<div class="readon1-l"></div>
<a href="<?php the_permalink(); ?>" class="readon-main">
<span class="readon1-m">
<span class="readon1-r">
<?php _re('More Information'); ?>
</span>
</span>
</a>
</div>
<div class="clr"></div>
<?php } ?>
</div>
<div class="clr"></div>
<!-- End Post Text -->
</div>
</div>
<span class="leading_separator"> </span>
<!-- End Post -->
<?php endwhile;?>
<?php global $wp_query; $total_pages = $wp_query->max_num_pages; if ( $total_pages > 1 ) { ?>
<div class="pagination nav">
<div class="alignleft">
<?php next_posts_link('« '._r('Older Entries')); ?>
</div>
<div class="alignright">
<?php previous_posts_link(_r('Newer Entries').' »') ?>
</div>
<div class="clr"></div>
</div>
<?php } ?>
<?php else : ?>
<span class="attention"><?php _re("No posts found. Try a different search?"); ?></span>
<?php endif; ?>
<?php wp_reset_query(); ?>
</div>
</div>
</div>
<div class="clr"></div>
</div>
</div>
</div>
</div>
<!-- End Main Column (col1wrap) -->
<!-- Begin Left Column (col2) -->
<?php if($option['left_sub_sidebar'] == 'true') { ?>
<?php get_sidebar('left-sub'); ?>
<?php } ?>
<!-- End Left Column (col2) -->
<!-- Begin Right Column (col3) -->
<?php if($option['right_sub_sidebar'] == 'true') { ?>
<?php get_sidebar('right-sub'); ?>
<?php } ?>
<!--End Right Column (col3)-->
</div>
</div>
<?php if (!rok_isIe(6)):?></div><?php endif; ?>
</div>
</div>
</div>
</div>
<!-- End Main Body -->
<?php if(is_active_sidebar('user_1') || is_active_sidebar('user_2') || is_active_sidebar('user_3')) { ?>
<!-- Begin Bottom Section -->
<div id="bottom">
<div class="wrapper">
<div id="mainmodules4" class="spacer w49">
<?php if(is_active_sidebar('user_1')) { ?>
<!-- Begin Widget -->
<div class="fullblock first">
<div class="<?php echo $option['bottom_widget_1']; ?>">
<div class="moduletable">
<div class="module-surround">
<div class="module-surround2"></div>
<div class="module-surround3"></div>
<div class="module-surround4"></div>
<div class="module-surround5"></div>
<!-- Begin Widget Content -->
<?php dynamic_sidebar('User 1'); ?>
<!-- End Widget Content -->
</div>
</div>
</div>
</div>
<!-- End Widget -->
<?php } ?>
<?php if(is_active_sidebar('user_2')) { ?>
<!-- Begin Widget -->
<div class="block middle">
<div class="<?php echo $option['bottom_widget_2']; ?>">
<div class="moduletable">
<div class="module-surround">
<div class="module-surround2"></div>
<div class="module-surround3"></div>
<div class="module-surround4"></div>
<div class="module-surround5"></div>
<!-- Begin Widget Content -->
<?php dynamic_sidebar('User 2'); ?>
<!-- End Widget Content -->
</div>
</div>
</div>
</div>
<!-- End Widget -->
<?php } ?>
<?php if(is_active_sidebar('user_3')) { ?>
<!-- Begin Widget -->
<div class="block last">
<div class="<?php echo $option['bottom_widget_3']; ?>">
<div class="moduletable">
<div class="module-surround">
<div class="module-surround2"></div>
<div class="module-surround3"></div>
<div class="module-surround4"></div>
<div class="module-surround5"></div>
<!-- Begin Widget Content -->
<?php dynamic_sidebar('User 3'); ?>
<!-- End Widget Content -->
</div>
</div>
</div>
</div>
<!-- End Widget -->
<?php } ?>
</div>
</div>
</div>
<!-- End Bottom Section -->
<?php } ?>
<?php if(is_active_sidebar('bottom_feature_1') || is_active_sidebar('bottom_feature_2') || is_active_sidebar('bottom_feature_3')) { ?>
<!-- Begin Bottom Feature -->
<div id="bottom2">
<div class="wrapper">
<div id="mainmodules3" class="spacer w33">
<?php if(is_active_sidebar('bottom_feature_1')) { ?>
<!-- Begin Widget -->
<div class="block first">
<div class="">
<div class="moduletable">
<!-- Begin Widget Content -->
<?php dynamic_sidebar('Bottom Feature 1'); ?>
<!-- End Widget Content -->
</div>
</div>
</div>
<!-- End Widget -->
<?php } ?>
<?php if(is_active_sidebar('bottom_feature_2')) { ?>
<!-- Begin Widget -->
<div class="block middle">
<div class="">
<div class="moduletable">
<!-- Begin Widget Content -->
<?php dynamic_sidebar('Bottom Feature 2'); ?>
<!-- End Widget Content -->
</div>
</div>
</div>
<!-- End Widget -->
<?php } ?>
<?php if(is_active_sidebar('bottom_feature_3')) { ?>
<!-- Begin Widget -->
<div class="block last">
<div class="">
<div class="moduletable">
<!-- Begin Widget Content -->
<?php dynamic_sidebar('Bottom Feature 3'); ?>
<!-- End Widget Content -->
</div>
</div>
</div>
<!-- End Widget -->
<?php } ?>
</div>
</div>
</div>
<!-- End Bottom Feature -->
<?php } ?>
<?php get_footer(); ?>