Updated for YAZ 1.7. HTML output tidy up. Added LOC target.
[egate.git] / www / z39util.tcl
index 5186f29..08398cf 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: z39util.tcl,v 1.49 1997/11/19 13:29:13 adam Exp $
+# $Id: z39util.tcl,v 1.50 2001/02/26 14:32:36 adam Exp $
 #
 proc saveState {} {
     uplevel #0 {
@@ -87,7 +87,7 @@ proc display-medium {zset no setNo targetNo} {
     set rtype [$zset recordType $no]
     switch $rtype {
         SUTRS {
-            html { <a href="http:} $env(SCRIPT_NAME) / $sessionId
+            html { <a href="} $env(SCRIPT_NAME) / $sessionId
             html {/showfull.egw/} $setNo + $targetNo + $no + full {">}
             html [join [$zset getSutrs $no]]
             html "</a><br>\n"
@@ -109,7 +109,7 @@ proc display-medium {zset no setNo targetNo} {
         set year [$zset getMarc $no field 260 * c]
         set score [$zset getMarc $no field 999 * r]
     } dispError ] } {
-        html { <a href="http:} $env(SCRIPT_NAME) /
+        html { <a href="} $env(SCRIPT_NAME) /
         html $sessionId {/showfull.egw/} $setNo + $targetNo + $no + full {">}
         set p 0
         foreach a $author {
@@ -153,7 +153,7 @@ proc display-medium {zset no setNo targetNo} {
             html "; Score " $nscore
         }
     } else {
-        html { <a href="http:} $env(SCRIPT_NAME) /
+        html { <a href="} $env(SCRIPT_NAME) /
         html $sessionId {/showfull.egw/} $setNo + $targetNo + $no + full {">}
         html {No Title}
         html {</a> }
@@ -184,7 +184,7 @@ proc display-brief {zset no setNo targetNo} {
     set rtype [$zset recordType $no]
     switch $rtype {
         SUTRS {
-            html { <a href="http:} $env(SCRIPT_NAME) / $sessionId
+            html { <a href="} $env(SCRIPT_NAME) / $sessionId
             html {/showfull.egw/} $setNo + $targetNo + $no + full {">}
             html [string range [join [$zset getSutrs $no]] 0 70]
             html "</a><br>\n"
@@ -205,7 +205,7 @@ proc display-brief {zset no setNo targetNo} {
        set publisher [$zset getMarc $no field 260 * b]
         set year [$zset getMarc $no field 260 * c]
     } dispError ] } {
-        html { <a href="http:} $env(SCRIPT_NAME) /
+        html { <a href="} $env(SCRIPT_NAME) /
         html $sessionId {/showfull.egw/} $setNo + $targetNo + $no + full {">}
         set p 0
         foreach a $author {
@@ -253,7 +253,7 @@ proc display-brief {zset no setNo targetNo} {
        }
         html {</a> }
     } else {
-        html { <a href="http:} $env(SCRIPT_NAME) /
+        html { <a href="} $env(SCRIPT_NAME) /
         html $sessionId {/showfull.egw/} $setNo + $targetNo + $no + full {">}
         html {No Title}
         html {</a> }
@@ -726,12 +726,12 @@ proc display-scan {setNo scanNo tno} {
         html {<td align=left>}
         if {0} {
             regsub -all {\ } [lindex [$zs scanLine $i] 1] + tterm
-            html {<a href="http:} $env(SCRIPT_NAME)
+            html {<a href="} $env(SCRIPT_NAME)
             html / $sessionId / $scriptQuery {;/} $setNo + $hist($setNo,host) +
             html $hist($setNo,scan) +  $tterm {">}
         } else {
             regsub -all {\ } [lindex [$zs scanLine $i] 1] + tterm
-            html {<a href="http:} $env(SCRIPT_NAME)
+            html {<a href="} $env(SCRIPT_NAME)
             html / $sessionId {/search.egw/} $setNo + $tno +
             html hyper + $tterm {">}
         }
@@ -1190,7 +1190,7 @@ proc buttons-result-set-s {setNo targetNo setMax startPos after} {
         if {!$useIcons} {
             html "\n | "
         }
-        html {<a href="http:} $env(SCRIPT_NAME)
+        html {<a href="} $env(SCRIPT_NAME)
         html / $sessionId {/search.egw/} $setNo + $targetNo + 
         html [expr $setMax + 1] + [expr $setMax + $hist($setNo,maxPresent)]
         if {$useIcons} {
@@ -1204,7 +1204,7 @@ proc buttons-result-set-s {setNo targetNo setMax startPos after} {
         if {!$useIcons} {
             html "\n | "
         }
-        html {<a href="http:} $env(SCRIPT_NAME)
+        html {<a href="} $env(SCRIPT_NAME)
         html / $sessionId {/search.egw/} $setNo + $targetNo
         html + [expr $startPos - $hist($setNo,maxPresent)]
         html + [expr $startPos - 1]
@@ -1303,7 +1303,7 @@ proc display-result-set-m-server {setNo} {
             set addinfo [lindex $status 3]
             html "Error</h3>\n<dd>NSD$code: $msg: $addinfo"
         } else {
-            html {<dt><a href="http:} $env(SCRIPT_NAME)
+            html {<dt><a href="} $env(SCRIPT_NAME)
             html / $sessionId {/search.egw/} $setNo + $i + 1
             html + $hist($setNo,maxPresent) {">}
             html "<h3>" [lindex $targets($hist($setNo,$i,host)) 0] "</a>: "
@@ -1458,7 +1458,7 @@ proc z39history {} {
                 html {<td align=right>}
             }
             if {[info exists hist($setNo,$i,hits)]} {
-                html { <a href="http:} $env(SCRIPT_NAME)
+                html { <a href="} $env(SCRIPT_NAME)
                 html / $sessionId {/search.egw/} $setNo + $i + 1
                 html + $hist($setNo,maxPresent)
                 html {">} $hist($setNo,$i,hits) {</a>}
@@ -1474,7 +1474,7 @@ proc z39history {} {
             } else {
                 html "<dd>\n"
             }
-            html { <a href="http:} $env(SCRIPT_NAME)
+            html { <a href="} $env(SCRIPT_NAME)
             html / $sessionId / $scriptQuery {;/} $setNo + $host
             if {$html3} {
                 html {">}
@@ -1550,7 +1550,7 @@ proc button-define-target {} {
     if {!$useIcons} {
         html "\n | "
     }
-    html {<a href="http:} $env(SCRIPT_NAME)
+    html {<a href="} $env(SCRIPT_NAME)
     html / $sessionId {/tform.egw}
     if {$useIcons} {
         html {"><img src="/egwgif/button-define-target.gif" }
@@ -1571,7 +1571,7 @@ proc button-new-target {} {
     if {!$useIcons} {
         html "\n | "
     }
-    html {<a href="http:} $env(SCRIPT_NAME)
+    html {<a href="} $env(SCRIPT_NAME)
     html / $sessionId / $scriptTarget
     if {$useIcons} {
         html {"><img src="/egwgif/button-new-target.gif" }
@@ -1590,7 +1590,7 @@ proc button-view-history {} {
     if {!$useIcons} {
         html "\n | "
     }
-    html {<a href="http:} $env(SCRIPT_NAME)
+    html {<a href="} $env(SCRIPT_NAME)
     html / $sessionId {/history.egw;}
     catch { html "/" $nextSetNo}
     if {$useIcons} {
@@ -1611,7 +1611,7 @@ proc button-new-query {setNo} {
     if {!$useIcons} {
         html "\n | "
     }
-    html {<a href="http:} $env(SCRIPT_NAME)
+    html {<a href="} $env(SCRIPT_NAME)
     html / $sessionId / $scriptQuery {;/} $setNo + $hist($setNo,0,host) {">}
 
     if {$useIcons} {
@@ -1631,7 +1631,7 @@ proc button-result-set {setNo tno} {
     if {!$useIcons} {
         html "\n | "
     }
-    html {<a href="http:} $env(SCRIPT_NAME) / $sessionId 
+    html {<a href="} $env(SCRIPT_NAME) / $sessionId 
     if {$tno > 0} {
         html {/msearch.egw/} $setNo
     } else {
@@ -1656,7 +1656,7 @@ proc button-scan-window {setNo} {
         html "\n | "
     }
     set targetNo 0
-    html {<a href="http:} $env(SCRIPT_NAME)
+    html {<a href="} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo + $targetNo + {scan} {">}
     if {$useIcons} {
         html {<img src="/egwgif/button-scan-window.gif" }