More work!
[egate.git] / www / nwi.egw
index fe69daa..a383ecc 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: nwi.egw,v 1.5 1996/03/15 14:43:44 adam Exp $
+# $Id: nwi.egw,v 1.6 1996/05/15 18:43:37 adam Exp $
     source ztargets.conf
 
     set scriptQuery nwi.egw
@@ -53,6 +53,7 @@
     set curEntry {}
 
     set initSet 0
+
     catch {
         set initSet [lindex $sessionParms 0]
         if {$initSet < 0} {
 
     html {<dt><b>and search the following servers</b><dd>}
 
-    foreach t {
+    set hosts {
+            {mars.dtv.dk:9999/Default} 
             {nwi.ub2.lu.se/sverige}
-            {nwi.ub2.lu.se/new_nor_lib} 
-        } {
+    }
+    foreach t $hosts {
         html {<input type="checkbox" name="host" }
         if {[info exists curTargets]} {
             if {[lsearch -exact $curTargets $t] != -1} {
     }
     html "</select></b><br></dl>\n"
 
+    html {<input type=submit value="Search"><input type=reset value="Reset">}
+
+    html "\n<br><p><hr>\n"
+
+    if {0} {
+    html {<form action="http:} $env(SCRIPT_NAME)
+    html / $sessionId {/msearch.egw/} $setNo {" method=get>} \n
+    }
+
+    html {<b>Advanced search</b><br>}
+
+    set host [lindex $hosts 0]
+    set fields [lindex $targets($host) 2]
+    for {set no 2} {$no < 6} {incr no} {
+
+        html {<select name="menu} $no {">} \n
+        set template {}
+        if {$initSet} {
+            set template [join $hist($initSet,form,menu$no)]
+        }
+        if {[string length $template] > 0} {
+            html {<option> } $template "\n"
+        }
+        foreach f $fields {
+            set name [lindex $f 0]
+            if {$template == $name} continue
+            html {<option> } $name \n
+        }
+        html "</select>\n"
+
+        html {<input type="text" name="entry} $no {" size=35 value="}
+
+        if {$initSet} {
+            if {[info exists hist($initSet,form,entry$no)]} {
+                html [join $hist($initSet,form,entry$no) " "]
+            }
+        }
+        html {">} \n
+        if {$no < 5} {
+            html {<select name="logic} $no {">} \n
+            set template {}
+            if {$initSet} {
+                set template [join $hist($initSet,form,logic$no) " "]
+            }
+            if {[string length $template] > 0} {
+                html "<option> " $template \n
+            }
+            foreach op {And Or {And not}} {
+                if {$template == $op} continue
+                html "<option> " [join $op " "] \n
+            }
+            html "</select>\n"
+        }
+        html "<br>\n"
+    }
+    unset hosts
+    html "</form><br>\n"
     set useIcons 0
     button-main
 
+
     catch maintenance
 }