Work on HTML3 detection. Tables are used to display history.
authorAdam Dickmeiss <adam@indexdata.dk>
Fri, 26 Jan 1996 17:41:25 +0000 (17:41 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Fri, 26 Jan 1996 17:41:25 +0000 (17:41 +0000)
www/egwindex.html
www/mtargets.egw
www/targets.egw
www/z39util.tcl

index 5a8b9db..39ce406 100644 (file)
@@ -3,18 +3,28 @@
 <title>Europagate WWW index</title>
 </head>
 <body>
-<h2>Europagate WWW index, $Id: egwindex.html,v 1.7 1996/01/08 08:42:12 adam Exp $</h2>
+<h2>Europagate WWW index, $Id: egwindex.html,v 1.8 1996/01/26 17:41:25 adam Exp $</h2>
 <p>
-z39 targets:
- <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/targets.egw">targets.egw</a>
-(with 
- <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/targets.egw/1+1">debug</a>)
-<br> 
-Multiple z39 targets:
- <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/mtargets.egw">mtargets.egw</a>
-(with
-<a href="http://localhost/cgi-bin/egwcgi/egwirtcl/mtargets.egw/1+1">debug</a>)
-<br>
+<ul>
+<li>
+    <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/targets.egw">
+      single target</a>
+<li>
+    <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/targets.egw/1+1">
+      single target with debug and html3</a>
+<li>
+    <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/targets.egw/0+1">
+      single target with debug and html2</a>
+<li>
+    <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/mtargets.egw">
+      multiple targets</a>
+<li>
+    <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/mtargets.egw/1+1">
+      multiple targets with debug and html3</a>
+<li>
+    <a href="http://localhost/cgi-bin/egwcgi/egwirtcl/mtargets.egw/1+1">
+      multiple targets with debug and html2</a>
+</ul>
 </body>
 </html>
 
index 1d5dc32..5b641f5 100644 (file)
@@ -1,34 +1,36 @@
 <html>
 {
-# $Id: mtargets.egw,v 1.12 1996/01/26 15:50:07 adam Exp $
+# $Id: mtargets.egw,v 1.13 1996/01/26 17:41:25 adam Exp $
     set setNo 1
     source ztargets.conf
     if {[info commands saveState] == ""} {
         source z39util.tcl
     }
     set mMode 1
-}
-<head>
-<title>Europagate, WWW/Z39.50 Gateway</title>
-</head>
-<body>
-{
+
     if {![info exists debug]} {
-        if {[lindex $sessionParms 0] == "1"} {
+        if {[lindex $sessionParms 1] == "1"} {
             set debug 1
         } else {
             set debug 0
         }
     }
-
-    if {![info exists useIcons]} {
-        if {[lindex $sessionParms 1] == "1"} {
-            set useIcons 0
+    set html3 [lindex $sessionParms 0]
+    if {$html3 == ""} {
+        if {[string first Mozilla $env(HTTP_USER_AGENT)] == 0} {
+            set html3 1
+            egw_log debug "New user using Netscape"
         } else {
-            set useIcons 1
+            set html3 0
+            egw_log debug "New user Not using Netscape"
         }
     }
-
+}
+<head>
+<title>Europagate, WWW/Z39.50 Gateway</title>
+</head>
+<body>
+{
     set useIcons 1
     button-europagate
     button-define-target 0
index 46d61e1..55d8189 100644 (file)
@@ -1,18 +1,29 @@
 <html>
 {
-# $Id: targets.egw,v 1.18 1996/01/26 15:50:10 adam Exp $
+# $Id: targets.egw,v 1.19 1996/01/26 17:41:26 adam Exp $
     source ztargets.conf
     if {[info commands saveState] == ""} {
         source z39util.tcl
     }
+    set mMode 0
+
     if {![info exists debug]} {
-        if {[lindex $sessionParms 0] == "1"} {
+        if {[lindex $sessionParms 1] == "1"} {
             set debug 1
         } else {
             set debug 0
         }
     }
-    set mMode 0
+    set html3 [lindex $sessionParms 0]
+    if {$html3 == ""} {
+        if {[string first Mozilla $env(HTTP_USER_AGENT)] == 0} {
+            set html3 1
+            egw_log debug "New user using Netscape"
+        } else {
+            set html3 0
+            egw_log debug "New user Not using Netscape"
+        }
+    }
 }
 <head>
 <title> Europagate, WWW/Z39.50 Gateway </title>
index 6860b16..e703062 100644 (file)
@@ -1,5 +1,5 @@
 #
-# $Id: z39util.tcl,v 1.26 1996/01/26 15:50:11 adam Exp $
+# $Id: z39util.tcl,v 1.27 1996/01/26 17:41:26 adam Exp $
 #
 proc saveState {} {
     uplevel #0 {
@@ -949,35 +949,73 @@ proc z39history {} {
     global env
     global sessionId
     global targets
+    global html3
 
     if {![info exists nextSetNo]} {
         return
     }
-    html "<h2>History</h2><dl><br>\n"
+    html "<h2>History</h2><br>\n"
+    if {$html3} {
+        html {<table width=500 border=1><tr>}
+        html {<td align=left><b>Target</b>}
+        html {<td align=left><b>Database</b>}
+        html {<td align=right><b>Hits</b>}
+        html {<td><b>Query</b>}
+        html {<tr>} "\n"
+    } else {
+        html {<dl>} "\n"
+    }
     for {set setNo 1} {$setNo < $nextSetNo} {incr setNo} {
         if {$hist($setNo,scan) > 0} continue
         set host $hist($setNo,host)
-        html {<dt> } [lindex $targets($host) 0]
-        if {[llength [lindex $targets($host) 1]] > 1} {
-            html ": "
-            foreach b $hist($setNo,database) {
-                html " $b"
+        if {$html3} {
+            html {<td align=left>}
+        } else {
+            html {<dt> }
+        }
+        html [lindex $targets($host) 0]
+        if {$html3} {
+            html {<td align=left>} [join $hist($setNo,database)]
+        } else {
+            if {[llength [lindex $targets($host) 1]] > 1} {
+                html ": "
+                foreach b $hist($setNo,database) {
+                    html " $b"
+                }
             }
+            html {. }
+        }
+        if {$html3} {
+            html {<td align=right>}
         }
-        html {. }
-
         if {[info exists hist($setNo,hits)]} {
             html { <a href="http:} $env(SCRIPT_NAME)
             html / $sessionId {/search.egw/} $setNo + 1
             html + $hist($setNo,maxPresent)
-            html {">Result</a>: } $hist($setNo,hits) { hits.}
+            if {1} {
+                html {">} $hist($setNo,hits) {</a>}
+            } else {
+                html {">Result</a>: } $hist($setNo,hits) { hits.}
+            }
         } else {
-            html {Search failed.}
+            if {$html3} {
+                html {Failed}
+            } else {
+                html {Search failed.}
+            }
+        }
+        if {$html3} {
+            html {<td align=left>}
+        } else {
+            html "<dd>\n"
         }
-        html "<dd>\n"
         html { <a href="http:} $env(SCRIPT_NAME)
-        html / $sessionId {/query.egw/} $host + $setNo 
-        html {">Query</a>: }
+        html / $sessionId {/query.egw/} $host + $setNo
+        if {$html3} {
+            html {">}
+        } else {
+            html {">Query</a>: }
+        }
         set op {}
         for {set i 1} {$i <= 3} {incr i} {
             if {[string length $hist($setNo,form,entry$i)] > 0} {
@@ -987,8 +1025,16 @@ proc z39history {} {
                 set op $hist($setNo,form,logic$i)
             }
         }
+        if {$html3} {
+            html {</a><tr>} "\n"
+        }
     }
-    html "</dl>\n"
+    if {$html3} {
+        html {</table><p>}
+    } else {
+        html {</dl>}
+    }
+    html "\n"
 }
 
 proc displayError {msga msgb} {
@@ -1003,10 +1049,11 @@ proc displayError {msga msgb} {
 
 proc button-europagate {} {
     global useIcons
+    html {<a href="http://europagate.dtv.dk/">}
     if {$useIcons} {
         html {<img src="/egwgif/button-egw.gif" alt="Europagate" border=0></a>}
     } else {
-        html {Europagate | }
+        html {Europagate</a> | }
     }
 }