#!/usr//bin/tclsh
# maybe  change upper line for NEXTSTEP
# ChM 25.12.2001

proc encode {w} {
    regsub -all { } $w {_} w
    return $w
}

set query $env(QUERY_STRING)

proc empty {w} { return [string match "" $w] }

puts {Content-type: text/html



<html>
<head>
<title>Einfache Suche - H&ouml;he</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#FFFFFF">
<table width="464" border="0" cellpadding="5" align="center">
  <tr bgcolor="#336600"> 
    <td height="66"> 
      <p><font size="+3" color="#FFFFFF">Einfache Pflanzensuche<br>
        <i><font size="+2">easy </font></i></font><i><font size="+2" color="#FFFFFF">plant 
        search</font></i></p>
      </td>
  </tr>
  <tr> 
 <td>
}

# Farbe
if [regexp {farbe=([0-9a-zA-Z+%\-]*)} $query z color] {
if ![empty $color] {
 puts "<p>Farbe: $color</p>"
}   } { set color ""
 puts "<p>Farbe: unbestimmt / anything</p>"
 }

puts "    <font size=\"+3\" color=\"#008040\">Pflanzensuche <font size=\"+2\">/ plant "
puts "       search</font></font> "
puts "       <p><b>Einfache Pflanzensuche / <i>easy search</i></b></p>"
puts "       <p>Bitte klicken Sie auf die Zahlenangabe der Wuchsh&ouml;he, die ungef&auml;hr "
puts "         zutrifft:<br>"
puts "         <i>Please choose the height of growth of the plant:</i></p>"
puts "       <p><img src=\"/wuchshohe.png\" width=\"432\" height=\"177\" usemap=\"#MapMap\" border=\"0\"><map name=\"MapMap\"><area shape=\"rect\" coords=\"12,158,82,174\" href=\"/cgi-bin/suchehoehe.pl?farbe=$color&amp;hoehe=61&amp;hoehemax=170\" alt=\"61-170 cm\" title=\"61-170 cm\"><area shape=\"rect\" coords=\"38,139,101,157\" href=\"/cgi-bin/suchehoehe.pl?farbe=$color&amp;hoehe=31&amp;hoehemax=60\" alt=\"31-60 cm\" title=\"31-60 cm\"><area shape=\"rect\" coords=\"62,121,119,138\" href=\"/cgi-bin/suchehoehe.pl?farbe=$color&amp;hoehe=1&amp;hoehemax=30\" alt=\"1-30 cm\" title=\"1-30 cm\"><area shape=\"rect\" coords=\"176,134,255,152\" href=\"/cgi-bin/suchehoehe.pl?farbe=$color&amp;hoehe=171&amp;hoehemax=500\" alt=\"171-500 cm\" title=\"171-500 cm\"><area shape=\"rect\" coords=\"282,134,370,152\" href=\"/cgi-bin/suchehoehe.pl?farbe=$color&amp;hoehe=501&amp;hoehemax=2000\" alt=\"501-2000 cm\" title=\"501-2000 cm\"><area shape=\"rect\" coords=\"338,154,429,171\" href=\"/cgi-bin/suchehoehe.pl?farbe=$color&amp;hoehe=2001&amp;hoehemax=6000\" alt=\"2001-6000 cm\" title=\"2001-6000 cm\"></map> "
puts "       </p>"
puts "       <p align=\"left\"><a href=\"/cgi-bin/suchehoehe.pl?farbe=$color&amp;hoehe=1&amp;hoehemax=6000\">Wuchsh&ouml;he "
puts "         ist unbekannt / unbestimmt.</a><br>"
puts "         <a href=\"/cgi-bin/suchehoehe.pl?farbe=$color&amp;hoehe=1&amp;hoehemax=6000\">height "
puts "         of growth is not known / anything.</a></p>"
puts "       </td>"
puts "   </tr>"
puts " </table>"
puts " </body>"
puts " </html>"

