Europagate buttons.
[egate.git] / www / msearch.egw
index 1d1238e..efe43b9 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: msearch.egw,v 1.1 1995/11/07 14:56:58 adam Exp $
+# $Id: msearch.egw,v 1.5 1995/11/13 15:41:42 adam Exp $
 
     if {[info commands saveState] == ""} {
         source z39util.tcl
     global hist
     global zstatus
 
-    if {[wform menu1] == ""} {
-        set setNo [lindex $sessionParms 0]
-    } else {
-        if {![info exists hist($nextSetNo,0,host)]} {
-            set hist($nextSetNo,0,host) $hist($setNo,0,host)
-            for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
-                set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
-                set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
-            }
+    html "<head><title> WWW/Z39.50 Gateway Search </title>\n"
+    html "</head><body>\n"
+    set setNo [lindex $sessionParms 0]
+
+    if {[wform menu1] != ""} {
+        set hist($nextSetNo,0,host) $hist($setNo,0,host)
+        for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} {
+            set hist($nextSetNo,$i,host) $hist($setNo,$i,host)
+            set hist($nextSetNo,$i,database) $hist($setNo,$i,database)
+            set hist($nextSetNo,$i,idAuthentication) \
+                $hist($setNo,$i,idAuthentication) 
         }
         set setNo $nextSetNo
         incr nextSetNo
             set hist($setNo,maxPresent) 30
         }
     }
-    html "<head><title> WWW/Z39.50 Gateway Search </title>\n"
-    html "</head><body>\n"
-
-    z39msearch $setNo 1
+    z39msearch $setNo 1 B
 
     html "<dl>\n"
     set not $hist($setNo,0,host)
     for {set i 1} {$i <= $not} {incr i} {
         if {$zstatus($i) != 2} continue
-        html "<dt> " $hist($setNo,$i,host) ": "
+        html "<dt> " [lindex $targets($hist($setNo,$i,host)) 0] ": "
         set status [z39$i.$setNo responseStatus]
         if {[lindex $status 0] == "NSD"} {
             z39$i.$setNo nextResultSetPosition 0
@@ -53,7 +52,7 @@
             set r [z39$i.$setNo resultCount]
             html "$r hits\n<dd>\n"
 
-            display-rec 1 $hist($setNo,$i,offset) display-brief z39$i
+            display-rec 1 $hist($setNo,$i,offset) display-brief $i
         }
         html "\n"
     }
@@ -63,9 +62,9 @@
 
 <hr>
 {
-    html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+    html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/mtargets.egw"> New target </a>} " | \n"
-    html {<a href="http://} $env(SERVER_NAME) $env(SCRIPT_NAME)
+    html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/mquery.egw/} $host + $setNo {"> New query </a>}
 }
 
@@ -79,7 +78,8 @@
     }
     html "form: " [wform] " <br>\n"
     html "target: " $host " <br>\n"
-    html "query: --" $hist($setNo,1,query) "-- <br>"
+    html "query: --" $hist($setNo,1,query) "-- <br>\n"
+    html "database: " $hist($setNo,1,database) "<br>\n"
     html "setNo: " $setNo " <br>\n"
     html "nextSetNo: " $nextSetNo " <br>\n"
 }