web/wp-content/themes/IRI-Theme/search.php
changeset 136 bde1974c263b
child 170 8e3a5a6fc63e
equal deleted inserted replaced
135:53cff4b4a802 136:bde1974c263b
       
     1 <?php get_header(); ?>
       
     2 		<div class="column span-17 colborder first" id="maincontent">
       
     3 			<div class="content">
       
     4 	<!--  -->
       
     5 	<?php 
       
     6 		$search_text = utf8_decode(stripslashes($_GET['s']));
       
     7 
       
     8 		if (isset($_GET['engine'])){
       
     9 			$engine = $_GET['engine'];
       
    10 
       
    11 			if ($engine=="0") {
       
    12 				
       
    13 
       
    14 			} else if ($engine=="1") {
       
    15 
       
    16 				$title = str_replace("%s", $search_text,__("Search results for &#8220;%s&#8221;"));
       
    17 				
       
    18 				echo ("
       
    19 					<h2 class='pagetitle'>".$title ."</h2><br/>
       
    20 					<!-- Google Custom Search Element -->
       
    21 						<div id=\"cse\" style=\"width:100%;\">Loading</div>
       
    22 						<script src=\"http://www.google.com/jsapi\" type=\"text/javascript\"></script>
       
    23 						<script type=\"text/javascript\">
       
    24 						  google.load('search', '1');
       
    25 												
       
    26 						  google.setOnLoadCallback(function(){
       
    27 							var cse = new google.search.CustomSearchControl('015480955628162126762:skh3unbz0s8');
       
    28 							cse.setNoResultsString('Aucun r&eacute;sultat pour cette requ&egrave;te, essayer avec les autres moteurs.');
       
    29 							cse.draw('cse');
       
    30 							cse.setLinkTarget(GSearch.LINK_TARGET_BLANK);
       
    31 							cse.execute('".utf8_encode(addslashes($s))."');
       
    32 						  }, true);
       
    33 						  
       
    34 					  </script>	");
       
    35 					  
       
    36 			} else if ($engine=="2") {
       
    37 				
       
    38 			} else if ($engine=="3") {
       
    39 				
       
    40 			} else {
       
    41 				
       
    42 			}
       
    43 		}else {
       
    44 			$engine="0";
       
    45 		}
       
    46 		//echo ("========== ".$engine);
       
    47 	?>
       
    48 	
       
    49 	<!-- LIGNE DE TEMPS / ENMI :: RESEARCH -->
       
    50 	<?php if ($engine=="2") : ?>
       
    51 				<h2 class='pagetitle'><?php echo(str_replace("%s", $search_text,__("Rechercher dans les annotations des ENMI &#8220;%s&#8221;"))); ?></h2>
       
    52 				<script src="http://amateur.iri.centrepompidou.fr/nouveaumonde/static/js/jquery.DOMWindow.js" type="text/javascript">
       
    53 				</script>
       
    54 				<script type="text/javascript">// <![CDATA[
       
    55 					function launch_search($) {
       
    56 						$.openDOMWindow({
       
    57 							height:662, 
       
    58 							width:1022, 
       
    59 							windowSource:'iframe',
       
    60 							windowSourceURL: 'http://amateur.iri.centrepompidou.fr/nouveaumonde/enmi/conf/search/loading/',
       
    61 							windowHTTPType:'get',
       
    62 							windowPadding:5,
       
    63 							windowBGColor: 'rgb(239, 239, 239)',
       
    64 							loader:1, 
       
    65 							loaderImagePath:'http://amateur.iri.centrepompidou.fr/nouveaumonde/static/img/loadingAnimation.gif', 
       
    66 							loaderHeight:13, 
       
    67 							loaderWidth:208,
       
    68 							windowOverflow:'hidden'
       
    69 							});
       
    70 					$("#search_form").attr("target",$("#DOMWindowIframe").attr("name"));
       
    71 				}
       
    72 				jQuery(document).ready(function($) {
       
    73 					$('#search_form').bind('submit', function(e) {
       
    74 							$('#search_ts').val(e.timeStamp);
       
    75 							$(this).attr("action","http://amateur.iri.centrepompidou.fr/nouveaumonde/enmi/ldt/search/?"+e.timeStamp);
       
    76 							launch_search($);
       
    77 						});
       
    78 					<?php 
       
    79 						if ($search_text!=""){
       
    80 							echo ("$(\"#search_form\").submit();");
       
    81 						}
       
    82 					?>
       
    83 						
       
    84 				  });
       
    85 				// ]]></script>
       
    86 				<div class="box">
       
    87 					<div>
       
    88 						<div id="search">
       
    89 							
       
    90 							<h6>Rechercher dans les anotations des Entretiens du nouveau monde industriel :<h6>
       
    91 							
       
    92 							<form id="search_form" action="http://amateur.iri.centrepompidou.fr/nouveaumonde/enmi/ldt/search/" method="post">
       
    93 								
       
    94 								<input name="edition" type="hidden" value="all" /> <input id="search_ts" name="ts" type="hidden" />
       
    95 								<input id="s" name="search" type="text" value="<?php echo($search_text); ?>" style="width:250px;"/>
       
    96 								<select id="id_type" name="type"  style="width:100px;">
       
    97 									<option value="all">tous</option>
       
    98 									<option value="project">Contribution</option>
       
    99 									<option value="content">contenu</option> 
       
   100 								</select>
       
   101 								<select id="id_field" name="field"  style="width:100px;">
       
   102 									<option value="all">tous</option>
       
   103 									<option value="title">titre</option>
       
   104 									<option value="abstract">résumé</option>
       
   105 									<option value="tags">tags</option>
       
   106 								</select>
       
   107 								<input type="submit" value="recherche" />
       
   108 
       
   109 							</form>
       
   110 										
       
   111 						</div>
       
   112 						<br/><br/>
       
   113 						<hr/>
       
   114 						<div id="msg"> 
       
   115 							Retrouvez l'ensemble des contenus et annotations et participez &agrave; l'annotation collaborative sur le site des Entretien &agrave; l'adresse suivante :<br/>
       
   116 							<a href="http://amateur.iri.centrepompidou.fr/nouveaumonde/enmi/conf/program/2009_2" target="_blank">http://amateur.iri.centrepompidou.fr/nouveaumonde/enmi/conf/program/2009_2</a>
       
   117 						</div>
       
   118 						<div class="cleaner"> &nbsp;</div>
       
   119 					</div>
       
   120 				</div>
       
   121 	<?php endif; ?>
       
   122 	
       
   123 	<!-- LIGNE DE TEMPS / AMATEURS :: SEMINAIRES -->
       
   124 	<?php if ($engine=="3") : ?>
       
   125 				<h2 class='pagetitle'><?php echo(str_replace("%s", $search_text,__("Rechercher dans les annotations des s&eacute;minaires &#8220;%s&#8221;"))); ?></h2>
       
   126 				<script src="http://amateur.iri.centrepompidou.fr/nouveaumonde/static/js/jquery.DOMWindow.js" type="text/javascript">
       
   127 				</script>
       
   128 				<script type="text/javascript">// <![CDATA[
       
   129 					function launch_search($) {
       
   130 						$.openDOMWindow({
       
   131 							height:662, 
       
   132 							width:1022, 
       
   133 							windowSource:'iframe',
       
   134 							windowSourceURL: 'http://web.iri.centrepompidou.fr/fonds/ldt/index/seminaire/__post__',
       
   135 							windowHTTPType:'post',
       
   136 							windowPadding:5,
       
   137 							windowBGColor: 'rgb(239, 239, 239)',
       
   138 							loader:1, 
       
   139 							loaderImagePath:'http://amateur.iri.centrepompidou.fr/nouveaumonde/static/img/loadingAnimation.gif', 
       
   140 							loaderHeight:13, 
       
   141 							loaderWidth:208,
       
   142 							windowOverflow:'hidden'
       
   143 							});
       
   144 					$("#search_form").attr("target",$("#DOMWindowIframe").attr("name"));
       
   145 				}
       
   146 				jQuery(document).ready(function($) {
       
   147 					$('#search_form').bind('submit', function(e) {
       
   148 							//$('#search_ts').val(e.timeStamp);
       
   149 							$(this).attr("action","http://web.iri.centrepompidou.fr/fonds/ldt/index/seminaire/__post__");
       
   150 							launch_search($);
       
   151 						});
       
   152 					<?php 
       
   153 						if ($search_text!=""){
       
   154 							echo ("$(\"#search_form\").submit();");
       
   155 						}
       
   156 					?>
       
   157 						
       
   158 				  });
       
   159 				// ]]></script>
       
   160 				<div class="box">
       
   161 					<div>
       
   162 						<div id="search">
       
   163 								<form action="http://web.iri.centrepompidou.fr/fonds/ldt/index/seminaire/__post__" method="post" id="search_form" >
       
   164 								  <h6>Recherche inters&eacute;minaire dans ligne de temps : <h6>
       
   165 								  <input id="s" type="text" name="value" value="<?php echo($search_text); ?>" />
       
   166 								  <input type="submit" value="rechercher" />
       
   167 								</form>
       
   168 					</div>
       
   169 					<div class="cleaner"></div>	
       
   170 					</div>
       
   171 				</div>
       
   172 		
       
   173 	<?php endif; ?>
       
   174 	
       
   175 	<!-- WORDPRESS / RESEARCH -->
       
   176 	<?php if (have_posts() and $engine=="0") : ?>
       
   177 	
       
   178 		<h2 class="pagetitle"><?php echo(str_replace("%s", $search_text,__("Search results for &#8220;%s&#8221;"))); ?></h2>
       
   179 		
       
   180 
       
   181 				<?php getSearch(); ?>
       
   182 	
       
   183 	
       
   184 		<div class="navigation">
       
   185 			<div class="alignleft"><?php next_posts_link('&laquo; Previous') ?></div>
       
   186 			<div class="alignright"><?php previous_posts_link('Next &raquo;') ?></div>
       
   187 		</div>
       
   188 		
       
   189 		<div class="clear"></div>
       
   190 		
       
   191 		<?php while (have_posts()) : the_post(); ?>
       
   192 	
       
   193 			<div class="post" id="post-<?php the_ID(); ?>">
       
   194 				<p class="large nomargin"><a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title(); ?>"><?php the_title(); ?></a></p>
       
   195 				<?php
       
   196 				// Support for "Search Excerpt" plugin
       
   197 				// http://fucoder.com/code/search-excerpt/
       
   198 				if ( function_exists('the_excerpt') && is_search() ) {
       
   199 					the_excerpt_rss();
       
   200 				} ?>
       
   201 				<p class="small">
       
   202 					<?php the_time('F jS, Y') ?> &nbsp;|&nbsp; 
       
   203 					<!-- by <?php the_author() ?> -->
       
   204 					Published in
       
   205 					<?php the_category(', ');
       
   206 						if($post->comment_count > 0) { 
       
   207 								echo ' &nbsp;|&nbsp; ';
       
   208 								comments_popup_link('', '1 Comment', '% Comments'); 
       
   209 						}
       
   210 					?>
       
   211 				</p>
       
   212 				
       
   213 			</div>
       
   214 			
       
   215 			<hr>
       
   216 		<?php endwhile; ?>
       
   217 		<div class="navigation">
       
   218 			<div class="alignleft"><?php next_posts_link('&laquo; Previous') ?></div>
       
   219 			<div class="alignright"><?php previous_posts_link('Next &raquo;') ?></div>
       
   220 		</div>
       
   221 	<?php elseif($engine=="0") : ?>
       
   222 	
       
   223 		<h2 class="center"><?php _e("No results found."); ?></h2>
       
   224 		<?php include (TEMPLATEPATH . '/searchform.php'); ?>
       
   225 		
       
   226 		 <?php //	<!-- Tag Element if no result-->
       
   227 			$newoptions['tcolor'] = '3466FE';
       
   228 			$newoptions['tcolor2'] = '3268FF';
       
   229 			$newoptions['hicolor'] = '000000';
       
   230 			$newoptions['bgcolor'] = 'ffffff';
       
   231 			$newoptions['speed'] = '100';
       
   232 			$newoptions['trans'] = 'false';
       
   233 			$newoptions['distr'] = 'true';
       
   234 			$newoptions['args'] = '';
       
   235 			$newoptions['mode'] = 'tags';
       
   236 			$newoptions['width'] = '590';
       
   237 			$newoptions['height'] = '410';
       
   238 			
       
   239 			echo wp_cumulus_insert($newoptions);
       
   240 		?>
       
   241 		
       
   242 	<?php endif; ?>
       
   243 	
       
   244 	<!--  -->
       
   245 	</div>
       
   246 </div> 
       
   247 <div class="column span-5 last">
       
   248 	<?php include (TEMPLATEPATH . '/sidebar_single.php'); ?>
       
   249 </div>
       
   250 <hr></hr>
       
   251 <?php get_sidebar(); ?>
       
   252 <?php get_footer(); ?>