IAP logo

Differences

This shows you the differences between two versions of the page.

surface:publication_search [2009-03-03 11:36]
Michael Schmid
surface:publication_search [2010-05-04 14:57] (current)
Michael Schmid
Line 3: Line 3:
<PHP> <PHP>
- +$my_abstract_search_file = "publication_search"; 
-echo '<p style="margin-bottom:1em;">Search citation and abstract for any of these words (case insensitive, no phrase search):</p>'.DOKU_LF; +include("/srv/home/www-main/test/publication_search");
- +
-function checked($key, $value, $def=false) { +
-  if (array_key_exists($key, $_GET)) +
-    $checked = ($_GET[$key] == $value); +
-  else +
-    $checked = $def; +
-  return $checked ? ' checked="checked" ' : ' '; +
-+
-echo '<div style="margin-bottom:0.5em;">'; +
-echo '<form method="get" action="publication_search">'.DOKU_LF+
-echo '<input name="YEAR" type="hidden" value="*" />'.DOKU_LF; +
-echo '<input name="KEY1" type="text" size="60" maxlength="60" value="'.$_GET['KEY1'].'" /><br />'.DOKU_LF; +
-echo '  &nbsp;  and '; +
-echo '<input name="SUB2" type="radio" value="ANY"'.checked('SUB2', 'ANY', true).' /> any / '; +
-echo '<input name="SUB2" type="radio" value="NONE"'.checked('SUB2', 'NONE').' />'; +
-echo ' none of these words:<br />'.DOKU_LF; +
-echo '<input name="KEY2" type="text" size="60" maxlength="60" value="'.$_GET['KEY2'].'" /><br />'.DOKU_LF; +
-echo '  &nbsp;  and '; +
-echo '<input name="SUB3" type="radio" value="ANY"'.checked('SUB3', 'ANY', true).' /> any / '; +
-echo '<input name="SUB3" type="radio" value="NONE"'.checked('SUB3', 'NONE').' />'; +
-echo ' none of these words:<br />'.DOKU_LF; +
-echo '<input name="KEY3" type="text" size="60" maxlength="60" value="'.$_GET['KEY3'].'" /><br/>'.DOKU_LF; +
-echo ' &nbsp;<input type="submit" value=" search " /> &nbsp; &middot; &nbsp; <input type="reset" value="  clear " />'.DOKU_LF; +
- +
-echo '<script type="text/javascript">'.DOKU_LF; +
-echo '<!--'.DOKU_LF; +
-echo 'height = (!!document.all)?document.body.clientHeight:self.innerHeight; '; +
-echo 'document.write(\'<input name="HEIGHT" type="hidden" value="\'+height+\'" />\');'.DOKU_LF; +
- +
-echo '// -->'.DOKU_LF; +
-echo '</script>'.DOKU_LF; +
- +
-echo '</form></div>'.DOKU_LF; +
-</PHP> +
- +
-<PHP> +
-if ($_GET && (array_key_exists('KEY1', $_GET) || array_key_exists('KEY2', $_GET) || array_key_exists('KEY3', $_GET))) { +
-  $height = array_key_exists('HEIGHT', $_GET) ? ($_GET['HEIGHT']-362):500; +
-  if ($height<200) $height=200; +
-  $keys = array('YEAR','KEY1','SUB2','KEY2','SUB3','KEY3'); +
-  echo'<iframe width="100%" height="'.$height.'" src="/bin/iap_publ_search.com?'; +
-  foreach ($keys as $key) +
-    if (array_key_exists ($key, $_GET))echo $key.'='.$_GET[$key].'&;amp;'; +
-  echo '" style="border: 1px solid #436976;"> </iframe>'.DOKU_LF; +
-}+
</PHP> </PHP>
surface/publication_search.txt · Last modified: 2010-05-04 14:57 by Michael Schmid