PageRenderTime 36ms CodeModel.GetById 8ms RepoModel.GetById 0ms app.codeStats 0ms

/wp-content/themes/fork_in_the_road_lae044/search.php

https://bitbucket.org/aqge/deptandashboard
PHP | 205 lines | 159 code | 46 blank | 0 comment | 34 complexity | e73b6e10ad285be7a86353385ba5fe0b MD5 | raw file
Possible License(s): AGPL-1.0, GPL-2.0, LGPL-2.1
  1. <?php get_header(); ?>
  2. <?php
  3. $lcmp_page_head = <<<TXT
  4. <div class="contentLayout">
  5. <div class="sidebar1">
  6. <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
  7. </div>
  8. <div class="content">
  9. TXT;
  10. $lcmp_is_left = strpos($lcmp_page_head,"sidebar");
  11. if($lcmp_is_left===FALSE){
  12. $lcmp_rightdefault = 'default';
  13. $lcmp_leftdefault = 'notdefault';
  14. }else{
  15. $lcmp_leftdefault = 'default';
  16. $lcmp_rightdefault = 'notdefault';
  17. }
  18. ?>
  19. <div class="contentLayout">
  20. <?php
  21. global $lcmp_sidebarloc;
  22. if($lcmp_sidebarloc == $lcmp_leftdefault || $lcmp_sidebarloc == 'left'){ ?>
  23. <div class="sidebar1">
  24. <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
  25. </div>
  26. <?php } ?>
  27. <div class="content">
  28. <?php if (have_posts()) : ?>
  29. <div class="Post">
  30. <div class="Post-body">
  31. <div class="Post-inner article">
  32. <div class="PostContent">
  33. <h2><?php _e('Search Results', 'kubrick'); ?></h2>
  34. <?php
  35. $prev_link = get_previous_posts_link(__('Newer Entries &raquo;', 'kubrick'));
  36. $next_link = get_next_posts_link(__('&laquo; Older Entries', 'kubrick'));
  37. ?>
  38. <?php if ($prev_link || $next_link): ?>
  39. <div class="navigation">
  40. <div class="alignleft"><?php echo $next_link; ?></div>
  41. <div class="alignright"><?php echo $prev_link; ?></div>
  42. </div>
  43. <?php endif; ?>
  44. </div>
  45. <div class="cleared"></div>
  46. </div>
  47. </div>
  48. </div>
  49. <?php while (have_posts()) : the_post(); ?>
  50. <div class="Post">
  51. <div class="Post-body">
  52. <div class="Post-inner article">
  53. <h2 class="PostHeaderIcon-wrapper">
  54. <span class="PostHeader"><a href="<?php the_permalink() ?>" rel="bookmark" title="<?php printf(__('Permanent Link to %s', 'kubrick'), the_title_attribute('echo=0')); ?>">
  55. <?php the_title(); ?>
  56. </a></span>
  57. </h2>
  58. <?php $icons = array(); ?>
  59. <?php if (!is_page()) : ?>
  60. <?php ob_start(); ?>
  61. <img src="<?php bloginfo('template_url'); ?>/images/PostDateIcon.png" width="18" height="18" alt="PostDateIcon" />
  62. <?php the_time(__('F jS, Y', 'kubrick')) ?>
  63. <?php $icons[] = ob_get_clean(); ?>
  64. <?php endif; ?>
  65. <?php if (!is_page()) : ?>
  66. <?php ob_start(); ?>
  67. <img src="<?php bloginfo('template_url'); ?>/images/PostAuthorIcon.png" width="18" height="18" alt="PostAuthorIcon" />
  68. <?php _e('Author', 'kubrick'); ?>: <a href="#" title="<?php _e('Author', 'kubrick'); ?>"><?php the_author() ?></a>
  69. <?php $icons[] = ob_get_clean(); ?>
  70. <?php endif; ?>
  71. <?php if (current_user_can( 'edit_post', $post->ID )) : ?><?php ob_start(); ?>
  72. <img src="<?php bloginfo('template_url'); ?>/images/PostEditIcon.png" width="20" height="20" alt="PostEditIcon" />
  73. <?php edit_post_link(__('Edit', 'kubrick'), ''); ?>
  74. <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
  75. <?php if (0 != count($icons)): ?>
  76. <div class="PostHeaderIcons metadata-icons">
  77. <?php echo implode(' | ', $icons); ?>
  78. </div>
  79. <?php endif; ?>
  80. <div class="PostContent">
  81. <?php if (is_search()) the_excerpt(); else the_content(__('Read the rest of this entry &raquo;', 'kubrick')); ?>
  82. </div>
  83. <div class="cleared"></div>
  84. <?php ob_start(); ?>
  85. <?php $icons = array(); ?>
  86. <?php if (!is_page()) : ?>
  87. <?php ob_start(); ?>
  88. <img src="<?php bloginfo('template_url'); ?>/images/PostCategoryIcon.png" width="18" height="18" alt="PostCategoryIcon" />
  89. <?php printf(__('Posted in %s', 'kubrick'), get_the_category_list(', ')); ?>
  90. <?php $icons[] = ob_get_clean(); ?>
  91. <?php endif; ?>
  92. <?php if (!is_page() && get_the_tags()) : ?><?php ob_start(); ?>
  93. <img src="<?php bloginfo('template_url'); ?>/images/PostTagIcon.png" width="18" height="18" alt="PostTagIcon" />
  94. <?php the_tags(__('Tags:', 'kubrick') . ' ', ', ', ' '); ?>
  95. <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
  96. <?php if (!is_page() && !is_single()) : ?><?php ob_start(); ?>
  97. <img src="<?php bloginfo('template_url'); ?>/images/PostCommentsIcon.png" width="18" height="18" alt="PostCommentsIcon" />
  98. <?php comments_popup_link(__('No Comments &#187;', 'kubrick'), __('1 Comment &#187;', 'kubrick'), __('% Comments &#187;', 'kubrick'), '', __('Comments Closed', 'kubrick') ); ?>
  99. <?php $icons[] = ob_get_clean(); ?><?php endif; ?>
  100. <?php if (0 != count($icons)): ?>
  101. <div class="PostFooterIcons metadata-icons">
  102. <?php echo implode(' | ', $icons); ?>
  103. </div>
  104. <?php endif; ?>
  105. <?php $metadataContent = ob_get_clean(); ?>
  106. <?php if (trim($metadataContent) != ''): ?>
  107. <div class="PostMetadataFooter">
  108. <?php echo $metadataContent; ?>
  109. </div>
  110. <?php endif; ?>
  111. </div>
  112. </div>
  113. </div>
  114. <?php endwhile; ?>
  115. <?php if ($prev_link || $next_link): ?>
  116. <div class="Post">
  117. <div class="Post-body">
  118. <div class="Post-inner article">
  119. <div class="PostContent">
  120. <div class="navigation">
  121. <div class="alignleft"><?php echo $next_link; ?></div>
  122. <div class="alignright"><?php echo $prev_link; ?></div>
  123. </div>
  124. </div>
  125. <div class="cleared"></div>
  126. </div>
  127. </div>
  128. </div>
  129. <?php endif; ?>
  130. <?php else : ?>
  131. <div class="Post">
  132. <div class="Post-body">
  133. <div class="Post-inner article">
  134. <div class="PostContent">
  135. <h2><?php _e('Search Results', 'kubrick'); ?></h2>
  136. <h2 class="center"><?php _e('No posts found. Try a different search?', 'kubrick'); ?></h2>
  137. <?php if(function_exists('get_search_form')) get_search_form(); ?>
  138. </div>
  139. <div class="cleared"></div>
  140. </div>
  141. </div>
  142. </div>
  143. <?php endif; ?>
  144. </div>
  145. <?php
  146. global $lcmp_sidebarloc;
  147. if($lcmp_sidebarloc == $lcmp_rightdefault || $lcmp_sidebarloc == 'right'){ ?>
  148. <div class="sidebar1">
  149. <?php include (TEMPLATEPATH . '/sidebar1.php'); ?>
  150. </div>
  151. <?php } ?>
  152. <?php if(file_exists(TEMPLATEPATH . '/sidebar2.php')){ ?>
  153. <div class="sidebar2">
  154. <?php include (TEMPLATEPATH . '/sidebar2.php'); ?>
  155. </div>
  156. <?php } ?>
  157. </div>
  158. <div class="cleared"></div>
  159. <?php get_footer(); ?>