Port to OSF/1. Gif references moved from /gif/ to /egwgif/.
[egate.git] / www / search.egw
index 0920e0a..45589ac 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: search.egw,v 1.24 1996/01/05 16:35:01 adam Exp $
+# $Id: search.egw,v 1.26 1996/01/09 16:16:48 adam Exp $
 
 proc start-scan {scanNo cache dir} {
     global sessionId
@@ -43,7 +43,7 @@ proc start-scan {scanNo cache dir} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo + [expr $scanNo - 1] + b {">}
     if {$useIcons} {
-        html {<img src="/gif/button-previous-terms.gif" }
+        html {<img src="/egwgif/button-previous-terms.gif" }
         html {alt="Next Terms" border=0></a>}
     } else {
         html {Previous Terms</a> | }
@@ -52,7 +52,7 @@ proc start-scan {scanNo cache dir} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo + [expr $scanNo + 1] + f {">}
     if {$useIcons} {
-        html {<img src="/gif/button-next-terms.gif" }
+        html {<img src="/egwgif/button-next-terms.gif" }
         html {alt="Next Terms" border=0></a>}
     } else {
         html {Next Terms</a> | }
@@ -69,7 +69,7 @@ proc start-scan {scanNo cache dir} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo + [expr $scanNo - 1] + b {">}
     if {$useIcons} {
-        html {<img src="/gif/button-previous-terms.gif" }
+        html {<img src="/egwgif/button-previous-terms.gif" }
         html {alt="Next Terms" border=0></a>}
     } else {
         html {Previous Terms</a> | }
@@ -78,7 +78,7 @@ proc start-scan {scanNo cache dir} {
     html {<a href="http:} $env(SCRIPT_NAME)
     html / $sessionId {/search.egw/} $setNo + [expr $scanNo + 1] + f {">}
     if {$useIcons} {
-        html {<img src="/gif/button-next-terms.gif" }
+        html {<img src="/egwgif/button-next-terms.gif" }
         html {alt="Next Terms" border=0></a>}
     } else {
         html {Next Terms</a> | }
@@ -115,7 +115,7 @@ proc buttons {setNo setMax startPos after} {
         html / $sessionId {/search.egw/} $setNo + [expr $setMax + 1]
         html + [expr $setMax + $hist($setNo,maxPresent)]
         if {$useIcons} {
-            html {"><img src="/gif/button-next-records.gif" alt="Next Records"}
+            html {"><img src="/egwgif/button-next-records.gif" alt="Next Records"}
            html { border=0></a>}
         } else {
             html {">Next Records</a>} " | \n"
@@ -127,7 +127,7 @@ proc buttons {setNo setMax startPos after} {
         html + [expr $startPos - $hist($setNo,maxPresent)]
         html + [expr $startPos - 1]
         if {$useIcons} {
-            html {"><img src="/gif/button-previous-records.gif" }
+            html {"><img src="/egwgif/button-previous-records.gif" }
            html {alt="Previous Records" border=0></a>}
         } else {
             html {">Previous Records</a>} " | \n"
@@ -212,6 +212,7 @@ proc buttons {setNo setMax startPos after} {
         }
         set hist($setNo,query) $query
     } else {
+        if {![info exists hist($setNo,scan)]} return
         if {$hist($setNo,scan) > 0} {
             set scanNo [lindex $sessionParms 1]
             set dir [lindex $sessionParms 2]
@@ -286,8 +287,8 @@ proc buttons {setNo setMax startPos after} {
     html "<h3>Debug information</h3>\n"
     html "sessionId: $sessionId <br>\n"
     html "sessionParms: $sessionParms <br>\n"
-    foreach e {SERVER_NAME PATH_INFO SCRIPT_NAME} {
-        html $e {: } $env($e) {<br>} \n
+    foreach n [array names env] {
+        html "env($n) = " $env($n) " <br>\n"
     }
     html "form: " [wform] " <br>\n"
     html "target: " $host " <br>\n"